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

New to editing character sheets: attributes, calculated fields, external scrips, token bars

I'm running an Eclipse Phase 2 game on Roll20.&nbsp; Someone has thankfully built a character sheet.&nbsp; But I'm having a number of issues with it. Sheet located here:&nbsp; <a href="https://github.com/Roll20/roll20-character-sheets/blob/master/Eclipse%20Phase%20V2/Eclipse%20Phase%20V2.html" rel="nofollow">https://github.com/Roll20/roll20-character-sheets/blob/master/Eclipse%20Phase%20V2/Eclipse%20Phase%20V2.html</a> I believe I have figured out some of the problems and want to confirm my reasoning here. Many of the key values for Eclipse Phase are not showing up in the 'Attributes' list under the Attributes and Abilities tab in game.&nbsp; An example is attr_initiative.&nbsp; I believe this is because it is an auto calculated field (see line 251).&nbsp; When I create a macro with it it shows the full calculation.&nbsp; If I attempt to reference this value with a script, it throws an error, which I believe is because passing the auto calculated value to another script passes the formula, not the result.&nbsp; I also cannot see these values in the token bars either. My assumption is that in order to make these values visible in token bars and usable by other scripts they should instead be updated by sheet workers, is that correct?
1589051758
Andreas J.
Forum Champion
Sheet Author
Translator
Even if an attribute isn't visblein the A&amp;A tab, doesn't mean you can't use it, but it's possible that sheetworkers aren't allowed to access autocalcualted values, not sure. Did you confirm that your script could access an attribute that wasn't autocalculated? Want to show the macro you tried to use for initiative?
1589064579
GiGs
Pro
Sheet Author
API Scripter
Ian M. said: My assumption is that in order to make these values visible in token bars and usable by other scripts they should instead be updated by sheet workers, is that correct? It sounds like you understand the problem, and yes, autocalc attributes dont work well with scripts and token bars.&nbsp; Since youre a Pro user, you could create a workaround for the problem by using chatSetAttr to create copies of the attributes that are in a form the tokenbars and scripts can use. Say you want to make a new initiative attribute, called INIT, from an old attribute called initiative,&nbsp;you could do this !setattr --sel --INIT|[[@{selected|initiative}]] Then select a character and run it, and it'll make a numerical attribute you can use in scripts. You have to do this one by one, but you could make a list of all the attributes you want to change in one go for each character !setattr --sel --INIT|[[@{selected|initiative}]] --HITS|[[@{selected|hitpoints}]] --MOVE|[[@{selected|moverate}]] Of course you'd need to update it every time the attributes change, so a sheet worker is far superior, but that requires someone update the sheet.