From Battlepedia
Revision as of 03:25, 1 July 2020 by Seil (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Heavy Iron games store all of their data for each scene in 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

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

RenderWare Streams

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.

Base Assets

Many assets extend from Base Assets (also referred to as object assets), which define objects in the level that can interact with each other by using links. Base assets start with an 8 byte header, defined by the xBaseAsset struct:

struct xBaseAsset
    unsigned int id;
    unsigned char baseType;
    unsigned char linkCount;
    unsigned short baseFlags;
Offset Variable Description
0x00 id Asset ID of entry. Should match the asset ID of the asset in the AHDR.
0x04 baseType Unique to each base asset type. The asset table below shows the base type for each type.
0x05 linkCount The number of links present at/near the end of the asset.
0x06 baseFlags Common flags represented as a 16-bit bitfield although only the 5 lowest bits are ever used.
  • 0x1 - Enabled - Initial enabled/disabled state. If the object is disabled, it won't receive events.
  • 0x2 - Persistent - If an asset is persistent, it will keep track of its current state and restore it on the next scene prepare (player respawn, level reload, etc.) For example, if you make a button persistent and press it in-game, the next time you load the level the button will automatically re-press itself.
  • 0x4 - Valid - Always 1.
  • 0x8 - Visible During Cutscenes - Whether to keep the object visible or not during cutscenes.
  • 0x10 - Receive Shadows - Whether to receive shadows from the player, NPCs, pickups, etc. Asset types known to use this flag: BUTN, PLAT, SIMP

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

These objects have, at the end of their data, an array of links, 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.

Entity Assets

Entity assets (also referred to as placeable assets) are base 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 base assets). They start with a 0x54 byte header, which is defined by the xEntAsset struct (which extends from xBaseAsset):

struct xEntAsset : xBaseAsset
    unsigned char flags;
    unsigned char subtype;
    unsigned char pflags;
    unsigned char moreFlags;
    unsigned char pad;
    unsigned int surfaceID;
    xVec3 ang;
    xVec3 pos;
    xVec3 scale;
    float redMult;
    float greenMult;
    float blueMult;
    float seeThru;
    float seeThruSpeed;
    unsigned int modelInfoID;
    unsigned int animListID;
Offset Variable Description
0x08 flags Flags stored in a bitfield, most likely related to visibility. Can be changed dynamically mid-game through events. (?)
  • 1 - Visible, used by BOUL, BUTN, DSTR, EGEN, PKUP, PLAT, PLYR, SIMP, TRIG, UI, UIFT, VIL
  • 2 - Stackable. Enabling this will cause the object to fall down and stack on top of other objects. This is mainly used for Destructible Objects, such as a table with a picture on top of it (when the table is destroyed, the picture falls to the ground). Note that this disables PLAT movement. Works with PLAT, BUTN, DSTR, VIL (?), and possibly others. Enabling this on a SIMP will crash the game.
  • 4 - Unused
  • 8 - Unknown, used by PLAT
  • 16 - Unused
  • 32 - Unused
  • 64 - Unknown, used by VIL
  • 128 - Unused
0x09 subType Defines the subtype of the asset. Usually 0 except for the asset types listed below.
0x0A pflags Always 0.
0x0B moreFlags 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.
  • 1 - Unused
  • 2 - Precise Collision. When enabled, the collision shape is the exact shape of the model. When disabled, the collision shape is the bounding box of the model. Used by BUTN, DSTR, EGEN, PKUP, PLAT, SIMP, UI, UIFT, VIL
  • 4 - Unknown, used by EGEN
  • 8 - Unused
  • 16 - Hittable. When enabled, the object detects when it is hit and sends Hit events. It also generates bubbles when hit with the Bubble Spin and destroys the Bubble Bowl and Cruise Bubble immediately upon impact. This flag will automatically enable in-game if the asset is a VIL, DSTR, BUTN, BOUL, or Paddle PLAT, OR if the asset has any Links that receive any of the Hit events.
  • 32 - Animate Collision. When enabled, the collision shape will update during the model's Animation if it has one. Precise Collision must also be enabled, or weird collision effects will occur. Used by PLAT, SIMP
  • 64 - Unused
  • 128 - Ledge Grab. When enabled, the player can ledge grab the object. Precise Collision must also be enabled. Used by PLAT, SIMP
0x0C pad Always null. Not present in some versions of entity assets, mainly beta/unused assets and non-BFBB assets. Those assets only have a 0x50-byte header.
0x10 surfaceID SURF ID for SIMP, PLAT, UI, EGEN, and possibly others.
0x14 ang A (Yaw, Pitch, Roll) rotation vector (in radians).
0x20 pos A (X, Y, Z) position vector.
0x2C scale A (X, Y, Z) scale vector.
0x38 redMult Red color multiplier (0 to 1).
0x3C greenMult Green color multiplier (0 to 1).
0x40 blueMult Blue color multiplier (0 to 1).
0x44 seeThru Alpha color multiplier (0 to 1).
0x48 seeThruSpeed Usually 255.0 in all types.
0x50 animListID ALST/ANIM ID for SIMP, PLAT, DSTR, and possibly others. SND ID for UI.

List of asset types

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