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

Nat 1 or Nat 20 Macro/API

Hey, I'm looking for something that will auto-roll the critical or fumble API when a weapon attack is made. Still new to setting up and using Macros and APIs so details would be appreciated.
1673896075
timmaugh
Pro
API Scripter
Short of a dedicated script that can accomplish this, you have a couple of options. ScriptCards is an API that can let you craft your own output with conditionals, loops, etc. It's like a functional language in your command line where the ScriptCards script handles the parsing and interpretation for you. Another option would be metascripts, which work in an existing command line (for either another script or something you intend for the chat panel). A metascript options might look like this, using the default template: !&{template:default}{{name=Proof of Concept}}{{Roll=[[1d20]]}}{&if $[[0]].value = 1}{{Fumble Roll=@{selected|fumble_attribute}}}{&elseif $[[0]].value = 20}{{Critical Roll=@{selected|critical_attribute}}}{&end}{&simple} Of course, you can change the source of the fumble or critical roll (I used attributes of a particular name; you could just use an inline roll). Using the above, when I get a result of 2-19, I get a single line in the template. When I get a 1 or a 20, I get the extra line. Here is an example:
1673896608
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Customizable Roll Listener script might also be worth looking into.