Posted: Mon Oct 26, 2015 12:21 pm Post subject: Is it possible to generate a list of addresses?
There's hundred-ish of addresses I need to edit, each is bigger than the previous one by 24 (decimal). The first address changes each time the game is restarted, however the difference is always 24. Would it be possible to make a list that would automatically generate after specifying the starting address? Does CE have a built-in function for this or does it require scripting?
Thanks in advance.
Joined: 25 Jan 2006 Posts: 8585 Location: 127.0.0.1
Posted: Mon Oct 26, 2015 12:23 pm Post subject:
That would be something you can do with Lua pretty easily. You could also use the user defined symbols in Cheat Engine to build a table making use of a base address symbol then do the needed additions to each other entry. Then when you restart just update the one symbol and the rest will auto-adjust. _________________
Zanzer showed me a neat trick you can do. What you do is just make a header out of your base address, then set the addresses of the children to be "+number", where number is the offset from the header's address.
Here's a Lua script that'll make this for you automatically:
Code:
function addMoreAddresses(baseAddress, num, step)
local al = getAddressList()
local base = al.createMemoryRecord()
base.setAddress(baseAddress)
base.setDescription("Base Address")
base.Type = vtString
base.String.Size = 0
for i=0, num-1 do
local rec = al.createMemoryRecord()
local str = string.format("+%X", i * step)
rec.setAddress(str)
rec.setDescription(str)
rec.appendToEntry(base)
end
end
With this, you don't even need to run the Lua script every time you start up CE, just save the cheat table once and change the base address yourself when you find it. _________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum