• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Code: Port of the BW2 Repel system to GBA...

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. :)
 
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!
 
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.
 
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
 
Regarding the tiles messing up, the following byte changes appear to fix it:

Code:
080A1A5A: 00 00 00 00
080A1A68: 00 00 00 00

This is also posted in the first post.
 
Patch PLEASE! I really need it. It gets annoying when your repel expires and you have to go to your bag again just to use another.

Both myself and Darthatron firmly believe in not posting patches for this sort of stuff, unless it's simply too big to put into a small hack, like this. (An example of something too big to not make a patch for would be the 649 Patch).

It's the height of laziness to expect a patch for every little hack, especially when the actual work entailed in implementing this is little more than changing a few bytes with a hex editor and compiling a script.

So, since Darthatron will ignore you unless you actually try to do it, please take my advice. Try to do the hack yourself, and if you run into trouble, ask for Darth's help. I'm sure he'll be more than happy to oblige, but if you don't even try...

ETA: I plan to add this to the 649 Patch, assuming everything works. It's a very nice and logical addition to the game.
 
Last edited:
Both myself and Darthatron firmly believe in not posting patches for this sort of stuff, unless it's simply too big to put into a small hack, like this. (An example of something too big to not make a patch for would be the 649 Patch).

It's the height of laziness to expect a patch for every little hack, especially when the actual work entailed in implementing this is little more than changing a few bytes with a hex editor and compiling a script.

So, since Darthatron will ignore you unless you actually try to do it, please take my advice. Try to do the hack yourself, and if you run into trouble, ask for Darth's help. I'm sure he'll be more than happy to oblige, but if you don't even try...

ETA: I plan to add this to the 649 Patch, assuming everything works. It's a very nice and logical addition to the game.

I already tried to do it 12 times but every time I do it, this is what happens:
[PokeCommunity.com] Port of the BW2 Repel system to GBA...
 
Then ask for help! Don't ask for a patch. Trust me when I say there's a reason that both of us have this stance towards patches. Sadly, I can't help as I've never applied the hack, but you (in each if your posts in this thread, ignoring this one) have asked for a patch.

I'm simply trying to help get you into the right mindset for hacking. When you get to the stage that people like Darthatron and myself are at, there's no copping out, no asking for patches, we need to do everything ourselves.

It's not just you, it's the entire culture around this site, and likely many other hacking sites. People want things done for them, never thinking that the person who made the hack in the first place probably had to do it from scratch.
 
Then ask for help! Don't ask for a patch. Trust me when I say there's a reason that both of us have this stance towards patches. Sadly, I can't help as I've never applied the hack, but you (in each if your posts in this thread, ignoring this one) have asked for a patch.

I'm simply trying to help get you into the right mindset for hacking. When you get to the stage that people like Darthatron and myself are at, there's no copping out, no asking for patches, we need to do everything ourselves.

It's not just you, it's the entire culture around this site, and likely many other hacking sites. People want things done for them, never thinking that the person who made the hack in the first place probably had to do it from scratch.

Then help me, I'm just following the steps in the first post but that is what always happens. Can't you tell what I'm doing wrong? Also, Is this not possible for Pokemon Ruby?
 
I already tried to do it 12 times but every time I do it, this is what happens:
[PokeCommunity.com] Port of the BW2 Repel system to GBA...
When does this happen? After the repel has worn off? Does any text come up, or just that menu?
Then help me, I'm just following the steps in the first post but that is what always happens. Can't you tell what I'm doing wrong? Also, Is this not possible for Pokemon Ruby?
It's possible for Ruby, but nobody has ported it yet. Once I work out if this is bug free, I will probably try to port it myself.
 
When does this happen? After the repel has worn off? Does any text come up, or just that menu?

It's possible for Ruby, but nobody has ported it yet. Once I work out if this is bug free, I will probably try to port it myself.

Yeah it appears right after the repel expires and I count my steps so I'm pretty sure my repel expired and also no text come up, just that menu.

Also promise you would port it for Ruby. Thanks.
 
Yeah it appears right after the repel expires and I count my steps so I'm pretty sure my repel expired and also no text come up, just that menu.
Well in that case, the script is not being called correctly. Did you set the right pointer to the script?
Also promise you would port it for Ruby. Thanks.
I will promise nothing.
 
Well in that case, the script is not being called correctly. Did you set the right pointer to the script?

I will promise nothing.

Yes! I'm sure I set the right pointer correctly for the script!

Also that last line was corny don't mind that. But please if you discover it, please tell me. And if I would experiment porting it to Ruby, would the script be the same?

EDIT: I got it to work but it doesn't ask me if I want to use another, it automatically uses a repel. Oh! and is it natural that it doesn't tell you that your repel expired and you got no more repels left?

BTW, how do you discover this kind of things?
 
Last edited:
I got it to work but it doesn't ask me if I want to use another, it automatically uses a repel.
That's very odd. There's no call to the repel routine except for in the script when you select "Yes".
Oh! and is it natural that it doesn't tell you that your repel expired and you got no more repels left?
Well it doesn't tell you that you have none left, but you can edit that in yourself if you like, since I posted the script.
BTW, how do you discover this kind of things?
Through an advanced type of hacking called Assembly (or ASM for short). There are tutorials in the Tutorials section.

Might I ask how you got it to work?
 
LOL I realised I didn't repoint it correctly because back then I would put 80 00 00 but I realized that couldn't be right so I searched the internet on repointing in hex and I found that I should put 00 00 80 08!

I walk 249 steps (MAX REPEL) and I take another step as it should my repel expires, but a text box comes up and says "ROBIN used MAX REPEL." Just that nothing more.

This is what the script I compiled looks like:
Code:
'-----------------------
#org 0x800000
lock
checkitem 0x800E 0x1
compare LASTRESULT 0x1
if 0x4 goto 0x880001A
msgbox 0x8800035 '"Repel's effect wore off."
release
end

'-----------------------
#org 0x80001A
msgbox 0x880004F '"Repel's effect wore off...\nUse ano..."
closeonkeypress
compare LASTRESULT 0x1
if 0x1 goto 0x880002E
end

'-----------------------
#org 0x80002E
callasm 0x81BFB69
end


'---------
' Strings
'---------
#org 0x800035
= Repel's effect wore off.

#org 0x80004F
= Repel's effect wore off...\nUse another?

Oh and about the Assembly, I know just a little but how do you do that and how did you find out which is which and what is what I mean that's another game and you managed to see how it works! Do you have some kind of resources that would point you to where and what bytes to edit?

Sorry for so many questions. :P
 
LOL I realised I didn't repoint it correctly because back then I would put 80 00 00 but I realized that couldn't be right so I searched the internet on repointing in hex and I found that I should put 00 00 80 08!
I see. I figured it was that.
I walk 249 steps (MAX REPEL) and I take another step as it should my repel expires, but a text box comes up and says "ROBIN used MAX REPEL." Just that nothing more.
So it doesn't say "Repel's effect wore off."? It goes straight to "ROBIN used MAX REPEL."?
This is what the script I compiled looks like:
Code:
'-----------------------
#org 0x800000
lock
checkitem 0x800E 0x1
compare LASTRESULT 0x1
if 0x4 goto 0x880001A
msgbox 0x8800035[COLOR="Red"] 3[/COLOR] '"Repel's effect wore off."
release
end

'-----------------------
#org 0x80001A
msgbox 0x880004F[COLOR="Red"] 5[/COLOR] '"Repel's effect wore off...\nUse ano..."
closeonkeypress
compare LASTRESULT 0x1
if 0x1 goto 0x880002E
end

'-----------------------
#org 0x80002E
callasm 0x81BFB69
end


'---------
' Strings
'---------
#org 0x800035
= Repel's effect wore off.

#org 0x80004F
= Repel's effect wore off...\nUse another?
Perhaps the changes I marked in red will fix the problem? I don't even know how yours compiled. :\
Oh and about the Assembly, I know just a little but how do you do that and how did you find out which is which and what is what I mean that's another game and you managed to see how it works! Do you have some kind of resources that would point you to where and what bytes to edit?
The ROM is the resource. Read the tutorials. I didn't see how it worked in BW, I just wrote it how it should work.
Sorry for so many questions. :P
That's okay.
 
I tried it. It's still the same... Ugh! Just when I figured that 1 mistake!

EDIT: I rechecked in XSE the script and it's still the same the 3 and 5 disappears automatically. I also have tried to recompile it to another offset and guess what...

Spoiler:
 
I tried it. It's still the same... Ugh! Just when I figured that 1 mistake!

EDIT: I rechecked in XSE the script and it's still the same the 3 and 5 disappears automatically. I also have tried to recompile it to another offset and guess what...

Spoiler:

I really have no idea. Try it again on a clean ROM from scratch? Are you using the latest version of XSE (1.1.1, I think)?
 
Yeah I'm using XSE 1.1.1.

I'll try it and I'm gonna report in a few days since my internet subscription's gonna be cut.
 
Hey there, do you think it can work if I use the "This is the compiled version of the script for anyone having problems"? That one?
 
Back
Top