The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Nature Coloured Stats Help (https://www.pokecommunity.com/showthread.php?t=467073)

Tacobell24 March 4th, 2022 5:13 PM

Nature Coloured Stats Help
 
[SOLVED] I've had a look at the routines for the nature coloured stats and I'm a little stumped.

UPDATE: I worked it out. It was the "//add r2, #0x3C" that was preventing it from working.
The orig poster combining C and ASM syntax obviously

However, a new issue has occurred where if the nature is a speed based one, the EXP is also coloured either red or blue.

Any ideas how to fix it?


I've changed the pointers at the bottom for the text colours to locaitons that contain the required bytes of data, but it just will not compile when I try to use my thumb compiler

here's my code for the attack stat
Code:

.thumb
@ 00 49 08 XX XX XX XX at x137134

ldr r1, [r2]
ldrb r2,[r1,#4]
add r2, #0x3C
lsl r2,r2,#0x18
lsr r2,r2,#0x18
push {r0-r3}
ldr r0, =(0x0203B140)
ldr r0, [r0]
ldr r2, =(0x3290)
add r0, r0, r2
mov r1, #0
bl decryptbranch
bl getnaturebranch
cmp r0, #1 @ Lonely
beq red
cmp r0, #2 @ Brave
beq red
cmp r0, #3 @ Adamant
beq red
cmp r0, #4 @ Naughty
beq red
cmp r0, #5 @ Bold
beq blue
cmp r0, #10 @ Timid
beq blue
cmp r0, #15 @ Modest
beq blue
cmp r0, #20 @ Calm
beq blue

black:
ldr r6, blackfont
b end

red:
ldr r6, redfont
b end

blue:
ldr r6, bluefont

end:
pop {r0-r3}
ldr r1, =(0x0813713c+1)
bx r1

decryptbranch:
ldr r2, =(0x0803FBE8+1)
bx r2

getnaturebranch:
ldr r2, =(0x08042EB4+1)
bx r2

.align 2
blackfont: .word 0x08463FA4 @ In a vanilla FR ROM, this contains: 00 0E 0A 00
redfont: .word 0x084917C4 @ ROM location that contains: 00 01 0A 00
bluefont: .word 0x0834F84C @ ROM location that contains: 00 07 0A 00


Appreciate the help.
Thanks Team.


All times are GMT -8. The time now is 9:19 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.