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

Transparency + Extended Sprites in Otclient

bored

Banned User
Joined
Jan 18, 2018
Messages
3
Reaction score
2
I couldn't find any solid information on this forum regarding transparency or extended for sprites in otclient just a couple of mentions of what to add but no actual tutorial. I went to tibiaking and found a tutorial but of course in wasn't in english. This was posted some time in 2014 but I am sure it will work with a more current client.

This is a rough translation for the extended settings along with some additional information on transparency.

This tutorial is intended to teach you how to configure the main tools to increase the limit.

Compiling Extended Files:

1. Open your "spr" and "dat" files in Object Builder.
2. Compile the files with the extended option selected.
extended.png
Note: Once compiled extended, the extended option should always be selected both when opening and compiling.

Configuring the ItemEditor:

1. Open the itemEditor, go to File / Preferences
2. Click Browse and choose where your "Dat" and "Spr" Files are located.
3. Check the Extend Option

Configuring OTClient:

1. Open the things.lua file found in modules / game_things
2. Add this line of code to the load function:
C++:
function load()
  local version = g_game.getClientVersion()
  g_game.enableFeature(GameSpritesU32) -- To extended the sprites
  g_game.enableFeature(GameSpritesAlphaChannel) -- To enable transparency
  local datPath, sprPath

3. Find this method in src/client/game.cpp
C++:
void Game::setProtocolVersion(int version)
Place this inside the method to enable alpha in sprites and compile the otclient.
C++:
enableFeature(Otc::GameSpritesAlphaChannel);

4. Add a copy of the extended dat and spr files in the data / things folder.

Remere's Map Editor:

Unfortunately RME does not support extended files.
The most feasible solution is to add a version 9.60 next to your client version and compile the files as 9.60 especially to RME.

The RME version must be 2.2 or higher.

- Compile in your version for use in the client and in the ItemEditor.
- Compile in version 9.60 in a separate folder to use in RME.

Adding the version:

1. Go to the RME installation folder and open the clients.xml file, found in the data folder.
2. Search for your client's tag and add a line to version 9.6
HTML:
<client name="8.60" otb="8.60" visible="true" data_directory="860">
   <otbm version="3"/>
   <extensions from="8.20 - 8.31"/>
   <data datversion="8.6" sprversion="7.0" dat="0x4C2C7993" spr="0x4C220594"/>
   <data datversion="8.6" sprversion="7.0" dat="0x4C6A4CBC" spr="0x4C63F145"/>
   <data datversion="9.6" sprversion="9.6" dat="0x4FFA74CC" spr="0x4FFA74F9"/> <! - Extended Version ->
</client>

3. Compile your files into a separate folder with version 9.60.
export.png

4. In the version used, configure RME to the folder where the compiled files are located as 9.60
rme.png

Common questions:

Q: What is the new sprites limit after being extended?
A: 4,294,967,295

Q: After compiling extended, can it be used in the Cip client?
A: No! It would be necessary to modify the client so that it can read the files.

Q: Can I use the dat editor to modify the files later?
A: ObjectBuilder is a dat / spr editor, but if you want to use another editor, it is unlikely to work. It does not hurt to try

Credits:
Code:
EdMignari e sua Equipe
 
Tryed this for transparency

and only got this. Can't see the floor below except for the stairs sqm.

u4sN0SP.png



Added a second ladder

UQtUgZE.png
 
Last edited:
Tryed this for transparency

and only got this. Can't see the floor below except for the stairs sqm.

u4sN0SP.png



Added a second ladder

UQtUgZE.png
Hey thanks for the feedback :)

Try the transparent tiles on a higher level and see if you can see the ground level (7)..
I believe both the client and the server prevent viewing levels 8+ from 7 - 0. & higher levels from 8-15.
This feature is really just meant to give transparency to the tile and does not modify the default layer visibility settings.
 
Last edited:
Hey thanks for the feedback :)

Try the transparent tiles on a higher level and see if you can see the ground level (7)..
I believe both the client and the server prevent viewing levels 8+ from 7 - 0. & higher levels from 8-15.
This feature is really just meant to give transparency to the tile and does not modify the default layer visibility settings.

Doesn't work, its actually doing the same undergroud. As you say this feature works perfectly fine, just that server is not sending that grounds to the client (although I don't quite understand why you can see the walls..)

I've looked into TFS sources trying to find parts of code related to underground view limits (+- 2 floors), sending more Z tiles to the client (actually flatlanders tutorial for increased view helped here) and the removal of floor 7 to 8 view limitation (black tiles if not mapped)

But.. this task is way too big for my little c++ knowledge. As I keep learning will keep trying but for now there is not much I can do.
 
There was somewhere how to fix this.

Editing the tutorial about RME you can also add .otfi file to .spr .dat with content:
Code:
DatSpr
extended: true
transparency: true
frame-durations: false
frame-groups: false
And you won't have to compile spr/dat to other version
 
Hello guys, I've merged version 8.54 with 10.98. I did some tricks using ClientConverter to succeed. Ok, everything very well, I used the ItemEditor to generate the items.otb and everything is very beautiful. I'm even leaving the Tibia.otfi file in the folders where the .dat and .spr files are, course.

But when I was almost overflowing with happiness, behold, this error appears to me:
7atGQrxqQRmUeXY_29935Q.jpeg


I came to find out the reason and I found a possible size limit. Ok, I made the change of this tutorial and the error continues. Note in the image below that the files are identical, the same Signature for both .dat and .spr:
I2EkCSI_QOiRiuBxmxU9BA.jpeg


For to see how .spr and .dat are working, see how it opens without error in RME:
hDsR6ormRqWyXOwI8l5HGw.jpeg


So, has anyone managed to merge the old versions with the latest and succeeded?
Thank's
 
Last edited:
Hello guys, I've merged version 8.54 with 10.98. I did some tricks using ClientConverter to succeed. Ok, everything very well, I used the ItemEditor to generate the items.otb and everything is very beautiful. I'm even leaving the Tibia.otfi file in the folders where the .dat and .spr files are, course.

But when I was almost overflowing with happiness, behold, this error appears to me:
7atGQrxqQRmUeXY_29935Q.jpeg


I came to find out the reason and I found a possible size limit. Ok, I made the change of this tutorial and the error continues. Note in the image below that the files are identical, the same Signature for both .dat and .spr:
I2EkCSI_QOiRiuBxmxU9BA.jpeg


For to see how .spr and .dat are working, see how it opens without error in RME:
hDsR6ormRqWyXOwI8l5HGw.jpeg


So, has anyone managed to merge the old versions with the latest and succeeded?
Thank's

BUMP someone? Please!
 
you are using otclient which is open-source, check what makes the dat file being unable to load

edubart/otclient

edit: or atleast start reading the exception details in the log
 
you are using otclient which is open-source, check what makes the dat file being unable to load

edubart/otclient

edit: or atleast start reading the exception details in the log

Can u help?
HTML:
== application started at Jun 21 2018 19:53:52
OTClient 0.6.3 rev 0 (devel) built on Jun 21 2018 for arch x86
Loaded module 'corelib'
Loaded module 'game_things'
Loaded module 'gamelib'
Loaded module 'client'
Loaded module 'client_styles'
Locale 'pl' is missing 1 translations.
["Total Price:"] = "",
Locale 'pt' is missing 19 translations.
["Account Status:"] = "",
["Action:"] = "",
["Amount:"] = "",
["Balance:"] = "",
["Comment:"] = "",
["Don't stretch/shrink Game Window"] = "",
["Find:"] = "",
["Name:"] = "",
["Offer Type:"] = "",
["Piece Price:"] = "",
["Position:"] = "",
["Price:"] = "",
["Reason:"] = "",
["Search:"] = "",
["Statement:"] = "",
["Total Price:"] = "",
["Weight:"] = "",
["Your Capacity:"] = "",
["Your Money:"] = "",
Using configured locale: en
Loaded module 'client_locales'
Loaded module 'client_topmenu'
Loaded module 'client_background'
Loaded module 'client_options'
Loaded module 'client_entergame'
Loaded module 'client_terminal'
Loaded module 'client_modulemanager'
Loaded module 'client_serverlist'
Loaded module 'client_stats'
Loaded module 'game_interface'
Loaded module 'game_hotkeys'
Loaded module 'game_questlog'
Loaded module 'game_textmessage'
Loaded module 'game_console'
Loaded module 'game_outfit'
Loaded module 'game_healthinfo'
Loaded module 'game_skills'
Loaded module 'game_inventory'
Loaded module 'game_combatcontrols'
Loaded module 'game_containers'
Loaded module 'game_viplist'
Loaded module 'game_battle'
Loaded module 'game_minimap'
Loaded module 'game_npctrade'
Loaded module 'game_textwindow'
Loaded module 'game_playertrade'
Loaded module 'game_bugreport'
Loaded module 'game_playerdeath'
Loaded module 'game_playermount'
Loaded module 'game_ruleviolation'
Loaded module 'game_market'
Loaded module 'game_spelllist'
Loaded module 'game_cooldown'
Loaded module 'game_modaldialog'
Loaded module 'game_unjustifiedpoints'
Startup done :]
ERROR: Failed to read dat '/things/1098/Tibia.dat': corrupt data (id: 3, category: 1, count: 255, lastAttr: 0)'
Exiting application..
 
Just to know, the corrupt data doesn't really clarify the problem.
For me to fix that problem with OTC i had to check how the .dat was saved in object builder.
It may be adding attributes that are not readable by otc so it just causes some error.

The best solution is to check the source of your object builder.

I don't remember that all 10.98 attributes are all parsed by OTC so make sure of that.
 
Just to know, the corrupt data doesn't really clarify the problem.
For me to fix that problem with OTC i had to check how the .dat was saved in object builder.
It may be adding attributes that are not readable by otc so it just causes some error.

The best solution is to check the source of your object builder.

I don't remember that all 10.98 attributes are all parsed by OTC so make sure of that.

Hi, I found the error similar to the one it presents when I try to open 10.98 in Object Builder 0.4.5. Watch:
U0xwWfOKQeSko8IbNxdXHA.jpeg


OTC:
HTML:
Startup done :]
ERROR: Failed to read dat '/things/1098/Tibia.dat': corrupt data (id: 3, category: 1, count: 255, lastAttr: 0)'
Exiting application..
 
Your new object builder is adding a new attribute (or changing an old one). Probably wrapping? As I mentioned earlier. Check how your object builder is generating the new .dat
 
Your new object builder is adding a new attribute (or changing an old one). Probably wrapping? As I mentioned earlier. Check how your object builder is generating the new .dat
Hi again, I'm in a battle to try compile the OB. This check should be done in the compilation files, right? If it's, I think I'll have to leave it for another time because I can't compile the OB to test any changes. :\
 
You don't need to compile it since you already have a compiled version. You need just to check the dat architecture.
 
You don't need to compile it since you already have a compiled version. You need just to check the dat architecture.
Can you teach me to check the architecture? I've been trying to view in editor and this appears. LOL :confused:
3fkVW2eyR26a1oDFK8X2aQ.jpeg
 
i managed to add the transparency + extended, everything seemed fine but... whenever i add new looktypes , from looktype 550+ and up, they didn't display in-game :( , every looktype past position 550(in outfits) appears like a "void" tile :/ looktypeproblem.png
 
i managed to add the transparency + extended, everything seemed fine but... whenever i add new looktypes , from looktype 550+ and up, they didn't display in-game :( , every looktype past position 550(in outfits) appears like a "void" tile :/ View attachment 35502
You need edit script newtype in talkactions for more outfits
 
For some reason i'm having this error at OTAcademy RME.
1704971224617.png
Any ideas? This items.otb version I used worked before (a few months/years ago). Thanks in advance.
 
Back
Top