Anonymous

Changes

From Final Fantasy Inside

FF7/Battle/Battle scenes

974 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
|}
| 0x0028
| 8 bytes
| Element types (8 records):<br>00h - Fire<br>01h - Ice<br>02h - Bolt<br>03h - Earth<br>04h - Bio<br>05h - Gravity<br>06h - Water<br>07h - Wind<br>08h - Holy<br>09h - Health<br>0Ah - Cut<br>0Bh - Hit<br>0Ch - Punch<br>0Dh - Shoot<br>0Eh - Scream<br>0Fh - HIDDEN<br>10h-1Fh - No Effect<br>20h-3Fh - [[FF7/Battle/Status Effects|Statuses]] (Damage done by actions that inflict these statuses will be modified)<br>FFh - No element
|-
| 0x0030
| 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).
*PostPre-Attack Action Event occurs immediately after on all battle participants prior to any character performs actions performed by any attack to any target participant regardless whether damage is dealt of actor or nottarget. Script owner can be flagged as dead and 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 would still activate. It's to run has priority is higher than that of other Counter Scripts.
*The Custom Event sections are not called by any event. They only occur if they are called with the 92 command.
60 22<- command index "Run script" 60 0X <- where X is the script section in hex (eg. X = 8 would call Custom Event 1since it is script id 08 [not to be confused with offset])
92
*Custom Event 8 is only used on Mystery Ninja (all), Ultimate Weapons in location other than above Cosmo Canyon, Safer Sephiroth, and the final "showdown" between Cloud and Sephiroth. These characters have scripts on them that do not remove them from battle when they are defeated.
*Custom Events 1-7 may not work. (not thoroughly tested)
*The order of scripts executed:
*:*Beginning of battle
::Pre-Battle (all participants)
:*Once a "main-script enabled" enemy's time gauge is full:
::Main (Enemy performs action)
:*Pre-Attack (If enemy script uses a 92 commandwith a command index of 20h or less)
::Pre-Action Setup (occurs on all participants)
:*Post-Attack
:*Battle ends
::Battle End (all participants)
 
==== Binary "Cover Flags" ====