Overlays
Checklist
-
Create an overlay token
-
Set the name of the object
-
Add the tag according to the Overlay Type
Components
Overlay Token
Name |
Name of the overlay (has to be unique across the overlay type). |
Tag |
Specific tag for the overlay type (see Overlay Type). |
If you want to also add a 3D representation for the overlay you have to add a new state for it (see the TTS knowledge base for more info). By convention the first state is for the 2D token and the second state for the 3D token. You can also have more than 2 states. In this case, when the overlay is placed a random state is determined for each overlay during load. E.g. in the mod the tree overlay has 3 different 3D models and one will be chosen randomly for each tree overlay token placed in a scenario.
Script
There are two kind of overlay scripts: Overlay
and BasicOverlay
.
The difference between them is that the first one supports adding HP bars to the overlay whereas the second one only supports adding buttons for [Actions] (like the "Open" button for doors).
Traps have their own script that has to added.
The script has to be added to all object states of the overlay token (possibly with different parameters).
Within the script two parameters have to be adjusted.
The parameter for withFrameOffset
is the height where an HP bar will appear.
The parameter for withButtonPosition
is the height where a button for [Actions] will appear.
The correct position probably has to be found through testing.
For a non 3D-token a frame offset of 90
and a button position of 0.02
should work.
require("Overlays.Overlay")
.withFrameOffset(90)
.withButtonPosition(0.02)
require("Overlays.BasicOverlay")
.withButtonPosition(0.02)
Traps have their own script in order to show the damage and status they apply when triggered.
require("Overlays.Trap")
.withFrameOffset(90)
UI
Simply add the following UI script.
<Include src="Overlays/Overlay.xml" />
Again, traps have their own UI script.
<Include src="Overlays/Trap.xml" />
- Overlay Type
-
Tags required for overlays, so that the mod can move the tokens to the correct place.
Overlay Type | Tag |
---|---|
Corridor |
|
Difficult Terrain |
|
Door |
|
Hazardous Terrain |
|
Map Tile |
|
Obstacle |
|
Trap |
|
Treasure Chest |
|
Treasure
Treasure are the objects that are drawn when opening a treasure chest.
In the mod these are typically cards that show what reward the chest contains, but can be anything.
In order to support custom treasures, you simply need to add a unique name to the object and add the tag Treasure
on the object.
To draw the treasure, within a scenario, you have to add it to the [Scenario] definition using a Treasure Action.