Emanem / linux-hunter

Prototype MH:W companion app for Linux, inspired by SmartHunter
GNU General Public License v3.0
26 stars 9 forks source link

Incorrect memory patterns #19

Closed Bjunqueira54 closed 7 months ago

Bjunqueira54 commented 7 months ago

Screenshot_20240308_211249 Currently, the CurrentPlayerName pattern isn't working correctly, and I suspect this is messing with the rest of the functionality of the companion, as I only have access to the list of monsters in area and their HP, but player names, player damage, session id and everything else is not working.

--debug-all shows the following output

PlayerName 5375143335 48 8B 0D CA F6 B9 04 48 CurrentPlayerName -1 PlayerDamage 5396279623 48 8B 0D A2 61 5C 03 E8 Monster 5371111769 48 8B 0D 28 6D ED 04 B2 PlayerBuff 5404523425 48 8B 05 E0 9A EF 02 41 Emetta -1 PlayerNameLinux 5379446379 48 8B 0D 06 4E 78 04 48 LobbyStatus 5371632276 48 8B 0D 55 30 D4 04 E8

How can I lookup these patterns manually myself so I can try to make it work for current game version? (15.21.00)

Emanem commented 7 months ago

I'm afraid I'm aware about this issue but I don't have time nor resources to dump the memory of some runs and reverse engineer the patterns to look up the pointers. Those patterns were taken and modified from SmartHunter, but now that the game has been updated I'm afraid this has changed and this issue has alas manifested.

How this works is that the companion first looks up the memory of the process for these pointers, then interprets the memory location at each pointer and jumps to another memory location to finally reach the memory cells holding the names, damage etc etc.

Unfortunately this needs potentially re-engineering and reverse engineering to find the original locations and how those get mapped in memory each time.

If you are strong C/C++ developer with a good hacker mindset and able to digest what has been done at SmartHunter (if it's still updated btw), you may create a patch for this and I'll be happily accept!