• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Script] Nature Coloured Stats Help

  • 232
    Posts
    6
    Years
    • Seen Apr 16, 2024
    [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.
     
    Last edited:
    Back
    Top