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

What formulas will and will not work in Roll 20

1424920101

Edited 1424920606
So, I have been trying to get this damn thing to work for a while and for some reason it just won't pull the information from this attribute or any other attributes. The first input works just fine, but the second input is not pulling the attribute value from carry_max and I can't figure out what I am doing wrong.
1424922913
Diana P
Pro
Sheet Author
Silver, the second input needs a name like the first one has. The title shows up on mouse over, but it needs a name (one that starts with the attr_) to actually exist/take the calculation.
Omg, thank you so much. I am new at this as you can see.
1424924914

Edited 1424925201
Okay guys, I have another one that I also cannot get to work for me. I am trying to make the input box pull the ammunition number from the selected magazine. Do I need to also put a name on each option? <div> <select name="attr_rangedloaded2"> <option value="@{ammunition1}">Magazine 1</option> <option value="@{ammunition2}">Magazine 2</option> <option value="@{ammunition3}">Magazine 3</option> <option value="@{ammunition4}">Magazine 4</option> <option value="@{ammunition5}">Magazine 5</option> <option value="@{ammunition6}">Magazine 6</option> <option value="@{ammunition7}">Quiver 1</option> <option value="@{ammunition8}">Quiver 2</option> </select> </div> <div> <input type="number" name="attr_rangedloaded2" value="@{rangedloaded2}" />
1424925676

Edited 1424925757
Diana P
Pro
Sheet Author
No, the options do not need names, but I believe they do need a type. ie: <select class="sheet-table-data-center" name="attr_spellcastingstat" title="spellcastingstat"> <option type="text" value="@{str-mod}">Str</option> <option type="text" value="@{dex-mod}">Dex</option> <option type="text" value="@{con-mod}">Con</option> <option type="text" value="@{int-mod}" selected>Int</option> <option type="text" value="@{wis-mod}">Wis</option> <option type="text" value="@{cha-mod}">Cha</option> </select> <input type="text" name="attr_spelldc0" title="spelldc0" value="(10+0+@{spellcastingstat})" disabled="true" class="sheet-table-row-small"> Html is so picky about what it wants included and where... :)
Okay Diana I am going to try that and hopefully it works. Once again thanks! I will keep you updated.
I gave it a type and it's still not working.
1424926372
Diana P
Pro
Sheet Author
Hm. I know the code I pasted works; I pulled it out of my D&D3.5 sheet. What is it doing? or perhaps what are the values of ammunition1 etc?
@{rangedloaded1}
That is the result I'm getting.
1424926635

Edited 1424926659
<input type="text" name="attr_ammunition1" value="25" /> <input type="text" name="attr_ammunition2" value="20" />
1424927133

Edited 1424927340
If I change the type to number then nothing is displayed.
1424927410
Diana P
Pro
Sheet Author
:\ Set disabled="true" on the last input and the input and the select should not have the same name; that will confuse it and stop it from switching. <input type="text" name="attr_rangedloaded2" value=@{rangedloaded2} disabled="true"/> I tried: <input type="text" name="attr_ammunition1" value="1" > <input type="text" name="attr_ammunition2" value="2" > <input type="text" name="attr_ammunition3" value="3" > <input type="text" name="attr_ammunition4" value="4" > <input type="text" name="attr_ammunition5" value="5" > <input type="text" name="attr_ammunition6" value="6" > <input type="text" name="attr_ammunition7" value="7" > <input type="text" name="attr_ammunition8" value="8" > <div> <select name="attr_rangedloaded2"> <option type="text" value="@{ammunition1}" selected>Magazine 1</option> <option type="text" value="@{ammunition2}">Magazine 2</option> <option type="text" value="@{ammunition3}">Magazine 3</option> <option type="text" value="@{ammunition4}">Magazine 4</option> <option type="text" value="@{ammunition5}">Magazine 5</option> <option type="text" value="@{ammunition6}">Magazine 6</option> <option type="text" value="@{ammunition7}">Quiver 1</option> <option type="text" value="@{ammunition8}">Quiver 2</option> </select> </div> <div> <input type="text" name="attr_rangedloaded3" value=@{rangedloaded2} disabled="true"/> </div> which worked for me.
1424927742

Edited 1424927949
Okay, so the disable alone didn't fix it. I had to disable and do selected. That's so weird.
1424927913
Diana P
Pro
Sheet Author
You will probably also have to go into the attribute and abilities tab and delete the currently existing value (and rename the 2nd rangedloaded2.. in my working example I renamed it to rangedloaded3).
It works now. Thank you so much for doing this for me. I've struggled for days figuring it out.
1424928070
Diana P
Pro
Sheet Author
:) You're welcome. I would think it would default to the first one if the selected isn't there but *shrug* who knows. Maybe it just gets confused instead.
Yeah, this is the first time creating a character sheet. I didn't feel like doing my own CSS, so I pretty much jacked the D&D 5E one. I just have changed certain things. Overall the character sheet is coming together nicely. There are just a few kinks that I need to work out now such as how to make a drop down menu where the player will still have the option of typing in his own input.
1424928415
Diana P
Pro
Sheet Author
Good luck on your sheet then!
Here is kind of the overall layout, but I am now on the last part which is the inventory page and I'm done for now.
1424928894
Diana P
Pro
Sheet Author
Nice!
1424929039

Edited 1424929156
Thanks, this is actually the least impressive page.
1424929172

Edited 1424929554
Lithl
Pro
Sheet Author
API Scripter
Silverchrist said: So, I have been trying to get this damn thing to work for a while and for some reason it just won't pull the information from this attribute or any other attributes. The first input works just fine, but the second input is not pulling the attribute value from carry_max and I can't figure out what I am doing wrong. Note that if the name of your field ends with "_max" (as is the case with attr_carry_max), the value will be stored in the "max" property of the attribute, rather than the "current" property. That means that accessing it from elsewhere requires @{carry|max} instead of @{carry_max}. Also, as a general recommendation: If you have an autocalc field which you intend to use as part of the value for another autocalc field, it's a good idea to enclose the equation in parentheses. The autocalc values are not processed step-by-step, but the full text is copied through each level of calculation and all of the calculation is performed at once. Consider: <input type="number" name="attr_example1" value="5" /> <input type="number" disabled="disabled" name="attr_example2" value="@{example1} + 10" /> <input type="number" disabled="disabled" name="attr_example3" value="@{example2} * 5" /> In this case, @{example3} would be calculated as 55, not 75. This is because it expands to "5 + 10 * 5" and order-of-operations performs the multiplication before the addition. If the values were enclosed in parentheses: <input type="number" name="attr_example1" value="5" /> <input type="number" disabled="disabled" name="attr_example2" value="(@{example1} + 10)" /> <input type="number" disabled="disabled" name="attr_example3" value="(@{example2} * 5)" /> You'd get "((5 + 10) * 5)" which behaves as expected.
Thanks for clarifying Brian.