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 .
×

Formula in attributes is reset when used in bar

Hey, I am using a formula for the max value in a "Physical_Damage" attribute like [[ceil(@{Body}/2)+8]] which is working fine but when I assign the attribute to a bar on a token the formula is replaced by the calculated value (and doesn't update anymore when the base attributes are changed). Seems to happen each time an attribute is assigned to a bar and then the bars are saved. It replaces the formula with a value for all attributes that are currently assigned to a bar, not just newly added ones. Any1 know something about this? Thanks, Normen
1438791748
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Normen, I'm not sure I'm following. Is this in a custom character sheet you're setting up an attribute value and value_max from the character sheet and the assigning it to a token? Maybe provide a screen shot of what you're trying to do to help me visualize it.
1438802405

Edited 1438802571
No (well kinda), its normal attributes. I am not using the character sheet for this character as its a special character (a spirit). When I assign "Physical_Damage" to a token bar it turns to this:
1438807972
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Normen, I'm surprised that works even once to be replaced by a numerical value instead of a formula. It looks like it gets passed into code that returns results from the character sheet.  What you'll need to do to get the results you want is to create disabled number fields on the character sheet to get the continuous and dynamic results you want. What you're trying to do is outside the scope of the Attributes and Abilities tab alone.
1438809843

Edited 1438815619
Well okay, I'm not actually trying to do anything, I do it and it works. Are you saying that normally formulas like this are not supposed to work in Attributes? Because I can use them fine, even create derived Attributes from them and use them in Abilities. Please don't change this featurebug if its not actually meant to work like this ;) I just have to replace the value with the formula each time the attribute is assigned to the bar in the token, I guess I can live with that. Otherwise it works as I want. When the attribute has been assigned to a bar once and I put the formula back in the attribute max then the maximum of the bar changes according to the values the formula uses. As for character sheets, I can't change them with my basic account. Edit: Final note, all the Attributes are created by me, not the character sheet - I don't use it so it doesn't create any.
1438859554

Edited 1438860030
Even though I see the danger of you killing this featurebug for basic players, this is a new game I created with no character sheets and this works fine: ( Test1=[[@{Force}*2]] Test2=[[@{Test1}*2]] ) As I said, it even works when assigning an attribute with a max formula to a token bar, the formula only gets replaced when the attribute is assigned, after that the formula can be put in again and the bar will act accordingly when the base values change. Even when changing the "current" value via the token the formula stays in and works as the maximum for the bar. I do sincerely hope you keep this feature in though - but being a software developer myself I want to give you all information I have. Cheers, Normen