Created
February 15, 2020 06:19
-
-
Save skywalkerytx/7d7ad8eb472ba739c76b08c7f02c95b0 to your computer and use it in GitHub Desktop.
rpg maker MV DataTypes for cheat engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://hyacg.com/thread-176459-1-1.html | |
typename="RPG maker MV" | |
bytecount=4 --number of bytes of this type | |
functionbasename="RPGMakerMV" | |
function RPGMakerMV_bytestovalue(b1,b2,b3,b4,address) | |
local DataAddress=3+(b1+b2*256+b3*65536+b4*16777216); | |
if ((DataAddress)%4 ~= 0 or DataAddress<0x1000) then --return 0 if DataAddress isn't a valid 32bit aligned address | |
return 0 | |
else | |
return readDouble(DataAddress) --return (double) [address]+3 | |
end | |
end | |
function RPGMakerMV_valuetobytes(i,address) | |
local OriginalValue=readInteger(address) | |
local ReturnValue=dwordToByteTable(OriginalValue); | |
writeDouble(OriginalValue+3,i) --write i at [address]+3 | |
return ReturnValue[1],ReturnValue[2],ReturnValue[3],ReturnValue[4] | |
end | |
return typename,bytecount,functionbasename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment