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
This post has been closed. You can still view previous posts, but you can't post any new replies.

add and use several values together

1548250667

Edited 1548250694
Tealk
Pro
Sheet Author
Hello, i wanted to create a field in which several values are added together and then use this field for the cube macro. Unfortunately this doesn't work because the value of the calculated field is not used but the single values. <input type="text" name="attr_12_malus" placeholder="Malus" /> <input type="text" name="attr_5_malus" placeholder="Malus" /> <input type="text" name="attr_6_malus" placeholder="Malus" /> <input type="text" name="attr_8_malus" placeholder="Malus" /> <input type="text" name="attr_9_malus" placeholder="Malus" /> <input type="text" name="attr_7_malus" placeholder="Malus" /> <input type="text" name="attr_2_malus" placeholder="Malus" /> <input type="text" name="attr_4_malus" placeholder="Malus" /> <input type="text" name="attr_10_malus" placeholder="Malus" /> <input type="text" name="attr_3_malus" placeholder="Malus" /> <input type="text" name="attr_11_malus" placeholder="Malus" /> <input style="width: 100px;" type="number" name="attr_malusGesamt" value="floor(@{12_malus}+@{5_malus}+@{6_malus}+@{8_malus}+@{9_malus}+@{7_malus}+@{2_malus}+@{4_malus}+@{10_malus}+@{3_malus}+@{11_malus})" disabled="true" /> so I'd like to use that: [[1d6! + ((@{ge} - 1) + @{akrobatik} + @{akrobatik_mod} - @{malusGesamt})d6 + ?{Modifier?|0}d6]] but unfortunately, all I'm getting is this:
So you are wanting to display the sum of all of the X_malus attributes in the equation as opposed to each individual X_malus attribute? If so, you can put [[]] around the value of the malusGesamt attribute like so: value="[[floor(@{12_malus}+@{5_malus}+@{6_malus}+@{8_malus}+@{9_malus}+@{7_malus}+@{2_malus}+@{4_malus}+@{10_malus}+@{3_malus}+@{11_malus})]]"
1548259195
Tealk
Pro
Sheet Author
Thanks for the note, that makes it work wonderfully. I have tried everything except these clamps.