Skip to content

Commit 01c19f8

Browse files
author
Cazra
committed
Set trap status for tokens when the trap menu is opened for them. Updated README and script.json.
1 parent 96e132d commit 01c19f8

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

Its A Trap/3.1/ItsATrap.js

+1
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,7 @@ var ItsATrapCreationWizard = (() => {
10061006

10071007
let menu = _showMenuPanel('Trap Configuration', content);
10081008
_whisper(who, menu.toString(MENU_CSS));
1009+
trapToken.set('status_cobweb', true);
10091010
}
10101011

10111012
/**

Its A Trap/README.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
###### Updates
44

5+
_3.1_
6+
* When you open the trap creation wizard for a token, that token is automatically set to be a trap.
7+
* You can now specify whether a trap is actually a trap, a secret door, or some other hidden secret.
8+
* You can now specify which layer individual traps are revealed to (default is map layer). This deprecates the revealTrapsToMap user option.
9+
* Trap activation messages now tell you who is being targeted by the trap.
10+
* Trap properties in the menu now have tooltips to explain them.
11+
512
_3.0_
613
* Traps are now modified through a chat menu instead of editing the JSON by hand.
714
* Traps can now be disabled so that they won't activate but can still be spotted.
@@ -12,9 +19,13 @@ _3.0_
1219
* Fixed 'GM Only' output bug.
1320
* Note: Some things have been deprecated and some interfaces have been changed in this version, which is why I decided to bump up its major version. On that note, TrapThemes created for v2.X are no longer compatible. Please use v3.X TrapThemes with this new version.
1421

15-
This is a script that allows GMs to quickly and very easily set up traps on
16-
the GM layer, and detect when tokens on the objects layer move over them. This
17-
trap detection even works for tokens moving by waypoints.
22+
This is a script that allows GMs to quickly and very easily set up traps,
23+
secret doors, and other hidden things on the GM layer, and detect when tokens
24+
on the objects layer move over them. This trap detection even works for tokens
25+
moving by waypoints.
26+
27+
Combined with modules called Trap Themes, this script also allows system-specific
28+
automation of trap effects and passive perception used to spot them.
1829

1930
### Creating traps:
2031

Its A Trap/script.json

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "It's a Trap!",
33
"script": "ItsATrap.js",
4-
"version": "3.0",
5-
"previousversions": ["2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7"],
6-
"description": "# It's A Trap!\r\r###### Updates\r\r_3.0_\r* Traps are now modified through a chat menu instead of editing the JSON by hand.\r* Traps can now be disabled so that they won't activate but can still be spotted.\r* There is now an option to reveal the trap token when it is spotted. This, along with the disable option, can be used to create hidden things that are not necessarily traps such as secret doors.\r* The script exposes a TrapTheme base class.\r* The script exposes a TrapEffect class.\r* Fixed 'revealTrapsToMap' user option bug.\r* Fixed 'GM Only' output bug.\r* Note: Some things have been deprecated and some interfaces have been changed in this version, which is why I decided to bump up its major version. On that note, TrapThemes created for v2.X are no longer compatible. Please use v3.X TrapThemes with this new version.\r\rThis is a script that allows GMs to quickly and very easily set up traps on\rthe GM layer, and detect when tokens on the objects layer move over them. This\rtrap detection even works for tokens moving by waypoints.\r\r### Creating traps:\r\rPlace the token for your trap on the ```GM layer```. Give it the ```cobweb```\r<img src=\"http://game-icons.net/icons/lorc/originals/png/cobweb.png\" width=\"32\"> status marker.\rThen, select the trap token and activate its 'ItsATrap_trapCreationWizard' token macro.\rThis will present a menu for setting up the trap's configurations.\r\r### Activating traps:\r\rIf a token moves across a trap at ANY point during its movement, the trap will\rbe activated!\r\rA trap can also be manually activated by clicking the 'Activate Trap' button\rin the trap's configuration menu.\r\r### TrapThemes:\r\rTrapThemes are used to provide support for formatting messages for traps and\rautomating system-specific trap activation and passive search mechanics.\r\rIf you are using the One-Click API Library, you can specify which theme to use\rin the ```theme``` user option.\r\rBy default the ```default``` theme will be used. This is a very basic,\rsystem-agnostic TrapTheme which provides support for the basic TrapEffect properties\rand has no passive search mechanics.\r\rAdditional system-specific themes will be made available as their own API scripts.\rIf you would like to implement a TrapTheme for your system, take a look at\rthe ```default``` or ```5E-OGL``` TrapThemes as an example to get you started.\r\r### Support\r\rIf you experience any issues while using this script or the trap themes, or if\ryou have a neat suggestion for a new feature, please reply to this thread:\rhttps://app.roll20.net/forum/post/3280344/script-its-a-trap-v2-dot-3\r",
4+
"version": "3.1",
5+
"previousversions": ["2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "3.0"],
6+
"description": "# It's A Trap!\r\r###### Updates\r\r_3.1_\r* When you open the trap creation wizard for a token, that token is automatically set to be a trap.\r* You can now specify whether a trap is actually a trap, a secret door, or some other hidden secret.\r* You can now specify which layer individual traps are revealed to (default is map layer). This deprecates the revealTrapsToMap user option.\r* Trap activation messages now tell you who is being targeted by the trap.\r* Trap properties in the menu now have tooltips to explain them.\r\r_3.0_\r* Traps are now modified through a chat menu instead of editing the JSON by hand.\r* Traps can now be disabled so that they won't activate but can still be spotted.\r* There is now an option to reveal the trap token when it is spotted. This, along with the disable option, can be used to create hidden things that are not necessarily traps such as secret doors.\r* The script exposes a TrapTheme base class.\r* The script exposes a TrapEffect class.\r* Fixed 'revealTrapsToMap' user option bug.\r* Fixed 'GM Only' output bug.\r* Note: Some things have been deprecated and some interfaces have been changed in this version, which is why I decided to bump up its major version. On that note, TrapThemes created for v2.X are no longer compatible. Please use v3.X TrapThemes with this new version.\r\rThis is a script that allows GMs to quickly and very easily set up traps,\rsecret doors, and other hidden things on the GM layer, and detect when tokens\ron the objects layer move over them. This trap detection even works for tokens\rmoving by waypoints.\r\rCombined with modules called Trap Themes, this script also allows system-specific\rautomation of trap effects and passive perception used to spot them.\r\r### Creating traps:\r\rPlace the token for your trap on the ```GM layer```. Give it the ```cobweb```\r<img src=\"http://game-icons.net/icons/lorc/originals/png/cobweb.png\" width=\"32\"> status marker.\rThen, select the trap token and activate its 'ItsATrap_trapCreationWizard' token macro.\rThis will present a menu for setting up the trap's configurations.\r\r### Activating traps:\r\rIf a token moves across a trap at ANY point during its movement, the trap will\rbe activated!\r\rA trap can also be manually activated by clicking the 'Activate Trap' button\rin the trap's configuration menu.\r\r### TrapThemes:\r\rTrapThemes are used to provide support for formatting messages for traps and\rautomating system-specific trap activation and passive search mechanics.\r\rIf you are using the One-Click API Library, you can specify which theme to use\rin the ```theme``` user option.\r\rBy default the ```default``` theme will be used. This is a very basic,\rsystem-agnostic TrapTheme which provides support for the basic TrapEffect properties\rand has no passive search mechanics.\r\rAdditional system-specific themes will be made available as their own API scripts.\rIf you would like to implement a TrapTheme for your system, take a look at\rthe ```default``` or ```5E-OGL``` TrapThemes as an example to get you started.\r\r### Support\r\rIf you experience any issues while using this script or the trap themes, or if\ryou have a neat suggestion for a new feature, please reply to this thread:\rhttps://app.roll20.net/forum/post/3280344/script-its-a-trap-v2-dot-3\r",
77
"authors": "Stephen Lindberg",
88
"roll20userid": 46544,
99
"useroptions": [
@@ -13,13 +13,6 @@
1313
"default": "default",
1414
"description": "Which TrapTheme will be used for system-specific trap messages, effects, and passive searching? (Enter the theme's name provided in its README. E.g. \"5E-OGL\", \"5E-Shaped\", \"MLP-RIM-4\". \rSystem-specific themes must be installed separately from It's A Trap!.)"
1515
},
16-
{
17-
"name": "revealTrapsToMap",
18-
"type": "checkbox",
19-
"value": "true",
20-
"checked": "checked",
21-
"description": "When a trap with the bleeding-eye status is activated, it will be moved to the Map layer instead of the Objects layer."
22-
},
2316
{
2417
"name": "announcer",
2518
"type": "text",

0 commit comments

Comments
 (0)