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

Frustrated Noob - Adding crits to rolls

I'm not using any prebuilt character sheets as my game doesn't use any known game system. It's all custom built.  All I want to do is to be able to roll my crit table on a crit, and roll crit miss table on a crit, without having to manually click another macro after seeing what comes up.  I've looked at some of the other posts here and I suspect the only solution is to upgrade to pro and do some coding.  PLEASE tell me I can do it at Plus with macros or somesuch.  Can anyone break my expectation of "not possible"?
Without API from Pro subscription, there's no way to get Roll20 to register a critical roll outside a pre-coded system in any way other than "look, it's green since it was a critical success." The only way to do it with only macros is to build macros that will roll damage separately from the attack rolls and prompt them to ask if the attack was a critical.
1589637124

Edited 1589637164
GiGs
Pro
Sheet Author
API Scripter
If you create a macro for each of your crit success and fail tables, you can output a button with each attack that allows players to click to roll on the table direct from chat. Say for simplicity your current attack macro is /roll 1d20+5 Now you create a critical hit macro, called critical-hit , and a fumble macro called fumble You can add buttons to launch these so your attack macro would now look like /roll 1d20+5 [Critical]( !&amp;#13;#critical-hit ) [Fumble]( !&amp;#13;#fumble ) Now whenever players attack, they get a button labelled Critical, and another labeled Fumble, and can click on them immediately after seeing their roll result, to roll the relevant table. This is probably the best you can do without a Pro subscription. And to be honest, it's a pretty good solution. You don't actually need to have it roll automatically. Players seeing they've rolled a crit or a fumble, then having a tiny delay before they click the button, builds anticipation. It makes those rolls more interesting. Buttons like these are covered in the wiki here:&nbsp; <a href="https://wiki.roll20.net/API:Chat#API_Command_Buttons" rel="nofollow">https://wiki.roll20.net/API:Chat#API_Command_Buttons</a>
I've only played once online so far but everyone in my group just added the crit roll to macros for each of their weapons. We're using a modified ruleset based on D&amp;D 3.5 and Pathfinder. In our system, every weapon has a potential critical range so a Scimitar's might be on rolls of 18 to 20, a Great Club's might be only on a 20. Then, to see if it is in fact a critical, another To Hit is rolled and if that registers as a hit, then it's a critical So, for example, my character Tonkatsu uses a Great Club. His normal attack macro looks like the following: Tonkatsu's Great Club hits AC [[d20+4cf&lt;1cs&gt;20]] (crit check: [[d20+4]]) Damage: [[1d10+3]]. Triggering that macro might bring back a result like: "Tonkastu's Great Club hits AC 14 (crit check: 9) Damage: 7." The double square brackets in the macro hides the formula in the results and keeps the chat screen neater, but if you mouse over the calculated result you will see the formula and actual rolls. The first AC (To Hit) formula adds Tonkatsu's attack modifier to a d20 roll. That bonus is ignored by the "cf" and "cs" part of the macro (I think! The bonus can go after the "cs" part as well). The "cf&lt;1" and "cs&gt;20" parts of the formula determine Critical Fail equal to or less than one, and Critical Success equal to or greater than 20. If my weapon had a 19-20 critical rating then then I'd use "cs&gt;19" instead. Crit Fails will be outlined in red, Crit Success will be outlined in green. The "crit check" equation is a separate roll made on every attack but ONLY used if there is a Critical Success on the AC roll. The "Damage" roll is just normal damage. If I roll a critical I do the math based on that just in my head because it's simple enough. ========= Example ========== Assume my foe has an AC of 16. I press the attack macro button and get the following results: Tonkastu's Great Club hits AC 24 (crit check: 18) Damage: 10. The 24 will be highlighted green and if I mouse over the number I'll see "d20+4 (20)+4=24". So I look at my crit check roll and see that, yes, it does hit an AC 16, so it's a Crit. Now, my damage roll is just standard damage. Mousing over the number I see the following: "d10+3 (7)+3=10". In our system, critical hits do double the BASE damage only with the STR mod added on top. So in my head I calculate (7*2)=14, plus 3" I do 17 damage. =============== One of my fellow players added a formula for critical damage as well to his attack macros but of course it's a whole different roll so you can see situations where his damage roll for non-criticals are higher than his damage for the critical (RNGesus is not always kind). That's not really a problem but it's psychologically demoralizing!
1589669056

Edited 1589669308
Thanks all. That's about what I was expecting, however GIGS, thanks a lot. I was unaware you could stuff button calls into a macro like that.&nbsp; I'll give that a try after I have breakfast.I dont recognize most of what you have in that line, but some of it is obvious.&nbsp; /roll 1d20+5 [Critical]( !&amp;#13;#critical-hit ) [Fumble]( !&amp;#13;#fumble ) What does the "!&amp;#13;" stand for?&nbsp; The rest I've figured out, and THANKS, that's not what I wanted but a LOT closer.
1589676386

Edited 1589690293
GiGs
Pro
Sheet Author
API Scripter
The ! part is meant for API scripts (Pro subscriber feature) - these buttons are meant to be used for the API, but users found a way to hack them for normal macro and abilities. Explaining what it does is tricky, because it builds on several different bits of arcane roll20 lore. Firstly, commands of this nature [something](something else) are intended to be used by the api. The square bracket contains a visible label, the round brackets contain an API command. API commands must begin with !, and be a single line. Roll20 treats any lines that start with ! differently - they get sent to chat, where they are intercepted by the API engine and so dont actually appear in the chat. So if you did this: !#Macro That macro trigger #Macro would appear to be ignored - it gets intercepted by the API before the dice engine can act on it. Thats where this comes in &amp;#13; In html, every character can be represented by a html entity , which is a weird string of characters like&nbsp; &amp;#13; &nbsp;This particular set of characters represents a line break. Now you cant do this [Critical](! #critical-hit) because that linebreak breaks the button. But the html entity doesnt actually get treated as a line break until the roll20 parsing engine acts on it, and it does that before the API engine intercepts the call. So you have this: [Critical]( !&amp;#13;#critical-hit ) .At this point, the bit in ( ) is just text. Roll20 doesnt do anything with it. Then a player clicks the button and several things happen: First, the roll20 engine reads the text, sees the html entity and processes it into a line break. Now it has the text ! #critical-hit So thats a two line macro, which the roll20 engine can handle, and acts on each line in turn. The first line starts with !, so gets sent to the API engine. But its empty so it doesnt do anything. The second line is a standard macro call, which gets run now. The html entity exploits the way roll20 parses text sent to chat: the contents of a command button are left completely alone until someone clicks on the button, and then the magic happens. I hope that helps understand. It is pretty weird :)
Awesome, thank you.&nbsp; I haven't coded in about 30 years and never touched HTML, but I DID code. So, yes, I followed your well written explanation. Thank you very much.
1589690214
GiGs
Pro
Sheet Author
API Scripter
Great!