View Single Post
  #12501    
Old November 29th, 2009 (05:05 PM).
Chicken Bones Chicken Bones is offline
Hacks 4 fun
 
Join Date: Nov 2009
Posts: 18
Quote:
I want to know if it's possible to change the binary rom data with a script. (Change the hex value at E40500 to A3)
Quote:

Maybe you have to create an ASM to do that and call it with a script?

Please tell me the command or if it's ASM.
Quote originally posted by HackMew:
FYI, ROM means Read Only Memory. So it can't be changed through ASM (or a script or whatever).
Quote:
If you mean changing a value in the RAM during gameplay, then yes, there is a script command...
In XSE, it is called writebytetooffset

It is written like this...

writebytetooffset 0xoffset 0xvalue


Your offset would look like this...
writebytetooffset 0xE40500 0xA3

Keep in mind that the effects of this command are NOT permanent changes to the ROM, and if the areas in the RAM you changed, get cleared or changed by the computer, your changes will be erased. (Like if you change your player's OW with writeBytetooffset, then enter a building, your OW will change back to normal.)
Ok Here's what I wan't to do I'm adding an extra bit to a game (Not Overwriting) or at least trying to. I have a trainer sprite imported with UNLZ-GBA and an extra trainer with sydney's sprite. I know where the pointers are and how to change them but I wan't to know if it's possible to have a script that changes the bytes at the offset, battles the trainer then changes them back.

So change E40050 to A3 (change part of pointer) battle trainer with different sprite due to pointer change and change E40050 to 1F (change back).