EvilEngine/Assets: Difference between revisions

Content added Content deleted
Battlepedia>Wowaname
mNo edit summary
Battlepedia>Seil
No edit summary
Line 1:
''[[SpongebobHeavy Squarepants:Iron Battlegames Forstore Bikiniall Bottom]]''of workstheir bydata usingfor 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 (File Format)|HIP archives]] and uniquely identified by their [[Asset ID]]. It is not yet known what all different asset types do.
 
==Classes of Assets==
Line 7:
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 [https://www.gta-modding.com/area/file-33-rw-analyze.html RW Analyze]. They are: [[BSP]], [[JSP]], [[MODL]], [[RWTX]].
 
===ObjectBase 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 [[Events#Links|links]]. Base assets start with an 8 byte header, defined by the <code>xBaseAsset</code> struct:
Object assets are a class which start with the following 8 byte header, and are able to send and recieve [[events]].
 
<source lang=cpp>
struct xBaseAsset
{
unsigned int id;
unsigned char baseType;
unsigned char linkCount;
unsigned short baseFlags;
}
</source>
 
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x00 || [[AssetID]] || '''Asset IDid''' || [[Asset ID]] of entry. Should match the asset ID of the asset in the [[HIP (File Format)#AHDR|AHDR]].
|-
| 0x04 || byte || '''Object IDbaseType''' || Unique to each objectbase asset type. The asset table below shows the objectbase IDtype for each type.
|-
| 0x05 || '''linkCount''' || The number of links present at/near the end of the asset.
| 0x05 || byte || '''Number of Events''' ||
|-
| 0x06 || short || '''FlagsbaseFlags''' || Common flags represented as a 16-bit bitfield although only the 5 lowest bits are ever used.
* 10x1 - '''Enabled''' - Initial enabled/disabled state. 0If =the object is disabled, 1it =won't enabledreceive events.
* 20x2 - '''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 [[BUTN|button]] persistent and press it in-game, the next time you load the level the button will automatically re-press itself.
* 40x4 - unknown'''Valid''' - Always 1.
* 80x8 - '''Visible During Cutscenes''' - Whether to keep the object visible or not during cutscenes.
* 160x10 - '''Receive Shadows''' - UsedWhether byto somereceive placeableshadows assetfrom typesthe butplayer, notNPCs, allpickups, etc. Asset types known to use this flag: [[BUTN]], [[PLAT]], [[SIMP]]
|}
 
The data that follows this header differs depending on the asset type. Some objectbase assets are placeableentity assets as well (defined below).
 
These objects have, at the end of their data, an array of [[eventsEvents#Links|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.
 
===PlaceableEntity Assets===
PlaceableEntity assets (also referred to as placeable assets) are objectbase 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 objectbase assets). They start with thea 80x54 byte objectheader, assetwhich headeris detaileddefined above,by thenthe are<code>xEntAsset</code> followedstruct by(which thisextends from <code>xBaseAsset</code>):
 
<source lang=cpp>
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;
};
</source>
 
{| class="wikitable"
! 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. (?)
* 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 [[DSTR|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.
Line 47 ⟶ 79:
* 128 - Unused
|-
| 0x09 || byte || '''Type flagssubType''' || Defines the subtype of the asset. Usually 0 except for the asset types listed below.
* [[PKUP]] - [[PKUP#Types (0x09)|Pickup types]]
* [[PLAT]] - [[PLAT#Types (0x09)|Platform types]]
* [[TRIG]] - 0 = Box, 1 = Sphere, 2 = Cylinder
|-
| 0x0A || byte || '''Unknown flagspflags''' || Always 0.
|-
| 0x0B || byte || '''Solidity flagsmoreFlags''' || 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]]
Line 64 ⟶ 96:
* 128 - '''Unknown''', used by [[PLAT]], [[SIMP]]
|-
| 0x0C || int || '''Unknownpad''' || Always null. '''Not present in some versions of placeableentity assets''', mainly beta/unused assets and non-BFBB assets. Those assets only have a 0x50-byte header.
|-
| 0x10 || [[AssetID]] ([[SURF]]) || '''SurfacesurfaceID''' || Surface[[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.
| 0x10 || [[AssetID]] ([[SURF]]) || '''Surface''' || Surface for [[SIMP]], [[PLAT]], [[UI]], [[EGEN]], and possibly others.
|-
| 0x14 || [[Vector3]]0x38 || '''RotationredMult''' || ARed (Yaw,color Pitch,multiplier Roll)(0 rotation vector (into radians1).
|-
| 0x20 || [[Vector3]]0x3C || '''PositiongreenMult''' || AGreen color multiplier (X,0 Y,to Z1) position vector.
|-
| 0x2C || [[Vector3]]0x40 || '''ScaleblueMult''' || ABlue color multiplier (X,0 Y,to Z1) scale vector.
|-
| 0x38 || [[Vector4]]0x44 || '''ColorseeThru''' || A (R, G, B, A)Alpha color vectormultiplier (values range from 0 to 1). Usually (1.0, 1.0, 1.0, 1.0) in all types.
|-
| 0x48 || float || '''UnknownseeThruSpeed''' || Usually 255.0 in all types.
|-
| 0x4C || [[AssetID]]'''modelInfoID''' || ([[MODL]]/[[MINF]]) || '''Model''' || ModelID for [[BOUL]], [[BUTN]], [[DSTR]], [[EGEN]], [[HANG]], [[PEND]], [[PLAT]], [[PKUP]], [[PLYR]], [[SIMP]], [[UI]] and [[VIL]]
|-
| 0x50 || [[AssetID]]'''animListID''' || ([[ALST]]/[[ANIM]]/[[SND]]) || '''Animation/Sound''' || Animation/animation listID for [[SIMP]], [[PLAT]], [[DSTR]], and possibly others. Sound[[SND]] ID for [[UI]].
|}
 
Line 97 ⟶ 135:
! Description
! Type
! ObjectBase IDType
! 1
! 2
Line 103 ⟶ 141:
! 4
! 5
! Notes
|-
| align=center | [[ALST]]
Line 108 ⟶ 147:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[ANIM]]
Line 114 ⟶ 153:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[ATBL]]
Line 120 ⟶ 159:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[ATKT]]
Line 126 ⟶ 165:
|| Binary
| align=center | -
|| || || || ✔ || ||
|-
| align=center | [[BINK]]
Line 132 ⟶ 171:
|| Binary
| align=center | -
|| || || || ✔ || ✔ ||
|-
| align=center | [[BOUL]]
|| Boulder
|| PlaceableEntity
| align=center | 0x2F
|| || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[BSP]]
Line 144 ⟶ 183:
|| RenderWare
| align=center | -
|| ✔ || || || || ||
|-
| align=center | [[BUTN]]
|| Button
|| PlaceableEntity
| align=center | 0x18
|| ✔ || ✔ || ✔ || ✔ || ||
|-
| align=center | [[CAM]]
|| Camera
|| ObjectBase
| align=center | 0x07
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[CCRV]]
|| Camera Curve
|| ObjectBase
| align=center | 0x8D
|| || || || || ✔ ||
|-
| align=center | [[CNTR]]
|| Counter
|| ObjectBase
| align=center | 0x16
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[COLL]]
Line 174 ⟶ 213:
|| Binary
| align=center | -
|| || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[COND]]
|| Conditional
|| ObjectBase
| align=center | 0x1F
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[CRDT]]
Line 186 ⟶ 225:
|| Binary
| align=center | -
|| || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[CSN]]
Line 192 ⟶ 231:
|| Binary
| align=center | -
|| || ✔ || ✔ || ✔ || ||
|-
| align=center | [[CSNM]]
|| Cutscene Mgr
|| ObjectBase
| align=center | 0x28
|| ✔ || ✔ || ✔ || ✔ || ||
|-
| align=center | [[CSSS]]
Line 204 ⟶ 243:
|| Binary
| align=center | -
|| || || ✔ || ✔ || ||
|-
| align=center | [[CTOC]]
Line 210 ⟶ 249:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ||
|-
| align=center | [[DEST]]
Line 216 ⟶ 255:
|| Binary
| align=center | -
|| || || ✔ || ✔ || ✔ ||
|-
| align=center | [[DPAT]]
|| Dispatcher
|| ObjectBase
| align=center | 0x1E
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[DSCO]]
|| Disco Floor
|| ObjectBase
| align=center | 0x00
|| || ✔ || ✔ || || ||
|-
| align=center | [[DSTR]]
|| Destructible Object
|| PlaceableEntity
| align=center | 0x1B
|| ✔ || ✔ || || || ||
|-
| align=center | [[DTRK]]
||
|| ObjectBase
| align=center | 0xCD
|| || || || ✔ || ||
|-
| align=center | [[DUPC]]
||
|| ObjectBase
| align=center | 0x42
|| || || || ✔ || ||
|-
| align=center | [[DYNA]]
|| Dynamic Type
|| ObjectBase
| align=center | 0x00
|| || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[EGEN]]
|| Electric Arc Generator
|| PlaceableEntity
| align=center | 0x29
|| ✔ || ✔ || ✔ || || ||
|-
| align=center | [[ENV]]
|| Environment
|| ObjectBase
| align=center | 0x05
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[FLY]]
Line 270 ⟶ 309:
|| Binary
| align=center | -
|| || ✔ || ✔ || || ||
|-
| align=center | [[FOG]]
|| Fog
|| ObjectBase
| align=center | 0x24
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[GRSM]]
|| Grass Mesh
|| ObjectBase
| align=center | 0xCD
|| || || || ✔ || ||
|-
| align=center | [[GRUP]]
|| Group
|| ObjectBase
| align=center | 0x11
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[GUST]]
|| Gust
|| ObjectBase
| align=center | 0x1C
|| ✔ || || || || ||
|-
| align=center | [[HANG]]
|| Hangable
|| PlaceableEntity
| align=center | 0x17
|| ✔ || || || || ✔ ||
|-
| align=center | [[JAW]]
Line 306 ⟶ 345:
|| Binary
| align=center | -
|| || ✔ || ✔ || || ✔ ||
|-
| align=center | [[JSP]]
Line 312 ⟶ 351:
|| RenderWare
| align=center | -
|| || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[LITE]]
|| Light
|| ObjectBase
| align=center | 0x25
|| ✔ || || || || ||
|-
| align=center | [[LKIT]]
Line 324 ⟶ 363:
|| Binary
| align=center | -
|| || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[LOBM]]
|| LobMaster
|| ObjectBase
| align=center | 0x23
|| ✔ || || || || ||
|-
| align=center | [[LODT]]
Line 336 ⟶ 375:
|| Binary
| align=center | -
|| || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[MAPR]]
Line 342 ⟶ 381:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[MINF]]
Line 348 ⟶ 387:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[MODL]]
Line 354 ⟶ 393:
|| RenderWare
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[MPHT]]
Line 360 ⟶ 399:
|| Binary
| align=center | -
|| ✔ || || || || ||
|-
| align=center | [[MRKR]]
Line 366 ⟶ 405:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[MVPT]]
|| Move Point
|| ObjectBase
| align=center | 0x0D
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[NGMS]]
|| NavMesh
|| ObjectBase
| align=center | 0x9A<br>0xCD
|| || || || ✔ || ✔ || '''ObjectBase IDType notes:'''<br>0x9A is only used in Rise of the Underminer.<br>0xCD is only used in The Incredibles.
|-
| align=center | [[NPC]]
|| NPC
|| PlaceableEntity
| align=center | 0x02
|| ✔ || || || || ||
|-
| align=center | [[NPCS]]
Line 390 ⟶ 429:
|| Binary
| align=center | -
|| || || || ✔ || ✔ ||
|-
| align=center | [[ONEL]]
Line 396 ⟶ 435:
|| Binary
| align=center | -
|| || || || ✔ || ||
|-
| align=center | [[PARE]]
|| Particle Emitter
|| ObjectBase
| align=center | 0x26
|| ✔ || ✔ || ✔ || || ✔ ||
|-
| align=center | [[PARP]]
|| Particle Emitter Property
|| ObjectBase
| align=center | 0x2E
|| || ✔ || ✔ || || ✔ ||
|-
| align=center | [[PARS]]
|| Particle System
|| ObjectBase
| align=center | 0x27
|| ✔ || ✔ || ✔ || || ✔ ||
|-
| align=center | [[PEND]]
|| Pendulum
|| PlaceableEntity
| align=center | 0x12
|| ✔ || || || || ||
|-
| align=center | [[PGRS]]
|| Prog(?) Script
|| ObjectBase
| align=center | 0x75
|| || || || ✔ || ✔ ||
|-
| align=center | [[PICK]]
Line 432 ⟶ 471:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || || ✔ ||
|-
| align=center | [[PIPT]]
Line 438 ⟶ 477:
|| Binary
| align=center | -
|| || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[PKUP]]
|| Pickup
|| PlaceableEntity
| align=center | 0x04
|| ✔ || ✔ || ✔ || || ||
|-
| align=center | [[PLAT]]
|| Platform
|| PlaceableEntity
| align=center | 0x06
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[PLYR]]
|| Player
|| PlaceableEntity
| align=center | 0x03
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[PORT]]
|| Portal
|| ObjectBase
| align=center | 0x10
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[PRJT]]
|| Projectile
|| ObjectBase
| align=center | 0x22
|| ✔ || || || || ||
|-
| align=center | [[RANM]]
|| Reactive Animation List
|| ObjectBase
| align=center | 0x00
|| || || ✔ || ✔ || ||
|-
| align=center | [[RAW]]
Line 480 ⟶ 519:
|| Binary
| align=center | -
|| || ✔ || || ✔ || ✔ ||
|-
| align=center | [[RWTX]]
Line 486 ⟶ 525:
|| RenderWare
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[SCRP]]
|| Script
|| ObjectBase
| align=center | 0x2A
|| || || ✔ || ✔ || ✔ ||
|-
| align=center | [[SDFX]]
|| Sound FX
|| ObjectBase
| align=center | 0x4B
|| || || ✔ || ✔ || ✔ ||
|-
| align=center | [[SFX]]
|| Sound FX
|| ObjectBase
| align=center | 0x13
|| ✔ || ✔ || || || ||
|-
| align=center | [[SGRP]]
|| Sound Group
|| ObjectBase
| align=center | 0x4A
|| || || ✔ || ✔ || ✔ ||
|-
| align=center | [[SHDW]]
Line 516 ⟶ 555:
|| Binary
| align=center | -
|| || ✔ || || || ||
|-
| align=center | [[SHRP]]
Line 522 ⟶ 561:
|| Binary
| align=center | -
|| || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[SIMP]]
|| Simple Object
|| PlaceableEntity
| align=center | 0x0B
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[SLID]]
|| Slide Property
|| ObjectBase
| align=center | 0x46
|| || || || ✔ || ||
|-
| align=center | [[SND]]
Line 540 ⟶ 579:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[SNDI]]
Line 546 ⟶ 585:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[SNDS]]
Line 552 ⟶ 591:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[SPLN]]
|| Spline
|| ObjectBase
| align=center | 0x49
|| || || ✔ || ✔ || ✔ ||
|-
| align=center | [[SPLP]]
Line 564 ⟶ 603:
|| Binary
| align=center | -
|| || || || ✔ || ||
|-
| align=center | [[SSET]]
|| Scene Settings
|| ObjectBase
| align=center | 0x54
|| || || || ✔ || ||
|-
| align=center | [[SUBT]]
|| Subtitles
|| ObjectBase
| align=center | 0x00
|| || || || ✔ || ✔ ||
|-
| align=center | [[SURF]]
|| Surface
|| ObjectBase
| align=center | 0x1A
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[TEXS]]
Line 588 ⟶ 627:
|| Binary
| align=center | -
|| || || ✔ || ✔ || ✔ ||
|-
| align=center | [[TEXT]]
Line 594 ⟶ 633:
|| Binary
| align=center | -
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[TIMR]]
|| Timer
|| ObjectBase
| align=center | 0x0E
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[TPIK]]
|| Pickup Types
|| ObjectBase
| align=center | 0x00
|| || || || ✔ || ✔ ||
|-
| align=center | [[TRIG]]
|| Trigger
|| PlaceableEntity
| align=center | 0x01
|| ✔ || ✔ || ✔ || ✔ || ✔ ||
|-
| align=center | [[TRWT]]
|| Throwables
|| ObjectBase
| align=center | 0x00
|| || || || ✔ || ✔ ||
|-
| align=center | [[UI]]
|| UI
|| PlaceableEntity
| align=center | 0x20
|| ✔ || ✔ || || || ||
|-
| align=center | [[UIFT]]
|| UI Font
|| PlaceableEntity
| align=center | 0x21
|| ✔ || ✔ || || || ||
|-
| align=center | [[UIM]]
|| UI Motion
|| ObjectBase
| align=center | 0x53
|| || || ✔ || ✔ || ✔ ||
|-
| align=center | [[VIL]]
|| NPC
|| PlaceableEntity
| align=center | 0x2B
|| || ✔ || || ✔ || ||
|-
| align=center | [[VILP]]
Line 648 ⟶ 687:
|| Binary
| align=center | -
|| || ✔ || || || ||
|-
| align=center | [[VOLU]]
|| Volume
|| ObjectBase
| align=center | 0x1D
|| ✔ || || || || ✔ ||
|-
| align=center | [[WIRE]]
Line 660 ⟶ 699:
|| Binary
| align=center | -
|| || || || ✔ || ✔ ||
|-
| align=center | [[ZLIN]]
|| Zip Line
|| ObjectBase
| align=center | 0x40
|| || || || ✔ || ||
|}