Latest version | 2.3.0 |
---|---|
Minimum Core | 10 |
Compatible Core | 11.315 |
Last updated | 2 months ago |
Created | 1 year 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})
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).You can start or stop emission by chat with the command "/pfx". It adds a message response in the chat.
Commands:
/pfx stopAll
/pfx stopById *id*
/pfx spray *prefillMotionTemplate* *prefillColorTemplate*
/pfx gravitate *prefillMotionTemplate* *prefillColorTemplate*
/pfx missile *prefillMotionTemplate* *prefillColorTemplate*
/pfx help
/pfx spray ray death
To stop a command, you can add the param --instant to not have to wait the end of the particles lifetime.
particlesFx.sprayParticles(prefillMotionTemplateName, prefillColorTemplate, {Advanced options})
particlesFx.gravitateParticles(prefillMotionTemplateName, prefillColorTemplate, {Advanced options})
particlesFx.missileParticles(prefillMotionTemplateName, prefillColorTemplate, {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 "Graviting").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, false to stop only the emission (living particles are not killed).particlesFx.stopEmissionById(id)
. ID is a number or a string:
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("particule-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)
The method emitting particles can be called with a prefill template. There are two kinds of templates: prefillMotionTemplate and prefillColorTemplate, 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
For more advanced functionality, please read the WIKI for more details:
With the v2.0.0, all words containing particle have been renamed particle. And the object exposing the module's methods (particleEmitter) has been renamed particlesFx.
A compatibility management has been added with warnings to show the bad 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.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Advertisement cookies are used to deliver visitors with customized advertisements based on the pages they visited before and analyze the effectiveness of the ad campaign.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.