Hi,
i have succesfully worked on implementing a character editor that indeed allows to edit a squads inventory in-game. I've found the mercs' structs using the pointer scanner. The pointer path that yields valid results for me so far is:
1st Merc current Stamina:
[[[[[["GameJABiA.exe"+68]+8]+8]+c]+134]+18]+29c
From there one can easily navigate through the data structure of that merc. It has become 4 bytes bigger since earlier versions.
The base of the linked list of mercs in combat must be after two pointers at +68 and +8:
2nd Merc current Stamina:
[[[[[[["GameJABiA.exe"+68]+8]+0]+8]+c]+134]+18]+29c
3nd Merc current Stamina:
[[[[[[[["GameJABiA.exe"+68]+8]+0]+0]+8]+c]+134]+18]+29c
One can clearly see the linked list here.
These adresses work flawlessly for me[b/] over all reloading/restarting of games, but i wonder what all those strange offsets are as they seem to have nothing to do with either Recon's reverse nor the description on bears-pit.
Anyway, using this I've created a lua scripted editor with gui that
automatically attaches to the game process
scans the merc list for all mercs in the current squad
-> Press the "Load Mercs" Button
allows to put all kinds of items in each correspoding slot
-> Press the "Update Inventory" Button
Screenshot:
i <dot> imgur <dot > com/GYvKV8j.png
Usage is fairly simple:
Open the cheat table with Cheat Engine and run the lua script
When the game is running and the Editor window appears hit the "Load Mercs" Button
Select Merc, item slot and item to put
Hit the "Update Inventory Button"
However, this inventory editor has its pitfalls:
It works only in the Combat View, not on the World map
It does not automatically trigger an update of the game in order to respond to the data change. I need a clue how to do that first. In order to "apply" the inventory changes ingame one has to simply open the inventory menu for the modified character so they will become visible, and close it again so that the changes are applied to the models in the screen.
It does not automatically rescan the game for changes. After each loading / restarting
Credits:
Rhagic for providing item IDs in a spreadsheet
Recons for providing essential information about the game data structure
Dark Byte and whoever was involved in providing Cheat Engine Smile
How to use this cheat table?
- Install Cheat Engine
- Double-click the .CT file in order to open it.
- Click the PC icon in Cheat Engine in order to select the game process.
- Keep the list.
- Activate the trainer options by checking boxes or setting values from 0 to 1