View Single Post
Old February 21st, 2013 (9:16 AM). Edited February 22nd, 2013 by karatekid552.
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
    Join Date: Nov 2012
    Location: Do you really want to know? Really?
    Gender: Male
    Nature: Bold
    Posts: 1,766
    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.)

    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):

    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:

    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

    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)


    Paired with Simba
    Reply With Quote