• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Development: Uncatchable Pokemon

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
I was just wondering if there was a way we could take special 0x156 for the ghost Pokemon battle in Fire Red and remove the beginning where it has the silph scope identify the ghost - basically just have it open up with the Pokemon identified and no ghost message.

This would be essentially the same as having an uncatchable Pokemon. I'm using JPAN's engine, which allows pretty much any Pokemon to appear, but I want to use it to make various special Pokemon appear in wild battles as actual Pokemon (not ghosts) that are not intended to be captured by the main hero

Having the silph scope or not shouldn't be a problem, since you can just give that to the player before the special and remove it afterwards.

I know there would be some ASM involved, but I'm hoping it wouldn't be overly complicated.
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
Would setting the catch rate to 0 (zero) not have the same effect? If not, I think it would be easier to add a "Branch if zero" command before the catch check routine. Using this seems a tad silly to me.
 

Banjora Marxvile

hOI!!!!!! i'm tEMMIE!!
3,496
Posts
15
Years
  • Age 30
  • Seen yesterday
Would setting the catch rate to 0 (zero) not have the same effect?

I think the idea is a special event sort of thing, where the Pokemon can be fought then, yet not captured, but other Pokemon of that can be caught later in the wild, like a Mew that you are advised not to catch early on, due to it needing to do something to balance everything out, yet able to catch it later on.
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
In that case, hacking the Pokeball routine to say "Now is not the time to use that..." if a flag is not set would probably be the best option. Frankly, changing the Ghost routine seems like a strange way of doing it. Not to mention it wouldn't work with Ruby/Sapphire/Emerald. :\
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
In that case, hacking the Pokeball routine to say "Now is not the time to use that..." if a flag is not set would probably be the best option. Frankly, changing the Ghost routine seems like a strange way of doing it. Not to mention it wouldn't work with Ruby/Sapphire/Emerald. :\

The Marowak/Ghost battle has a routine where, when you throw a Poke Ball, the Pokemon dodges to the side so the ball misses and a message is displayed that says "This Pokemon cannot be captured." That's what I want most of all. If the routine for when the Pokeball is thrown can be changed so that when a certain flag or variable is set, that routine will activate in Fire Red, that would be perfect.

I wish I knew how to locate/display different routines/assembly instructions in the game. If anyone knows the location of the Poke Ball routine and how to hack it to add the Marawak Poke Ball routine when a certain flag/variable is set, let me know.
 

Derlo

Tired....
135
Posts
16
Years
Wow..
I have done this routine for over a year ...

To do this simply just set a bite in the right place.
(dont remember where XD).

When I have free time, put a video of it here.

EDIT:


Is not complete.. i forgot inser the routine to remove the text of MAROWAK GHOsT. ^^v
 
Last edited:

sonic1

ASM is my life now...
77
Posts
15
Years
Yeah i remember this. Derlo, we both worked on this together, dont we remember (im darkrayquaza from myutsu).´

Actually im not in my usual Laptop of hacking, but i believe this is the offset (in ram): 02022B4C <-- Just mess around with values when you're in black screen right before the wild battle to get different effects. ;)

Derlo, confirm the offset plz

~Sonic1
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Yeah i remember this. Derlo, we both worked on this together, dont we remember (im darkrayquaza from myutsu).´

Actually im not in my usual Laptop of hacking, but i believe this is the offset (in ram): 02022B4C <-- Just mess around with values when you're in black screen right before the wild battle to get different effects. ;)

Derlo, confirm the offset plz

~Sonic1

Can you tell me exactly how I would go about changing the values in the ram?
 

sonic1

ASM is my life now...
77
Posts
15
Years
Go to tools menu in VBA and then go to memory viewer and in the blank box put the offset 02022B4C. Click enter and then edit the first 00 numbers that are in the memory viewer.

The reason you want to do this its because that changes the behaviour of the battle and its type. Example: if you set (exactly when the battle music starts, but before the black screen, WHEN THE VALUE IS 00 IN THAT OFFSET) 01 to that offset you get a wild double battle. if otherwise you put 08 to that offset, you get a trainerbattle (even if its a wildbattle!!). Find the value that makes the pokemon turn uncatchable. I already did that but i forgot what byte is....

~Sonic1
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Go to tools menu in VBA and then go to memory viewer and in the blank box put the offset 02022B4C. Click enter and then edit the first 00 numbers that are in the memory viewer.

The reason you want to do this its because that changes the behaviour of the battle and its type. Example: if you set (exactly when the battle music starts, but before the black screen, WHEN THE VALUE IS 00 IN THAT OFFSET) 01 to that offset you get a wild double battle. if otherwise you put 08 to that offset, you get a trainerbattle (even if its a wildbattle!!). Find the value that makes the pokemon turn uncatchable. I already did that but i forgot what byte is....

~Sonic1

Thanks, after some research I can say that it seems that 0x02022B4D is the byte that determines the ghost battle itself. If it's set to A0, B0, C0, D0, E0, or F0 it becomes an identified ghost (Silph Scope reveals it) Pokemon that can't be caught. If set to 80 or 90 it is the unidentifiable ghost which cannot be caught or battled.

Is this the information I need, and if so, what do I do with it?

EDIT: Also, interestingly, if you change the second part of the byte at that offset, it goes from the old man catching a wild Pokemon to a dialogue box that says "Items can't be used now" whenever you select "Bag."
 
Last edited:

sonic1

ASM is my life now...
77
Posts
15
Years
Well now you would need to search where is the routine (the part of it) that sets the byte at 02022B4C to 00. In case you haven't noticed yet, the routine writes values to that adress (Which i usually call Battle Flag, so lets call it for now on) 2 times. The first time its for resetting the flag to 00 and the second time is to ADD (NOT SET!! <--IMPORTANT!) a value depending the original event (trainer or wild battle).
To help you, here's the offset of the final write (the one that's going to decide what type of battle it is): 0801065C. At this location you're going to find an asm command "str r1 [r2, #0x0]". This is when the routine sets the the value for the battle. Make a branch there and change r1 into the value whatever A0 or whatever the value you need to put the ghost battle before that command is executed.

~sonic1
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Well now you would need to search where is the routine (the part of it) that sets the byte at 02022B4C to 00. In case you haven't noticed yet, the routine writes values to that adress (Which i usually call Battle Flag, so lets call it for now on) 2 times. The first time its for resetting the flag to 00 and the second time is to ADD (NOT SET!! <--IMPORTANT!) a value depending the original event (trainer or wild battle).
To help you, here's the offset of the final write (the one that's going to decide what type of battle it is): 0801065C. At this location you're going to find an asm command "str r1 [r2, #0x0]". This is when the routine sets the the value for the battle. Make a branch there and change r1 into the value whatever A0 or whatever the value you need to put the ghost battle before that command is executed.

~sonic1

^ But I want to remove the ghost part of the battle, like in the video Derio posted except without the Silph Scope message and transformation animation. The A0 value still causes all these things to happen - I need to alter the way the ghost battle itself works.
 

NarutoActor

The rocks cry out to me
1,974
Posts
15
Years
What I would do is have a check. If 0x8000 is set to 0x1 then go to the new edited version of the ghost battle, if not continue to the original ghost battle. That way you can have both routines, and have the new routine not be constricted by space.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Just bumping because I'm still interested in executing this, but still don't know what I'd need to do (what sort of routine I'd need to write and where the original routine is located) to alter the Marowak battle to remove the transforming sequence and the Ghost/Silph Scope text that appears.
 

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
Just bumping because I'm still interested in executing this, but still don't know what I'd need to do (what sort of routine I'd need to write and where the original routine is located) to alter the Marowak battle to remove the transforming sequence and the Ghost/Silph Scope text that appears.

Do you still NEED the Marowak transformation thing? If not, it would be slightly easier to do. Do you still need the Pokémon in question to dodge the Poké Ball, or do you just want it to be "uncatchable"? (What I mean by this is do you want to be able to get it in a Poké Ball, but can't catch it).

IIRC, there is a message isn't there? I think that'd be easy enough to hack.

Tell me the answers to the above stuff, and I'll see what I can do!
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Do you still NEED the Marowak transformation thing? If not, it would be slightly easier to do. Do you still need the Pokémon in question to dodge the Poké Ball, or do you just want it to be "uncatchable"? (What I mean by this is do you want to be able to get it in a Poké Ball, but can't catch it).

IIRC, there is a message isn't there? I think that'd be easy enough to hack.

Tell me the answers to the above stuff, and I'll see what I can do!

All I need is the Poke Ball being thrown and the message that says "This Pokemon cannot be caught" when you try to use a Poke Ball.

I don't want any transformations or transformation messages (A wild Ghost appeared; the Silph Scope identified the Ghost" etc.) - I want it to be like the ghost Marowak battle, except as if Marowak wasn't a ghost, lol.

Thanks in a advance for any help. :)
 

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
All I need is the Poke Ball being thrown and the message that says "This Pokemon cannot be caught" when you try to use a Poke Ball.

I don't want any transformations or transformation messages (A wild Ghost appeared; the Silph Scope identified the Ghost" etc.) - I want it to be like the ghost Marowak battle, except as if Marowak wasn't a ghost, lol.

Thanks in a advance for any help. :)

That sounds like a simple edit of the Pokéball throw routine actually. I assume all Poké Balls have a mutual check to have this effect in the Marowak battle, If I can edit this mutual check to include a variable check or something, It should be easy enough to replicate the dodge without any of the other stuff.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
That sounds like a simple edit of the Pokéball throw routine actually. I assume all Poké Balls have a mutual check to have this effect in the Marowak battle, If I can edit this mutual check to include a variable check or something, It should be easy enough to replicate the dodge without any of the other stuff.

Yes, it would be perfect if I could just have a routine that checks to see if a certain variable or flag is set, and when it is, have the wild Pokemon go into the dodge animation and the dialogue saying the Pokemon can't be captured box come up whenever a Poke Ball is thrown. I just don't know where the Poke Ball routine is located, or where the routine for the Poke Ball dodge in the ghost script is so that it can be called in a new routine.
 
94
Posts
13
Years
  • Seen Nov 2, 2016
To clear something up 02022b4c is value checked by several routines (for more than one thing). This value is set at the routine for special 0x156 (this routine is called by a special pokemon battle, not the special). It checks a word at 02022b4c, if the 3rd byte of the word is 80, you don't have the silph scope, marowak doesn't appear and can't be battled. If it's set it to A0 you do have the silph scope, marowak appears and can be battled. Either way, it is still uncatchable. Also I say "3rd byte of the word" but when the game writes the value, it writes it as a halfword.

Example of what the byte would look like: 0000A000, 00008004
Special 0x156 routine: 0807F904

If you go into a wild battle, and have it break at the first write to 02022b4c, then write 0000a000, you'll get the ghost to show up, and the marowak-animation sequence with an uncatchable pokemon. If you write 00008000, you'll get the ghost to show up, but you won't be able to identify or battle it. No matter what, the pokemon is uncatchable. So I'm sure that the catchable/uncatchable value is either stored somewhere completely different, or at 02022b4c at a different point in time.

Also, while testing, I found that setting the last byte to 1C will get you the tutorial battle with Gary/Oak.

The script that the marowak uses: 081634B8
Spoiler:


Special 0x156 is never used, but it's routine is called by the wildbattle2 (or it could be one of the two other special commands for all I know).

0807F730 is a check for a regular pokemon vs wild ghost pokemon battle. If 0 is set then 0 is stored at 02022b4c and you get a regular battle, if 1 is set then you get a unidentified ghost pokemon battle.

Also while messing around, I found out that the tutorial battle vs gary happens when you set the last byte equal to 1c. It does take priority over the ghost battles so that gets mention.

EDIT: I've figured out how make a pokemon uncatchable.
During a battle set the word 02022b4c equal to 0x8000. After refreshing the battle(go into your bag or something), it becomes an uncatchable ghost.

If you set it to 0xA000 however, it becomes an uncatchable pokemon.

It's worth mention that setting it to 0x2000 does not make a pokemon uncatchable. So it's not 1 bit that makes it uncatchable.

0x8000 - (00000000000000001000000000000000) Uncatchable ghost, does not change the name to ghost though.
0xA000 - (00000000000000001010000000000000) Uncatchable pokemon.
0x2000 - (00000000000000000010000000000000) I speculated that it would make the pokemon uncatchable but it does NOT. YOU get a regular battle, a catchable pokemon if you set it equal to this.

- However, the problem with setting it equal to 0xA000 before the battle is the text still prints that a "ghost appears" and then it goes through the animation and prints "it was a mother marowak."
- I think the bit set with 0x2000 is the silph scope bit somehow.
 
Last edited:

sonic1

ASM is my life now...
77
Posts
15
Years
NintendoBoyDX, In the memory viewer please set to 8bit, so you can see the offsets of my table.
bdf3834a998dbbc4a5e1faa5d66266f0.png


Thats basically what you can mess with the battles.

Hope this helps, because i want this feature too, for my own researchs.

~Sonic1
 
Last edited:
Back
Top