EvilEngine/Assets: Difference between revisions
EnergyDrink (talk | contribs) |
m (Seil moved page Asset to EvilEngine/Assets) |
(No difference)
|
Revision as of 17:53, 14 September 2022
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.
|
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. (?)
|
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.
|
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. |
0x4C | modelInfoID | MODL/MINF ID for BOUL, BUTN, DSTR, EGEN, HANG, PEND, PLAT, PKUP, PLYR, SIMP, UI and VIL |
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 6 games as well as which asset types are present in each game, signified by a checkmark (✔).
Asset | Description | Type | Base Type | Scooby | BFBB | TSSM | Incredibles | ROTU | RatProto | Notes | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
AnimList | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Animation | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
AnimTable | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Attack Table | Binary | - | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Bink Video | Binary | - | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Boulder | Entity | 0x2F | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
|
BSP | RenderWare | - | ✔ | ✔ | BSP level models are unused in BFBB, but still supported. | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Button | Entity | 0x18 | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Camera | Base | 0x07 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Camera Curve | Base | 0x8D | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Counter | Base | 0x16 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Collision Table | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Conditional | Base | 0x1F | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Credits | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Cutscene | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Cutscene Mgr | Base | 0x28 | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Cutscene Streaming Sound | Binary | - | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Cutscene TableOfContents | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Destructible Asset | Binary | - | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Dispatcher | Base | 0x1E | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Disco Floor | Base | 0x00 | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Destructible Object | Entity | 0x1B | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dash Track | Base | 0xCD | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Duplicator | Base | 0x42 | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dynamic | Base | 0x00 | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Electric Arc Generator | Entity | 0x29 | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Environment | Base | 0x05 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Fly | Binary | - | ✔ | ✔ | ✔ | ✔ | FLY assets are only used in cutscenes in The Incredibles | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Fog | Base | 0x24 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Grass Mesh | Base | 0xCD | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Group | Base | 0x11 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Gust | Base | 0x1C | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hangable | Entity | 0x17 | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jaw Data Table | Binary | - | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
JSP | RenderWare | - | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Light | Base | 0x25 | ✔ | ✔ | LITE assets are unused in BFBB, but are still supported. | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
LightKit | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
LobMaster | Base | 0x23 | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
LOD Table | Binary | - | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Surface Mapper | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Model Info | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Model | RenderWare | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Morph Target | Binary | - | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marker | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Move Point | Base | 0x0D | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Navigation Mesh | Base | 0x9A 0xCD |
✔ | ✔ | ✔ | Base Type notes: 0x9A is only used in Rise of the Underminer. 0xCD is only used in The Incredibles. | |||||||||||||||||||||||||||||||||||||||||||||||||
|
NPC | Entity | 0x02 | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
NPC Settings | Binary | - | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
One-Liner | Binary | - | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Particle Emitter | Base | 0x26 | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Particle Emitter Property | Base | 0x2E | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Particle System | Base | 0x27 | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Pendulum | Entity | 0x12 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | PEND assets are unused in every game except Scooby, but are still supported. | ||||||||||||||||||||||||||||||||||||||||||||||
|
Progress Script | Base | 0x75 | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pickup Table | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Pipe Info Table | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Pickup | Entity | 0x04 | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Platform | Entity | 0x06 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Player | Entity | 0x03 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Portal | Base | 0x10 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Projectile | Base | 0x22 | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Reactive Animation | Base | 0x00 | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Raw Image | Binary | - | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
This page contains information on how textures are stored in the games.
Textures are contained in RWTX assets. Each HOP file (sometimes the HIP) contains multiple RWTX assets, each corresponding to one texture. RWTX
The data of the RWTX asset is actually a TXD archive containing only one texture. It's unknown if one RWTX asset can contain multiple textures, but this is likely not done in the games. RW3.RW3 is not a file format, extension, or texture format, but rather an identifier. There are two "styles" of RWTX: the ones with .RW3 appended to the end of the texture name, and the ones without. Internally, both are the same, but the textures with .RW3 are the ones used by the game's models for rendering (BSP, JSP and MODL) while the ones without are used in other spaces, usually for rendering on screen space instead of world space (such as inside TEXTs, in UI, UIFT and other asset types). This works in a system such that, if a texture is named "example_texture", then the model using that texture will contain a reference to a texture named "example_texture", but the RWTX asset of the texture will be named "example_texture.RW3". This must be done in order for the game to find the texture; Industrial Park can do this automatically for you when importing or replacing textures and models.
TEXS
TXDTXD is an archive file format used to contain textures in RenderWare games. One single TXD file can contain multiple textures; RWTX assets are TXDs with only one. Magic.TXD is a tool which can open and edit TXD files. Industrial Park has a function that allows you to import or export all RWTX assets from a given HIP/HOP archive into a TXD; it does this by merging all RWTXs into one TXD (for export) then separating them into multiple RWTXs (for import). You can choose to do this to only the assets which have .RW3 at the end or only to the ones which don't. This should make it easier for you to edit the textures. RWTEXRWTEX is a file format used internally by Magic.TXD to contain only one texture. A RWTEX is a part of a TXD and doesn't function by itself, and it should not be confused with RWTX. You can export and import RWTEXs from Magic.TXD and Industrial Park can also work with this format. RWTEXs do not work by themselves as RWTX assets. RenderWare VersionsEach game/platform combination will use a different, specific format on its textures, and if it's incorrect, the texture will not load ingame. This format can be changed in Magic.TXD and it's common for it to reset itself (specially if you delete all textures from a TXD before adding new ones), so you might need to set it yourself again.
|
Raw Image | Binary | - | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Script | Base | 0x2A | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | SCRP assets are unused in Scooby and BFBB, but are still supported. (AR codes, and/or IPS patches are required) | ||||||||||||||||||||||||||||||||||||||||||||||
|
Sound FX | Base | 0x4B | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Sound FX | Base | 0x13 | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sound Group | Base | 0x4A | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Simple Shadow Table | Binary | - | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Shrapnel | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Simple Object | Entity | 0x0B | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Slide Property | Base | 0x46 | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
SND | Sound | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
SNDI | Sound Info | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
SNDS | Streaming Sound | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Spline | Base | 0x49 | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Spline Path | Base | 0x73 | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Scene Settings | Base | 0x54 | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subtitles | Base | 0x00 | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Surface | Base | 0x1A | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Streaming Texture | RenderWare | - | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Text | Binary | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Timer | Base | 0x0E | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
Pickup Types | Base | 0x00 | ✔ | ✔ | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Trigger | Entity | 0x01 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||
|
ThrowableTable | Base | 0x00 | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
UI | Entity | 0x20 | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
UI Font | Entity | 0x21 | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
UI Motion | Base | 0x53 | ✔ | ✔ | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||
|
NPC | Entity | 0x2B | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
NPC Properties | Binary | - | ✔ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Volume | Base | 0x1D | ✔ | ✔ | ✔ | VOLU is not present in The Incredibles, but there is code for it | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Wireframe | Binary | - | ✔ | ✔ | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Zip Line | Base | 0x40 | ✔ |