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

Roll with calculated cs and cf

I speak french, so, my english isn't pretty, excuse me. I create a sheet but the DM want the crit and fail change. so, i have this: the roll: <button name="attr_jetPhysique" type="roll" value="&{template:groob} {{rollname=Physique}} {{carac=[[@{Physique}-@{Pourcentage}+?{Bonus/Malus|0}]]}} {{jet=[[1d100cs<@{CC_Physique}cf>@{EC_Physique}]]}}" /> the CC and EC values: <input type="number" name="attr_CC_Physique" value="(@{Physique}/10)" title="Coups critiques Physique" style="background-color:#006400; font-weight:bold; color:#FFEBCD" disabled="true" /> <input type="number" name="attr_EC_Physique" value="(90+(@{Physique}/10))" title="Echecs critiques Physique" style="background-color:#B22222; font-weight:bold; color:#FFEBCD" disabled="true" /> but result is: 1d100cs<(70/10)cf>(90+(70/10)) Is it possible to do this?
1563993447
Andreas J.
Forum Champion
Sheet Author
Translator
What does EC and CC mean? That might work if you use value="@{Physique}/ 10", the parenthesis might be what's preventing it.
EC mean Echec Critique ( = Critical Fail) CC mean Coup Critique ( = Critical Success) i have try without parenthesis and here is the result:
1564002293
Andreas J.
Forum Champion
Sheet Author
Translator
The wiki to the rescue : Auto-calculated values need to have a disabled="true" inside the tag, then it will calculate instead of show the formula. Example: <input type="number" name="attr_StrMod" value="(@{Strength}/2)" disabled="true" />
my auto-calculated values (EC and CC) already have the disabled="true" and i can't use it on the button
1564002858
Kraynic
Pro
Sheet Author
Your critical strike and critical fail calculations need to have the inline roll brackets around each of them so that those get resolved to a real number.  At least, when I enter the following, it resolves the roll correctly: [[1d100cs<[[70/10]]cf>[[90+70/10]]]]
1564019028
GiGs
Pro
Sheet Author
API Scripter
To add to Kraynic's answer, you might just be able to replace the round  brackets with inline roll brackets in the CC and EC stats, like so: <input type="number" name="attr_CC_Physique" value=" [[ @{Physique}/10 ]] " title="Coups critiques Physique" style="background-color:#006400; font-weight:bold; color:#FFEBCD" disabled="true" /> <input type="number" name="attr_EC_Physique" value=" [[ 90+(@{Physique}/10) ]] " title="Echecs critiques Physique" style="background-color:#B22222; font-weight:bold; color:#FFEBCD" disabled="true" /> Give that a try.
Perfect, it works! Thank you Andreas, Kraynic and GiGs for the help :)