Hi all, I'm working on a custom version of the Ammo module, which is originally found at <a href="https://gist.github.com/shdwjk/79a60b8d2ee58e87604" rel="nofollow">https://gist.github.com/shdwjk/79a60b8d2ee58e87604</a>... . I realize that there is a new version in the roll20-api-scripts repository now, at <a href="https://github.com/Roll20/roll20-api-scripts/blob/" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/blob/</a>... . I'm trying to make it more generic (i.e. to make it a generic "adjust this counter" script, as opposed to being very specifically tied to ammunition). The version that I'm working on is visible here: <a href="https://github.com/rbroemeling/roll20-api-scripts/" rel="nofollow">https://github.com/rbroemeling/roll20-api-scripts/</a>... . I ran into a bug though: on the Pathfinder character sheet, the attributes don't seem to be populating 'max' correctly. That is, dumping the 'attr' object right after the findObjs() call on line 159: attr = findObjs({_type: 'attribute', _characterid: chr.id, name: args[2]})[0];
log(attr); ... results in a hash that has an empty "max" value, like this: {"name":"repeating_class-ability_1_used","current":3,"max":"","_id":"-JzRGLh5lzZmPqKvMspW","_type":"attribute","_characterid":"-JzOcuw2Jpn0k85RkDgw"} On the character sheet itself, 'max' for that attribute is populated via the dice formula: 2 + @{CHA-mod} + (@{class-0-level} * 2) ... and on the character sheet, the 'max' for that attribute correctly calculates and displays "6", as expected for a level 1 bard with a +2 CHA modifier: Anyone have any idea what I am doing wrong or suggestion for how to fix this issue? Thanks!