Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
items.xml [2013/11/16 13:43]
admin [sprite node]
items.xml [2015/04/07 17:32] (current)
admin [Game items]
Line 1: Line 1:
 +====== items.xml file format ======
 +===== Basic format =====
  
 +<file xml items.xml>​
 +<?xml version="​1.0"?>​
 +<​items>​
 +    <item id="​-1"​ type="​hairsprite"​ name="​Flat ponytail">​
 +        <​sprite>​hairstyles/​hairstyle01.xml</​sprite>​
 +    </​item>​
 +    <item id="​-2"​ type="​hairsprite"​ name="​Bowl cut">​
 +        <​sprite>​hairstyles/​hairstyle02.xml</​sprite>​
 +    </​item>​
 +    ...
 +    <item id="​-100"​ type="​racesprite"​ name="​Human">​
 +        <sprite gender="​male">​player_male_base.xml</​sprite>​
 +        <sprite gender="​female">​player_female_base.xml</​sprite>​
 +    </​item>​
 +    ...
 +    <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"​
 +        sellProtected="​true"/>​
 +    ...
 +    <include name="​items2.xml"/>​
 +    ...
 + </​items>​
 +</​file>​
 +
 +Here each item tag describe item/​race/​hair style.
 +
 +^ Parameter ^ Description ^
 +|Id| item identifier|
 +|type| item type|
 +|name| item name|
 +
 +Include tag used for include other file with data. Other file format is same.
 +
 +Sub tag sprite used for add xml animation for item.
 +
 +Different types will be described below.
 +
 +
 +Types
 +^Name^Description^
 +|[[#Type hairsprite|hairsprite]]|Add hair style|
 +|[[#Type race|racesprite]]|Add race|
 +|other|Used for magic weapons|
 +|[[#Game items|usable]]|Item what can be used|
 +|[[#Game items|generic]]|Some kind of item|
 +|[[#Game items|equip-1hand]]|Equipment|
 +|[[#Game items|equip-2hand]]|Equipment|
 +|[[#Game items|equip-ammo]]|Equipment|
 +|[[#Game items|equip-arms]]|Equipment|
 +|[[#Game items|equip-charm]]|Equipment|
 +|[[#Game items|equip-feet]]|Equipment|
 +|[[#Game items|equip-head]]|Equipment|
 +|[[#Game items|equip-legs]]|Equipment|
 +|[[#Game items|equip-neck]]|Equipment|
 +|[[#Game items|equip-ring]]|Equipment|
 +|[[#Game items|equip-shield]]|Equipment|
 +|[[#Game items|equip-torso]]|Equipment|
 +
 +===== Type hairsprite =====
 +
 +This tag used to describe hair style.
 +Example:
 +
 +<file xml items.xml>​
 +<?xml version="​1.0"?>​
 +<​items>​
 +    <item id="​-1"​ type="​hairsprite"​ name="​Flat ponytail">​
 +        <​sprite>​hairstyles/​hairstyle01.xml</​sprite>​
 +    </​item>​
 +    <item id="​-2"​ type="​hairsprite"​ name="​Bowl cut">​
 +        <​sprite>​hairstyles/​hairstyle02.xml</​sprite>​
 +    </​item>​
 +    <item id="​-3"​ type="​hairsprite"​ name="​Combed Back" colors="​hairS">​
 +        <​sprite>​hairstyles/​hairstyle03.xml</​sprite>​
 +    </​item>​
 +    ...
 +</​items>​
 +</​file>​
 +
 +Parameters
 +
 +^ Parameters ^ Description ^^
 +|Id| item identifier||
 +| |range|0 > ID > -100|
 +|type| hairsprite||
 +|name| hair style name||
 +|colors| set colors palette from [[itemcolors.xml]] file \\ If this attribute missing, for colors used palette with name "​hair"​||
 +
 +
 +===== Type race =====
 +
 +This tag add race.
 +
 +Example:
 +
 +<file xml items.xml>​
 +<?xml version="​1.0"?>​
 +<​items>​
 +    <item id="​-100"​ type="​racesprite"​ name="​Human">​
 +        <sprite gender="​unisex">​players/​human-male.xml</​sprite>​
 +        <sprite gender="​female">​players/​human-female.xml</​sprite>​
 +        <sound event="​hit"​ delay="​20">​fist-swish.ogg</​sound>​
 +        <sound event="​miss"​ delay="​15">​fist-swish.ogg</​sound>​
 +    </​item>​
 +    <item id="​-101"​ type="​racesprite"​ name="​Ukar">​
 +        <sprite gender="​unisex">​players/​ukar-male.xml</​sprite>​
 +        <sprite gender="​female">​players/​ukar-female.xml</​sprite>​
 +    </​item>​
 +    ...
 +</​items>​
 +</​file>​
 +
 +Parameters
 +
 +^ Parameter name ^ Description ^^
 +|Id| item identifier||
 +| |range|-100 >= ID|
 +|type| racesprite||
 +|name| race name||
 +
 +===== Game items =====
 +
 +It can be all other types except [[#Type hairsprite|hairsprite]] and [[#Type racesprite|racesprite]]
 +
 +Example:
 +
 +<file xml items.xml>​
 +<?xml version="​1.0"?>​
 +<​items>​
 +    <item id="​617"​
 +        image="​equipment/​head/​piratehat.png"​
 +        name="​Pirate Hat"
 +        description="​A pirate hat."
 +        useButton="​Equip"​
 +        useButton2="​Unequip"​
 +        effect="​M. Attack -8"
 +        type="​equip-head"​
 +        weight="​40"​
 +        defense="​4"​
 +        pet="​1">​
 +        <​sprite>​equipment/​head/​piratehat.xml</​sprite>​
 +        <replace sprite="​hair">​
 +            <item from="​-5"/>​
 +        </​replace>​
 +    </​item>​
 +    <item id="​627"​
 +        image="​equipment/​head/​tophat.png"​
 +        name="​Top Hat"
 +        description="​For the gentry of The Mana World."​
 +        effect="​M. Attack +2"
 +        type="​equip-head"​
 +        defense="​10"​
 +        weight="​30">​
 +        <​sprite>​equipment/​head/​tophat.xml</​sprite>​
 +        <replace sprite="​hair">​
 +            <item from="​-5"/>​
 +        </​replace>​
 +        <replace direction="​upall"​ sprite="​hair">​
 +            <item from="​-5"​ to="​-5"/>​
 +        </​replace>​
 +    </​item>​
 +    <item id="​1234"​
 +        image="​image.png"​
 +        name="​item name"
 +        floor="​floorimage.png"​
 +        description="​item description"​
 +        useButton="​button1"​
 +        useButton2="​button2"​
 +        view="​1235"​
 +        drawBefore="​torso"​
 +        drawAfter="​boots"​
 +        drawPriority="​10"​
 +        maxFloorOffset="​32"​
 +        tag="​potions"​
 +        tag1="​potions"​
 +        tag2="​group2"​
 +        tag3="​group3"​
 +        attack-range="​3"​
 +        missile-particle="​graphics/​particles/​arrow.particle.xml"​
 +        hit-effect-id="​100"​
 +        critical-hit-effect-id="​101"​
 +        effect="​Damage +15"
 +        sellProtected="​true">​
 +    </​item>​
 +</​items>​
 +</​file>​
 +
 +Attributes
 +^ Parameter name ^ Description ^
 +|Id|item identifier|
 +| |range 1 >= ID|
 +|attack-action|Part of attack action for weapons. \\ If //was attack-action="​bow"//,​ will be used **attack_bow** action for attack with this item|
 +|skyattack-action|Part of attack action for weapons in player located on sky tile.|
 +|waterattack-action|Part of attack action for weapons in player located on water tile.|
 +|rideattack-action|Part of attack action for weapons in player riding.|
 +|attack-range|Set item attack range for item. By default 0|
 +|drawBefore|Will draw this equipped item before parameter value sprite. (before torso in example for item 1234).|
 +|drawAfter|Will draw this equipped item after parameter value sprite. (after boots in example for item 1234).|
 +|drawPriority|Set priority for drawBefore/​drawAfter|
 +|effect|Item text about effect|
 +|floor|floor item static image. For animated floor item need use <​floor>​ tag \\ If **floor** parameter missing fill be used value from **image**|
 +|useButton|Show this text for use button or in context menu. Main action like equip, use|
 +|useButton2|Show this text for use button or in context menu. Second action like unequip|
 +|pet|add pet to item from [[pets.xml]]. For legacy servers only.|
 +|image|item icon image for inventory and fallback for floor items|
 +|colors|colors palette name for dye item. For hair default palette is "​hair"​|
 +|maxFloorOffset|Set max floor item offset in pixels from default position. Default value 32|
 +|missile-particle|Set particle effect for missile/​arrow|
 +|hit-effect-id|Effect id for hit. Default value from file [[paths.xml]] parameter hitEffectId|
 +|miss-effect-id|Effect if for miss hit. Default value from file [[paths.xml]] parameter missEffectId|
 +|critical-hit-effect-id|Critical effect id. Default value from file [[paths.xml]] parameter criticalHitEffectId|
 +|name|item name|
 +|description|item description|
 +|tag, tagX|Put item in inventory group|
 +|view|use animation sprite from other item with given id|
 +|weight|item weight text|
 +|attack|item attack text|
 +|criticalattack|critical attack text|
 +|mattack|magic attack text|
 +|defense|defence text|
 +|criticaldefense|critical defence text|
 +|mdefense|magic defence text|
 +|hp|health text|
 +|mp|mana text|
 +|level|minimal level text|
 +|speed|speed text|
 +|range|range text|
 +|flee|flee text|
 +|sellProtected|ask player before selling item to npc shop|
 +|pickupCursor|pickup cursor type. Default is "​pickup"​|
 +
 +Also in each item can be different nodes like <​sprite>​ in example above.
 +
 +==== sprite node ====
 +
 +In this node described sprites what should be drawed for equipped item.
 +
 +Example:
 +
 +<file xml items.xml>​
 +<?xml version="​1.0"?>​
 +<​items>​
 +    ...
 +    <item id="​1302"​
 +        image="​equipment/​chest/​sailorshirt.png"​
 +        name="​Sailor Shirt"
 +        description="​Proof that ye be in the crew, matey!"​
 +        effect="​Defense +4"
 +        type="​equip-torso"​
 +        weight="​75"​
 +        maxFloorOffsetX="​8"​
 +        maxFloorOffsetY="​10">​
 +        <sprite gender="​unisex"​ race="​human">​equipment/​chest/​shirt-male.xml|#​131913,​1b231d,​233129,​35433e,​4e6059,​6c8279;#​72571e,​836737,​a5854d,​b18f45</​sprite>​
 +        <sprite gender="​female">​equipment/​chest/​shirt-female.xml|#​131913,​1b231d,​233129,​35433e,​4e6059,​6c8279;#​72571e,​836737,​a5854d,​b18f45</​sprite>​
 +    </​item>​
 +    ...
 +    <item id="​3500"​
 +        image="​equipment/​weapons/​knife.png"​
 +        name="​Knife"​
 +        description="​A simple, but sharp knife."​
 +        effect="​Damage +10"
 +        type="​equip-1hand"​
 +        weapon-type="​knife"​
 +        attack-action="​attack"​
 +        weight="​50"​
 +        maxFloorOffsetX="​9"​
 +        maxFloorOffsetY="​12">​
 +        <​sprite>​equipment/​weapons/​knife.xml</​sprite>​
 +        <sound event="​hit">​weapons/​knives/​knife-hit1.ogg</​sound>​
 +        <sound event="​strike">​weapons/​knives/​knife-strike1.ogg</​sound>​
 +    </​item>​
 +    ...
 +</​items>​
 +</​file>​
 +
 +Attributes
 +^ Parameter name ^ Description ^
 +|gender|player gender, by default unisex||
 +| |male|for male|
 +| |female|for female|
 +| |unisex|for unknown gender or for missing other genders|
 +|race|race id, by default 0||
 +
 +==== sound node ====
 +
 +This node used for define different sound effects for items
 +
 +Example:
 +
 +<file xml items.xml>​
 +<?xml version="​1.0"?>​
 +<​items>​
 +    ...
 +    <item id="​521"​
 +        image="​equipment/​weapon/​dagger-dagger.png"​
 +        name="​Dagger"​
 +        description="​A simple dagger."​
 +        effect="​Damage +15"
 +        type="​equip-1hand"​
 +        weapon-type="​knife"​
 +        attack-action="​attack"​
 +        weight="​200">​
 +        <​sprite>​weapon-dagger.xml</​sprite>​
 +        <sound event="​strike">​weapons/​swords/​short-sword-miss1.ogg</​sound>​
 +        <sound event="​hit"​ delay="​150">​weapons/​swords/​short-sword-hit1.ogg</​sound>​
 +    </​item>​
 +    ...
 +</​items>​
 +</​file>​
 +
 +Sound attributes:
 +^ Parameter name ^ Description ^
 +|event|sound event type|
 +|delay|delay before next sound effect|
 +
 +Existing sound **event** types:
 +
 +^ Parameter name ^ Description ^
 +|hit|hit sound effect|
 +|miss|miss sound effect|
 +|strike|legacy miss sound effect|
 +|use|item use sound effect|
 +|equip|item equip sound effect|
 +|unequip|item unequip sound effect|
 +|drop|item drop sound effect|
 +|pickup|item pickup sound effect|
 +|take|item take sound effect (for example start drag from inventory)|
 +|put|item put sound effect (for example dragging item into inventory)|
 +
 +==== floor node ====
 +
 +==== replace node ====
 +This node used to replace other items sprites if this item equipped.
 +
 +This can be usefull to fix some equipped items combinations.
 +
 +Example:
 +
 +<file xml items.xml>​
 +<?xml version="​1.0"?>​
 +<​items>​
 +    ...
 +    <item id="​511"​
 +        image="​equipment/​head/​santahat.png"​
 +        name="​Santa Hat"
 +        description="​Ask Santa about this hat."
 +        effect="​M. Attack -2"
 +        type="​equip-head"​
 +        weight="​20"​
 +        defense="​2">​
 +        <​sprite>​equipment/​head/​santahat.xml</​sprite>​
 +        <replace sprite="​hair">​
 +            <item from="​-5"/>​
 +        </​replace>​
 +        <replace direction="​left"​ sprite="​hair">​
 +            <item from="​-6"​ to="​-3"/>​
 +        </​replace>​
 +        <replace direction="​right"​ sprite="​hair">​
 +            <item from="​-6"​ to="​-3"/>​
 +        </​replace>​
 +    </​item>​
 +    ...
 +    <item id="​2900"​
 +        image="​equipment/​head/​bandana.png"​
 +        name="​Bandana"​
 +        description="​A striped bandana worn by some sailors."​
 +        effect="​Defense +1"
 +        type="​equip-head"​
 +        defense="​1"​
 +        weight="​13"​
 +        max-per-slot="​1"​
 +        maxFloorOffsetX="​8"​
 +        maxFloorOffsetY="​12">​
 +        <​sprite>​equipment/​head/​bandana.xml</​sprite>​
 +        <replace sprite="​hair">​
 +            <item from="​-3"​ to="​-2"/>​
 +            <item from="​-5"​ to="​-4"/>​
 +            <item from="​-6"​ to="​-7"/>​
 +            <item from="​-13"​ to="​-1"/>​
 +            <item from="​-14"​ to="​-13"/>​
 +            <item from="​-15"​ to="​-13"/>​
 +            <item from="​-26"​ to="​-21"/>​
 +        </​replace>​
 +    </​item>​
 +    ...
 +</​items>​
 +</​file>​
 +
 +Attributes for tag **replace**
 +^ Parameter name ^ Description ^
 +|sprite|sprite name to be replaced|
 +|direction|player direction|
 +
 +Attributes for tag **item** inside **replace** tag
 +Attributes for tag **replace**
 +^ Parameter name ^ Description ^
 +|from|item id replace from|
 +|to|item id replace to|
 +
 +If **to** is empty, this mean need remove this sprite (replace to empty sprite)
 +
 +==== drawAfter node ====
 +
 +==== drawBefore node ====
 +
 +==== particlefx node ====
Print/export
Languages