• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Tibia 7.7 Server Decompiled

Because people werent able to do it without AI due to high inaccuracy and missing features.
Well that’s not 100% accurate. Reverse-engineering a binary is a skill not a lot of people have. And decompilers have gotten so much better. I have no idea if fusion used AI, but it can definitely be done without it.
 
Well that’s not 100% accurate. Reverse-engineering a binary is a skill not a lot of people have. And decompilers have gotten so much better. I have no idea if fusion used AI, but it can definitely be done without it.
All who did, did to some extent use ai. Ezzz and Fusion used AI to reverse engineer it while Neptuno spent 5 years and then AI was released and he completed basically the game beat.
 
Just to clarify any doubts:

Every single line of code on all of the repos linked here were written MANUALLY. I really dislike having AI assistants make changes to whatever codebase, but I don't oppose them being used for consulting, which was the case here. I even mention one of the use cases in this thread, and there is another one that I use ALL the time, which is to name stuff, which can be really annoying if you want to keep cohesion at times.

The fact is that GHIDRA or any other decompiler have improved a lot over the years, to the point where decompiling a single function (with debug symbols) becomes a matter of cleaning the output of the decompiler. Of course not all functions are as straightforward, so AI can be very helpful there, if you're able to filter whatever crap it throws at you. But overall it is still a lot of work and you still need to know the calling conventions and how the CPU works to fill in the blanks that neither decompiler nor AI can help you with, which is probably THE reason people don't even attempt it.

All of the reported issues on the server's repo stem from my own distraction when rewriting the functions, and there is a reason why I was able to fix them all (most of which were one liners), and that's not me asking AI to do it...

I have no interest in proving anything to anyone so this should be my only post about this topic. Anyone is entitled to their own opinions and I just don't want to be caught in one of those mindless dramas that plagues the forums. Believe whatever you want, yell at the clouds if you feel it, I don't care.
Post automatically merged:

On a different topic....
I might be able to patch some map editor to load/save these types of files but it would have to be later this year. It's also not as straightforward because map data is persistent, and any changes to the original map (ORIGMAP) are not automatically transfered. It would need to collect deltas and export additional patch files that are loaded at startup, and that loader remains untested.

This is probably not the best timing considering other sec tools showing up, but over the last 2-3 weeks I have been ripping RME apart to support sector files. I'm at a point where it seems to be mostly working, but it should take another week or so to tie everything up. There will be bugs so I wouldn't recommend it for anyone trying to do anything serious, but would appreciate bug reports.

The editor now loads a "project directory" which would contain the dat/mon/origmap/save sub-directories. Since each project is different in a way, they should also have an editor directory with the files previously on the editor's data. There is a sample editor on the repo that was converted from the former data/760 and can be used for that matter.

Spawns are loaded but not yet saved. Houses and Waypoints (Marks) are not yet implemented. Changes to ORIGMAP are kept in the save directory as patches. The editor won't touch ORIGMAP yet, and will instead load changes from those patches. I want to have some action/button to "commit" the changes to ORIGMAP and generate a final patch zip but it's not there yet.

The game server can consume patches to apply them to both MAP and ORIGMAP but once it's done, it's done. The next time you edit the map you should have the updated ORIGMAP and NO patches in save. The whole workflow is different from regular OTBM maps and I'm still iterating on how everything works so I'm open to suggestions.

Anyway, here is the repo. Note that the changes are currently in a separate branch tibia-rme.
 
I use especially your tibia-game repo extensively now for original implementation of systems. It's helped a lot for developing my server and I'm thankful for your contributions.
Would be happy to support your work at some point, bit early to say depending on the success of my server and whether I can get my $2k net losses back spent on developing my project for the last 5 or so years, but just wanted to say thanks, and feel free to reach out if there is anything. Good luck & cheers.
 
I dont understand much of the technical stuff but i would love to run a 7.72 server. Is this package suitable for a noob like me to download and test? Is it basically a ready to run server? I see an ip changer, isit possible to make a custom client of it?
 
I dont understand much of the technical stuff but i would love to run a 7.72 server. Is this package suitable for a noob like me to download and test? Is it basically a ready to run server? I see an ip changer, isit possible to make a custom client of it?
Simple answer is no. Running the server is as easy as following the tutorial on github, you can decide for yourself if your capable of that. (Requires linux, or a linux subsystem ex. WSL2, compiling, etc). Note that all the services (webserver, loginserver, etc) need to also be compiled and ran alongside the gameserver.

A custom client is possible, but its going to require a ton of work. I took on the task of converting OTClient to this codebase for my project, and there are quite a few bugs, desyncs, etc. that need to be worked out for full compatibility, especially if you care about accuracy. There are still a couple of things that I am not 100% happy with on my conversion, even after a couple months of casual development. Your stuck on the classic tibia client if you want an out of the box experience here.
 
Okay, so, heres two questions.
I got VPS set up and running with all services - querymanager, web, login, game.
I can login and play, all works and its been more than easy to set it up.

1. Strange thing, before I secured .ssh there appeared some Cipsoft keys in authorized_keys and mine were removed? Does anyone noticed the same? Have anyone else noticed other "cipsoft influence" on the VPS after running the server?

2. How do I make a proper server save/restart? I didnt have time recently to check it throughly but my server either had a server save after 24hours and shut down or it crashed. What's matter is that it went down. The service tried to run it again but it won't start again since there's game.pid. I'd have to remove it manually so that the game works again. Do you think adding an automatic removal of game.pid when the server starts would be fine? Or it may create issues?
 
Okay, so, heres two questions.
I got VPS set up and running with all services - querymanager, web, login, game.
I can login and play, all works and its been more than easy to set it up.

1. Strange thing, before I secured .ssh there appeared some Cipsoft keys in authorized_keys and mine were removed? Does anyone noticed the same? Have anyone else noticed other "cipsoft influence" on the VPS after running the server?

2. How do I make a proper server save/restart? I didnt have time recently to check it throughly but my server either had a server save after 24hours and shut down or it crashed. What's matter is that it went down. The service tried to run it again but it won't start again since there's game.pid. I'd have to remove it manually so that the game works again. Do you think adding an automatic removal of game.pid when the server starts would be fine? Or it may create issues?
1. In leaked files, there is authorized_keys file in .ssh directory. Perhaps, while unpacking the files, you have overwritten your keys with those inside tarball.

2. By default, the server is set to restart at 5 am. It is set in z-999-initial-data.sql file, both for sqlite and postgres databases. Table Worlds, variable RebootTime. The server should delete game.pid file by itself when working properly. It is hard to guess blindly how it failed. Take a look at journalctl to gather more information.
 
A couple months ago, I set out to decompile the leaked 7.7 server binary. One of the reasons being to have an insight into the original design of Tibia, but with the plus of tripping all the folks gate-keeping it. Now, this is not a replacement for regular OpenTibia servers. The leak itself contains only the game server which operates with different file formats, rules, mechanics, bugs, etc. I expect it to also contain at least a few typos and translation bugs from the decompilation so it's not ready at all for a production environment.

It was designed with a distributed infrastructure in mind meaning it supports/expects running on a different machine than the login server and database. The game server alone won't do much so I also had to write a few supporting services to get everything running. The central piece of the puzzle is the query manager which needs to run alongside the game server, but in this case was designed to be the database itself for simple single world setups.

For obvious reasons, everything will only compile on Linux. A Windows port is technically possible but would require design changes, which I'm not really interested at the moment, nor would have a lot of value, considering that most dedicated servers run Linux. I won't dwell further on how things work. The source code should be very readable and all repositories will contain a minimal README file to compile and setup each server as a service. The only dependency is OpenSSL's libcrypto which should be straightforward to get installed on most Linux distros.

I set everything up at https://kaplar.net to do some testing and to check if would actually run on a real Linux distro instead of WSL. It will remain online for roughly a month if anyone is interested in testing it, but will require a custom RSA key (hence the ipchanger). I don't expect anything in return except for bug reports. I also don't know if Cipsoft would have a problem with it, although there is always a chance so keep that in mind.

Anyway, there you have it. Have fun.

REPOSITORIES:
Hi @fusion32,
I wanted to drop by and say a huge thank you for your work on this decompilation!
I’ve been spending the last few days in a deep-dive struggle, trying to get the original leaked 7.7 binary to run on a modern Linux environment. I was literally fighting a 'war' against the kernel, using complex LD_PRELOAD hooks to try and bridge the gap between the old LinuxThreads and the modern NPTL model.
I was stuck in a situation where the server would accept the login (recorded in the logs), but the connection threads would hang in a futex_wait_queue and never send the map data back to the client.
Finding your project was like finding the 'Holy Grail'. Your fix for the thread interactions and the -DTIBIA772=1 flag are exactly what was missing to make this playable on modern systems with custom clients (like OTClientV8).
You saved me weeks of frustrating reverse engineering. This is a massive contribution to the preservation of Tibia's history.
Thanks again for sharing this with the community!
 
This is amazing!
Since @kay started talking about reverse engineering (or decompilation for those who got offended in other thread), I have started something like this for four or five times to figure out how CIP used to implement things... But I never got too far!
Seeing this released feels like a mission accomplished for me. Thanks for that!


@0lo
I was checking your 7.4 changes. What are these changes in ChangeSkill? Like, was it harder to level up skills in 7.4 compared to 7.7?
It’s really funny to realize this nowadays. I used to play back then but never really felt it in the gameplay.
I only remember the mana requirements


@Olddies oh please, no!! this is the chance to we get rid of otbm 😅
It was harder yes in 7.4 because to counter rune makers Cipsoft made soul points in 7.7~, and due to wands being implemented, they doubled mana regen basically so it would support it.
 
hey ya
I got some like that:

root@localhost:~/tibia-game# ./game
Tibia Game-Server
(c) by CIP Productions, 2003.

Initialisierungsfehler: cannot find config-file
query, web, login are up

how to run game and chect that files?
 
Back
Top