- 10
- Posts
- 7
- Years
- Seen Feb 8, 2025
originally posted by FBI
Trainer Capture toggle by Pokeball
What this does right now, if check if the thrown Pokeball is a masterball. If it is, allow capture. If it's not a masterball then the normal "trainer has blocked the ball" will occur. To change which ball toggles the capture look at my comments in the code and change 0x1 - masterball to something else of your choice.
Taken from XSE:
#define ITEM_MASTERBALL 0x1
#define ITEM_ULTRABALL 0x2
#define ITEM_GREATBALL 0x3
#define ITEM_POKEBALL 0x4
#define ITEM_SAFARIBALL 0x5
#define ITEM_NETBALL 0x6
#define ITEM_DIVEBALL 0x7
#define ITEM_NESTBALL 0x8
#define ITEM_REPEATBALL 0x9
#define ITEM_TIMERBALL 0xA
#define ITEM_LUXURYBALL 0xB
#define ITEM_PREMIERBALL 0xC
How to insert:
Compile and insert the following routine into freespace:
.text
.align 2
.thumb
.thumb_func
main:
ldr r0, .Ball
ldrb r0, [r0]
cmp r0, #0x1 @masterball
beq capture
mov r0, #0x0
mov r1, #0x5
ldr r3, =(0x800E194 +1)
bl linker
ldr r0, =(0x802D4A0 +1)
bx r0
capture:
ldr r0, =(0x802D4B4 +1)
bx r0
linker:
bx r3
.align 2
.Ball:
.word 0x2023D68
Here is a compiled version:
06 48 00 78 01 28 06 D0 00 20 05 21 04 4B 00 F0 04 F8 04 48 00 47 04 48 00 47 18 47 68 3D 02 02 95 E1 00 08 A1 D4 02 08 B5 D4 02 08
Now navigate to 0x2D498 and insert the following:
00 48 00 47 XX XX XX 08
Where XX XX XX is the reverse hex pointer +1 of where you inserted the routine.
Usage:
No usage! It's all done with the power of ASMAGIX!
My problem is that I'm not able to insert the line
00 48 00 47 MyOFFSET 08 correctly at 0x2d498 because the bytes in my rom must be at another offset than 0x2D498
I got it working so i'm able to catch trainers Pokemon but the Problem is that I'm able to use every ball to catch it but want just one set Ball for that
If someone got this asm script working by inserting it at 0x2d498 would be nice if someone could tell me the bytes that are located at 0x2d498.
I could then simply find the bytes with the hexeditor in my fire red version.
solved found it myself
Is there maybe a way to get this work in the German Version?
Trainer Capture toggle by Pokeball
What this does right now, if check if the thrown Pokeball is a masterball. If it is, allow capture. If it's not a masterball then the normal "trainer has blocked the ball" will occur. To change which ball toggles the capture look at my comments in the code and change 0x1 - masterball to something else of your choice.
Spoiler:
Taken from XSE:
#define ITEM_MASTERBALL 0x1
#define ITEM_ULTRABALL 0x2
#define ITEM_GREATBALL 0x3
#define ITEM_POKEBALL 0x4
#define ITEM_SAFARIBALL 0x5
#define ITEM_NETBALL 0x6
#define ITEM_DIVEBALL 0x7
#define ITEM_NESTBALL 0x8
#define ITEM_REPEATBALL 0x9
#define ITEM_TIMERBALL 0xA
#define ITEM_LUXURYBALL 0xB
#define ITEM_PREMIERBALL 0xC
How to insert:
Compile and insert the following routine into freespace:
Spoiler:
.text
.align 2
.thumb
.thumb_func
main:
ldr r0, .Ball
ldrb r0, [r0]
cmp r0, #0x1 @masterball
beq capture
mov r0, #0x0
mov r1, #0x5
ldr r3, =(0x800E194 +1)
bl linker
ldr r0, =(0x802D4A0 +1)
bx r0
capture:
ldr r0, =(0x802D4B4 +1)
bx r0
linker:
bx r3
.align 2
.Ball:
.word 0x2023D68
Here is a compiled version:
06 48 00 78 01 28 06 D0 00 20 05 21 04 4B 00 F0 04 F8 04 48 00 47 04 48 00 47 18 47 68 3D 02 02 95 E1 00 08 A1 D4 02 08 B5 D4 02 08
Now navigate to 0x2D498 and insert the following:
00 48 00 47 XX XX XX 08
Where XX XX XX is the reverse hex pointer +1 of where you inserted the routine.
Usage:
No usage! It's all done with the power of ASMAGIX!
My problem is that I'm not able to insert the line
00 48 00 47 MyOFFSET 08 correctly at 0x2d498 because the bytes in my rom must be at another offset than 0x2D498
I got it working so i'm able to catch trainers Pokemon but the Problem is that I'm able to use every ball to catch it but want just one set Ball for that
If someone got this asm script working by inserting it at 0x2d498 would be nice if someone could tell me the bytes that are located at 0x2d498.
I could then simply find the bytes with the hexeditor in my fire red version.
solved found it myself
Is there maybe a way to get this work in the German Version?
Last edited: