|6th July 2013, 01:14 AM||#1|
What does this button do?.....
Join Date: Feb 2013
How to Change the Start Map with a Hex Editor (FireRed only)
(I'll type it too, so hopefully searching the error in Google will find this page)
Run-time error '380':
Invalid property value
I will explain what caused this error in a little bit, but first, let's do what SMCA can do with a Hex editor. I personally recommend HxD for this.
So, here are your offsets:
(These are taken from the source code of SMCA, except for the y-coordinate, which I had to find myself, only later realizing JPAN had documented it in his notes for the first Hacked Engine release.)
So, it is as simple as changing those bytes to match what you want the starting players location to be. Remember, everything is in Hex.
Now, you will notice I did not tell you how to change the player facing. In a standard, unhacked FireRed, the location for the player facing is 0x168CCB and here is a key:
As you can see, this location has been removed by JPAN. It was a map script and in his hacked engine, all scripts are removed. This is what caused the error in SMCA. It was looking for either a 01, 02, 03, or 04 at offset 0x168CCB, but instead got an FF.
Thanks to DrFuji, we now know how to add this feature back in.
Here is the script we are going to use:
#Dynamic 0x800000 #org @start spriteface 0xFF 0x(refer to above key for direction) setvar 0x4056 0x1 end
Now, just insert this script into the Map Script section of the Header of your start map in Advance Map:
Script Offset 2: @start (from the script)
|change, editor, firered, hex, issues, jpan's engine, jpans engine, map, smca, start, start map, [Tutorial]|