• 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!

Item Editing Tutorial

Drakkhan

Illuria Project Lead
Joined
Oct 3, 2013
Messages
141
Reaction score
22
First! If you don't want the detailed version, here is my personal cheat sheet:
tutorial-png.23183


And! I'm using Tibia 9.61, TFS 0.2.14 (Mystic Spirit) Links:
Tibia Clients:
http://tibiamulticlient.com/category/tibia-client/

The Forgotten Server 9.60/9.61:
http://otland.net/threads/9-60-9-61-the-forgotten-server-v0-2-14-mystic-spirit.166619/

Tibia Editor 9.81:
http://otland.net/threads/tibia-editor-9-81.177586/#post-1752694

Gray Dat Editor:
http://otland.net/threads/9-54-gray-dat-editor.161002/

otitemeditor 0.5.2:
http://otland.net/threads/9-81-otitemeditor.178769/

DETAILS:
Item editing is kind of a smoke and dagger topic on this forum. It's asked about often enough that I think it's time I share my methods in their own post.

When editing an item you may have to deal with the following files in your server/client:

Tibia.dat
Tibia.spr
items.otb
items.xml

How these files work:

Tibia.dat:
This file contains the list of all "items". Note that an item can be more than just an object, it could be an animation or an outfit. The items in Tibia.dat are indexed by numbers called CIDs. The properties of the item and the sprites the item appears as (indicated by sprite index numbers, the actual image is stored in Tibia.spr) are also enclosed in this file. In this file you can edit things like whether the item is moveable/stackable/shows up on the map/blocks your path. This file can be edited using Tibia Editor.

Tibia.spr:
This file contains all 32x32 pixel images that make up every thing you can view in game. The sprites are indexed by numbers that don't have a name, I call them "Sprite Index Numbers". In this file you can edit the images. This file can be edited using Tibia Editor.

items.otb:
This file is very similar to Tibia.dat, It has all the items listed in it as well, but it keeps a list of all items in your server indexed by numbers called the SIDs. The function of this file is to keep a server copy of all actual items in your server. There may be 2 SIDs that use the same CID from Tibia.dat. This allows you to make one item type in your Tibia.dat, but copy that item to multiple SIDs. This is helpfull if you wanted for example a "Carlin Sword" and a "Drakkhan's Carlin Sword" with the same properties and appearance, but different server properties. In this file you can edit similar things as the Tibia.dat file (in fact, you must edit them both in many cases) you also directly make SIDs, which are the numbers your server is interested in. This file can be edited using otitemeditor.

items.xml:
This file is used by your server to house all the properties that each item SID has. In this file you can edit item properties like weight, damage, scripts it may call, and many many more. This is the easiest place to edit items. TRY AND DO WHAT YOU WANT HERE BEFORE YOU DO ANYTHING ELSE (it takes lots less time and effort). This file can be edited using notepad or any text editor.


Lets get to it!
I'm going to go through the steps of modifying an item from scratch, so that no matter what you want to do with items on your server, you can follow along until it becomes valid.

BEFORE YOU START, IF YOUR SERVER WORKS, BACK UP ALL THE FILES
--->If you change these files and your server stops working, you MUST be able to use old files that DID work.
--->If you don't want to/won't back up your files DO NOT CONTINUE because your are not worthy of being a programmer. ALWAYS BACK UP! ALWAYS!...... always.


1. Draw your 32x32 pixel sprites.
--->This tutorial does not cover drawing
--->You can use existing sprites as inspiration
------>Tibia Editor can extract the individual sprites

2. Use Tibia Editor to open up your sprite file.
--->This tutorial does not explain how to use the Tibia Editor (yet?)

3. In Tibia Editor, add your brand new sprites.

4. Write down your Sprite Index Numbers!

5. Use Tibia Editor to open up your dat file.

6. Use Tibia Editor to create new CID numbers.

7. Write down the modified CID numbers!

8. In Tibia Editor, compile the .spr and .dat files.

9. Open Gray Dat Editor and relate the new sprites to the new CIDs
--->use existing items to reference what order to relate the sprites in.
--->feel free to compile and go back to Tibia Editor to see more clearly how your item has been edited.

10. In Gray Dat Editor, Compile the .dat and .spr files.

11. Open your .dat, .spr, and items.otb file in otitemeditor.
--->This tutorial does not explain how to use the otitemeditor (yet?)

12. In otitemeditor create new SIDs for every server item you want to make
--->It is possible to have multiple SIDs for each CID you created earlier (if you want items of the same functionality here, but different server properties).

13. In otitemeditor relate the modified CIDs to the new SIDs.

14. Make sure the properties you select for SIDs matches what you selected for CIDs in Tibia.dat
--->If you took screenshots previously, thank yourself.

15. In otitemeditor save the .otb file.

16. Use notepad to open items.xml
--->This tutorial does not cover xml coding (yet?)

17. Add new item entries for ALL SIDs you just created.

18. Restart your server and test to see if the item works in game.
--->make sure to put Tibia.spr and Tibia.dat in your client folder.
--->make sure to put items.otb and items.xml in the items folder of your server.

Some Warnings:
1. Adding animations requires that you edit an existing animated item. If you add animations to a non-animated item, that item will crash your server whenever someone tries to look at it. I haven't found a work around for this :/.

2. Again, adding CIDs using Tibia Editor seems to bug out the first few CIDs. I'm saying it again here in case someone missed it that could possibly provide a way to add CIDs to the .dat file safely. (ALSO adding CIDs WITH animations causes both problems).
--->UPDATE: I've managed to successfully add new CIDs using Tibia Editor. This bug may not have been due to Tibia Editor. Just keep a look out for this bug in the future. :D
 
Last edited:
Great job !!
@ all others, if you post a resource here make sure you include what versions it works with
this will help all others who come after you asking questions. It will help reduce repetitive Q and A as well.

I will be putting this to use later today and will assist as I can on answering etc. Maybe Dominique will chime in as well.
Thanks Drakkhan
 
Protocol Compatibility: (Here we will post known protocols supported by the tools)

TibiaEditor 6.7 Alpha:
8.60, 9.60, 9.61, 9.80?, 9.81?

OTItemeditor 0.3.9:
8.60, 9.60, 9.61
 
Last edited:
Nice.all the item editing is outdated.Keep it up :)

Thanks. I often edit items.. I guess I just wanted to start a thread so I could use other peoples questions to improve my methods and help other people, gathering these simple steps was like a week of searching and trial and error.. so I thought I'd make it quicker for others. :D
 
ok maybe we can add something useful here. For each of these programs used, what versions do they work for.
So far I have found that TibiaEditor 6.x Alpha works for 8.60
OTItemeditor 0.3.9 works for 8.60

I haven't tried any others so far.
If we could edit threads we could make a thread just for this purpose but if pigs could fly.....
 
ok maybe we can add something useful here. For each of these programs used, what versions do they work for.
So far I have found that TibiaEditor 6.x Alpha works for 8.60
OTItemeditor 0.3.9 works for 8.60

I haven't tried any others so far.
If we could edit threads we could make a thread just for this purpose but if pigs could fly.....

I edited my second post to reflect known compatibilities. I don't know about others, but _I_ can edit my posts :D
 
It was brought to my attention that I missed a step in my tutorial. Gray Dat Editor was used to add relations between the new sprites and the new CIDs. Sorry for any confusion!

Thanks @Seksy
 
This version of grey Dat Editor seems to work for 8.60 so far not sure about version after that.
I created my new sprites, new CID's in Tibia Editor so I hope it doesn't bug out when I test it later

UPDATE: This version does open the DAT files for 8.60 but once you save it, the DAT will no longer be available in Otitemeditor or in BLack Demon Tibia Editor. (no idea why)
 

Attachments

  • GrayDatEditor-8.60.zip
    34 KB · Views: 91 · VirusTotal
Last edited:
Ok I am seeing the bug you mention, when I create new sprites, then add my new CID's it bugs out when I try to view those items in game. I think you said the only current solution is to lay those sprites over existing CID's in the .DAT file correct?
Sure sux, I really would like to create more custom items.

How did you manage to stop the bug you were getting?
 
My problem is I just want to copy an item that already exists, and edit it... No need for new sprites, and I don't think the .dat should have to be altered right? I don't want to have to redistribute custom .spr and .dat, if so, what is the point in the items.otb in the first place? I just want to copy say, bear paw, and make bear glove, fist weapon... but can't seem to get it to work without debug, plus it doesn't even save when I uncheck "stackable" and hit save, reopen and its check marked again...
 
My problem is I just want to copy an item that already exists, and edit it... No need for new sprites, and I don't think the .dat should have to be altered right? I don't want to have to redistribute custom .spr and .dat, if so, what is the point in the items.otb in the first place? I just want to copy say, bear paw, and make bear glove, fist weapon... but can't seem to get it to work without debug, plus it doesn't even save when I uncheck "stackable" and hit save, reopen and its check marked again...

if sprite already exist .. u just need to edit item.otb :D
 
My problem is I just want to copy an item that already exists, and edit it... No need for new sprites, and I don't think the .dat should have to be altered right? I don't want to have to redistribute custom .spr and .dat, if so, what is the point in the items.otb in the first place? I just want to copy say, bear paw, and make bear glove, fist weapon... but can't seem to get it to work without debug, plus it doesn't even save when I uncheck "stackable" and hit save, reopen and its check marked again...

Are you trying to just edit the bear paw, or make a new item with the same look? Like bear paw ID is "5896" are you trying to edit 5896 to be a weapon? Or do you want that to exist + "XXXXX" <--2nd bear paw weapon
 
Are you trying to just edit the bear paw, or make a new item with the same look? Like bear paw ID is "5896" are you trying to edit 5896 to be a weapon? Or do you want that to exist + "XXXXX" <--2nd bear paw weapon

Trying to copy and use 2nd bear paw. (CTRL+D) to duplicate, but like I said the item soon causes debug after seeing it, but also I uncheck the STACKABLE and save, and when I reopen it is checkmarked again, keeps making item stackable in-game too...
 
Trying to copy and use 2nd bear paw. (CTRL+D) to duplicate, but like I said the item soon causes debug after seeing it, but also I uncheck the STACKABLE and save, and when I reopen it is checkmarked again, keeps making item stackable in-game too...

What version are you editing on? I have duplicated items before with no problem. may need to know as well which program you are using to edit items.
 
Otitemeditor 0.5.2, tried the one for 9.8 and the one for 10.10, both say the same version as well
 
Otitemeditor 0.5.2, tried the one for 9.8 and the one for 10.10, both say the same version as well
maybe I missed it so what version OT are you editing on?
I did this with success on 8.60 but for some reason I get debugs on 8.7 and 9.60 as well when creating new items.
thing is when creating a new item it needs to be both server and client side. So you need to create a new CID (basically a new slot for the item in the dat file)
you then go into gray dat editor and create the relations between the CID and sprite and recompile the DAT.
Then of course you can use otitemeditor to further edit the item. This is where I get the bug same as you.

my suggestion is to skip parts one and two, just choose an item that wont be used and edit it to use the bear paw sprite.
 
How do you do that? Pick an unused item and change what to make it use the same sprite?
 
yes in otitemeditor select the unused item, then change the sprite ID file to what you want, then edit its properties....this way you still have all the info you need in the DAT and sprite files, no need to make a new DAT for it.
 
Back
Top