The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Nature Coloured Stats Help

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old March 4th, 2022 (5:13 PM). Edited March 8th, 2022 by Tacobell24.
Tacobell24's Avatar
Tacobell24 Tacobell24 is offline
 
Join Date: Nov 2018
Posts: 232
[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.
__________________
Praise the Solrock
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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