Conversation Between Lance Koijer 2.0 and AkameTheBulbasaur
1 to 4 of 4
  1. AkameTheBulbasaur
    June 9th, 2019 9:34 PM
    I'm not too sure what to do here, I'm afraid. Have you checked to make sure it's not the battle script itself or something like that?
  2. Lance Koijer 2.0
    May 31st, 2019 10:58 PM
    Lance Koijer 2.0
    Actually, what I am trying to do here is to call a Battle Script in a routine that I will be adding in battle mode by turn/move made by FBI. That's it only... just a battle script loader in a routine and nothing else is there. I also checked a lot of routines that call Battle Script and none of them works for me..
  3. AkameTheBulbasaur
    May 31st, 2019 9:52 PM
    Hi! Sorry I took so long!

    What exactly is the routine supposed to do? (In other words, where are you hooking from?)

    I checked Mr. Doll Steak's routine for Snow Warning that I had. It said this:

    ldr r0, .SnowWarningBS /*909AD0 in MrDS*/
    bl PlayScript
    ldr r0, .RAMOffset
    mov r1, r10
    strb r1, [r0, #0x17]
    bl OtherBL

    ldr r4, .EndScriptBL
    bx r4

    ldr r2, .PlayScriptBL
    bx r2

    ldr r0, .OtherBL
    bx r0

    .align 2
    .SnowWarningBS: .word 0x08190584
    .RAMOffset: .word 0x02023FC4
    .EndScriptBL: .word 0x0801BBAB
    .PlayScriptBL: .word 0x0801BC25
    .OtherBL: .word 0x0801BB5B

    But ChaCha Dinosaur's Flame Orb routine sets it up like this:

    ldr r0, =0x02023D6E
    mov r2, #0x0
    strb r2, [r0]
    ldr r0, =0x08EEEEEE
    ldr r2, =0x08018C05
    bx r2

    ldr r2, =0x08018C13
    bx r2

    I tried looking this up too and the best I got was a thread conversation that went like this:

    A: How do you call a Battle Script from a routine?
    B: You use the Battle Script loader like OMG DUH
    A: Okay how do you do that?
    B: *crickets*

    So yeah, it wasn't very helpful.
  4. Lance Koijer 2.0
    May 30th, 2019 6:56 AM
    Lance Koijer 2.0
    Hi! I would like to ask about the Battle Script Loader. Every time I branch to it in my routine, it's either nothing happens or the game crashes.

    Here's my routine:
    .align 2

    push {r0-r1, lr}
    ldr r0, =0x8780680 //my battle script//
    bl linker
    pop {r0-r1, pc}

    ldr r1, =0x801BABB //Battlescript loader I found on some routines//
    bx r1