===== items.xml file configuration ===== 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 '''' tag within the '''' main node. Here is an example: ... **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. ==== General (Client and server) parameters description ==== ^ Parameter name ^ Type ^ Mandatory ^ Default value ^ Manaserv ^^ TMW-Athena ^^ Description ^ ^ ::: ^ ::: ^ ::: ^ ::: ^ Client ^ Server ^ Client ^ Server ^ ::: ^ | id | integer | Yes | | 0.0.2x \\ 1.x | v0 \\ v1((Protocol version)) | 0.0.2x \\ 0.5.x \\ 1.x | | 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" | 0.0.2x \\ 1.x | v0 \\ v1 | 0.0.2x \\ 0.5.x \\ 1.x | | 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 | "" | 0.0.2x \\ 1.x | | 0.0.2x \\ 0.5.x \\ 1.x | | 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") | | | 0.0.2x \\ 0.5.x \\ 1.x | | 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 | "" | 0.0.2x \\ 1.x | v0 \\ v1 | 0.0.2x \\ 0.5.x \\ 1.x | | Indicates the skill name the item is triggering when used for attacking (for weapon items only). The skill name set in [[skills.xml]] and the value given here must match (case-insensitively). FIXME: Is it used for tA? | | attack-action | string | No | "" | 1.x | | 0.5.x \\ 1.x | | 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 file. See the [[sprite system]]. | | weight | integer | No | 0 | 0.0.2x \\ 1.x | v0 \\ v1 | 0.0.2x \\ 0.5.x \\ 1.x | | Indicates the item's weight. | | view | integer | No | 0 | 0.0.2x \\ 1.x | | 0.0.2x \\ 0.5.x \\ 1.x | | Indicates another item whose view to use instead. | | attack-range | integer | No | 0 | 0.0.2x \\ 1.x | v0 \\ v1 | 0.0.2x \\ 0.5.x \\ 1.x | | Indicates the weapon's attack range in pixels. (The range is in tiles for the v0.) | | hp | integer | No | 0 | | | 0.0.2x \\ 0.5.x \\ 1.x | | Indicates what happens to the character's HP((Hit Points)) when he/she uses it. E.g: A value of 25 means healing of 25 HP. | | defense | integer | No | 0 | | | 0.0.2x \\ 0.5.x \\ 1.x | | Indicates the defense bonus when using the given weapon. | ==== Server only parameters ==== 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. Note that items with equip/unequip effect become equippable. I.e: Tey have a max-per-slot parameter set to 1 whatever the current parameter tells. | | 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 default currency. See [[units.xml]] for more details about how to set up the World currency (and weight) name. FIXME: This doesn't handle multiple currencies and will be removed once a new way to define that has been added. | | range | integer | No | 0 | Only taken in account if the item is a 1handed or 2handed typed weapon. (See the ''type'' parameter.) \\ FIXME: Set the weapon range in pixels, again. | | script | string \\ LUA Script file | No | "" | **WARNING: Deprecated!** Manaserv v0 only: \\ Tells the script file to be run when the item is used. The filename must be relative to the ''data/script/'' folder. | | element | integer \\ (defined values) | No | 0 | **WARNING:** This has never worked, and will be replaced with autoattack system. \\ 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 | **WARNING: Deprecated!** Manaserv v0 only: \\ 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 | **WARNING: Deprecated!** Manaserv v0 only: \\ Set the HP damage value range dealt with this item. Damages: min <-> min+delta | | lifetime | integer | No | 0 | **WARNING: Deprecated!** Manaserv v0 only: \\ 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 | **WARNING: Deprecated!** Manaserv v0 only: \\ 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 | **WARNING: Deprecated!** Manaserv v0 only: \\ 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 | **WARNING: Deprecated!** Manaserv v0 only: \\ 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 | **WARNING: Deprecated!** Manaserv v0 only: \\ 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 | **WARNING: Deprecated!** Manaserv v0 only: \\ 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 | **WARNING: Deprecated!** Manaserv v0 only: \\ 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. | ==== Client-only parameters ==== === Common parameters (used by ManaServ and TmwAthena clients) === ^ 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 [[particle system]] for more details about how to configure nice particle effects. | | hit-effect-id | integer | No | -1 | Gives the effect id to trigger when doing a successful hit with the given weapon. (The item must indeed be used as a weapon for this work.) The effect id must correspond to an existing effect id in the [[effects.xml]] file. Note that this effect is triggered on the victim. | | critical-hit-effect-id | integer | No | -1 | Gives the effect id to trigger when doing a successful critical hit with the given weapon. (The item must indeed be used as a weapon for this work.) The effect id must correspond to an existing effect id in the [[effects.xml]] file. Note that this effect is triggered on the victim. | === TmwAthena specific parameters === 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. == Hair Styles == **Note:** FIXME: 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. ... hairstyle9.xml ... ^ Parameter name ^ Type & Range ^ Description ^ | id (for hairstyles) | integer \\ From -1 to -16?? \\ FIXME: 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 [[# childnode description]] to get more information about the part. == Races == **Note:** FIXME: 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. ... player_male_base.xml player_female_base.xml ... ^ Parameter name ^ Type & Range ^ Description ^ | id (for racesprites) | integer \\ From -100 to ?? \\ FIXME: 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 [[# childnode description]] to get more information about the part. == Weapons == These //low-id// weapon are used to set which animation goes with which weapon for TmwAthena clients only. ... weapon-dagger.xml weapons/swords/short-sword-miss1.ogg weapons/swords/short-sword-hit1.ogg ... ^ 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 [[# childnode description]] and the [[# childnode description]] to get more information about the and the part. == Miscellaneous == Those 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 MP((Magic Points)) when he/she uses it. E.g: A value of 25 means healing of 25 MP. | ==== childnode description ==== 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. ... chest-leather-male.xml|#573a26,9e7654,d3b79e,ffffff;#b96b3d,fbf5f1 chest-leather-female.xml|#412300,603100,8d4900;#ffff00 ... ^ 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 the [[sprite system]] 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. | ==== childnode description ==== 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. ... weapon-dagger.xml weapons/swords/short-sword-miss1.ogg weapons/swords/short-sword-hit1.ogg ... ^ 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. | ==== childnode description ==== This childnode is used to provide information about what the server should do when dealing with an item. This node is used by the client and manaserv v1 to define advanced items behaviour, and replace old hp, mp, script parameters, ... Note that an item can have more than one effect, and more than one effect per type. ...