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

Attack rolls with critical hits/critical miss attached - request

I currently use the macro: /roll 1d20 + @{Selected|WeaponBonus} for my players to roll attack dice in Roll 20. It really works great, but is there a way to make it so that if it rolls a "natural" 20 that it prints out something like, "Critical Hit!" along with the total dice roll and if it rolls a "natural" 1 it prints out "Critical Miss!" along with the total dice roll?
1421961800
The Aaron
Pro
API Scripter
It's probably not the precise answer you want, but if you use the inline roll syntax, it will outline the roll in Green if any of the dice rolled their maximum value, red if any of them rolled a 1 and blue if both occurred. (you can mouse over to see the actual roll): [[1d20+@{Selected|WeaponBonus}]]
1421961865
The Aaron
Pro
API Scripter
Additionally, since you are a Mentor, it would not be difficult to write an API Script that would detect that situation when you issue the /roll an print the message you want in a line right after the roll.
1421962073

Edited 1421962186
No, not currently (unless someone like GenKitty or Brian come along with their techno voodoo magic!). Though with the upcoming Roll Templates a form of what you want seems feasible. Also an API script would be feasible as well. Edit: D'oh... sniped by The Aaron
1421962318
The Aaron
Pro
API Scripter
BWHAHAHAHAHAHA!!! =D
Aaron, thanks! That solution is a step up, I appreciate your help!
1421962949
The Aaron
Pro
API Scripter
If you want to pursue the script method, I'd be happy to help. =D
1421963970
The Aaron
Pro
API Scripter
Ok... I lied. I'd be MORE than happy to help.. here it is: var AnnounceRoll = AnnounceRoll || (function() { 'use strict'; var version = 0.1, handleInput = function(msg) { var rolldata,out=[]; if (msg.type !== "rollresult") { return; } rolldata = JSON.parse(msg.content); _.each(rolldata.rolls,function(r){ if('R' === r.type && 20 === r.sides) { _.each(r.results, function(roll){ switch(roll.v) { case 1: out.push('<div style="color: #990000;font-weight: bold">Fumble!</div>'); break; case 20: out.push('<div style="color: #009900;font-weight: bold">Critical!</div>'); break; } }); } }); if(out.length) { sendChat('',out.join('')); } }, registerEventHandlers = function() { on('chat:message', handleInput); }; return { RegisterEventHandlers: registerEventHandlers }; }()); on('ready',function() { 'use strict'; AnnounceRoll.RegisterEventHandlers(); });
Thank you Aaron! It works great. :)
If you want a non-API version of this with the base Macro system, I use a variation on the following: /me grips his GreatSword firmly and swings Powerfully! Attack:[[1d20 + 5[AttackBonus] -1[PowerAttack] + ?{Misc Bonus/Penalty?|0}[Misc. Bonus] ]] for [[2d6 + 6[STR*1.5] + 3[PowerAttack] + ?{Damage Bonus?|0}[Damage Bonus] ]] Dmg .....Crit Threat if ≥ [[0d0 +19[Crit Range] + 5[AttackBonus] -1[PowerAttack] + ?{Misc Bonus/Penalty?|0}[Misc. Bonus] ]]/x2 .......Confirm:[[1d20 + 5[AttackBonus] -1[PowerAttack] + ?{Misc Bonus/Penalty?|0}[Misc. Bonus] ]] for addt'l [[2d6 + 6[STR*1.5] + 3[PowerAttack] + ?{Damage Bonus?|0}[Damage Bonus] ]] Which gives you output like this :
This looks awesome Mark. I am going to copy/paste this into my notes for the future. Thanks again!
1421975133
Gen Kitty
Forum Champion
There's something that can simplify this macro a bit. A few months back, roll20 added a 'reroll once' mechanic. So for Mark's macro, it could be done as: /me grips his GreatSword firmly and swings powerfully! Attack:[[1d20ro>19 + 5[AttackBonus] -1[PowerAttack] + ?{Misc Bonus/Penalty?|0}[Misc. Bonus] ]] for [[2d6 + 6[STR*1.5] + 3[PowerAttack] + ?{Damage Bonus?|0}[Damage Bonus] ]] Dmg .......If Crit: addt'l [[2d6 + 6[STR*1.5] + 3[PowerAttack] + ?{Damage Bonus?|0}[Damage Bonus] ]] If the attack die rolls a 19 or 20, the die will reroll just once and the new die will appear in the place of the old as far as the tital is concerned. If you mouse-over the result, however, you'll see the 19 or 20 if it was rolled. Keep in mind: the green box will only show on a 20, it will not show on a 19. Not yet, anyway.
Hiya Gen, I'm losing you on your logic there and I think I'm just not understanding correctly. If the initial attack rolls a 19 or 20, if you have it automatically re-roll, won't you only see the final result without knowing that it rerolled? If you have to mouse over the roll there's no need for the "Crit Threat" part, but having it on the screen makes it immediately visible if it's a threat or not. It could boil down to personal preference, but i just want to make sure I'm not misunderstanding.
1421997012
Gen Kitty
Forum Champion
Here's what my macro version looks like in action, without and with mouseover: (I changed it briefly to reroll anything equal to or greater than 1 because I got tired of waiting for a 19 to roll :P ) It is mainly a personal preference, but yeah, you HAVE to mouse-over the number to see if a 19 was rolled. I don't think the 'critical success' flag available for roll-templates has made it into the general dice mechanic, nor have I heard if it will get into the general dice mechanic. The main reasons I shifted from your original macro (which is what I used to use) to the this one were a) I'm at less risk of making mistakes with my macro when copying everything over to make a 'Crits on [[BLAH]]+' area, and b) it looks more elegant to me. As i said, personal preference. These days I use Powercards, so my crits are always highlighted, no matter the range :>