EvilEngine/SHRP: Difference between revisions
Content added Content deleted
No edit summary |
EnergyDrink (talk | contribs) No edit summary |
||
Line 12:
This asset defines data for shrapnel.
==Format (Headers)==
===zShrapnelAsset===
The asset data starts with a 0xC byte header:
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x00 || int || '''fassetCount''' || Amount of
|-
| 0x04 || [[AssetID]] || '''sharpnelID''' || This asset
|-
| 0x08 || int || colspan="2" | Unknown, always 0
|}
After that, there's an array of shrapnel entries, as defined in the header. Each entry is of variable size:
* '''Type 1 (
* '''Type 2 (
* '''Type 3 (
** BFBB - 0x1D4
** TSSM - 0x1F8
* '''Type 4 (
**
** TSSM - 0x110
* '''Type
** BFBB - 0x68
** TSSM - 0x70
* '''Type
** BFBB - 0x4C
**
* '''Type 7 (Shockwave)'''
** TSSM - 0x48
* '''Type 8 (Explosion)'''
** TSSM - 0x48
* '''Type 9 (Distortion)'''
** TSSM - 0x5C
* '''Type 10 (Fire)'''
** TSSM - 0x5C
===zFragAsset===
The entries have the following structure:
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x00 || int ||
* 0 = eFragInactive
* 1 = eFragGroup
* 2 = eFragShrapnel
* 3 = eFragParticle
* 4 = eFragProjectile
* 5 = eFragLightning
* 6 = eFragSound
* 7 = eFragShockwave
* 8 = eFragExplosion
* 9 = eFragDistortion
* 10 = eFragFire
|-
| 0x04 || [[AssetID]] ||
|-
| 0x08 ||
|-
| 0x0C ||
|-
| 0x10 || float || '''lifetime''' ||
|-
| 0x14 || float || '''delay''' ||
|}
===
Every entry/frag (except shockwave) has this header at a different position.<br>
Sometimes it only has 0xCD padding bytes.
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
|
* 0 = eFragLocBone
* 1 = eFragLocBoneUpdated
* 2 = eFragLocBoneLocal
* 3 = eFragLocBoneLocalUpdated
* 4 = eFragLocTag
* 5 = eFragLocTagUpdated
|-
! colspan="4" | [Frag] Bone only
|-
|
|-
|
|-
| 0x0C || uint[4] || colspan="2" | Padding - 0xCD bytes, 4-byte alignment
|-
! colspan="4" | [Model] Tag only
|-
|
|-
| 0x10 || uint || '''matidx''' ||
|-
| 0x14 || float[4] || '''wt''' || Always 0xCD padding bytes?
|-
! colspan="4" |
|-
| 0x24 || float || '''rand_radius''' || '''Not present in BFBB'''
|}
==
===Type 3 - Particle===
====BFBB====
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
! 0x18 || colspan="3" |
|-
! 0x3C || colspan="3" | [[#zFragLocation|zFragLocation]] vel
|-
| 0x60 || uint[91] || colspan="2" | Padding - 0xCD bytes, 4-byte alignment
|-
|
|-
| 0x1D0 || uint || '''parEmitter''' || Always 0
|}
====Movie====
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
! 0x18 || colspan="3" | [[#zFragLocation|zFragLocation]] source
|-
! 0x40 || colspan="3" | [[#zFragLocation|zFragLocation]] vel
|-
|
|-
|
|-
|
|-
|
|}
===
====BFBB====
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x18 || [[AssetID]] || '''modelInfoID''' || [[MODL]]
|-
| 0x1C ||
|-
! 0x20 || colspan="3" | [[#zFragLocation|zFragLocation]] launch
|-
! 0x44 || colspan="3" | [[#zFragLocation|zFragLocation]] vel
|-
|
|-
|
|-
|
|-
| 0x74 || [[AssetID]] || '''childID''' || [[SHRP]] - Child shrapnel ID. Always 0?
|-
|
|-
|
|-
|
|-
|
|-
|
|-
|
|}
===
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x18 || [[AssetID]] || '''modelInfoID''' || [[MODL]]
|-
| 0x1C || RpAtomic* || '''modelFile''' || Always 0?
|-
! 0x20 || colspan="3" | [[#zFragLocation|zFragLocation]] launch
|-
! 0x48 || colspan="3" | [[#zFragLocation|zFragLocation]] vel
|-
! 0x70 || colspan="3" | [[#zFragLocation|zFragLocation]] velPlusMinus
|-
! 0x98 || colspan="3" | [[#zFragLocation|zFragLocation]] rot
|-
! 0xC0 || colspan="3" | [[#zFragLocation|zFragLocation]] rotPlusMinus
|-
| 0xE8 || float || '''bounce''' ||
|-
|
|-
|
|-
| 0xF4 || [[AssetID]] || '''childID''' || [[SHRP]] - Child shrapnel ID. Always 0?
|-
|
|-
| 0xFC || float || '''minScale''' ||
|-
|
|-
|
|-
|
|-
| 0x10C || float || '''Gravity''' ||
|}
===Type 5 (
====BFBB====
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
! 0x18 || colspan="3" | [[#zFragLocation|zFragLocation]] start
|-
! 0x3C || colspan="3" | [[#zFragLocation|zFragLocation]] end
|-
|
|-
|
|}
===
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
! 0x18 || colspan="3" | [[#zFragLocation|zFragLocation]] start
|-
! 0x40 || colspan="3" | [[#zFragLocation|zFragLocation]] end
|-
|
|-
|
|}
===Type 6 (
====BFBB====
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
|
|-
! 0x1C || colspan="3" | [[#zFragLocation|zFragLocation]] source
|-
| 0x40 || float || '''volume''' ||
|-
| 0x44 || float || '''innerRadius''' ||
|-
| 0x48 || float || '''outerRadius''' ||
|}
===
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x18 || [[AssetID]] || '''assetID''' || [[
|-
! 0x1C || colspan="3" | [[#zFragLocation|zFragLocation]] source
|}
===
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x18 || [[AssetID]] || '''modelInfoID''' || [[MODL]]
|-
| 0x1C || float || '''birthRadius''' ||
|-
| 0x20 || float || '''deathRadius''' ||
|-
| 0x24 || float || '''birthVelocity''' ||
|-
| 0x28 || float || '''deathVelocity''' ||
|-
| 0x2C || float || '''birthSpin''' ||
|-
| 0x30 || float || '''deathSpin''' ||
|-
| 0x34 || [[
|-
| 0x44 || [[
|}
===
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x18 || [[AssetID]]? || '''type''' || Unknown
|-
|-
|
|}
===
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x18 || [[AssetID]]? ||
|-
|-
|
|-
|
|-
| 0x4C || float || '''duration''' ||
|-
|
|-
|
|-
|
|}
===
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
! 0x18 || colspan="3" | [[#zFragLocation|zFragLocation]] loc
|-
| 0x40 || int || '''flags''' ||
|-
| 0x44 || float || '''radius''' ||
|-
| 0x48 || float || '''scale''' ||
|-
| 0x4C || float || '''fuel''' ||
|-
| 0x50 || float || '''heat''' ||
|-
| 0x54 || float || '''damage''' ||
|-
| 0x58 || float || '''knockback''' ||
|}
|
Revision as of 22:06, 27 June 2022
SHRP | |
---|---|
Shrapnel | |
Type | Binary |
Games used | Battle for Bikini Bottom The SpongeBob SquarePants Movie |
Source code | zShrapnel.h |
This asset defines data for shrapnel.
Format (Headers)
zShrapnelAsset
The asset data starts with a 0xC byte header:
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | int | fassetCount | Amount of frag entries |
0x04 | AssetID | sharpnelID | This asset |
0x08 | int | Unknown, always 0 |
After that, there's an array of shrapnel entries, as defined in the header. Each entry is of variable size:
- Type 1 (Group)
- Type 2 (Shrapnel)
- Type 3 (Particle)
- BFBB - 0x1D4
- TSSM - 0x1F8
- Type 4 (Projectile)
- BFBB - 0x90
- TSSM - 0x110
- Type 5 (Lightning)
- BFBB - 0x68
- TSSM - 0x70
- Type 6 (Sound)
- BFBB - 0x4C
- TSSM - 0x44
- Type 7 (Shockwave)
- TSSM - 0x48
- Type 8 (Explosion)
- TSSM - 0x48
- Type 9 (Distortion)
- TSSM - 0x5C
- Type 10 (Fire)
- TSSM - 0x5C
zFragAsset
The entries have the following structure:
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | int | type |
|
0x04 | AssetID | id | |
0x08 | AssetID | parentID | |
0x0C | AssetID | parentID2 | |
0x10 | float | lifetime | |
0x14 | float | delay |
zFragLocation
Every entry/frag (except shockwave) has this header at a different position.
Sometimes it only has 0xCD padding bytes.
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | uint | type |
|
[Frag] Bone only | |||
0x04 | int | index | |
0x08 | Vector3 | offset | |
0x0C | uint[4] | Padding - 0xCD bytes, 4-byte alignment | |
[Model] Tag only | |||
0x04 | Vector3 | v | |
0x10 | uint | matidx | |
0x14 | float[4] | wt | Always 0xCD padding bytes? |
0x24 | float | rand_radius | Not present in BFBB |
Format (Frags)
Type 3 - Particle
BFBB
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | zFragLocation source | ||
0x3C | zFragLocation vel | ||
0x60 | uint[91] | Padding - 0xCD bytes, 4-byte alignment | |
0x1CC | AssetID | parEmitterID | |
0x1D0 | uint | parEmitter | Always 0 |
Movie
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | zFragLocation source | ||
0x40 | zFragLocation vel | ||
0x68 | byte[388] | dummy | |
0x1EC | uint | dummy0 | ? |
0x1F0 | AssetID | PARE | |
0x1F4 | uint | dummy1 | ? |
Type 4 (Projectile)
BFBB
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | AssetID | modelInfoID | MODL |
0x1C | uint | modelFile | Always 0 |
0x20 | zFragLocation launch | ||
0x44 | zFragLocation vel | ||
0x68 | float | bounce | |
0x6C | int | maxbounces | |
0x70 | uint | flags | |
0x74 | AssetID | childID | SHRP - Child shrapnel ID. Always 0? |
0x78 | zSharpnelAsset* | child | Always 0? |
0x7C | float | minScale | |
0x80 | float | maxScale | |
0x84 | AssetID | scaleCurveID | Always 0? |
0x88 | xCurveAsset* | scaleCurve | Always 0? |
0x8C | float | gravity |
Movie
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | AssetID | modelInfoID | MODL |
0x1C | RpAtomic* | modelFile | Always 0? |
0x20 | zFragLocation launch | ||
0x48 | zFragLocation vel | ||
0x70 | zFragLocation velPlusMinus | ||
0x98 | zFragLocation rot | ||
0xC0 | zFragLocation rotPlusMinus | ||
0xE8 | float | bounce | |
0xEC | int | maxBounces | |
0xF0 | int | flags | |
0xF4 | AssetID | childID | SHRP - Child shrapnel ID. Always 0? |
0xF8 | zShrapnelAsset* | child | Always 0? |
0xFC | float | minScale | |
0x100 | float | maxScale | |
0x104 | AssetID | scaleCurveID | Always 0? |
0x108 | xCurveAsset* | scaleCurve | Always 0? |
0x10C | float | Gravity |
Type 5 (Lightning)
BFBB
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | zFragLocation start | ||
0x3C | zFragLocation end | ||
0x60 | uint | startParentID | all bytes are 0xCD? |
0x64 | uint | endParentID | all bytes are 0xCD? |
Movie
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | zFragLocation start | ||
0x40 | zFragLocation end | ||
0x68 | uint | startParentID | all bytes are 0xCD? |
0x6C | uint | endParentID | all bytes are 0xCD? |
Type 6 (Sound)
BFBB
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | AssetID | assetID | SND/SNDS |
0x1C | zFragLocation source | ||
0x40 | float | volume | |
0x44 | float | innerRadius | |
0x48 | float | outerRadius |
Movie
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | AssetID | assetID | SGRP |
0x1C | zFragLocation source |
Type 7 (Shockwave)
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | AssetID | modelInfoID | MODL |
0x1C | float | birthRadius | |
0x20 | float | deathRadius | |
0x24 | float | birthVelocity | |
0x28 | float | deathVelocity | |
0x2C | float | birthSpin | |
0x30 | float | deathSpin | |
0x34 | Vector4 | birthColor | |
0x44 | Vector4 | deathColor |
Type 8 (Explosion)
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | AssetID? | type | Unknown |
0x1C | zFragLocation | ||
0x44 | uint | flags |
Type 9 (Distortion)
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | AssetID? | type | |
0x1C | zFragLocation | ||
0x44 | uint | flags | |
0x48 | float | radius | |
0x4C | float | duration | |
0x50 | float | intensity | |
0x54 | float | freq | |
0x58 | float | repeat_delay |
Type 10 (Fire)
Offset | Type | Variable | Description |
---|---|---|---|
0x18 | zFragLocation loc | ||
0x40 | int | flags | |
0x44 | float | radius | |
0x48 | float | scale | |
0x4C | float | fuel | |
0x50 | float | heat | |
0x54 | float | damage | |
0x58 | float | knockback |