Blah
Free supporter
- 1,924
- Posts
- 12
- Years
- Unknown Island
- Seen Feb 19, 2025
Pokemon Obedience via Level and Happiness!
How it works:
If your Pokemon outlevels the level your badges say you can control, it will disobey you if it's unhappy. The concept was pretty simple sounding, but there was a lot of work that went into it. This should keep some similarities to the anime.
I should note that if your Pokemon loves you, and you don't have the badge to train it, it will still listen to you :3
This one is called love.asm
How to insert:
Compile and insert into freespace the following code:
Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
main:
mov r4, #0x82
lsl r4, r4, #0x4
mov r2, #0x0
badgeLoop:
mov r0, r4
ldr r6, =(0x806E6D0 +1)
bl linkerOne
cmp r0, #0x1
bne trainLevel
add r4, r4, #0x1
add r2, r2, #0x1
cmp r2, #0x8
beq obey
b badgeLoop
trainLevel:
@no flags set = lvl 20. Increment by 10 per additional flag
mov r0, #0xA
mov r2, #0x82
lsl r2, r2, #0x4
sub r4, r4, r2
mul r4, r4, r0
add r4, #0x14
PokemonLevel:
ldrh r0, [r5]
mul r0, r7
ldr r6, = (0x2024284)
add r0, r0, r6
mov r1, #0x38
ldr r6, = (0x803FBE8 +1)
bl linkerOne
cmp r0, r4
ble obey
isHappy:
@if it loves you and you don't have badges, it will obey
@if it doesn't love you and you don't have badges it will disobey
ldrh r0, [r5]
mul r0, r7
ldr r6, = (0x2024284)
add r0, r0, r6
mov r1, #0x20
ldr r6, =(0x803FBE8 +1)
bl linkerOne
cmp r0, #0x7F @this is half possible of max happiness tone to your liking
bls disobey
obey:
mov r0, #0x1
b end
disobey:
ldr r0, =(0x801D414 +1) @you can simply mov r0 to 0x0 too
bx r0
end:
mov r2, #0x0
ldr r1, =(0x801D42A +1)
bx r1
linkerOne:
bx r6
.align 2
Here's a compiled version:
Code:
82 24 24 01 00 22 20 1C 15 4E 00 F0 28 F8 01 28 04 D1 01 34 01 32 08 2A 1A D0 F4 E7 0A 20 82 22 12 01 A4 1A 44 43 14 34 28 88 78 43 0D 4E 80 19 38 21 0D 4E 00 F0 13 F8 A0 42 09 DD 28 88 78 43 08 4E 80 19 20 21 08 4E 00 F0 09 F8 7F 28 01 D9 01 20 01 E0 05 48 00 47 00 22 05 49 08 47 30 47 D1 E6 06 08 84 42 02 02 E9 FB 03 08 15 D4 01 08 2B D4 01 08
Navigate to 0x1D3E0 and insert:
Code:
00 48 00 47 XX XX XX 08
I should mention there was a little bit of this routine which I'm skipping over. Basically it checks if the Pokemon is a Mew or Deoxys. It then checks if the Mew/Deoxys has it's obedience set. I find the need for this non-existent because the obedience is checked by happiness and badges my way. In the end, if you want to keep these two (rather pointless) checks, insert at 0x1D406.
Sorry for the double post. I want to keep my routines on separate posts to help in formatting the first post's index :x
Requested here: https://www.pokecommunity.com/posts/8510180/
I made a special exception and decided to do it for her here
Last edited: