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 .
×
May your rolls be chill this holiday season!
Create a free account

Conditional critical success inline

For my D&D campaign I've got it setup so that the damage macro will calculate the damage, reduce it by an amount (1d26-1) and then use a success counter of 1d100 to determine if it should be multiplied by 1.5 (so [[ ((dmg) * reduction) * [[critical]] ]]) However i've been having trouble figuring out how to get it so that the critical chance is what determines if it is a critical success or not. Any advice on how to get it done if it is at all possible?
1563261119
Ziechael
Forum Champion
Sheet Author
API Scripter
What result is needed on the d100 to determine a crit? Also your example has the damage multiplied by the reduction, I’m assuming this shoe be a - rather than a *. This should be doable however... when I’m not on my phone I’ll provide examples :)
Ziechael said: What result is needed on the d100 to determine a crit? Also your example has the damage multiplied by the reduction 75+ is currently the planned requirement for the crtiical to be successful, as for the reduction, I've been converting it into a decimal between 1 and 0.75 Also, I thought the critical success stuff works based on the end number, not what a dice roll results in, and also needs to be placed at the end of the most outter layer [[ ]], which means I can't stick it in where the success counter would be.
1563286311

Edited 1563286376
Ziechael
Forum Champion
Sheet Author
API Scripter
Ah ok, cool. [[ [[ (1d8 + @{strength_mod}) * [[(100-(1d26-1))/100]] ]] * [[{1,[[[[1d100> 75 ]]*1.5]]}kh1]] ]] The bold bit would be your current damage calculation, the italicised bit should give your decimalised deduction (you may need to add some rounding to this bit unless you work with fractions of HP?). The underlined bit is your crit target, this could be replaced with a query or attribute call in the event of a variable being used to determine a crit. On a mouse hover of the result you'll get your calculated damage (post reduction) roll on the left and a 1 or 1.5 depending on if a crit was achieved on the right. Does that cover your needs? Could likely be refined further but I'm in a meeting... :/
1563286675
Ziechael
Forum Champion
Sheet Author
API Scripter
Meh, it's a boring meeting anyway... stripping it back a bit you can surface the original damage roll, the reduction applied and the crit value (1 or 1.5) with a mouse hover on the result: [[ ((1d8 + @{strength_mod}) * [[(100-(1d26-1))/100]]) * [[{1,[[[[1d100>75]]*1.5]]}kh1]] ]]
Ah, think you might have misunderstood me Critical Success as in the inline role has the green outline. I got my damage macro working so that it increases the damage, I was just hoping there's some way to make it so that the 1d100 is what determines if the inline roll is green or not.
1563297908
Ziechael
Forum Champion
Sheet Author
API Scripter
You are right, I completely misunderstood lol... I don't think  that is possible but there are cleverer folk than I who will be due to hit the forums in the coming hours... best of luck!
1563302848

Edited 1563302861
Gen Kitty
Forum Champion
Without API usage, the green outline is determined by whatever you set the CS to be for the dice you roll.  Just as a short example: 1d10cf0cs<7 This will never have a red outline and will outline green on a 7+ die roll.  I am not good at writing math-heavy macros, but this should help with your more complicated macro.
1563356678
Ziechael
Forum Champion
Sheet Author
API Scripter
I thought of that as an option but have so far been unable to get the crit confirmation to be a source of the highlight... I'm on a train at the moment so testing is pretty slow though lol
Its fine guys, I went with the alternative of it saying after the damage "increase the damage by __%" for criticals and i'm starting to feel like thats more enjoyable to use than simply seeing the green ring and high ass damage.