Asset

From BFBB Wiki
Jump to: navigation, search

Spongebob Squarepants: Battle For Bikini Bottom works by using assets, which can be different formats such as models, textures, animations, object placement information, and many others. Assets are defined by AHDR sections in the HIP archives and uniquely identified by their Asset ID. It is not yet known what all different asset types do.

Classes of Assets[edit]

There are many different asset types, but they can be grouped into classes that have similar properties.

Renderware Streams[edit]

These are assets whose data is composed of a Renderware binary stream, with the tree structure commonly found in them. These assets can be opened in RW Analyze. They are: BSP, JSP, MODL, RWTX.

Object Assets[edit]

Object assets are a class which start with the following 8 byte header, and are able to send and recieve events.

Offset Type Variable Description
0x00 AssetID Asset ID Asset ID of entry. Should match the asset ID of the asset in the AHDR.
0x04 byte Object ID Unique to each object type. The asset table below shows the object ID for each type.
0x05 byte Number of Events
0x06 short Flags Common flags represented as a 16-bit bitfield although only the 5 lowest bits are ever used.
  • 1 - Enabled - Initial enabled/disabled state. 0 = disabled, 1 = enabled
  • 2 - unknown
  • 4 - unknown - Always 1
  • 8 - unknown
  • 16 - Receive Shadows - Used by some placeable asset types but not all. Asset types known to use this flag: BUTN, PLAT, SIMP

The data that follows this header differs depending on the asset type. Some object assets are placeable assets as well (defined below).

These objects have, at the end of their data, an array of events, with the amount of entries specified in this header. The only exception for this is the PLYR assets, which still has one field after the events.

Placeable Assets[edit]

Placeable assets are object assets which have a 3D placement in the world and the following common header (not all objects with a position follow this, though; for example, MRKR have a position but are not even object assets). They start with the 8 byte object asset header detailed above, then are followed by this:

Offset Type Variable Description
0x08 byte Visibility flags Flags stored in a bitfield, most likely related to visibility. Can be changed dynamically mid-game through events. (?) Always 1 for BOUL and PLYR.
0x09 byte Type flags Defines the subtype of the asset. Usually 0 except for the asset types listed below.
0x0A byte Unknown flags Always 0.
0x0B byte Solidity flags Flags stored in a bitfield, most likely related to collision. Can be changed dynamically mid-game through events. (?) Always 0 for BOUL, PLYR, and TRIG.
0x0C int Unknown Always null. Not present in some versions of placeable assets, mainly beta/unused assets and non-BFBB assets.
0x10 AssetID (SURF) Surface Surface for SIMP, PLAT, UI, EGEN, and possibly others.
0x14 Vector3 Rotation A (Y, X, Z) rotation vector (in radians).
0x20 Vector3 Position A (X, Y, Z) position vector.
0x2C Vector3 Scale A (X, Y, Z) scale vector.
0x38 Vector4 Color A (R, G, B, A) color vector (values range from 0 to 1). Usually (1.0, 1.0, 1.0, 1.0) in all types.
0x48 float Unknown Usually 255.0 in all types.
0x4C AssetID (MODL/MINF) Model Model for SIMP, VIL, PLAT, PKUP, TRIG, DSTR, BUTN, UI, BOUL, EGEN, PLYR, and possibly others.
0x50 AssetID (ALST/ANIM/SND) Animation/Sound Animation/animation list for SIMP, PLAT, DSTR, and possibly others. Sound for UI.

List of asset types[edit]

The following is a list of all asset types found across all 5 games. Columns 1 through 5 represent the games ordered by their release dates, and specify which asset types are used in each game.

  1. Scooby-Doo! Night of 100 Frights
  2. SpongeBob SquarePants: Battle for Bikini Bottom
  3. The SpongeBob SquarePants Movie
  4. The Incredibles
  5. The Incredibles: Rise of the Underminer
Asset Description Type Object ID 1 2 3 4 5
ALST Animation list Binary -
ANIM Animation Binary -
ATBL Animation Table Binary -
ATKT Attack Table Binary -
BINK Bink Video? Binary -
BOUL Boulder Placeable 0x2F
BSP Level Model RenderWare -
BUTN Button Placeable 0x18
CAM Camera Object 0x07
CCRV Camera Curve Object 0x8D
CNTR Counter Object 0x16
COLL Collision Table Binary -
COND Conditional Object 0x1F
CRDT Credits Binary -
CSN Cutscene Binary -
CSNM Cutscene Mgr Object 0x28
CSSS Cutscene Streaming Sound? Binary -
CTOC Cutscene TOC Binary -
DEST Destructible? Binary -
DPAT Dispatcher Object 0x1E
DSCO Disco Floor Object 0x00
DSTR Destructible Object Placeable 0x1B
DTRK Object 0xCD
DUPC Object 0x42
DYNA Dynamic Type Object 0x00
EGEN Electric Arc Generator Placeable 0x29
ENV Environment Object 0x05
FLY Flythrough Binary -
FOG Fog Object 0x24
GRSM Grass Mesh Object 0xCD
GRUP Group Object 0x11
GUST Gust Object 0x1C
HANG Hangable Placeable 0x17
JAW Jaw Data Binary -
JSP Level Model RenderWare -
LITE Light Object 0x25
LKIT LightKit Binary -
LOBM LobMaster Object 0x23
LODT LOD Table Binary -
MAPR Material Map Binary -
MINF Model Info Binary -
MODL RenderWare DFF RenderWare -
MPHT Morph Target? Binary -
MRKR Marker Binary -
MVPT Move Point Object 0x0D
NGMS NavMesh Object 0x9A
0xCD
Object ID notes:
0x9A is only used in Rise of the Underminer.
0xCD is only used in The Incredibles.
NPC NPC Object 0x02
NPCS NPC Settings Binary -
ONEL One-Liners Binary -
PARE Particle Emitter Object 0x26
PARP Particle Emitter Property Object 0x2E
PARS Particle System Object 0x27
PEND Pendulum Placeable 0x12
PGRS Prog(?) Script Object 0x75
PICK Pickup Table Binary -
PIPT Pipe Info Table Binary -
PKUP Pickup Placeable 0x04
PLAT Platform Placeable 0x06
PLYR Player Placeable 0x03
PORT Portal Object 0x10
PRJT Projectile Object 0x22
RANM Reactive Animation List Object 0x00
RAW Raw Image Binary -
RWTX Texture Dictionary RenderWare -
SCRP Script Object 0x2A
SDFX Sound FX Object 0x4B
SFX Sound FX Object 0x13
SGRP Sound Group Object 0x4A
SHDW Simple Shadow Table Binary -
SHRP Shrapnel Binary -
SIMP Simple Object Placeable 0x0B
SLID Slide Property Object 0x46
SND Sound Binary -
SNDI Sound Info Binary -
SNDS Streaming Sound Binary -
SPLN Spline Object 0x49
SPLP Spline Path Binary -
SSET Scene Settings Object 0x54
SUBT Subtitles Object 0x00
SURF Surface Object 0x1A
TEXS Binary -
TEXT Text Binary -
TIMR Timer Object 0x0E
TPIK Pickup Types Object 0x00
TRIG Trigger Placeable 0x01
TRWT Throwables Object 0x00
UI UI Placeable 0x20
UIFT UI Font Placeable 0x21
UIM UI Motion Object 0x53
VIL NPC Placeable 0x2B
VILP NPC Properties Binary -
VOLU Volume Object 0x1D
WIRE Wireframe Binary -
ZLIN Zip Line Object 0x40