• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Configuration How to edit/make items.

Santy

Member
Joined
Aug 14, 2007
Messages
654
Reaction score
22
How to make/edit items.

~~First of all, this is a tutorial that I made a very long time ago, I just edited it by updating it and making it easier to understand.~~

To make or edit items, you must first open \data\items\items.xml with notepad or wordpad.
If you want to make customs items with custom sprites, this is not the tutorial that you're looking for.

So, first, I'll teach you the basics;

Code:
<item id="[COLOR="Green"]2390[/COLOR]" article="[COLOR="Blue"]a[/COLOR]" name="[COLOR="Purple"]magic longsword[/COLOR]">
  <attribute key="[COLOR="Red"]description[/COLOR]" value="[COLOR="Purple"]It is the magic Cyclopmania Sword[/COLOR]."/>
  <attribute key="[COLOR="Red"]weight[/COLOR]" value="[COLOR="Purple"]4300[/COLOR]"/>
  <attribute key="[COLOR="Red"]defense[/COLOR]" value="[COLOR="Purple"]40[/COLOR]"/>
  <attribute key="[COLOR="Red"]attack[/COLOR]" value="[COLOR="Purple"]55[/COLOR]"/>
  <attribute key="[COLOR="Red"]weaponType[/COLOR]" value="[COLOR="Purple"]sword[/COLOR]"/>
  <attribute key="[COLOR="Red"]slotType[/COLOR]" value="[COLOR="Purple"]two-handed[/COLOR]"/>
</item>

See these lines?
I will explain them now, and some other lines you may also use:

Code:
<item id="[COLOR="GREEN"]2390[/COLOR]" article="[COLOR=BLUE]a[/COLOR]" name="[COLOR="Purple"]magic longsword[/COLOR]">
That's the item ID and the item name.
The article is the article that the item's description will have.
The item name is the name the item has/will have and the ID, is the ID of the item, you should leave the item ID as it is, unless you're adding new items (meaning you should also edit items.otb, I'll leave this for another tutorial)

Code:
<attribute key="[COLOR="Red"]description[/COLOR]" value="[COLOR="Purple"]It is the magic Cyclopmania Sword.[/COLOR]"/>
A description is the message that follows the "It weights XX.XXoz" message.
A description is not neccesary.

Code:
<attribute key="[COLOR="Red"]weight[/COLOR]" value="[COLOR="Purple"]4300[/COLOR]"/>
This is how much the item will weight.
Also; weight values are written in decimal-ish ways. E.G:
If you want an item to weight 10.20 ounces, the value should be 1020. (The maximum amount of decimals is two)

Code:
<attribute key="[COLOR="Red"]defense[/COLOR]" value="[COLOR="Purple"]40[/COLOR]"/>
This is how much defense the weapon will have. Not much to explain here. Just change the value to how much defense you want the item to have. This is usually used with weapons or shields.

Code:
<attribute key="[COLOR="Red"]attack[/COLOR]" value="[COLOR="Purple"]55[/COLOR]"/>
This one is how much the weapon will attack. Just change the value to how much attack you want the item to have. This is usually used with weapons.

Code:
<attribute key="[COLOR="Red"]weaponType[/COLOR]" value="[COLOR="Purple"]sword[/COLOR]"/>
This is what weaponType the weapon is going to have.
The possible weapon types are these: distance, club, axe, sword, wand, rod, ammunition and fist. This is usually used with weapons and ammunition (arrows, bolts, and so forth).

Code:
<attribute key="[COLOR="Red"]slotType[/COLOR]" value="two-handed"/>
The slotType's valor points what the item's slot is (where it is going to be placed).
The possible slotTypes are these: head, body, legs, feet, backpack, two-handed, necklace, ring, ammo, and hand.

-Few other attributes-

Code:
<attribute key="[COLOR="Red"]healthGain[/COLOR]" value="[COLOR="Purple"]1[/COLOR]"/>
Code:
<attribute key="[COLOR="Red"]manaGain[/COLOR]" value="[COLOR="Purple"]4[/COLOR]"/>
The first one, if added, is how much the item would heal you for.
The second one, if added, too, is how much mana the item would give to you.

Code:
<attribute key="[COLOR="Red"]healthTicks[/COLOR]" value="[COLOR="Purple"]3000[/COLOR]"/>
Code:
<attribute key="[COLOR="Red"]manaTicks[/COLOR]" value="[COLOR="Purple"]3000[/COLOR]"/>
This is how often the item will heal/replenish your health/mana. It is expressed in miliseconds.

Code:
<attribute key="[COLOR="Red"]duration[/COLOR]" value="[COLOR="Purple"]1200[/COLOR]"/>
This is if how much the item would last for before it vanishes or turns into something else.
It is expressed in miliseconds.

Code:
<attribute key="[COLOR="Red"]showduration[/COLOR]" value="[COLOR="Purple"]1[/COLOR]"/>
This is if you want to show the duration of the item to the player, after identification, if it has duration.

Code:
<attribute key="[COLOR="Red"]charges[/COLOR]" value="[COLOR="Purple"]4[/COLOR]"/>
This is how many charges the item will have before it vanishes, or turns into something else.

Code:
<attribute key="[COLOR="Red"]runeSpellName[/COLOR]" value="[COLOR="Purple"]explanitus[/COLOR]"/>
This is the spell that would be used to create the item.
This is pretty much used only with runes.
Instead of the rune having no spell name, the rune will say this.

E.G:
You add a new rune, called 'Great Explanation', and to make the rune you must say 'Explanitus' and have a blank rune in either hand.
Thing is; the rune wont say which words you would need to say to cast the rune, like an Ultimate Healing Rune would say Adura Vita, a Great Fire Ball Rune would say Adori Gran Flam, etc...

Now that you've understand how they work, here are all the attribute keys that you can use, at least for now:

Code:
type
name
article
plural
description
runespellname
weight
showcount
armor
defense
extradefense/extradef
attack
extraattack/extraatk
attackspeed
rotateto
moveable
blockprojectile
allowpickupable
floorchange
corpsetype
contairnersize
fluidsource
writeable/writable
readable
maxtextlength/maxtextlen
wriceoncetimeid
worth
forceserialize
leveldoor
weapontype
slottype
ammotype
shoottype
effect
range
stopduration
decayto
transformequipto
transformdeequipto
duration
showduration
charges
showcharges
showattributes
breakchance
ammoaction
hitchance
maxhitchance
preventloss
preventdrop
invisible
speed
healthgain
healthticks
managain
manaticks
manashield
skill[sword/axe/club/dist/fish/shield/fist]
maxhealthpoins/maxhitpoints
maxhealthpercent/maxhitpointspercent
maxmanapoints
maxmanapercent/maxmanapointspercent
soulpoints
soulpercent/soulpointspercent
magiclevelpercent/magicpointspercent
absorbpercent[all/elements/magic/energy/fire/poison/ice/holy/death/lifedrain/manadrain/drown/physical/healing/undefined]
supress[shock/burn/poison/freeze/dazzle/curse/drown/physical/haste/paralyze/drunk/regeneration/soul/outfit/invisible/fight/exhaust/muted/pacified/light/attributes/shield]
field
element[physical/fire/energy/earth/ice/holy/death/lifedrain/manadrain/healing/undefined]
replaceable/repacable
partnerdirection
maletransformto
femaletransformto
transformto

If you need further help, even with any of the functions, feel free to ask me. You can also search for them in the items.xml file, to understand how they work.
Also, remember to change the values.
 
Last edited:
Thank you!! i searched for a tutorial like this for a months!
 
Nice tutorial, but where can I change if its attack rune or healing rune?
And how to do inf charges =P
Thanks
 
now this have been bumped i could ask what to do when you put a sword in you'r hand and get 200 hp extra ?

and do i only need to add it in items.xml?
 
Back
Top