Difference between revisions of "Entity"
Jump to navigation
Jump to search
(→Crash 2/3: Adding offsets.) |
|||
Line 53: | Line 53: | ||
|- | |- | ||
|0x10 + (h * 0x8) + 0x6 | |0x10 + (h * 0x8) + 0x6 | ||
− | | | + | |Row Count |
|2 bytes | |2 bytes | ||
− | | | + | |r |
|- | |- | ||
|colspan="4"|Field Structure ''f'' | |colspan="4"|Field Structure ''f'' | ||
Line 67: | Line 67: | ||
|Unknown | |Unknown | ||
|2 bytes | |2 bytes | ||
+ | |* | ||
+ | |- | ||
+ | |offset + 0xC + 0x4 | ||
+ | |Extra rows | ||
+ | |4 * r bytes | ||
+ | |* | ||
+ | |colspan="4"|Extra Row Structure ''e'' | ||
+ | |- | ||
+ | |offset + 0xC + 0x4 + e * 0x2 | ||
+ | |Unknown | ||
+ | |4 bytes | ||
|* | |* | ||
|- | |- | ||
|offset + 0xC + 0x4 | |offset + 0xC + 0x4 | ||
|Data | |Data | ||
− | |es * ec | + | |es * ec bytes |
|* | |* | ||
|- | |- | ||
Line 116: | Line 127: | ||
|Subtype | |Subtype | ||
|Variant of the entity | |Variant of the entity | ||
+ | |Int32 | ||
+ | |- | ||
+ | |0x13B | ||
+ | |Draw List A | ||
+ | |List of values that determine which entities should be undrawn while the camera is in this zone | ||
+ | |Int32 | ||
+ | |- | ||
+ | |0x13C | ||
+ | |Draw List B | ||
+ | |List of values that determine which entities should be drawn while the camera is in this zone | ||
+ | |Int32 | ||
+ | |- | ||
+ | |0x208 | ||
+ | |Load List A | ||
+ | |List of EIDs to load when the camera is in this zone | ||
+ | |Int32 | ||
+ | |- | ||
+ | |0x209 | ||
+ | |Load List B | ||
+ | |List of EIDs to load when the camera is in this zone | ||
|Int32 | |Int32 | ||
|- | |- | ||
Line 122: | Line 153: | ||
|List of entity IDs to destroy on certain occasions (i.e. TNT is undrawn, Nitro Switch activated) | |List of entity IDs to destroy on certain occasions (i.e. TNT is undrawn, Nitro Switch activated) | ||
|Int16 | |Int16 | ||
+ | |- | ||
+ | |0x30E | ||
+ | |Scale | ||
+ | |Indicates the scale of the object. Crash 3-only. 1 = 4x scale. | ||
+ | |Int32 | ||
|} | |} | ||
<sup>1</sup> - Draw lists store this as an Int16, so setting this to a value higher than that will cause severe issues. | <sup>1</sup> - Draw lists store this as an Int16, so setting this to a value higher than that will cause severe issues. |
Revision as of 18:10, 22 March 2016
An entity is an item that stores a collection of values (hereafter referred to as "fields") that can represent a game object/camera rail in Crash 2 and 3.
Format
Crash 2/3
Offset | Field | Size | Value | ||||
---|---|---|---|---|---|---|---|
0x0 | Length of this item | 4 bytes | * | ||||
0x4 | Unknown | 4 bytes x 2 | * | ||||
0xC | Field count | 4 bytes | hc | ||||
0x10 | Field info structures (headers) | hc * 8 bytes | * | ||||
Field Info Structure h | |||||||
0x10 + (h * 0x8) + 0x0 | Type | 2 bytes | * | ||||
0x10 + (h * 0x8) + 0x2 | Offset relative to 12 bytes at the start of the item | 2 bytes | offset | ||||
0x10 + (h * 0x8) + 0x4 | Flags | Byte | * | ||||
0x10 + (h * 0x8) + 0x5 | Element size | Byte | es | ||||
0x10 + (h * 0x8) + 0x6 | Row Count | 2 bytes | r | ||||
Field Structure f | |||||||
offset + 0xC + 0x0 | Element count | 2 bytes | ec | ||||
offset + 0xC + 0x2 | Unknown | 2 bytes | * | ||||
offset + 0xC + 0x4 | Extra rows | 4 * r bytes | * | Extra Row Structure e | |||
offset + 0xC + 0x4 + e * 0x2 | Unknown | 4 bytes | * | ||||
offset + 0xC + 0x4 | Data | es * ec bytes | * | ||||
offset + 0xC + 0x4 + es * ec | Unknown | ? bytes | * |
Type
The format and usage of the field data depends on the field type. Incomplete list.
Type | Name | Purpose | Format |
---|---|---|---|
0x2C | Name | String of characters for the internal name used to refer to the entity. It has no purpose so whatever you put here won't affect the game | UTF-8 charset |
0x4B | Position | List of position points to be used by the entity. Multiple of these can be used to make the entity follow a path (as long as it is programmed to do so) | Int16 for each X, Y and Z coordinate |
0x9F | ID | Value to uniquely identify the entity that is used to draw it, destroy it (see victims below) and other miscellaneous behaviors | Int321 |
0xA4 | General Settings | List of values that can be used to change a certain object's behavior (i.e. flags, delay, speed) | Int32 (UInt8 + Int24) |
0xA9 | Type | Type of the entity | Int32 |
0xAA | Subtype | Variant of the entity | Int32 |
0x13B | Draw List A | List of values that determine which entities should be undrawn while the camera is in this zone | Int32 |
0x13C | Draw List B | List of values that determine which entities should be drawn while the camera is in this zone | Int32 |
0x208 | Load List A | List of EIDs to load when the camera is in this zone | Int32 |
0x209 | Load List B | List of EIDs to load when the camera is in this zone | Int32 |
0x287 | Victim | List of entity IDs to destroy on certain occasions (i.e. TNT is undrawn, Nitro Switch activated) | Int16 |
0x30E | Scale | Indicates the scale of the object. Crash 3-only. 1 = 4x scale. | Int32 |
1 - Draw lists store this as an Int16, so setting this to a value higher than that will cause severe issues.