Skip to content

Determine the lighting conditions of a token based on placed lights and token lights

License

Notifications You must be signed in to change notification settings

Eligarf/TokenLightCondition

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Latest Version Foundry Version

Latest Downloads Total Downloads

Token Light Condition

A module for FoundryVTT that modifies token effects based on lighting conditions.


Normal light placement
effect-transitions
Light placement with rotation and angle defined
effect-angle-transitions
Token light with rotation and angle.
effect-token-angle

Purpose

Determine the light condition of a token, and generate effects on the token to indicate light condtions.

This is to allow players, or modules to use these effects to help rules determination around those conditions.

Features

  • Adds a token Hud element to selected token (right-click the token):
  • Hud indicator - ( DRK, DIM, BRT )
  • Adds an Effect when token is in Dim or Dark conditions.
  • Removes Dim/Dark effects while in Bright conditions.
  • Updates tokens on scene Darkness Level changes.
  • Tokens will be updated on drop in scene.
  • Token is only processed if of type (character, npc) and have hp > 0
  • TokenHud light box indicator is only shown if token hp > 0
  • Lighting Control that can enable/disable Token Light Condition use.

Lighting Controls

Look for this Icon on the Lighting Controls

toggle-tlc-icon

When Enabled (default) the module will process the tokens and add/remove Dim/Dark effects as needed.

If you are switching TO enabled, give the module a moment to process all the viable tokens on the scene. enabled-processing

When Disabled, the module will process the tokens and Remove any Dim/Dark effects currently in use. disabled-removing disabled-done

Note

Tokens must be type Characters/NPC, and have an HP > 0 in order to be processed. Otherwise they will be skipped.

Support

Efforts are being made for tokens to respect tile overrides, and other methods. These may work with some degree of success/failure.

  • lights with elevations (Levels)

    • This has been problematic to sort out, as lights are treated as cyclinders,
    • with a top and bottom, that act as floors. But testing results around this have been problematic.
  • Drawings with lighting overrides (perfect-vision)

    • This seems to be working correctly...

Options

Console logging level

Sets the level of console used for logging:

  • No Logging - Use this for no output
  • Debug
  • Log

Show TokenHud

Enables or Disables the display of the light condition on the TokenHud.

  • Adds a token Hud element to selected token (right-click the token):
  • Hud indicator - ( DRK, DIM, BRT )

Source for lighting effect

Choose which source or application the effects are generated from.

  • Disable token effect (None)
  • Token Light Condition (Active Effects)
  • Convienent Effects (CE)
  • Combat Utility Belt (CUB)

None means there no effects placed on tokens, but the token Hud will still work.

CUB option is only available if both Dim AND Dark conditions exist in the Lab.

Convienent Effects entries are added on module load if they don't exist.

Suggested Modules

About

Determine the lighting conditions of a token based on placed lights and token lights

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%