The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle 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!
Research & Development programs in this forum are subject to moderator approval before they are displayed.


Reply
 
Thread Tools
  #1    
Old November 2nd, 2012, 07:40 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
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 01:05 AM. Reason: Fix for tiles messing up finally posted.
Reply With Quote
  #2    
Old November 2nd, 2012, 12:56 PM
NarutoActor's Avatar
NarutoActor
The rocks cry out to me
Community Supporter
 
Join Date: Jan 2009
Location: Brooklyn/Marlboro
Age: 20
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
__________________
~There are those people who understand hex, F the rest
Reply With Quote
  #3    
Old November 2nd, 2012, 12:59 PM
SSJ4 Furanki's Avatar
SSJ4 Furanki
Got my Zoroark and everything!
 
Join Date: Jul 2006
Age: 21
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:
DarkCopper (Only at 1st Gym Area)

My X/Y Team:


Last edited by SSJ4 Furanki; November 2nd, 2012 at 01:48 PM.
Reply With Quote
  #4    
Old November 2nd, 2012, 01:08 PM
Team Fail's Avatar
Team Fail
The fine line between in|sanity
Community Supporter
 
Join Date: May 2009
Age: 19
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.
__________________

Pairs:
Kevin, Echidna
Follow me on Twitter! @TeamFail
Alt 1, リザードン
Miiverse
Pokémon Hackers Online
Alt 2: Jack Cayman



[04:20.39] <@GoGo> I WILL INSERT WITH PLEASURE
[04:20.45] <@GoGo> shut it Bela

[05:41.55] <Team_Fail> Blue Spider is interesting, but #MEHMasterRace
[05:42.20] <diegoisawesome> Team_Fail: Sounds like a bunch of unmotivated people that still want to try to take over the world
Reply With Quote
  #5    
Old November 2nd, 2012, 01:15 PM
Nintendork15
I'm gone. Bye.
 
Join Date: Feb 2009
Location: Undertaker. Co.
Age: 19
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    
Old November 2nd, 2012, 01:32 PM
Thundrake
 
Join Date: Jan 2008
Gender:
080A19F6: 1C
080A19F6: 11

This can't be right, can it?
Reply With Quote
  #7    
Old November 2nd, 2012, 01: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    
Old November 2nd, 2012, 02:14 PM
tajaros's Avatar
tajaros
Hi I'm dawg
 
Join Date: Apr 2012
Location: Philippines
Age: 15
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    
Old November 2nd, 2012, 02:50 PM
shinyabsol1's Avatar
shinyabsol1
Pokemon DarkJasper!?
 
Join Date: Aug 2010
Gender: Male
Nature: Calm
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, 07:02 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
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    
Old November 2nd, 2012, 07:22 PM
itari's Avatar
itari
Community Supporter
 
Join Date: Mar 2010
Location: 渦潮隠れの里
Age: 17
Gender: Female
Nature: Relaxed
This is a great little improvement!
Nice work.
__________________
Reply With Quote
  #12    
Old November 2nd, 2012, 10:03 PM
itman
Back to ROM hacking. :D
 
Join Date: May 2007
Age: 20
Nature: Adamant
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
Memento Mori
Community Supporter
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 21
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?
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
Reply With Quote
  #14    
Old November 3rd, 2012, 12:24 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
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    
Old November 3rd, 2012, 01:03 AM
Platinum Lucario's Avatar
Platinum Lucario
The Legendary Master of Light!
Community Supporter
 
Join Date: Jan 2008
Location: Warrnambool, Victoria, Australia.
Age: 21
Gender: Male
Nature: Calm
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    
Old November 3rd, 2012, 07:28 AM
Crimson5M's Avatar
Crimson5M
what
Community Supporter
 
Join Date: Feb 2011
Location: Scotland
Age: 18
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    
Old November 4th, 2012, 11:45 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
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    
Old November 9th, 2012, 04:17 PM
Pokemon Trainer Kevin's Avatar
Pokemon Trainer Kevin
 
Join Date: Jan 2009
Location: ROM Hacking world
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!
Reply With Quote
  #19    
Old November 26th, 2012, 04:29 AM
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    
Old November 26th, 2012, 04:44 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
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    
Old November 26th, 2012, 06:32 AM
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    
Old November 26th, 2012, 08:02 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
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    
Old February 23rd, 2013, 11:37 PM
robin22gongon's Avatar
robin22gongon
 
Join Date: Sep 2012
Location: Want to know? VM me.
Age: 16
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    
Old February 27th, 2013, 09:37 PM
Omega Zero's Avatar
Omega Zero
Is back...
Community Supporter Tier 4
 
Join Date: Dec 2009
Location: I'm always living aren't I?
Age: 16
Gender: Male
Nature: Relaxed
Send a message via Skype™ 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    
Old March 8th, 2013, 03:59 PM
robin22gongon's Avatar
robin22gongon
 
Join Date: Sep 2012
Location: Want to know? VM me.
Age: 16
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 12:58 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 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 generated content remains the property of its creator.