Jump to content

Resources/Particle Location

From HEModdingWiki
Particle Location
Resource TypeEffects
File Extension.effdb
Used In Games
Container FormatBINA
Editing Tools
Reverse Engineering StatusDone

Particle Location (also known as effdb and Particle Locator) is the so called Effect Database format that's used to spawn particles and sound effects for any Animation State. It coincides with the Animation State Machine format as it contains an array for every state in that file.

Every state can have any amount of particles and/or sounds (in Sonic Forces only one sound can be used per state) attached to it, every particle can have its own offset in terms of position, rotation and scale.

File Format[edit | edit source]

It's made up of a list of states each containing a list of particles and sounds.

Each state containing:

- State name, the name of the state it should add onto

- Particles, list of the particles that should be added

- Sounds, list of the sounds that should be used, a simple list of sound names, (in Sonic Forces this is not an array but just a singular sound name)

Now, each particle contains:

- Attached to bone, decides whetever it should be attached to a bone

- Use Position, decides if it should use the position value

- Use Rotation, decides if it should use the rotation value

- Use Scale, decides if it should use the scale value

- Particle Name, the name of the particle (.cemt) it should use

- Bone name, the name of the bone it should attach to, won't be used if the Attached to bone is set to false

- Position, a position offset it should attach with, won't be used if the Use Position is set to false

- Rotation, a rotation offset it should attach with, won't be used if the Use Rotation is set to false

- Scale, a scale offset it should attach with, won't be used if the Use Scale is set to false

Technical info[edit | edit source]

struct Particle {
    enum class Flag : unsigned char {
        IGNORE_RELATIVE_POSITION,
        USE_POSITION,
        USE_ROTATION,
        USE_SCALE,
    };

    bool attachedToBone;
    Bitset<Flag> flags;
    const char* particleName;
    const char* boneName;
    Vector3 position;
    Quaternion rotation;
    Vector3 scale;
};
struct State {
    const char* stateName;
    int particleCount;
    Particle particles*;
    int soundNameCount;
    const char** soundNames; // in Forces const char*
};
struct EffdbData{
    unsigned int magic;
    unsigned int version;
    int stateCount;
    State* states;
};