Field File Section 8: Triggers - niemasd/PyFF7 GitHub Wiki
The Triggers section contains information about triggers. This wiki is a useful reference for the Triggers section.
- This is a 4-byte unsigned integer denoting the total length (in bytes) of this section
- The first 8 bytes are a "left-aligned" string: strings shorter than 8 characters are right-padded with
<NULL>
(i.e.,0x0
) - The 9th byte is
<NULL>
(i.e.,0x0
)
- This is a 1-byte integer
- It's not clear if this is signed or unsigned (but given that it's a "direction," perhaps signed?)
- This is a 2-byte signed integer
- Height = 0 implies normal focus
- Height > 0 implies focus above
- Height < 0 implies focus below
- The first 2 bytes designate a signed integer representing "left"
- The second 2 bytes designate a signed integer representing "bottom"
- The third 2 bytes designate a signed integer representing "right"
- The fourth 2 bytes designate a signed integer representing "top"
- "Bottom" and "top" might be flipped; it's not known for sure
- Regardless, the 1st and 2nd 2-byte chunks are negative, the 3rd and 4th are positive, and 1st == negative 3rd and 2nd == negative 4th
- The first 2 bytes designate an integer representing some unknown about Layer 3 (maybe)
- The last 2 bytes designate an integer representing some unknown about Layer 4 (maybe)
- It's not clear if they're signed or unsigned, but they seem to always be either 0, 1, or 256
- The first 2 bytes designate a signed integer representing the animation width
- The first 2 bytes designate a signed integer representing the animation width
- These values seem to always be 1,024
- The first 2 bytes designate a signed integer representing the animation width
- The first 2 bytes designate a signed integer representing the animation width
- These values seem to always be 1,024
- The first 12 bytes seem to be for Layer 3 (maybe)
- The last 12 bytes seem to be for Layer 4 (maybe)
- No clue what they mean, but there's lots of
<NULL>
(i.e.,0x0
)
There are 12 gateways, and each is a total of 24 bytes. For each gateway:
- The first 2 bytes are a signed integer designating the x-coordinate
- The next 2 bytes are a signed integer designating the z-coordinate
- The last 2 bytes are a signed integer designating the y-coordinate
- The first 2 bytes are a signed integer designating the x-coordinate
- The next 2 bytes are a signed integer designating the z-coordinate
- The last 2 bytes are a signed integer designating the y-coordinate
- The first 2 bytes are a signed integer designating the x-coordinate
- The next 2 bytes are a signed integer designating the z-coordinate
- The last 2 bytes are a signed integer designating the y-coordinate
- This is a 2-byte unsigned(?) integer designating the Field ID
- Sometimes it's
0x7FFF
(32,767), probably designating something important
- These are 4 bytes that are all equal in a given gateway (but they vary between gateways)
There are 12 triggers, and each is a total of 16 bytes. For each trigger:
- The first 2 bytes are a signed integer designating the x-coordinate
- The next 2 bytes are a signed integer designating the z-coordinate
- The last 2 bytes are a signed integer designating the y-coordinate
- The first 2 bytes are a signed integer designating the x-coordinate
- The next 2 bytes are a signed integer designating the z-coordinate
- The last 2 bytes are a signed integer designating the y-coordinate
- This is a 1-byte signed integer
- This seems to always be either 1 or -1
- This is a 1-byte unsigned integer
- This is a 1-byte unsigned integer that can have a value between 0 and 5:
- 0 - OnTrigger - ON
- 1 - OnTrigger - OFF
- 2 - OnTrigger - ON, AwayFromTrigger - OFF
- 3 - OnTrigger - OFF, AwayFromTrigger - ON
- 4 - OnTrigger - ON, AwayFromTriggerOnPlusSide - OFF
- 5 - OnTrigger - OFF, AwayFromTriggerOnPlusSide - ON
These are shown arrows on gateway lines, and they are not present in the Japanese version of the game. For each of the 12 gateways you can show an arrow. If shown arrow = 1, a red arrow is displayed in the middle of the corresponding gateway line.
There are 12 arrows that are each 16 bytes total, each defined with the following items:
- This is a 4-byte signed integer
- This is a 4-byte signed integer
- This is a 4-byte signed integer
- This is a 4-byte unsigned integer
- 0 = disabled, 1 = red, 2 = green