Changes

Jump to navigation Jump to search

FF7/Battle/Battle scenes

560 bytes added, 21:13, 30 March 2010
Data file format: Terence Fergusson clued me in to this
|-
| 0x0C80
| 512 2 bytes| FFh PaddingFormation 1 AI Script Offset|-| 0x0C82| 2 bytes| Formation 2 AI Script Offset|-| 0x0C84| 2 bytes| Formation 3 AI Script Offset|-| 0x0C86| 2 bytes| Formation 4 AI Script Offset|-| 0x0C88| 0 - 504 bytes| Beginning of Formation AI Data ([[#AI_Data|format explanation]])
|-
| 0x0E80
|-
| 0x0E86
| varies0 - 4090 bytes
| Beginning of AI Data ([[#AI_Data|format explanation]])
|}
| Magical Counter
|-
|style="background:rgb(255,255,204)" | 0x0C|style="background:rgb(255,255,204)" | Party Member Death?Battle End
|-
| 0x0E
| PostPre-AttackAction Setup
|-
|style="background:rgb(255,255,204)" | 0x10
|style="background:rgb(255,255,204)" | UnusedCustom Event 1
|-
|style="background:rgb(255,255,204)" | 0x12
|style="background:rgb(255,255,204)" | UnusedCustom Event 2
|-
|style="background:rgb(255,255,204)" | 0x14
|style="background:rgb(255,255,204)" | UnusedCustom Event 3
|-
|style="background:rgb(255,255,204)" | 0x16
|style="background:rgb(255,255,204)" | UnusedCustom Event 4
|-
|style="background:rgb(255,255,204)" | 0x18
|style="background:rgb(255,255,204)" | UnusedCustom Event 5
|-
|style="background:rgb(255,255,204)" | 0x1A
|style="background:rgb(255,255,204)" | UnusedCustom Event 6
|-
|style="background:rgb(255,255,204)" | 0x1C
|style="background:rgb(255,255,204)" | UnusedCustom Event 7
|-
| 0x1E
| Post-BattleCustom Event 8
|}
It's structure and opcodes are described [[FF7/Battle/Battle_Scenes/Battle_Script|here]].
*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 determined).
*Party Member Death The only character with "Battle End" is only used on 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). Script never seems to activate on other characters and may not even execute on Cloud's.
*Post-Attack occurs immediately after any character performs any attack to any target regardless whether damage is dealt or not. Script owner can be flagged as dead and script would still activate. It's priority is higher than that of other Counter Scripts.
*Post-Battle The Custom Event sections are not called by any event. They only occur if they are called with the 92 command. 60 22 60 0X where X is the script section in hex (eg. X = 8 would call Custom Event 1) 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. This Script section is used to remove them from the battle probably to clean up memory. Executed after "victory dance".*The order of scripts executed after an attack :**Beginning of battle::Pre-Battle (all participants):*Once a "main-script enabled" enemy's time gauge isfull:::Main (Enemy performs action):*Pre-Attack (If enemy script uses a 92 command::Pre-Action Setup (occurs on all participants):*#Post-Attack:*#Death Counter (If script owner died, execution stops here):*#General Counter (If script owner was targetExecuted by all targets):*#Physical Counter/Magical Counter (Executed by all targets depending on damage type):*Battle ends::Battle End (all participants) 
==== Binary "Cover Flags" ====
Anonymous user

Navigation menu