
that 1703 check is really the core of how this routine works. The game simply looks to see which slot should be loaded. It doesn't actually load a sprite in the basic sense at all. I'm afraid that there's no way that I can tell (I'm sure there must be, but it's a bit beyond me) to load a sprite from "Load Character Graphic". But I have had major success in an older idea of mine.
Does anyone recall my old "Commands in RAM" hack? Well it failed because the section of "RAM" I was using, never got saved. It wasn't SRAM so characters were stuck with their default commands, even though they were technically moved in RAM, they were reflected the same in all files. But there's a decent chunk of unused SRAM data at 4A0 right before the names that due to Chillyfeez's Shadow Party hack, I was able to fill with all character's Commands (the commands are actor based and are just 4 Bytes too long before they overflow into Names, meaning that FuSoYa would have four commands based on Cecil's name, a shame.) I *Could* make them based on Character ID, which would take up the same amount of space as they do in this (it would mean that Tellah would not lose Recall *normally* however as this is a hack it is meant to be compatible with some other upcoming hacks.)
Here's the associated data with this hack when entering battle...
$03/8B8B BD 01 20 LDA $2001,x[$7E:2001] A:0000 X:0000 Y:0000 P:envMxdIZC - Load A from Class.
$03/8B8E 29 1F AND #$1F A:0081 X:0000 Y:0000 P:eNvMxdIzC - Get rid of all 20,40,80 bits.
$03/8B90 D0 01 BNE $01 [$8B93] A:0001 X:0000 Y:0000 P:envMxdIzC - If not 00, branch.
---------------------------------------------------------------
$03/8B92 EA NOP A:0000 X:0000 Y:0000 P:envMxdIZC
$03/8B93 EA NOP A:0000 X:0000 Y:0000 P:envMxdIZC.
-----------------------------------------------
$03/8B94 85 DF STA $DF [$00:00DF] A:0000 X:0000 Y:0000 P:envMxdIZC - Store A in DF.
$03/8B96 A9 05 LDA #$05 A:0000 X:0000 Y:0000 P:envMxdIZC - Load Amount of Commands into A.
$03/8B98 85 E1 STA $E1 [$00:00E1] A:0005 X:0000 Y:0000 P:envMxdIzC - Store Amount into E1.
$03/8B9A 20 E0 83 JSR $83E0 [$03:83E0] A:0005 X:0000 Y:0000 P:envMxdIzC - Jump to Subroutine (?)
$03/83E0 64 E0 STZ $E0 [$00:00E0] A:0005 X:0000 Y:0000 P:envMxdIzC - Store Zero in E1.
$03/8B9D A9 05 LDA #$05 A:0000 X:0000 Y:0000 P:envMxdIZc - Load 05 into A.
$03/8B9F 85 AB STA $AB [$00:00AB] A:0005 X:0000 Y:0000 P:envMxdIzc - Store A in EB.
$03/8BA1 A6 E3 LDX $E3 [$00:00E3] A:0005 X:0000 Y:0000 P:envMxdIzc - Load X from Class Slot.
$03/8BA3 BF A0 14 00 LDA $0014A0,x[$00:14A0] A:0005 X:0000 Y:0000 P:envMxdIZc - Load A from SRAM based Command Location.
$03/8BA7 99 03 33 STA $3303,y[$7E:3303] A:0000 X:0000 Y:0000 P:envMxdIZc - Store A in Battle Commands.
And that's it. Just like that you can put Commands into RAM. Now another important step is getting them into RAM in the first place... I was ignorant way back when in trying to get rid of the initial loading of Dark Knight Cecil, but there should be other room to work with in that start of game section.
I would be safe just tying this process into the first part of a custom event instruction routine, rather than messing with the game start routines.
So... let's get to it!
This is one of my finest works, in my opinion, very simple and very efficient. Making use of another Dummy Movement Bit plan the game can change commands of characters on the fly! (A note, however. This is only intended to work with a certain configuration. Since it looks at Class now rather than Actor, you will want to change the first 13 Actors Commands to the overall Commands of the characters. You won't have to worry about Tellah's Recall since you can easily remove it with this Event Instruction hack).
Replacing Gil -100 XX to Moving the Battle Command Table/Changing Battle Commands by XX to YY.First Time Using Instruction - These are the instructions that will play the first time the instructions are used it is Imperative that you put this as the first event in the game as this loads the Battle Commands into RAM.
$00/E97E A9 00 LDA #$00 A:00E9 X:0000 Y:0002 P:envMxdiZc - Load 00 into A.
$00/E980 CD A1 14 CMP $14A1 [$00:14A1] A:0000 X:0000 Y:0002 P:envMxdiZc - Does the Second Battle Command in RAM read 00 as well? (This would be a second Fight command in Dark Knight Cecil's Commands, as no player would want that, this assumes that the Battle Commands have not been placed in RAM.)
$00/E983 D0 15 BNE $15 [$E99A] A:0000 X:0000 Y:0002 P:envMxdiZC - Branch if it reads anything but 00.
$00/E985 A0 00 00 LDY #$0000 A:0000 X:0000 Y:0002 P:envMxdiZC - Load 0000 into Y.
$00/E988 A2 00 00 LDX #$0000 A:0000 X:0000 Y:0000 P:envMxdiZC - Load 0000 into X.
$00/E98B BF 55 FD 13 LDA $13FD55,x[$13:FD55] A:0000 X:0000 Y:0000 P:envMxdiZC - Load A from ROM Battle Commands.
$00/E98F 99 A0 14 STA $14A0,y[$00:14A0] A:0000 X:0000 Y:0000 P:envMxdiZC - Store A in New Battle Commands RAM Location.
$00/E992 E8 INX A:0000 X:0000 Y:0000 P:envMxdiZC - +1 to X
$00/E993 C8 INY A:0000 X:0001 Y:0000 P:envMxdizC - +1 to Y
$00/E994 C0 41 00 CPY #$0041 A:0000 X:0001 Y:0001 P:envMxdizC - Has it done this 65 times (13 x 5)?
$00/E997 D0 F2 BNE $F2 [$E98B] A:0000 X:0001 Y:0001 P:eNvMxdizc - If not, branch back.
--------------------------------------
$00/E999 60 RTS A:0001 X:0041 Y:0041 P:envMxdiZC - Return
And that's it for getting the Commands into RAM, note that there IS No Dummy Movement Byte for the Initialization!
Now to manipulate them you will need another Dummy Movement Bit in addition to your variable. Your Variable will be the Command you are changing another Command into. Your Dummy Movement byte will be the Slot of the Command you are changing. So for instance if you wanted to get rid of Tellah's Recall and put Item in it's place you would use...
"x50 Gil " - 01 (Item). And realizing that Tellah's commands would fall in the 16-20(Decimal) range you would set the Dummy Movement Bit to 13(Hex) 19(Dec) (NPC 2 Moves Down) - You would use another Event Instruction of x50 Gil set it to FF (Null) and use a Dummy Movement Bit of 14 (Hex) 20 (Dec) (NPC 2 Moves Left)
Once you get the hang of it, while a little cumbersome in the current event setup, it is much better than the alternative, which doesn't exist.
Changing Battle Commands
$00/E99A A2 00 00 LDX #$0000 A:0000 X:0000 Y:0002 P:eNvMxdizc - Load 0000 into X.
$00/E99D 20 CB E2 JSR $E2CB [$00:E2CB] A:0000 X:0000 Y:0002 P:envMxdiZc - Jump to Event Instruction Progress Subroutine
$00/E2CB E8 INX A:0000 X:0000 Y:0002 P:envMxdiZc - +1.
$00/E2CC 86 B3 STX $B3 [$00:06B3] A:0000 X:0001 Y:0002 P:envMxdizc - Store X in Event Instruction Progress.
$00/E2CE BD D5 09 LDA $09D5,x[$00:09D6] A:0000 X:0001 Y:0002 P:envMxdizc - Load Event Variable (Battle Command) into A.
$00/E2D1 60 RTS A:0001 X:0001 Y:0002 P:envMxdizc - Return.
$00/E9A0 48 PHA A:0001 X:0001 Y:0002 P:envMxdizc - Push A onto Stack.
$00/E9A1 AE D3 09 LDX $09D3 [$00:09D3] A:0001 X:0001 Y:0002 P:envMxdizc - Load X from Event Progress (Dummy Movement Bit - Command Slot Location)
$00/E9A4 BF 00 82 12 LDA $128200,x[$12:826B] A:0001 X:006B Y:0002 P:envMxdizc - Load A from next Event Instruction.
$00/E9A8 AA TAX A:0012 X:006B Y:0002 P:envMxdizc - Transfer A to X.
$00/E9A9 68 PLA A:0012 X:0012 Y:0002 P:envMxdizc - Pull A from Stack.
$00/E9AA 9D A0 14 STA $14A0,x[$00:14B2] A:0001 X:0012 Y:0002 P:envMxdizc - Store Battle Command in Slot designated by Dummy Movement Bit.
$00/E9AD EE D3 09 INC $09D3 [$00:09D3] A:0001 X:0012 Y:0002 P:envMxdizc - +1 to Event Progress.
$00/E9B0 60 RTS A:0001 X:0012 Y:0002 P:envMxdizc - Return
Would you believe that setting this scheme up actually took less bytes than the initial -100 Gil command?
And there we have it! My crushed dreams of the past have finally been fulfilled. We may now alter character's battle commands in-game as easily as we can edit events!
Here is the process in pictures, using Tellah as the example (which the eagle-eyed among you may have noticed was the example within the actual code above)
As can be seen here, Tellah has his normal set-up. White, Black, Recall

But with a little trip to our friendly Test Buddy Namingway...

Tellah has forgotten Recall and Item has taken it's place! Take that original programmers of FFIV who used one of the Precious actor slots on getting rid of a single Command!
