Trying to understand how pointer stuff works

Issue #17 new
Marcel created an issue

First of all I really appreciate your hard work and releasing all this stuff for free! Sorry for open an issue but I couldn't any informations to contact you.

I'm pretty new to game hacking and pointer stuff but at least I know some of the basics. I know how to find some basic stuff like player/target coordinates and health but I can't figure out how to work my way up to get, for example, player/npc/enemy coordinates around me.

In your offsets.h you are talking about "agents". As far as I understand you "agents" are every entitie in the game world. So to get the player/npc/enemy coordinates, I guess, I need to find these "agents" but how? I think the basic "pointer way" for health would look like this:

Agent->charClient->CharClientHealth->currentHealth

Or for position something like this:

Agent->charClient->CharClientPos->PosX

So I need to loop through every agent, to get what I want. I have no problem to find static references to currentHealth or PosX for my own character but I can't figure out how the hell I finde the way to loop through every agent surrounding me on the map.

From my understanding, there must be a sort of array which contains pointers to all entities. Once I find a static reference to this sort of array I could loop trough this array and grab the "base pointer" that I want building a pointer path to the information I'm interested in and profit. :)

I hope you can/will point me into the right direction.

Comments (1)

  1. hairys

    You're on the right track, the game does keep a list of agents surrounding you. You have to scan the game executable looking for a pattern that might point to the array. Check out Gw2HackMain::ScanForPointers() in DataScan.cpp, it has the pattern for the agent array. Also, check out Gw2HackMain::SetupAgentArray() in main.cpp to see how we setup the array.

  2. Log in to comment