Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

TrollandToad.com
Reply
 
Thread Tools
  #1    
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.)


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

    Quote:
    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:
    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
    __________________

    Paired with Simba
    Reply With Quote

    Relevant Advertising!

      #2    
    Old February 22nd, 2013 (6:36 AM).
    hukurae's Avatar
    hukurae hukurae is offline
       
      Join Date: Aug 2009
      Gender: Male
      Posts: 10
      Wow I'm gonna try this sooooon

      thank you very much xD
      Reply With Quote
        #3    
      Old February 22nd, 2013 (8:43 AM).
      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
        Quote:
        Originally Posted by hukurae View Post
        Wow I'm gonna try this sooooon

        thank you very much xD
        You are very welcome. I hope it helps everyone out!
        __________________

        Paired with Simba
        Reply With Quote
          #4    
        Old February 22nd, 2013 (11:49 AM).
        GoGoJJTech's Avatar
        GoGoJJTech GoGoJJTech is offline
        (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
        • Gold Tier
         
        Join Date: Nov 2012
        Location: Earth
        Age: 18
        Gender: Female
        Nature: Jolly
        Posts: 2,477
        Nice!
        great tut this can help all hackers who used this engine.

        Also i dont know the offset for the player facing,
        so my idea is to search for the string in hxd and find the pointer to it
        __________________
        I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
        The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
        Romhack.me Profile - Pokecommunity Profile - Youtube Channel

        Support me at my site!
        Pokémon Platinum Red and Blue
        Reply With Quote
          #5    
        Old February 22nd, 2013 (11:55 AM).
        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
          Quote:
          Originally Posted by gogojjtech View Post
          Nice!
          great tut this can help all hackers who used this engine.

          Also i dont know the offset for the player facing,
          so my idea is to search for the string in hxd and find the pointer to it
          I already tried that, my best bet is it is part of an ASM routine that loads offset by adding a certain amount to an earlier offset. But, i just had an idea! Set a breapoint on the read of the playerfacing location in a clean rom. Let me give this a try.....
          __________________

          Paired with Simba
          Reply With Quote
            #6    
          Old February 22nd, 2013 (1:18 PM).
          GoGoJJTech's Avatar
          GoGoJJTech GoGoJJTech is offline
          (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
          • Gold Tier
           
          Join Date: Nov 2012
          Location: Earth
          Age: 18
          Gender: Female
          Nature: Jolly
          Posts: 2,477
          You can copy the old playerfacing and paste it in a free space, then point everything to there.
          can that work?
          __________________
          I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
          The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
          Romhack.me Profile - Pokecommunity Profile - Youtube Channel

          Support me at my site!
          Pokémon Platinum Red and Blue
          Reply With Quote
            #7    
          Old February 22nd, 2013 (1:32 PM). 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
            Quote:
            Originally Posted by gogojjtech View Post
            You can copy the old playerfacing and paste it in a free space, then point everything to there.
            can that work?
            I tried but it doesn't work.
            __________________

            Paired with Simba
            Reply With Quote
              #8    
            Old February 22nd, 2013 (2:58 PM).
            GoGoJJTech's Avatar
            GoGoJJTech GoGoJJTech is offline
            (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
            • Gold Tier
             
            Join Date: Nov 2012
            Location: Earth
            Age: 18
            Gender: Female
            Nature: Jolly
            Posts: 2,477
            Hmm, so taking the old one doesn't work, and searching for the new one doesn't work,
            seems like it all must be stored in the ram, or something crazy like that.
            maybe the whole thing was just recreated, like a whole new way of calling the beginning.
            Maybe creating your own kind, and in a clean rom, find all offsets that point to the one in the clean rom.
            Then in the hacked rom, go to those pointers and point to the new address where you made yours.
            all this is nuts man!
            __________________
            I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
            The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
            Romhack.me Profile - Pokecommunity Profile - Youtube Channel

            Support me at my site!
            Pokémon Platinum Red and Blue
            Reply With Quote
              #9    
            Old February 22nd, 2013 (3:05 PM).
            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
              Quote:
              Originally Posted by gogojjtech View Post
              Hmm, so taking the old one doesn't work, and searching for the new one doesn't work,
              seems like it all must be stored in the ram, or something crazy like that.
              maybe the whole thing was just recreated, like a whole new way of calling the beginning.
              Maybe creating your own kind, and in a clean rom, find all offsets that point to the one in the clean rom.
              Then in the hacked rom, go to those pointers and point to the new address where you made yours.
              all this is nuts man!
              It is. I found the routine in the origional rom that calls the player facing information. When I open this routine in JPAN's, there is no routine, it is just junk.
              __________________

              Paired with Simba
              Reply With Quote
                #10    
              Old February 22nd, 2013 (5:14 PM).
              Shubunkus's Avatar
              Shubunkus Shubunkus is offline
              I.R.
                 
                Join Date: Jul 2012
                Gender: Male
                Nature: Bold
                Posts: 49
                Hey, this is great! Only one problem though, I tried this on an unhacked FireRed but the when I try to change the way the player is facing, he always ends up facing down no matter what I do. Do you know why this is?
                __________________
                Reply With Quote
                  #11    
                Old February 22nd, 2013 (5:31 PM).
                DrFuji's Avatar
                DrFuji DrFuji is offline
                Heiki Hecchara‌‌
                • Crystal Tier
                 
                Join Date: Sep 2009
                Location: Downia-upside
                Age: 24
                Gender: Male
                Nature: Jolly
                Posts: 1,328
                Quote:
                Originally Posted by karatekid552 View Post
                If someone does know the location of the player facing, please let me know so I can add it to this tutorial.
                Actually, JPAN's engine removes that part completely, you can see this because the player faces up at the beginning of a regular FR ROM whereas they face down in a patched version. The reason behind this is because the direction the player faces is determined by a level script in the player's room which is only activated when they first enter/ spawn there. But since all scripts are cleared in the patch it was replaced with 0xFF bytes, leading to the error encountered.

                Anyway, this is a pretty helpful/ simple tutorial to get around the problems associated with SMCA and its even better now that people will be able to know at a glance how to change that elusive Y-coordinate :P
                __________________
                Reply With Quote
                  #12    
                Old February 22nd, 2013 (5:50 PM).
                Shubunkus's Avatar
                Shubunkus Shubunkus is offline
                I.R.
                   
                  Join Date: Jul 2012
                  Gender: Male
                  Nature: Bold
                  Posts: 49
                  Quote:
                  Originally Posted by DrFuji View Post
                  Actually, JPAN's engine removes that part completely, you can see this because the player faces up at the beginning of a regular FR ROM whereas they face down in a patched version. The reason behind this is because the direction the player faces is determined by a level script in the player's room which is only activated when they first enter/ spawn there. But since all scripts are cleared in the patch it was replaced with 0xFF bytes, leading to the error encountered.

                  Anyway, this is a pretty helpful/ simple tutorial to get around the problems associated with SMCA and its even better now that people will be able to know at a glance how to change that elusive Y-coordinate
                  So, I decided to check this out and found that the level script type for the way the player is facing is a "Validates Values... [4]". Is it possible that I could have this level script and a level script of the "[2] Validates Values" at the same time so the player is facing a certain way and have another level script activate at the same time?
                  __________________
                  Reply With Quote
                    #13    
                  Old February 22nd, 2013 (6:02 PM).
                  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
                    Quote:
                    Originally Posted by DrFuji View Post
                    Actually, JPAN's engine removes that part completely, you can see this because the player faces up at the beginning of a regular FR ROM whereas they face down in a patched version. The reason behind this is because the direction the player faces is determined by a level script in the player's room which is only activated when they first enter/ spawn there. But since all scripts are cleared in the patch it was replaced with 0xFF bytes, leading to the error encountered.

                    Anyway, this is a pretty helpful/ simple tutorial to get around the problems associated with SMCA and its even better now that people will be able to know at a glance how to change that elusive Y-coordinate
                    Thank you DrFuji, but I have a question, why was it so elusive? It was so close to the other data, i found it rather quickly. Why wasn't it included in SMCA?

                    The player facing makes sense. It's just a sprite behave command. Hmmm, i guess I'll add that to the tutorial. Thanks for letting me know!
                    __________________

                    Paired with Simba
                    Reply With Quote
                      #14    
                    Old February 22nd, 2013 (6:43 PM).
                    GoGoJJTech's Avatar
                    GoGoJJTech GoGoJJTech is offline
                    (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
                    • Gold Tier
                     
                    Join Date: Nov 2012
                    Location: Earth
                    Age: 18
                    Gender: Female
                    Nature: Jolly
                    Posts: 2,477
                    Nice find Dr Fuji you really saved a bunch of hackers from this mess
                    __________________
                    I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
                    The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
                    Romhack.me Profile - Pokecommunity Profile - Youtube Channel

                    Support me at my site!
                    Pokémon Platinum Red and Blue
                    Reply With Quote
                      #15    
                    Old August 10th, 2014 (4:56 PM).
                    Bauerklos's Avatar
                    Bauerklos Bauerklos is offline
                       
                      Join Date: May 2014
                      Location: 'murica.
                      Gender: Male
                      Nature: Quiet
                      Posts: 19
                      How do I tell what the level and the bank is? Using SMCA, that is. I haven't found any good tutorials on using it.
                      Reply With Quote
                        #16    
                      Old December 23rd, 2014 (7:47 AM).
                      klingt klingt is offline
                      Living Poetry
                         
                        Join Date: Dec 2014
                        Gender: Male
                        Posts: 13
                        Quote:
                        #org 0x054A06/0x054A04
                        setbyte 0x2 or to whatever level/bank
                        end
                        What I used to change the level in front of the spriteface script
                        __________________
                        The experienced are the dead, collapsed in their heaps
                        The beyond is ahead and you can only hope to catch a glimpse
                        You peer into the fabric mirage
                        There is no form, no color
                        A new scene without compare nor equal
                        Reply With Quote
                          #17    
                        Old January 13th, 2015 (2:55 PM).
                        Lance32497's Avatar
                        Lance32497 Lance32497 is offline
                        LanceKoijer of Pokemon_Addicts
                           
                          Join Date: Aug 2014
                          Location: Criscanto town-Ginoa Region xD
                          Gender: Male
                          Nature: Adamant
                          Posts: 793
                          sorry if Im asking yah this, I aint using JPAN hacked engine and I'm having problem in SMCA, it doesnt have Y coordinate and I cant find the right X value in my desired position...
                          Is there a way to edit the Y position using Hex editor?
                          __________________
                          This signature has been disabled.
                          Scrollbar appears
                          Please review and fix the issues by reading the signature rules.

                          You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                          Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                          Reply With Quote
                            #18    
                          Old January 13th, 2015 (6:38 PM).
                          esperance's Avatar
                          esperance esperance is offline
                          • Platinum Tier
                           
                          Join Date: Mar 2010
                          Location: Ohio
                          Age: 20
                          Gender: Male
                          Nature: Relaxed
                          Posts: 3,830
                          Quote:
                          Originally Posted by Lance32497 View Post
                          sorry if Im asking yah this, I aint using JPAN hacked engine and I'm having problem in SMCA, it doesnt have Y coordinate and I cant find the right X value in my desired position...
                          Is there a way to edit the Y position using Hex editor?
                          This tutorial literally gives you the offsets you need to edit the map, as well as the X and Y coordinates. JPAN's engine doesn't change them.
                          __________________
                          What are you so afraid of?
                          Reply With Quote
                            #19    
                          Old January 13th, 2015 (7:00 PM).
                          Lance32497's Avatar
                          Lance32497 Lance32497 is offline
                          LanceKoijer of Pokemon_Addicts
                             
                            Join Date: Aug 2014
                            Location: Criscanto town-Ginoa Region xD
                            Gender: Male
                            Nature: Adamant
                            Posts: 793
                            Quote:
                            Originally Posted by itari View Post
                            This tutorial literally gives you the offsets you need to edit the map, as well as the X and Y coordinates. JPAN's engine doesn't change them.
                            ahhh thanks... It really helped me
                            __________________
                            This signature has been disabled.
                            Scrollbar appears
                            Please review and fix the issues by reading the signature rules.

                            You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                            Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                            Reply With Quote
                            Reply

                            Quick Reply

                            Join the conversation!

                            Create an account to post a reply in this thread, participate in other discussions, and more!

                            Create a PokéCommunity Account

                            Sponsored Links
                            Thread Tools

                            Posting Rules
                            You may not post new threads
                            You may not post replies
                            You may not post attachments
                            You may not edit your posts

                            BB code is On
                            Smilies are On
                            [IMG] code is On
                            HTML code is Off

                            Forum Jump


                            All times are GMT -8. The time now is 10:59 PM.