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

How to Stop Attribute Formulas From Parsing Out? Help!

Happy Holidays champs, and Happy Almost-New Year! Quick question which I'm sure has a logical answer that I'm not seeing: In a character sheet, I'm creating formulas for certain attribute max values. Our party monk, for instance, has "Ki Points" as her class resource, so in her character sheet's "Attributes & Abilities" tab, I located class_resource , and fill in a formula under the Max value box: (@{level}). This makes her Ki points always equal her level. However, I noticed that when I click on this character token's gear icon on the tabletop, when the Edit Token  window appears, where I have class resource as Bar 3, it automatically parses out the formula to its result (in this case, it quickly goes from "(@{level})" to "5"), and the formula is gone. This happens everywhere: in the token's radial icons, the Attributes tab of the Character Sheet, even the main Character Sheet itself. The formula is gone, and the static new number remains. Anyone know how to prevent this from happening? I'd like to keep the formula there permanently, even if I have to open up the Edit Token  window. This is true for several different formuals I've put on different characters (such as Divine Sense for our paladin: (1+@{charisma_mod}), etc.). Thanks!
1577555933
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I've never seen anyone try that before, and that appears to be the behavior. I don't think there is anything to be done about it, since it is probably done that way purposefully for other reasons, maybe hit point generation? Since you are a pro user, you could probably use a chatsetattr action to write those calculated values into the sheet. The macro could be run at level up, which is the only time they are likely to change.
Thanks for the quick reply keithcurtis!  I thought about doing the same actually (already running chatsetattr), but there are times between levels that certain attributes change, and thus the abilities dependent on those attributes. For example, say our paladin discovers an item that temporarily boosts their Cha modifier by 2 every long rest. Using that item raises their Cha modifier, and in turn, their total uses of Divine Sense (which is 1 + your Charisma mod). I wouldn't want to run the macro that levels him up just for that, but it then becomes a pain finding all the Cha mod-dependent features and manually changing them for something that will reset in a minute. (I'm exaggerating the scenario, of course.) Hence, the formulas come in handy. Bummer that there doesn't seem to be a way around that behavior!
1577559814
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Since the chatsetattr would be setting discrete values, and not incrementing them, an "update resources" action on each character using this method would not be a big pain in the neck. Just remind a player to use it when leveling or getting a attribute-affecting magic item. Here's a tip that will save you headaches: When using the level up feature of Charactermancer, be sure to unequip anything that alters attributes. At the time of this post, Charactermancer does not understand modded attributes, and will write them in as the actual value upon saving. Thus a character with a 13 int, but a Headband of Intellect will have a 19 natural int upon leveling up through Charactermancer.