Anonymous

Changes

From Final Fantasy Inside

FF7/Battle/Battle Scenes/Battle Script

452 bytes added, 05:10, 23 May 2019
m
20 revisions imported
|-
| align="center" | 1Xh
| [[FF7/Battle/Battle_Scenes/Battle_AI_Addresses| Address]]
|-
| align="center" | 2Xh
|-
| 0Xh
| 2 byte Memory Address
|
| Type 0X stored at translated Address
|-
| 1Xh
| 2 byte Memory Address
|
| Address value with a scope of X
|-
| 60h
| One Byte1 byte Value
|
| Argument of type 01
|-
| 61h
| Two Bytes2 byte Value
|
| Argument of type 02
|-
| 62h
| Three Bytes3 byte Value
|
| Argument of type 03
|-
| 70h
| Two Bytes2 byte Script Address
| One of any type
| Jumps to script address in argument if pop is 0
|-
| 71h
| Two Bytes2 byte Script Address
| One of any type
| Jumps to script address in argument if pop and top of stack are not equal
|-
| 72h
| Two Bytes2 byte Script Address
|
| Jumps to script address in argument
| colspan="3" align="center"| This ends the script
|-
| style="background:rgb(255,255,204);" | 74h| style="background:rgb(255,255,204);" || style="background:rgb(255,255,204);" | One of any type| style="background:rgb(255,255,204);" | Unknown Effect Pops one value from stack. (Not used)
|-
| 75h
|
| One of any type
| If pop is Type 01, Type 01 with count of number of bits set in pop<br/>If pop is Type 02, Type 02 filled with value of first non-null value in pop
|-
| 84h
|
| One of any type
| Pops variable one value from stack.
|-
| 92h
|
| One of type 1X, one of type 00
| If second pop is 1, takes value at local address 2010 and writes value at [[FF7/Savemap#Save_Memory_Bank_1.2F2|memory bank1bank 1/2 ]] at offset specified by first pop<br/> otherwise If second pop is 0, data at memory bank1/2 at offset specified by first pop is stored at local address 2010.<br/>Otherwise, command is ignored.
|-
| 96h
| Displays string to debug console, replacing "%d"s with pops
|-
| style="background:rgb(255,255,204);" | A1h| style="background:rgb(255,255,204);" | ?| style="background:rgb(255,255,204);" | ?Two values of any type| style="background:rgbPops two values from stack (255,255Not Used,204);" | ? (Not usedbut valid command)
|-
|}
*Commands 74h and A1h are never used, but have been documented as valid commands.
*Commands 75h and 96h only appear in the Character AI found in the KERNEL.BIN.
*Commands of group 2X, BX, CX, DX, EX, and FX are treated as NOPs. The script will ignore them and continue processing. Also, any 5X, 6X, 7X, 8X, and 9X value that isn't listed above appear to be treated the same way, but it's safest to use a value from the 2X group. An incorrect 0X, 1X, 3X, or 4X will have unintended side-effects.
0X & 1X CODES NOTES:
:[[FF7/Command_data|Command index]] in case of character AI
:20h - For enemy attack
:22h - Force execution of script (referenced by first pop)
:24h - Pauses battle engine while string is displayed (in conjunction with code 93)