Advertiser Content

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
14.1 Years
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. :(

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:
#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)
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
あなた は しきしゃ です
わたし は ばか です

NarutoActor

The rocks cry out to me

Age 26
Female
Brooklyn/Marlboro
Seen April 2nd, 2016
Posted March 22nd, 2016
1,978 posts
11.1 Years
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

El Diabeetus

Amateur Voice Actor / ROM Editor ('Hacker')

Age 26
Seen 3 Weeks Ago
Posted 3 Weeks Ago
1,070 posts
13.6 Years
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

shinyabsol1

Pokemon DarkJasper!?

Male
Seen June 29th, 2019
Posted October 6th, 2013
330 posts
9.5 Years
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?

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
14.1 Years
Oops! That was definitly a typo.

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:

080A1A32: C7 F7 85 FF 70 BD
I've also added the compiled script to the first post. :)
あなた は しきしゃ です
わたし は ばか です

Satoshi Ookami

Memento Mori

Age 27
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,530 posts
11.6 Years
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

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
14.1 Years
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.
あなた は しきしゃ です
わたし は ばか です

Platinum Lucario

The Legendary Master of Light!

Age 27
Male
Warrnambool, Victoria, Australia.
Seen 1 Day Ago
Posted 3 Weeks Ago
1,602 posts
12.1 Years
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 advice on how to improve the CSS-DIV code. Thank you!
All credits for the avatar since 2008 goes to shorty-antics-27 (fanart account)! Thank you! ^^
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)

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
14.1 Years
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.
あなた は しきしゃ です
わたし は ばか です

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
14.1 Years
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. :)
あなた は しきしゃ です
わたし は ばか です
Seen May 11th, 2019
Posted December 8th, 2012
10 posts
7.3 Years
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.. :(

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
14.1 Years
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. :)
あなた は しきしゃ です
わたし は ばか です

Omega Zero

Is back...

Age 22
Male
I'm always living aren't I?
Seen December 4th, 2016
Posted October 6th, 2013
445 posts
10.2 Years
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.

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
14.1 Years
Regarding the tiles messing up, the following byte changes appear to fix it:

080A1A5A: 00 00 00 00
080A1A68: 00 00 00 00
This is also posted in the first post.
あなた は しきしゃ です
わたし は ばか です
Advertiser Content