Anonymous

Changes

From Final Fantasy Inside

FF7/Battle/Battle scenes

557 bytes added, 05:11, 23 May 2019
m
84 revisions imported
We have 1024 possible battle numbers: 0 - 1023. Each group of *4* Battle Numbers refers to a
particular Scene file: for instance, Battles 0-3 refer to File 0 in Scene.bin, Battles 4-7 refer to File 1 in Scene.bin, and so forth.
 
 
====Japanese format====
 
In the japanese scene.bin, ennemies names and attacks names have a size of 16 bytes, instead of 32 bytes.
 
===General file format===
! style="background:rgb(204,204,204)" align="center" | Offset
! style="background:rgb(204,204,204)" align="center" | Length
! style="background:rgb(204,204,204)" align="center" colspan="2" | Description
|-
| 0x00
| 2 bytes
| colspan="2" | Enemy ID
|-
| 0x02
| 2 bytes
| colspan="2" | position X
|-
| 0x04
| 2 bytes
| colspan="2" | position Y
|-
| 0x06
| 2 bytes
| colspan="2" | position Z
|-
| 0x08
| 2 bytes
| colspan="2" | Row
|-
| 0x0A
| 2 bytes
| colspan="2" | [[#Binary_"Cover_Flags"|Binary "Cover flags"]]
|-
| 0x0C
| 4 bytes
| Gets mapped to battle unit structure 4020colspan="2" | Initial condition flags. Only last 5 bits are considered.|-| style="background:rgb(204,204,255)" colspan ="2" rowspan="5" || 0x0001| Visible|-| 0x0002| Indicates initial direction facing if players get a side attack.|-403F and contains flags | style="background:rgb(255,255,204)" | 0x0004| style="background:rgb(details pending255,255,204)" | Unknown|-|0x0008| Targetable|-|0x0010| Main Script Active
|}
| 0x0038
| 16 bytes
| Attack action script id Action animation index (1 byte each).
|-
| 0x0048
| Custom Event 8
|}
It's Its structure and opcodes are described [[FF7/Battle/Battle_Scenes/Battle_Script|here]].
NOTES:
*A monster's total AI size will always be an even number of bytes. If the actual scripts are an odd number, a single NULL (FFh) will be placed before the next monster's AI header (may not be required).
*Battle begins after all characters' Initialize scripts have been run (order to be determinedPlayers first, then enemies, then formation).
*The only character with "Battle End" is in Cloud's AI. It's meant to lower the character's Love Points with him if he lets them die or he dies with them in the party (not sure which).
*Pre-Action Event occurs on all battle participants prior to any actions performed by any participant regardless of actor or target. This includes all executed 92 commands that have a command index of less than 21h. If any 92 commands are called in this section, the command that caused this script to run has priority.