Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Reply
 
Thread Tools
  #1    
Old November 2nd, 2012 (7:40 AM). Edited November 16th, 2016 by esperance.
Darthatron's Avatar
Darthatron Darthatron is offline
巨大なトロール。
  • Silver Tier
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 25
Gender: Male
Nature: Modest
Posts: 1,152
So, clearly the best thing about BW2 is the fact that it asks if you'd like to use another repel if it expires.
THIS IS AWESOME!
Why did Gamefreak not add this earlier?
Anyway, I've made a port of it for FireRed. I hope you enjoy it.



It will only ask you if you'd like to use another repel if you have another one of the same repel you just used. Otherwise it will just tell you the repel expired. This is how it works in BW2.

There are a lot of byte changes to be made. Sorry for that.

Code:
080830CA: 0C 48 EB F7 4C FA 01 06 00 29 16 D0 41 1E 0C 06 0D 0A 07 48 EB F7 51 FA 00 2C 0E D1 03 4C 25 80 05 48 E6 F7 FA FC 01 20 08 E0 30 AD 03 02
08083119: 06
080A19A5: 06
080A19F6: 1C
080A19F8: 11
080A19FC: 0F
080A1A0E: 21 88 09 02 41 40
080A1A1E: 34 4B 28 21 71 43 5B 18 D9 79 30 1C 02 22 17 4B FF F7 49 FB C7 F7 85 FF 70 BD 20 40 00 00 FF FF 00 00 30 AD 03 02
080A1A5A: 00 00 00 00
080A1A68: 00 00 00 00
081BFB66: 00 00 00 B5 04 48 50 21 00 F0 01 F8 00 BD 00 4A 10 47 1D 74 07 08 99 19 0A 08 00 00 00 00 00 00
Then you have to compile this script. You can compile it anywhere, just note the pointer you compiled it to:
Code:
#org @Main
lock
checkitem 0x800E 1
compare LASTRESULT 1
if b_>= goto @ThereAreMore
msgbox @RepelExpired 3
release
end

#org @ThereAreMore
msgbox @UseAnother 5
closeonkeypress
compare LASTRESULT 1
if b_true goto @CallASM
end

#org @CallASM
callasm 0x081BFB69
end

#org @RepelExpired
= Repel's effect wore off.

#org @UseAnother
= Repel's effect wore off...\nUse another?
Here's a compiled version of the script for anyone having problems: (don't use this -- goto commands will not work correctly)
Code:
6A 47 0E 80 01 00 21 0D 80 01 00 06 04 1C 00 80 08 0F 00 39 00 80 08 09 03 6C 02 FF 0F 00 54 00 80 08 09 05 68 21 0D 80 01 00 06 01 32 00 80 08 02 FF 23 69 FB 1B 08 02 FF CC D9 E4 D9 E0 B4 E7 00 D9 DA DA D9 D7 E8 00 EB E3 E6 D9 00 E3 DA DA AD FF 00 FF CC D9 E4 D9 E0 B4 E7 00 D9 DA DA D9 D7 E8 00 EB E3 E6 D9 00 E3 DA DA AD AD AD FE CF E7 D9 00 D5 E2 E3 E8 DC D9 E6 AC FF 00 FF FF FF FF
Finally, replace the pointer at 08083100 with the pointer to the script. TADA! It's done. It works a treat. Let me know if you guys have any trouble, or if you find an issue with it.

EMERALD USERS SEE THIS POST
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote

Relevant Advertising!

  #2    
Old November 2nd, 2012 (12:56 PM).
NarutoActor's Avatar
NarutoActor NarutoActor is offline
The rocks cry out to me
  • Silver Tier
 
Join Date: Jan 2009
Location: Brooklyn/Marlboro
Age: 23
Gender: Female
Nature: Bashful
Posts: 1,979
Wow that is really cool, I just added that feature to my hack, and will credit you too xD
__________________
~There are those people who understand hex, F the rest
Reply With Quote
  #3    
Old November 2nd, 2012 (12:59 PM). Edited November 2nd, 2012 by El Diabeetus.
El Diabeetus's Avatar
El Diabeetus El Diabeetus is offline
Amateur Voice Actor / ROM Editor ('Hacker')
     
    Join Date: Jul 2006
    Age: 24
    Nature: Lonely
    Posts: 1,068
    I will implement this to DarkCopper and FireRed Challenge Mode, thanks! You'll be getting credit, this is one of my favorite things about B2/W2 as well.

    EDIT: I've edited the bytes, but, I can't seem to get the script to compile correctly in XSE.
    __________________
    Hacks I'm currently working on (at a super slow pace):

    Chinpokomon Big/Small (would leave the titles, but apparently exceeded sig limit)

    Check my Japanese inspired Logo edits for Gens 1-7!:
    http://www.pokecommunity.com/showpost.php?p=9137003
    Reply With Quote
      #4    
    Old November 2nd, 2012 (1:08 PM).
    Incineroar's Avatar
    Incineroar Incineroar is offline
    the spirit of the fighter
    • Moderator
    • Platinum Tier
    • Developer
     
    Join Date: May 2009
    Location: Iki Town
    Age: 22
    Gender: Male
    Nature: Brave
    Posts: 13,448
    Quote:
    Originally Posted by Darthatron View Post
    So, clearly the best thing about BW2 is the fact that it asks if you'd like to use another repel if it expires.
    THIS IS AWESOME!
    IT IS SO AWESOME!

    This is a nice little port you made! I'll be sure to keep this in mind if I do any Fire Red hacks.
    __________________
    Reply With Quote
      #5    
    Old November 2nd, 2012 (1:15 PM).
    Lord Varion's Avatar
    Lord Varion Lord Varion is offline
    Guess who's back?
       
      Join Date: Feb 2009
      Age: 22
      Gender: Other
      Nature: Naughty
      Posts: 2,644
      One of the best features in B2/W2.
      If I ever get back to hacking, this is going right in there.
      __________________
      gone.
      Reply With Quote
        #6    
      Old November 2nd, 2012 (1:32 PM).
      Tailes's Avatar
      Tailes Tailes is offline
      Nothing to see here
         
        Join Date: Jan 2008
        Nature: Jolly
        Posts: 21
        080A19F6: 1C
        080A19F6: 11

        This can't be right, can it?
        Reply With Quote
          #7    
        Old November 2nd, 2012 (1:36 PM).
        DoesntKnowHowToPlay's Avatar
        DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
        Tiny Umbrella with Lots and Lots of Good
           
          Join Date: Jan 2012
          Posts: 258
          Quote:
          080A19F6: 1C
          080A19F6: 11
          Is this supposed to be one line or is one of those addresses a typo?

          Either way, this looks very nice.
          __________________

          Yet Another Fire Red Hack

          Physical/Special Split
          Reply With Quote
            #8    
          Old November 2nd, 2012 (2:14 PM).
          tajaros's Avatar
          tajaros tajaros is offline
          Hi I'm dawg
             
            Join Date: Apr 2012
            Location: Philippines
            Age: 18
            Gender: Male
            Nature: Timid
            Posts: 857
            This is cool Darthatron! Thanks for this I'll definitely be using this. But, the 2 ^ above me are right are those typos or are they typed in one line? :/
            __________________
            Reply With Quote
              #9    
            Old November 2nd, 2012 (2:50 PM).
            shinyabsol1's Avatar
            shinyabsol1 shinyabsol1 is offline
            Pokemon DarkJasper!?
               
              Join Date: Aug 2010
              Gender: Male
              Nature: Calm
              Posts: 330
              Quote:
              Originally Posted by Darthatron
              So, clearly the best thing about BW2 is the fact that it asks if you'd like to use another repel if it expires.
              THIS IS AWESOME!
              Why did Gamefreak not add this earlier?
              Anyway, I've made a port of it for FireRed. I hope you enjoy it.
              I completely agree with you. Best feature ever! Great work porting this, Darthatron! I will definitely add it to my hack.

              But yeah, as those above have asked: are those one line or a typo?
              Reply With Quote
                #10    
              Old November 2nd, 2012 (7:02 PM).
              Darthatron's Avatar
              Darthatron Darthatron is offline
              巨大なトロール。
              • Silver Tier
               
              Join Date: Jan 2006
              Location: Melbourne, Australia
              Age: 25
              Gender: Male
              Nature: Modest
              Posts: 1,152
              Oops! That was definitly a typo.

              Code:
              080A19F6: 1C
              080A19F8: 11
              Also, there was a small bug where the textbox wouldn't disappear after you used a repel in the overworld. I've updated the first post with the fix, but if you've already implemented it just change these bytes:

              Code:
              080A1A32: C7 F7 85 FF 70 BD
              I've also added the compiled script to the first post.
              __________________
              あなた は しきしゃ です
              わたし は ばか です
              Reply With Quote
                #11    
              Old November 2nd, 2012 (7:22 PM).
              esperance's Avatar
              esperance esperance is offline
              • Platinum Tier
               
              Join Date: Mar 2010
              Location: Ohio
              Age: 20
              Gender: Male
              Nature: Relaxed
              Posts: 3,818
              This is a great little improvement!
              Nice work.
              __________________

              A Pokemon that is discriminated!
              Support squirtle and make it everyone's favourite.
              Reply With Quote
                #12    
              Old November 2nd, 2012 (10:03 PM).
              itman itman is offline
              Back to ROM hacking. :D
                 
                Join Date: May 2007
                Age: 23
                Nature: Adamant
                Posts: 100
                I look foward to Darthatron's research threads. ^.^

                Definitely going to use this. :)
                Reply With Quote
                  #13    
                Old November 2nd, 2012 (11:56 PM).
                Satoshi Ookami's Avatar
                Satoshi Ookami Satoshi Ookami is offline
                Memento Mori
                • Gold Tier
                 
                Join Date: Jul 2008
                Location: Abyss of Time, Great Seal
                Age: 24
                Gender: Male
                Nature: Calm
                Posts: 14,479
                Awesome! This is something that was missing in GBA games so much!
                Great work! But will you be doing the port to Ruby as well?
                __________________
                ROM hacking FAQ - Read before asking how to play a hack.

                Anime List | PSN Trophy List
                Reply With Quote
                  #14    
                Old November 3rd, 2012 (12:24 AM).
                Darthatron's Avatar
                Darthatron Darthatron is offline
                巨大なトロール。
                • Silver Tier
                 
                Join Date: Jan 2006
                Location: Melbourne, Australia
                Age: 25
                Gender: Male
                Nature: Modest
                Posts: 1,152
                Quote:
                Originally Posted by Ash493 View Post
                Awesome! This is something that was missing in GBA games so much!
                Great work! But will you be doing the port to Ruby as well?
                Probably not! But I will release commented notes soon, so some other hacker can do that.
                __________________
                あなた は しきしゃ です
                わたし は ばか です
                Reply With Quote
                  #15    
                Old November 3rd, 2012 (1:03 AM).
                Platinum Lucario's Avatar
                Platinum Lucario Platinum Lucario is offline
                The Legendary Master of Light!
                • Crystal Tier
                 
                Join Date: Jan 2008
                Location: Warrnambool, Victoria, Australia.
                Gender: Male
                Nature: Calm
                Posts: 1,561
                This is excellent, it would indeed show that it can also be done in Emerald as well. But having said that, you'd need to know the offsets where it states about "Repel's effect wore off...", it would be really useful for any other ROM hacks that are currently in development, it would save you the time of having to open up your bag again and using repel. ;)
                __________________
                [Platinum Lucario's Signature]
                If you need to disable my signature, please give me some advice on how to improve the CSS-DIV code. Thanks!
                Signature Status: Strikes: 1/3 | Infractions: 0/3
                It's time to change the future...
                to a positive direction!

                Let's prevent things from getting bad!

                I'm a ROM and ISO Researcher
                Current Project: Researching Pokémon Mystery Dungeon Adventure Squad games (WiiWare)
                Reply With Quote
                  #16    
                Old November 3rd, 2012 (7:28 AM).
                Crimson5M's Avatar
                Crimson5M Crimson5M is offline
                what
                • Crystal Tier
                 
                Join Date: Feb 2011
                Location: Scotland
                Age: 21
                Gender: Male
                Nature: Quiet
                Posts: 1,101
                Cool! I haven't played B2W2 yet but I'll definitely be using this :)
                __________________
                Youtube
                Reply With Quote
                  #17    
                Old November 4th, 2012 (11:45 PM).
                Darthatron's Avatar
                Darthatron Darthatron is offline
                巨大なトロール。
                • Silver Tier
                 
                Join Date: Jan 2006
                Location: Melbourne, Australia
                Age: 25
                Gender: Male
                Nature: Modest
                Posts: 1,152
                Well, apparently there is an issue with this hack. Some tiles get messed up until the screen is refreshed. I'm working on a different way of doing things. I'll keep ya'll updated.
                __________________
                あなた は しきしゃ です
                わたし は ばか です
                Reply With Quote
                  #18    
                Old November 9th, 2012 (4:17 PM).
                MegaKuriboh's Avatar
                MegaKuriboh MegaKuriboh is offline
                Yare Yare Daze
                   
                  Join Date: Jan 2009
                  Location: Morioh
                  Gender: Male
                  Nature: Adamant
                  Posts: 811
                  I have no idea how to edit bytes and stuff like that, so would you mind making a patch for this? It would be awesome if you did. Keep up the great work!
                  __________________
                  Reply With Quote
                    #19    
                  Old November 26th, 2012 (4:29 AM).
                  KyX KyX is offline
                     
                    Join Date: Nov 2012
                    Posts: 10
                    I tried to replace the bytes, but i can't understand the offsets.. I'm using HxD as Hex Editor and when typing in the offset it says that this position could not be found.

                    Can anyone help me? Thank you.
                    Reply With Quote
                      #20    
                    Old November 26th, 2012 (4:44 AM).
                    Darthatron's Avatar
                    Darthatron Darthatron is offline
                    巨大なトロール。
                    • Silver Tier
                     
                    Join Date: Jan 2006
                    Location: Melbourne, Australia
                    Age: 25
                    Gender: Male
                    Nature: Modest
                    Posts: 1,152
                    Quote:
                    Originally Posted by KyX View Post
                    I tried to replace the bytes, but i can't understand the offsets.. I'm using HxD as Hex Editor and when typing in the offset it says that this position could not be found.

                    Can anyone help me? Thank you.
                    Hello! The "08" at the start of the offset just means it's in the ROM, not in the memory of the emulator. So just remove the 08 and it will work fine.
                    __________________
                    あなた は しきしゃ です
                    わたし は ばか です
                    Reply With Quote
                      #21    
                    Old November 26th, 2012 (6:32 AM).
                    KyX KyX is offline
                       
                      Join Date: Nov 2012
                      Posts: 10
                      Quote:
                      Originally Posted by Darthatron View Post
                      Hello! The "08" at the start of the offset just means it's in the ROM, not in the memory of the emulator. So just remove the 08 and it will work fine.
                      Thank you! But i have another problem.. Since i'm hacking an Italian rom.. offsets are not the same..
                      But i managed to find where to modify by compare bytes with a english rom..
                      I also fixed all pointers correctly.. But after the repel finish, the game restart..
                      Reply With Quote
                        #22    
                      Old November 26th, 2012 (8:02 AM).
                      Darthatron's Avatar
                      Darthatron Darthatron is offline
                      巨大なトロール。
                      • Silver Tier
                       
                      Join Date: Jan 2006
                      Location: Melbourne, Australia
                      Age: 25
                      Gender: Male
                      Nature: Modest
                      Posts: 1,152
                      Quote:
                      Originally Posted by KyX View Post
                      Thank you! But i have another problem.. Since i'm hacking an Italian rom.. offsets are not the same..
                      But i managed to find where to modify by compare bytes with a english rom..
                      I also fixed all pointers correctly.. But after the repel finish, the game restart..
                      This is not a shock. There are a few parts where the ASM calls parts of the ROM by a "distance" branch function. So it's hard to change those bytes without ASM knowledge... I will take a look at an Italian ROM and see if I can get it to not crash.
                      __________________
                      あなた は しきしゃ です
                      わたし は ばか です
                      Reply With Quote
                        #23    
                      Old February 23rd, 2013 (11:37 PM).
                      BlackWhiteRobin's Avatar
                      BlackWhiteRobin BlackWhiteRobin is offline
                         
                        Join Date: Sep 2012
                        Age: 19
                        Gender: Male
                        Nature: Quirky
                        Posts: 534
                        Sorry to revive an old thread but i'm a newbie and i don't know these things, but any patch? Please mods do not close this thread I'm begging you!
                        __________________

                        Reply With Quote
                          #24    
                        Old February 27th, 2013 (9:37 PM).
                        Omega Zero's Avatar
                        Omega Zero Omega Zero is offline
                        Is back...
                        • Gold Tier
                         
                        Join Date: Dec 2009
                        Location: I'm always living aren't I?
                        Age: 19
                        Gender: Male
                        Nature: Relaxed
                        Posts: 445
                        I've found a bug with this patch. (sorry no bugs)

                        Basically sometimes when it asks you to use the repel if you press yes
                        half the time it'll mess up a tile on the map and replace it with another one.
                        __________________
                        Reply With Quote
                          #25    
                        Old March 8th, 2013 (3:59 PM).
                        BlackWhiteRobin's Avatar
                        BlackWhiteRobin BlackWhiteRobin is offline
                           
                          Join Date: Sep 2012
                          Age: 19
                          Gender: Male
                          Nature: Quirky
                          Posts: 534
                          Patch please?! I really need one I can't get it to work. Everytime I do it and test it what appears is the

                          BUY
                          SELL
                          SEE YA

                          screen when you go to a poke mart
                          __________________

                          Reply With Quote
                          Reply
                          Quick Reply

                          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 11:08 AM.