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 merry + bright! 🎄
Create a free account

How to make roll template like the Power Rangers one? Where you can show the roll results?

I'm working on a custom character sheet, particularly a roll template and I'm trying to figure out how to something like that (see image), I know its possible since also a roll20 game. Where the d20 and skill die values are shown separately BUT also added together in a bigger value. More specifically for mind I want to have three. Core, Skill, and Modifier and then add all three together shown as a larger. Like in the power ranger one.
1692843728

Edited 1692844013
GiGs
Pro
Sheet Author
API Scripter
There's more than one way to do this. Probably the simplest is to use the reusing rolls method. It's hard to give code without knowing details about your rolltemplate or character sheet attributes, but it could work like this: &{template:default} [[ [[@{core}]] + [[@{skill}]] + [[?{modifier|0}]] ]] {{core=$[[0]]}} {{skill=$[[1]]}} {{modifier=$[[2]]}} {{total=$[[3]]}} Every number you want to use in the rolltemplate has to have its own label in the roll, as you can see with core, skill, modifier, total. Notice the calculation isn't done in {{ }} brackets - this ensures it is dropped and forgotten. But the values in inline rolls can be extracted and placed in your output. In a custom rolltemplate you can then place them anywhere you want with {{core}}, {{skill}}, {{modifier}}, and {{total}}, and apply whatever styling you want to each number.
Thanks, just what I was looking for! 
Quick Question. Why is the base roll, aka not a crit or fail not working.  The others are but for whatever reason the base roll is still in a purple box? My code: .sheet-rolltemplate-roswell .inlinerollresult {background-color: transparent; border: none; background-image: none; color: white;} .sheet-rolltemplate-roswell .inlinerollresult.fullcrit {background-color: transparent; border: none; background-image: none; color: #3FB315;} .sheet-rolltemplate-roswell .inlinerollresult.fullfail {background-color: transparent; border: none; background-image: none; color: #B31515;}
1692847767
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Because reusing rolls is not an officially supported method, I'd recommend using custom roll parsing. CRP also give much more flexibility in what you can handle.
It was doing this before when I wasn't reusing rolls as well tho.
1692880147

Edited 1692880313
GiGs
Pro
Sheet Author
API Scripter
Can you post the macro for the base roll? and a screen shot of the purple result? The best thing for you to do would be to post a link to your entire HTML and CSS so we could test it out and see exactly what is happening. I see no reason why Reusing Rolls would produce weird output itself. Because it's officially unspopported, it ,might stop working or behave weirdly in the future (or it might not, because it's become so important the Devs have to keep supporting it. Either way, it shouldn't be causing a problem now ) I'm sure there is something else going on.
1692896061

Edited 1692896094
It does appear to only be an issue with dark-mode, but I dont have any code for dark0mode. It all just the same. PS is i know its not formatted correctly yet, I was in the middle of messing with the css so it weirdly misaligned. 
1692903306
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yes, I wasn't saying to avoid reuse rolls for this display issue, I was saying to avoid it because it may get disabled in the future, and because you can't actually do that much with it in the grand scheme of things. As for what's going on here, this is a specificity issue. The dark mode roll styling from Roll20 is more specific than your roll styling. You just need to add an extra class into the style rule for your roll styling.
Thanks yeah that worked. I just added another css class&nbsp;.sheet-container to the line css sheet and it worked. This page helped me understand what you meant by adding another class. <a href="https://wiki.roll20.net/Character_Sheet_Development/Dark_Mode#Roll_Template" rel="nofollow">https://wiki.roll20.net/Character_Sheet_Development/Dark_Mode#Roll_Template</a>