• 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 [TUTORIAL] Adding Custom Items to your 7.92 OT

grind_king_01

Mapper/Scripter
Joined
Aug 25, 2007
Messages
10
Reaction score
0
Location
Canada
Please note that I’ve only figured this out on my own recently. Any extra tips/tricks/feedback would be appreciated. I have also only tried this for Tibia v7.92 but I don’t think the procedure would vary much from v7.6.

Adding new items into your Tibia.spr:
Sections:
1) Extracting and compiling sprites
2) Adding new sprites to your Tibia.dat
3) Editing item attributes
4) Common Problems

Required programs:
- SprEditor v.03 by Trooper
- DatEditor v1.4 by Black Demon
- OtItemEditor v0.3.0/v0.2.5 (both for 7.92)

An introduction:
Every picture you see in Tibia is called a sprite. Sprites are simply single frame shots of a picture whose dimensions are 32x32 pixels. All these sprites are simply compiled into a file called Tibia.spr (located in your Tibia folder) which takes up a lot less space on your computer, rather than having all 18, 000~ sprites saved individually onto your computer.

1) Extracting and compiling sprites:
The first part of adding a new item to your OT is to take your Tibia.spr and break it down to its components (18, 000~ individual pictures). For this, you will need an SprEditor. There are many different versions out there, but I would recommend the one made by Tropper simply because it allows you to change the maximum number of available sprites as you extract the sprite (.spr) file in a simple step.
Go into your Tibia folder and find your Tibia.spr file, and copy it into the same folder as your SprEditor. Next, open the editor and this is what the layout should look like:
clipimage002xy1.jpg

First thing is first. In the “Max Sprites” box (number 1), you enter the max number of sprites you want available. The v7.92 maximum is about 18, 086 if I remember correctly. So in the field simply write 19, 000. This should give you enough room to add almost 1, 000 new sprites! Next, make sure the “Break Sprite Limit” box is checked, and click the “extract” button (number 2). This may take several minutes.
After it is done, you should see that a new folder labeled Sprites was created in the folder that your SprEditor and Tibia.spr files are located. If you open this folder, and scroll to the very bottom the last 914 sprites should be a blank canvass (magenta). They should also be labeled 18, 087 to 19, 000. NOTE: Seeing as there are now 19, 000 sprite files in this folder, it may take a while to scroll down.
Find your custom sprites that you either designed on your own or found online and rename them starting at 18, 087 going up and place them in your sprites folder. If you notice all other sprites are labeled as increasing numbers, so here we are just continuing the trend. Here is an example of what mine looks like:
clipimage003qo3.jpg

(these are monster sprites, but you get the point).
Once this is done go back to your SprEditor and click the “compile” button (number 3). What this does, is it takes all the sprites in your sprites folder, and recompiles them into a small Tibia.spr file. This may also take several minutes. The newly compiled file will also be in the same folder as your SprEditor and it will be labeled as MyTibia.spr.

2) Adding new sprites to your Tibia.dat:
The next step is to take these files, and add them to Tibia’s data. This step is like installing all your new sprites into Tibia. It is also where you put sprites together to make animations (firesword flame, walking monsters).
So first, go into you Tibia folder, and find Tibia.dat and copy it into the same folder as your SprEditor. Then download and extract the DatEditor into the same folder as your copied Tibia.dat file. Then open the DatEditor.
This is what the layout should look like:
clipimage004ub1.jpg

Once this is open, click File > Open and select the Tibia.dat file we copied and open it, then the MyTibia.spr that we just made.
Press the “New Item” button on the top left just under the “Information” menu button. This will create a new item slot, and it will take you to it. The only field you have to edit for items is under the “Sprite Information” section called “Animation Count”. This is how many changes you want the item to have. A familiar example would be a firesword, which has 2 animation counts, or my custom watersword, which also has 2 animation counts:
clipimage005bf4.jpg

If your item has more than 1 item animation count, enter in the number of animations it has in the field, and press the “Save Item” button just under the “New Item” button we clicked earlier and you will see two 0’s instead of one just right of my watersword in the screenshot above. If your item is like most items and contains 1 count, just leave it as is.
Just right of my watersword in the screenshot you will see a list of 0’s (from 1 to x). Just replace these 0’s with the sprite number you gave the sprite in step one. My 2 watersword sprite numbers were 18, 462 and 18, 463. The final thing to change is under the “Attributes” section, where you should make sure the “Pickupable” and “Useable” options should be selected. Then press the “Save Item” button again and you should see the animation play in the picture area. Forgot your sprite numbers? DON’T WORRY! Just open your Sprite folder and scroll all the way down and look for your picture. Once this is done, click File > Save, and then exit the application.

3) Editing item attributes:
This step will give atk to your weapons, def to your armor and shields, and it will add extra attributes to your items, like speed to your boots of haste.
Go into your Ot folder, look in the Data > Items folder for a file called Items.otb and Items.xml and copy both of these into the same folder as your SprEditor, etc.
Open your OtItemEditor, and click File > Open and select the items.otb file we just copied. The layout should look similar to this:
clipimage006wo9.jpg

Once open, click Tools > Create Missing Client Items, and Tools > Load Names. This will add all the .dat animations we just created at the end of the Other section on the list to the left, and it will load all item name/attributes from the existing items.xml file. Simply expand the list by double clicking the Other section, and scroll down to find your item.
Items are listed by their numbers which can be also seen in the DatEditor:
clipimage007ow9.jpg

All to say, after Creating all the missing items that we did earlier, click File > Save As > Items.otb and replace the existing file. Since it is a copy we don’t have to worry about screwing anything up. Before exiting, click Tools > Export Items.xml and this will create a file called ExportItems.xml in the same folder as everything else.

Editing item attributes (7.92):
Now find your ExportItems.xml file and open it in word or notepad or something. Scroll to the very bottom where you will find something like this:
Code:
<item id="[COLOR="Blue"]6603[/COLOR]" name="">
	<attribute key="weight" value="0"/>
</item>
Where item id is the item number we saw earlier. In the name=”” area you can insert the item’s name like so:
Code:
<item id="6603" name="[COLOR="Blue"]Watersword[/COLOR]">
	<attribute key="weight" value="0"/>
</item>
This will give it the in-game name of Watersword.

Next is to edit its attributes:
Code:
<item id="6603" name="Watersword">
	[COLOR="Blue"]<attribute key="description" value="The blade is from violent waters."/>
	<attribute key="weight" value="3700"/>
	<attribute key="defense" value="22"/>
	<attribute key="attack" value="37"/>
	<attribute key="speed" value="40"/>
	<attribute key="weaponType" value="sword"/>[/COLOR]
</item>
This is fairly basic. You can copy/paste if you wish. The only things you must edit are the values in quotations (value=””).

Description value = Some items have extra descriptions, like skull staffs have “This staff longs for death”. Just enter that short description phrase here.
Weight value = weight. 3700 = 37.00 oz, 10200 = 102.00 oz, 1957 = 19.57 oz.
Defense value = weapon’s defense.
Attack value = weapon’s attack.
Speed value = adds 40 character levels of speed. So if your character is lv 20, it will walk like a lv 60 (I think.. correct me if I am wrong).
weaponType value = sword/axe/club/distance.

If your weapon is a distance weapon (ex: crossbow) enter this in:
Code:
<attribute key="ammoType" value="[COLOR="Blue"]bolt[/COLOR]"/>
Where the value can be either bolt or arrow.

If you want your weapon to take up both hand slots (like a Giant Sword or a Bow) add this:
Code:
<attribute key="slotType" value="two-handed"/>

If there are any other attributes that are not listed here please post, and I will add it to the list ASAP.

File > Save to save the file, and exit. Now we just created a custom item!!!

To be able to see it in your Ot, go into your Tibia folder and rename Tibia.spr to Tibiabackup.spr, Tibia.dat to Tibiabackup.dat. Then copy the Tibia.spr and Tibia.dat files we just edited into the Tibia folder.
Go to your Ot > Data > Items folder and rename items.otb to itemsbackup.otb, and your items.xml to itemsbackup.xml, and copy your items.otb and exportitems.xml we just finished editing into this folder, and then rename exportitems.xml to items.xml.

Your done!!!

Simply enter your ot and a as a GM create your item using the item number we saw at the beginning of step 3.

Editing item attributes (7.8x):
Okay. I just figured this out the other day when i changed my server from 7.92 back to 7.81, I think this should work for all 7.8 versions. Download the 7.8 (or 7.81) OtItemEditor, and open it up. Go to File > Open Otb, and find your items.otb in your Data > Items folder. Next, go to Tools > Create missing client items. This will pretty much import all the new sprites you created in the previous two steps. They will all be automatically created in the "Other" section at the bottom. Simply expand the section, and scroll to the very bottom to locate the new sprite quickly.

Next, go into your Data > Items folder, and find the file called items.xml. Make a copy of it in the same directory, and rename it new_items.xml. Then in your OtItemEditor go to Tools > Import items.xml names(new_items.xml). Now you can edit your new item's attributes. Once you finished editing the attack, defense, armor, skilltype, etc, locate the item name in the left menu, and right click on it. Select the type of item it is (ie: weapon, armor) and then click the "Set Client Opt." button.

Save the items.otb as items.otb in the Data > Items folder of your Ots, and then before exiting the program, export the new item names by going into Tools > Export xml names. What this does is makes a new xml file in your Data > Items folder. Rename the existing items.xml to itemsbackup.xml (I'll explain why in the next paragraph), and then rename the itemexportnames.xml to items.xml.

The reason we renamed the existing items.xml to itemsbackup.xml is just in case the new items.xml we just finished creating happens to crash your server for any reason, you can simply delete it, and rename itemsbackup.xml back to items.xml, this way your server can still function properly.


An easy way to locate item numbers:
Open items.xml go to Edit > Find, and type in the item name: watersword, and click the Find button, and it will take you to the item name. Look to the left to find its number:
clipimage008jh6.jpg

To make this tutorial complete, I would appreciate any feedback. If you know of any extra attributes please post them here, I will add them as soon as I can.

EDIT:
I believe OtItemEditor v0.2.5 lets you edit all the attributes in the application console itself. It is much more user-friendly, so check it out. You can find this in the link above.


4) Common Problems:
If you are experiencing the same problem as Kennyeni (post #2), where your editing your items.xml for a second time, and your attributes keep disappearing, please follow the steps below on how to work around this problem:
Problem: The atk and defense doesnt save in the itemeditor, I put all the things correctly, save, but when i open the file again the item doesnt have atk or defense only name and description
The best thing to do in this case, is to have 2 items.xml (sounds confusing but try to stay with me).
The first items.xml will be where all the information (speed/atk/def/arm/etc) is saved. This will be the file you copy/paste into your Data > items folder.
The second will be your exported items.xml which you may discard after following these steps.

After exporting the xml names as explained in step 3, open it up in word or notepad, and scroll to the very bottom where you will find the new item info listed like this:
Code:
<item id="6603" name="">
	<attribute key="description" value=""/>
</item>
Fill in the name and attributes like you usually would, and then copy/paste that at the bottom of your existing items.xml file. Remember to keep it within the <items></items> tags. Then save the items.xml and copy/paste it into your Data > items folder. This should be an updated version of your items.xml with all attributes saved.
 
Last edited:
Just those 2 underlines do make a huge different, eh?

Anyway, nice tutorial... really clear for me now, gonna try it.
 
No you didn't!
the one who made it is called grindking01 and are from OTF.
and if you are grindking01 why didn't you made the same name here as on OTF.

dude check the e-mail.. it's [email protected] on both accounts. I just made 1 account here and decided to post it for those who only had an account here.

If you don't believe me then wtv I couldn't care less.
 
It may works on otserv 8.0(TFS 0.2.6)?

I really like. Very cool.

Congratz~ grind.
 
It may works on otserv 8.0(TFS 0.2.6)?

I really like. Very cool.

Congratz~ grind.

I tried for 8.0 and the problem I ran into was that when you try opening your custom spr and dat in the map editor the monsters show under items, and not monsters. Which means the the 7.92 dat editor saves the monsters as regular items, so that won't work.

My friend tells that the 7.80 dat editor works for 8.0 though. So you could try the tutorial with that.
There's also a different 8.0 otitemeditor. I forget where I found it but it exists. its v0.3.0 but it has a menu on the top right that allows you to save the .otb file as 8.0, 7.92, and maybe 7.8 i cant remember.
 
Nice tutorial, detailed.

But need now update thing to make this in 8.0! :p

I think you're joking, but jic you aren't (and for the sake of anyone else who doesn't know), this should work just fine for 8.0 too. :)
 
Vaga is right. The steps are the same. It's all a matter of getting the editors for 8.0. Because if you use the ones I have here, they likely aren't compatible for 8.0
 
well is this the same as in 8.00 ? or ...?

EDIT: sorry didnt read the post before me ..
 
Just one doubt ... if you create all these new sprites for new items ... wouldn't you also need to distribute this new dat and sprite file to the people who join your ot in order to view the new sprites?
 
why does when i create a new item and make it work in the server, when i try to creat an item and then look at it it crashes my tibia client, why??? plz help me out
 
Back
Top