Overview

The Monster plugin lets you create entirely new monsters (name, 3D model, stats) outside the original monster list. On the server side these are the XML files in Data\Plugin\Monster\; on the client side it is the file Data\Custom\local\Monster.bmd, which declares the monster's model, textures, name and effects. Once declared, a custom monster is used like a regular monster: place it in Data\Monster\MonsterSpawn.xml (<Spawn Index="ID" .../>), events, item bags, drop tables (Data\Item\Drop), monster skills (Data\Monster\Skill), and so on.

Requirements

  • The Monster plugin is purchased and [Plugin] Monster = 1 in Data\Plugin\Plugin.ini.
  • Client: a recent Main.dll; the file Data\Custom\local\Monster.bmd with the same ID as the monster in the XML; the mesh files (.bmd) and textures of the monster model (for example, the sample uses Data\Custom\Monster\Monster1000.bmd); sound files if declared.
  • If the client does not have that ID in Monster.bmd, the client calls the original monster creation function (the monster appears as the original monster / incorrectly); if the plugin is disabled on the client side (GameServer has not allowed it), the custom monster is not created.

The structure of Monster.bmd (ID, name, mesh folder + file, texture folder, scale, effects, sounds, and so on) is not meant to be written by hand; create and edit it with the TSWMU EDITOR tool.

[TO VERIFY: the specific feature / button name in EDITOR used to create Monster.bmd (the EDITOR documentation has not been cross-checked in this section).]

Configuration Data\Plugin\Monster\*.xml

Every *.xml file in this folder is loaded (subfolders are not searched recursively). Each file has the same form as Data\Monster\MonsterList.xml: <MonsterList> containing <Monster .../> lines.

  • Valid IDs are 1 to 4095 (the monster ID is sent to the client in 12 bits). An ID of 0 or greater than 4095 is ignored and an error is written to the GameServer log. Use the range 3000 to 4095 (does not collide with original monsters).
  • Use only new IDs. An ID that already exists in MonsterList.xml is ignored (not overwritten) and an error is written to the log.

Attributes of <Monster>

Missing attributes take the value 0 / empty, except for the exceptions noted in the "Default" column. They are read exactly like original monsters in MonsterList.xml.

KeyValueDefaultMeaning
ID1 to 4095requiredMonster code, matching the ID in the client's Monster.bmd and the Spawn Index in MonsterSpawn.xml.
NametextemptyMonster name on the server (the name shown on the client comes from Monster.bmd).
Modelnumberequal to IDModel code.
Sizereal number1.0Size scale.
Typenumber0Monster type.
Levelnumber0Monster level.
Life, Mana, Shield, Staminanumber0Maximum HP, MP, SD, AG.
DamageMin, DamageMaxnumber0Minimum / maximum damage.
DamageCorrectionnumber >= 00Percentage of extra damage when the level differs (negative values are clamped to 0).
CritDamageRate, CritDamageAddnumber0Rate and amount of additional critical damage.
ExlDamageRate, ExlDamageAddnumber0Rate and amount of additional excellent damage.
AttackSuccesRatenumber0Attack success rate (the attribute name is spelled exactly as in the file: a single "s" in "Succes").
Defense, DefenseSuccesRatenumber0Defense and defense success rate.
MoveRange, MoveSpeednumber0Movement range and movement speed.
AttackRange, AttackSpeednumber0Attack range and attack speed.
ViewRangenumber0View range. If smaller than AttackRange, it is raised to AttackRange.
ResIce, ResPoison, ResLightning, ResFire, ResEarth, ResWind, ResWaternumber0Resistance to the 7 elements.
RespawnTimeMin, RespawnTimeMaxnumber0; Max = MinMinimum / maximum respawn time (if RespawnTimeMax is missing it equals RespawnTimeMin).
ItemRate, ZenRate, ItemMaxLevelnumber0Item drop rate, zen drop rate, maximum level of dropped items.
RegenLife, RegenLifeTime, RegenMana, RegenManaTime, RegenShield, RegenShieldTime, RegenStamina, RegenStaminaTimenumber0Amount and interval of automatic HP / MP / SD / AG regeneration.
ScriptNameAI script nameemptyThe monster's AI script. If the name does not exist: the error "Wrong AI Script" is written to the log and the value is left empty.
ElementalAtribute, ElementalDef, ElementalDamageMin, ElementalDamageMax, ElementalAttackSuccesRate, ElementalDefSuccesRatenumber0Elemental attributes of the monster: element, defense, min / max damage, elemental attack success rate and defense success rate.
RadianceImmune, DebuffResistance, DebuffDefnumber0Radiance immunity, debuff resistance and debuff defense.
ResCritDamage, ResExlDamage, DamageAbsorbnumber0Critical damage resistance, excellent damage resistance, damage absorption.
Elite, Custom0 / 10Elite monster flag and custom monster flag.
ExpLevelnumber0Level used to calculate experience.

The attributes ExtraDamageMin, ExtraDamageMax, ExtraDefense may appear in the sample file but GameServer does not read them.

[TO VERIFY: the detailed meaning (units, value scale) of Type, MoveRange, MoveSpeed, AttackSpeed, ItemRate, ZenRate, RadianceImmune, DebuffResistance, DebuffDef, DamageAbsorb, Elite, Custom, ElementalAtribute: the table above only describes them by attribute name and by how they are read in the code, and where each value is used has not been cross-checked; compare with the guide in Data\Monster\MonsterList.xml.]

Example (abridged)

<MonsterList>
	<Monster ID="1010" Name="Test Monster" Model="1010" Size="1" Type="2" Level="400" Life="500000" Mana="0" Shield="0" Stamina="0" DamageMin="2000" DamageMax="2500" AttackSuccesRate="3000" Defense="1500" DefenseSuccesRate="1000" MoveRange="3" MoveSpeed="400" AttackRange="2" AttackSpeed="1600" ViewRange="5" RespawnTimeMin="10" ItemRate="0" ZenRate="0" ItemMaxLevel="0" ElementalAtribute="0" ExpLevel="400"/>
</MonsterList>

Then add a spawn point in Data\Monster\MonsterSpawn.xml with Index set to the ID you just created.

Enabling / disabling the plugin

  • The server always loads the XML files (even when not purchased) so that the spawn points in MonsterSpawn.xml are kept; only the creation of monsters is blocked when the plugin is off.
  • On (after Reload plugin): the XML is reloaded; custom monster spawn points are created (monsters appear after about 5 seconds).
  • Off (set to 0 then Reload plugin): existing custom monsters on the maps are removed and no more are created.

Reloading the configuration

Use the Reload plugin button on the GameServer control panel, or Reload monster (command .reload monster 0) to reload the monster list. The GameServer log records the number of custom monsters loaded and the ON / OFF status.

[TO VERIFY: the command .reload monster 0 and the Reload monster button are taken from the header comment of the CustomMonster.xml file; the corresponding command code has not been found in GameServer to confirm the syntax.]