EvilEngine/TRIG: Difference between revisions

From Heavy Iron Modding
Content added Content deleted
Battlepedia>Igorseabra4
No edit summary
Battlepedia>Igorseabra4
No edit summary
Line 3: Line 3:


==Format==
==Format==
Triggers are [[Placeable Asset|placeable assets]], so they start with their 0x54 byte header, then are followed by:

{| class="wikitable"
{| class="wikitable"
! Offset !! Type !! Description
! Offset !! Type !! Description
|-
! colspan="3" | Header
|-
| 0x00 || [[AssetID]] || '''Asset ID'''.
|-
| 0x04 || byte || '''Asset type'''. 0x01 for TRIG.
|-
| 0x05 || byte || '''Number of Events'''.
|-
| 0x06 || short || '''Flags'''. Usually 00 1D
|-
! colspan="3" | Trigger
|-
| 0x08 || byte || Unknown. 0 or 1.
|-
| 0x09 || byte || Shape. 0 = Box, 1 = Sphere.
|-
| 0x0A || byte || Unknown. Always 0.
|-
| 0x0B || byte || Unknown. Always 0.
|-
| 0x0C || int || null
|-
| 0x10 || int || null. Not present in beta Goo Lagoon.
|-
| 0x14 || Vector3 || '''Rotation'''. This is actually used. The box trigger is rotated by its center point after placement. No effect on sphere trigger.
|-
| 0x20 || Vector3 || '''Position'''. Probably unused.
|-
| 0x2C || Vector3 || '''Scale'''. Unused.
|-
| 0x38 || Vector4 || '''Color'''. Unused.
|-
| 0x48 || float || '''Unknown'''
|-
| 0x4C || [[AssetID]] || '''Unknown'''
|-
| 0x50 || int || null
|-
|-
| 0x54 || Vector3 || Trigger Position 0
| 0x54 || Vector3 || Trigger Position 0
Line 64: Line 28:
| 0x94 || Event[numberOfEvents] || '''[[Events]]'''
| 0x94 || Event[numberOfEvents] || '''[[Events]]'''
|}
|}

* Trigger types (offset 0x09):
** 0 - Box
** 1 - Sphere



* Trigger Position 0
* Trigger Position 0

Revision as of 23:54, 5 September 2018

TRIG

This asset defines an entry for a trigger, a volume of space which can detect what happens within it and send events to other assets accordingly.

Format

Triggers are placeable assets, so they start with their 0x54 byte header, then are followed by:

Offset Type Description
0x54 Vector3 Trigger Position 0
0x60 Vector3 Trigger Position 1
0x6C Vector3 Trigger Position 2
0x78 Vector3 Trigger Position 3
0x84 float Unknown. Usually 0.
0x88 float Unknown. Usually -0.
0x8C float Unknown. Usually 1.
0x90 float Unknown. Usually 0.
Events
0x94 Event[numberOfEvents] Events
  • Trigger types (offset 0x09):
    • 0 - Box
    • 1 - Sphere


  • Trigger Position 0
    • Box - Front, Bottom, Left sides of box (absolute coordinates)
    • Sphere - Center (X, Y, Z) (absolute coordinates)
  • Trigger Position 1
    • Box - Back, Top, Righ sides of box (absolute coordinates)
    • Sphere - X is the sphere's radius. Y and Z are always 0.
  • Trigger Position 2
    • Box - Three seemingly random values in the range of 0xCDCDCDB7 to 0xCDCDCDDA. The meaning of this vector is unknown and is probably unused.
    • Sphere - Always (0, 0, 0)
  • Trigger Position 3
    • Box - Three seemingly random values in the range of 0xCDCDCDB7 to 0xCDCDCDDA. The meaning of this vector is unknown and is probably unused.
    • Sphere - Always (0, 0, 0)