Data from the items.xml file are used to set up configuration values about every items
the players will be able to carry during his/her online experience.
The items.xml file has to be located in the data directory.
Each configuration option in this xml file, is defined using a <item> tag within the <items> main node.
Here is an example:
<?xml version="1.0"?> <items> <item id="501" name="Cactus Drink" image="use-potion-a.png|G:#22ff22" description="A fresh drink." effect="+15 HP" type="usable" hp="15" weight="4" max-per-slot="10"/> ... </items>
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 have more information about the items than they should.
| Parameter name | Type | Mandatory | Default value | Description |
|---|---|---|---|---|
| id | integer | Yes | It is the item id. This parameter has to be unique for each item. The system will use the item id to refer on it in many ways. |
|
| name | string | No | “unnamed” | Tells the item name. Used to ease configuration on server and with the client but displayed to players on the client side. |
| description | string | No | ”” | Gives a short description of the item. Used to ease configuration on server and with the client. This is displayed to players on client side. |
| type | string (defined values) | No | “other” (=“generic”) | Indicates the item's type. The available types are: - generic: A generic item can only be used for quest or be sold in most cases. This is not usable by itself. - usable: An usable item gives something to the character when used. (E.g: A potion gives 20HP when used.) - equip-1hand: A one-handed weapon. - equip-2hand: A two-handed weapon, meaning that a shield cannot be equipped at the same time. - equip-torso: The torso piece of equipment. - equip-arms: Equipment for both arms. - equip-head: E.g.: An helmet. - equip-legs: Equipment for both legs. - equip-shield: A extra defensive piece of equipment that can be equipped with a one-handed weapon. - equip-ring: A ring is equipped on hands. For game usability, characters can equip only one ring at a time. - equip-charm: A charm is magic artefact in the character's inventory, considered active when equipped. - equip-necklace: Only one necklace can be equipped at a time. - equip-feet: Equipment for both feet. - equip-ammo: Need by weapon requiring ammo, like A bow needs arrows. - racesprite: Special type used to tell the system that the sprite file is used as an available race. - hairsprite: Special type used to tell the system that the sprite file is used as an available hairstyle. |
| weapon-type | string | No | ”” | Indicates the skill name the item is triggering when used for attacking (for weapon items only). The skill name set in mana-skills.xml and the value given here must match (case-insensitively). |
| attack-action | string | No | ”” | Indicates the attack action name used to animate the character using the weapon. The value given here must match exactly the action value of the character's corresponding playerset.xml file. |
| weight | integer | No | 0 | Indicates the weapon's weight in kg. |
| view | integer | No | 0 | Indicates another item whose view to use instead. |
| attack-range | integer | No | 0 | Indicates the weapon's attack range in pixels. |
| hp | integer | No | 0 | Indicates what happens to the character's HP1) when he/she uses it. E.g: A value of 25 means healing of 25 HP. |
| defense | integer | No | 0 | Indicates the defense bonus when using the given weapon. |
Used only by the server to handle inventory limitations.
| Parameter name | Type | Mandatory | Default value | Description |
|---|---|---|---|---|
| max-per-slot | integer | No | 1 | Indicates the maximum of a given item the character can stack in the same inventory slot. |
| script | string XML file | No | ”” | Tells the script file to be run when the item is used. The filename must be relative to the data/script/ folder. |
| sprite_id | integer | No | 0 | The item ID sent by the server when another character is wearing the item. This can be used to avoid revealing the real item type when you have look-alike items with different properties. |
| value | integer | No | 0 | Tells how much does the item cost with the given currency. See units.xml for more details about how to set up the World currency (and weight) name. |
| range | integer | No | 0 | Only taken in account if the item is a 1handed or 2handed typed weapon. (See the type parameter.) : Set the weapon range in pixels, again, or?? |
| element | integer (defined values) | No | 0 | Only taken in account if the item is a 1handed or 2handed typed weapon. (See the type parameter.) Set the weapon element. Available elements are: - Fire - …… |
| attack-min | integer | No | 0 | Set the minimum HP damage value dealt with this item. (Without counting either the weapon skill or the character strength.) |
| attack-delta | integer | No | 0 | Set the HP damage value range dealt with this item. Damages: min ↔ min+delta |
| lifetime | integer | No | 0 | Tells in tenth of a second the time in which the modifier values below are applied (if set) to the character's attributes when using the given item. |
| strength | integer | No | 0 | When the given item is used, the character's strength is modified by adding this value which can be negative. The effect will be lasting for the lifetime value in seconds / 10. |
| agility | integer | No | 0 | When the given item is used, the character's agility is modified by adding this value which can be negative. The effect will be lasting for the lifetime value in seconds / 10. |
| vitality | integer | No | 0 | When the given item is used, the character's vitality is modified by adding this value which can be negative. The effect will be lasting for the lifetime value in seconds / 10. |
| willpower | integer | No | 0 | When the given item is used, the character's willpower is modified by adding this value which can be negative. The effect will be lasting for the lifetime value in seconds / 10. |
| intelligence | integer | No | 0 | When the given item is used, the character's intelligence is modified by adding this value which can be negative. The effect will be lasting for the lifetime value in seconds / 10. |
| dexterity | integer | No | 0 | When the given item is used, the character's dexterity is modified by adding this value which can be negative. The effect will be lasting for the lifetime value in seconds / 10. |
| Parameter name | Type | Mandatory | Default value | Description |
|---|---|---|---|---|
| image | string | No | ”” (PNG file) | The PNG filename must be relative to the data/graphics/sprites folder. The corresponding image is used to be displayed in the inventory and in the equipment window. Additional values can be added after the filename, starting with a | are used to dye the image corresponding to the need. See the Image dyeing system to get more details about how to add such useful color scheme to your inventory. |
| effect | string | No | ”” | Used to display very a short effects list of the item. |
| missile-particle | string (xml file) | No | ”” | Gives the xml file used to display the corresponding particle effect when the weapon is used. The filename must be relative to the data/graphics/particles folder. See the particles.xml file for more details about how to configure nice particle effects. |
The Mana server isn't concerned by the given parameters and will ignore them.
These “items” are purely virtual ones. They are used to configure the available hairstyle, races, and weapon type within an TmwAthena session. The client use them to get in sync with server when dealing with such information.
Note:
: The ManaServ client is using this hairstyle system for now. This should be fixed by adding the available hairstyle in a specific xml file, why not along with TmwAthena configuration. See the playerset handling improvement where a hairstyle node should be added.
<?xml version="1.0"?> <items> ... <item id="-9" type="hairsprite" name="Short and curly"> <sprite>hairstyle9.xml</sprite> </item> ... </items>
| Parameter name | Type & Range | Description |
|---|---|---|
| id (for hairstyles) | integer From -1 to -16?? : What is the higher negative available value? | The id used by both the client and the TmwAthena server to cope with this hairstyle. |
| name (for hairstyles) | string | The Hair Style name. |
See the <sprite> childnode description to get more information about the <sprite></sprite> part.
Note:
: The ManaServ client is using this hairstyle system for now and the server doesn't support more than one race. See the playerset handling improvement where a race parameter should be added for both.
<?xml version="1.0"?> <items> ... <item id="-100" type="racesprite" name="Human"> <sprite gender="male">player_male_base.xml</sprite> <sprite gender="female">player_female_base.xml</sprite> </item> ... </items>
| Parameter name | Type & Range | Description |
|---|---|---|
| id (for racesprites) | integer From -100 to ?? : What is the higher negative available value? | The id used by both the client and the TmwAthena server to cope with this race. |
| name (for hairstyles) | string | The race name. |
See the <sprite> childnode description to get more information about the <sprite></sprite> part.
These low-id weapon are used to set which animation goes with which weapon for TmwAthena clients only.
<?xml version="1.0"?> <items> ... <item id="33" weapon_type="1"> <sprite>weapon-dagger.xml</sprite> <sound event="strike">weapons/swords/short-sword-miss1.ogg</sound> <sound event="hit">weapons/swords/short-sword-hit1.ogg</sound> </item> ... </items>
| Parameter name | Type & Range | Description |
|---|---|---|
| id (for weapons) | integer From 1 to 255 | The id used by both the client and the TmwAthena server to cope with this weapon. |
| weapon_type (for weapons) | integer | Used to get in synchronization with the server when using this weapon-type. Do not be confused with the weapon-type parameter. |
See the <sprite> childnode description and the <sound> childnode description to get more information about the <sprite></sprite> and the <sound></sound> part.
Those <item> parameters are used only by TmwAthena clients.
| Parameter name | Type | Mandatory | Default value | Description |
|---|---|---|---|---|
| attack | integer | No | 0 | Indicates the attack bonus when using the given weapon. |
| mp | integer | No | 0 | Indicates what happens to the character's MP2) when he/she uses it. E.g: A value of 25 means healing of 25 MP. |
This childnode is used to provide information about how to display the item's sprite by the client. This node is used by the client only and is very recommended.
<?xml version="1.0"?> <items> ... <item id="523" image="armor-chest-leathershirt.png" name="Leather Shirt"> <sprite gender="male">chest-leather-male.xml|#573a26,9e7654,d3b79e,ffffff;#b96b3d,fbf5f1</sprite> <sprite gender="female">chest-leather-female.xml|#412300,603100,8d4900;#ffff00</sprite> </item> ... </items>
| Parameter name | Type | Mandatory | Default value | Description |
|---|---|---|---|---|
| sprite inner value | string | No | “error.xml” (xml file) | This parameter can be either an xml filename or a PNG filename. The filename must be relative to the data/graphics/sprites folder. The client will load the corresponding XML file to get the images used for each cases. See sprites.xml for more details. Additional values can be added after the filename, starting with a | are used to dye the image corresponding to the need. See the Image dyeing system to get more details about how to add such useful color scheme to your inventory. |
| gender | string (defined values) | No | ”” | This parameter indicates for which gender the xml file should be used. “male” and “female” are available values, but if no values are specified, the same file is used for both. |
This childnode is used to provide information about which sound are to be played by the client, based on the actions made with the given the item. This node is used by the client only.
<?xml version="1.0"?> <items> ... <item id="521" image="weapon-dagger-dagger.png" name="Dagger"> <sprite>weapon-dagger.xml</sprite> <sound event="strike">weapons/swords/short-sword-miss1.ogg</sound> <sound event="hit">weapons/swords/short-sword-hit1.ogg</sound> </item> ... </items>
| Parameter name | Type | Mandatory | Default value | Description |
|---|---|---|---|---|
| sprite inner value | string | No | ”” (WAV or OGG file) | This parameter can be either an OGG filename or a WAV one. The filename must be relative to the data/sfx folder. The client will load the corresponding file to get the sounds played for each cases. |
| event | string (defined values) | No | ”” | This parameter indicates for which action the sound file should be played. “strike” and “hit” are available values. You can provide more than one file a sound event: In that case, the given sounds will be played randomly. |