• 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.

Pokéball hacking guide

kearnseyboy6

Aussie's Toughest Mudder
300
Posts
15
Years
  • Seen Jun 22, 2019
Coolio! Got it working, I had particle tags and ball tags using the same tag number which is a big NONO! Thanks Daniils.

Note using Bela's balls in the tutorial you will notice that the balls don't occupy 15 colours. But they all need to be non-black otherwise the particles will be black.

EDIT:
Spoiler:


EDIT 2: That is wrong, they are all tied to the Pal7 ut I have no idea why the extended balls don't work.
 
Last edited:

kearnseyboy6

Aussie's Toughest Mudder
300
Posts
15
Years
  • Seen Jun 22, 2019
Here is a list of Gen II pokeballs and their respective ASM routines:

NOTE: Please change the basestats and pokedex locations in your ROM, they will be different!!

Bag_Fast_Ball_Sprite.png
Fast Ball:
Spoiler:


Bag_Friend_Ball_Sprite.png
Friendball:
Spoiler:


Bag_Heavy_Ball_Sprite.png
Heavyball:
Spoiler:


Bag_Level_Ball_Sprite.png
Levelball:
Spoiler:


Bag_Love_Ball_Sprite.png
Loveball:
Spoiler:


Bag_Lure_Ball_Sprite.png
Lureball:
Spoiler:


Bag_Moon_Ball_Sprite.png
Moonball:
Spoiler:
 
11
Posts
9
Years
  • Age 29
  • Seen Apr 9, 2016
Take the index number of the item, multiply it by 0x2C, then add to it the offset of the item data and finally, add to that 0x1B, and you have the pokeball index field.

I don't understand this...
 

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
I don't understand this part?

What are these offsets for?
Now, in the code you see "somevar". There you must place an address (or use this one I saw in JPAN's original routine) that will keep track of the current pokeball index. Other than in the routine, there are a few places you need to place a pointer to it:
0802D500
0802D544
0802D6A0
0802D71C
0802D7B8
080EF4B4
080EF4DC
080EF674
080EF9AC
080F0368

then, should Insert this routine
.text
.align 2
.thumb
.thumb_func
.global ballchecker

main:
push {lr}
ldr r1, throwtablepositionstable
add r0, r0, r1
ldrb r0, [r0]
pop {pc}

shoild I insert it at 080EF52C or the reversed- pointer?
 

daniilS

busy trying to do stuff not done yet
409
Posts
10
Years
  • Age 24
  • Seen Jan 29, 2024
I don't understand this part?

What are these offsets for?
It literally says this in the part you quoted:
Now, in the code you see "somevar". There you must place an address (or use this one I saw in JPAN's original routine) that will keep track of the current pokeball index. Other than in the routine, there are a few places you need to place a pointer to it:
At each of those offsets, put a pointer to the address of somevar.
then, should Insert this routine


shoild I insert it at 080EF52C or the reversed- pointer?
Literally quoting the part right after the routine again:
Assemble this routine and insert it at 080ef52C.
 

daniilS

busy trying to do stuff not done yet
409
Posts
10
Years
  • Age 24
  • Seen Jan 29, 2024
Question: Is it possible to make Critial Captures like in GEN. 6?
Also another question: is it possible to make routes/ maps, where youre capture rate is 100%?

100% rate on certain maps shouldn't be hard to do with a little ASM. Critical capture seems harder.
 
275
Posts
8
Years
Man, can I edit existing Pokéballs without adding new ones?
I mean, with an Item Editor, much can be done (name, image and palettes, animation). But the catch rate and effects (like the healing ball), I don't know how to.
I'm working on a code based on your Healing Ball, but I don't know how to simply implement it on every existing Pokéball... Nor changing their catch rates, that is.
Do you know how I can add a healing effect on a regular Pokéball? Or will I have to add new Pokéballs and swap them in-game?
Thanks for the help. =D
 

daniilS

busy trying to do stuff not done yet
409
Posts
10
Years
  • Age 24
  • Seen Jan 29, 2024
Man, can I edit existing Pokéballs without adding new ones?
I mean, with an Item Editor, much can be done (name, image and palettes, animation). But the catch rate and effects (like the healing ball), I don't know how to.
I'm working on a code based on your Healing Ball, but I don't know how to simply implement it on every existing Pokéball... Nor changing their catch rates, that is.
Do you know how I can add a healing effect on a regular Pokéball? Or will I have to add new Pokéballs and swap them in-game?
Thanks for the help. =D

You can easily change the ball index check in the healing routine, or remove it altogether if you want it to work for every ball.
 
275
Posts
8
Years
You can easily change the ball index check in the healing routine, or remove it altogether if you want it to work for every ball.

This effect was written by me for the Heal Ball:
Spoiler:

In this code you must change the values at the ball index and somevar. Then assemble it and insert it anywhere. To activate it, place 00 4B 9F 46 XX XX XX XX at 08040B08, where XXXXXXXX is an inverted pointer to this routine.

Basically, I just need to make this code, and delete the ball index check so it works for all Pokéballs? No need to do nothing beyond the special effect itself?
Also, can I, instead of fully healing the Pokémon, I just add "(Maximum HP)/2" to the Current HP?
Not healing condition status in the process?
I see the "healpoke" seems to be a word the game already has that must probably be used when you are at a Pokémon Center. Just to make sure, if I want it to heal half it's HP, I'll have to write a new ASM routine for half healing a Pokémon or I can just change this code you did?
After you told me to learn ASM, I went for some help. Just started this week to practice, but I keep using other programming logics. ASMing doesn't seem to work like other programming languages. It's hard getting the hang of it. =P
 
Last edited:

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
I don't understand this...

Take the index number of the item, multiply it by 0x2C, then add to it the offset of the item data and finally, add to that 0x1B, and you have the pokeball index field.

You need that if you had repointed the Item data in your rom, because, afaik, only Complete Item Editor has a "Ball Slot" feature, other than CIE, no other tools let you edit the ball slot, but that's not a big issue, just open the tool in Hex editor then goto 0x1b00 then change the pointer in your repointed item table
 

~SAGE

Peruvian Rom Hacker
39
Posts
9
Years
I have a doubt

tumblr_nudljbkiTr1tp2yqno1_250.jpg


At the step 2:
should i to replace the bytes at these offsets (the currently bytes are 68 3D 02)
with the pointer where i place the routine of the step 2?
 
5,256
Posts
16
Years
A bug I've encountered with this hack is the Egg summary screen. Basically immediately upon loading, the game resets, but in the nanosecond before it crashing you can see the Egg's Poké Ball sprite is instead displayed as a glitched mess. I feel like this could be the case of small missed limiter or pointer of some sort, but I'm not sure where to look. I've also double-checked that I've implemented all the repointing and whatnot correctly, and as far as I can see it's correct.

(oh also it's Poké Ball not Pokéball)
 

jiangzhengwenjzw

now working on katam
181
Posts
11
Years
  • Seen today
I have a doubt

tumblr_nudljbkiTr1tp2yqno1_250.jpg


At the step 2:
should i to replace the bytes at these offsets (the currently bytes are 68 3D 02)
with the pointer where i place the routine of the step 2?

No, you should replace them with the pointer to the EWRAM offset indicated by the label "somevar" in the routine.

A bug I've encountered with this hack is the Egg summary screen. Basically immediately upon loading, the game resets, but in the nanosecond before it crashing you can see the Egg's Poké Ball sprite is instead displayed as a glitched mess. I feel like this could be the case of small missed limiter or pointer of some sort, but I'm not sure where to look. I've also double-checked that I've implemented all the repointing and whatnot correctly, and as far as I can see it's correct.

(oh also it's Poké Ball not Pokéball)

I've encountered the same problem, as when I went into the egg screen the screen simply faded black.
I think there may be something wrong in step I, because he has edited the Pokemon decrypter and encrypter.

Edit: not sure now, as I've disassembled the code but I've found no problem.
 
Last edited:

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
A bug I've encountered with this hack is the Egg summary screen. Basically immediately upon loading, the game resets, but in the nanosecond before it crashing you can see the Egg's Poké Ball sprite is instead displayed as a glitched mess. I feel like this could be the case of small missed limiter or pointer of some sort, but I'm not sure where to look. I've also double-checked that I've implemented all the repointing and whatnot correctly, and as far as I can see it's correct.

(oh also it's Poké Ball not Pokéball)

This is actually a super easy fix. In step Four Part 1, Daniils says that the zero-th entry of the conversion table is unused. It actually is used by Eggs. So just replace the FF with 00, and its fixed.

Hope this helps everyone.
 

kearnseyboy6

Aussie's Toughest Mudder
300
Posts
15
Years
  • Seen Jun 22, 2019
A crucial part this tutorial is missing is the expansion of the Ball Pocket. As there is only 13 balls allowed in this pocket currently. This won't work if you want to keep all Gen III balls and add in other balls. So here is how to fix it.

The bag routine is located at 0x099E44. Next insert this ASM anywhere (as long as you update your offsets):

Code:
.text
.align 2
.thumb
.thumb_func
.global ball_pocket_hack

main:
ldr r0, ram_FREE
str r0, [r1, #0x10]
mov r0, [B]#0xNUMBER OF BALLS[/B]
strb r0, [r1, #0x14]
add r3, [B]#0x (4x the number of balls you chose)[/B]
ldr r0, return
bx r0

.align
ram_FREE:	.word 0x0203c000
return:	.word 0x08099E6C+1

Then goto 0x099E64 and insert
01 48 00 47 00 00 FF FF FF 08 where:
FF FF FF 08 is the pointer of the asm location+1

You will have to restart the save file. No exceptions.

Alternatively (also more time consuming) you can expand/relocate the TM's/HM's. Then you can just change these bytes as the space you will be overwriting has been moved (TM's follow the ball pocket space allocation):

0x099E66 - Number of balls
0x099E6A - Number of balls x4
 

Froosty

The_Learner
535
Posts
9
Years
Spoiler:

After inserting the routines, take your ball index, substract six of it, multiply by four, and add to the new offset of the table. Place the offset where you inserted your routine there.
Here comes the part JPAN didn't document: animations. And be prepared, it's a long part.
I didnt get this part !!!!

Spoiler:
Spoiler:
Spoiler:
Spoiler:
Spoiler:
Spoiler:

and also I didnt understood the most of the "step:four.... expanding throwing graphics part"
in the step four for for part 1-4 there are different tables located.. do I need to repoint all the tables there...

and basically, I am also confused with the ball index... is it the index as seen in the G3T item manager...
as for master ball(0), pokeball (1) ????

anyone who know to do this pls help me.. I feel like adding the balls but I am basically stuck at step four.... :(
 
51
Posts
9
Years
  • Age 33
  • Seen Nov 18, 2023
I create a patch for Pokemon Fire Red (U) v1.0, with "all" balls

level ball F1
esca ball F2
luna ball F3
friend ball F4
love ball F5
peso ball F6
rapid ball F7
cura ball F8
velox ball F9
scuro ball FA
pregio ball FB
parco ball FC

with all animations (I created all animations ;D) and descriptions (sorry but I traslated all in italian), and I implemented another ball: the rocket ball! (FD)
With this ball you can catch the trainers' pokémon (Yes, you can! xD). This ball has the animation, but not the sprite...sorry, you must insert it...
If you catch a trainer's pokémon with this ball the battle end.
The offset is 0x8C00000

Download:

Pokéball Expansion

Credits:
daniilS - tutorial
FBI - rocket ball routine
Bella - ball animations
eMMe97 (me) - another ball animations, fix a "bad egg" bug

P.S. sorry for my bad english :S
 
Back
Top