Page 2 of 2
Re: Creating a cheat table for mono Unity roguelike game.
Posted: Wed Dec 25, 2024 1:37 am
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.
Re: Creating a cheat table for mono Unity roguelike game.
Posted: Wed Dec 25, 2024 9:44 pm
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)
Re: Creating a cheat table for mono Unity roguelike game.
Posted: Thu Jan 02, 2025 12:55 pm
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.