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

[Help] Something went wrong with a value add up

So in my 2 month quest to make a sheet I have came across an issue with adding up values. I've been experimenting with it and I have a feeling that it's caused by too many values. Is this possible? Cause i have 5 numbers being accounted for. Stat, skill, vehicle stat, add on and other.
1442112339

Edited 1442112369
vÍnce
Pro
Sheet Author
I doubt there's anything wrong with adding together lot's of attributes. Most sheets on roll20 have auto-calculated attributes derived from multiple attributes, some with VERY complex math.  More than likely there's an issue with one or more of the attribute you are adding together.  I would start by double checking all five attributes and confirming that they are being calculated correctly. Then move on to your total calculation formula.  Isolate, isolate, isolate.  If you can't find any discrepancies, post some code and I'm sure you'll get it solved.  Cheers
1442116129

Edited 1442116289
Lithl
Pro
Sheet Author
API Scripter
5 numbers is not going to cause your calculation to fail. Here's an example from the Exalted 2e sheet: <input type="hidden" disabled="true" name="attr_FOSIndex" value="(@{Strength}+@{Athletics}*(1-@{Athletics|max}))" /> <input type="hidden" disabled="true" name="attr_FOSIndex-2" value="(@{FOSIndex} * @{FOSIndex})" /> <input type="hidden" disabled="true" name="attr_FOSIndex-3" value="(@{FOSIndex-2} * @{FOSIndex})" /> <input type="hidden" disabled="true" name="attr_FOSIndex-4" value="(@{FOSIndex-2} * @{FOSIndex-2})" /> <input type="hidden" disabled="true" name="attr_FOSIndex-5" value="(@{FOSIndex-3} * @{FOSIndex-2})" /> <input type="hidden" disabled="true" name="attr_FOSIndex-6" value="(@{FOSIndex-3} * @{FOSIndex-3})" /> <input type="hidden" disabled="true" name="attr_FOSIndex-7" value="(@{FOSIndex-4} * @{FOSIndex-3})" /> <input type="hidden" disabled="true" name="attr_FOSIndex-8" value="(@{FOSIndex-4} * @{FOSIndex-4})" /> <input type="hidden" disabled="true" name="attr_FOSIndex-9" value="(@{FOSIndex-5} * @{FOSIndex-4})" /> <div class="right">Lift/Pull/Push: <input type="number" name="attr_FeatOfStrengthLift" style="width: 4em" title="Lift weight in pounds" value="round((19 * @{FOSIndex-9})/9072-(205 * @{FOSIndex-8})/2016+(3187 * @{FOSIndex-7})/1512-(1171 * @{FOSIndex-6})/48+(74761 * @{FOSIndex-5})/432-(74525 * @{FOSIndex-4})/96+(9916159 * @{FOSIndex-3})/4536-(1856837 * @{FOSIndex-2})/504+(214435 * @{FOSIndex})/63-1200)" disabled="true" /></div> All of this complication is because feats of strength in Exalted aren't a simple equation, but rather a table lookup based on the character's Strength+Athletics pool. Roll20 doesn't make provisions for table lookups, so my autocalc field is a polynomial interpolation of the values in the table. Which all comes out looking like this: (Where x = Strength + Athletics) Of course, since Roll20 also doesn't directly support exponentiation either, the equation the system acutally runs is more like 19 * (((((@{Strength}+@{Athletics}*(1-@{Athletics|max})) * (@{Strength}+@{Athletics}*(1-@{Athletics|max}))) * (@{Strength}+@{Athletics}*(1-@{Athletics|max}))) * ((@{Strength}+@{Athletics}*(1-@{Athletics|max})) * (@{Strength}+@{Athletics}*(1-@{Athletics|max})))) * (((@{Strength}+@{Athletics}*(1-@{Athletics|max})) * (@{Strength}+@{Athletics}*(1-@{Athletics|max}))) * ((@{Strength}+@{Athletics}*(1-@{Athletics|max})) * (@{Strength}+@{Athletics}*(1-@{Athletics|max}))))) ...etc. than what the model requires, 19 * (Strength + Athletics)^9 ...etc. If my feat of strength calculation can handle expanding 9 different attributes into 2 attributes repeated 45 times, yours can handle 5 numbers.
Ok so I've been playing around and i think you are right, all I'm doing is 1d6+@{1}+@{2}+@{3}+@{4}+@{5}. it's actually calculating the numbers when I roll but the problem comes with the numbers on the sheet. I put number tags up i disabled them and I set they're value to a different number set but they're not working. Do you know why this is? I can send you the code if you want.
It wont show a result of 'd6' on the sheet, get rid of the d6 and make sure it works with out it.  You might have to rename the value as something like 'Bonus' and have it as @{1}+@{2}+@{3}+@{4}+@{5}, but the roll is 'd6+@{1}+@{2}+@{3}+@{4}+@{5}' Unless I am thinking about this wrong
Jake M. said: It wont show a result of 'd6' on the sheet, get rid of the d6 and make sure it works with out it.  You might have to rename the value as something like 'Bonus' and have it as @{1}+@{2}+@{3}+@{4}+@{5}, but the roll is 'd6+@{1}+@{2}+@{3}+@{4}+@{5}' Unless I am thinking about this wrong Ok so allow me to rephrase this. One of the things I have in the sheet is a number segment that has a value exactly the same as another one.  This segment is question is disabled and it's value can only affected by the other number segment. There's no dice value involved. Yet when I put a value in it doesn't show up. if you want I can post the code.
Yeah, post it.  It shouldn't be blank it, it should be weird looking until you tweak the father number.  I understand what you are saying now though, no d6 in it.
Ok so good news and bad news. The good news is that I've figured out what's wrong. I neglected to put a name in. The bad news is a similar problem showed up somewhere else. It's completely unrelated to my fixes btw. So I think that the problem comes from the fact that the number comes from a select tab that get's said value from something completely different.
Well thats good! (and bad)
what do you think?