Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


AutoFill Address list
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
InTheAsylum
Newbie cheater
Reputation: 0

Joined: 02 Aug 2013
Posts: 17

PostPosted: Wed Jun 04, 2025 10:16 pm    Post subject: AutoFill Address list Reply with quote

Finding the addresses is easy enough. Scan narrows it down to 1 address. It's a list of 32 addresses. Addresses change with each boot of the game, the distance between is always the same, hex:10. Need a way to quickly populate the list after finding the first items address.
Tired of manually adding each address every time I load the game.
First items address: 713347B0
Second items address: 713347C0

_________________
Crazy and loving it
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 36

Joined: 16 Feb 2017
Posts: 1511

PostPosted: Thu Jun 05, 2025 2:44 am    Post subject: Reply with quote

With a little research, you may come across a solution from @ParkourPenguin.
https://forum.cheatengine.org/viewtopic.php?p=5614541#5614541

use:
Code:
addMoreAddresses("713347B0", 32, 16)

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
InTheAsylum
Newbie cheater
Reputation: 0

Joined: 02 Aug 2013
Posts: 17

PostPosted: Thu Jun 05, 2025 1:03 pm    Post subject: Reply with quote

AylinCE wrote:
With a little research, you may come across a solution from @ParkourPenguin.
https://forum.cheatengine.org/viewtopic.php?p=5614541#5614541

use:
Code:
addMoreAddresses("713347B0", 32, 16)


I tried that already. I did search the forums a little before posting.
I get an error about an expected '<name>' or '...' after the address
Wanted to avoid necro bumping as the other thread is 10 years old.

_________________
Crazy and loving it
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 36

Joined: 16 Feb 2017
Posts: 1511

PostPosted: Thu Jun 05, 2025 3:24 pm    Post subject: Reply with quote

Code:
function addMoreAddresses()
local res = "" --"713347B0-32-16"
local str=inputQuery('Address Multiplexer','Write: Address-Step-Byte', res)
  if str then
     --print(str)
     local baseAddress, num, step = str:match("(.-)%-(.-)%-(.*)")
     --print(baseAddress, num, step)
     if baseAddress~=nil or num~=nil or step~=nil then
        local al = getAddressList()
        baseAddress = tonumber(baseAddress,16)

        for i=0,num-1 do
            local rec = al.createMemoryRecord()
            rec.setAddress(string.format("%X",baseAddress+step*i))
            rec.setType(2) -- List: CE>>Value Type: 0-Byte..1-2 Bytes..2-4 Bytes...
            rec.setDescription("Desc_"..i)
        end
     end
  end
end

addMoreAddresses()


This method works fine for me.

In the input query that opens, type: Address-addition count-byte and confirm.
In your case, the query will be: 713347B0-32-16

Of course, the address list type will be 4 bytes by default.
To edit this, see the relevant inactive line.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
InTheAsylum
Newbie cheater
Reputation: 0

Joined: 02 Aug 2013
Posts: 17

PostPosted: Fri Jun 06, 2025 12:08 am    Post subject: Reply with quote

works like a dream. thanks for the help.
_________________
Crazy and loving it
Back to top
View user's profile Send private message
yadamon
How do I cheat?
Reputation: 0

Joined: 15 Mar 2025
Posts: 9

PostPosted: Fri Jun 06, 2025 3:02 am    Post subject: Reply with quote

AylinCE wrote:
Code:
function addMoreAddresses()
local res = "" --"713347B0-32-16"
local str=inputQuery('Address Multiplexer','Write: Address-Step-Byte', res)
  if str then
     --print(str)
     local baseAddress, num, step = str:match("(.-)%-(.-)%-(.*)")
     --print(baseAddress, num, step)
     if baseAddress~=nil or num~=nil or step~=nil then
        local al = getAddressList()
        baseAddress = tonumber(baseAddress,16)

        for i=0,num-1 do
            local rec = al.createMemoryRecord()
            rec.setAddress(string.format("%X",baseAddress+step*i))
            rec.setType(2) -- List: CE>>Value Type: 0-Byte..1-2 Bytes..2-4 Bytes...
            rec.setDescription("Desc_"..i)
        end
     end
  end
end

addMoreAddresses()


This method works fine for me.

In the input query that opens, type: Address-addition count-byte and confirm.
In your case, the query will be: 713347B0-32-16

Of course, the address list type will be 4 bytes by default.
To edit this, see the relevant inactive line.


In this code, what should I do if the address part is `process.exe+5FF0` or `[process.exe+5FF0]+1000` ?
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 36

Joined: 16 Feb 2017
Posts: 1511

PostPosted: Fri Jun 06, 2025 6:31 am    Post subject: Reply with quote

yadamon wrote:

In this code, what should I do if the address part is `process.exe+5FF0` or `[process.exe+5FF0]+1000` ?


This is something I'm not very familiar with.
You need to test the code yourself.
You write the result here. Smile
Code:
function addMoreAddresses()
    local res = ""
    local str = inputQuery('Address Multiplexer', 'Write: Address-Step-Byte', res)
    if str then
        local baseAddressStr, num, step = str:match("(.-)%-(.-)%-(.*)")
        if baseAddressStr ~= nil and num ~= nil and step ~= nil then
            local al = getAddressList()

            local offTbl = {} -- Table to store offsets
            if string.find(baseAddressStr, "%+") then
                -- Processing a pointer format address
                baseAddressStr = baseAddressStr:gsub("%[", ""):gsub("%]", "")
                for w in baseAddressStr:gmatch("[^+]+") do
                    table.insert(offTbl, w)
                end
               
                local basePtr = offTbl[1]  -- Main pointer address
                table.remove(offTbl, 1)    -- Remove the first address, leaving only offsets
                local offsetCount = #offTbl + 1  -- Added offsets + step value

                for i = 0, num - 1 do
                    local rec = al.createMemoryRecord()
                    rec.setAddress(basePtr)
                    rec.setOffsetCount(offsetCount)

                    -- Add offsets in Cheat Engine-compatible format
                    for j = 1, #offTbl do
                        rec.setOffset(j - 1, tonumber(offTbl[j], 16))
                    end
                    rec.setOffset(offsetCount - 1, tonumber(step)) -- Adding the final offset
                    rec.setDescription("Desc_" .. i)
                end
            else
                -- If it's a normal hex address
                local baseAddress = tonumber(baseAddressStr, 16)
                for i = 0, num - 1 do
                    local rec = al.createMemoryRecord()
                    rec.setAddress(string.format("%X", baseAddress + (step * i)))
                    rec.setType(2)
                    rec.setDescription("Desc_" .. i)
                end
            end
        end
    end
end

addMoreAddresses()


Input text, test: [msedge.exe+5FF0]+1000-5-16

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
yadamon
How do I cheat?
Reputation: 0

Joined: 15 Mar 2025
Posts: 9

PostPosted: Fri Jun 06, 2025 10:20 am    Post subject: Reply with quote

AylinCE wrote:


This is something I'm not very familiar with.
You need to test the code yourself.
You write the result here. :)
Code:
function addMoreAddresses()
    local res = ""
    local str = inputQuery('Address Multiplexer', 'Write: Address-Step-Byte', res)
    if str then
        local baseAddressStr, num, step = str:match("(.-)%-(.-)%-(.*)")
        if baseAddressStr ~= nil and num ~= nil and step ~= nil then
            local al = getAddressList()

            local offTbl = {} -- Table to store offsets
            if string.find(baseAddressStr, "%+") then
                -- Processing a pointer format address
                baseAddressStr = baseAddressStr:gsub("%[", ""):gsub("%]", "")
                for w in baseAddressStr:gmatch("[^+]+") do
                    table.insert(offTbl, w)
                end
               
                local basePtr = offTbl[1]  -- Main pointer address
                table.remove(offTbl, 1)    -- Remove the first address, leaving only offsets
                local offsetCount = #offTbl + 1  -- Added offsets + step value

                for i = 0, num - 1 do
                    local rec = al.createMemoryRecord()
                    rec.setAddress(basePtr)
                    rec.setOffsetCount(offsetCount)

                    -- Add offsets in Cheat Engine-compatible format
                    for j = 1, #offTbl do
                        rec.setOffset(j - 1, tonumber(offTbl[j], 16))
                    end
                    rec.setOffset(offsetCount - 1, tonumber(step)) -- Adding the final offset
                    rec.setDescription("Desc_" .. i)
                end
            else
                -- If it's a normal hex address
                local baseAddress = tonumber(baseAddressStr, 16)
                for i = 0, num - 1 do
                    local rec = al.createMemoryRecord()
                    rec.setAddress(string.format("%X", baseAddress + (step * i)))
                    rec.setType(2)
                    rec.setDescription("Desc_" .. i)
                end
            end
        end
    end
end

addMoreAddresses()


Input text, test: [msedge.exe+5FF0]+1000-5-16


Maybe the translation wasn't done well at first. Sorry.

It doesn't work.
When I input `process.exe+offsetA-count-byte`, it is entered as
pointer : process.exe,
1st offset : byte,
2nd offset : offsetA
..., and address is not process.exe+offsetA.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 36

Joined: 16 Feb 2017
Posts: 1511

PostPosted: Fri Jun 06, 2025 11:45 am    Post subject: Reply with quote

Here is a code that produces the results seen in the attached image:

Code:
function addMoreAddresses()
    local res = ""
    local str = inputQuery('Address Multiplexer', 'Write: Address-Step-Byte', res)
    if str then
        local baseAddressStr, num, step = str:match("(.-)%-(.-)%-(.*)")
        if baseAddressStr ~= nil and num ~= nil and step ~= nil then
            local al = getAddressList()
            local offTbl = {} -- Table to store offsets

            -- If the address is in brackets, extract and process it
            local basePtr, baseAddressStr1= baseAddressStr:match("%[(.-)%](.*)") -- Extract content inside brackets
            if basePtr then
                baseAddressStr1 = baseAddressStr1:gsub("%[", ""):gsub("%]", "")

                for w in baseAddressStr1:gmatch("%+(%x+)") do  -- Extract offsets
                    table.insert(offTbl, tonumber(w, 16)) -- Convert offsets to numbers
                    print(w)
                end
                for i = 0, num - 1 do
                    local rec = al.createMemoryRecord()
                    rec.setAddress(basePtr) -- Set pointer address
                    rec.setOffsetCount(#offTbl + 1) -- Offset count (including step)

                -- Apply extracted offsets
                   for j = 1, #offTbl do
                       rec.setOffset(j - 1, offTbl[j])
                   end

                       rec.setOffset(#offTbl, tonumber(step * i)) -- Add final step offset
                       rec.setDescription("Desc_"..i)
                end
            else
                -- If it's a normal hex address
                local baseAddress = tonumber(baseAddressStr, 16)
                for i = 0, num - 1 do
                    local rec = al.createMemoryRecord()
                    rec.setAddress(string.format("%X", baseAddress + (step * i)))
                    rec.setType(2)
                    rec.setDescription("Desc_" .. i)
                end
            end
        end
    end
end

addMoreAddresses()

-- [msedge.exe+5FF0]+1000+120-5-16
-- [msedge.exe+1CBBA78]+308]+8]+0]+1A8]+28-5-16


Result (copy):

[msedge.exe+1CBBA78]+308]+8]+0]+1A8]+28
Code:
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
  <CheatEntries>
    <CheatEntry>
      <ID>3</ID>
      <Description>"Desc_0"</Description>
      <VariableType>4 Bytes</VariableType>
      <Address>msedge.exe+1CBBA78</Address>
      <Offsets>
        <Offset>308</Offset>
        <Offset>8</Offset>
        <Offset>0</Offset>
        <Offset>1A8</Offset>
        <Offset>28</Offset>
        <Offset>10</Offset>
      </Offsets>
    </CheatEntry>
  </CheatEntries>
</CheatTable>



Ekr2.PNG
 Description:
 Filesize:  27.71 KB
 Viewed:  1431 Time(s)

Ekr2.PNG



_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
yadamon
How do I cheat?
Reputation: 0

Joined: 15 Mar 2025
Posts: 9

PostPosted: Fri Jun 06, 2025 9:50 pm    Post subject: Reply with quote

I would like it to look like this:

Part 1:
Input: process.exe+offset-count-skipbyte or modules.dll+offset-count-skipbyte
Output:
Desc_0 Address: process.exe+offset or modules.dll+offset
Desc_1 Address: process.exe+offset+skipbyte or modules.dll+offset+skipbyte
Desc_2 Address: process.exe+offset+skipbyte*2 or modules.dll+offset+skipbyte*2

Part 2:
Input: [process.exe+offsetA]+offsetB-count-skipbyte or [modules.dll+offsetA]+offsetB-count-skipbyte
Output:
Desc_0
Pointer: process.exe+offsetA or modules.dll+offsetA
1st offset: offsetB
2nd offset: 0
Desc_1
Pointer: process.exe+offsetA or modules.dll+offsetA
1st offset: offsetB
2nd offset: skipbyte
Desc_2
Pointer: process.exe+offsetA or modules.dll+offsetA
1st offset: offsetB
2nd offset: skipbyte*2

Part 3:
Input: [[process.exe+offsetA]+offsetB]+offsetC-count-skipbyte or [[modules.dll+offsetA]+offsetB]+offsetC-count-skipbyte
Output:
Desc_0
Pointer: process.exe+offsetA or modules.dll+offsetA
1st offset: offsetB
2nd offset: offsetC
3rd offset: 0
Desc_1
Pointer: process.exe+offsetA or modules.dll+offsetA
1st offset: offsetB
2nd offset: offsetC
3rd offset: skipbyte
Desc_2
Pointer: process.exe+offsetA or modules.dll+offsetA
1st offset: offsetB
2nd offset: offsetC
3rd offset: skipbyte*2

Thank you very much.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 36

Joined: 16 Feb 2017
Posts: 1511

PostPosted: Sat Jun 07, 2025 4:46 am    Post subject: Reply with quote

You can test pointer version and address version.

By default, pointer version is opened for the following addresses: "msedge.exe+5F80-5-16"

Code:
function addMoreAddresses()
    local res = ""
    local str = inputQuery('Address Multiplexer', 'Write: Address-Step-Byte', res)
    if str then
        local baseAddressStr, num, step = str:match("(.-)%-(.-)%-(.*)")
        if baseAddressStr ~= nil and num ~= nil and step ~= nil then
            local al = getAddressList()
            local offTbl = {} -- Table to store offsets

            if string.find(baseAddressStr, "%]") or string.find(baseAddressStr, "%[") then
               local basePtr, baseAddressStr1= baseAddressStr:match("%[(.-)%](.*)") -- Extract content inside brackets
               if basePtr then
                  baseAddressStr1 = baseAddressStr1:gsub("%[", ""):gsub("%]", "")

                  for w in baseAddressStr1:gmatch("%+(%x+)") do  -- Extract offsets
                      table.insert(offTbl, tonumber(w, 16)) -- Convert offsets to numbers
                      print(w)
                  end
                  for i = 0, num - 1 do
                      local rec = al.createMemoryRecord()
                      rec.setAddress(basePtr) -- Set pointer address
                      rec.setOffsetCount(#offTbl + 1) -- Offset count (including step)

                      -- Apply extracted offsets
                      for j = 1, #offTbl do
                          rec.setOffset(j - 1, offTbl[j])
                      end

                       rec.setOffset(#offTbl, tonumber(step * i)) -- Add final step offset
                       rec.setDescription("Desc_"..i)
                  end
               end
            else
                --============================================================--
                -- pointer version: msedge.exe+5F80-5-16
                if string.find(baseAddressStr, "%+") then
                   for i = 0, num - 1 do
                      local rec = al.createMemoryRecord()
                      rec.setAddress(baseAddressStr)
                      rec.setOffsetCount(1)
                      rec.setOffset(0, tonumber(step * i))
                       rec.setDescription("Desc_"..i)
                   end
                else
                    baseAddress = tonumber(baseAddressStr, 16)
                    for i = 0, num - 1 do
                        local rec = al.createMemoryRecord()
                        rec.setAddress(string.format("%X", baseAddress + (step * i)))
                        rec.setType(2)
                        rec.setDescription("Desc_" .. i)
                    end
                end
                --============================================================--
                --============================================================--
                -- Address version: msedge.exe+5F80-5-16
                --local baseAddress
                --if string.find(baseAddressStr, "%+") then
                --   baseAddress = getAddress(baseAddressStr)
                --else
                --   baseAddress = tonumber(baseAddressStr, 16)
                --end
                --for i = 0, num - 1 do
                --    local rec = al.createMemoryRecord()
                --    rec.setAddress(string.format("%X", baseAddress + (step * i)))
                --    rec.setType(2)
                --    rec.setDescription("Desc_" .. i)
                --end
                --============================================================--
            end
        end
    end
end

addMoreAddresses()

-- 7D9362C2EF-5-16
-- msedge.exe+5F80-5-16 -->> Address or Pointer version..
-- [msedge.exe+5FF0]+1000+120-5-16
-- [msedge.exe+1CBBA78]+308]+8]+0]+1A8]+28-5-16

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
yadamon
How do I cheat?
Reputation: 0

Joined: 15 Mar 2025
Posts: 9

PostPosted: Sat Jun 07, 2025 8:31 am    Post subject: Reply with quote

I don't get the results I want.

I don't know what's wrong.

Sometimes I get an error like this:

--------------------------------------------------------------------------------------------------
Error:[string "function addMoreAddresses()
..."]:48: attempt to perform arithmetic on a string value (local 'step')

stack traceback:

[string "function addMoreAddresses()
..."]:48: in function 'addMoreAddresses'

[string "function addMoreAddresses()
..."]:74: in main chunk
---------------------------------------------------------------------------------------

Is there a problem with the way I'm running the table Lua?
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 36

Joined: 16 Feb 2017
Posts: 1511

PostPosted: Sat Jun 07, 2025 9:22 am    Post subject: Reply with quote

The function was tested with the following types of queries:

-- 7D9362C2EF-5-16
-- msedge.exe+5F80-5-16 -->> Address or Pointer version..
-- [msedge.exe+5FF0]+1000+120-5-16
-- [msedge.exe+1CBBA78]+308]+8]+0]+1A8]+28-5-16

What to watch out for;
Send data continuously from the end to the beginning with 3 distinctions as follows;

Last: Byte to be added (With a number. Not in hex)
Middle: How many floors to be added. (Including the main address and in a number.)
Head: Address and offsets if any. (All square brackets except those around the address will be ignored.)
(Example types tested are given above.)

"-" (Minus, dash): Used only to separate the address, number of lines and bytes to be added.
Do not leave any spaces between.
Specify the number of lines and bytes to be added as numbers, not in hex.

( I can imagine this could be done using less lua.
But my opinion is in favor of lua. Smile )

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
yadamon
How do I cheat?
Reputation: 0

Joined: 15 Mar 2025
Posts: 9

PostPosted: Sat Jun 07, 2025 5:23 pm    Post subject: Reply with quote

AylinCE wrote:
The function was tested with the following types of queries:

-- 7D9362C2EF-5-16
-- msedge.exe+5F80-5-16 -->> Address or Pointer version..
-- [msedge.exe+5FF0]+1000+120-5-16
-- [msedge.exe+1CBBA78]+308]+8]+0]+1A8]+28-5-16

What to watch out for;
Send data continuously from the end to the beginning with 3 distinctions as follows;

Last: Byte to be added (With a number. Not in hex)
Middle: How many floors to be added. (Including the main address and in a number.)
Head: Address and offsets if any. (All square brackets except those around the address will be ignored.)
(Example types tested are given above.)

"-" (Minus, dash): Used only to separate the address, number of lines and bytes to be added.
Do not leave any spaces between.
Specify the number of lines and bytes to be added as numbers, not in hex.

( I can imagine this could be done using less lua.
But my opinion is in favor of lua. :) )


I found that if the process name included in the address contains `-` (like game-2-3.dll), it may not be possible to execute it.

In this Lua script,
[modules.dll+ABC0DEF0]+200+100 and [[modules.dll+ABC0DEF0]+200]+100 have the same meaning?

From my perspective,

[modules.dll+ABC0DEF0]+200+100 ... adding 200+100 to the pointer to modules.dll+ABC0DEF0

[[modules.dll+ABC0DEF0]+200]+100 ... adding 100 to the pointer obtained by adding 200 to the pointer to modules.dll+ABC0DEF0

Thank you in advance.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 36

Joined: 16 Feb 2017
Posts: 1511

PostPosted: Sat Jun 07, 2025 6:25 pm    Post subject: Reply with quote

Below is the edited code that ignores the hyphen (-) between the process text.
Code:
function addMoreAddresses()
    local res = ""
    local str = inputQuery('Address Multiplexer', 'Write: Address-Step-Byte', res)
    if str then
        local baseAddressStr, num, step = str:match("(.+)%-(%d+)%-(%d+)$")
        if baseAddressStr ~= nil and num ~= nil and step ~= nil then
            local al = getAddressList()
            local offTbl = {} -- Table to store offsets

            if string.find(baseAddressStr, "%]") or string.find(baseAddressStr, "%[") then
               local basePtr, baseAddressStr1= baseAddressStr:match("%[(.-)%](.*)") -- Extract content inside brackets
               if basePtr then
                  baseAddressStr1 = baseAddressStr1:gsub("%[", ""):gsub("%]", "")

                  for w in baseAddressStr1:gmatch("%+(%x+)") do  -- Extract offsets
                      table.insert(offTbl, tonumber(w, 16)) -- Convert offsets to numbers
                      print(w)
                  end
                  for i = 0, num - 1 do
                      local rec = al.createMemoryRecord()
                      rec.setAddress(basePtr) -- Set pointer address
                      rec.setOffsetCount(#offTbl + 1) -- Offset count (including step)

                      -- Apply extracted offsets
                      for j = 1, #offTbl do
                          rec.setOffset(j - 1, offTbl[j])
                      end

                       rec.setOffset(#offTbl, tonumber(step * i)) -- Add final step offset
                       rec.setDescription("Desc_"..i)
                  end
               end
            else
                --============================================================--
                -- pointer version: msedge.exe+5F80-5-16
                if string.find(baseAddressStr, "%+") then
                   for i = 0, num - 1 do
                      local rec = al.createMemoryRecord()
                      rec.setAddress(baseAddressStr)
                      rec.setOffsetCount(1)
                      rec.setOffset(0, tonumber(step * i))
                       rec.setDescription("Desc_"..i)
                   end
                else
                    baseAddress = tonumber(baseAddressStr, 16)
                    for i = 0, num - 1 do
                        local rec = al.createMemoryRecord()
                        rec.setAddress(string.format("%X", baseAddress + (step * i)))
                        rec.setType(2)
                        rec.setDescription("Desc_" .. i)
                    end
                end
                --============================================================--
                --============================================================--
                -- Address version: msedge.exe+5F80-5-16
                --local baseAddress
                --if string.find(baseAddressStr, "%+") then
                --   baseAddress = getAddress(baseAddressStr)
                --else
                --   baseAddress = tonumber(baseAddressStr, 16)
                --end
                --for i = 0, num - 1 do
                --    local rec = al.createMemoryRecord()
                --    rec.setAddress(string.format("%X", baseAddress + (step * i)))
                --    rec.setType(2)
                --    rec.setDescription("Desc_" .. i)
                --end
                --============================================================--
            end
        end
    end
end

addMoreAddresses()

-- test:
-- 7D9362C2EF-5-16
-- netflix-x86_64.exe+5F80-5-16 -->> Address or Pointer version..
-- [msedge.exe+5FF0]+1000+120-5-16
-- [msedge.exe+1CBBA78]+308]+8]+0]+1A8]+28-5-16


And as I mentioned at the beginning, with the pointer structure that I am not very familiar with;

"[modules.dll+ABC0DEF0]+200+100" this order and "[[modules.dll+ABC0DEF0]+200]+100" this order will be processed with the same results.

Of course, for the code to work properly, 1 square bracket should be left at the beginning.

"[modules.dll+ABC0DEF0]+200]+100"

"[modules.dll+ABC0DEF0]+200]+100-5-16"
The resulting copy of this query will be as outlined below:
Code:
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"Desc_0"</Description>
      <VariableType>4 Bytes</VariableType>
      <Address>modules.dll+ABC0DEF0</Address>
      <Offsets>
        <Offset>200</Offset>
        <Offset>100</Offset>
        <Offset>0</Offset>
      </Offsets>
    </CheatEntry>
    <CheatEntry>
      <ID>1</ID>
      <Description>"Desc_1"</Description>
      <VariableType>4 Bytes</VariableType>
      <Address>modules.dll+ABC0DEF0</Address>
      <Offsets>
        <Offset>200</Offset>
        <Offset>100</Offset>
        <Offset>10</Offset>
      </Offsets>
    </CheatEntry>
    <CheatEntry>
      <ID>2</ID>
      <Description>"Desc_2"</Description>
      <VariableType>4 Bytes</VariableType>
      <Address>modules.dll+ABC0DEF0</Address>
      <Offsets>
        <Offset>200</Offset>
        <Offset>100</Offset>
        <Offset>20</Offset>
      </Offsets>
    </CheatEntry>
    <CheatEntry>
      <ID>3</ID>
      <Description>"Desc_3"</Description>
      <VariableType>4 Bytes</VariableType>
      <Address>modules.dll+ABC0DEF0</Address>
      <Offsets>
        <Offset>200</Offset>
        <Offset>100</Offset>
        <Offset>30</Offset>
      </Offsets>
    </CheatEntry>
    <CheatEntry>
      <ID>4</ID>
      <Description>"Desc_4"</Description>
      <VariableType>4 Bytes</VariableType>
      <Address>modules.dll+ABC0DEF0</Address>
      <Offsets>
        <Offset>200</Offset>
        <Offset>100</Offset>
        <Offset>40</Offset>
      </Offsets>
    </CheatEntry>
  </CheatEntries>
</CheatTable>


yadamon wrote:

In this Lua script,
[modules.dll+ABC0DEF0]+200+100 and [[modules.dll+ABC0DEF0]+200]+100 have the same meaning?

Yes, it means the same thing in the existing code.

yadamon wrote:
From my perspective,

[modules.dll+ABC0DEF0]+200+100 ... adding 200+100 to the pointer to modules.dll+ABC0DEF0

[[modules.dll+ABC0DEF0]+200]+100 ... adding 100 to the pointer obtained by adding 200 to the pointer to modules.dll+ABC0DEF0


If this is necessary I guess I can add it in the next version.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites