Creating a cheat table for mono Unity roguelike game.

Accessing a variable that will work on closing and opening and on each run

A dedicated forum for support, assistance, and quick help on using Cheat Engine usage.


User avatar
bbfox
Table Master
Table Master
Journeyman Hacker
Journeyman Hacker
Posts: 365
Joined: Sat Jul 23, 2022 8:59 am
Answers: 0
x 772

Re: Creating a cheat table for mono Unity roguelike game.

Post by bbfox »

Any method that if you can make sure the base pointer addresses are for your chars -- I think that's enough.
I often get character base address from AOB #1, and use it in AOB #2. This is normal in shared code.


Table is free to use, but need to leave the author's name and source URL: https://opencheattables.com.
Table will not be up-to-date. Feel free to modify it, but leave credit to the source.
Tip me a coffee? https://ko-fi.com/bbfoxmodding


ChronosMrk1
Curious
Curious
Posts: 9
Joined: Sun Dec 22, 2024 9:27 pm
Answers: 0

Re: Creating a cheat table for mono Unity roguelike game.

Post by ChronosMrk1 »

I think I did it. It took a long while and definitely wasn't worth it. assembly can eat my ass how tf did that mad cunt make rollercoster tycoon with this garbage

Code: Select all

[ENABLE]
alloc(newmem1,2048)
alloc(newmem2,2048)

// Declare
alloc(Athena,8)
alloc(Chiyome,8)
alloc(Diana,8)
registersymbol(Athena)
registersymbol(Chiyome)
registersymbol(Diana)

// Persistent flags
alloc(AthenaSet,1)
alloc(ChiyomeSet,1)
alloc(DianaSet,1)

AthenaSet:
db 0
ChiyomeSet:
db 0
DianaSet:
db 0

// First injection point
define(inj1,GirlsScript:ChangeStamina+A5)
define(inj2,GirlsScript:ChangeStamina+1D0)

newmem1:
// Preserve registers
pushf
push rax

mov eax, [rsi+16C]
cmp eax, 1
jne skip1

// Check girlType
mov eax, [rsi+168]
cmp eax, 0 // Athena
jne check_chiyome1
cmp byte ptr [AthenaSet], 1
je skip1 // Skip if Athena is already set
mov [Athena], rsi
mov byte ptr [AthenaSet], 1
jmp skip1

check_chiyome1:
cmp eax, 1
jne check_diana1
cmp byte ptr [ChiyomeSet], 1
je skip1
mov [Chiyome], rsi
mov byte ptr [ChiyomeSet], 1
jmp skip1

check_diana1:
cmp eax, 2
jne skip1
cmp byte ptr [DianaSet], 1
je skip1
mov [Diana], rsi
mov byte ptr [DianaSet], 1

skip1:
pop rax
popf

movss [rsi+00000170], xmm5
jmp return1

inj1:
jmp newmem1
nop
nop
nop
return1:

newmem2:
pushf
push rax

mov eax, [rsi+16C]
cmp eax, 1
jne skip2

// Debugging: Check RSI and step values
// Check girlType and only update if the symbol is unset ffs
mov eax, [rsi+168]
cmp eax, 0 // Athena
jne check_chiyome2
cmp byte ptr [AthenaSet], 1
je skip2 // Skip if Athena is already set
mov [Athena], rsi
mov byte ptr [AthenaSet], 1
jmp skip2

check_chiyome2:
cmp eax, 1 // Chiyome
jne check_diana2
cmp byte ptr [ChiyomeSet], 1
je skip2 // Skip if Chiyome is already set
mov [Chiyome], rsi
mov byte ptr [ChiyomeSet], 1
jmp skip2

check_diana2:
cmp eax, 3 // Diana
jne skip2
cmp byte ptr [DianaSet], 1
je skip2 // Skip if Diana is already set
mov [Diana], rsi
mov byte ptr [DianaSet], 1

skip2:
pop rax
popf

// Execute originol code
movss [rsi+00000170], xmm5
jmp return2

inj2:
jmp newmem2
nop
nop
nop
return2:

[DISABLE]
// Restore original code
inj1:
db F3 0F 11 AE 70 01 00 00

inj2:
db F3 0F 11 AE 70 01 00 00

unregistersymbol(Athena)
unregistersymbol(Chiyome)
unregistersymbol(Diana)
dealloc(newmem1)
dealloc(newmem2)
dealloc(Athena)
dealloc(Chiyome)
dealloc(Diana)
dealloc(AthenaSet)
dealloc(ChiyomeSet)
dealloc(DianaSet)

User avatar
Marcus101RR
Administrator
Administrator
Journeyman Hacker
Journeyman Hacker
Posts: 147
Joined: Thu Jul 21, 2022 7:43 am
Answers: 0
Location: Tampa, FL
x 252
Contact:
Marcus101RR’s avatar
Loading…

Re: Creating a cheat table for mono Unity roguelike game.

Post by Marcus101RR »

ChronosMrk1 wrote: Wed Dec 25, 2024 9:44 pm

I think I did it. It took a long while and definitely wasn't worth it. assembly can eat my ass how tf did that mad cunt make rollercoster tycoon with this garbage

Code: Select all

[ENABLE]
alloc(newmem1,2048)
alloc(newmem2,2048)

// Declare
alloc(Athena,8)
alloc(Chiyome,8)
alloc(Diana,8)
registersymbol(Athena)
registersymbol(Chiyome)
registersymbol(Diana)

// Persistent flags
alloc(AthenaSet,1)
alloc(ChiyomeSet,1)
alloc(DianaSet,1)

AthenaSet:
db 0
ChiyomeSet:
db 0
DianaSet:
db 0

// First injection point
define(inj1,GirlsScript:ChangeStamina+A5)
define(inj2,GirlsScript:ChangeStamina+1D0)

newmem1:
// Preserve registers
pushf
push rax

mov eax, [rsi+16C]
cmp eax, 1
jne skip1

// Check girlType
mov eax, [rsi+168]
cmp eax, 0 // Athena
jne check_chiyome1
cmp byte ptr [AthenaSet], 1
je skip1 // Skip if Athena is already set
mov [Athena], rsi
mov byte ptr [AthenaSet], 1
jmp skip1

check_chiyome1:
cmp eax, 1
jne check_diana1
cmp byte ptr [ChiyomeSet], 1
je skip1
mov [Chiyome], rsi
mov byte ptr [ChiyomeSet], 1
jmp skip1

check_diana1:
cmp eax, 2
jne skip1
cmp byte ptr [DianaSet], 1
je skip1
mov [Diana], rsi
mov byte ptr [DianaSet], 1

skip1:
pop rax
popf

movss [rsi+00000170], xmm5
jmp return1

inj1:
jmp newmem1
nop
nop
nop
return1:

newmem2:
pushf
push rax

mov eax, [rsi+16C]
cmp eax, 1
jne skip2

// Debugging: Check RSI and step values
// Check girlType and only update if the symbol is unset ffs
mov eax, [rsi+168]
cmp eax, 0 // Athena
jne check_chiyome2
cmp byte ptr [AthenaSet], 1
je skip2 // Skip if Athena is already set
mov [Athena], rsi
mov byte ptr [AthenaSet], 1
jmp skip2

check_chiyome2:
cmp eax, 1 // Chiyome
jne check_diana2
cmp byte ptr [ChiyomeSet], 1
je skip2 // Skip if Chiyome is already set
mov [Chiyome], rsi
mov byte ptr [ChiyomeSet], 1
jmp skip2

check_diana2:
cmp eax, 3 // Diana
jne skip2
cmp byte ptr [DianaSet], 1
je skip2 // Skip if Diana is already set
mov [Diana], rsi
mov byte ptr [DianaSet], 1

skip2:
pop rax
popf

// Execute originol code
movss [rsi+00000170], xmm5
jmp return2

inj2:
jmp newmem2
nop
nop
nop
return2:

[DISABLE]
// Restore original code
inj1:
db F3 0F 11 AE 70 01 00 00

inj2:
db F3 0F 11 AE 70 01 00 00

unregistersymbol(Athena)
unregistersymbol(Chiyome)
unregistersymbol(Diana)
dealloc(newmem1)
dealloc(newmem2)
dealloc(Athena)
dealloc(Chiyome)
dealloc(Diana)
dealloc(AthenaSet)
dealloc(ChiyomeSet)
dealloc(DianaSet)

Learning ASM isn't all that bad, remember back in the day of RollerCoaster Tycoon, coding languages were minimal, down to Visual Basic and a few others. ASM was the hit. Games are also increasingly getting larger and more complex, so ASM becomes obsolete. But for RCT it wasn't all that bad. Unity is pain to make tables for.


Post Reply