Latest version | 2.0.0 |
---|---|
Minimum Core | 10 |
Compatible Core | 10.291 |
Last updated | 7 months ago |
Created | 11 months 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 simples sprites 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 is used to interpret the input and manage the particles during their lifetime. The method returns its id.
The spray particles are emitted from a source and move with a velocity in a direction define by an angle.
The graviting particles turn around the source with a velocity at a distance defined by a radius.
The missile method emits a spray particles that is used to emit sub particles.
To stop all emissions in the scene and reset the particle emitters ids index.
To stop a specific emission, you need to use a macro to call the method particlesFx.stopEmissionById
with an id parameter :
And a boolean parameter, true for instant delete of particles already emitted, false to stop only the emission (living particles are not killed).
You can start or stop emission by chat with command "/pfx". It adds a message response in the chat.
Commands :
/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 has the same input as Spray particles with a nested object subParticles
containing another input (spray or graviting) and type (equals to "Spraying" or "Graviting").particlesFx.writeMessageForEmissionById(emitterId, isVerbal)
. isVerbal parameter also write advanced input in the messageparticlesFx.stopAllEmission(instantDelete)
. instantDelete is a boolean parameter, if true, it delete 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 a missile particles with graviting sub particles that forming a trail
particlesFx.missileParticles({source : {x:200, y:250} , target: token.id, subParticles : { type: "Graviting", particleLifetime: 1000, onlyEmitterFollow : true, particleAngleStart: '0_360'}})
All this methods can also be calls with the modules API 'game.modules.get("particule-fx").api' with the same parameters and behaviour:
The method emitting particles can be called with a prefill template. They are two kinds of template prefillMotionTemplate and prefillColorTemplate which can be combined. You can add an input to override some attributes of the prefill template. The order of the paramater is not important, for example particlesFx.sprayParticles('prefillMotionTemplate', 'prefillColorTemplate', {position: {x:100, y:'50_100'}})
is the same as particlesFx.sprayParticles('prefillColorTemplate', {position: {x:100, y:'50_100'}}, 'prefillMotionTemplate')
Prefill motion template :
Example particlesFx.missileParticles('wave', {source :token.id, target: target.id} )
Prefill color template :
Example /pfx spray breath fire
To do more advanced thing please read the readme for more details :
With the v2.0.0, all words containing particule has been rename particle. And the object exposing the modules methods (particuleEmitter) has been renamed particlesFx .
A compatibility management has been add with warning 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.
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.
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.