Difference between revisions of "FF7/Command data"

From Final Fantasy Inside
< FF7
Jump to navigation Jump to search
my_wiki>NFITC1
m (First among many corrections to come)
my_wiki>NFITC1
Line 1: Line 1:
 
== KERNEL.BIN - Section 1: Command data format ==
 
== KERNEL.BIN - Section 1: Command data format ==
  
This section contains the data for Menu commands.<br>
+
This section contains the data for Menu commands.<br/>
 +
 
 
There are 32 entries of 8 bytes in the following format:
 
There are 32 entries of 8 bytes in the following format:
{| border="0" cellpadding="3" cellspacing="1" style="background: rgb(0,0,0)"  
+
{| border="0" cellpadding="3" cellspacing="1" style="background: rgb(0,0,0)" align="center"  
 
! style="background:rgb(204,204,204); width:50px;" align="center" | Offset
 
! style="background:rgb(204,204,204); width:50px;" align="center" | Offset
 
! style="background:rgb(204,204,204); width:50px;" | Length
 
! style="background:rgb(204,204,204); width:50px;" | Length
Line 14: Line 15:
 
|style="background:rgb(255,255,255)" align="center" | 0x01
 
|style="background:rgb(255,255,255)" align="center" | 0x01
 
|style="background:rgb(255,255,255)" | 1 byte
 
|style="background:rgb(255,255,255)" | 1 byte
|style="background:rgb(255,255,255)" | Force Targeting**
+
|style="background:rgb(255,255,255)" | [[FF7/Targeting Data|Force Targeting]]
 
|-
 
|-
 
|style="background:rgb(255,255,255)" align="center" | 0x02
 
|style="background:rgb(255,255,255)" align="center" | 0x02
Line 28: Line 29:
 
|style="background:rgb(255,255,255)" | Multiple Targets Camera Movement Index
 
|style="background:rgb(255,255,255)" | Multiple Targets Camera Movement Index
 
|}
 
|}
<nowiki>*Initial Cursor Action:</nowiki>
+
<br/>
 +
<nowiki>*</nowiki>Initial Cursor Action:
 
The different values will tell it what to do or what menu to bring up:
 
The different values will tell it what to do or what menu to bring up:
  
{|border="1"
+
{| border="0" cellpadding="3" cellspacing="1" style="background: rgb(0,0,0)" align="center"  
 
|-
 
|-
 
!style="background:rgb(204,204,204);" align="center" |Value
 
!style="background:rgb(204,204,204);" align="center" |Value
 
!style="background:rgb(204,204,204);" align="center" |Effect
 
!style="background:rgb(204,204,204);" align="center" |Effect
 
|-
 
|-
|0h
+
|style="background:rgb(255,255,255)" | 00h
|Perform command, using selected target
+
|style="background:rgb(255,255,255)" | Perform command using target data
|-
 
|1h
 
|Magic Menu
 
|-
 
|2h
 
|Summon Menu
 
 
|-
 
|-
|3h
+
|style="background:rgb(255,255,255)" | 01h
|Item Menu
+
|style="background:rgb(255,255,255)" | Magic Menu
 
|-
 
|-
|4h
+
|style="background:rgb(255,255,255)" | 02h
|E.Skill Menu
+
|style="background:rgb(255,255,255)" | Summon Menu
|-
 
|5h
 
|Throw Menu
 
|-
 
|6h
 
|Limit Menu
 
|-
 
|7h
 
|Start on enemy
 
|-
 
|8h
 
|W-Item Menu
 
|-
 
|9h
 
|W-Magic Menu
 
|-
 
|Ah
 
|W-Summon Menu
 
|-
 
|Bh
 
|Coin Menu
 
|}
 
 
 
Note: If this value is 0h and Target is NULL (FFh) then the action will be performed without showing the cursor.
 
 
 
<nowiki>** Targeting data:</nowiki>
 
This is the targeting data used throughout the battle engine to determine which battle participant (PCs and monsters alike) to perform damage calculation upon. It is stored as an 8-bit bitmask:
 
{|border="1"
 
 
|-
 
|-
!style="background:rgb(204,204,204); " align="center" |Bitmask
+
|style="background:rgb(255,255,255)" | 03h
!style="background:rgb(204,204,204); " align="center" |Effect
+
|style="background:rgb(255,255,255)" | Item Menu
 
|-
 
|-
|01h
+
|style="background:rgb(255,255,255)" | 04h
|Enable selection. Without this, the target cannot be changed from the participant performing the command.
+
|style="background:rgb(255,255,255)" | E.Skill Menu
 
|-
 
|-
|02h
+
|style="background:rgb(255,255,255)" | 05h
|Start on Enemies. This will default the target to the first member of the opposing row.
+
|style="background:rgb(255,255,255)" | Throw Menu
 
|-
 
|-
|04h
+
|style="background:rgb(255,255,255)" | 06h
|Multiple by default. This will select all targets on a row.
+
|style="background:rgb(255,255,255)" | Limit Menu
 
|-
 
|-
|08h
+
|style="background:rgb(255,255,255)" | 07h
|Multiple "toggle". This will enable toggling between a single target or multiple targets.
+
|style="background:rgb(255,255,255)" | Enable Target Selection via Cursor
Magics that have this enabled must be linked to an "All" to be multiple. Commands must have a Mega-All.
 
 
|-
 
|-
|10h
+
|style="background:rgb(255,255,255)" | 08h
|One side only. This will not let you choose another row other than the one defined by 02h.
+
|style="background:rgb(255,255,255)" | W-Magic Menu
 
|-
 
|-
|20h
+
|style="background:rgb(255,255,255)" | 09h
|Long ranged enemy can be targeted.
+
|style="background:rgb(255,255,255)" | W-Summon Menu
 
|-
 
|-
|40h
+
|style="background:rgb(255,255,255)" | 0Ah
|All participants. Targets all available targets in the battle.
+
|style="background:rgb(255,255,255)" | W-Item Menu
 
|-
 
|-
|80h
+
|style="background:rgb(255,255,255)" | 0Bh
|Random target. Choose, from among selected targets, one to perform damage calculation upon.
+
|style="background:rgb(255,255,255)" | Coin Menu
 
|}
 
|}
 +
The commands themselves are hard-coded into the Battle Engine and their actions cannot be changed via editing the KERNEL.BIN<br/>
 +
Example of what this means: If the summon command was changed to bring up the magic menu and Cure was selected, the battle engine would perform Choco/Mog summon instead. Why? Because The Battle Engine is expecting summon data from command 03h. While the target was considered based on the targeting information of Cure, which has the same magic index as Choco/Mog has summon index, the attack the Battle Engine selected to perform was Summon attack 00h which is Choco/Mog.

Revision as of 19:45, 6 November 2008

KERNEL.BIN - Section 1: Command data format

This section contains the data for Menu commands.

There are 32 entries of 8 bytes in the following format:

Offset Length Description
0x00 1 byte Initial Cursor Action*
0x01 1 byte Force Targeting
0x02 2 bytes Unknown (Always [FFh])
0x04 2 bytes Single Target Camera Movement Index
0x06 2 bytes Multiple Targets Camera Movement Index


*Initial Cursor Action: The different values will tell it what to do or what menu to bring up:

Value Effect
00h Perform command using target data
01h Magic Menu
02h Summon Menu
03h Item Menu
04h E.Skill Menu
05h Throw Menu
06h Limit Menu
07h Enable Target Selection via Cursor
08h W-Magic Menu
09h W-Summon Menu
0Ah W-Item Menu
0Bh Coin Menu

The commands themselves are hard-coded into the Battle Engine and their actions cannot be changed via editing the KERNEL.BIN
Example of what this means: If the summon command was changed to bring up the magic menu and Cure was selected, the battle engine would perform Choco/Mog summon instead. Why? Because The Battle Engine is expecting summon data from command 03h. While the target was considered based on the targeting information of Cure, which has the same magic index as Choco/Mog has summon index, the attack the Battle Engine selected to perform was Summon attack 00h which is Choco/Mog.