Homebrew: Trap

From 5etools Community Wiki
Jump to: navigation, search

framless
v1.1.0

🍺Building a trap

Traps are environmental hazzards with specific actions to activate or remove their threat.

An Example:

The _Meta is normally included in a full JSON, for this example it has been removed. See the link for how to develop the _meta.
	"trap": [
		{
			"name": "Mounted Basilisk Head",
			"trapHazType": "MAG",
			"entries": [
				"This trap consists of a severed Basilisk head, kept alive through magical means, affixed near some point of importance at roughly head height. Often disguised as decor, the severed head responds to the presence of intruders, fixing them with a {@creature basilisk|mm|basilisk's} stare. The trap is harmless to any individual averting their gaze, and the DC is 15 to spot it. Should a creature aware of the trap have prior experience with basilisks, they will immediately understand the danger present. Otherwise, a creature may fail to realize the nature of the trap, and fall victim to the effects.",
				"A creature looking directly at the trap from within 30 ft. receives the effects of a {@creature basilisk|mm|basilisk's} Petrifying Gaze ability. The trap can only affect one creature at any given moment. As soon as a creature becomes petrified, the trap will switch its attention to another creature which is not paralyzed that it can see within 30 ft., if one exists."
			],
			"source": "json_in_meta"
		}
	]
Learn More
In the example; <description_of_results/fields>

Field List (Sources)

If you do not include the required fields (denoted with bold text) the JSON may pass JSONLint but will fail upon stitch.

There are two structures for Traps; the original magical and mechanical traps (From the Dungeon Master's Guide) and the Xanathar's Guide to Everything versions which outlines simple; and complex traps.


Simple Magical and Mechanical Traps (DMG structure)

Field Name Data Type Description Required
name String Name of Trap True
trapType String Either "MECH" or "MAG" True
source String json (_meta's json value) True
page Integer page number it appears upon False
entries Array of Strings description of trap & its functions True


Xanathar's Simple Trap Structure

Field Name Data Type Description Required
name String Name of Trap True
trapType String "SMPL" True
source String json (_meta's json value) True
page Integer page number it appears upon False
entries Array of Strings description of trap & its functions True
tier Integer value [1..4] True
threat Integer value [1..3] True
trigger Array of Strings description of the triggering action/mechanism True
effect Array of Strings description of what the trap does when activated True
countermeasures Array of Strings description of how to overcome or disarm the trap True


Xanathar's Complex Trap Structure

Field Name Data Type Description Required
name String Name of Trap True
trapType String "CMPX" True
source String json (_meta's json value) True
page Integer page number it appears upon False
entries Array of Strings description of trap & its functions True
tier Integer value [1..4] True
threat Integer value [1..3] True
trigger Array of Strings description of the triggering action/mechanism True
initiative Integer value [1..3] True
initativeNote String Notes on the iniative value False
eDynamic Array of Strings True
eConstant Array of Strings True
countermeasures Array of Strings description of how to overcome or disarm the trap True



πŸ—„οΈ Reference Files:
πŸ›’οΈ Requirements Specs (Schemata)
[[ |🧾 Blank Template]]
πŸ“– Sample JSON
πŸ’Ύ Functional Example
πŸ“š Repository of Other Examples


Reference Tag: (how to link to entries within the strings.)
{@trap <name> | <json_source>}


Example:
{@trap falling net} assumes DMG by default, {@trap falling portcullis|xge} can have sources added with a pipe, {@trap falling portcullis|xge|and optional link text added with another pipe} 


Homebrew Support


Known Issues
Looks like its perfect... (Did we miss anything?)


FAQ
Nothing's here (Do you have any suggestions?)
Best Practices
None as yet (Do you have any suggestions?)



Related Features



Did that answer your question(s)?

If not please check the under Support; Troubleshooting or the Known Issues page for further guidance, or go to the Discord community and leave a comment in the issues channel.

If you enjoy the project, please follow this link to see how you can contribute and help make it even better.