karatekid552
What happens if I push it?....
- 1,771
- Posts
- 12
- Years
- Do you really want to know? Really?
- Seen Jan 12, 2015
This tutorial is for FireRed hackers who use JPAN's Hacked Engine and have had the unfortunate experience of opening SMCA to get this error:
(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.)
And, here they are in HxD (on a copy of FireRed with the Hacked Engine of course):
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:
Now, let's go to that offset in the hacked copy of FireRed:
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:
Now, just insert this script into the Map Script section of the Header of your start map in Advance Map:
Settings-
Type:04
Flag:4056
Value:0000
Script Offset 2: @start (from the script)
Credits:
JPAN
HackMew
DrFuji
![[PokeCommunity.com] How to Change the Start Map with a Hex Editor (FireRed only) [PokeCommunity.com] How to Change the Start Map with a Hex Editor (FireRed only)](https://i1322.photobucket.com/albums/u563/karatekid552/SMCA_zps0c3a56b4.png)
(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.)
Bank = 0x054A04
Level = 0x054A06
X-coordinate = 0x054A08
Y-coordinate = 0x054A00
And, here they are in HxD (on a copy of FireRed with the Hacked Engine of course):
![[PokeCommunity.com] How to Change the Start Map with a Hex Editor (FireRed only) [PokeCommunity.com] How to Change the Start Map with a Hex Editor (FireRed only)](https://i1322.photobucket.com/albums/u563/karatekid552/HxDSMCA_zpsba0982b0.png)
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:
down= 01
up= 02
left= 03
right= 04
Now, let's go to that offset in the hacked copy of FireRed:
![[PokeCommunity.com] How to Change the Start Map with a Hex Editor (FireRed only) [PokeCommunity.com] How to Change the Start Map with a Hex Editor (FireRed only)](https://i1322.photobucket.com/albums/u563/karatekid552/Capture_zpsfe5680e1.png)
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:
Code:
#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:
Settings-
Type:04
Flag:4056
Value:0000
Script Offset 2: @start (from the script)
Credits:
JPAN
HackMew
DrFuji
Last edited: