The PokéCommunity Forums Fan Games ROM Hacking Tools, Tutorials & Resources
Resource FBI's HM type-check hack

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

Reply
 
Thread Tools
  #51    
Old January 1st, 2017 (7:02 PM). Edited January 1st, 2017 by Uncommon.
Uncommon's Avatar
Uncommon Uncommon is offline
Oozma Kappa
     
    Join Date: Jun 2015
    Location: Johto
    Nature: Careful
    Posts: 184
    Update 1/1/17


    Happy New Year PC! I have a few bits of news to share about this project:

    • Version 1.1 released! mbcn10ww discovered and solved a bug with this hack. In Version 1.0, for all HMs except Flash, although checking for types was functionally correct, the animation and text always showed the first Pokémon in your party, not necessarily the one with the correct type. mbcn10ww came up with a simple fix, which I verified and applied to all HMs in Version 1.1, with help from FBI. The Downloads section of the OP has been updated.
    • I've added the source ASM for Fly into the Advanced section (originally I only had the compiled version there), so you can mess around with it if you want.
    • Also, mbcn10ww has made his own fork of this hack. In addition to the aforementioned bug fix, his version also moves the hack out to offset 0x990000 to increase compatibility with hacks in progress and adds the ability to use more than one type per HM move (which is really cool!). Check out the thread here.
    • I will continue to keep this thread maintained because I feel this base version is simpler and I can personally vouch for its stability, but feel free to check out mbcn10ww's version, too. I will still love you no matter which version you use <3
    • The Advanced section of the OP is still being updated to reflect the changes to Version 1.1, I'll try to have that finished in the next couple days and will post an announcement when done. All the other sections are already updated.
    __________________
    My work: HM type-check system hack (FireRed) | Turbo Test patch (FireRed)

    Reply With Quote
      #52    
    Old January 7th, 2017 (4:19 PM).
    Uncommon's Avatar
    Uncommon Uncommon is offline
    Oozma Kappa
       
      Join Date: Jun 2015
      Location: Johto
      Nature: Careful
      Posts: 184
      Minor update 1/7/17:
      • Advanced and Compatibility sections of the OP updated
      • The whole OP is now up-to-date for Version 1.1
      __________________
      My work: HM type-check system hack (FireRed) | Turbo Test patch (FireRed)

      Reply With Quote
        #53    
      Old March 12th, 2017 (7:58 AM).
      LeinadWorks's Avatar
      LeinadWorks LeinadWorks is offline
         
        Join Date: Feb 2017
        Gender: Male
        Posts: 54
        That's amazing, I would love to program that for my hack.
        Reply With Quote
          #54    
        Old March 14th, 2017 (8:05 AM).
        Nisarg's Avatar
        Nisarg Nisarg is offline
           
          Join Date: Jan 2017
          Gender: Male
          Posts: 208
          BUG ALERT!!!!!

          https://www.pokecommunity.com/showthread.php?t=390176
          __________________
          Reply With Quote
            #55    
          Old March 16th, 2017 (8:53 PM).
          Uncommon's Avatar
          Uncommon Uncommon is offline
          Oozma Kappa
             
            Join Date: Jun 2015
            Location: Johto
            Nature: Careful
            Posts: 184
            Quote:
            Originally Posted by Nisarg View Post
            As noted in the linked thread, this is a real yet extremely minor bug that only occurs in the Safari Zone and is not game-breaking in any way. The only ill effect is that you lose the option to immediately "retire" from the Start menu and have to use up your steps instead. I don't plan on addressing it, but I have posted the relevant information in the linked thread in case you want to take a crack at it.
            __________________
            My work: HM type-check system hack (FireRed) | Turbo Test patch (FireRed)

            Reply With Quote
              #56    
            Old April 15th, 2017 (8:05 AM).
            mbcn10ww's Avatar
            mbcn10ww mbcn10ww is offline
               
              Join Date: Oct 2016
              Location: Brazil
              Gender: Male
              Nature: Lonely
              Posts: 366
              Quote:
              Originally Posted by Uncommon View Post
              Minor update 1/7/17:
              • Advanced and Compatibility sections of the OP updated
              • The whole OP is now up-to-date for Version 1.1
              I updated my HMs Type Check, take a look:
              - Used offsets 0x98FE00 - 0x99119F (it don't uses all of it, but it's more safe to have this all free space);
              - Added Rock Climb system;
              - Added Dive system;
              - Replaced unused RSE protagonists sprites with new Dive sprites for Red and Leaf;
              - Changed the Alternate Flags to default/unused safe flags (don't need expanded flags anymore).

              https://www.pokecommunity.com/showpost.php?p=9510044&postcount=1
              __________________
              My Works:
              [Fire Red] Adding New Trainer Sprites
              [Fire Red] My Version of HMs Type Check
              [Fire Red] Touched's Mega Evolution System (PATCH)
              Reply With Quote
                #57    
              Old July 6th, 2018 (4:01 PM).
              bluedart's Avatar
              bluedart bluedart is offline
                 
                Join Date: Aug 2008
                Gender: Male
                Nature: Serious
                Posts: 21
                Followed the tutorial; I got as far as trying to compile the script with XSE. Unfortunately that script throws the error 'Unknown keyword "bufferypartypokemon" at line 24'. I eventually found out that it might have changed to "bufferpokemon" since that is an option and appears to work. I then replaced all instances with "bufferpokemon". At this point it also gives a new error "Error 6 'Overflow' on line 44. Wrong parameter type." What? Okay, this one I actually don't know what it's asking for, so I guess that's as far as I go. Any ideas?

                PS. The ips patch works well, but since it's a romhack in progress it actually overwrites the data of one of my maps, making it garbage blocks for most of the map, causing it to crash when entered. So much for a backup method to get it working.
                Reply With Quote
                  #58    
                Old July 7th, 2018 (2:37 PM). Edited July 7th, 2018 by Uncommon.
                Uncommon's Avatar
                Uncommon Uncommon is offline
                Oozma Kappa
                   
                  Join Date: Jun 2015
                  Location: Johto
                  Nature: Careful
                  Posts: 184
                  Quote:
                  Originally Posted by bluedart View Post
                  Unfortunately that script throws the error 'Unknown keyword "bufferypartypokemon" at line 24'.
                  Emphasis mine. Looks like somehow you ended up with an extra letter typed in there, which would cause exactly the error you describe.

                  Quote:
                  Originally Posted by bluedart View Post
                  I eventually found out that it might have changed to "bufferpokemon" since that is an option and appears to work. I then replaced all instances with "bufferpokemon". At this point it also gives a new error "Error 6 'Overflow' on line 44. Wrong parameter type." What? Okay, this one I actually don't know what it's asking for, so I guess that's as far as I go. Any ideas?
                  Yeah don't do that, "bufferpartypokemon" and "bufferpokemon" are not interchangeable and take different parameters, so I would expect that error.

                  Quote:
                  Originally Posted by bluedart View Post
                  PS. The ips patch works well, but since it's a romhack in progress it actually overwrites the data of one of my maps, making it garbage blocks for most of the map, causing it to crash when entered. So much for a backup method to get it working.
                  This is exactly what the Compatibility section of the OP is addressing. I can't predict where everyone is going to put their data so I just picked a spot and called it out with a warning, and provided all the source code so people can make their own version that is definitely compatible with their work. In retrospect, I'm not very happy with the place I chose, since anyone who simply uses the first available free space is going to end up crashing with it. Maybe someday I'll move it to a better location, like mbcn10ww's version which moves the hack out to something like 0x990000. I guess the ideal solution would be to build an inserter tool where all you have to do is find free space and it does all the work, but I never got around to learning how to build those.
                  __________________
                  My work: HM type-check system hack (FireRed) | Turbo Test patch (FireRed)

                  Reply With Quote
                    #59    
                  Old July 7th, 2018 (8:58 PM).
                  bluedart's Avatar
                  bluedart bluedart is offline
                     
                    Join Date: Aug 2008
                    Gender: Male
                    Nature: Serious
                    Posts: 21
                    Quote:
                    Originally Posted by Uncommon View Post
                    Emphasis mine. Looks like somehow you ended up with an extra letter typed in there, which would cause exactly the error you describe.



                    Yeah don't do that, "bufferpartypokemon" and "bufferpokemon" are not interchangeable and take different parameters, so I would expect that error.



                    This is exactly what the Compatibility section of the OP is addressing. I can't predict where everyone is going to put their data so I just picked a spot and called it out with a warning, and provided all the source code so people can make their own version that is definitely compatible with their work. In retrospect, I'm not very happy with the place I chose, since anyone who simply uses the first available free space is going to end up crashing with it. Maybe someday I'll move it to a better location, like mbcn10ww's version which moves the hack out to something like 0x990000. I guess the ideal solution would be to build an inserter tool where all you have to do is find free space and it does all the work, but I never got around to learning how to build those.
                    Wow, wasn't expecting a reply this early from a mod that seemed derelict. Anyway, I can assure you that the errant 'y' in my post was an error only in my post. The script is verbatim what you typed in your original post, and very much does not work. I changed nothing.

                    Also that link you posted was a solution I very much would attempt, were his download links for all versions not down. It's too bad that isn't available anywhere, I would have liked to try it.

                    Anyway, since there is no modification the script I used, do you have any idea what I should try?
                    Reply With Quote
                      #60    
                    Old July 8th, 2018 (3:54 PM).
                    Uncommon's Avatar
                    Uncommon Uncommon is offline
                    Oozma Kappa
                       
                      Join Date: Jun 2015
                      Location: Johto
                      Nature: Careful
                      Posts: 184
                      Quote:
                      Originally Posted by bluedart View Post
                      Wow, wasn't expecting a reply this early from a mod that seemed derelict.
                      lol, I'm not a mod, and don't think I'm "derelict", either. I really don't have time to hack anymore but still check this site once or twice a week because I like to maintain my work (ie. this thread).

                      Quote:
                      Originally Posted by bluedart View Post
                      Anyway, I can assure you that the errant 'y' in my post was an error only in my post. The script is verbatim what you typed in your original post, and very much does not work. I changed nothing....

                      Anyway, since there is no modification the script I used, do you have any idea what I should try?
                      What's the error you're getting? The one you posted corresponded to exactly what you'd get if you had that typo. Copy-and-paste the script into XSE (directly, don't paste it into another text editor first), compile, copy-and-paste the error you get. What line does it fail at?
                      __________________
                      My work: HM type-check system hack (FireRed) | Turbo Test patch (FireRed)

                      Reply With Quote
                        #61    
                      Old July 14th, 2018 (5:23 PM).
                      bluedart's Avatar
                      bluedart bluedart is offline
                         
                        Join Date: Aug 2008
                        Gender: Male
                        Nature: Serious
                        Posts: 21
                        Quote:
                        Originally Posted by Uncommon View Post
                        lol, I'm not a mod, and don't think I'm "derelict", either.
                        ...
                        What's the error you're getting? The one you posted corresponded to exactly what you'd get if you had that typo. Copy-and-paste the script into XSE (directly, don't paste it into another text editor first), compile, copy-and-paste the error you get. What line does it fail at?
                        Lol, I wasn't calling YOU a mod, I meant your rom modification.

                        Either way, when I said verbatim I meant it. I directly copied from your post to XSE. Anyway, I managed to use your ips patch on a relatively new rom a week or so ago and it's working properly. Been working on a hack ever since. For posterity's sake, I might as well do exactly as you directed though.

                        Spoiler:
                        So I started with a clean 1.0 Fire Red Rom. I found 40 bytes of freespace at the offset 0x71A23C. I then paste-wrote (ctrl+b) the instructed bytes to this location.
                        Code:
                        06 4A 12 78 88 79 90 42 02 D0 C8 79 90 42 03 D1 28 1C 70 BC 02 BC 08 47 01 48 00 47 B8 70 03 02 59 A8 0C 08
                        I then went to offset 0xCA840 and paste-wrote the below bytes:
                        Code:
                        00 48 00 47 3D A2 71 08
                        The former four being ones you supplied, the latter four being the modified pointer to the new data I just added.

                        I then opened XSE, opened my rom, pasted in the code in your first post that I immediately copied from said post and pressed compile. Below is the error I receive. The IMG tag will not work here for some unknown reason, so you will have to follow the link to the Imgur post I made manually.


                        https://imgur.com/a/SuxPdOs


                        Just a quick question as well: which version of XSE was used for this to work successfully? I was using version 1.0.1. I already tried to use the update function, but apparently support for this program has been discontinued and it could not check for a newer version.
                        Reply With Quote
                          #62    
                        Old July 14th, 2018 (5:50 PM).
                        Uncommon's Avatar
                        Uncommon Uncommon is offline
                        Oozma Kappa
                           
                          Join Date: Jun 2015
                          Location: Johto
                          Nature: Careful
                          Posts: 184
                          Quote:
                          Originally Posted by bluedart View Post
                          For posterity's sake, I might as well do exactly as you directed though.

                          Spoiler:
                          So I started with a clean 1.0 Fire Red Rom. I found 40 bytes of freespace at the offset 0x71A23C. I then paste-wrote (ctrl+b) the instructed bytes to this location.
                          Code:
                          06 4A 12 78 88 79 90 42 02 D0 C8 79 90 42 03 D1 28 1C 70 BC 02 BC 08 47 01 48 00 47 B8 70 03 02 59 A8 0C 08
                          I then went to offset 0xCA840 and paste-wrote the below bytes:
                          Code:
                          00 48 00 47 3D A2 71 08
                          The former four being ones you supplied, the latter four being the modified pointer to the new data I just added.

                          I then opened XSE, opened my rom, pasted in the code in your first post that I immediately copied from said post and pressed compile. Below is the error I receive. The IMG tag will not work here for some unknown reason, so you will have to follow the link to the Imgur post I made manually.


                          https://imgur.com/a/SuxPdOs


                          Just a quick question as well: which version of XSE was used for this to work successfully? I was using version 1.0.1. I already tried to use the update function, but apparently support for this program has been discontinued and it could not check for a newer version.
                          Thanks for documenting your process so well! I just tried to recreate this by following the same steps on a clean ROM, and I wasn't able to reproduce the error. I checked the XSE version and mine is v1.1.1 - that is likely the issue. Maybe "bufferpartypokemon" is a keyword not recognized by older versions? You can try getting v1.1.1 from here and see if that solves the problem.
                          __________________
                          My work: HM type-check system hack (FireRed) | Turbo Test patch (FireRed)

                          Reply With Quote
                            #63    
                          Old July 14th, 2018 (6:13 PM).
                          bluedart's Avatar
                          bluedart bluedart is offline
                             
                            Join Date: Aug 2008
                            Gender: Male
                            Nature: Serious
                            Posts: 21
                            Updating to XSE 1.1.1 absolutely fixed the problem I was having. The script compiled and I saved the log it made. I got a few steps into the hex editing stuff and when I looked at how much more there was to do for something I already have working properly I just stopped. Make sure you tell people to specifically get XSE version 1.1.1 in the main post. Thanks for being so active.

                            Oddly enough the update check on 1.1.1 actually functions and returns that 1.1.1 is the newest version. Weird that 1.0.1 can't be updated in this way.
                            Reply With Quote
                              #64    
                            Old July 16th, 2018 (1:56 PM).
                            ultragold's Avatar
                            ultragold ultragold is offline
                               
                              Join Date: Oct 2016
                              Gender: Male
                              Posts: 9
                              How do you do Diving and Rock Climbing?
                              Reply With Quote
                                #65    
                              Old July 16th, 2018 (5:12 PM).
                              lilbluedemon's Avatar
                              lilbluedemon lilbluedemon is online now
                              Crunching the numbers!
                                 
                                Join Date: Mar 2015
                                Gender: Female
                                Posts: 210
                                Quote:
                                Originally Posted by ultragold View Post
                                How do you do Diving and Rock Climbing?
                                I'm not 100% sure, but wouldn't these need some extra work, since even though Dive is in FRLG, it doesn't have any function as a field move since Kanto, and the Sevii Islands have no underwater areas.

                                And Rock Climbing isn't a thing in FRLG, but I know some people have made scripts, and codings for it.
                                __________________
                                "What are you running from?"
                                Reply With Quote
                                  #66    
                                Old July 17th, 2018 (9:08 PM).
                                Uncommon's Avatar
                                Uncommon Uncommon is offline
                                Oozma Kappa
                                   
                                  Join Date: Jun 2015
                                  Location: Johto
                                  Nature: Careful
                                  Posts: 184
                                  Quote:
                                  Originally Posted by ultragold View Post
                                  How do you do Diving and Rock Climbing?
                                  Quote:
                                  Originally Posted by lilbluedemon View Post
                                  I'm not 100% sure, but wouldn't these need some extra work, since even though Dive is in FRLG, it doesn't have any function as a field move since Kanto, and the Sevii Islands have no underwater areas.

                                  And Rock Climbing isn't a thing in FRLG, but I know some people have made scripts, and codings for it.
                                  lilbluedemon is exactly right - Dive's and Rock Climb's field effects don't exist in vanilla FireRed, so they also don't exist in this patch. A few people have built their own versions, including Spherical Ice off the top of my head. Maybe if I somehow got a ton of free time someday I could add them to this, but at the moment I have no plans to do so.

                                  However, mbcn10ww's fork of this hack does include both Dive and Rock Climb (according to his thread, I haven't personally tested it).
                                  __________________
                                  My work: HM type-check system hack (FireRed) | Turbo Test patch (FireRed)

                                  Reply With Quote
                                    #67    
                                  Old August 16th, 2018 (10:37 PM).
                                  CynicalUnicorn CynicalUnicorn is offline
                                     
                                    Join Date: Dec 2015
                                    Gender: Male
                                    Posts: 38
                                    So correct me if I'm wrong, but it should be possible to have multiple types able to use HMs, right? I'm looking at the script for Strength:

                                    Code:
                                    #org @newstrength
                                    
                                    call @init            'initialization check, from original
                                    call @flagcheck       'check if new check system is enabled 
                                    if 0x0 goto @originalstrength
                                    
                                    lockall
                                    checkflag 0x828       'set this to the new badge you want (828 is the pkmn menu)
                                    if 0x0 goto 0x81BE185
                                    checkflag 0x805       'strength active flag - do not change
                                    if 0x1 goto 0x81BE18E
                                    
                                    setvar 0x8000 0x1     'set this to the type you want (1 is Fighting)
                                    special2 0x4001 0x12B
                                    compare 0x4001 0x6
                                    if 0x4 goto 0x81BE185
                                    'setvar 0x4001 LASTRESULT 
                                    
                                    goto @strengthaction
                                    It should be possible to call the type check twice for Fighting and, if that fails, let's say Rock. It won't necessarily use the first Pokemon in the party (e.g. a Geodude up front and a Machop at the end would result in Machop using Strength because Fighting was checked first) but it would allow either to work. I haven't worked with XSE a whole lot yet but it looks like a second comparison of variable 0x4001 to 6 would work: if equal go to the second type check.
                                    __________________
                                    Useful things I've done:

                                    "Tutorial: HM moves and forgetting the darn things"
                                    Reply With Quote
                                      #68    
                                    Old 4 Weeks Ago (9:06 PM).
                                    Uncommon's Avatar
                                    Uncommon Uncommon is offline
                                    Oozma Kappa
                                       
                                      Join Date: Jun 2015
                                      Location: Johto
                                      Nature: Careful
                                      Posts: 184
                                      Quote:
                                      Originally Posted by CynicalUnicorn View Post
                                      So correct me if I'm wrong, but it should be possible to have multiple types able to use HMs, right? I'm looking at the script for Strength:

                                      ...

                                      It should be possible to call the type check twice for Fighting and, if that fails, let's say Rock. It won't necessarily use the first Pokemon in the party (e.g. a Geodude up front and a Machop at the end would result in Machop using Strength because Fighting was checked first) but it would allow either to work. I haven't worked with XSE a whole lot yet but it looks like a second comparison of variable 0x4001 to 6 would work: if equal go to the second type check.
                                      Absolutely! I believe that's exactly how mbcn10ww did it in his fork of the hack. Fly is slightly more complicated since it's done through ASM, but I was able to modify its routine for mbcn10ww to check two types as well.
                                      __________________
                                      My work: HM type-check system hack (FireRed) | Turbo Test patch (FireRed)

                                      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
                                      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 6:56 PM.