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
Monsterplugin is purchased and[Plugin] Monster = 1inData\Plugin\Plugin.ini. - Client: a recent
Main.dll; the fileData\Custom\local\Monster.bmdwith the same ID as the monster in the XML; the mesh files (.bmd) and textures of the monster model (for example, the sample usesData\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.xmlis 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.
| Key | Value | Default | Meaning |
|---|---|---|---|
ID | 1 to 4095 | required | Monster code, matching the ID in the client's Monster.bmd and the Spawn Index in MonsterSpawn.xml. |
Name | text | empty | Monster name on the server (the name shown on the client comes from Monster.bmd). |
Model | number | equal to ID | Model code. |
Size | real number | 1.0 | Size scale. |
Type | number | 0 | Monster type. |
Level | number | 0 | Monster level. |
Life, Mana, Shield, Stamina | number | 0 | Maximum HP, MP, SD, AG. |
DamageMin, DamageMax | number | 0 | Minimum / maximum damage. |
DamageCorrection | number >= 0 | 0 | Percentage of extra damage when the level differs (negative values are clamped to 0). |
CritDamageRate, CritDamageAdd | number | 0 | Rate and amount of additional critical damage. |
ExlDamageRate, ExlDamageAdd | number | 0 | Rate and amount of additional excellent damage. |
AttackSuccesRate | number | 0 | Attack success rate (the attribute name is spelled exactly as in the file: a single "s" in "Succes"). |
Defense, DefenseSuccesRate | number | 0 | Defense and defense success rate. |
MoveRange, MoveSpeed | number | 0 | Movement range and movement speed. |
AttackRange, AttackSpeed | number | 0 | Attack range and attack speed. |
ViewRange | number | 0 | View range. If smaller than AttackRange, it is raised to AttackRange. |
ResIce, ResPoison, ResLightning, ResFire, ResEarth, ResWind, ResWater | number | 0 | Resistance to the 7 elements. |
RespawnTimeMin, RespawnTimeMax | number | 0; Max = Min | Minimum / maximum respawn time (if RespawnTimeMax is missing it equals RespawnTimeMin). |
ItemRate, ZenRate, ItemMaxLevel | number | 0 | Item drop rate, zen drop rate, maximum level of dropped items. |
RegenLife, RegenLifeTime, RegenMana, RegenManaTime, RegenShield, RegenShieldTime, RegenStamina, RegenStaminaTime | number | 0 | Amount and interval of automatic HP / MP / SD / AG regeneration. |
ScriptName | AI script name | empty | The 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, ElementalDefSuccesRate | number | 0 | Elemental attributes of the monster: element, defense, min / max damage, elemental attack success rate and defense success rate. |
RadianceImmune, DebuffResistance, DebuffDef | number | 0 | Radiance immunity, debuff resistance and debuff defense. |
ResCritDamage, ResExlDamage, DamageAbsorb | number | 0 | Critical damage resistance, excellent damage resistance, damage absorption. |
Elite, Custom | 0 / 1 | 0 | Elite monster flag and custom monster flag. |
ExpLevel | number | 0 | Level 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.xmlare 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.]