EvilEngine/BUTN: Difference between revisions

m
Seil moved page BUTN to EvilEngine/BUTN
Battlepedia>Igorseabra4
(Created page with "==BUTN== This asset defines an entry for buttons such as switches and pressure plates. ==Format== {| class="wikitable" ! Offset !! Type !! Description |- ! colspan="3" | Head...")
 
m (Seil moved page BUTN to EvilEngine/BUTN)
 
(29 intermediate revisions by 4 users not shown)
Line 1:
<onlyinclude>
==BUTN==
{{#vardefine:typeid|BUTN}}<nowiki/>
{{#vardefine:name|Button}}<nowiki/>
{{#vardefine:type|[[Entity]]}}<nowiki/>
{{#vardefine:basetype|0x18}}<nowiki/>
{{#vardefine:games|Scooby BFBB TSSM Incredibles}}<nowiki/>
{{#vardefine:sourcecode|[https://github.com/bfbbdecomp/bfbb/blob/master/src/Game/zEntButton.h zEntButton.h]}}<nowiki/>
{{#vardefine:image|Buttons.png}}<nowiki/>
</onlyinclude>
{{AutoAssetInfobox}}
 
This asset defines an entry for buttons such as switches and pressure plates.
 
==Format==
Buttons are [[Entity|entity assets]], so they start with their 0x54 byte header, then are followed by:
 
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x54 || [[AssetID]] || '''modelPressedInfoID''' || Defaults to ModelAssetID in the placeable header (same model for pressed and unpressed).
! colspan="3" | Header
|-
| 0x000x58 || [[AssetID]]int || '''Asset IDactMethod'''. ||
* 0 = Button - Stays pressed upon being hit. (Also has a flashing effect)
* 1 = Pressure Plate - Stays pressed until it stops being hit, then unpresses.
|-
| 0x040x5C || byteint || '''Asset typeinitButtonState'''. 0x18 for BUTN.||
|-
| 0x60 || int || '''isReset''' || 0 (disabled) or 1 (enabled). If this is enabled, the button will automatically unpress itself after '''resetDelay'''. (Only works on Button, not Pressure Plate.) Useful for timed challenges.
| 0x05 || byte || '''Number of Events'''.
|-
| 0x64 || float || '''resetDelay''' || (seconds) Time to wait after being pressed to unpress.
| 0x06 || short || '''Flags'''. Usually 00 1D
|-
| 0x68 || int || '''buttonActFlags''' || This bitmask specifies what can press the button.
! colspan="3" | Button
* 0x1 - Bubble Spin/Sliding (SpongeBob)
* 0x2 - Bubble Bounce
* 0x4 - Bubble Bash
* 0x8 - [[BOUL|Boulder]]/Bubble Bowl
* 0x10 - Cruise Bubble
* 0x20 - Bungee
* 0x40 - Thrown Enemy/Tiki
* 0x80 - Throw Fruit
* 0x100 - Patrick Slam
* 0x200 - Unknown
* 0x400 - (Pressure Plate) Player Stand
* 0x800 - (Pressure Plate) Enemy Stand
* 0x1000 - (Pressure Plate) [[BOUL|Boulder]]/Bubble Bowl
* 0x2000 - (Pressure Plate) Stone Tiki
* 0x4000 - Sandy Melee/Sliding
* 0x8000 - Patrick Melee/Sliding
* 0x10000 - (Pressure Plate) Throw Fruit
* 0x20000 - Patrick Cartwheel (TSSM only, unused in BFBB)
* The rest of the bits are unused.
|-
| 0x6C || [[Motion]] || '''Motion''' || Always type 4 (Mechanism)
| 0x08 || byte[4] || Unknown. Usually 01 00 00 02 but sometimes different
|-
! colspan="34" | HeaderEvents
| 0x0C || int || null
|-
| 0x9C || Event[numberOfEvents] || '''[[Events]]''' || '''BFBB'''
| 0x10 || int || null
|-
| 0x140xA8 || Vector3Event[numberOfEvents] || '''Rotation[[Events]]''' || '''Movie'''
|-
| 0x20 || Vector3 || '''Position'''
|-
| 0x2C || Vector3 || '''Scale'''
|-
| 0x38 || Vector4 || '''Color'''
|-
| 0x48 || float || '''Unknown'''
|-
| 0x4C || [[AssetID]] || '''[[MINF]]'''
|-
| 0x50 || int || null
|-
| 0x54 || [[AssetID]] || ?
|-
| 0x58 || int || Type? 0 = Switch, 1 = Pressure Plate
|-
| 0x5C || int || null
|-
| 0x60 || int || Unknown. 0 or 1.
|-
| 0x64 || float || Unknown.
|-
| 0x68 || int || Unknown.
|-
| 0x6C || byte[8] || Unknown.
|-
| 0x74 || Vector2 || Unknown.
|-
| 0x7C || int[8] || Unknown (null?)
|-
! colspan="3" | Events
|-
| 0x9C || Event[numberOfEvents] || '''[[Events]]'''
|}
 
=== Events ===
 
{{Assets}}
{{AutoGameNavs}}
 
[[Category:Asset]]