Offset notes
Let's throw notes about offsets here, that way everyone can contribute.
Comments (75)
-
reporter -
wonder what undecoratedcodedName could be. maybe wvw? how you get changed to 'server name Bronze Invader' or whatever
-
reporter Has something to do with names in general, like npc names, gadget names, etc. They come from the dat file (modelDefs). They're coded in some special format (encrypted maybe?). Names that are dynamic, like player/pet names, come directly from the server and are stored in their respective structs.
-
ViewAdvanceWvw = 0x1c - where all the others are just +1 this one seems to be +0x1c from the results of the pattern scanner. havent been able to extract anything yet from there
-
reporter what did you find at 0x1c?
-
WvwCliContext. has stuff related to objectives things like hold events (capturing objectives)
ViewAdvanceWorldMapModel is at the same offsets as the other stuff in the scanner, and 0xe8 and 0xb8 are some kind of arrays. think they are arrays of map markers, gonna look more into it later
-
there seems to be some compass thing at compass + vt0x44
the position of your character in the world is at
0x24
(x),0x28
(y), and0x2c
(z), ther are some other coords below these that are just x,ythe relative x,y position of your mouse within the mini map are at
0x74
and0x78
some other x,y that move when you drag the map are at
0xac
and0xb0
compass focus is at
0x60
basically this goes from 0.0 to 1.0 as you hold your mouse over the mini maptheres a bunch of arrays at the original offset of
0x44
, no idea what they do. leading a lot to agkeyframed and agchar -
reporter How did you manage to find the compass struct? Are you sure it's a VT call?
-
Just speculation about the arrays at the original offset of 0x44 - perhaps they are used for drawing the markers on the mini-map for player/agent locations?
-
@hairys to be honest i just found it by process of elimination. http://i.imgur.com/354tVod.png
i was looking through compass to try and find the array of markers so i could get to CpAgent, CpWvwObjective, CpMarker, etc http://i.imgur.com/EYVfVV5.png
CpPartyMember has a member that gives access to squadContext as you have in your notes above
-
sigh, ViewAdvanceWorldMapModel (WmmContext) has arrays at
0xa8
- 15320xbc
- 7210x10c
- 4070x148
- 189all of these arrays change in size when you enter wvw or for example heart of the mists. these arrays contains all map markers on the world map. the second array
0xbc
adds and removes items in real time as objectives in wvw get swords and orange swords appear, yaks spawning/dying etc. each map marker within these arrays has a member (dnno offset yet) that has the x/y/z coordinates of where it is at in game.there are things as well like
m_marker
andmarkerDef
- each marker has a type:model->GetModelType() == WORLD_MAP_MODEL_TYPE_CAMERA
model->GetModelType() == WORLD_MAP_MODEL_TYPE_MARKER
model->GetModelType() == WORLD_MAP_MODEL_TYPE_TRACKED_PLAYER
model->GetModelType() == WORLD_MAP_MODEL_TYPE_RES_SHRINE
model->GetModelType() == WORLD_MAP_MODEL_TYPE_RESOURCE_NODE
model->GetModelType() == WORLD_MAP_MODEL_TYPE_WVW_OBJECTIVE
model->GetModelType() == WORLD_MAP_MODEL_TYPE_AGENT
model->GetModelType() == WORLD_MAP_MODEL_TYPE_PING
though haven't found where this is at within the marker object yet.
MODEL_TYPE_PING
is when you hold control and click on the map to get the red icon thing.TRACKED_PLAYER
is a squad, guild, or party member. the standardMARKER
is a generic map marker or anything that can't be categorized into the other groups i.e. waypoints vistas wvw keep icons and so on. -
reporter 32-bit struct sizes:
(Keyframed)Agent struct size = 128 (0x80) bytes
(Char)Agent struct size = 264 (0x108) bytes
Char struct size = 928 (0x3a0) bytes(AgChar)Collide struct size = 272 (0x110) bytes
-
http://pastebin.com/u5qi97Dw list of all the source files the client called when going through various activities using your allocator hook - just to see what all is there
-
reporter I'm sure there's a lot more. Try injecting on the launcher screen, before the game even starts.
-
added more from char select/create
32bit inventory stuff
inventory items = 0x6c;
item
|__stacksize = 0x64;
|__itemLocation = 0x24; (inventory,bank,etc. see that gw2ca page for enums)
|__ itemSlot = 0x10; (where the item is in your inventory. not sure what its relative to)
|__ m_itemDef = 0x2c;
|____ isLootable = 0x40;
|____ isBindOnUse = 0x44;
|____ itemType = 0x24;
trying to get currency but no luck so far. i found a struct that has type and then amount for each currency type but cant find where its at from inventory
-
reporter I managed to find currencies off player struct. It's 2 VT calls. One to get the currencies list, the other to get the actual number (eg. coppers) given a currency type (pass it 0x1 for coppers, 0x2 for karma, etc).
-
Nice.. Do u plan on sharing that lol
-
reporter Ofc, I'm searching for the full enum first, then I'll put together the APIs.
-
reporter If you're curious:
player struct VT call 0xc4 for the list, then VT call 0x0 off it. Pass a single parameter (int, like 0x1, the currency type).
-
are u sure about that? here's what i get when i go to player (+0x114 character) then +0xc4 and follow that http://i.imgur.com/CIqcc0f.png
when i go to 0x0 here there's references to a file AsInfoBarFloating but nothing that looks like currency
-
nvm, i figured it out. i guess going to character pointer and doing +0x114 doesnt actually get me the right player struct
-
reporter More buff bar notes (32-bit), it's a bit unorganized:
(Dictionary struct)
buff bar + 0x8 = buffs array capacity
buff bar + 0xC = buffs array count
buff bar + 0x10 = buffs array
each buff array entry = 0xC bytesentry struct:
buffId
buff ptr
hashbuff struct:
effect type = 0x4
effect def = 0x8
buff id = 0xC
ptr back to buff bar = 0x10
src agent = 0x14effect type matches this list http://gw2ca.recodesystems.com/namespace_g_w2.html#a14b9fe26d0bd8b3269b74cb779e53526
One thing I can't seem to find is stack count or the time remaining for a buff, although, it gets removed from the array if it's not active. Also, there seems to be extra buffs that I can't identify. Like, my own buffs array currently has 61 permanent entries o.o -
reporter Boon/condi count array = buff bar +0x4C
each entry = 0x10 bytesentry struct:
unknown (id?)
stack count
unknown (always zero)
hash -
What exactly is the difference between noon and condi bar and the buff bar you posted earlier? Would the buff bar include things like signet effects and attunements?
And what is that 4c offset from, character?
-
reporter "Would the buff bar include things like signet effects and attunements?" - Yes
"And what is that 4c offset from, character?" - Buff barsee here on how I got the buff bar: https://bitbucket.org/rafzi/hacklib_gw2/src/af7e6e00f01d525cab3043b26208616f6ce97b7d/main.cpp?fileviewer=file-view-default#main.cpp-377
-
i wonder what combatant is even supposed to be - there are tons of references to it
-
reporter It's actually the char struct, shifted by 0x14 bytes down.
-
what i dont get about the buff array is why so many of the entries change when i apply a boon to myself - you think only one would get added or modified..
-
reporter I'm pretty sure it's more of an "effects" array. It just so happens to have the boon/condi effects we're looking for (based on this list). Effects can range widely, like casting effects (portal, temporal curtain), etc.
Also, the array can have duplicate effects, based on stacking. -
siege weapon offset from gadget pointer + 0x1a0
Map
ID Name 18025 Oil 1 18031 Trebuchet 18034 Cannon 18043 Ballista 18047 AC 28471 Oil 2 435323146 Super Cata 532862282 Super treb 557809930 Super AC 997687566 Mortar
-
hey @hairys do you think you could check out
Compass
and follow the pointer at0x44
?I think this could be useful - but i figured I would let you handle the implementation since you have things set up how you want them?
-
reporter define "Compass", like how did you find the compass?
-
GetCompass().m_ptr->pComp
This is what I came up with... seems to work, but i'm hesistant about the first 2
hl::ForeignClass
bitshl::ForeignClass compPos = comp.get<void*>(0x44); if (compPos) { hl::ForeignClass cpd = compPos.get<void*>(0x0); if (cpd) { float scrollX = cpd.get<float>(0xac); float scrollY = cpd.get<float>(0xb0); float lockedX = cpd.get<float>(0xb4); float lockedY = cpd.get<float>(0xb8); pCompData->scrollX = scrollX; pCompData->scrollY = scrollY; pCompData->lockedX = lockedX; pCompData->lockedY = lockedY; } }
and as you can see.. the CScroll values are the center coordinates of where i've dragged the map to and CLocked is pretty much where my character marker is on the map
-
reporter ohhh, you also follow the pointer at 0x0
I was looking at the data at 0x44 thinking "nothing's moving...", heh
I'll take a look at it here after I install vs2015. -
@hairys
wvwAbilityMgr: player + 0x174 wvwRank (int): wvwAbilityMgr + 0x28
wvw rank is also at 0x20 but is only for controlled character. the one at
0x28
works for all players. i really get on the 64 bit client lol -
@hairys pls help i'm toasted http://i.imgur.com/nSgiKOm.png
i can't find IsAlive() anywhere in here, just downed and isinwater. what gives?
-
reporter It's still there, it just got moved to a sub-class. It's the call dword ptr [eax+04] above it.
-
add some codes for gw2(china) to display correct playername
char *name2 = character.get<char*>(m_pubmems.charName); int num = WideCharToMultiByte(CP_ACP, 0, (wchar_t*)name2, -1, NULL, 0, NULL, 0); char *name = new char[num + 1]; WideCharToMultiByte(CP_ACP, 0, (wchar_t*)name2, -1, name, num, NULL, 0); if (name) { int i = 0; pCharData->name = ""; while (name[i]) { pCharData->name += name[i]; i += 1; } } delete[] name;
char *name2 = player.get<char*>(m_pubmems.playerName); int num = WideCharToMultiByte(CP_ACP, 0, (wchar_t*)name2, -1, NULL, 0, NULL, 0); char *name = new char[num + 1]; WideCharToMultiByte(CP_ACP, 0, (wchar_t*)name2, -1, name, num, NULL, 0); int i = 0; pPlayerData->name = ""; while (name[i]) { pPlayerData->name += name[i]; i += 1; } delete[] name;
-
reporter Hey @nodooooka can you submit this as a pull request, please?
-
[GW2LIB::DataScan] Could not find pattern: "IsControlled()"
-
reporter I haven't looked for any 64-bit offset patterns, yet. I'm working my way through all the 32-bit patterns first. I had to change some code in main.cpp to accommodate the patterns and I didn't update the 64-bit version, yet. I'll eventually get to them, unless someone else wants to tackle it :)
Take a look at what changed in main.cpp (look at the last few commits) to get an idea of what to look for in the 64-bit version.EDIT: I should also point out that the hard-coded offsets will still function. Any patterns you put in OffsetScan will over-write it, so you can just look for updated offsets and put them in offsets.h if you don't want to look for patterns.
-
Account Deleted huh? the sample project changes the camera zoom. i was under the impression that changing things like that resulted in being flagged?
anywho, I tested the sample project and made the esp display just stats and coins, but they all return 0 on anyone but myself. are these varaibles client side now? i don't think it's the offsets, because if that were the case, it wouldn't be showing me my stats.
also, what is the best point to load the library in to gw2? upon launch? at the character screen?
i know these are all dumb questions but im relatively new to reversing (and brand new to breaking guild wrs) and im learning through this project so deal with it
-
reporter The sampleapp is meant to show many parts of the library. If any patterns/offsets are broken, it will be obvious here so we can fix them.
The server doesn't supply stats or coin values for any other player except yourself. That's why there all 0. Any pets you control will show stats, tho.
You'll want to inject the dll on the char select screen or anytime after that. Don't do it on the launcher. -
Account Deleted ok thats what i needed tyy
-
i only use a few things from this and i only use 32 bit but afaik only these changed -
charSkillbar = 0x2c0
charCoreStats = 0x1b0
charEndurance = 0x1d4
charHealth = 0x200
charInventory = 0x204
charVtControlled = 0x18c
charVtPlayer = 0x220
-
gdVtGetType = 0x64
gdHealth = 0x1ac
-
4/20
charVtGetPlayer = 0x140
charVtDowned = 0x1d8
charVtPlayer = 0x224
charCoreStats = 0x1d8
charEndurance = 0x1fc
charHealth = 0x228
charInventory = 0x22c
-
hkCombatLog hit got moved to
+0x24
offset -
haven't been playing lately, here's the new offsets
charName = 0x10c
charCoreStats = 0x1b8
charHealth = 0x208
charEndurance = 0x1d8
charInventory = 0x20c
-
a couple of the logger hooks broke - i dont use them so i just commented them out logger, logger2, and the allocator hooks seem to be fucked.
ismonsterclone has been removed and isn't in the game anymore
somme offsets have changed
inventory -> 0x208, endurance -> 0x1f8, charHealth -> 0x204, charSkillbar -> 0x2c4, charProfession -> 0x2bc, charvtinwater -> 0x1a8, charvtdowned -> 0x1dc
-
reporter You need to merge this PR: https://bitbucket.org/rafzi/hacklib/pull-requests/12/fix-for-multi-inject-module-on-windows/diff
It has instance based pattern scanning that the OffsetScanner needs. -
WindowProc is a callback function that receives any messages to a particular window -- typical messages include user mouse or keyboard input, and things like minimization, loss of focus, or resizing.
Commenting it out means that any interactive ui overlay that uses a WndProc hook to enable user input will likely stop working.
-
nvm i figured it out
-
Does anyone have the offset to ground AoE locations?
-
Patch today is causing [RefreshDataPlayer] access violation spam in output log. Player names not always appearing. Class floaters are now only showing base game classes regardless of spec.
-
Here's what change for the patch
uintptr_t specMgrSpecsArr = 0x2c; uintptr_t specMgrTraitsArr = 0x3c; uintptr_t playerVtGetTrainMgr = 0x170; uintptr_t playerVtGetAchMgr = 0x9c; uintptr_t playerVtGetSpecMgr = 0x158;
-
Have these changed recently? Tried the updates provided by David (thanks), but the nearby players list is now empty & class floaters just show base game symbols, no specializations.
-
A bump for any fix for class floaters only showing base classes. Any updates would be greatly appreciated.
-
This week's update only seems to have broken the offset for skillDefInfo as far as I can tell. This is the new value I could find for x64 "33 F6 44 89 ?? 24 48 41 8D ?? 01 3C FF 75". I'm not certain if it is correct. I've looked in memory and the buff count was very close to the address from that offset.
-
Account Deleted has anyone found the offsets for equipment upgrades like runs and infusions? i've been bashing my head over it all weekend and can't figure it out.
-
August 27 Patch caused the following issue:
[GW2LIB::DataScan] Could not find pattern: "agent->GetCategory() == AGENT_CATEGORY_CHAR" -
Anyone found latest offsets? Can’t inject atm.
tx
-
1st Oct patch. Inject failure due to :
ERROR: [GW2LIB::DataScan] Verifying pattern failed (offset: 0x0000000140A64832, value: 0x7B830674, pattern: "targetAgent && targetAgent->GetAgentId()")Thanks
-
reporter It seems anet changed quite a lot this time. I’m honestly shocked people still use this library haha
-
Legitimately without this tool I would have quit the game years ago ^^
-
Account Deleted idk what im doing but I managed to find a few things, maybe someone will find them useful (but probably not, lol)
(equip->pItemDef )+ 0x74 - item level
(equip->pItemDef) + 0x88 - item sell value
(equip + 0xA0) - pointer to item stats definition for armor pieces only
(equip + 0xA8) - pointer to item stats definition for weapons only, probably same structure
( (equip + 0xA0 or 0xA8) + 0x28) - item stat id (example: 161 for berserker’s)
( (equip + 0xA0 or 0xA8) + 0x2c) - item stat hash id
that’s all i got. i pieced this together with ReClass64, but idk where it is in the code. im not advanced enough to find it and subsequently make a signature, but perhaps someone might find this useful still lol
ive typed this same post up 3 times, this better submit this time….
-
Been getting an error since the May 26 patch. Does anyone have a fix?
[GW2LIB::DataScan] Verifying pattern failed (offset: 0x00007FF72EE10965, value: 0x5050FF41, pattern: "m_ownerCharacter->GetPlayer() == CharClientContext()->GetControlledPlayer()")
Thanks
-
28 July patch caused the player list to no longer work and there was no error log output identifying what the issue was.
Thanks
-
Anyone for lastest update for 14 sept patch? Many thanks
-
m.healthVtGetBarrier seems to be causing some issues in DataScan.
Thanks.
-
World space class symbol floaters and player list seem to not be working with this patch.
Thanks
-
Does anyone have the fix for m.charVtGetAgent and m.charVtGetAgentId in DataScan?
Thanks as always
-
Are you sure that the hook on MsgSend is placed properly?
When calculating the resulting address that’s being hooked it seems to be wrong (unless it’s an inline hook which I doubt)
-
reporter It’s correct. The count starts from E34A02, where the string pattern was found (mid-opcode). It will place the hook at E34A44.
-
So it’s a mid function hook after all, I guess you’re using VEH breakpoints to get the current context for registers etc. Thank you for the answer and for supporting this little project, it gave me plenty of useful infos to get started with an ESP.
- Log in to comment
I'll start: these are notes I had at the bottom of gw2lib.h. They're assert strings that I plan to investigate further.