The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Emulation & ROM Hacking > Research & Development
Register New Account FAQ/Rules Chat Blogs Mark Forums Read

Notices

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!
New threads in this forum are to be approved by a moderator before they are displayed. The thread revival limit does not apply here.



Reply
Thread Tools
  #1  
Unread November 2nd, 2012, 03:40 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 21
Gender: Male
Nature: Modest
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:
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.
__________________
あなた は しきしゃ です
わたし は ばか です

Last edited by Darthatron; March 11th, 2013 at 09:05 AM. Reason: Fix for tiles messing up finally posted.
Reply With Quote
  #2  
Unread November 2nd, 2012, 08:56 PM
NarutoActor's Avatar
NarutoActor
The rocks cry out to me
 
Join Date: Jan 2009
Location: Brooklyn/Marlboro
Age: 19
Gender: Female
Nature: Bashful
Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
Wow that is really cool, I just added that feature to my hack, and will credit you too xD
__________________
~Paired to Full Metal
Reply With Quote
  #3  
Unread November 2nd, 2012, 08:59 PM
SSJ4 Furanki's Avatar
SSJ4 Furanki
Got my Zoroark and everything!
 
Join Date: Jul 2006
Age: 19
Nature: Hasty
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:

Last edited by SSJ4 Furanki; November 2nd, 2012 at 09:48 PM.
Reply With Quote
  #4  
Unread November 2nd, 2012, 09:08 PM
Team Fail's Avatar
Team Fail
Walk the walk // Talk the talk
 
Join Date: May 2009
Age: 18
Gender: Male
Nature: Brave
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  
Unread November 2nd, 2012, 09:15 PM
Nintendork15
I'm gone. Bye.
 
Join Date: Feb 2009
Location: Undertaker. Co.
Age: 18
Gender: Male
Nature: Naughty
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  
Unread November 2nd, 2012, 09:32 PM
Thundrake
Unhatched Egg
 
Join Date: Jan 2008
Gender:
080A19F6: 1C
080A19F6: 11

This can't be right, can it?
Reply With Quote
  #7  
Unread November 2nd, 2012, 09:36 PM
DoesntKnowHowToPlay's Avatar
DoesntKnowHowToPlay
some loser
 
Join Date: Jan 2012
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  
Unread November 2nd, 2012, 10:14 PM
tajaros's Avatar
tajaros
Hi I'm dawg
 
Join Date: Apr 2012
Location: Philippines
Age: 14
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to tajaros
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  
Unread November 2nd, 2012, 10:50 PM
shinyabsol1's Avatar
shinyabsol1
Pokemon DarkJasper
 
Join Date: Aug 2010
Gender: Male
Nature: Careful
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  
Unread November 3rd, 2012, 03:02 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 21
Gender: Male
Nature: Modest
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  
Unread November 3rd, 2012, 03:22 AM
agentgeo's Avatar
agentgeo
うにゅ?
 
Join Date: Mar 2010
Age: 16
Gender: Male
Nature: Serious
This is a great little improvement!
Nice work.
__________________

Yay! My two hacking projects!
Oh, what fun!
Reply With Quote
  #12  
Unread November 3rd, 2012, 06:03 AM
itman
Back to ROM hacking. :D
 
Join Date: May 2007
Age: 19
Nature: Adamant
I look foward to Darthatron's research threads. ^.^

Definitely going to use this. :)
Reply With Quote
  #13  
Unread November 3rd, 2012, 07:56 AM
Ash493's Avatar
Ash493
Destiny cannot be changed...
 
Join Date: Jul 2008
Location: Tachiwaki City, Isshu
Age: 20
Gender: Male
Nature: Calm
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?
__________________

Previous Sign
Reply With Quote
  #14  
Unread November 3rd, 2012, 08:24 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 21
Gender: Male
Nature: Modest
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  
Unread November 3rd, 2012, 09:03 AM
PokémonShinySilver's Avatar
PokémonShinySilver
The Legendary Master of Light!
 
Join Date: Jan 2008
Location: Warrnambool, Victoria, Australia.
Age: 20
Gender: Male
Nature: Calm
Send a message via ICQ to PokémonShinySilver Send a message via AIM to PokémonShinySilver Send a message via Windows Live Messenger to PokémonShinySilver Send a message via Yahoo to PokémonShinySilver Send a message via Skype™ to PokémonShinySilver
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]
Researching the NDS ROMs...

sure does feel like a brand new adventure!

I'm really looking forward to learning how to understand what the hex values mean and how to create programs using Microsoft Visual Studio!

Always focus on the present, best thing to do! Never look back into the past and never worry about anything bad of the future!
Reply With Quote
  #16  
Unread November 3rd, 2012, 03:28 PM
Fireworks's Avatar
Fireworks
Please call me Crimson
 
Join Date: Feb 2011
Location: Scotland
Age: 17
Gender: Male
Nature: Quiet
Cool! I haven't played B2W2 yet but I'll definitely be using this :)
__________________

Because it should've won HotY.
Pear
Frodo Baggins
Twitter
Youtube
CBC
Reply With Quote
  #17  
Unread November 5th, 2012, 07:45 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 21
Gender: Male
Nature: Modest
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  
Unread November 10th, 2012, 12:17 AM
Pokemon Trainer Kevin's Avatar
Pokemon Trainer Kevin
IZAYAAAAAAA!!!!!!!!!!!!!! !!!!!
 
Join Date: Jan 2009
Location: ROM Hacking world
Age: 16
Gender: Male
Nature: Adamant
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!
__________________


White FC: 2021 8985 1561
Reply With Quote
  #19  
Unread November 26th, 2012, 12:29 PM
KyX
Unhatched Egg
 
Join Date: Nov 2012
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  
Unread November 26th, 2012, 12:44 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 21
Gender: Male
Nature: Modest
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  
Unread November 26th, 2012, 02:32 PM
KyX
Unhatched Egg
 
Join Date: Nov 2012
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  
Unread November 26th, 2012, 04:02 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 21
Gender: Male
Nature: Modest
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  
Unread February 24th, 2013, 07:37 AM
robin22gongon's Avatar
robin22gongon
Pocket Ninja; Coming Soon...
 
Join Date: Sep 2012
Location: Want to know? VM me.
Age: 15
Gender: Male
Nature: Quirky
Send a message via Windows Live Messenger to robin22gongon
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!
__________________
LET'S PARTY!
Reply With Quote
  #24  
Unread February 28th, 2013, 05:37 AM
Omega Zero's Avatar
Omega Zero
Is back...
 
Join Date: Dec 2009
Location: on a box in your boxes driveway.
Age: 15
Gender: Male
Send a message via Windows Live Messenger to Omega Zero Send a message via Yahoo to Omega Zero
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  
Unread March 8th, 2013, 11:59 PM
robin22gongon's Avatar
robin22gongon
Pocket Ninja; Coming Soon...
 
Join Date: Sep 2012
Location: Want to know? VM me.
Age: 15
Gender: Male
Nature: Quirky
Send a message via Windows Live Messenger to robin22gongon
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
__________________
LET'S PARTY!
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 UTC. The time now is 08:12 PM.


Style by Perdition Haze, artwork by Sa-Dui.
Like our Facebook Page Follow us on TwitterMessage Board Statistics | © 2002 - 2013 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2013 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User posts belong to the user.