Resources/Particle Location: Difference between revisions
Created page with "{{Infobox Resource|type=Effects|extension=.effdb|games=* Sonic Forces * Sonic Origins * Sonic Frontiers * Shadow Generations|tools=* AshDumpTool|status=Done|container=BINA|name=Particle Location}}'''Particle Location''' ''(also known as effdb and Particle Locator)'' is the so called Effect Database format that coincides with t..." |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Infobox Resource|type=[[Resources#Effects|Effects]]|extension=.effdb|games=* [[ | {{Infobox Resource|type=[[Resources#Effects|Effects]]|extension=.effdb|games=* [[Sonic Forces|Sonic Forces]] | ||
* [[ | * [[Sonic Origins|Sonic Origins]] | ||
* [[ | * [[Sonic Frontiers|Sonic Frontiers]] | ||
* [[ | * [[Shadow Generations|Shadow Generations]]|tools=* [[Tools/AshDumpTool|AshDumpTool]]|status=Done|container=BINA|name=Particle Location}}'''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 '''[[Resources/Animation State Machine|Animation State Machine]]''' format as it contains an array for every state in that file. | ||
Every state can have any amount of [[Resources/Cyan Effect|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. | Every state can have any amount of [[Resources/Cyan Effect|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 == | == File Format == | ||
Line 15: | Line 15: | ||
- '''Particles''', list of the particles that should be added | - '''Particles''', list of the particles that should be added | ||
- '''Sounds''', list of the sounds that should be used, a simple list of sound names | - '''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: | Now, each particle contains: | ||
Line 36: | Line 36: | ||
- '''Scale''', a scale offset it should attach with, won't be used if the Use Scale 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 == | |||
<syntaxhighlight lang="c++"> | |||
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; | |||
}; | |||
</syntaxhighlight><syntaxhighlight lang="c++"> | |||
struct State { | |||
const char* stateName; | |||
int particleCount; | |||
Particle particles*; | |||
int soundNameCount; | |||
const char** soundNames; // in Forces const char* | |||
}; | |||
</syntaxhighlight><syntaxhighlight lang="c++"> | |||
struct EffdbData{ | |||
unsigned int magic; | |||
unsigned int version; | |||
int stateCount; | |||
State* states; | |||
}; | |||
</syntaxhighlight> |
Latest revision as of 10:05, 27 January 2025
Resource Type | Effects |
---|---|
File Extension | .effdb |
Used In Games | |
Container Format | BINA |
Editing Tools | |
Reverse Engineering Status | Done |
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;
};