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

CS/CF colouring in a template box for d100 percentile

1518745762

Edited 1518745856
Peter H.
KS Backer
Is it possible to have the cs and cf colouring of a result occur in a template box? I have the following Macro which prompts for the skill and then calcs the CS & CF values. /r d100<[[?{Skill Level?|0}]]cs<[[ceil(?{Skill Level?|0}/10)]]cf>[[100 - ceil(?{Skill Level?|0}/10)]]  in a template box I've worked out how to display the values individually, just not use them to colour the result &{template:default} {{name=Holmes attempts a skill}}{{Skill Level is [[?{Skill Level?|0}]]}}{{Critical Success is [[ceil(?{Skill Level?|0}/10)]] or below}}{{Critical Failure is [[100 - ceil(?{Skill Level?|0}/10)]] or higher}}{{Rolled=[[d100]]}} eg I want something like this that produces a result &{template:default} {{name=Holmes attempts a skill}}{{Result is [[/r d100<[[?{Skill Level?|0}]]cs<[[ceil(?{Skill Level?|0}/10)]]cf>[[100 - ceil(?{Skill Level?|0}/10)]]]]}}
1518772182
GiGs
Pro
Sheet Author
API Scripter
You cant do that with the default template, no. If you were a pro user, you could write a script or create a rolltemplate to achieve this, but free users can't do it.
I'm a Pro for life (not sure why it's not showing I'm a Pro on my post). I'll see if I can work out roll templates. I stopped messing with HTML before css was a thing, so am a bit rusty :). 
1518778286
GiGs
Pro
Sheet Author
API Scripter
If you have pro, you can use the Powercards script. This is probably the best way, if you just want to apply formatting to rolls. 
1518801784
Silvyre
Forum Champion
Peter H. said: Result is [[ /r d100<[[?{Skill Level?|0}]]cs<[[ceil(?{Skill Level?|0}/10)]]cf>[[100 - ceil(?{Skill Level?|0}/10)]]]] If you remove the "/r" here, you should get the Roll Highlighting you desire within this Inline Roll .