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

Problem with rolls on the character sheet

I'm creating a character sheet and would like to use the 3d data on the rolls, I need the following: 1 - Define whether the roll is visible to the narrator or not; 2 - Choose a difficulty; 3 - Roll an amount of dice according to the difficulty; 4 - Display the result of the roll and the selected difficulty on the rolltemplate. What I did to try to solve: <div class = "sheet-row-align sheet-row-button"> <button type = "roll" value = "&{template: millenia-attribute} {{pj = @ {character_name}}} {{dif =? {Choose difficulty | Normal, [Normal] 3d6 | Routine, [Routine] 1d6 | Easy, [Easy] 2d6 | Difficult, [Difficult] 4d6 | Very Difficult, [Very Difficult] 5d6 | Almost impossible, Almost impossible 6d6}} } {{Attr = Strength}} {{level = @ {strength}}} {{roll =? {Visible only to the master? | No, / r? {Choose difficulty} | Yes, / w gm [[? {Choose difficulty}}}} "name =" roll_strenght"> </button> </div> </div>
1594612331
Kraynic
Pro
Sheet Author
I think with a roll template, your choice to roll publicly or whisper needs to come before the roll template call.  So, you could move your query for whisper there, with no having a totally blank value, and yes having a value of "/w gm ".  Note the space after the gm.  If you moved that there, then you would only have 2 instances of your choose difficulty: the one that displays the difficulty and amount of dice, and then later when you want it to roll.  You would need to have it in double square brackets.  You could try this and see if it will work for the macro: ?{Whisper to Keeper?|No,|Yes,/w gm }&{template: millenia-attribute} {{pj = @ {character_name}}} {{dif =? {Choose difficulty| Normal, [Normal] 3d6 | Routine, [Routine] 1d6 | Easy, [Easy] 2d6 | Difficult, [Difficult] 4d6 | Very Difficult, [Very Difficult] 5d6 | Almost impossible, Almost impossible 6d6}} } {{Attr = Strength}} {{level = @ {strength}}} {{roll =[[? {Choose difficulty}]]}} One thing you might consider is putting a switch on the character sheet that allows the player to turn whisper on and off for the entire sheet at once without needing to answer queries for everything.  The basic idea is 2 radio buttons with an attribute name that you will use in your macros.  To keep my simple mind from being confused, I use whispertoggle as the attribute name on mine.  One radio button will have value="", and the other will have value="/w gm ".  Then all you need to do is prefix all of your button macros with that attribute for all the macros on the sheet to respond to that switch. @{whispertoggle}&{template: millenia-attribute}..... You can even use @{selected|whispertoggle} in custom macros and have the sheet whisper setting apply.
1594612665
GiGs
Pro
Sheet Author
API Scripter
The code youve pasted above has too many spaces in it, and some are in places that will cause the button roll to fail. Is this due to some copy/paste issue? Since this a rolltemplate, it's impossible to judge where the problem is without the rolltemplate code. If you're having trouble getting a roll to work, two things you should do: Save the roll as a character ability, and work on it there. Once its working, then update the character sheet with it.  Either convert the template to the default rolltemplate, or to a roll without a template. Once you get that working, then put it in your custom template.  The first step makes the testing much quicker. The second step lets you know if the problem is in the roll macro, ir in the template structure. Finally when asking for help on the forums, it's helpful to say what is actually happening. Are you getting any output in chat at all? Seeing any errors?
Your suggestions worked perfectly! Thanks Kraynic and GiGs