So i found some tools and modified it for purpose of some less clean adventures.
Can it be checked that this is universal ?
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
TypeName:
db 'RPG VX type',0
ByteSize:
dd 4
ConvertRoutine:
[32-bit]
push ebp
mov ebp,esp
push ecx
mov ecx,[ebp+8]
[/32-bit]
mov eax,[ecx]
shr eax,1
[64-bit]
ret
[/64-bit]
[32-bit]
pop ecx
pop ebp
ret 4
[/32-bit]
ConvertBackRoutine:
[32-bit]
push ebp
mov ebp,esp
push edx
push ecx
mov edx,[ebp+0c]
mov ecx,[ebp+08]
[/32-bit]
push eax
push edx
mov edx,[edx]
and edx,1
mov eax,ecx /
shl eax,1
or eax,edx
pop edx
mov [edx],eax
pop eax
[64-bit]
ret
[/64-bit]
[32-bit]
pop ecx
pop edx
pop ebp
ret 8
[/32-bit]
Scan type for RPG Maker
-
- Expert Cheater
- Posts: 371
- Joined: Fri Mar 03, 2017 2:00 pm
- Reputation: 38
Re: Scan type for RPG Maker
You first have to clarify for which RPG Maker version this should be
Re: Scan type for RPG Maker
So the updated 7.0 version of Cheat Engine no longer likes this custom type.
where i got it originally ( [Link] )
Error i'm getting is:
[string "alloc(TypeName, 256)
..."]:8: syntax error near ','
...
As i am clearly uneducated enough to hijack an old thread instead of making a new one, can someone explain how to solve that particular error so i can use the handy type once more instead of 2*x+1?
where i got it originally ( [Link] )
Spoiler
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(PreferedAlignment, 4)
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
TypeName:
db 'RPG VX type',0
ByteSize:
dd 4
PreferedAlignment:
dd 1
//The convert routine should hold a routine that converts the data to an nteger (in eax)
//function declared as: stdcall int ConvertRoutine(unsigned char *input);
//Note: Keep in mind that this routine can be called by multiple threads at the same time.
ConvertRoutine:
[32-bit]
push ebp
mov ebp,esp
push ecx
mov ecx,[ebp+8]
[/32-bit]
//at this point ecx contains the address where the bytes are stored
//put the bytes into the eax register
mov eax,[ecx] //second fun fact, addressing with 32-bit registers doesn't work in 64-bit, it becomes a 64-bit automatically (most of the time)
shr eax,1 //shift right by 1 bit (divide by 2)
//and now exit the routine
[64-bit]
ret
[/64-bit]
[32-bit]
pop ecx
pop ebp
ret 4
[/32-bit]
//The convert back routine should hold a routine that converts the given integer back to a row of bytes (e.g when the user wats to write a new value)
//function declared as: stdcall void ConvertBackRoutine(int i, unsigned char *output);
ConvertBackRoutine:
[32-bit]
push ebp
mov ebp,esp
push edx //save the registers
push ecx
mov edx,[ebp+0c]
mov ecx,[ebp+08]
[/32-bit]
//at this point edx contains the address to write the value to
//and ecx contains the value
push eax
push edx
mov edx,[edx] //edx now contains the original value
and edx,1 //only save the first bit
mov eax,ecx //eax gets the user input value
shl eax,1 //shift left by 1 bit (multiply by 2)
or eax,edx //add the bits of the original value
pop edx
mov [edx],eax //write the new value into the old value
pop eax
[64-bit]
//everything is back to what it was, so exit
ret
[/64-bit]
[32-bit]
//cleanup first
pop ecx
pop edx
pop ebp
ret 8
[/32-bit]
alloc(ByteSize,4)
alloc(PreferedAlignment, 4)
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
TypeName:
db 'RPG VX type',0
ByteSize:
dd 4
PreferedAlignment:
dd 1
//The convert routine should hold a routine that converts the data to an nteger (in eax)
//function declared as: stdcall int ConvertRoutine(unsigned char *input);
//Note: Keep in mind that this routine can be called by multiple threads at the same time.
ConvertRoutine:
[32-bit]
push ebp
mov ebp,esp
push ecx
mov ecx,[ebp+8]
[/32-bit]
//at this point ecx contains the address where the bytes are stored
//put the bytes into the eax register
mov eax,[ecx] //second fun fact, addressing with 32-bit registers doesn't work in 64-bit, it becomes a 64-bit automatically (most of the time)
shr eax,1 //shift right by 1 bit (divide by 2)
//and now exit the routine
[64-bit]
ret
[/64-bit]
[32-bit]
pop ecx
pop ebp
ret 4
[/32-bit]
//The convert back routine should hold a routine that converts the given integer back to a row of bytes (e.g when the user wats to write a new value)
//function declared as: stdcall void ConvertBackRoutine(int i, unsigned char *output);
ConvertBackRoutine:
[32-bit]
push ebp
mov ebp,esp
push edx //save the registers
push ecx
mov edx,[ebp+0c]
mov ecx,[ebp+08]
[/32-bit]
//at this point edx contains the address to write the value to
//and ecx contains the value
push eax
push edx
mov edx,[edx] //edx now contains the original value
and edx,1 //only save the first bit
mov eax,ecx //eax gets the user input value
shl eax,1 //shift left by 1 bit (multiply by 2)
or eax,edx //add the bits of the original value
pop edx
mov [edx],eax //write the new value into the old value
pop eax
[64-bit]
//everything is back to what it was, so exit
ret
[/64-bit]
[32-bit]
//cleanup first
pop ecx
pop edx
pop ebp
ret 8
[/32-bit]
[string "alloc(TypeName, 256)
..."]:8: syntax error near ','
...
As i am clearly uneducated enough to hijack an old thread instead of making a new one, can someone explain how to solve that particular error so i can use the handy type once more instead of 2*x+1?
Re: Scan type for RPG Maker
The error is a Lua Error, it suggest that you paste the custum type script of AA non-LUA type in the Lua Engine.
AA script is not Lua script so the error.
To create a custom type script, one way is via a hidden ui operation.
RIGHT-CLICK [value type] of the scanner ui.
It should then show 2 options:
[define new custom type (auto assembler)]
[define new custom type (Lua)]
Choose auto assembler one as yours are in AA.
Paste your script, [OK]
Then there will be a new type [RPG VX Type] can be usable (seems no error).
When RIGHT-CLICK on this custom type will show 2 more option to Edit or Delete this type.
You can also define new custom type via only Lua scripting with recent version CE, but not detailed here.
Good luck~
AA script is not Lua script so the error.
To create a custom type script, one way is via a hidden ui operation.
RIGHT-CLICK [value type] of the scanner ui.
It should then show 2 options:
[define new custom type (auto assembler)]
[define new custom type (Lua)]
Choose auto assembler one as yours are in AA.
Paste your script, [OK]
Then there will be a new type [RPG VX Type] can be usable (seems no error).
When RIGHT-CLICK on this custom type will show 2 more option to Edit or Delete this type.
You can also define new custom type via only Lua scripting with recent version CE, but not detailed here.
Good luck~
Who is online
Users browsing this forum: No registered users