Register

Lights and Mirrors

An Add-on Module for Foundry Virtual Tabletop

Author: Dr. O Project Source: Project URL Versions 9+ (Verified 9) Last Updated 2 years, 8 months ago

Lasers - light-beams and mirrors

FoundryVTT module for lasers, or light-beams that can be reflected using mirrors. This version implements mirrrors, light sources, prisms and sensors that interact with each other. All these "tools" are tokens, that can be rotated and moved as usual.

Laser tools

All the tools above are available in the compendium named Laser Tools.

 

Creating Tools from scratch:

image

 

 

 

 

 

The players does not need to have permissions to any of the tokens. If you install "pushable" tokens your players can push the mirrors or light-sources around.

The light tokens will create multiple extra light tokens that act as each reflection. It can happen that the light looses them instead of deleting them automatically. If they do, you can manually select and delete them. The image for the reflecting light token is 💢. If you wish to change this default image, you'l find it in the module's folder under media.

All tokens have a field next to the sensor checkbox that enables you to enter the name of a macro. This macro will be called every time the number of lights change on this sensor. Below is a example macro that prints out some information.

console.warn(token);
let activelights = token.document.getFlag('lasers', 'active_lights');
console.log(activelights);
if (activelights.length>0){
  // Do something exciting
  console.log("Exciting things here!");
}

Both the light source and the mirrors create a small wall behind them. This wall will be rotated and moved along with the token (and deleted when the token is deleted). It may happen that these walls are left behind, in that case, manually delete them.

 

Do you like this module?; Feel free to support me at Patreon.

 

Would you like to show off your creations or ask questions about the module feel free to drop in at my discord channel. 

Categories

Available Versions

  1. Version 1.6.3

    2 years, 8 months ago
    Foundry Version 9+ (Verified 9) Manifest URL Read Notes
  2. Version 1.6.0

    Foundry Version 9+ (Verified 9) Manifest URL Read Notes
  3. Version 1.5.0

    Foundry Version 9+ (Verified 9) Manifest URL Read Notes
  4. Version 1.0.0

    Foundry Version 9+ (Verified 9) Manifest URL Read Notes
  5. Version 0.0.9

    Foundry Version 9+ (Verified 9) Manifest URL