===== monsters.xml file configuration ===== Data from the ''monsters.xml'' file are used to set up configuration values about every computered related beings the players will encounter during the online experience. The monsters.xml file has to be located in the **data** directory. Each configuration option in this xml file, is defined using a '''' tag within the '''' main node, which itself has got an '''' child node, and some others. Here is an example: 10 **Note:** This file can be used by both the client and the server if the necessary data is provided. That's why we provide options for both applications here for simplification and easier documentation purpose. But when you should be careful to provide only the client data when dealing with client configuration, or the players will more information about the monsters than they should actually have. ==== General (Client and server) nodes description ==== === node description === The '''' node is the monsters.xml file main node and permits to determine monsters definition start and ending. This node has only one parameter for now, ''offset'', which is added to all the monster IDs. It defaults to 1002 for the TmwAthena protocol, for backwards compatibility with older clients, which did it automatically in the netcode. This node is **required** by both the client and the server. ... === node description === The '''' node is used to define the different values used to bring a specific monster up to life within the game. Each monster's definition is then defined within its start and ending tags. This node is **required** by both the client and the server. ... ... ^ Parameter name ^ Type ^ Mandatory ^ Default value ^ Description ^ | id | integer | Yes | | It is the id of the monster. This parameter has to be unique for each monster. \\ The system will use the monster id to refer on it in many ways. | | name | string | No | "unnamed" | Tells the monster name. Used to ease configuration on server and with the client \\ but displayed to players on the client side. | | targetCursor | string \\ defined value | No | "normal" | Used by the client only. Tells which circle cursor size should be use when displaying the target cursor around the monster sprite while in game. It mainly depends on the sprite's pixel size. \\ Acceptable values are: \\ small \\ normal \\ large | === node description === The '''' node is used to define how to compute each possible monsters attacks, for both the client and the server. This node is optional by both the client and the server. ... ... ^ Parameter name ^ Type ^ Mandatory ^ Default value ^ Description ^ | id | integer | Yes | | Id number of the attack (unique for each monster) used to identify the monster type in the netcode. | | priority | integer | No | 1 | How likely the monster is to choose this attack when it got multiple attacks it can use in the current situation. | | type | string \\ defined values | Yes | | Attack type. can be ''physical'', ''magical'' (or ''magic''), or ''other'' (Hazard damages not based on the victim's defence. | | pre-delay | integer | Yes for the server \\ No for the client | | Delay in game ticks((10 game ticks = 1 second.)) between the decision to perform this attack and performing it. | | aft-delay | integer | Yes for the server \\ No for the client | | Delay in game ticks after the attack until the monster can act again. | | damage-factor | integer | Yes for the server \\ No for the client | | Multiplier applied to minimum and maximum damage as they have been calculated by using the monster attributes. | | range | integer | Yes for the server \\ No for the client | | Range of the attack, in tiles. | | action | string \\ defined values | No for the server \\ Recommended for the client | "attack" | Animation name that is played when the monster uses this attack. The value must correspond to an animation defined in the monster.xml sprite file. | | script-function | string | No | "" | Defines the script function name to be used, if a valid script file if provided by the '' ... ... ^ Type ^ Mandatory ^ Default value ^ Description ^ | string \\ filename | Yes | | The script filename to be used for the given monster. \\ The script filename must be relative to the ''data/scripts'' directory. | === node description === **Note:** FIXME: Not implemented yet. The '''' node is used to define the current monster vulnerabilities, or on the opposite strength against one or several magical [[elements]]. These values shouldn't be left in the client version. This node is **optional** for the server, and will be ignored by the client. ... ... ^ Parameter name ^ Type ^ Mandatory ^ Default value ^ Description ^ | element | string | Yes | "" | Tells to which [[element]] the weakness or the strength is. ('fire', 'earth', 'ice', 'metal' are some examples.) | | factor | float | Yes | "" | Tells how much the monster defence against an element is reduced by, in percent. \\ A value of 0.7 indicates that the defence is lowered by 30%. \\ On the contrary, a value > 1.0 indicates that de defence is higher again the given element. | ==== Client nodes description ==== === node description === The '''' node is used to define the monster sprite used to be displayed by the client. This node is unused by the server, optional but very recommended for the client. monsters/my-monster.xml ... ... ^ Type ^ Mandatory ^ Default value ^ Description ^ | xml filename | Yes | "" | Tells the xml file used to display the monster sprites. (Used by the Mana Client only). \\ The given file must be relative to the ''data/graphics/sprites'' directory. | === node description === The '''' nodes are used to define the monster sounds played on certain monster's events. This node is unused by the server, and optional for the client. monsters/maggot/maggot-hit1.ogg monsters/maggot/maggot-hit2.ogg monsters/maggot/maggot-miss1.ogg ... ... ^ Parameter name ^ Type ^ Mandatory ^ Default value ^ Description ^ | event | string \\ defined keywords | Yes | | Tells the event at which the corresponding sound should be played. \\ Available events are: \\ 'die', 'miss', 'hit', 'strike', 'dodge'. \\ There can be several sounds nodes and so, events for one monster. The same event can even be set multiple times. The given sounds are played randomly in this case. |