This project is born like a fusion of the features of these modules LightsHUD, ATE and DFreds Convenient Effects, but after the initial code i rewriting everything so many times now is just a new module inspired form these other modules.
A special ty go to Illandril for the module Illandril's Hotbar Uses, from which taken the code for the analysis of the number of slots left on the object.
Remember to support these authors if you feel generous on their patreon or kofi account.
A Foundry VTT module that displays on the HUD config of the token all the available lighting and visions items on the token/actor with two modality:
1) The module setting 'Apply HUD interface on ATE Items' (by default is true) enable some ATE effect, so you can light a torch or turn of without modify the token configuration and you can set with Times up and Dae time and condition of the vision and light effect on the token.
2) The module setting 'Apply HUD interface on flagged Items' (by default is false) enable some old flag system for replicate the old behavior of LightsHUD, but with a more dynamic and customizable integration or for people who don't like ATE and want a minimal setup starting from a series of presets.
3) The module setting 'Enable LightHUD Old Interface' (by default is false) fFor people who want the literally 1:1 same interface of the old LightsHUD you can enable this. Usually this will work better with 'Apply HUD interface on ATE Items' and 'Apply HUD interface on flagged Items' module setting disabled, but they can kind work together
Although not recommended, both modes can be active and the interface will show both ATE effect and item objects with module flags activated. The priority of the light and visual effects will always be given to the ATE effects present on the object if there are both the ATE effects and the module flags.
If both settings are disabled only the two GM management macros will be viewable on the HUD interface, it can be useful for very minimal games without too many gadgets.
Which of the two settings should I choose? If you are experienced enough with active effects I suggest you use the solution with ATE because under the hood it does a lot of cool things that you can't even imagine.
If you ask me the big difference is that the version with flags has the limitation of not "merging" the abilities, but of overriding to keep active one effect at a time, while ATE does the "merge" trying to give the "best of the bunch".
The module "LightHUD" is more generic, not in the wrong sense of the term, but there are simply cases where you want to create custom animations for your torches and lanterns and do not been vincolate
The module "DFreds Convenient Effects" it lets you add effects related to ligthing and always customize them with ATE, but it is not bound to the objects currently present in the actor and does not take into account things such as limitation of use and consumption of objects.
It's always easiest to install modules from the in game add-on browser.
To install this module manually:
https://raw.githubusercontent.com/p4535992/foundryvtt-lights-hud-ate/master/src/module.json
This module uses the libWrapper library for wrapping core methods. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.
This module uses the socketlib library for wrapping socket methods. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.
This module uses the ATE library for wrapping methods. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.
This module uses the warpgate library for wrapping methods. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.
spawnAt
should include a check distance of spawn so no player drop torch on a very far point of the canvas.How can i add my system ? That's is pretty easy on the code level ty to the design pattern so i just need some information on the system rules and voilà.
This is already done from the ATE checkout the documentation on that module.
Add vision and lighting modification with ATE active effect, no token configuration is actually touched, everything is on the active effect management, the duration the remove, the adding, you can even merge the effect of two different kind of visions and lighting together.
The module is build to show on a left click of the button with the image of a lightBulb on the hud panel all the item with some ATL effect present on the token\actor, there is a distinction between passive, temporary, applied, need to be attuned or equipped condition (suppressed).
Symbol | Description |
---|---|
The symbol of the yellow exclamation triangle means the active effect is suppressed for some reason that you can delve into in the effects panel, usually need to be attuned or equipped condition this does not prevent the effect from being active or not, only that it will result in the subcategory of inactive effects. | |
The symbol of the light blue infinity means the active effect is passive like a race feature or a special ability like darkvision, this does not prevent the effect from being active or not, only that it will result in the subcategory of inactive effects. | |
The symbol of the white clock means the active effect is temporary like a spell valid only for tot. rounds or seconds, this is usually managed from the Times up module if installed, this does not prevent the effect from being active or not, only that it will result in the subcategory of temporary effects. | |
The symbol of the orange clock means the active effect is temporary and is expired like a spell valid only for tot. rounds or seconds, this is usually managed from the Times up module if installed, this does not prevent the effect from being active or not, only that it will result in the subcategory of temporary effects. | |
The symbol of the green lightbulb means the active effect is enabled (or applied). | |
The symbol of the red lightbulb means the active effect is disabled (or not applied). | |
The symbol of the coral flag means the light/vision applied is from the flagged feature not the ATE feature. | |
The symbol of the blue steel user means the light/vision applied is from the a ATE effect applied on the actor not the item. | |
The symbol of the white sun means the light/vision applied is from the static preset list effect of the module and is applied on the actor not the item, no customization is available for these feature is been done for people who miss the old "LightsHUD" behavior and want to do just one click instead of two... I REPEAT NOT CUSTOMIZATION WITH THESE EFFECT |
By default the module it will roll the item associated to the ATL effect, so you can apply other things like consumable feature and apply measure template.
This is useful for fast configuration during the game, but is advisable to always use items with ATL changes on it.
On the hud config of the token if you are a GM, you can see on the popout form a couple of buttons '[GM] Fast token configuration' and '[GM] Create custom ATE Effect', they are a embedded version of the macro token_vision_config.js for make the work of the gm more fast when forget to set some vision.
I add two dialog panel one for put the preset one from the current supported system and one for put a custom preset, no store of these custom is done, if you want to store a custom lighting or vision it's advisable to create a item and apply ATE effects on it.
NOTE: You can still apply the custom vision and light like a new active effect by checking the checkbox Apply as ATE/ATL Effect, so no excuse now.
NOTE: The custom dialog work with CommunityLighting if is enabled and active it will show more options for animation type.
This feature is inspired from Drop My Torch, but completely rewrite and the actor/token is created on runtime.
If you right click on a image/voice of the hud panel we call the warpgate function spawnAt
for let the player drop a light on the canvas.
NOTE: For let player make use of this you need to set the permission of player to create token (i don't know if warpgate has some function with socketLib for executeAsGM).
NOTE: For now there is no discrimination on the item you can drop. You can drop a Torch, like you can drop a Light Spell , like you can drop your Darkvision feature, probably some condition for let drop only physical items
Anyone can contribute with a custom lighting and vision item, you just need to export the item you created with the ATL effect on it and i will create a compendium, or better open a PR on the official ATE compendium.
game.modules.get('lights-hud-ate').api.cleanUpTokenSelected()
npm install
will build the code and copy all necessary assets into the dist folder and make a symlink to install the result into your foundry data; create a
foundryconfig.json
file with your Foundry Data path.
{
"dataPath": "~/.local/share/FoundryVTT/"
}
build
will build and set up a symlink between dist
and your dataPath
.
npm run-script build
You don't need to build the foundryconfig.json
file you can just copy the content of the dist
folder on the module folder under modules
of Foundry
build:watch
will build and watch for changes, rebuilding automatically.
npm run-script build:watch
clean
will remove all contents in the dist folder (but keeps the link from build:install).
npm run-script clean
lint
launch the eslint process based on the configuration here
npm run-script lint
lintfix
launch the eslint process with the fix argument
npm run-script lintfix
prettier-format
launch the prettier plugin based on the configuration here
npm run-script prettier-format
package
generates a zip file containing the contents of the dist folder generated previously with the build
command. Useful for those who want to manually load the module or want to create their own release
npm run-script package
Any issues, bugs, or feature requests are always welcome to be reported directly to the Issue Tracker, or using the Bug Reporter Module.
This package is under an MIT license and the Foundry Virtual Tabletop Limited License Agreement for module development.
Bootstrapped with League of Extraordinary FoundryVTT Developers foundry-vtt-types.
Mad props to the 'League of Extraordinary FoundryVTT Developers' community which helped me figure out a lot.
Thanks to anyone who helps me with this code! I appreciate the user community's feedback on this project!