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

Need Information on Packet Structures, Specifically Fullmap

gstools

New Member
Joined
Aug 5, 2023
Messages
6
Reaction score
0
Hi,

I'm new here and looking for information on packet structures, with a focus on the fullmap package. Any documentation or insights would be helpful.

Can someone point me in the right direction? Thanks.
 
Last edited:
My api has most packets (mostly) worked out (up to the 12.51 update). You can find the client and server packets here: TibiaAPI/TibiaAPI/Network at master · jo3bingham/TibiaAPI (https://github.com/jo3bingham/TibiaAPI/tree/master/TibiaAPI/Network)

You’ll find the FullMap packet in the Server directory, and you’ll find the code to parse an area (ReadArea) in NetworkMessage.cs.

I’m not aware of a written description of packet structures, so you may have to look at code - like my api or TFS - to get the information you’re looking for.

If needed, I could write up a quick description of the FullMap packet if the code doesn’t fully make sense.
 
Last edited:
My api has most packets (mostly) worked out. You can find the client and server packets here: TibiaAPI/TibiaAPI/Network at master · jo3bingham/TibiaAPI (https://github.com/jo3bingham/TibiaAPI/tree/master/TibiaAPI/Network)

You’ll find the FullMap packet in the Server directory, and you’ll find the code to parse an area (ReadArea) in NetworkMessage.cs.

I’m not aware of a written description of packet structures, so you may have to look at code - like my api or TFS - to get the information you’re looking for.

If needed, I could write up a quick description of the FullMap packet if the code doesn’t fully make sense.
Thanks for the link to your API. I've had a look, and I think you've done a great job with it. It helped a lot with understanding the packet structures.

Could you point me to the specific details in the FullMap packet that show if a tile is walkable? If you could explain this part a bit more, it would be helpful.

Thanks,
 
Map packets don’t tell which tiles are walkable, only which tiles contain objects (items, creatures, etc.). In order to determine if a tile is walkable, the client correlates the objects on the tile with the data in the Tibia.dat file (the server does the same but with items.otb).
 
Thanks for the clarification. So, if I understand correctly, I need to parse the OTBM map in Tibia.dat to find information related to walkability on the "ground-tile." Is that accurate?
 
Thanks for the clarification. So, if I understand correctly, I need to parse the OTBM map in Tibia.dat to find information related to walkability on the "ground-tile." Is that accurate?
If you’re parsing an OTBM map, I would suggest using the items.otb file associated with that map. items.otb is similar to the Tibia.dat file but with more information.
 
Maybe I should have pointing this out in my first post, but I'm trying to figure out the walkable tiles around the player (or the full map). I've got to do this by parsing packets or the game's .dat files. You seem to know your stuff, so what do you think? Should I read the items.otb and map it against the positions in the full map packet? What's the simplest approach? Any advice would be awesome. Thanks!
 
Maybe I should have pointing this out in my first post, but I'm trying to figure out the walkable tiles around the player (or the full map). I've got to do this by parsing packets or the game's .dat files. You seem to know your stuff, so what do you think? Should I read the items.otb and map it against the positions in the full map packet? What's the simplest approach? Any advice would be awesome. Thanks!
One option is, if you have access to the OTBM and OTB files then you could parse the map from the OTBM and create a dictionary where the key is a position and the value is whether or not that position is walkable (based on the objects on that tile and whether or not they are walkable from the data in the OTB files). The biggest downside to this approach is that the game world is dynamic, so you can't be sure a tile will always be walkable because an item that blocks walking, or a creature, could make its way on that tile.

Parsing the FullMap packet gives you the benefit of being able to check if there's a creature blocking the tile (if the server you're on doesn't allow walking through creatures). You can use the .dat file to check each item on a tile while you're parsing the FullMap packet to determine if there are any items causing that tile to be unwalkable. One thing to remember is that the FullMap packet only contains data for a set amount of tiles around your player, and they only get sent to the client upon login and when teleporting. As you walk around, the server sends additional map packets to the client (in my api these are TopFloor, BottomFloor, TopRow, BottomRow, LeftColumn, and RightColumn) so you would need to parse these as well. You would also want to parse CreateOnMap/DeleteOnMap to keep track of items/creatures being added and removed from the map, and FieldData for any updates to a tile, and MoveCreature to keep track of where creatures are on the map (I think that covers everything of importance). Another thing to note is that the server can send multiple packets together in a single message; for example, when you log in you'll get the FullMap packet along with data for your character (skills, inventory, stats, etc.) and light levels (among other things). It could be the case that the FullMap packet is in the middle or end of the message, so you'd need to parse every packet to ensure you don't miss any important packets.

Another option is to read the map from the client's memory. The benefit here is that you don't have to worry about parsing packets correctly, you can just read from the memory address. Obviously the biggest downside is that you have to know the memory addresses and structure of the map in memory for the version you're using.
 
Thanks a lot for your detailed reply. So, I ended up with this method where I grab the titles from the packets and then look up the corresponding IDs in that .dat file. It was a real struggle but finally, I got it working... :p Now, I have a super lightweight client that can log in to the game, move around, and runefarm. Maybe I'll hook it up to a webserver so that it can be accessed from anywhere through a browser.

It would be nice to make this work on real Tibia, but I guess BattleEye can detect custom clients, right?
 
Thanks a lot for your detailed reply. So, I ended up with this method where I grab the titles from the packets and then look up the corresponding IDs in that .dat file. It was a real struggle but finally, I got it working... :p Now, I have a super lightweight client that can log in to the game, move around, and runefarm. Maybe I'll hook it up to a webserver so that it can be accessed from anywhere through a browser.

It would be nice to make this work on real Tibia, but I guess BattleEye can detect custom clients, right?
My api I linked to before works on real Tibia, with some caveats; it only works on non-BattlEye protected servers on Windows (Zuna and Zunera), but it works on every server on Linux and macOS (BattlEye isn’t as sophisticated on those OSes as it is on Windows). Feel free to read the README on my api repro and some of the wiki how-to’s to get a better idea of how it works. I’m assuming you’re using a proxy to get the packets? My api is just a proxy. I’ve never had an account/character banned/deleted from using it, but I also only really used it to update packets.

Edit: Ah, nvm, it seems you’ve built a custom client?
 
My api I linked to before works on real Tibia, with some caveats; it only works on non-BattlEye protected servers on Windows (Zuna and Zunera), but it works on every server on Linux and macOS (BattlEye isn’t as sophisticated on those OSes as it is on Windows). Feel free to read the README on my api repro and some of the wiki how-to’s to get a better idea of how it works. I’m assuming you’re using a proxy to get the packets? My api is just a proxy. I’ve never had an account/character banned/deleted from using it, but I also only really used it to update packets.

Edit: Ah, nvm, it seems you’ve built a custom client?
Yes, your API is a goldmine – it helped a lot. Does real Tibia use the same encryption as OT?

Yes, I'll build a custom client. So if I run it on real Tibia, it will not have any BattleEye running. But I guess they use server-side BattleEye as well, which can detect this?
 
Yes, your API is a goldmine – it helped a lot. Does real Tibia use the same encryption as OT?
Yes. As far as I’m aware, OT engines haven’t changed their encryption; meaning an OT that supports the Tibia11 client would have the same encryption as RL Tibia.

Yes, I'll build a custom client. So if I run it on real Tibia, it will not have any BattleEye running. But I guess they use server-side BattleEye as well, which can detect this?
I would assume so, yes. If I remember correctly, the ClientCheck packet is responsible for this (though I could be mistaken). It should be fine on Zuna and Zunera, and possibly any server if you’re on Linux or macOS, but I wouldn’t risk it on an account you care about.
 
Back
Top