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:
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.
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.
Last edited: