Users browsing this thread: 1 Guest(s)
Question: Changing a Battle Command to a single spell

#3
Posts: 22
Threads: 11
Thanks Received: 0
Thanks Given: 0
Joined: May 2019
Reputation: 2
Status
None
(12-10-2019, 03:12 AM)Subtraction Wrote: The easiest way is probably to sacrifice Banon's Health command (which just casts Cure 2) or Leo's Shock command (which just casts Mega Hit). Just give them a different spell index and you're done.

If you want to replace mimic, you basically need to copy the code for one of those commands, change the spell index, then make mimic call that (either by copying it over the mimic code or copying it into free space and changing a pointer)

Wonderful advice! I've taken it, and now I'm attempting to sacrifice Banon's Health command. Here's what I'm looking at:

I used FFusME to change the name of Health to Charm as desired. OK
I used FFusME to change the attributes of the ability to only single target an enemy, etc as desire. OK
I dug into the C2 code and found this:
Code:
Health

C2/171E: A9 2E        LDA #$2E       (Cure 2)
C2/1720: 85 B6        STA $B6        (Set spell/animation)
C2/1722: A9 05        LDA #$05
C2/1724: 80 3F        BRA $1765
I changed C2/171F to CE so now instead of Cure 2, the ability performs the "Charm" spell index just like Chadarnook.
I ran the test and sure enough everything works perfectly, except it still has the Cure2/Health animation. It looks like I'm using Health, but the result is Charm.

Changing the animation has proven to be a toughie though. I could easily swap the Health animation for the Charm animation in FF3usME, but since Health is also Cure2 this will also affect how Cure2 is animated and I don't want that. I figure there's probably a pointer somewhere that I can change which would fix it. I just need to point the Health ability animation to the Charm animation instead. I even found where these animations are located in the battle animation scripts!
Code:
; [ Animation Script $0153: Cure 2, Dried Meat, Pearl Wind, Health (sprite) ]

D0/3F35: 00 20                    speed 1, align to center of character/monster
D0/3F37: D1 01                    invalidate character/monster sprite priority
D0/3F39: EB                       jump based on thread ($3F42, $3F49, $3F52, $3F5E)
D0/3F42: C9 00                    play default sound effect
D0/3F44: 83 6B                    move forward 12
D0/3F46: FA 58 3F                 jump to $3F58
D0/3F49: 89 03                    loop start (3 times)
D0/3F4B: 1F                       [---]
D0/3F4C: 8A                       loop end
D0/3F4D: 83 CB                    move up 12
D0/3F4F: FA 58 3F                 jump to $3F58
D0/3F52: 89 07                    loop start (7 times)
D0/3F54: 1F                       [---]
D0/3F55: 8A                       loop end
D0/3F56: 83 8B                    move back 12
D0/3F58: 84 03                    set animation speed to 4
D0/3F5A: 8B 0D                    animated loop start (13 times, increment frame offset each time)
D0/3F5C: 00                       [$00]
D0/3F5D: 8C                       animated loop end
D0/3F5E: FF                       end of script
Code:
; [ Animation Script $01E6: Charm (sprite) ]

D0/2692: 00 20                    speed 1, align to center of character/monster
D0/2694: D1 01                    invalidate character/monster sprite priority
D0/2696: 85                       move to attacker position
D0/2697: 95                       calculate vector from attacker to target
D0/2698: EB                       jump based on thread ($26A1, $26AC, $26B5, $26BE)
D0/26A1: C9 00                    play default sound effect
D0/26A3: 80 5D                    command $80/$5D
D0/26A5: 00                       [$00]
D0/26A6: 92 02 05                 move along vector at speed 2, branch to $26A3
D0/26A9: 80 5D                    command $80/$5D
D0/26AB: FF                       end of script

D0/26AC: 80 5D                    command $80/$5D
D0/26AE: 01                       [$01]
D0/26AF: 92 02 05                 move along vector at speed 2, branch to $26AC
D0/26B2: 80 5D                    command $80/$5D
D0/26B4: FF                       end of script

For the life of me, I can't find the pointer though! I think it might be buried somewhere in D1EAD8-D1EFFF perhaps? The ROM map labels them as "Pointers to Battle Animation Scripts (+$D00000)", which appears to be exactly what I need, but I can't find any kind of disassembly for that section of code. 

Am I on the right track? Am I looking in the wrong spot? Anyone who has insight on this would be my hero. I feel like I've made a lot of progress as a newbie, and I'm hoping I'm getting the hang of it.
  Find
Quote  



Messages In This Thread
RE: Question: Changing a Battle Command to a single spell - by Morendo - 12-11-2019, 01:55 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite