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
Last revision Both sides next revision
items.xml [2013/04/18 21:00]
admin [Type race]
items.xml [2015/04/07 17:32]
admin [Game items]
Line 24: Line 24:
         hp="​15"​         hp="​15"​
         weight="​4"​         weight="​4"​
-        max-per-slot="​10"/>​+        max-per-slot="​10
 +        sellProtected="​true"/>​ 
 +    ... 
 +    <include name="​items2.xml"/>
     ...     ...
  </​items>​  </​items>​
Line 35: Line 38:
 |type| item type| |type| item type|
 |name| item name| |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. Sub tag sprite used for add xml animation for item.
Line 136: Line 141:
         name="​Pirate Hat"         name="​Pirate Hat"
         description="​A pirate hat."         description="​A pirate hat."
 +        useButton="​Equip"​
 +        useButton2="​Unequip"​
         effect="​M. Attack -8"         effect="​M. Attack -8"
         type="​equip-head"​         type="​equip-head"​
         weight="​40"​         weight="​40"​
-        defense="​4">​+        defense="​4
 +        pet="1">
         <​sprite>​equipment/​head/​piratehat.xml</​sprite>​         <​sprite>​equipment/​head/​piratehat.xml</​sprite>​
         <replace sprite="​hair">​         <replace sprite="​hair">​
Line 166: Line 174:
         floor="​floorimage.png"​         floor="​floorimage.png"​
         description="​item description"​         description="​item description"​
 +        useButton="​button1"​
 +        useButton2="​button2"​
         view="​1235"​         view="​1235"​
         drawBefore="​torso"​         drawBefore="​torso"​
Line 180: Line 190:
         critical-hit-effect-id="​101"​         critical-hit-effect-id="​101"​
         effect="​Damage +15"         effect="​Damage +15"
-        >+        ​sellProtected="​true"​>
     </​item>​     </​item>​
 </​items>​ </​items>​
Line 190: Line 200:
 | |range 1 >= ID| | |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| |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| |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).| |drawBefore|Will draw this equipped item before parameter value sprite. (before torso in example for item 1234).|
Line 196: Line 209:
 |effect|Item text about effect| |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**| |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| |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| |maxFloorOffset|Set max floor item offset in pixels from default position. Default value 32|
 |missile-particle|Set particle effect for missile/​arrow| |missile-particle|Set particle effect for missile/​arrow|
 |hit-effect-id|Effect id for hit. Default value from file [[paths.xml]] parameter hitEffectId| |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| |critical-hit-effect-id|Critical effect id. Default value from file [[paths.xml]] parameter criticalHitEffectId|
 |name|item name| |name|item name|
 +|description|item description|
 |tag, tagX|Put item in inventory group| |tag, tagX|Put item in inventory group|
 |view|use animation sprite from other item with given id| |view|use animation sprite from other item with given id|
 |weight|item weight text| |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. Also in each item can be different nodes like <​sprite>​ in example above.
Line 242: Line 275:
         maxFloorOffsetX="​9"​         maxFloorOffsetX="​9"​
         maxFloorOffsetY="​12">​         maxFloorOffsetY="​12">​
-        <​sprite ​particle-effect="​file.xml"​>​equipment/​weapons/​knife.xml</​sprite>​+        <​sprite>​equipment/​weapons/​knife.xml</​sprite>​
         <sound event="​hit">​weapons/​knives/​knife-hit1.ogg</​sound>​         <sound event="​hit">​weapons/​knives/​knife-hit1.ogg</​sound>​
         <sound event="​strike">​weapons/​knives/​knife-strike1.ogg</​sound>​         <sound event="​strike">​weapons/​knives/​knife-strike1.ogg</​sound>​
Line 259: Line 292:
  
 ==== sound node ==== ==== 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 ==== ==== floor node ====
Line 336: Line 413:
 ==== drawBefore node ==== ==== drawBefore node ====
  
 +==== particlefx node ====
Navigation
Print/export
Languages