03-12-2014, 01:53 AM
(This post was last modified: 03-12-2014, 01:57 AM by GrayShadows.)
Okay, leaving everything else the same (so the two events can't be used in the same game), you'd use this code instead. The only change is to the third line from the bottom; you're storing the result in $1618,X instead of $1617,X. Everything else works exactly as before.
ETA: I will be working on a patch with a set of custom ability-related events (teaching dances/blitzes/lores/swdtech through events, for example); if I have the space (which I should do), I'll include a modified version of this code so that each of a character's four command slots can be changed.
Code:
org $C09934 ; General action 6D
DW $D613 ; New action is being placed at C0/D613
org $C0D613
LDA $EB ; Grab first parameter (character ID)
STA $4202 ;
LDA #$25 ; Multiply by length of character block (37/#25 bytes)
STA $4203 ;
LDA $4216 ; Load result...
TAX ; ...and transfer to X
LDA $EC ; Grab second parameter (Command ID)
STA $1618,X ; Character's third command is at byte 24/#18 of the block
LDA $03 ; Set accumulator to number of bytes to advance event queue
JMP $9B5C ; ...and jump and advance.
ETA: I will be working on a patch with a set of custom ability-related events (teaching dances/blitzes/lores/swdtech through events, for example); if I have the space (which I should do), I'll include a modified version of this code so that each of a character's four command slots can be changed.
Current Project: FF6: Tensei | Discord ID: TristanGrayse