Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Our team is currently investigating issues loading into the VTT.
Create a free account

Daggerheart Script - Fear Tracker

1751760593

Edited 1755819536
Orbotik
Pro
API Scripter
This is my attempt &nbsp;( GitHub ) at an automatic fear tracker. This script is now available in the Mod Library! Check it out: "Daggerheart Fear AutoTracker" - this will help your game stay up-to-date with the latest features and fixes! Summary This fear tracker listens for duality rolls from Demiplane-linked character sheets and bumps up a game fear counter everytime someone rolls with fear. It sends notices to all players showing the new fear value either as player-enabled whispers or chat announcements (or none), and can even update text objects on the maps with fear values! Registered text objects have some creative options ("text modes", see&nbsp; !fear text [...] &nbsp;below) for showing the current fear amounts: Cmd Description !fear Reports the current fear counter value. !fear [on/off] Turns fear notices on or off (you only). Specifically, when a Demiplane duality roll with fear is detected, you will be sent a whisper by the game of the new fear counter value (if on). The default is&nbsp;on&nbsp;for all players. !fear spend [number] GM-only. &nbsp;Decreases the fear counter by 1, or optionally a specific number (to a minimum of 0). !fear gain [number] GM-only. &nbsp;Increases the fear counter by 1, or optionally a specific number (to a maximum of 12). !fear set [number] GM-only. &nbsp;Sets the fear to any number (0-999). !fear text {id} GM-only. &nbsp;Registers a text object to be updated with fear amount as it changes. The&nbsp;{id}&nbsp;is optional, and if omitted will set the selected text object. To stop the updating on a specific object, run the command again. !fear text prefix [text] GM-only. Specify (quoted) text to appear before the fear counter in text objects. !fear text suffix [text] GM-only. Specify (quoted) text to appear after the fear counter in text objects. !fear text [tally/circled/bar/ dots/skulls/number] GM-only. &nbsp;Switches how the fear count is displayed in the text objects. !fear text update GM-only. Force the registered text objects to update with the current settings and fear value. This also lists the IDs of any registered text objects. !fear text monospace {id} GM-only. &nbsp; Sets the currently selected or specified (by ID) text object to use a fixed-width predictable font. !fear text spacefill [on/off] GM-only. &nbsp; Ensures the a uniform text length in text objects even when the fear value is low by filling unused character spots with a space. Paired with the monospace command this can help prevent the text objects from "jumping around" horizontally. !fear announce [on/off] GM-only.&nbsp; Globally sets announcements to&nbsp;all&nbsp;players on or off when the fear amount changes. !fear whispers [on/off] GM-only. &nbsp;Globally sets whispers to players on or off when the fear amount changes. !fear reset GM-only. &nbsp;Resets the fear counter to&nbsp;0. !fear reset objects GM-only. &nbsp;Clears all fear-tracking object registrations. !fear reset known GM-only. &nbsp;Clears the known player list (players will re-receive the welcome message). If whispers or announces are enabled, then users will see messages like the following at certain fear changes &amp; thresholds: Fear has increased! Fear has been reduced ! Have no fear. &nbsp;There is none to be had (0). There is a single fear (1). There is some fear (2-3). There is much fear (4-6). There is strong fear (7-9). There is intense fear (10-11). There is maximum fear (12). Notes The Reaction Roll in Daggerheart say to use your duality dice, but it doesn't generate hope/fear. So it's not really a Duality dice roll . To avoid the Fear counter updating on this type of roll - instruct your players to do a "custom roll" of 2d12s rather than a Duality roll on their Demiplane character sheet and add their trait mod. This is a technically &nbsp;more correct dice roll anyways for Reaction Rolls.&nbsp; ⊂(◉‿◉)つ Also- this approach gives you an excuse to teach your players how to use the custom roll feature on the sheet. If you'd like, I have a suggestion open on Demiplane to better account for this - you are welcome to bump it if you'd like:&nbsp; <a href="https://forums.demiplane.com/t/feature-request-reaction-rolls-via-trait-roll-toggle/4940" rel="nofollow">https://forums.demiplane.com/t/feature-request-reaction-rolls-via-trait-roll-toggle/4940</a>
1752103115
Orbotik
Pro
API Scripter
v1.0.1 Updates Notices now use a skull emoji before the word "Fear". New "spend" command for GMs to do a simple fear spend. !fear spend will deduct 1 fear from the counter then notify players. !fear spend 5 will deduct 5 fear (to a minimum of 0) and notify players.
Nice idea. I have been thinking about fear counters too, but have no preference yet. Just make a few macro buttons and as a GM you can spend fear with the click of a button. In a video the turn order is used to track fear&nbsp; <a href="https://m.youtube.com/watch?v=KXo8YWlia4E" rel="nofollow">https://m.youtube.com/watch?v=KXo8YWlia4E</a> . If you would integrate with the turnorder that might make the fear counter display more prominent on the screen. Or you could use a token with a changing image. A token can be moved anywhere you like on the map.&nbsp; Or a row/columns of tokens as a kind of stack that are moved between gmlayer and token layer. So many possibilities, but i like your solution a lot.
1754118317
Orbotik
Pro
API Scripter
v1.0.3 Updates Major refactor and bug fixes. Supports "announce" or "whisper" modes to either announce in all-player chat or whisper to each player individually (which they can each toggle on/off). Now supports updating text objects in-game with a variety of counter styles: tallies, skulls, dots, bar, circled numbers, and just plain numbers.
1754197731
Orbotik
Pro
API Scripter
v1.0.5 Updates Add support for prefixes and suffixes to text objects that auto-update on fear change. Add new text update command to force an update to all registered text objects (and list their IDs). Add new text spacefill &nbsp;command to turn filling unused text in text objects with a space (to maintain a consistent object size). Add new&nbsp; text monospace &nbsp;command to turn the font of a text object into monospace so the width is consistent. Add workaround for Roll20 empty text object bug. Fix version upgrade bug.
How would I go about setting the text object with the skull? I really like that imagery and would love for it to show to my players. The listener is absolutely outstanding, by the way.
1755798993

Edited 1755800170
Orbotik
Pro
API Scripter
The easiest way is to drop a text object onto your map, maybe plug some random text. Get the font and color how you like. Then while the text object is selected, run !fear text ^ this will register the selected text object for tracking and show the current fear. To show skulls (now default) you can switch the display mode explicitly by !fear text skulls The skulls and other symbols are "emojis" in text so the look may vary depending on your OS and system fonts. The next major update will support actual token+graphics, which will really let you use any tokens as fear imagery- and all players will see a consistent look, but it's not quite ready yet. I also, personally, love to prefix the skulls with the word "Fear"- if you'd like to do this too, you just need to run: !fear text prefix "Fear" At any time, if you want to test it out or macro it, there's !fear spend and !fear gain &nbsp;which will quickly add/deduct fear manually. If you need to debug,&nbsp; !fear text update will force all registered text objects to update, and list the object IDs that are registered. Hope that helps, my Github has a full table of all the commands and description (like the first post) if you want to see other options. <a href="https://github.com/orbotik/roll20-scripts?tab=readme-ov-file#daggerhear-fear-autotracker" rel="nofollow">https://github.com/orbotik/roll20-scripts?tab=readme-ov-file#daggerhear-fear-autotracker</a>
Thank you so much! This was perfect.
Very late to the party on seeing this but this is AMAZING!!!! Thank you for making it!!!
1756174758
Orbotik
Pro
API Scripter
Josh R. said: Thank you so much! This was perfect. Meredith said: Very late to the party on seeing this but this is AMAZING!!!! Thank you for making it!!! Thanks both- I'm happy to share and participate!