View previous topic :: View next topic |
Author |
Message |
mcpolo99 How do I cheat? Reputation: 0
Joined: 16 Jul 2020 Posts: 5
|
Posted: Sun Jun 20, 2021 7:17 am Post subject: 7 Days to Die help with lua |
|
|
Hello all!!
I have a question,
first a little context
ive been working on a cheat table for 7dtd and ive come quite far by using old cheat tables and updating them. but in the process I kind of wanted to add a few other things.
In this case it is the entire "ProgressionValueQuickList" which is huge.. and it feels like there should be a way to add all "pointers to progression values" and their names plus values directly to address table.
ive been looking around but cant seem to find anything that matches what i need (since im still am noobie in lua, i cant make out whats usefull)
so far what ive done is using mono plus a few old scripts to add a EntityPlayerLocalPNTR
then using dissect data struct on [[[EntityPlayerLocalPNTR] +5d0]+18]+0 (which is ProgressionValueQuickList)=(all skillthress)
the skill level begin at [[[[EntityPlayerLocalPNTR] +5d0]+18]+20]+20 and end at [[[[EntityPlayerLocalPNTR] +5d0]+18]+450]+20
skills increment 20>28>30>38 (on third offset, since last offset is the skill level for each skill)
skill name is at [[[[[EntityPlayerLocalPNTR] +5d0]+18]+XX]+10]+14
what I thought of is if it possible to add all those addresses with name and corresponding skill level value to the table
Another idea I had was if it is possible to like make a separate window linked directly to dissected code to skip trouble of adding every value.
I link my current table incase someone wants to help me out.
Code: |
[ENABLE]
aobscan(hookWorldUpdate,F8 48 8B F1 48 8B 86 70 01 00 00 B9) // should be unique
alloc(newmem,$1000,World:WorldEventUpdateTime+20 )
registersymbol(GameManagerPNTR)
alloc(GameManagerPNTR,8,World:WorldEventUpdateTime+20)
registersymbol(WorldPNTR)
alloc(WorldPNTR,8,World:WorldEventUpdateTime+20)
registersymbol(EntityPlayerLocalPNTR)
alloc(EntityPlayerLocalPNTR,8,World:WorldEventUpdateTime+20)
label(code)
label(return)
newmem:
mov [GameManagerPNTR],rdi
mov [WorldPNTR],rcx
mov rsi,[rcx+90]
mov [EntityPlayerLocalPNTR],rsi
code:
mov rsi,rcx
mov rax,[rsi+00000170]
jmp return
hookWorldUpdate+01:
jmp newmem
nop 5
return:
registersymbol(hookWorldUpdate)
[DISABLE]
hookWorldUpdate+01:
db 48 8B F1 48 8B 86 70 01 00 00
unregistersymbol(hookWorldUpdate)
dealloc(newmem)
unregistersymbol(GameManagerPNTR)
dealloc(GameManagerPNTR)
unregistersymbol(WorldPNTR)
dealloc(WorldPNTR)
unregistersymbol(EntityPlayerLocalPNTR)
dealloc(EntityPlayerLocalPNTR)
|
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4289
|
Posted: Sun Jun 20, 2021 11:30 am Post subject: |
|
|
Basic example of relevant API:
https://forum.cheatengine.org/viewtopic.php?p=5711626#5711626
The rest of that topic has more details.
See celua.txt for documentation (i.e. MemoryRecord Class)
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
mcpolo99 How do I cheat? Reputation: 0
Joined: 16 Jul 2020 Posts: 5
|
Posted: Sat Jul 31, 2021 7:31 am Post subject: |
|
|
ParkourPenguin wrote: | Basic example of relevant API:
The rest of that topic has more details.
See celua.txt for documentation (i.e. MemoryRecord Class) |
cant really get it to work...
|
|
Back to top |
|
|
mcpolo99 How do I cheat? Reputation: 0
Joined: 16 Jul 2020 Posts: 5
|
Posted: Thu Aug 12, 2021 8:34 am Post subject: |
|
|
ParkourPenguin wrote: | Basic example of relevant API:
The rest of that topic has more details.
See celua.txt for documentation (i.e. MemoryRecord Class) |
The thing is i am able to create like the base addres plus one o set of child addresses. but i cant figure out how to add child addresses to the already existing child addresses ..
Code: |
al = getAddressList()
local base = al.createMemoryRecord()
base.setDescription("[img]ProgressionValueQuickList[/img]")
base.Type = vtString
base.String.Size = 0
base.Address = "EntityPlayerLocalPNTR"
base.OffsetCount = 2
base.Offset[0] = 0x18
base.Offset[1] = 0x5d0
for i = 0, 9 do
local BOOK = al.createMemoryRecord()
BOOK.Type = vtDword
BOOK.Address = string.format("+%X",0)
BOOK.OffsetCount = 1
BOOK.Offset[0] = (i * 0x8)
BOOK.Description = string.format("Book")
BOOK.appendToEntry(base)
end
for a = 0x2c8, 9 do
local Value = al.createMemoryRecord()
Value.Type = vtDword
Value.Address = string.format("+%X",0)
Value.OffsetCount = 1
Value.Offset[0] = (i * 0x8)
Value.Description = string.format("+%X", a*0x8)
Value.appendToEntry(BOOK)
end
|
i want it to look like this
prnt . sc/1ng1910
but i only get this
prnt . sc/1ng1hbn
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4289
|
Posted: Thu Aug 12, 2021 11:40 am Post subject: |
|
|
Locals can't be used outside their scope. i.e. the local BOOK is declared inside that for loop, so it can't be used outside that for loop. Same thing for i
Code: | local mainHeader = AddressList.createMemoryRecord()
mainHeader.IsAddressGroupHeader = true
mainHeader.Address = 'game.exe+1234'
mainHeader.OffsetCount = 2
mainHeader.Offset[0] = 16
mainHeader.Offset[1] = 0
mainHeader.Options = '[moManualExpandCollapse]'
for i = 0, 3 do
local subHeader = AddressList.createMemoryRecord()
subHeader.appendToEntry(mainHeader)
subHeader.IsAddressGroupHeader = true
subHeader.Address = '+0'
subHeader.OffsetCount = 1
subHeader.Offset[0] = i*8
subHeader.Options = '[moManualExpandCollapse]'
for j = 0, 1 do
local memrec = AddressList.createMemoryRecord()
memrec.appendToEntry(subHeader)
memrec.Address = '+0'
memrec.Type = vtDword
memrec.OffsetCount = 1
memrec.Offset[0] = j*8
end
end | Note an address of "+0" means "use the address of the parent memory record with 0 added to it"
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
|