Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Script:Random Dungeon Generator"

From Roll20 Wiki

Jump to: navigation, search
m (Use of Geomorphic Map Tiles)
(Using the the Random Dungeon Generator)
 
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{script overview
 +
|name=Random Dungeon Generator
 +
|author={{user profile|135636|Stephen S.}}, {{user profile|71687|Alex L.}}
 +
|version=
 +
|lastmodified=2014-02-14}}
 
==Use of Geomorphic Map Tiles==
 
==Use of Geomorphic Map Tiles==
 
{{mbox | text='''DRAFT''', This document is still being edited.}}<br />
 
{{mbox | text='''DRAFT''', This document is still being edited.}}<br />
 
[[File:Modified Geomorphic Map Tile.jpeg|thumbnail|right|Modified Geomorphic Map Tile for personal/private use, and consistent with Terms of Service and Privacy Policy.]]
 
[[File:Modified Geomorphic Map Tile.jpeg|thumbnail|right|Modified Geomorphic Map Tile for personal/private use, and consistent with Terms of Service and Privacy Policy.]]
 
* This API script uses [[Geomorphic Map Tiles]]. The set used for this script can be located on the Roll20 Market place: [https://marketplace.roll20.net/browse/set/252/old-school-geomorphic Old School Geomorphic]<br />
 
* This API script uses [[Geomorphic Map Tiles]]. The set used for this script can be located on the Roll20 Market place: [https://marketplace.roll20.net/browse/set/252/old-school-geomorphic Old School Geomorphic]<br />
** Geomorphic map tiles are a design technique that defines and locates set features on edge of the tile so any tile can connect to any other tile without concern for orientation. <br />
 
 
** These can be downloaded and modified however you choose, so long as it is for personal/private use, and is consistent with [[Terms of Service and Privacy Policy]]. <br />
 
** These can be downloaded and modified however you choose, so long as it is for personal/private use, and is consistent with [[Terms of Service and Privacy Policy]]. <br />
 +
** Geomorphic map tiles are a design technique that defines and locates set features on the edge of the tile so any tile can connect to any other tile without concern for orientation. <br />
 
** To the right, there is an example of a modified geomorphic map tile. It is important to note the modification to the tile do not included modifications to the walls (Dynamic Lighting path information will have to be added to the code for any new wall patterns.)
 
** To the right, there is an example of a modified geomorphic map tile. It is important to note the modification to the tile do not included modifications to the walls (Dynamic Lighting path information will have to be added to the code for any new wall patterns.)
 
** Naming of the tiles is an important factor due to the use of names in the code. Unmodified tiles in the [https://marketplace.roll20.net/browse/set/252/old-school-geomorphic Old School Geomorphic] set includes "Geo_Type_A_0001" through "Geo_Type_A_0045." It is recommended user modified tiles be named consistent with that to keep any code modifications required consistent as well.
 
** Naming of the tiles is an important factor due to the use of names in the code. Unmodified tiles in the [https://marketplace.roll20.net/browse/set/252/old-school-geomorphic Old School Geomorphic] set includes "Geo_Type_A_0001" through "Geo_Type_A_0045." It is recommended user modified tiles be named consistent with that to keep any code modifications required consistent as well.
** New tiles can be created for this set by the user and more information on that can be found at Geomorphic Map Tiles. However, Dynamic Lighting path information will have to be added to the code for any new wall patterns.  
+
** New tiles can be created for this set by the user and more information on that can be found at [[Geomorphic Map Tiles]]. However, Dynamic Lighting path information will have to be added to the code for any new wall patterns.  
 
<br />
 
<br />
* The [https://marketplace.roll20.net/browse/set/252/old-school-geomorphic Old School Geomorphic] tiles are arbitrarily referred to as "Type_A" so if other content creators create tiles we will know which set are designed to work with other sets. The only features that would be critical would be the "off map" areas and the shadow drops for the walls. You can get the off map texture and shadow drop sample to make it easier below:
+
* The [https://marketplace.roll20.net/browse/set/252/old-school-geomorphic Old School Geomorphic] tiles are arbitrarily referred to as "Type_A" so if other content creators create tiles we will know which set are designed to work with other sets. The only features that would be critical would be the "off map" areas and the shadow drops for the walls. To make it easier to create your own content, you can get the "off map" texture, "shadow drop" sample, and one sample tile below:
** https://wiki.roll20.net/File:Geo_Type_A_Shadows_Example.png
+
<gallery>
** https://wiki.roll20.net/File:Geo_Type_A_Off_Map.jpeg
+
Geo_Type_A_Shadows_Example.png|Geo_Type_A_Shadow
** Both can be used to create and sell additional "Type_A" geomorphic map tiles.  
+
Geo_Type_A_Off_Map.jpeg|Geo_Type_A_Off_Map
<br /><br /><br /><br /><br /><br /><br />
+
Geo_Type_A_0045.jpeg|Geo_Type_A_0045
 +
</gallery>
  
 
==Use of Rollable Tables==
 
==Use of Rollable Tables==
 
[[File:Use of Rollable Table.png|thumbnail|Setting Up the Rollable Table for the "Random Dungeon Generator with Dynamic Lighting" script.]]
 
[[File:Use of Rollable Table.png|thumbnail|Setting Up the Rollable Table for the "Random Dungeon Generator with Dynamic Lighting" script.]]
 
[[File:NewItem.png|thumbnail|The Item Weight for each tile must be set. It can be set to any number between 0 and 100. A value of 0 turns off the tile. ]]
 
[[File:NewItem.png|thumbnail|The Item Weight for each tile must be set. It can be set to any number between 0 and 100. A value of 0 turns off the tile. ]]
* The most challenging part is setting up the roll able table. It must be named "GeomorphicTiles" and if should only include "Geo_Type_A_0001" through "Geo_Type_A_0045" with the unmodified API code.  
+
* The most challenging part is setting up the rollable table (under "Decks and Tables" in the sidebar). The table must be named "GeomorphicTiles" and unless the API code has been modified, it should only include entries named "Geo_Type_A_0001" through "Geo_Type_A_0045".  Each entry must have the matching tile image attached as "Icon".  Generally each entry should have a weight of "1" (you can tweak the weights to your tastes afterwards).  The exceptions to this rule are "Geo_Type_A_0031", "Geo_Type_A_0032", and "Geo_Type_A_0043" which should all be given a weight of "0" (see the [[Random Dungeon Generator#Notes|Notes]] section below for more information).
* Most often errors with the implementation of this script is due to errors with setting up this table.
+
* Most often errors with the implementation of this script are due to errors with setting up this table.
 
* This is used to save users from hard coding URLs and to leverage the "choose side" feature native to Roll20.
 
* This is used to save users from hard coding URLs and to leverage the "choose side" feature native to Roll20.
* If you plan to modify the code by adding or removing tiles this roll able table items and names must be in parity with the "geomorphicTilesInformation" array which looks like this in the code (sample of some of the lines of code:)
+
* If you plan to modify the code by adding or removing tiles this rollable table items and names must be in parity with the "geomorphicTilesInformation" array which looks like this in the code (sample of some of the lines of code:)
 
<pre data-language="javascript">
 
<pre data-language="javascript">
 
var geomorphicTilesInformation =  
 
var geomorphicTilesInformation =  
Line 34: Line 40:
 
{tileName: "Geo_Type_A_0001", path: [[525,0],[525,35],[735, 35],[735,0]]},
 
{tileName: "Geo_Type_A_0001", path: [[525,0],[525,35],[735, 35],[735,0]]},
 
</pre>
 
</pre>
* This array contains the path points that define the locations of walls. Tiles with identical walls can have the same points, however each tile needs points associated with it's own name. For example "Geo_Type_A_0004" through "Geo_Type_A_0007" have the same walls but have different map features.
+
* This array contains the path points that define the locations of walls. Tiles with identical walls can have the same points, however each tile needs points associated with it's own name. For example "Geo_Type_A_0004" through "Geo_Type_A_0007" have the same walls but have different map features. Both are list in this array, with their own set of points.  
 
:[[File:Geomorphic Tile Wall Example.jpeg]]  
 
:[[File:Geomorphic Tile Wall Example.jpeg]]  
 
* The script uses the item weight to determine the probability of a tile being selected or to turn off a tile. The Item Weight for each tile must be set. It can be set to any number between 0 and 100. A value of 0 turns off the tile. All tiles have a equal chance of being initially selected, once selected the tile is checked against its rarity. If the rarity check fails a new tile is selected and the process repeats. Adjacent tiles of like type (more information below) will affect the rarity of a new tile placement.  
 
* The script uses the item weight to determine the probability of a tile being selected or to turn off a tile. The Item Weight for each tile must be set. It can be set to any number between 0 and 100. A value of 0 turns off the tile. All tiles have a equal chance of being initially selected, once selected the tile is checked against its rarity. If the rarity check fails a new tile is selected and the process repeats. Adjacent tiles of like type (more information below) will affect the rarity of a new tile placement.  
<br /><br /><br />  
+
<br /><br /><br />
  
 
==Setting Up the Map==
 
==Setting Up the Map==
Line 45: Line 51:
 
** Set the map width to 36 or any higher multiple of 12 (36, 48, 60, 72, 84, etc.  Something reasonable.)  
 
** Set the map width to 36 or any higher multiple of 12 (36, 48, 60, 72, 84, etc.  Something reasonable.)  
 
** Set the map height to 36 or any higher multiple of 12 (36, 48, 60, 72, 84, etc. The map does not have to be "square," a map 36 by 72 works just fine.)
 
** Set the map height to 36 or any higher multiple of 12 (36, 48, 60, 72, 84, etc. The map does not have to be "square," a map 36 by 72 works just fine.)
** Once finished with the map you can create a copy or use the use the Transmogrifier to get the finished map in a active player campaign.<br /><br /><br />
+
** Once finished with the map you can create a copy or use the Transmogrifier to get the finished map in a active player campaign.<br /><br /><br />
  
 
==Finishing Setup==
 
==Finishing Setup==
Line 58: Line 64:
 
** The other macros are token actions and should not be in the macro bar.<br /><br />
 
** The other macros are token actions and should not be in the macro bar.<br /><br />
  
==Using the the Random Dungeon Generator==
+
==Using the Random Dungeon Generator==
 
* Make sure there are no images on any of the layers of the map. If you are having trouble clearing the map, simply delete the map and create a new map  following the information in the Setting Up the Map section.
 
* Make sure there are no images on any of the layers of the map. If you are having trouble clearing the map, simply delete the map and create a new map  following the information in the Setting Up the Map section.
 
* Click "Create-Map-Layer." The API will check for a number of things before creating the map:
 
* Click "Create-Map-Layer." The API will check for a number of things before creating the map:
Line 65: Line 71:
 
** "GeomorphicMap has images on it."
 
** "GeomorphicMap has images on it."
 
** "GeomorphicMap has paths on it on the Dynamic Lighting layer."
 
** "GeomorphicMap has paths on it on the Dynamic Lighting layer."
** "Map height must be disible by 12."
+
** "Map height must be divisible by 12."
 
** "Map height must be 36 or larger."
 
** "Map height must be 36 or larger."
 
* If the code successfully runs you will see an randomly generated map.
 
* If the code successfully runs you will see an randomly generated map.
Line 76: Line 82:
 
[[File:Successfully Randomly Generated Map With Paths.png]]
 
[[File:Successfully Randomly Generated Map With Paths.png]]
 
<br />
 
<br />
 +
 
==Modify the Map Before Adding Paths ==
 
==Modify the Map Before Adding Paths ==
 
* Prior to adding the paths by clicking "Add-Dynamic-Lighting-Paths" macro, the map can be altered.
 
* Prior to adding the paths by clicking "Add-Dynamic-Lighting-Paths" macro, the map can be altered.
 
* While on the "Map & Background" layer, right click to use the native "multi-sided" Roll20 feature, to swap out any tile.
 
* While on the "Map & Background" layer, right click to use the native "multi-sided" Roll20 feature, to swap out any tile.
 
* For a selected tile, use the "token actions" to change the rotation of a tile, or use the native Roll20 rotation arm.<br /><br />
 
* For a selected tile, use the "token actions" to change the rotation of a tile, or use the native Roll20 rotation arm.<br /><br />
{{mbox | text='''KNOWN BUG''', Due to a known firebase issue the API will crash if the "token actions" are used. Simply, save the API to restart the sandbox and the scripts for the "token action" rotation macros will work for the current map.}}<br />
+
{{mbox | text='''KNOWN BUG''', Due to a known firebase issue the API will crash if the "token actions" are used for the first time on a new map. Simply, save the API to restart the sandbox and the scripts for the "token action" rotation macros will work for the current map.}}<br />
 
* Once you are happy with the map click the "Add-Dynamic-Lighting-Paths" macro.
 
* Once you are happy with the map click the "Add-Dynamic-Lighting-Paths" macro.
 +
 
==Notes==
 
==Notes==
 
* For corners and edges the API needs to know the normal orientation of the tile and that normal orientation should be like this:
 
* For corners and edges the API needs to know the normal orientation of the tile and that normal orientation should be like this:
 
:[[File:Default_Corner_Orientation_1.png]]
 
:[[File:Default_Corner_Orientation_1.png]]
* In the "geomorphicTilesInformation" array we set the tiles to this orientation because we don't know how the content creator will create the tile example:
+
* In the "geomorphicTilesInformation" array we set the rotation value of the tiles so the tiles will be in  this orientation for corners and edges (as shown above.) This is in the code because we don't know how the content creator will create the tile, for example:
 
:[[File:Default_Corner_Orientation_2.png]]
 
:[[File:Default_Corner_Orientation_2.png]]
 
* The "rotation value in the "geomorphicTilesInformation" array normalizes this for the API.
 
* The "rotation value in the "geomorphicTilesInformation" array normalizes this for the API.
** Geo_Type_A_0025 on the left will "start" at 180 degrees of ration... that normalizes it for the API.
+
** Geo_Type_A_0025 on the left will "start" at 180 degrees of rotation... that normalizes it for the API.
** Geo_Type_A_0026 on the right will "start" at 270 degrees of ration... that normalizes it for the API.
+
** Geo_Type_A_0026 on the right will "start" at 270 degrees of rotation... that normalizes it for the API.
 
<pre data-language="javascript">
 
<pre data-language="javascript">
var geomorphicTilesInformation = [......<br />
+
var geomorphicTilesInformation = [......  
{tileName:"Geo_Type_A_0025", edge: false, corner: true,  entrance: false, type: "d", rotation: 180},<br />{tileName: "Geo_Type_A_0026", edge: true,  corner: false, entrance: false, type: "d", rotation: 270},<br />
+
{tileName:"Geo_Type_A_0025", edge: false, corner: true,  entrance: false, type: "d", rotation: 180},
 +
{tileName: "Geo_Type_A_0026", edge: true,  corner: false, entrance: false, type: "d", rotation: 270},
 
.....
 
.....
 
</pre>
 
</pre>
* Any other tile will be "spun" randomly so long as it is 100% geometric.
+
* Any other tile will be "spun" randomly so long as it is 100% geometric, so starting rotation is not important.
* Geo_Type_A_0043 is one of the few non-geomorphic and its not randomly placed.because it intended to be used beside itself. It's rarity (set by the item weight) should be 0.
+
* Geo_Type_A_0043 is one of the few non-geomorphic and its not randomly placed because it intended to be used beside itself. It's rarity (set by the item weight) should be 0.
 
:[[File:Geo_Type_A_0043_Double_Tile.png]]
 
:[[File:Geo_Type_A_0043_Double_Tile.png]]
  
 
(Gives the GM that "Bridge of Khazad-dûm" sort of thing.)
 
(Gives the GM that "Bridge of Khazad-dûm" sort of thing.)
* All others files that can be randomly placed are randomly "spun".
+
* All others tiles that can be randomly placed are randomly "spun".
 
* Rails and sewers place sides any other tile fine and therefore are "spun" but they do have they own preferred orientation which the API currently does not consider (that will be added later) and must be manually turned to align water and rail.
 
* Rails and sewers place sides any other tile fine and therefore are "spun" but they do have they own preferred orientation which the API currently does not consider (that will be added later) and must be manually turned to align water and rail.
  
Line 115: Line 124:
 
==Code==
 
==Code==
 
[https://gist.github.com/BaldarSilveraxe/9075585 Gist Code Link]
 
[https://gist.github.com/BaldarSilveraxe/9075585 Gist Code Link]
 
[[Category:Tips]]
 

Latest revision as of 02:39, 3 January 2016

API ScriptAuthor: Stephen S., Alex L.
Last Modified: 2014-02-14
Code: Random Dungeon Generator
Dependencies: None
Conflicts: None

Contents

[edit] Use of Geomorphic Map Tiles


Modified Geomorphic Map Tile for personal/private use, and consistent with Terms of Service and Privacy Policy.
  • This API script uses Geomorphic Map Tiles. The set used for this script can be located on the Roll20 Market place: Old School Geomorphic
    • These can be downloaded and modified however you choose, so long as it is for personal/private use, and is consistent with Terms of Service and Privacy Policy.
    • Geomorphic map tiles are a design technique that defines and locates set features on the edge of the tile so any tile can connect to any other tile without concern for orientation.
    • To the right, there is an example of a modified geomorphic map tile. It is important to note the modification to the tile do not included modifications to the walls (Dynamic Lighting path information will have to be added to the code for any new wall patterns.)
    • Naming of the tiles is an important factor due to the use of names in the code. Unmodified tiles in the Old School Geomorphic set includes "Geo_Type_A_0001" through "Geo_Type_A_0045." It is recommended user modified tiles be named consistent with that to keep any code modifications required consistent as well.
    • New tiles can be created for this set by the user and more information on that can be found at Geomorphic Map Tiles. However, Dynamic Lighting path information will have to be added to the code for any new wall patterns.


  • The Old School Geomorphic tiles are arbitrarily referred to as "Type_A" so if other content creators create tiles we will know which set are designed to work with other sets. The only features that would be critical would be the "off map" areas and the shadow drops for the walls. To make it easier to create your own content, you can get the "off map" texture, "shadow drop" sample, and one sample tile below:

[edit] Use of Rollable Tables

Setting Up the Rollable Table for the "Random Dungeon Generator with Dynamic Lighting" script.
The Item Weight for each tile must be set. It can be set to any number between 0 and 100. A value of 0 turns off the tile.
  • The most challenging part is setting up the rollable table (under "Decks and Tables" in the sidebar). The table must be named "GeomorphicTiles" and unless the API code has been modified, it should only include entries named "Geo_Type_A_0001" through "Geo_Type_A_0045". Each entry must have the matching tile image attached as "Icon". Generally each entry should have a weight of "1" (you can tweak the weights to your tastes afterwards). The exceptions to this rule are "Geo_Type_A_0031", "Geo_Type_A_0032", and "Geo_Type_A_0043" which should all be given a weight of "0" (see the Notes section below for more information).
  • Most often errors with the implementation of this script are due to errors with setting up this table.
  • This is used to save users from hard coding URLs and to leverage the "choose side" feature native to Roll20.
  • If you plan to modify the code by adding or removing tiles this rollable table items and names must be in parity with the "geomorphicTilesInformation" array which looks like this in the code (sample of some of the lines of code:)
var geomorphicTilesInformation = 
{tileName: "Geo_Type_A_0001", edge: false, corner: false, entrance: false, type: "d", rotation: 0},
{tileName: "Geo_Type_A_0002", edge: false, corner: false, entrance: false, type: "d", rotation: 0},
  • This array provides information to the API needed to properly place the tile.
  • The Rollable Table must be in parity with the "dynamicLightingArray" array which looks like this (sample of some of the lines of code:)
var dynamicLightingArray = [
{tileName: "Geo_Type_A_0001", path: [[0,105],[105,105],[105,0]]},
{tileName: "Geo_Type_A_0001", path: [[525,0],[525,35],[735, 35],[735,0]]},
  • This array contains the path points that define the locations of walls. Tiles with identical walls can have the same points, however each tile needs points associated with it's own name. For example "Geo_Type_A_0004" through "Geo_Type_A_0007" have the same walls but have different map features. Both are list in this array, with their own set of points.
Geomorphic Tile Wall Example.jpeg
  • The script uses the item weight to determine the probability of a tile being selected or to turn off a tile. The Item Weight for each tile must be set. It can be set to any number between 0 and 100. A value of 0 turns off the tile. All tiles have a equal chance of being initially selected, once selected the tile is checked against its rarity. If the rarity check fails a new tile is selected and the process repeats. Adjacent tiles of like type (more information below) will affect the rarity of a new tile placement.




[edit] Setting Up the Map

  • Without modification, the script will be attempting to add map layer tiles to a map named "GeomorphicMap."
    • There should be one and only one map named "GeomorphicMap."
    • The player book mark DOES NOT have to be on it.
    • Set the map width to 36 or any higher multiple of 12 (36, 48, 60, 72, 84, etc. Something reasonable.)
    • Set the map height to 36 or any higher multiple of 12 (36, 48, 60, 72, 84, etc. The map does not have to be "square," a map 36 by 72 works just fine.)
    • Once finished with the map you can create a copy or use the Transmogrifier to get the finished map in a active player campaign.


[edit] Finishing Setup

  • Check over things and enter the API command "!setup"
    • This will create five macros:
      • Turn-180-Degrees
      • Turn-Left-90-Degrees
      • Turn-Right-90-Degrees
      • Add-Dynamic-Lighting-Paths
      • Create-Map-Layer
    • Check "in Bar" for "Create-Map-Layer" and "Add-Dynamic-Lighting-Paths" and sort them in you macro bar with "Create-Map-Layer" being first.
    • The other macros are token actions and should not be in the macro bar.

[edit] Using the Random Dungeon Generator

  • Make sure there are no images on any of the layers of the map. If you are having trouble clearing the map, simply delete the map and create a new map following the information in the Setting Up the Map section.
  • Click "Create-Map-Layer." The API will check for a number of things before creating the map:
    • "GeomorphicMap is missing."
    • "More than one GeomorphicMap."
    • "GeomorphicMap has images on it."
    • "GeomorphicMap has paths on it on the Dynamic Lighting layer."
    • "Map height must be divisible by 12."
    • "Map height must be 36 or larger."
  • If the code successfully runs you will see an randomly generated map.
Successfully Randomly Generated Map.jpeg


  • Click "Add-Dynamic-Lighting-Paths" macro.
    • Make sure you are on the "Dynamic Lighting" layer.
    • If the code successfully runs you will see paths drawn on each wall.

Successfully Randomly Generated Map With Paths.png

[edit] Modify the Map Before Adding Paths

  • Prior to adding the paths by clicking "Add-Dynamic-Lighting-Paths" macro, the map can be altered.
  • While on the "Map & Background" layer, right click to use the native "multi-sided" Roll20 feature, to swap out any tile.
  • For a selected tile, use the "token actions" to change the rotation of a tile, or use the native Roll20 rotation arm.


  • Once you are happy with the map click the "Add-Dynamic-Lighting-Paths" macro.

[edit] Notes

  • For corners and edges the API needs to know the normal orientation of the tile and that normal orientation should be like this:
Default Corner Orientation 1.png
  • In the "geomorphicTilesInformation" array we set the rotation value of the tiles so the tiles will be in this orientation for corners and edges (as shown above.) This is in the code because we don't know how the content creator will create the tile, for example:
Default Corner Orientation 2.png
  • The "rotation value in the "geomorphicTilesInformation" array normalizes this for the API.
    • Geo_Type_A_0025 on the left will "start" at 180 degrees of rotation... that normalizes it for the API.
    • Geo_Type_A_0026 on the right will "start" at 270 degrees of rotation... that normalizes it for the API.
var geomorphicTilesInformation = [...... 
{tileName:"Geo_Type_A_0025", edge: false, corner: true,  entrance: false, type: "d", rotation: 180},
{tileName: "Geo_Type_A_0026", edge: true,  corner: false, entrance: false, type: "d", rotation: 270},
.....
  • Any other tile will be "spun" randomly so long as it is 100% geometric, so starting rotation is not important.
  • Geo_Type_A_0043 is one of the few non-geomorphic and its not randomly placed because it intended to be used beside itself. It's rarity (set by the item weight) should be 0.
Geo Type A 0043 Double Tile.png

(Gives the GM that "Bridge of Khazad-dûm" sort of thing.)

  • All others tiles that can be randomly placed are randomly "spun".
  • Rails and sewers place sides any other tile fine and therefore are "spun" but they do have they own preferred orientation which the API currently does not consider (that will be added later) and must be manually turned to align water and rail.
  • Geo_Type_A_0031 and Geo_Type_A_0032 are used to "fill in" the offset area (see Geomorphic map tiles for more information. Their rarity (set by the item weight) should be 0.

[edit] Support

[edit] Acknowledgement

Big thanks to Alex L. for his effort to write the code that works out all the math needed to rotate and place the Dynamic Lighting paths.

[edit] Code

Gist Code Link