| Latest version | 2.6.0 |
|---|---|
| Minimum Core | 13 |
| Compatible Core | 13.351 |
| Last updated | 1 month ago |
| Created | 3 years ago |
| Authors | |
| Languages |
English Français |
| Systems | All systems |
| Project source | Project URL |
The module contains several methods to generate particles without needing premade video files. The particles are simple sprite textures managed by script. You can use or add some prefill templates for the emitter or customize it with a JSON input.
particlesFx.sprayParticles('breath', {source: token.id, target: target.id})
freezeOnPause to handle game pause in customized inputs.-m or --multiple.-h or -help like /pfx spray -h.The emission methods are used to interpret the input and manage the particles during their lifetime. The method returns its ID.
Spray particles are emitted from a source and move with a velocity in a direction defined by an angle.
Gravitating particles turn around the source with a velocity at a distance defined by a radius.
The missile method emits spray particles that are used to emit sub-particles.
To stop all emissions in the scene and reset the particle emitter's IDs index.
To stop a specific emission, you need to use a macro to call the method particlesFx.stopEmissionById with an ID parameter:
true for instant deletion of particles already emitted, false to stop only the emission (living particles are not killed).To stop a future emission linked by a workflow to a current one, you need to use a macro to call the method particlesFx.stopWorkflow(id, isImmediate, all)
id with an ID parameter:
isImmediate is a boolean parameter: true for instant deletion of emitters already generated, false to stop/disable only workflows that have not yet begun.all is a boolean to select workflows in all emitters.You can start or stop emissions via chat with the command /pfx. It adds a message response in the chat.
Commands:
/pfx stopAll (--instant) (--help)/pfx stopById *id* (--instant) (--help)/pfx stopWorkflow *id* (--instant) (--all) (--help)/pfx spray *prefillMotionTemplates* *prefillColorTemplates* *particleShapes* (--multiple) (--help)/pfx gravitate *prefillMotionTemplates* *prefillColorTemplates* *particleShapes* (--multiple) (--help)/pfx missile *prefillMotionTemplates* *prefillColorTemplates* *particleShapes* (--curve) (--multiple) (--help)/pfx help/pfx spray ray death ice
To stop a command, you can add the param --instant so you do not have to wait for the end of the particles' lifetime.
particlesFx.sprayParticles(prefillMotionTemplates, prefillColorTemplates, particleShapes, {Advanced options})particlesFx.gravitateParticles(prefillMotionTemplates, prefillColorTemplates, particleShapes, {Advanced options})particlesFx.missileParticles(prefillMotionTemplates, prefillColorTemplates, particleShapes, {Advanced options}). Advanced options have the same input as Spray particles with a nested object subParticles containing another input (spray or gravitating) and type (equals to "Spraying" or "Gravitating").particlesFx.writeMessageForEmissionById(emitterId, isVerbal). The isVerbal parameter also writes advanced input in the message.particlesFx.stopAllEmission(instantDelete). instantDelete is a boolean parameter: if true, it deletes all particles already emitted; if false, it stops only the emission (living particles are not killed).particlesFx.stopEmissionById(id). ID is a number or a string:
particlesFx.stopWorkflow(id, isImmediate, all). ID is like the one for stopEmissionById, and all disables workflows for all current workflows.Example To emit missile particles with gravitating sub-particles that form a trail:
particlesFx.missileParticles({source: {x:200, y:250}, target: token.id, subParticles: {type: "Gravitating", particleLifetime: 1000, onlyEmitterFollow: true, particleAngleStart: '0_360'}})
All these methods can also be called with the module's API game.modules.get("particle-fx").api with the same parameters and behavior:
xxx.api.emit.spray(xxx)xxx.api.emit.gravit(xxx)xxx.api.emit.missile(xxx)xxx.api.emit.writeMessage(xxx)xxx.api.emit.stopAll(xxx)xxx.api.emit.stop(xxx)xxx.api.emit.stopWorkflow(xxx)The method emitting particles can be called with multiple prefill templates or none. There are two kinds of templates: prefillMotionTemplates and prefillColorTemplates, which can be combined. You can add an input to override some attributes of the prefill template. The order of the parameters is not important.
Prefill Motion Template:
Example particlesFx.missileParticles('wave', {source: token.id, target: target.id})
Prefill Color Template:
Example /pfx spray breath fire
The particle shape property defines the texture of the sprite for each particle.
Particle shapes:
Example /pfx spray breath star
For more advanced functionality, please read the WIKI for more details:
Example | ```compendium macro Hypnotize
| ``` | compendium macro Concentrate |
|---|---|
![]() |
![]() |
| ```compendium macro firework | |
| ``` | compendium macro rayball |
![]() |
![]() |
With v2.0.0, all words containing "particule" have been renamed "particle". Additionally, the object exposing the module's methods (particleEmitter) has been renamed particlesFx.
Compatibility management has been added with warnings to flag outdated names.
To install this package, open your Foundry Setup screen and navigate to your Module tab and click the Install Module button.
From there, you can either search for the package unique name: particule-fx or copy its manifest URL:
And paste it to the input box at the bottom of your window.

You can install this package directly to your Forge account.