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

Variables and the Multi-Colored Bars

1418527455

Edited 1418527557
Hello, I was working on a custom character sheet, when I couldn't figure out how to connect a variable to the number on the right side of the "/" with the bars (red, green, blue.) (The one circled in this picture) It seems the drop down menu allows for you to choose the first one, but not the last one. If it is possible to set that one, is it also possible to set it up where the drop down menu, and other side automatically default to a specific variable, so I don't have to select it for each character sheet? Thanks for the help!
1418540622
Lithl
Pro
Sheet Author
API Scripter
Attributes have a current value and a max value. If you link a bar to an attribute, the attribute needs a max value in order to fill the max value of the bar.
1418553910
Finderski
Pro
Sheet Author
Compendium Curator
To tag along with what Brian said, if you're building the html version of a character sheet, you can include this on the sheet by appending: _max. For example: <input type="number" name="attr_SomeTrait" /> <input type="number" name="attr_SomeTrait_max" /> That creates a matched set of Current and Max for SomeTrait.
That worked perfectly, thank you very much!
1418931418

Edited 1418931890
Tom
Pro
Sheet Author
So just to clarify, to set a max value for the attribute, I need to create two input lines? As in: <pre><input type="number" name="attr_SomeTrait" value="X+X" /> <input type="number" name="attr_SomeTrait_max" value="5" /></pre> Or does adding the "_" after the trait name automatically designate a max value? As in: <pre><input type="number" name="attr_SomeTrait_5" value "X+X" /></pre> If it's the former, how do I set it up so that I don't have an actual input field on my sheet? In other words, is there a way to set a max value for a character sheet attribute, but not display it on the sheet? Thanks! edit: Sorry, for the life of me I can't figure out how to put things in a box outside of the wiki. :P
1418932989
Finderski
Pro
Sheet Author
Compendium Curator
Tom, your second example is correct _max is typed out and the value contains the value. You can create an input with the type="hidden" and then it won't show up on your sheet.
1419079219
Tom
Pro
Sheet Author
Perfect! Thanks, GV!