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