Sorry buddy for the late replay.
I got hold of v1.022611. Don't have the DLC, that should be ok cos DLC just adds new maps.
Here is how the game stores the stats:
Code: Select all
//this code reads encrypted stat
"StrongholdBase.dll"+2CC169: 8B 8B 0C 02 00 00 - mov ecx,[ebx+0000020C] //ebx has base address
"StrongholdBase.dll"+2CC16F: 8B 99 2C 01 00 00 - mov ebx,[ecx+0000012C]
"StrongholdBase.dll"+2CC175: 8B 14 82 - mov edx,[edx+eax*4]
"StrongholdBase.dll"+2CC178: 8B 89 F4 00 00 00 - mov ecx,[ecx+000000F4]
"StrongholdBase.dll"+2CC17E: 8B 14 93 - mov edx,[ebx+edx*4] //stat location edx changes for every stat. Also it changes every game session. So can't inject here.
"StrongholdBase.dll"+2CC181: 8B 49 10 - mov ecx,[ecx+10]
"StrongholdBase.dll"+2CC184: 33 D7 - xor edx,edi //xor decryption. edi also changes per game session.
"StrongholdBase.dll"+2CC186: 89 55 FC - mov [ebp-04],edx
See attached table for gold and wood cheats. Here is how you can do it for other stats:
1. Do 4byte 'unknown initial value' search.
2. change stone.
3. do changed value. This will take a while till results get in millions.
4 do unchanged value.
5. repeat 2-4 till you get ~30 values.
6. add all values to address list
6. Lock[x] few values from bottom. Gather stones. See if stones display changes.
7. Do it till you find a pointer which will stop stone counter on display. Also make sure when you set it to 0 display should change.
8. Do what writes to the address. Then inject there. Look at my scripts for wood and gold.