Skip to content

Tibia Updated, What Now?

Mark edited this page Feb 9, 2017 · 3 revisions

When CipSoft updates the Tibia client, the memory addresses used by Tibialyzer to read things from the client (such as life/mana) are no longer correct. This is because Tibialyzer relies on the life being in an exact position in Tibia's memory, and this position changes after the client changes. This means that the memory addresses of Tibialyzer have to be updated before Tibialyzer will function correctly again.

Main Tab

On the main tab, you can redownload the new memory addresses from the internet. You should first try the Download New Addresses button, this will download new addresses from the Tibialyzer github page. However, if I have not updated the memory addresses yet, this will not work.

If that does not work, you can try the Generate Partial Addresses which will get the addresses from someone elses' page (which usually updates faster than mine).

If that does not work, keep reading.

What can you do?

To fix the server log scanning after a Tibia updates, go to the Settings page and select "Scan Entire Memory". This will fix the server log scanning, meaning Tibialyzer will again correctly measure creatures killed, loot found and damage dealt. Note that the HUDs will still not work, because those addresses are unknown to Tibia! Settings->Scan Entire Memory

How do I update the addresses?

The addresses are stored in the Database\MemoryAddresses.txt file in hex format. You can look for the new addresses on a Tibia forum. Alternatively, you can find them yourself. Below is a short guide for finding the addresses yourself. Note that after updating the addresses, you will likely want to switch the scanning method back to Scan Internal Tabs, as this is much more efficient and avoids potential duplicate entries from copying messages.

Life and Mana Addresses

Addresses: XORAddress, HealthAddress, MaxHealthAddress, ManaAddress, MaxManaAddress

These addresses are necessary for the HUDs to work properly. A nice guide to finding these addresses using Cheat Engine is posted here. In case that link gets taken down, I will mirror the contents here.

Getting first address:

We will start to found the MP value because it is more simple to use and recovery (no need get hit from enemy, like HP need to).

  • Starts Tibia and Cheat Engine. Connect to your character;
  • First scan: 4 bytes, Unknow Initial Value;
  • Use some spell with lower cost. For every, scan by "Changed value". Do some "Unchanged value" too to help filter. Not scan for MP real value, because it will be incorrect;
  • You will find some strange value (generally numbers with 10 "random" digits). Check if it change when you spell (can increase or decrease when spell, "without logic");
  • After you find it, it's your MP value (seriously). Add this address to your list.
Getting XOR address:

The next step is discover your XOR address, and we will use the MP strange value to it (not the real value). You will need XOR to converts HP/MP strange values to real values, but only on your application.

  • Copy your MP strange value from address list by double clicking on this value;
  • Open Windows Calculator and set it to Programmer Mode (ALT+3);
  • Paste your MP strange value and click on XOR button and now insert your Real MP value (current). You will get the real XOR value, but we need the address. For now, copy it with CTRL+C;
  • First Scan: 4 bytes, Exact Value (paste the XOR value). You will find generally one value. If not, repeat this process and doing all again to avoid mistakes;
  • Now you found your XOR address. Add it to your list.
Getting others address:

You will use this method to found the HP, HP Max and MP Max.

  • Just get the XOR value that you found and mix with your current HP, HP Max or MP Max real value, using Windows Calculator. Copy that;
  • First Scan: 4 bytes, Exact Value (paste here);
  • You will found generally one or two address. If you are searching by HP value, try be attacked or recovery it to check;

Level/Experience Addresses

Addresses: LevelAddress, ExperienceAddress

These are stored in memory as regular 4-byte integers, simply scan for the value in Cheat Engine, then log into a different character with a different level and scan for the updated value. Repeat until there is only one possible memory location.

Equipment Addresses

Addresses: AmmunitionCountAddress, AmmunitionTypeAddress, WeaponCountAddress, WeaponTypeAddress, BootsTypeAddress

These addresses are necessary for automatically counting used ammunition.

Equipped items are stored as the ID of the item as a 4-byte integer in memory. You can find a list of all Item IDs here. Equip an item, look up the ID and look for the ID in memory. Then equip another item and look for that ID. Repeat until only one possible memory location remains.

For the ammunition counts, put any amount of arrows (ammunition) or spears (weapon count) in the slot and look for that number. Change the amount in the slot, then look for the updated number. Repeat until only one possible memory location remains.

Battle List Information

Addresses: PlayerIDAddress, BattleListAddress

These addresses are necessary for coordinates and health of other players. A good guide for finding these addresses can be found here. In case the post gets deleted I will mirror the contents here.

Grab Cheat Engine... Open Tibia, attach to it, and search for your character name. You will get a few results, and on each one you should add to the list at the bottom (double click it I think). Now right click each in turn, and click "browse memory region". Switch to display type "4 byte decimal" by right clicking the bottom half of this window to make life easier. At one of the places where you see your name, about 200 bytes or something later you'll see the name of another person in your battle list (provided another person has been on your screen since starting the client - it may be 200 bytes or something earlier, so just scroll until you see your name). It will only be there for 1 of the entries you added earlier, and that entry is your "battle list". You'll notice the numbers will have obvious meanings (position X, Y, Z). The 4 bytes immediately before your name are your Creature ID. You will not always be in the same place in your battle list, so you can find yourself using this. First thing, take your creature ID and search for it in Cheat Engine... Find a static address, this is what you'll read first (at tibia.exe base address + this address). After that, you find the start of the battle list (CID of first creature) in the memory viewer, and get that address, this is what you'll read second. You'll then calculate the exact number of bytes between the first and second CID in the battle list structure, and you'll read each entry at that interval of bytes until you find one where the CID matches your own. Then you can read the address of that CID + whatever offset X, Y, and Z coordinates are.

Internal Tabs Structure

Addresses: TabsBaseAddress

This address is necessary for using the more efficient Scan Internal Tabs Structure setting. The TabsBaseAddress is very annoying to locate. The basic idea is that you start at the address of the string "Local Chat" (which is the header string of one of the tabs) and work your way back from there. I wrote a program to find the tabs base address based on a number of fixed offsets here. You can compile the program with Visual Studio, for more information on that see the section on compiling Tibialyzer.

Usage of the program is relatively simple. You start the program when Tibia is running and you are logged in, and it will try to locate potential values for the TabsBaseAddress. After it is done, it will print the message "Restart tibia client and press any key.". At that point, restart your Tibia client and log back in. Then press any key. It will print a list of potential TabsBaseAddresses. After the first restart it's usually 10~ values. It will print the same message again, so log in/out again. After the second restart usually only one value remains, that is the correct TabsBaseAddress.