View previous topic :: View next topic |
Author |
Message |
Codcat Advanced Cheater
Reputation: 0
Joined: 21 Aug 2007 Posts: 62
|
Posted: Thu Jan 23, 2014 12:15 am Post subject: Help needed with a 'dynamic' register X3: Albion Prelude 3.1 |
|
|
I'm having a lot of trouble trying to find some pointers in X3: Albion Prelude.
It seems any memory address in game that is not 32bit aligned is impossible to find a pointer for. For example I can easily locate the dynamic address for my ships shield capacity "3C21A9B3" but am unable to locate anything pointing to it via the pointer finder or manual method.
Doing a "Find what writes to this address" always returns this opcode:
004A42A6 - 89 56 01 - mov [esi+01],edx
Below is a copy paste.
Code: | 004A42A1 - 88 0E - mov [esi],cl
004A42A3 - 8B 53 01 - mov edx,[ebx+01]
004A42A6 - 89 56 01 - mov [esi+01],edx <<
004A42A9 - C6 03 00 - mov byte ptr [ebx],00
004A42AC - 83 C3 05 - add ebx,05
EAX=2600DD90
EBX=20072D81
ECX=06D90501
EDX=00000000
ESI=3C21A9B2
EDI=19BAD237
ESP=0018FB00
EBP=0018FBB4
EIP=004A42A9 |
The value you want is esi+01 which equals the address that holds your shield capacity but doing a HEX search for that address reveals nothing.
If I put a break point on 004A42A6 - mov [esi+01],edx and then refreshing it I'm noticing that ESI register is CONSTANTLY changing, that is why a search reveals nothing. It's like a dynamic register that is used for many other functions.
There seems to be no other opcode that will write or access that address. Even moving up through the code placing more break points still gives that constant random return on the ESI register.
I get the same problem with any other dynamic address in game that doesn't end with an aligned 4 byte address as well. Actually come to think of it that same opcode is writing to them all...
Last edited by Codcat on Sat Jan 25, 2014 1:57 am; edited 1 time in total |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Jan 23, 2014 12:34 am Post subject: |
|
|
Use injection. I posted a table here as an example. If other addresses are being accessed by that instruction, you will need to filter them out in your script. |
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25797 Location: The netherlands
|
Posted: Thu Jan 23, 2014 6:28 am Post subject: |
|
|
Don't forget to disable fastscan when on a game with unaligned addresses _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
Codcat Advanced Cheater
Reputation: 0
Joined: 21 Aug 2007 Posts: 62
|
Posted: Thu Jan 23, 2014 7:41 am Post subject: |
|
|
Thank you for the replies. Yes I've disabled fast scan, I tried using code injection as well but I never see the ESI register point to the address I need. I used Dissect data/structures tool to try and find something to filter on but was unsuccessful. It may just not be possible to achieve. |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Jan 23, 2014 12:30 pm Post subject: |
|
|
Keep digging. Look inside pointer trees...you are bound to find something in the structure to compare with. You can test your compare by creating a script/code cave and having all garbage addresses jmp originalcode, then set a breakpoint on all filtered addresses that you are testing. That way, if you see anything other than your targeted address at ESI (or whichever register), you know whether or not you need to fine-tune your compare.
I'll try grabbing a copy when I have time, and I'll see if I can't help you out with it. Which version are you running?
EDIT:
See example table below for Energy(?) pointer (Skidrow 1.0.0.0):
I haven't tested it much, but it may work with your version of X3AP.exe. As you can see, the targeted address is found for us, allowing us to freeze or alter it as we see fit. |
|
Back to top |
|
 |
Codcat Advanced Cheater
Reputation: 0
Joined: 21 Aug 2007 Posts: 62
|
Posted: Thu Jan 23, 2014 9:16 pm Post subject: |
|
|
I'm running the latest Steam version 3.1
X Rebirth was complete rubbish so I went back to X3, Albion Prelude is the latest expansion for the X3 series. I'll take a look at that script when I get a chance, I'm in GMT+8 that's why my replies are late.
If you look at it you'll find that the dissect doesn't work very well on those unaligned addresses, even if you align the address yourself with a address+-offset. I wasn't able to see any pointer trees for them if CE builds it for you.
But if I do the same on addresses I am able to find pointers for(hotkeys labelled), it works very well on those.
I'll attach a table I made that has some working pointers. Some of it I updated from Palimpalim's work from the CE forums here, he also had a lot of difficulty trying to find pointers http://forum.cheatengine.org/viewtopic.php?p=5500891&sid=e1afdaa003f2b98b9b2bb3b36e342f10
Some items I've been unsuccessful in finding pointers for are:
Reputation's
Shield Capacity
Marine Training
Salvage Insurance
I haven't bothered with some of the more generic ones like gold and player stats but the dynamic addresses are easy to find on them. |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Jan 24, 2014 4:29 pm Post subject: |
|
|
I may have a hard time finding a copy of 3.1.
Could you please tell me what the 100% value of shield is (in hex) for level Terran Commander (or any level that I can check)? It will be quicker for me to find without having to search for it.
Although your injection point for shields is different in my version, I can use the AOB to find the location of the instruction in my version...at the very least, if I can find the shield address in my version, I might be able to find an offset that you can use to compare with in your version, as they should be similar. |
|
Back to top |
|
 |
Codcat Advanced Cheater
Reputation: 0
Joined: 21 Aug 2007 Posts: 62
|
Posted: Sat Jan 25, 2014 1:53 am Post subject: |
|
|
++METHOS wrote: | I may have a hard time finding a copy of 3.1.
Could you please tell me what the 100% value of shield is (in hex) for level Terran Commander (or any level that I can check)? It will be quicker for me to find without having to search for it.
Although your injection point for shields is different in my version, I can use the AOB to find the location of the instruction in my version...at the very least, if I can find the shield address in my version, I might be able to find an offset that you can use to compare with in your version, as they should be similar. |
I should clarify a few things about X3, your shield capacity is dependant on what ship you're flying and what shields you have equipped. Not rank.
What you saw in my table for shields is the current "charge" level, one pointer for each shield slot(some ships have multiple slots). Regardless of the shield capacity it seems 65536000 always equals 100% charge.
The capacity of your shields is in your ships information window, shows it in kilo joules or mega joules. I haven't tested the larger shields yet but whatever number you see for shields in your ship info window is identical address 4byte value. For example my current ship has a single 25mJ shield, shown as 25000kJ so I just search for 25000 and then unequip it by transferring it to another ship I own or just eject it, search for 0 and pick it up again, back to 25000.This returns two addresses that are both unaligned, one is the current shield charge level(cannot be edited) and the shield capacity. You can easily change the shield capacity to a large number giving your little fighter a capital class ships shields if you wish.
I haven't bothered to find a invulnerability hack(a simple detour) yet as I've been wanting to play the game without blatant cheating. I might do it soon though, I've seen it done with older versions of the game.
Palimpalim post's here http://forum.cheatengine.org/viewtopic.php?p=5452934&sid=7b9bea8a374cbfd15a29508fd5e2dd7b explains how to find your reputation. He even put up a translated version of his rep and rank spreadsheet https://docs.google.com/spreadsheet/ccc?key=0AkD8tujv_p3YdFh2OWVvalVwQmxvb01aMXlrZnliZkE&usp=sharing#gid=0 I use it to find what I need but its tedious. That's why I want to find the pointers or create them with injection.
That script you gave me earlier is for the shield charge level that I have already using pointers, yours works very well with aobscan but the hard part here is finding pointers for these unaligned dynamic addresses
Shield capacity is an easy one to find the dynamic address quickly, I think if you can master finding pointers for that then the others can be done using the same method. They all have a similar opcode writing to the address with that changing ESI register...
I picked up the entire X series of games on steam sale for next to nothing, I wonder if you could get hold a cheap copy of X3:AP so you'd be running the same version. If not I think I could update the addresses in your scripts and tables if they not using AOB, your energy script worked in my version. |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sat Jan 25, 2014 2:04 am Post subject: |
|
|
65536000 is hex value? |
|
Back to top |
|
 |
Codcat Advanced Cheater
Reputation: 0
Joined: 21 Aug 2007 Posts: 62
|
Posted: Sat Jan 25, 2014 2:08 am Post subject: |
|
|
No it's decimal, I was just looking at it right now in memory viewer actually trying to see if it could be something else. It's a 4byte decimal, float and double just returns a non number and its definitely not text or array of bytes. I watched it tick over from 0% charge to 100% and it incremented from 0 to 65536000. But that's my shield charge, I've been using shield capacity as a test subject to find pointers for. |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sat Jan 25, 2014 2:16 am Post subject: |
|
|
Just to be clear, you are trying to find pointers for shield capacity...not shield charge?
I really don't want to take the time to learn this game, so it would be good if you could help me find this value to expedite things. Could you please tell me the hex value of whatever shield value you are wanting to find pointers for? Also, if you right-click on the instruction mov [esi+01],edx, do you see the value there, or do you have to wait until you are hit etc.?
Thanks. |
|
Back to top |
|
 |
Codcat Advanced Cheater
Reputation: 0
Joined: 21 Aug 2007 Posts: 62
|
Posted: Sat Jan 25, 2014 2:24 am Post subject: |
|
|
Trying to find shield capacity pointer, not charge.
In the save game I'm working with I am in a ship with a single 25000kJ shield, that shows as 25000 4byte decimal address(dynamic), in HEX that's 61A8 or 'A8610000' shown in your memory viewer.
That instruction 'writes' to that address when you change or equip the shield, as its the capacity value. The dynamic charge address is constantly being written to from the same instruction.
EDIT
If I see what is 'accessing' those dynamic addresses I get this:
004A87B7 - 8B 4F 01 - mov ecx,[edi+01]
Code: | 004A87AE - 77 ED - ja x3ap.exe+A879D
004A87B0 - FF 24 85 48884A00 - jmp dword ptr [eax*4+x3ap.exe+A8848]
004A87B7 - 8B 4F 01 - mov ecx,[edi+01] <<
004A87BA - 89 4E 01 - mov [esi+01],ecx
004A87BD - 8B C6 - mov eax,esi
EAX=00000000
EBX=257ED8D7
ECX=000061A8
EDX=00000034
ESI=257ED8D7
EDI=20111E5A
ESP=0018FAF8
EBP=0018FBB4
EIP=004A87BA |
I get constant hits from that. |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sat Jan 25, 2014 2:37 am Post subject: |
|
|
Okay, the shield charge is the bars that decrease when you are hit?
How do you change the shield?
EDIT:
Never mind.
Last edited by ++METHOS on Sat Jan 25, 2014 2:45 am; edited 1 time in total |
|
Back to top |
|
 |
Codcat Advanced Cheater
Reputation: 0
Joined: 21 Aug 2007 Posts: 62
|
Posted: Sat Jan 25, 2014 2:44 am Post subject: |
|
|
Press escape to bring up side menu, go to 'gameplay' and change show 'Numerical shield/hull display' to Yes.
Otherwise you just get the bars that you see.
and yes the blue bar is your shields, make the above change so you can see what's going on easier.
Shield capacity will only change if you remove your shield or change it to another bigger/smaller type, easiest way for you if you've just started a game is to eject it, it will appear as a crate behind your ship floating in space, your value will then be 0. Before you do that open your ship information window, you can open that from player properties-ship or just click the little green marker below your ship name at the bottom of the screen and go into information.
This is actually quite a complex game and takes a long time to learn it all.
EDIT: Fly into crate to pick it up again, it will automatically reinstall your shield bringing it back to the shield capacity number. |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sat Jan 25, 2014 2:47 am Post subject: |
|
|
Got it. Thanks.
I've been awake for nearly 24 hours, so I may not get to this until late tomorrow. |
|
Back to top |
|
 |
|