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 .
×
Create a free account

Dark Gifts - Trigger on Crit Success or Crit Fail

Hey ScriptMasters, One day I will sit down and learn .json but until then I fall upon your graces for aid. Is there a way to have an API (or macro I suppose, but figured API would be better) trigger a Dark Gift when a character rolls a 1 or a 20? I'm finding it's the easiest thing forgotten and this could be kind of fun to have trigger. But I suppose the script would need to look for a Dark Gift on a sheet or it will just activate any time a 1 or 20 is rolled. Maybe that makes it impossible...
1628602627
GiGs
Pro
Sheet Author
API Scripter
It's impossible for a macro, but an API script could do it. I don't know what a Dark Gift is, so I can't help you there, but a script can monitor rolls and do things when stated numbers are rolled.
1628603809

Edited 1628603847
Styx
Pro
Dark Gifts officially came through Van Richten's Guide to Ravenloft and here is an example: So, roll is a 1, immediately a D4 is rolled and the results are shown. There's other criteria in this example that are required to trigger, but at least that becomes a reminder. I guess it could be done with an inline macro that's clickable if the other criteria apply
1628612421
timmaugh
Pro
API Scripter
You can handle that with a custom API, for sure, but you can also set it up with metascripts. Plugger has a plugin to let you detect dice values in a given roll (you'd be looking for a 1). Plugger also lets you launch a second command line while in the first (so your attack roll would launch a call to this Dark Gifts process) APILogic would let you choose to run a given command line if the dice value matched Muler could let you have your Dark Gifts table set up to get the text you want to send to the chat interface ZeroFrame would let you recursively condense inline rolls or other Muler calls until you have your final output Last, I would use something like DiscreteWhisper to send the output message. I might be able to demonstrate a quick/dirty example, but first a question: are you looking to get a prompt of the text of the Gift (like the Ominous Will entry, above), or are you looking specifically to have the d4 rolled when the affected action is taken? Also, you would roll the d4 immediately upon rolling the 1? ... you wouldn't wait until the next character that satisfied the requirements took an action, so that they wouldn't know whether they were getting help or hindrance?
timmaugh said: You can handle that with a custom API, for sure, but you can also set it up with metascripts. Plugger has a plugin to let you detect dice values in a given roll (you'd be looking for a 1). Plugger also lets you launch a second command line while in the first (so your attack roll would launch a call to this Dark Gifts process) APILogic would let you choose to run a given command line if the dice value matched Muler could let you have your Dark Gifts table set up to get the text you want to send to the chat interface ZeroFrame would let you recursively condense inline rolls or other Muler calls until you have your final output Last, I would use something like DiscreteWhisper to send the output message. I might be able to demonstrate a quick/dirty example, but first a question: are you looking to get a prompt of the text of the Gift (like the Ominous Will entry, above), or are you looking specifically to have the d4 rolled when the affected action is taken? Also, you would roll the d4 immediately upon rolling the 1? ... you wouldn't wait until the next character that satisfied the requirements took an action, so that they wouldn't know whether they were getting help or hindrance? In the example for Ominous Will, it would have to fulfill the secondary requirements first, but therein lies another compounding issue - each one has different criteria. If the dice roll of 1 then added an inline macro that allowed the player to activate it once the secondary requirements were fulfilled, at least then it plays like a reminder. I guess a similar example would be Orcish Fury or Psi Strike, or even Paladin Smites, where you choose to roll additional damage, therefore also impacted by crits  The more I think about it, the more I see variables that are situational.