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

Roll Template with Dice Rolls inside them (Lone Wolf RPG by Cublicle 7)

Well, I created a character sheet and some macros for the Lone Wolf RPG by Cubicle Seven. I was really annoid by the Combat Table, so I tried to replace it with a roll. So I wrote this macro for simulating attacks:  &{template:default} {{name=@{selected|character_name} attacks!}} {{Deals to the enemy=[[1d10+3+#CombatRatio2  ]] points of damage!}} {{Suffers=[[10-1d10+#CombatRatio3 ]] points of damage!}}  It works. I used the default roll template because I'm not so skilled at programming. My question is: can I use a SINGLE 1d10 roll for both the commands? Is there a way to store somewhere the result of the 1d10 ad use it for the two formulas? Thank you all guys!!! Marco 
1591122104
GiGs
Pro
Sheet Author
API Scripter
You cant reuse the roll in two different ways, unfortunately. If you're making your own character sheet, you can  sometimes  achieve this with a custom roll template (not the default one). You'd need to get familiar with the rolltemplate logic functions , and make your rolltemplate work something like &{template:default} {{name=@{selected|character_name}}} {{d10roll=[[1d10]]}} {{attacker=[[3+#CombatRatio2]]}} {{defender=[[10-#CombatRatio3 ]] }}  You'd also need to eliminate those macro calls and replace them with what they actually contain. Then in the rolltemplate you'd have a long list of rolltemplate logic comparisons, comparing attacker to d10roll, and defender to d10roll, to return the damage done in each case. But it's just as likely that it's not possible at all. It's impossible to know without knowing what those combatratios macros contain.