@cccode/fxr
Version:
JavaScript library for creating and editing FXR files for Dark Souls 3, Sekiro, Elden Ring, Armored Core 6, and Elden Ring Nightreign.
1,366 lines (1,346 loc) • 1.17 MB
text/typescript
/**
* Values representing different games supported by the library.
*/
enum Game {
/**
* Using this with the {@link FXR.read} function will cause it to try to find
* out what game the FXR is for automatically.
*
* Using it with the {@link FXR.toArrayBuffer} and {@link FXR.saveAs} methods
* will cause them to use the {@link FXR.gameHint game hint}, unless the hint
* is {@link Game.Heuristic}, in which case they will throw an error.
*/
Heuristic = -2,
/**
* Does not represent any specific game.
*
* Using this with the {@link FXR.read} function will cause it to parse
* everything as generic classes. This means that none of the methods in the
* library that manipulate things that depend on the game version will work,
* like the {@link Node.scale} and {@link Node.recolor} methods. It also
* means that the library will not be able to convert it to work with other
* games.
*
* This is intended to be used only for research or for parsing modded files
* that may not be structured correctly.
*
* Note that this does not work with the {@link FXR.toArrayBuffer} and
* {@link FXR.saveAs} methods unless the FXR only contains generic classes.
* If it contains any node classes other than {@link GenericNode}, any
* config classes other than {@link NodeConfig}, or any {@link DataAction}s, it
* must be given a specific game to write to.
*/
Generic = -1,
/**
* Dark Souls III
*/
DarkSouls3 = 0,
/**
* Sekiro: Shadows Die Twice
*/
Sekiro = 1,
/**
* Elden Ring
*/
EldenRing = 2,
/**
* Armored Core VI Fires of Rubicon
*/
ArmoredCore6 = 3,
/**
* Elden Ring Nightreign
*/
Nightreign = 4,
}
/**
* FXR file format version numbers supported by the library.
*/
enum FXRVersion {
/**
* Used in Dark Souls 3.
*/
DarkSouls3 = 4,
/**
* Used in Sekiro, Elden Ring, and Armored Core 6.
*/
Sekiro = 5,
}
/*#Enums start*/
/**
* Values used to represent different types of FXR actions.
*/
export enum ActionType {
/**
* This action does nothing. It fits into most action slots and acts as a way to disable the effects of the other actions that go in those slots.
*/
None = 0,
/**
* Unknown action that *may* exist in Dark Souls 3. It is not used in vanilla, but its name and ID have been found in the game's executable.
*/
Unk10002_Fluid = 10002,
/**
* Unknown action that *may* exist in Dark Souls 3. It is not used in vanilla, but its name and ID have been found in the game's executable.
*/
Unk10010_Tracer = 10010,
/**
* ### Action 1 - NodeAcceleration
* - **Slot**: {@link ActionSlots.NodeMovementAction NodeMovement}
* - **Class**: {@link NodeAcceleration}
*
* Controls the movement of the node. This is the most basic action for controlling the acceleration of nodes.
*/
NodeAcceleration = 1,
/**
* ### Action 15 - NodeTranslation
* - **Slot**: {@link ActionSlots.NodeMovementAction NodeMovement}
* - **Class**: {@link NodeTranslation}
*
* Translates the node using a property, meaning it can be animated. This can be useful if you need the node to follow a specific path.
*/
NodeTranslation = 15,
/**
* ### Action 34 - NodeSpin
* - **Slot**: {@link ActionSlots.NodeMovementAction NodeMovement}
* - **Class**: {@link NodeSpin}
*
* Controls the angular speed of the node.
*/
NodeSpin = 34,
/**
* ### Action 35 - StaticNodeTransform
* - **Slot**: {@link ActionSlots.NodeTransformAction NodeTransform}
* - **Class**: {@link StaticNodeTransform}
*
* Controls the translation and rotation of a node.
*/
StaticNodeTransform = 35,
/**
* ### Action 36 - RandomNodeTransform
* - **Slot**: {@link ActionSlots.NodeTransformAction NodeTransform}
* - **Class**: {@link RandomNodeTransform}
*
* Controls the translation and rotation of a node, and can also randomize them.
*/
RandomNodeTransform = 36,
/**
* ### Action 46 - NodeAttachToCamera
* - **Slot**: {@link ActionSlots.NodeMovementAction NodeMovement}
* - **Class**: {@link NodeAttachToCamera}
*
* Attaches the node to the camera.
*/
NodeAttachToCamera = 46,
/**
* ### Action 55 - ParticleAcceleration
* - **Slot**: {@link ActionSlots.ParticleMovementAction ParticleMovement}
* - **Class**: {@link ParticleAcceleration}
*
* Controls the movement of particles. This is the most basic action for controlling the acceleration of particles.
*/
ParticleAcceleration = 55,
/**
* ### Action 60 - ParticleSpeed
* - **Slot**: {@link ActionSlots.ParticleMovementAction ParticleMovement}
* - **Class**: {@link ParticleSpeed}
*
* Controls the movement of particles. This is the most basic action for controlling the speed of particles.
*/
ParticleSpeed = 60,
/**
* ### Action 64 - ParticleSpeedRandomTurns
* - **Slot**: {@link ActionSlots.ParticleMovementAction ParticleMovement}
* - **Class**: {@link ParticleSpeedRandomTurns}
*
* Controls the movement of particles. This extends {@link ActionType.ParticleSpeed ParticleSpeed} with the ability to make particles make random turns at a fixed interval.
*/
ParticleSpeedRandomTurns = 64,
/**
* ### Action 65 - ParticleSpeedPartialFollow
* - **Slot**: {@link ActionSlots.ParticleMovementAction ParticleMovement}
* - **Class**: {@link ParticleSpeedPartialFollow}
*
* Controls the movement of particles. This extends {@link ActionType.ParticleSpeedRandomTurns ParticleSpeedRandomTurns} with the ability to make particles partially follow the parent node.
*/
ParticleSpeedPartialFollow = 65,
/**
* ### Action 75 - NodeSound
* - **Slot**: {@link ActionSlots.NodeAudioAction NodeAudio}
* - **Class**: {@link NodeSound}
*
* Plays a sound effect when the node activates.
*/
NodeSound = 75,
/**
* ### Action 81 - EmissionSound
* - **Slot**: {@link ActionSlots.EmissionAudioAction EmissionAudio}
* - **Class**: {@link EmissionSound}
*
* Plays a sound effect every time the node emits particles. It only plays the sound once per emission, not once per particle.
*/
EmissionSound = 81,
/**
* ### Action 83 - NodeAccelerationRandomTurns
* - **Slot**: {@link ActionSlots.NodeMovementAction NodeMovement}
* - **Class**: {@link NodeAccelerationRandomTurns}
*
* Controls the movement of the node. This extends {@link ActionType.NodeAcceleration NodeAcceleration} with the ability to make the node turn a random amount at a given interval.
*/
NodeAccelerationRandomTurns = 83,
/**
* ### Action 84 - ParticleAccelerationRandomTurns
* - **Slot**: {@link ActionSlots.ParticleMovementAction ParticleMovement}
* - **Class**: {@link ParticleAccelerationRandomTurns}
*
* Controls the movement of particles. This extends {@link ActionType.ParticleAcceleration ParticleAcceleration} with the ability to make particles make random turns at a fixed interval.
*/
ParticleAccelerationRandomTurns = 84,
/**
* ### Action 105 - ParticleAccelerationPartialFollow
* - **Slot**: {@link ActionSlots.ParticleMovementAction ParticleMovement}
* - **Class**: {@link ParticleAccelerationPartialFollow}
*
* Controls the movement of particles. This extends {@link ActionType.ParticleAccelerationRandomTurns ParticleAccelerationRandomTurns} with the ability to make particles partially follow the parent node.
*/
ParticleAccelerationPartialFollow = 105,
/**
* ### Action 106 - NodeAccelerationPartialFollow
* - **Slot**: {@link ActionSlots.NodeMovementAction NodeMovement}
* - **Class**: {@link NodeAccelerationPartialFollow}
*
* Controls the movement of the node. This extends {@link ActionType.NodeAccelerationRandomTurns NodeAccelerationRandomTurns} with the ability to make the node partially follow or exaggerate the parent node's movement.
*/
NodeAccelerationPartialFollow = 106,
/**
* ### Action 113 - NodeAccelerationSpin
* - **Slot**: {@link ActionSlots.NodeMovementAction NodeMovement}
* - **Class**: {@link NodeAccelerationSpin}
*
* Controls the movement of the node. This extends {@link ActionType.NodeAcceleration NodeAcceleration} with the ability to control the node's angular speed.
*/
NodeAccelerationSpin = 113,
/**
* ### Action 120 - NodeSpeed
* - **Slot**: {@link ActionSlots.NodeMovementAction NodeMovement}
* - **Class**: {@link NodeSpeed}
*
* Controls the movement of the node. This is the most basic action for controlling the speed of nodes.
*/
NodeSpeed = 120,
/**
* ### Action 121 - NodeSpeedRandomTurns
* - **Slot**: {@link ActionSlots.NodeMovementAction NodeMovement}
* - **Class**: {@link NodeSpeedRandomTurns}
*
* Controls the movement of the node. This extends {@link ActionType.NodeSpeed NodeSpeed} with the ability to make the node turn a random amount at a given interval.
*/
NodeSpeedRandomTurns = 121,
/**
* ### Action 122 - NodeSpeedPartialFollow
* - **Slot**: {@link ActionSlots.NodeMovementAction NodeMovement}
* - **Class**: {@link NodeSpeedPartialFollow}
*
* Controls the movement of the node. This extends {@link ActionType.NodeSpeedRandomTurns NodeSpeedRandomTurns} with the ability to make the node partially follow or exaggerate the parent node's movement.
*/
NodeSpeedPartialFollow = 122,
/**
* ### Action 123 - NodeSpeedSpin
* - **Slot**: {@link ActionSlots.NodeMovementAction NodeMovement}
* - **Class**: {@link NodeSpeedSpin}
*
* Controls the movement of the node. This extends {@link ActionType.NodeSpeed NodeSpeed} with the ability to control the node's angular speed.
*/
NodeSpeedSpin = 123,
/**
* ### Action 128 - NodeAttributes
* - **Slot**: {@link ActionSlots.NodeAttributesAction NodeAttributes}
* - **Class**: {@link NodeAttributes}
*
* Controls various things about the node, like its duration, and how it is attached to the parent node.
*/
NodeAttributes = 128,
/**
* ### Action 129 - ParticleAttributes
* - **Slot**: {@link ActionSlots.ParticleAttributesAction ParticleAttributes}
* - **Class**: {@link ParticleAttributes}
*
* Controls the duration of particles emitted by the node, and how the particles are attached to the node.
*/
ParticleAttributes = 129,
/**
* ### Action 130 - Unk130
* - **Slot**: {@link ActionSlots.Unknown130Action Unknown130}
* - **Class**: {@link Unk130}
*
* Unknown action that is in every basic config in every game, and still literally nothing is known about it.
*/
Unk130 = 130,
/**
* ### Action 131 - ParticleModifier
* - **Slot**: {@link ActionSlots.ParticleModifierAction ParticleModifier}
* - **Class**: {@link ParticleModifier}
*
* Modifies particles in various ways.
*
* Note: This is **not** a {@link Modifier property modifier}, it is an action that modifies particles emitted from the same node.
*/
ParticleModifier = 131,
/**
* ### Action 132 - SFXReference
* - **Slot**: {@link ActionSlots.SFXReferenceAction SFXReference}
* - **Class**: {@link SFXReference}
*
* References another SFX by its ID.
*/
SFXReference = 132,
/**
* ### Action 133 - LevelsOfDetailThresholds
* - **Slot**: {@link ActionSlots.LevelsOfDetailThresholdsAction LevelsOfDetailThresholds}
* - **Class**: {@link LevelsOfDetailThresholds}
*
* Used in the {@link ConfigType.LevelsOfDetail levels of detail config} to manage the duration and thresholds for the {@link NodeType.LevelsOfDetail levels of detail node}.
*/
LevelsOfDetailThresholds = 133,
/**
* ### Action 199 - StateConfigMap
* - **Slot**: {@link ActionSlots.StateConfigMapAction StateConfigMap}
* - **Class**: {@link StateConfigMap}
*
* Maps states to configs in the parent node.
*/
StateConfigMap = 199,
/**
* ### Action 200 - SelectAllNodes
* - **Slot**: {@link ActionSlots.NodeSelectorAction NodeSelector}
* - **Class**: {@link SelectAllNodes}
*
* Used in {@link ConfigType.NodeEmitter NodeEmitter configs} to emit all child nodes every emission.
*/
SelectAllNodes = 200,
/**
* ### Action 201 - SelectRandomNode
* - **Slot**: {@link ActionSlots.NodeSelectorAction NodeSelector}
* - **Class**: {@link SelectRandomNode}
*
* Used in {@link ConfigType.NodeEmitter NodeEmitter configs} to emit a random child node every emission.
*/
SelectRandomNode = 201,
/**
* ### Action 300 - PeriodicEmitter
* - **Slot**: {@link ActionSlots.EmitterAction Emitter}
* - **Class**: {@link PeriodicEmitter}
*
* Emits particles periodically.
*/
PeriodicEmitter = 300,
/**
* ### Action 301 - EqualDistanceEmitter
* - **Slot**: {@link ActionSlots.EmitterAction Emitter}
* - **Class**: {@link EqualDistanceEmitter}
*
* Emits particles once it has moved a certain distance from where it last emitted particles.
*/
EqualDistanceEmitter = 301,
/**
* ### Action 399 - OneTimeEmitter
* - **Slot**: {@link ActionSlots.EmitterAction Emitter}
* - **Class**: {@link OneTimeEmitter}
*
* Emits one particle once.
*/
OneTimeEmitter = 399,
/**
* ### Action 400 - PointEmitterShape
* - **Slot**: {@link ActionSlots.EmitterShapeAction EmitterShape}
* - **Class**: {@link PointEmitterShape}
*
* Makes the emitter a single point.
*/
PointEmitterShape = 400,
/**
* ### Action 401 - DiskEmitterShape
* - **Slot**: {@link ActionSlots.EmitterShapeAction EmitterShape}
* - **Class**: {@link DiskEmitterShape}
*
* Makes the emitter disk-shaped.
*/
DiskEmitterShape = 401,
/**
* ### Action 402 - RectangleEmitterShape
* - **Slot**: {@link ActionSlots.EmitterShapeAction EmitterShape}
* - **Class**: {@link RectangleEmitterShape}
*
* Makes the emitter rectangular.
*/
RectangleEmitterShape = 402,
/**
* ### Action 403 - SphereEmitterShape
* - **Slot**: {@link ActionSlots.EmitterShapeAction EmitterShape}
* - **Class**: {@link SphereEmitterShape}
*
* Makes the emitter spherical.
*/
SphereEmitterShape = 403,
/**
* ### Action 404 - BoxEmitterShape
* - **Slot**: {@link ActionSlots.EmitterShapeAction EmitterShape}
* - **Class**: {@link BoxEmitterShape}
*
* Makes the emitter cuboidal.
*/
BoxEmitterShape = 404,
/**
* ### Action 405 - CylinderEmitterShape
* - **Slot**: {@link ActionSlots.EmitterShapeAction EmitterShape}
* - **Class**: {@link CylinderEmitterShape}
*
* Makes the emitter cylindrical.
*/
CylinderEmitterShape = 405,
/**
* ### Action 500 - NoSpread
* - **Slot**: {@link ActionSlots.DirectionSpreadAction DirectionSpread}
* - **Class**: {@link NoSpread}
*
* Makes all emitted instances have the default initial direction from the emitter. See {@link InitialDirection} for more information.
*/
NoSpread = 500,
/**
* ### Action 501 - CircularSpread
* - **Slot**: {@link ActionSlots.DirectionSpreadAction DirectionSpread}
* - **Class**: {@link CircularSpread}
*
* Gives each emitted instance a random initial direction offset within a circular cone. See {@link InitialDirection} for more information.
*/
CircularSpread = 501,
/**
* ### Action 502 - EllipticalSpread
* - **Slot**: {@link ActionSlots.DirectionSpreadAction DirectionSpread}
* - **Class**: {@link EllipticalSpread}
*
* Gives each emitted instance a random initial direction offset within an elliptical cone. See {@link InitialDirection} for more information.
*/
EllipticalSpread = 502,
/**
* ### Action 503 - RectangularSpread
* - **Slot**: {@link ActionSlots.DirectionSpreadAction DirectionSpread}
* - **Class**: {@link RectangularSpread}
*
* Gives each emitted instance a random initial direction offset within a rectangular cone. See {@link InitialDirection} for more information.
*/
RectangularSpread = 503,
/**
* ### Action 600 - PointSprite
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link PointSprite}
*
* Defines a very basic point sprite particle. Similar to {@link BillboardEx}, but far simpler.
*
* The name is from Elden Ring's RTTI, where it is named "GXFXCGAppearancePointSprite".
*/
PointSprite = 600,
/**
* ### Action 601 - Line
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link Line}
*
* Defines a simple line particle. It automatically rotates to match the direction it's moving.
*
* The name is from Elden Ring's RTTI, where it is named "GXFXCGAppearanceLine".
*/
Line = 601,
/**
* ### Action 602 - QuadLine
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link QuadLine}
*
* Defines a simple rectangular particle, very similar to {@link Line} particles, but include properties that control the width as well as the length. It automatically rotates to match the direction it's moving.
*
* The name is from Elden Ring's RTTI, where it is named "GXFXCGAppearanceQuadLine".
*/
QuadLine = 602,
/**
* ### Action 603 - BillboardEx
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link BillboardEx}
*
* Defines a simple, flat, textured particle. Similar to {@link PointSprite}, but with far more options. This is the most common type of particle in the supported games.
*
* The name is from Elden Ring's RTTI, where it is named "GXFfxAppearanceBillboardEx". The "Ex" suffix refers to it being an extended version of a base class named "Billboard", but this seems to just be an inconsistency in naming some of the appearance classes. Most other appearance classes extend some base class, but the base class either has a "Base" suffix, or the extended and base share the same name.
*/
BillboardEx = 603,
/**
* ### Action 604 - MultiTextureBillboardEx
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link MultiTextureBillboardEx}
*
* Defines a particle appearance with multiple textured layers. This is overall pretty similar to {@link BillboardEx}, but the ability to layer multiple textures in different ways allows you to apply masks, overlay random noise to increase variance, and so on.
*
* The name is from Elden Ring's RTTI, where it is named "GXFfxAppearanceMultiTextureBillboardEx". The "Ex" suffix refers to it being an extended version of a base class named "MultiTextureBillboard", but this seems to just be an inconsistency in naming some of the appearance classes. Most other appearance classes extend some base class, but the base class either has a "Base" suffix, or the extended and base share the same name.
*/
MultiTextureBillboardEx = 604,
/**
* ### Action 605 - Model
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link Model}
*
* Defines a particle with a 3D model.
*
* Some models don't work properly with this action for some reason. For example, the Carian greatsword model in Elden Ring (88300), gets horribly stretched and distorted when used with this action. If you find a model like this that you want to use, try using the {@link RichModel} action instead.
*
* The name is from Elden Ring's RTTI, where it is named "GXFfxAppearanceModel".
*/
Model = 605,
/**
* ### Action 606 - LegacyTracer
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link LegacyTracer}
*
* Defines a tracer particle, which leaves a textured trail where it moves.
*
* This is an older version of {@link Tracer} with fewer features.
*
* The name is from Elden Ring's RTTI, where it is named "GXFXCGAppearanceTracer".
*/
LegacyTracer = 606,
/**
* ### Action 607 - Distortion
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link Distortion}
*
* Defines a particle that distorts anything seen through it.
*
* Note: This particle is not visible if the "Effects" setting is set to "Low".
*
* The name is from Elden Ring's RTTI, where it is named "GXFfxAppearanceDistortion".
*/
Distortion = 607,
/**
* ### Action 608 - RadialBlur
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link RadialBlur}
*
* Defines a particle that applies a radial blur to anything seen through it.
*
* Note: This particle is not visible if the "Effects" setting is set to "Low".
*
* The name is from Elden Ring's RTTI, where it is named "GXFXCGAppearanceRadialBlur".
*/
RadialBlur = 608,
/**
* ### Action 609 - PointLight
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link PointLight}
*
* Defines a point light source.
*/
PointLight = 609,
/**
* ### Action 700 - SimulateTermination
* - **Slot**: {@link ActionSlots.TerminationAction Termination}
* - **Class**: {@link SimulateTermination}
*
* Allows the effect to play out once it terminates. Particle emitters will stop emitting new particles, but particles with a finite duration that have already been emitted will stay around for as long as their duration allows them to.
*
* Note: An effect terminates when it reaches {@link State} -1.
*/
SimulateTermination = 700,
/**
* ### Action 701 - FadeTermination
* - **Slot**: {@link ActionSlots.TerminationAction Termination}
* - **Class**: {@link FadeTermination}
*
* Allows the effect to continue playing normally after it terminates, but its opacity will gradually fade out over a given duration.
*
* Note: An effect terminates when it reaches {@link State} -1.
*/
FadeTermination = 701,
/**
* ### Action 702 - InstantTermination
* - **Slot**: {@link ActionSlots.TerminationAction Termination}
* - **Class**: {@link InstantTermination}
*
* Makes the effect instantly disappear when it terminates.
*
* Note: An effect terminates when it reaches {@link State} -1.
*/
InstantTermination = 702,
/**
* ### Action 731 - NodeForceSpeed
* - **Slot**: {@link ActionSlots.NodeForceMovementAction NodeForceMovement}
* - **Class**: {@link NodeForceSpeed}
*
* Controls how the node is affected by forces. For more information about forces that can affect nodes and particles, see:
* - {@link ActionType.CancelForce CancelForce}
* - {@link ActionType.WindForce WindForce}
* - {@link ActionType.GravityForce GravityForce}
* - {@link ActionType.ForceCollision ForceCollision}
* - {@link ActionType.TurbulenceForce TurbulenceForce}
*/
NodeForceSpeed = 731,
/**
* ### Action 732 - ParticleForceSpeed
* - **Slot**: {@link ActionSlots.ParticleForceMovementAction ParticleForceMovement}
* - **Class**: {@link ParticleForceSpeed}
*
* Controls how the particles emitted by the node is affected by forces. For more information about forces that can affect nodes and particles, see:
* - {@link ActionType.CancelForce CancelForce}
* - {@link ActionType.WindForce WindForce}
* - {@link ActionType.GravityForce GravityForce}
* - {@link ActionType.ForceCollision ForceCollision}
* - {@link ActionType.TurbulenceForce TurbulenceForce}
*/
ParticleForceSpeed = 732,
/**
* ### Action 733 - NodeForceAcceleration
* - **Slot**: {@link ActionSlots.NodeForceMovementAction NodeForceMovement}
* - **Class**: {@link NodeForceAcceleration}
*
* Controls how the node is affected by forces. For more information about forces that can affect nodes and particles, see:
* - {@link ActionType.CancelForce CancelForce}
* - {@link ActionType.WindForce WindForce}
* - {@link ActionType.GravityForce GravityForce}
* - {@link ActionType.ForceCollision ForceCollision}
* - {@link ActionType.TurbulenceForce TurbulenceForce}
*/
NodeForceAcceleration = 733,
/**
* ### Action 734 - ParticleForceAcceleration
* - **Slot**: {@link ActionSlots.ParticleForceMovementAction ParticleForceMovement}
* - **Class**: {@link ParticleForceAcceleration}
*
* Controls how the particles emitted by the node is affected by forces. For more information about forces that can affect nodes and particles, see:
* - {@link ActionType.CancelForce CancelForce}
* - {@link ActionType.WindForce WindForce}
* - {@link ActionType.GravityForce GravityForce}
* - {@link ActionType.ForceCollision ForceCollision}
* - {@link ActionType.TurbulenceForce TurbulenceForce}
*/
ParticleForceAcceleration = 734,
/**
* ### Action 800 - ParticleForceCollision
* - **Slot**: {@link ActionSlots.ParticleForceMovementAction ParticleForceMovement}
* - **Class**: {@link ParticleForceCollision}
*
* Enables particles emitted by the node to collide with surfaces, and controls how those collisions affect the movement of the particles.
*
* Note that this works very differently from the collision-related fields in the GPU particle appearance actions. The collision detection for those are entriely based on the distances between the camera and everything in its view, so if a particle is farther away from the camera than an object, the particle will be able to collide with it. The collision detection used in this action is based on the real 3D geometry of the scene, so particles can collide with anything, even while they are out of view.
*
* Also note that this action seems to cause the game to crash very easily. If a particle affected by this action despawns due to its limited duration, the game will crash no matter what.
*/
ParticleForceCollision = 800,
/**
* ### Action 10000 - GPUStandardParticle
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link GPUStandardParticle}
*
* Defines a GPU particle system. This emits GPU particles, which means thousands of particles can be rendered without much impact on performance.
*
* Note that while this emits particles, it is itself not a particle, and the particles emitted by this action are not affected by everything that affects regular particles.
*
* The name of this action is from Elden Ring's RTTI, where it's called "GXVfxStandardParticleAppearance".
*/
GPUStandardParticle = 10000,
/**
* ### Action 10001 - GPUStandardCorrectParticle
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link GPUStandardCorrectParticle}
*
* Defines a GPU particle system. Very similar to {@link GPUStandardParticle}, with no known differences.
*
* The name of this action is from Elden Ring's RTTI, where it's called "GXVfxStandardCorrectParticleAppearance". An action with the same ID had the name "WanderingVision" in Dark Souls 3, and that action could still exist in DS3, but it is not found in the vanilla game, so testing it is difficult.
*
* Note: This action does not exist in Dark Souls 3 or Sekiro, but it still has unknown fields and properties named after those games. This is because it makes the conversion between this action and {@link GPUStandardParticle} much simpler. When written for those two games, this action will be converted to the other action automatically.
*/
GPUStandardCorrectParticle = 10001,
/**
* ### Action 10003 - LightShaft
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link LightShaft}
*
* Defines a simple light shafts effect.
*
* This is only used in Dark Souls 3. It shows up if converted for Sekiro, but it doesn't seem to work correctly in that game. It does not seem to work at all in Elden Ring or later games.
*/
LightShaft = 10003,
/**
* ### Action 10008 - GPUSparkParticle
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link GPUSparkParticle}
*
* Defines a GPU particle system. Similar to {@link GPUStandardParticle}, but rather than billboard particles like the other action uses, this uses "spark" particles, similar to the line particles from the {@link QuadLine} action, though the sparks may bend, more like the trail from a {@link Tracer} particle. The particles emitted by this action are GPU particles, which means that a lot of them can be rendered at the same time without much impact on performance. The particles are also not affected by most things that affect regular particles, like {@link ActionSlots.ParticleMovementAction ParticleMovement actions}.
*
* The name is from Elden Ring's RTTI, where it is named "GXVfxSparkParticleAppearance".
*
* This action was first used in Armored Core 6, but definitely also works in Sekiro and Elden Ring. It might work in Dark Souls 3, but its structure is at least somewhat different there, and what that structure looks like is unknown. AC6's structure is compatible with Sekiro and ER, but some features may not work due to having been added in later versions.
*/
GPUSparkParticle = 10008,
/**
* ### Action 10009 - GPUSparkCorrectParticle
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link GPUSparkCorrectParticle}
*
* Defines a GPU particle system. Very similar to {@link GPUSparkParticle}, just like how {@link GPUStandardCorrectParticle} is similar to {@link GPUStandardParticle}, except these two spark actions have some known differences.
*
* Not all of the differences have been documented yet, but this is some of them:
* - This action seems to have swapped some axes of rotation, causing some confusing things to happen when the node is spinning.
* - The particles from this action are smaller.
* - The particles from this action move slower. It's possible that this action uses a different unit of distance, since that would explain both the slower movement and the smaller particles.
*
* The name is from Elden Ring's RTTI, where it is named "GXVfxSparkCorrectParticleAppearance".
*/
GPUSparkCorrectParticle = 10009,
/**
* ### Action 10012 - Tracer
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link Tracer}
*
* Defines a tracer particle, which leaves a textured trail where it moves.
*
* This is a newer version of {@link LegacyTracer} with more features, like being able to make the opacity of the trail be based on the movement speed of the particle.
*
* The name is from Elden Ring's RTTI, where it is named "GXFfxAppearanceTracer".
*/
Tracer = 10012,
/**
* ### Action 10013 - WaterInteraction
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link WaterInteraction}
*
* Defines a simulated interaction with water, allowing effects to create ripples in nearby water. The interaction basically pushes water in a shape controlled by a texture down to a given depth and holds it there for a duration before releasing it.
*
* The name is from Elden Ring's RTTI, where it is named "GXFfxWaterInteractionSimulationAppearance".
*/
WaterInteraction = 10013,
/**
* ### Action 10014 - LensFlare
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link LensFlare}
*
* Defines a lens flare effect with up to four textured layers with different colors and sizes.
*
* The name is from Elden Ring's RTTI, where it is named "GXFfxLensFlareAppearance".
*/
LensFlare = 10014,
/**
* ### Action 10015 - RichModel
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link RichModel}
*
* Defines a particle with a 3D model. Similar to {@link Model}, but with some different options.
*
* Some models only work properly with this action and not with the Model action for some unknown reason. A good example of this is the Carian greatsword model in Elden Ring (88300), which gets horribly stretched and distorted when used with the other action, but it works fine with this one.
*
* The name is from Elden Ring's RTTI, where it is named "GXFfxAppearanceRichModel".
*/
RichModel = 10015,
/**
* ### Action 10100 - Unk10100
* - **Slot**: {@link ActionSlots.Unknown10100Action Unknown10100}
* - **Class**: {@link Unk10100}
*
* Unknown root node action.
*/
Unk10100 = 10100,
/**
* ### Action 10200 - CancelForce
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link CancelForce}
*
* Defines a volume that cancels all other SFX forces. This includes wind from weather, and forces from the following actions:
* - {@link WindForce}
* - {@link GravityForce}
* - {@link TurbulenceForce}
*
* The name is from Elden Ring's RTTI, where it is named "GXForceFieldCancelAreaAppearance".
*/
CancelForce = 10200,
/**
* ### Action 10300 - WindForce
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link WindForce}
*
* Defines a directional force in a volume, which is most often used for creating wind effects. The direction of the force is based on the direction of the node.
*
* The name is from Elden Ring's RTTI, where it is named "GXForceFieldWindAreaAppearance".
*/
WindForce = 10300,
/**
* ### Action 10301 - GravityForce
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link GravityForce}
*
* Defines a radial force in a volume. This pulls things towards itself, or pushes away if the force is negative.
*
* The name is from Elden Ring's RTTI, where it is named "GXForceFieldGravityAreaAppearance".
*/
GravityForce = 10301,
/**
* ### Action 10302 - ForceCollision
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link ForceCollision}
*
* Defines a volume used to detect whether or not the node is inside a force volume.
*
* The name is from Elden Ring's RTTI, where it is named "GXCollisionFieldAreaAppearance".
*/
ForceCollision = 10302,
/**
* ### Action 10303 - TurbulenceForce
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link TurbulenceForce}
*
* Defines a chaotic force in a volume.
*
* The name is from Elden Ring's RTTI, where it is named "GXForceFieldTurbulenceAreaAppearance".
*/
TurbulenceForce = 10303,
/**
* ### Action 10400 - Unk10400
* - **Slot**: {@link ActionSlots.Unknown10400Action Unknown10400}
* - **Class**: {@link Unk10400}
*
* Unknown root node action.
*/
Unk10400 = 10400,
/**
* ### Action 10500 - Unk10500
* - **Slot**: {@link ActionSlots.Unknown10500Action Unknown10500}
* - **Class**: {@link Unk10500}
*
* Unknown root node action.
*/
Unk10500 = 10500,
/**
* ### Action 11000 - SpotLight
* - **Slot**: {@link ActionSlots.AppearanceAction Appearance}
* - **Class**: {@link SpotLight}
*
* Defines a light source with an elliptic cone shape, a spot light.
*/
SpotLight = 11000,
}
/**
* Values used to represent different modes of attachment.
*/
export enum AttachMode {
/**
* Completely detached.
*/
None = 0,
/**
* Translates and rotates with the parent node.
*/
Parent = 1,
/**
* Translates and rotates with the attachment point (dummypoly). Parent transformations are ignored.
*/
DummyPoly = 2,
/**
* Only translates with the parent node. Rotations are entirely ignored.
*/
ParentTranslation = 3,
/**
* Only translates with the attachment point (dummypoly). Rotations are entirely ignored.
*/
DummyPolyTranslation = 4,
}
/**
* Values used to represent different types of blend modes.
*/
export enum BlendMode {
/**
* Seemingly identical to {@link Add}?
*/
Unk0 = 0,
/**
* Completely ignores blending. The source layer (particle) will be drawn in place of the background, ignoring the alpha of the layer.
*/
Source = 1,
/**
* The source layer (particle) will be drawn on over the background. Transparent or partially transparent parts of the layer will allow the background to be seen through the layer.
*
* Also known as "source-over", and is the same as the "normal" blend mode found in many image editors.
*/
Normal = 2,
/**
* The source layer (particle) will be multiplied with the background, ignoring the alpha of the layer.
*
* Same as the "multiply" blend mode found in many image editors.
*/
Multiply = 3,
/**
* The source layer (particle) multiplied by its alpha (clamped to [0, 1]) will be added to the background.
*
* Same as the "add", "additive", or "linear dodge" blend modes found in many image editors. The opposite of {@link Subtract}.
*/
Add = 4,
/**
* The source layer (particle) multiplied by its alpha (clamped to [0, 1]) will be subtracted from the background.
*
* Same as the "subtract" or "difference" blend modes found in many image editors. The opposite of {@link Add}.
*/
Subtract = 5,
/**
* Seemingly identical to {@link Normal}?
*/
Unk6 = 6,
/**
* Seemingly identical to {@link Add}?
*/
Unk7 = 7,
}
/**
* Values used to represent different types of node configurations, also known as "effects". There is one for each {@link NodeType type of node} that supports multiple configs.
*/
export enum ConfigType {
/**
* Manages the duration and thresholds for the {@link NodeType.LevelsOfDetail levels of detail node}.
*
* **Class**: {@link LevelsOfDetailConfig}
*/
LevelsOfDetail = 1002,
/**
* Config used in {@link NodeType.Basic basic nodes} to apply transforms and to control emission and properties of particles.
*
* **Class**: {@link BasicConfig}
*/
Basic = 1004,
/**
* Config used in {@link NodeType.NodeEmitter node emitter nodes} to control the emission of child nodes.
*
* **Class**: {@link NodeEmitterConfig}
*/
NodeEmitter = 1005,
}
/**
* Used by {@link ActionType.Distortion Distortion} particles to control what type of distortion to apply.
*/
export enum DistortionMode {
/**
* Distorts the background as if you stuck something into it and stirred it. It is animated, and the stir speed is controlled by a property.
*/
Stir = 0,
/**
* Distorts the background based on the normal map.
*/
NormalMap = 1,
/**
* Distorts the background as if the edges were held in place and you grabbed the center and twisted it.
*/
Twist = 2,
/**
* Seemingly identical to {@link NormalMap}?
*/
Unk3 = 3,
/**
* This seems to just squeeze everything to the bottom left corner?
*/
Unk4 = 4,
}
/**
* Possible shapes for {@link ActionType.Distortion distortion} particles.
*/
export enum DistortionShape {
/**
* A flat rectangle.
*/
Rectangle = 0,
/**
* Half of an ellipsoid. (Like a hemisphere, but with three different radii.)
*/
Hemiellipsoid = 1,
/**
* An ellipsoid. (Like a sphere, but with three different radii.)
*/
Ellipsoid = 2,
}
/**
* Emitter shapes for the following actions:
* - {@link ActionType.GPUStandardParticle GPUStandardParticle}
* - {@link ActionType.GPUStandardCorrectParticle GPUStandardCorrectParticle}
* - {@link ActionType.GPUSparkParticle GPUSparkParticle}
* - {@link ActionType.GPUSparkCorrectParticle GPUSparkCorrectParticle}
*
* Not related to the {@link ActionSlots.EmitterShapeAction emitter shape actions}.
*/
export enum EmitterShape {
/**
* A simple line.
*/
Line = 0,
/**
* A cuboid.
*
* The difference between this and {@link Box2} is how the
* {@link GPUStandardParticle.emitterDistribution distribution} field acts on it.
*/
Box = 1,
/**
* A cuboid.
*
* The difference between this and {@link Box} is how the
* {@link GPUStandardParticle.emitterDistribution distribution} field acts on it.
*/
Box2 = 2,
/**
* Seemingly identical to {@link Line}?
*/
Unk3 = 3,
/**
* A cylinder.
*/
Cylinder = 4,
/**
* Not yet tested. Found in 800020 in Sekiro.
*/
Unk5 = 5,
}
/**
* Values representing different shapes of the volume where force actions apply their force.
*/
export enum ForceVolumeShape {
/**
* Allows the force to affect everything, everywhere.
*/
Boundless = 0,
/**
* A spherical volume.
*/
Sphere = 1,
/**
* A cuboid volume.
*/
Box = 2,
/**
* A cylindrical volume.
*/
Cylinder = 3,
/**
* A square prism volume.
*/
SquarePrism = 4,
}
/**
* An emitted instance's initial direction is used for various things that require a direction, but does not have a set one to follow.
* - {@link ActionType.ParticleModifier ParticleModifier action}'s {@link ParticleModifier.speed speed}.
* - {@link ActionType.Line Line action}'s initial rotation.
* - {@link ActionType.QuadLine QuadLine action}'s initial rotation.
*
* The initial direction can be further modified by the following actions:
* - {@link ActionType.NoSpread NoSpread}
* - {@link ActionType.CircularSpread CircularDirectionSpread}
* - {@link ActionType.EllipticalSpread EllipticalDirectionSpread}
* - {@link ActionType.RectangularSpread RectangularDirectionSpread}
*/
export enum InitialDirection {
/**
* The direction will depend on the emitter shape.
* | Emitter Shape | Direction |
* |:-|:-|
* | {@link ActionType.PointEmitterShape Point} | Same as {@link LocalNorth}. |
* | {@link ActionType.DiskEmitterShape Disk} | Same as {@link LocalNorth}. |
* | {@link ActionType.RectangleEmitterShape Rectangle} | Same as {@link LocalNorth}. |
* | {@link ActionType.SphereEmitterShape Sphere} | The direction cannot be changed for this emitter shape. |
* | {@link ActionType.BoxEmitterShape Box} | If {@link BoxEmitterShape.emitInside emitInside} is true, it picks a direction parallel to a random local axis. If it is false, the direction will be out from the box, perpendicular to the side where the particle was emitted. |
* | {@link ActionType.CylinderEmitterShape Cylinder} | Out from the cylinder's axis. |
*/
Emitter = 0,
/**
* Global up. (+Y)
*/
Up = 1,
/**
* Global down. (-Y)
*/
Down = 2,
/**
* Global north. (+Z)
*/
North = 3,
/**
* Local up. (+Y)
*/
LocalUp = 4,
/**
* Local down. (-Y)
*/
LocalDown = 5,
/**
* Local north. (+Z)
*/
LocalNorth = 6,
}
/**
* Values representing different lighting modes.
*
* These values and the fields they are used in require more testing. It's best to not assume they will work exactly as described. Values not covered by this enum are also used in vanilla effects, so there are a lot of unknown things about this.
*/
export enum LightingMode {
/**
* Same as {@link Lit}, but this seems to sometimes have an extra light source from somewhere?
*/
UnkMinus2 = -2,
/**
* Lighting does not affect the particles. No shadows or specular hightlights.
*/
Unlit = -1,
/**
* Lighting affects the particles just like most regular objects.
*/
Lit = 0,
}
/**
* Values representing different orientation modes for {@link ActionType.Model Model} particles.
*/
export enum ModelOrientationMode {
/**
* Faces global north.
*/
North = 0,
/**
* Faces away from the camera plane, the same direction as the camera itself.
*/
CameraPlane = 1,
/**
* Faces in the direction the particle is moving. This direction can be modified by {@link ActionSlots.DirectionSpreadAction DirectionSpread actions}, and is initially the particle's {@link InitialDirection}.
*/
ParticleDirection = 2,
/**
* Tries to face the camera, but is limited to rotation around the global X-axis.
*
* Seemingly identical to {@link UnkGlobalPitch}?
*/
GlobalPitch = 3,
/**
* Tries to face the camera, but is limited to rotation around the vertical global Y-axis.
*/
GlobalYaw = 4,
/**
* Tries to face the camera, but is limited to rotation around the global X-axis.
*
* Seemingly identical to {@link GlobalPitch}?
*/
UnkGlobalPitch = 5,
}
/**
* Values used to represent different types of FXR nodes.
*/
export enum NodeType {
/**
* The root of the FXR tree structure.
*
* **Class**: {@link RootNode}
*/
Root = 2000,
/**
* Acts as a node containing another SFX.
*
* **Class**: {@link ProxyNode}
*/
Proxy = 2001,
/**
* A node that only displays one of its child nodes at a time based on distance thresholds for each.
*
* **Class**: {@link LevelsOfDetailNode}
*/
LevelsOfDetail = 2002,
/**
* A basic node that can emit particles, play sounds, have transforms and child nodes.
*
* **Class**: {@link BasicNode}
*/
Basic = 2200,
/**
* A node that emits its child nodes.
*
* **Class**: {@link NodeEmitterNode}
*/
NodeEmitter = 2202,
}
/**
* Values representing different orientation modes for most particles.
*/
export enum OrientationMode {
/**
* Faces global south.
*
* See also:
* - {@link UnkSouth}
*/
South = 0,
/**
* Faces the camera plane.
*
* See also:
* - {@link Camera}
*/
CameraPlane = 1,
/**
* Faces the -Z direction of the parent node.
*/
LocalSouth = 2,
/**
* Faces global south.
*
* Similar to {@link South}, but this seems to change the projection of the particle in some way.
*/
UnkSouth = 3,
/**
* Tries to face the camera, but is limited to rotation around the vertical global Y-axis.
*/
GlobalYaw = 4,
/**
* Faces global east.
*/
East = 5,
/**
* Faces the camera.
*
* This is different from {@link CameraPlane}, as this makes it face the camera's position instead of the camera plane.
*/
Camera = 6,
/**
* Tries to face the camera, but is limited to rotation around the Y-axis of the parent node.
*/
LocalYaw = 7,
/**
* Not yet tested. Found in 639742 in Elden Ring. This also implies the existence of 8, 9, and 10, but they have not been tested or found yet.
*/
Unk11 = 11,
}
/**
* Arguments used when evaluating properties.
*
* There is no way to change what argument is given to a property. Each property has one specific argument given to it, and this is sometimes the only difference between two properties in the same action.
*/
export enum PropertyArgument {
/**
* A constant value of 0.
*/
Constant0 = 0,
/**
* Time in seconds since the particle was emitted.
*/
ParticleAge = 1,
/**
* Time in seconds since the action became active.
*
* An action becoming active is for example the delay from {@link ActionType.NodeAttributes NodeAttributes} being over, or the active {@link State} changing, making a node change which of its configs is active.
*/
ActiveTime = 2,
/**
* Time in seconds between the effect being created and the particle being emitted. Stays constant per particle.
*/
EmissionTime = 3,
/**
* An external value.
*
* In property modifiers, which external value is used is controlled by a field in the modifier.
*/
ExternalValue = 4,
}
/**
* Used by {@link ActionType.LensFlare lens flares} to control the direction of the offset vector.
*/
export enum ReflectionMode {
/**
* No offsets. The flare(s) will appear at the source's position.
*/
None = 0,
/**
* The source's screen-space position will be reflected through the center of the screen to calculate the offset vector.
*/
Radial = 1,
/**
* The source's screen-space position will be flipped horizontally to calculate the offset vector.
*/
Horizontal = 2,
}
/**
* Values representing different orientation modes for {@link ActionType.RichModel RichModel} particles.
*/
export enum RichModelOrientationMode {
/**
* Faces global north.
*
* Seemingly identical to {@link UnkNorth}?
*/
North = 0,
/**
* Faces away from the camera plane, the same direction as the camera itself.
*/
CameraPlane = 1,
/**
* Faces in the direction the particle is moving. This direction can be modified by {@link ActionSlots.DirectionSpreadAction DirectionSpread actions}, and is initially the particle's {@link InitialDirection}.
*/
ParticleDirection = 2,
/**
* Faces global north.
*
* Seemingly identical to {@link North}?
*/
UnkNorth = 3,
/**
* Tries to face the camera, but is limited to rotation around the vertical global Y-axis.
*/
GlobalYaw = 4,
}
/**
* Values representing different orientation modes for {@link ActionType.Tracer Tracer} and {@link ActionType.LegacyTracer LegacyTracer} particles.
*/
export enum TracerOrientationMode {
/**
* The tracer source is perpendicular to the direction it's travelling and the direction of the camera.
*/
Travel = 0,
/**
* The tracer source is aligned with the local Z-axis, which is detenmined by the rotation of the node that emits the tracer.
*/
LocalZ = 1,
/**
* The tracer source is aligned with the global vertical axis.
*/
Vertical = 2,
/**
* The tracer source is aligned with the global X-axis.
*/
GlobalX = 3,
/**
* Creates two sources for the tracer with different orientation modes. One has {@link Vertical} and the other has {@link GlobalX}, forming a cross.
*/
Cross = 4,
/**
* The tracer source is parallel to the global diagonal (1, 1, 1).
*/
Diagonal = 5,
}
/*#Enums end*/
enum ValueType {
Scalar = 0,
Vector2 = 1,
Vector3 = 2,
Vector4 = 3
}
enum PropertyFunction {
/**
* Always returns 0 for each component.
*/
Zero = 0,
/**
* Always returns 1 for each component.
*/
One = 1,
/**
* Always returns the value in the property's fields.
*
* **Class**: {@link ConstantProperty}
*/
Constant = 2,
/**
* Uses step interpolation to interpolate the property's values.
*
* **Class**: {@link SteppedProperty}
*/
Stepped = 3,
/**
* Uses linear interpolation to interpolate