| View previous topic :: View next topic |
| Author |
Message |
Psiho_c Newbie cheater
Reputation: 0
Joined: 11 Feb 2016 Posts: 17
|
Posted: Thu Feb 11, 2016 1:17 pm Post subject: How can I change the first offset of multiple pointers? |
|
|
I currently have pointers for one character (game)
Current HP
Max HP
ATK
DEF
And so on
The next character has the same address +2
Meaning if the First Characters Pointer for HP is
XX2 - Offset 1
YYY - Offset 2
ZZZ - Offset 3
Second Characters HP
XX4 - Offset 1
YYY - Offset 2
ZZZ - Offset 3
Third Characters HP
XX6 - Offset 1
YYY - Offset 2
ZZZ - Offset 3
If all character's stats were JUST addresses and not pointers I would just copy paste. then use the Change Address to add 2 value to the new address. But this does not work with the Pointers.
So, how can I change the TOP offset of multiple pointers without manually going to each on separately? |
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4718
|
Posted: Thu Feb 11, 2016 1:37 pm Post subject: |
|
|
You can use Lua. Look up the MemoryRecord class and the AddressList class inside main.lua. _________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Thu Feb 11, 2016 2:13 pm Post subject: |
|
|
If none of the offsets match the first one's value, copy the group of pointers and paste them into NotePad.
Do a Replace All to change <Offset>XX2</Offset> to <Offset>XX4</Offset>
You could also adjust the way your table uses those pointers.
If you drag and drop one address over top of another, you can simply define the base address as "+4".
That child entry will then count its address as equaling +4 of the parent's address.
You can use that same notation as the base of a pointer as well. |
|
| Back to top |
|
 |
Psiho_c Newbie cheater
Reputation: 0
Joined: 11 Feb 2016 Posts: 17
|
Posted: Thu Feb 11, 2016 7:03 pm Post subject: |
|
|
| ParkourPenguin wrote: | | You can use Lua. Look up the MemoryRecord class and the AddressList class inside main.lua. |
I'm pretty much a complete noob when it comes to scripts and coding. Sorry. I found the Reference Manual link you have posted on another topic about Lua tutorial, it still does not help me since I don't know left and right from it.
| Zanzer wrote: | If none of the offsets match the first one's value, copy the group of pointers and paste them into NotePad.
Do a Replace All to change <Offset>XX2</Offset> to <Offset>XX4</Offset>
You could also adjust the way your table uses those pointers.
If you drag and drop one address over top of another, you can simply define the base address as "+4".
That child entry will then count its address as equaling +4 of the parent's address.
You can use that same notation as the base of a pointer as well. |
Wow, I did not know I can use it like this in a notepad. I will make a little table to make it even more clear.
Currently, the notepad one is not good. Since I started the topic to find a way to make changing the first offset faster. In the game, there are 50 characters ( too many to count, but I want to do it and post it so other can have it). So each character has
Cha1 - current HP, Max Hp, Attack, Def, Exp, Level, Magic, and another 8 states.
Character 2 has everything exactly the same but the first offset is with 2 more.
Basically, it will take me ages to replace the last digital for each offset even with the find function.
About the +4 base address ( yes, I'm sorry I don't know not even so much), do you mean right click and select "Recalculate new address"? As that one, I did try before with no luck. I know at least about the drag and drop to create children part.
Here is a little table for demonstration only of what I need to change. In case it matter, the game uses 2-byte addresses
Character 1_______________________________Character 2
HP_________________________________________HP
<Offsets>___________________________________<Offsets>
<Offset>4E2</Offset>_______________________<Offset>4E4</Offset>
<Offset>10</Offset>________________________<Offset>10</Offset>
<Offset>B38C</Offset>_____________________<Offset>B38C</Offset>
</Offsets>_________________________________</Offsets>
Max HP__________________________________ Max HP
<Offsets>___________________________________<Offsets>
<Offset>54A</Offset>_______________________<Offset>54C</Offset>
<Offset>10</Offset>________________________<Offset>10</Offset>
<Offset>B38C</Offset>_____________________<Offset>B38C</Offset>
</Offsets>_________________________________</Offsets>
Last edited by Psiho_c on Thu Feb 11, 2016 7:20 pm; edited 1 time in total |
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Thu Feb 11, 2016 7:16 pm Post subject: |
|
|
Ctrl+Alt+L | Code: | local list = getAddressList()
for i = 0, list.Count - 1 do
local rec = list[i]
if rec.OffsetCount > 0 then
rec.Offset[0] = rec.Offset[0] + 2
end
end |
|
|
| Back to top |
|
 |
Psiho_c Newbie cheater
Reputation: 0
Joined: 11 Feb 2016 Posts: 17
|
Posted: Thu Feb 11, 2016 8:32 pm Post subject: |
|
|
| Zanzer wrote: | Ctrl+Alt+L | Code: | local list = getAddressList()
for i = 0, list.Count - 1 do
local rec = list[i]
if rec.OffsetCount > 0 then
rec.Offset[0] = rec.Offset[0] + 2
end
end |
|
Thank you so much
This is exactly what I needed  |
|
| Back to top |
|
 |
|