Item Configuration
From OpenTibia Fans
Item Attributes can be specified in the items.xml file, found in data/items/ . Using it you can do most any configuration of the items in OpenTibia, except things that are client sided.
Be aware for wands, weapons and some specific armors with vocation requirements it is necessary to edit the weapons.xml and movements.xml files.
Attributes has the following syntax
<attribute key="KEY" value="X"/>There are three types of value types for attributes; text, numbers and booleans.
<attribute key="name" value="fish"/> -- A text is well, text. <attribute key="weight" value="420"/> -- A number is a numerical value <attribute key="moveable" value="1"/> -- Boolean is either 1 or 0
Contents |
General
Common attributes, key is in bold.
- name (text) - The name of the item.
- article (text) - The article of the item (the name with 'a' or 'an' infront).
- plural (text) - The plural form of the name. (arrow - arrows)
- description (text) - The special description of the item, will be displayed after the normal text on the item. For example the text on a fire sword.
- runespellname (text) - The name of the spell this rune is used to cast.
- weight (number) - The weight of the item, specified in hundreds of one oz. So 100 is 1.0 oz.
- showcount (number) - The number of items left in the stack will be displayed when looking at the item.
- rotateto (number) - The ID of the item this will be transformed into when you rotate it. Such as a chair.
- containersize (number) - Only valid for containers, specifies the volume of the container.
- fluidsource (text) - This item will act as a source for the fluid specified by the value.
- writeable (boolean) - True if you can write in this item (for books, for example).
- maxtextlen (number) - The maximum length of the text that can be typed into this item.
- writeonceitemid (number) - If the item should only be writeable once, and from then onward only readable. Set this to the ID of an identical item that is not set as writeable.
- corpsetype (text) - The type of corpse, this affects what color of blood is created with the corpse when a creature dies. Can be one of the following:
- venom - Slime blood.
- undead - No blood.
- blood - Red blood.
- fire - No blood.
- effect (text) - The magic effect spawned when an item is thrown on a trash container.
- preventskillloss - If the player is wearing an item with this attribute when he dies, he will not lose any skills or experience points. A charge will be removed from the item (if it's not charged, the item will be destroyed).
- preventitemloss - If the player is wearing an item with this attribute when he dies, he will not lose any items. A charge will be removed from the item (if it's not charged, the item will be destroyed). When used in combination with preventskillloss, only one charge will be removed (ie. both effects will apply).
Item Type
<attribute key="type" value="?"/>Only one of the attributes can be specified. value can be one of the following:
- key - The item is a key, when looked at, it will display the action ID of the item as key ID.
- magicfield - The item is a magic field, this must be specified for items used as fields in spells, since only items with this attribute set are deleted when a new field is cast on a tile. Pathfinding avoids magic fields.
- depot - Works as a depot, simply.
- mailbox - The item will works as a mailbox (parcels/letters dropped on it will be sent to their respective player).
- trashholder - A trashholder will remove any item dropped on them from the game.
- teleport - A teleport teleports things. Anything dropped on the tile with the teleport will be transferred to it's target destination.
- door - This must be specified for house doors, else it will not display the "It belongs to house 'ownername'" text, nor will it be saved.
- bed - Should be set for both bottom and top part of a bed. When set, players can use the bed to sleep in (if it's placed inside a house).
Combat related
Key is in bold.
- armor (number) - The armor of the item, should only be specified for items that can be worn as armor, obviously. Will have no effect on weapons/shields.
- defense (number) - The defense of a weapon or shield.
- extradef (number) - The extra defense of a weapon or shield. For example the '+3' on a the magic sword.
- attack (number) - The attack of the weapon,
- elementX (number) - The extra, elemental damage added to the weapon, replace the 'X' with that type (Fire Ice Energy Earth)
- weapontype (text) - The type of weapon this is, this affect how it can be used, and what skills it uses/gives advances in. The following values can be specified: club, axe, shield, distance, wand, ammunition.
- slottype (text) - The slot that this item fits into, leave blank for it to act as a normal, non-equipable item. The valid values are: head, body, legs, feet, backpack, two-handed, necklace, ring.
- ammotype (text) - The type of ammunition, for weapons this is the type of ammunition required to fire. For ammunition item this is the time of ammunition. Possible values are: bolt, arrow, spear, throwingstar, throwingknife, stone and snowball. Note that all the other types of arrows/bolts/spears can be used as synonyms (infernalbolt, sniperarrow etc.)
- ammoaction (text) - The type of action that will be done when a distance weapon is used. Can be either move, which means the ammunition will be put on the target tile (like the old spears). moveback which means the item will return to to attackers hand after it's been used. removecharge, which means one charge will be removed when attacking. And finally removecount which means one item will be removed from the stack when the weapon is used.
- shoottype (text) - The type of the shoot animation used for this item (only valid for distance weapons).
- range (number) - The range of a distance weapon, in tiles.
- hitchance (number) - A number between 0 and 100 that is the chance (in percent) for a distance weapon to hit on attack, not that this is the lower end of this value. Higher distance skill means you're more likely to hit even if this value is very low.
- maxhitchance (number) - The maximum hitchance between 0 and 100. No matter how high distance skill you have the chance to hit will never be greater than this.
Movement related
Key is in bold.
- moveable (boolean) - If you can move the item. note: this has a default value from items.otb for most items, which means you do not need to specify it manually. It may be edited with the help of an items.otb editor.
- blockprojectile (boolean) - If the item should block projectile attacks. Common for walls.
- allowpickupable (boolean) - If you can drop pickupable items on the tile. (True for sea tiles, for example)
- floorchange (text) - Text can be one of the following:
- down - The item will act as a hole in the ground, dropping you down.
- south - The item will act as a stairs down south. That is, the player will be moved to the south of the hole they walked on to.
- north - Same as above, but north.
- west - Same as above, but west.
- east - Same as above, but east.

