EvilEngine/BUTN: Difference between revisions

From Heavy Iron Modding
Content added Content deleted
Battlepedia>Seil
Battlepedia>Seil
Line 13: Line 13:
! Offset !! Type !! Description
! Offset !! Type !! Description
|-
|-
| 0x54 || [[AssetID]] || '''Pressed''' model. Defaults to the model in the placeable header
| 0x54 || [[AssetID]] || '''Pressed Model'''. Defaults to ModelAssetID in the placeable header (same model for pressed and unpressed).
|-
|-
| 0x58 || int || '''Type''' of button.
| 0x58 || int || '''Type'''.
* 0 = Switch - Button stays pressed after being hit. (Also has a flashing effect)
* 0 = Button - Stays pressed upon being hit. (Also has a flashing effect)
* 1 = Pressure Plate - Button stays pressed until it stops being hit, then it becomes unpressed.
* 1 = Pressure Plate - Stays pressed until it stops being hit, then unpresses.
|-
|-
| 0x5C || int || null
| 0x5C || int || null
|-
|-
| 0x60 || int || '''Hold Enabled'''. 0 (disabled) or 1 (enabled). Only applies to buttons of type Switch. If enabled, whenever the button is pressed, it stays pressed for '''Hold Length''', then it unpresses. Useful for time challenges or any situation where you want the button to only stay pressed for a certain amount of time.
| 0x60 || int || '''Unpress'''. 0 (disabled) or 1 (enabled). If this is enabled, the button will automatically unpress itself after '''Unpress Timeout'''. (Only works on Button, not Pressure Plate.) Useful for timed challenges.
|-
|-
| 0x64 || float || '''Hold Length''' in seconds. Only applies to buttons of type Switch.
| 0x64 || float || '''Unpress Timeout''' (seconds). Time to wait after being pressed to unpress.
|-
|-
| 0x68 || int || '''Hit Mask'''. This bitmask specifies what can press the button.
| 0x68 || int || '''Hit Mask'''. This bitmask specifies what can press the button.
* 0 - Bubble Spin
* 0 - Bubble Spin/Sliding (SpongeBob)
* 1 - Bubble Bounce
* 1 - Bubble Bounce
* 2 - Bubble Bash
* 2 - Bubble Bash
* 3 - Bubble Bowl/Boulder
* 3 - [[BOUL|Boulder]]/Bubble Bowl
* 4 - Cruise Bubble
* 4 - Cruise Bubble
* 5 - Bungee
* 5 - Bungee
Line 36: Line 36:
* 8 - Patrick Slam
* 8 - Patrick Slam
* 9 - Unknown
* 9 - Unknown
* 10 - Player Stand on Pressure Plate
* 10 - (Pressure Plate) Player Stand
* 11 - Enemy Stand on Pressure Plate
* 11 - (Pressure Plate) Enemy Stand
* 12 - Bubble Bowl/Boulder on Pressure Plate
* 12 - (Pressure Plate) [[BOUL|Boulder]]/Bubble Bowl
* 13 - Any Throwable on Pressure Plate (only Stone Tiki auto-target)
* 13 - (Pressure Plate) Stone Tiki
* 14 - Sandy Melee
* 14 - Sandy Melee/Sliding
* 15 - Patrick Melee
* 15 - Patrick Melee/Sliding
* 16 - Any Throwable on Pressure Plate (only Throw Fruit auto-target)
* 16 - (Pressure Plate) Throw Fruit
* 17-31 - Unused
|-
|-
| 0x6C || byte[8] || Unknown. Usually 4,0,0,4,2,1,1,0
| 0x6C || byte[8] || Unknown. Usually 4,0,0,4,2,1,1,0
|-
|-
| 0x74 || float || '''Y Offset''' of button during its pressed state.
| 0x74 || float || '''Pressed Height''' (local units). Height of the button when pressed. This is affected by local rotation and scale.
|-
|-
| 0x78 || float || '''Transition time''' in seconds between its unpressed and pressed states.
| 0x78 || float || '''Transition Time''' (seconds). Time it takes to move between pressed and unpressed height.
|-
|-
| 0x7C || float[2] || '''Transition Ease In/Out modifiers'''.
| 0x7C || float || '''Ease In Time''' (seconds). Easing in duration, relative to unpressed height. Must be >= 0 and <= Transition Time.
|-
| 0x80 || float || '''Ease Out Time''' (seconds). Easing out duration, relative to pressed height. Must be >= 0 and <= Transition Time.
|-
|-
| 0x84 || int[6] || null
| 0x84 || int[6] || null

Revision as of 01:24, 2 January 2019

BUTN
Button
TypePlaceable
Games usedThe Incredibles

This asset defines an entry for buttons such as switches and pressure plates.

Format

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

Offset Type Description
0x54 AssetID Pressed Model. Defaults to ModelAssetID in the placeable header (same model for pressed and unpressed).
0x58 int Type.
  • 0 = Button - Stays pressed upon being hit. (Also has a flashing effect)
  • 1 = Pressure Plate - Stays pressed until it stops being hit, then unpresses.
0x5C int null
0x60 int Unpress. 0 (disabled) or 1 (enabled). If this is enabled, the button will automatically unpress itself after Unpress Timeout. (Only works on Button, not Pressure Plate.) Useful for timed challenges.
0x64 float Unpress Timeout (seconds). Time to wait after being pressed to unpress.
0x68 int Hit Mask. This bitmask specifies what can press the button.
  • 0 - Bubble Spin/Sliding (SpongeBob)
  • 1 - Bubble Bounce
  • 2 - Bubble Bash
  • 3 - Boulder/Bubble Bowl
  • 4 - Cruise Bubble
  • 5 - Bungee
  • 6 - Thrown Enemy/Tiki
  • 7 - Throw Fruit
  • 8 - Patrick Slam
  • 9 - Unknown
  • 10 - (Pressure Plate) Player Stand
  • 11 - (Pressure Plate) Enemy Stand
  • 12 - (Pressure Plate) Boulder/Bubble Bowl
  • 13 - (Pressure Plate) Stone Tiki
  • 14 - Sandy Melee/Sliding
  • 15 - Patrick Melee/Sliding
  • 16 - (Pressure Plate) Throw Fruit
  • 17-31 - Unused
0x6C byte[8] Unknown. Usually 4,0,0,4,2,1,1,0
0x74 float Pressed Height (local units). Height of the button when pressed. This is affected by local rotation and scale.
0x78 float Transition Time (seconds). Time it takes to move between pressed and unpressed height.
0x7C float Ease In Time (seconds). Easing in duration, relative to unpressed height. Must be >= 0 and <= Transition Time.
0x80 float Ease Out Time (seconds). Easing out duration, relative to pressed height. Must be >= 0 and <= Transition Time.
0x84 int[6] null
Events
0x9C Event[numberOfEvents] Events

Events