-
Notifications
You must be signed in to change notification settings - Fork 1
WIP Do you want to build a campfire
This page will walkthrough various levels of building a campfire, starting at extremely basic, and going well past what's actually needed for your average campfire.
These first few steps are basic options you can use to configure your tile.
- On the Setup tab, remove any existing trigger and add the
Double-Click
trigger. - Add your images to the
Images
tab. In my example here, the first image is the unlit one, while the second image is the lit one.- If you use this same image order, take the time to swap to the lights layer and turn the light off so that the image and the light are synced.
- Add a Switch Tile Image, targeting the tile itself. For now, leave the
Change to
field onnext
. - Add an Activate/Deactivate action; this example Uses Tagger to target a light that has the matching tag
Light
on it. Change theState
dropdown toToggle
for now.
Now the tile image should be synced up with the light and your campfire has a basic on/off button.
What if you don't want your players controlling the campfire from all the way across the map? Then add a Filter Tokens by Distance.
- Add the Filter Tokens by Distance at the top of the action thread; while you can use
Current Token
at this stage, it should be targeting theTriggering Token
to future proof this action, and just to make it a habit. Leave the other settings of this filter on the defaults for now.
Now we're going to branch the action flow; if there isn't a triggering token close enough to the tile, it will instead send that player a notification.
- Change your Filter Tokens by Distance's
Continue If
dropdown toAlways Continue
. - Add a Check Entity Count into the action list after the distance filter; it needs to be
Current Tokens
here, to tell the action flow to see if aCurrent Token
exists that made it through the previous filter.- The count field should stay at
> 0
. - The
Go To
field should be the name of a Landing that the action list will go to if the count isn't found. Capitalization and symbols matter.
- The count field should stay at
- Add a Landing at the end of the action thread.
- Check the
Stop When Reached in Code
box on the landing; this makes the landing create an entirely new action thread, instead of being an extension of the original one above it.
- Check the
- Add a Send Notification in the new action thread created by this landing.
For the final beginner step, we're going to add an Auto-Landing that allows the Gamemaster to skip the distance filter so that they can toggle the fire even without controlling a token nearby.
The GM will always start at this landing when triggering the tile in this setup, as it is the first valid auto-landing in this action sequencing for them.
- Add another Landing below the Check Entity Count.
- Name it
_gm
; this auto-landing will cause any Gamemaster level users to automatically start in the action list at this point and skip the distance filter. - Leave
Stop When Reached in Code
unchecked this time; this will allow the action thread to continue from above.
- Name it
Adding various filters and jumps to complicate things. The action list view will be imitated using multiple tile windows due to the size limit of the window.
Now let's add different dialogs with options depending on the current state of the campfire.
- Add a Jump to Landing below the
_gm
auto-landing. This needs to be named{{tile.flags.monks-active-tiles.fileindex}}
to make use of Handlebar Expressions. When this jump is reached in the code, the handlebar expression will be replaced with this tile's file index value, which will be either 0 (for the first, unlit image) or 1 (for the second, lit image).- While the images start being numbered at
1
for the purposes of Switch Tile Image, due to how arrays work in code, the first image is actually number0
here, and the second image is1
. -
{{tile.flags.monks-active-tiles.fileindex
thetile.
part tells the expression to look at the tile, whileflags.monks-active-tiles.fileindex}}
is the flag whose value is being used here.
- While the images start being numbered at
- Add another Landing and name it
0
. This will be the landing that is jumped to when the campfire is unlit.- It does not matter whether
Stop When Reached in Code
is checked in this instance, as it will never be reached by following the code normally as the jump just above it redirects the code.
- It does not matter whether
- Place a Show Dialog in this action thread.
- Use the
Custom
type in the Dialog Type dropdown. - Use
Add Buttons
to add two buttons; the "Light the fire" one should include a Landing name that matches the landing we'll be adding later. The "Do nothing" button can leave the landing name blank, as it doesn't need to go anywhere.
- Use the
- Add another Landing and name it
0
. This will be the landing that is jumped to when the "Light the fire" button is pressed in the previous dialog.-
Stop When Reached in Code
does matter here; otherwise if the dialog is closed without making a choice the action thread will continue down from the dialog and light the campfire.
-
- Move your Activate/Deactivate and Switch Tile Image to this "Light" landing.
- Change the Switch Tile Image from
next
to2
to match the images tab. - Change the Activate/Deactivate from
Toggle
toActivate
,
- Change the Switch Tile Image from
- Repeat steps 2 through 5, adjusting names & settings to instead extinguish the campfire.
- Add a Filter by Items in Inventory underneath the "Light" landing; this should again be
Triggering Token
. - Follow it up with another Check Entity Count; this should once again be
Current Tokens
.- The
Go To
field needs to include the name of the landing being created in step 3.
- The
- Add another Landing at the end, then put another Send Notification here to warn the user they lack the item needed to start the fire.
- Make sure the name matches the Check Entity Count from step 2.
-
Stop When Reached in Code
should be checked, otherwise the "Not Close Enough" action thread will continue into this one.
- Optional. Add the same kind of filter setup to the "Extinguish" landing to make sure your players actually have water to put the fire out.
If we want the Gamemaster to be able to bypass the item filter we just added, Redirect Based on Player Type will need to be used here.
- Add a Redirect Based on Player Type under the "Light" landing.
-
GM Redirect
needs to go to a landing that will be placed after the Filter by Item & it's Check Entity Count. -
Player Redirect
needs to go to a landing that will be placed before the Filter & Check.
-
- Add the landings in their respective locations.
-
Stop When Reached in Code
cannot be checked on on theGM Redirect
landing; thePlayer Redirect
landing does not matter either way if your setup matches what is shown here.
-
We're going to add some Set Active Tile Variable in the "Light" & "Extinguish" action threads to prepare for a later step.
- Add your Set Active Tile Variable for each action thread.
- "Light" should set it to
= 1
. - "Extinguish" should set it to
= 0
.
- "Light" should set it to
Maybe your players have access to chemicals or a magic item that allows them to change the fire color; let's add that option to the dialog that shows while the fire is burning.
- Go to the Show Dialog action underneath the "1" landing, and add a third button to jump to a "Color" landing.
- Create a new landing, "Color" at the end of the action list.
- Underneath "Color", add another Show Dialog.
- This one's content field needs to contain the following HTML:
<form>
<div>Please select the color for your fire.</div>
<div class="flexrow">
<input type="color" name="hexcode" />
</form>
- Add an Alter action following the Show Dialog.
- The attribute here needs to be
config.color
(As of time of this writing in V11). - The value field needs to be
= "{{value.hexcode}}"
to use the value provided by the dialog's input.
- The attribute here needs to be
If you have module questions or concerns, please feel free to contact me on Discord. ironmonk88
This wiki is being maintained by crow_guard. If you have questions, want to see something added to the wiki, find a broken link or out-dated information, just message me and I'll fix it.
Or come over to Ironmonk's Discord channel. https://discord.gg/MStYmeRfn3
If you like Monk's mods and feel like being generous, stop by Monk's Patreon.
Not necessary but definitely appreciated.
If you find the wiki helpful and feel like being generous, stop by Crow's Ko-Fi.
Also not necessary but greatly appreciated.
Many of the assets shown in the tutorial images & GIFs are from https://www.forgotten-adventures.net/.
- Always HP
- Breaktime
- Enhanced Terrain Layer
- Monk's Active Tile Triggers
- Monk's Bloodsplats
- Monk's Chat Timer
- Monk's Combat Details
- Monk's Combat Marker
- Monk's Common Display
- Monk's Enhanced Journal
- Monk's Hotbar Expansion
- Monk's Little Details
- Monk's PF2E Encounter Aftermath
- Monk's Player Settings
- Monk's Scene Navigation
- Monk's Shops
- Monk's Sound Enhancements
- Monk's Tokenbar
- Monk's Wall Enhancement
- Multiple Document Selection