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

Critical Roll Script

I see on Character sheets that if you roll from there the script that fires willl roll additional Critical dmg if you have a critical success. How do I do this in a macro. And if it can be done can I have it output a message on Critical Fail? Not just change the color?
You can't unless you use a roll template or api script.
Im currently trying to learn how to use your Power Card. I just need to figure out the method behind it. Like where to put in what. Can I use your power card script to do Tables? I think Im asking the right question, in C language was called them Switches.
PowerCards only allows for basic if/else statements using conditionals. Depending on how complex your critical roll game mechanics are, it might be better to write a script that pre-processes the rolls and then sends that information to PowerCards to be displayed in chat. What all are you trying to do?
I got my critical situation worked out, now I was wondering how to add random emotes if I can?
1454683996

Edited 1454684440
Ziechael
Forum Champion
Sheet Author
API Scripter
You could use the --emote| tag combined with rollable tables for example: --emote|Shawn asks [[1t[type]]] question Where you have a table (called type) set up with the following entries: an interesting, a curious, a critical, a useful to get the potential output of: Shawn asks an interesting question. :)
1454688360

Edited 1454688388
[quote] !power {{ --emote|Hobgoblin Captian, releases a blood thirsty roar! --name|Basic Attack --leftsub|Maul --rightsub|Range Melee --Attack:|[[ [$Atk] 1d20 + 4 [Str Mod] + 2 [Proficiency] ]] vs AC --?? $Atk.base == 1 OR $Atk.total < [[@{target|AC}]] ?? !Miss:|You missed. --?? $Atk.total >= [[@{target|AC}]] AND $Atk.base <> 1 AND $Atk.base <> 20 ?? Hit:|[[1d12 + 3]] slashing damage --?? $Atk.base == 20 ?? Critical Hit:|[[2d12 + 4]] Bludgeoning damage }} [/quote] How do I take this and instead of showing the miss, have it roll a Critical Fail table I created called CFM?
1454689267

Edited 1454689285
Ziechael
Forum Champion
Sheet Author
API Scripter
Shawn M. said: !power {{ --emote|Hobgoblin Captian, releases a blood thirsty roar! --name|Basic Attack --leftsub|Maul --rightsub|Range Melee --Attack:|[[ [$Atk] 1d20 + 4 [Str Mod] + 2 [Proficiency] ]] vs AC --?? $Atk.base == 1 OR $Atk.total < [[@{target|AC}]] ?? !Miss:|You missed. --?? $Atk.total >= [[@{target|AC}]] AND $Atk.base <> 1 AND $Atk.base <> 20 ?? Hit:|[[1d12 + 3]] slashing damage --?? $Atk.base == 20 ?? Critical Hit:|[[2d12 + 4]] Bludgeoning damage }} How do I take this and instead of showing the miss, have it roll a Critical Fail table I created called CFM? Pretty much as you have but call the table as i mentioned for the emote, i'd also consider adding an additional line to confirm the critical fail otherwise you'll be getting them for every failure to hit but since i'm a 3.5e dinosaur and not familiar with your system i won't code it in: !power {{ --emote|Hobgoblin Captain, releases a blood thirsty roar!  --name|Basic Attack --leftsub|Maul --rightsub|Range Melee --Attack:|[[ [$Atk] 1d20 + 4 [Str Mod] + 2 [Proficiency] ]] vs AC --?? $Atk.base == 1 OR $Atk.total < [[@{target|AC}]] ?? !Miss:| [[1t[CFM]]] --?? $Atk.total >= [[@{target|AC}]] AND $Atk.base <> 1 AND $Atk.base <> 20 ?? Hit:|[[1d12 + 3]] slashing damage --?? $Atk.base == 20 ?? Critical Hit:|[[2d12 + 4]] Bludgeoning damage }}
Add [TXT] to the table roll like this: [[ [TXT] 1t[CFM] ]] if you want the text from the table to appear as just text and not an inline roll.
See problem is it does it when ever it fails to hit period, I just want critical fails (roll natural 1). When I remove the part that does the or it starts skipping the line all together. 
Sorry I didnt realize I forgot to clarify the core issue. I understood how to roll the table just couldnt get it to do it on a critical fail only.
1454701646
Silvyre
Forum Champion
Try this out: !power {{ --emote|Hobgoblin Captian, releases a blood thirsty roar! --name|Basic Attack --leftsub|Maul --rightsub|Range Melee --Attack:|[[ [$Atk] 1d20 + 4 [Str Mod] + 2 [Proficiency] ]] vs AC --?? $Atk.total < [[@{target|AC}]] AND $Atk.base <> 1 ?? !Miss:|You missed. --?? $Atk.base == 1 ?? Critical Fail:|[[1t[CFM]]] --?? $Atk.total >= [[@{target|AC}]] AND $Atk.base <> 1 AND $Atk.base <> 20 ?? Hit:|[[1d12 + 3]] slashing damage --?? $Atk.base == 20 ?? Critical Hit:|[[2d12 + 4]] Bludgeoning damage }}
Thank you. Now if I wanted my players to use this instead of the char sheet attack roll, is there a way to change it on the char sheet or do I need to just add it to the abilities section and make them use it? Also if I do put it on the abilities section is there a call to weapon slot I can use to get the info to fill in the fields or do i need to make blanks for them and have them fill them in themselves.
1454712177
Ziechael
Forum Champion
Sheet Author
API Scripter
Shawn, you'll want to let the community know which sheet you are using in your game. Some sheets, like Diana's 3.5e one, have visible sections that allow users to change the default macros used by the built in roll buttons... others do not but may have a way to do just that regardless.
The 5e sheets are not macro friendly in regards to being able to substitute your own templates or macros. You pretty much have to tell at your players each time they use the character sheet buttons instead of the power card macros.
ok thanks guys, yall have been a super big help. And HoneyBader power cards is awesome thanks for adding that functionality.