Male
Seen July 29th, 2018
Posted December 5th, 2016
39 posts
6.4 Years
Hello, since the EXP. Gain canceller had been effin'ly implemented, it's good to have MONEY gain and reduce canceller so that we can make a Battle frontier-like event.
Request
Temporarily disabling prize money from battle

(Only works in FireRed)

Here is a routine that will prevent you from getting money after you won a battle against a trainer. Good for tournament-style battles, where it makes no sense that you get or lose money.

How to insert:

Compile and insert this routine anywhere into free space:
Spoiler:
.text
.align 2
.thumb
.thumb_func

main:
    push {r0-r3}
    mov r0, #0xFF
    lsl r0, r0, #0x1
    add r0, r0, #0x5
    ldr r2, =(0x806E6D0 +1)
    bl linker
    cmp r0, #0x1
    beq skip
    pop {r0-r3}
    mov r0, #0x0
    mov r1, r8
    ldr r0, [r1]
    mov r1, #0xa4
    lsl r1, r1, #0x2
    add r0, r0, r1
    add r1, r4, #0x0
    ldr r2, =(0x809FDA0 +1)
    bl linker
    ldr r1, =(0x8025A00 +1)
    bx r1
    
skip:
    pop {r0-r3}
    mov r0, #0x0
    mov r1, r8
    ldr r0, [r1]
    mov r1, #0xa4
    lsl r1, r1, #0x2
    add r0, r0, r1
    add r1, r4, #0x0
    ldr r1, =(0x8025A00 +1)
    bx r1
    
linker:
    bx r2
    
.align 2
(not really space saving, i know...)

Compiled:
0F B4 FF 20 40 00 05 30 0E 4A 00 F0 19 F8 01 28 0C D0 0F BC 00 20 41 46 08 68 A4 21 89 00 40 18 21 1C 09 4A 00 F0 0C F8 08 49 08 47 0F BC 00 20 41 46 08 68 A4 21 89 00 40 18 21 1C 03 49 08 47 10 47 C0 46 D1 E6 06 08 A1 FD 09 08 01 5A 02 08

Now navigate to 0x0259E8 and insert following bytes:
00 48 00 47 XX XX XX 08
Where XX XX XX is the location of the routine you inserted + 1.


Next compile and insert this routine into free space:
Spoiler:
.text
.align 2
.thumb
.thumb_func

main:
    mov r0, #0xFF
    lsl r0, r0, #0x1
    add r0, r0, #0x5
    ldr r2, =(0x806E6D0 +1)
    bl linker
    cmp r0, #0x1
    beq skip
    add r0, r4, #0x0
    ldr r2, =(0x809fdd8 +1)
    bl linker
    
skip:
    ldr r2, =(0x80a0058 +1)
    bl linker
    ldr r2, =(0x8054BEA +1)
    
linker:
    bx r2
    
.align 2
Compiled:
FF 20 40 00 05 30 07 4A 00 F0 0A F8 01 28 03 D0 20 1C 05 4A 00 F0 04 F8 04 4A 00 F0 01 F8 04 4A 10 47 C0 46 D1 E6 06 08 D9 FD 09 08 59 00 0A 08 EB 4B 05 08

Finally navigate to 0x054BE0 and insert following bytes where XX XX XX is the location of the second routine +1:
00 48 00 47 XX XX XX 08
This thing requires two routines, that's because the money gets reduced when you black out while the prize money is gained after the message appears. These are two different places so there have to be two different functions :P


At last you should also want to remove the text that appears after winning/losing that informs you about the money you gained/lost. You need another routine for that. Compile and insert into free space:
Spoiler:

.text
.align 2
.thumb
.thumb_func

main:
    ldr r0, =(0x83fb432)
    cmp r2, r0
    beq checkflag
    ldr r0, =(0x83fb4f6)
    cmp r2, r0
    beq checkflag
    b noskip

checkflag:
    mov r0, #0xFF
    lsl r0, r0, #0x1
    add r0, r0, #0x5
    ldr r3, =(0x806E6D0 +1)
    bl linker
    cmp r0, #0x1
    beq skip

noskip:
    ldr r0, =(0x202298C)
    mov r1, #0x0
    ldr r3, =(0x80D87BC +1)
    bl linker
    
skip:
    ldr r0, =(0x8032B4C +1)
    bx r0
    
linker:
    bx r3

.align 2
Compiled:
0B 48 82 42 03 D0 0B 48 82 42 00 D0 07 E0 FF 20 40 00 05 30 08 4B 00 F0 09 F8 01 28 04 D0 07 48 00 21 07 4B 00 F0 02 F8 06 48 00 47 18 47 C0 46 32 B4 3F 08 F6 B4 3F 08 D1 E6 06 08 8C 29 02 02 BD 87 0D 08 4D 2B 03 08

Now change the bytes at 0x032B44 to following (XX XX XX) is the location of this last routine:
00 48 00 47 XX XX XX 08
How to use:

In order to disable prize money you have to set the flag 0x203.
If you want to reenable it just clear the flag and you will get money again.
I should type my signature now but lazy people nev