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

Attributes Not Updating

I've cobbled together a custom character sheet based off this Savage Worlds sheet &nbsp;that more or less looks and works how I want it to, but I'm finding that: - Default values that are set in the HTML aren't being added as Attributes on the A&amp;A tab unless those values are changed by the player; - Derived values are updating properly on the character sheet itself (e.g. the Toughness value updates correctly on the sheet when the Vigor die changes), but those derived values aren't getting added (or updated, once added manually) to the A&amp;A tab; I had thought &nbsp;the entry fields were set up correctly with "attr_", but apparently there's something I'm missing.&nbsp; I'll paste my html below but this is 100% babby's first character sheet customization effort so I'm sure it's super inefficient.&nbsp; Any help/advice would be appreciated! &lt;rolltemplate class="sheet-rolltemplate-custom"&gt; &lt;div class="sheet-container sheet-color-{{color}}"&gt; &lt;div class="sheet-header"&gt; {{#title}}&lt;div class="sheet-title"&gt;{{title}}&lt;/div&gt;{{/title}} {{#subtitle}}&lt;div class="sheet-subtitle"&gt;{{subtitle}}&lt;/div&gt;{{/subtitle}} &lt;/div&gt; &lt;div class="sheet-content"&gt; {{#allprops() title subtitle desc color}} &lt;div class="sheet-key"&gt;{{key}}&lt;/div&gt; &lt;div class="sheet-value"&gt;{{value}}&lt;/div&gt; {{/allprops() title subtitle desc color}} {{#desc}}&lt;div class="sheet-desc"&gt;{{desc}}&lt;/div&gt;{{/desc}} &lt;/div&gt; &lt;/div&gt; &lt;/rolltemplate&gt; &lt;div class='sheet-maindiv'&gt; &lt;div class="sheet-2colrow"&gt; &lt;div class="sheet-col"&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;h3 style="text-align: left; margin-left: 20px; font-family: courier;"&gt;SECRET//SAR-CB A331//FOA I/II&lt;/h2&gt; &lt;/div&gt; &lt;div class="sheet-col"&gt; &lt;p style="text-align: right; margin-right: 20px; margin-top: 20px; "&gt; &lt;img src="<a href="https://i.imgur.com/j3rhhnW.png" rel="nofollow">https://i.imgur.com/j3rhhnW.png</a>" style="max-height: 100px; "&gt; &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;h1 style="text-align: center; font-family: courier;"&gt;PERSONNEL RECORD&lt;/h1&gt; &lt;br&gt; &lt;br&gt; &lt;div class="sheet-2colrow"&gt; &lt;div class="sheet-col"&gt; &lt;table&gt; &lt;tr&gt; &lt;td style='text-align:left;'&gt; &lt;label class='sheet-nameRankXp'&gt;Name:&lt;/label&gt;&lt;input type="text" style="margin-left: 5px;" name="attr_character_name" /&gt;&lt;br/&gt; &lt;label class='sheet-nameRankXp'&gt;Nationality:&lt;/label&gt;&lt;input type="text" style="margin-left: 5px;" name="attr_nationality" value='American' /&gt;&lt;br/&gt; &lt;label class='sheet-nameRankXp'&gt;Rank:&lt;/label&gt;&lt;select name='attr_rank' style="margin-left: 6px;" value='Rookie' class='sheet-rank'&gt; &lt;option value='Rookie'&gt;Rookie&lt;/option&gt; &lt;option value='Squaddie'&gt;Squaddie&lt;/option&gt; &lt;option value='Sergeant'&gt;Sergeant&lt;/option&gt; &lt;option value='First Sergeant'&gt;First Sergeant&lt;/option&gt; &lt;option value='Master Sergeant'&gt;Master Sergeant&lt;/option&gt; &lt;option value='Warrant Officer'&gt;Warrant Officer&lt;/option&gt; &lt;option value=' '&gt;&lt;/option&gt; &lt;/select&gt;&lt;br/&gt; &lt;label class='sheet-nameRankXp'&gt;XP:&lt;/label&gt;&lt;input type="number" style="margin-left: 5px;" name="attr_xp" value='0' /&gt;&lt;br/&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;div class="sheet-col"&gt; &lt;table&gt; &lt;tr&gt; &lt;td style='text-align:left;'&gt; &lt;label class='sheet-nameRankXp'&gt;Base:&lt;/label&gt;&lt;input type="text" name="attr_base" value='ROC Southington' /&gt;&lt;br/&gt; &lt;label class='sheet-nameRankXp'&gt;Squad:&lt;/label&gt;&lt;input type="text" name="attr_team" value='TBD' /&gt;&lt;br/&gt; &lt;label class='sheet-nameRankXp'&gt;Fireteam:&lt;/label&gt;&lt;input type="text" name="attr_fireteam" value='TBD' /&gt;&lt;br/&gt; &lt;label class='sheet-nameRankXp'&gt;Kills:&lt;/label&gt;&lt;input type="number" name="attr_kills" value='0' /&gt;&lt;br/&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;hr/&gt; &lt;div class="sheet-2colrow"&gt; &lt;div class="sheet-col"&gt; &lt;h3 style="margin-bottom: 10px; margin-left: 20px; text-align: center; font-family: courier;"&gt;Attributes&lt;/h3&gt; &lt;label&gt;Agility:&lt;/label&gt;&lt;select name="attr_agility" class="sheet-dtype" value='4!'&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt; &lt;label style="width:45px;" &gt;Mod:&lt;/label&gt;&lt;input type="number" name="attr_agility_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label&gt;Smarts:&lt;/label&gt;&lt;select name="attr_smarts" class="sheet-dtype" value='4!'&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt; &lt;label style="width:45px;" &gt;Mod:&lt;/label&gt;&lt;input type="number" name="attr_smarts_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label&gt;Spirit:&lt;/label&gt;&lt;select name="attr_spirit" class="sheet-dtype" value='4!'&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt; &lt;label style="width:45px;" &gt;Mod:&lt;/label&gt;&lt;input type="number" name="attr_spirit_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label&gt;Strength:&lt;/label&gt;&lt;select name="attr_strength" class="sheet-dtype" value='4!'&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt; &lt;label style="width:45px;" &gt;Mod:&lt;/label&gt;&lt;input type="number" name="attr_strength_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label&gt;Vigor:&lt;/label&gt;&lt;select name="attr_vigor" class="sheet-dtype" value='4!'&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt; &lt;label style="width:45px;" &gt;Mod:&lt;/label&gt;&lt;input type="number" name="attr_vigor_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label&gt;Wild Die:&lt;/label&gt;&lt;select name="attr_wilddie" class="sheet-dtype" value='0'&gt; &lt;option value="0"&gt;d0&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;/select&gt;&lt;br&gt; &lt;/div&gt; &lt;div class="sheet-col"&gt; &lt;h3 style="text-align: center; font-family: courier;"&gt;Derived Stats&lt;/h3&gt; &lt;table class='sheet-DStatsTable'&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;&lt;/th&gt; &lt;th&gt;Base&lt;/th&gt; &lt;th&gt;Mod&lt;/th&gt; &lt;th&gt;Armor&lt;/th&gt; &lt;th&gt;Total&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Pace:&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_pace" class="sheet-short" value="6" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_paceMod" class="sheet-short" value="0" /&gt;&lt;/td&gt; &lt;td&gt;&lt;class="sheet-short"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_paceTotal" class="sheet-short" value="@{pace}+@{paceMod}" disabled="true" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Parry:&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_parry" class="sheet-short" value="((@{fighting})/2)+2" disabled="true" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_parryMod" class="sheet-short" value="0" /&gt;&lt;/td&gt; &lt;td&gt;&lt;class="sheet-short"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_parryTotal" class="sheet-short" value="@{parry}+@{parryMod}" disabled="true" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Toughness:&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_toughness" class="sheet-short" value="floor(((@{Vigor})/2)+2)" disabled="true" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_toughnessMod" class="sheet-short" value="0" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_toughnessArmor" class="sheet-short" value="0" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_toughnessTotal" class="sheet-short" value="@{toughness}+@{toughnessMod}+@{toughnessArmor}" disabled="true" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Size:&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_size" class="sheet-short" value="0" /&gt;&lt;/td&gt; &lt;td&gt;&lt;class="sheet-short"&gt;&lt;/td&gt; &lt;td&gt;&lt;class="sheet-short"&gt;&lt;/td&gt; &lt;td&gt;&lt;class="sheet-short"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Encumbrance:&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_encumbrance" class="sheet-short" value="0" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="number" name="attr_encumbranceMod" class="sheet-short" value="0" /&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt;&lt;/th&gt; &lt;th&gt;Current&lt;/th&gt; &lt;th&gt;Max&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Bennies:&lt;/td&gt; &lt;td&gt;&lt;input type='number' name='attr_benny' value='1'&gt;&lt;/td&gt; &lt;td&gt;&lt;input type='number' name='attr_benny_max' value='1'&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Wounds:&lt;/td&gt; &lt;td&gt;&lt;input type='number' name='attr_wounds' value='1'&gt;&lt;/td&gt; &lt;td&gt;&lt;input type='number' name='attr_wounds_max' value='1'&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;hr&gt; &lt;div class="sheet-3colrow"&gt; &lt;div class="sheet-col sheet-skills"&gt; &lt;h3 style="margin-bottom:5px; margin-left:25px; font-family:courier; font-size:16px;"&gt;Primary Skills&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Mod&lt;/h3&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Shooting (AGI)&lt;/label&gt; &lt;select name="attr_shooting" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_shooting_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Throwing (AGI)&lt;/label&gt; &lt;select name="attr_throwing" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_throwing_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Fighting (AGI)&lt;/label&gt; &lt;select name="attr_fighting" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_fighting_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Athletics (AGI)&lt;/label&gt; &lt;select name="attr_athletics" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_athletics_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Notice (SMA)&lt;/label&gt; &lt;select name="attr_notice" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_notice_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Stealth (AGI)&lt;/label&gt; &lt;select name="attr_stealth" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_stealth_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;/div&gt; &lt;div class="sheet-col sheet-skills"&gt; &lt;h3 style="margin-bottom:5px; margin-left:25px; font-family:courier; font-size:16px;"&gt;Secondary Skills&amp;nbsp;&amp;nbsp;Mod&lt;/h3&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Healing (SMA)&lt;/label&gt; &lt;select name="attr_healing" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_healing_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Tactics (SMA)&lt;/label&gt; &lt;select name="attr_tactics" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_tactics_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Xenowarfare (SMA)&lt;/label&gt; &lt;select name="attr_xenoWar" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_xenowarfare_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Remote Ops (SMA)&lt;/label&gt; &lt;select name="attr_remoteOps" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_remoteops_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Repair (SMA)&lt;/label&gt; &lt;select name="attr_repair" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_repair_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:75px; font-size:12px; margin-left:25px;"&gt;Demolitions (SMA)&lt;/label&gt; &lt;select name="attr_demolitions" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_demolitions_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;/div&gt; &lt;div class="sheet-col sheet-skills"&gt; &lt;h3 style="margin-bottom:5px; margin-left:25px; font-family:courier; font-size:16px;"&gt;Tertiary Skills&amp;nbsp;&amp;nbsp;&amp;nbsp;Mod&lt;/h3&gt; &lt;label style="width:80px; font-size:12px; margin-left:25px;"&gt;Intimidation (SPI)&lt;/label&gt; &lt;select name="attr_intimidation" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_intimidation_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:80px; font-size:12px; margin-left:25px;"&gt;Persuasion (SPI)&lt;/label&gt; &lt;select name="attr_persuasion" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_persuasion_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;label style="width:80px; font-size:12px; margin-left:25px;"&gt;Investigation (SMA)&lt;/label&gt; &lt;select name="attr_investigation" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-left:15px;" type="number" name="attr_investigation_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;input type="text" name="attr_skillname1" style="margin-top:5px; width:95px; margin-left:20px; font-size:11px;"/&gt; &lt;select style="margin-top:5px;" name="attr_otherSkill1" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-top:5px; margin-left:15px;" type="number" name="attr_otherskill1_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;input type="text" name="attr_skillname2" style="margin-top:5px; width:95px; margin-left:20px; font-size:11px;"/&gt; &lt;select style="margin-top:5px;" name="attr_otherSkill2" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-top:5px; margin-left:15px;" type="number" name="attr_otherskill2_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;input type="text" name="attr_skillname3" style="margin-top:5px; width:95px; margin-left:20px; font-size:11px;"/&gt; &lt;select style="margin-top:5px;" name="attr_otherSkill3" class="sheet-dtype"&gt; &lt;option value="4!-2"&gt;d4-2&lt;/option&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt;&lt;input style="margin-top:5px; margin-left:15px;" type="number" name="attr_otherskill3_mod" class="sheet-short" value='0'&gt;&lt;br&gt; &lt;/div&gt; &lt;/div&gt; &lt;hr&gt; &lt;div class="sheet-3colrow"&gt; &lt;div class="sheet-col"&gt; &lt;h3 style='font-family: courier; margin-left: 20px;'&gt;Hindrances&lt;/h3&gt; &lt;textarea name="attr_hindrances" style= 'height:100px; width:210px; margin-left:20px; margin-right:5px;'&gt;&lt;/textarea&gt;&lt;br/&gt; &lt;/div&gt; &lt;div class="sheet-col"&gt; &lt;h3 style='font-family: courier; margin-left: 20px;'&gt;Edges&lt;/h3&gt; &lt;textarea name="attr_edges" style= 'height:100px; width:210px; margin-left:20px; margin-right:5px;'&gt;&lt;/textarea&gt; &lt;/div&gt; &lt;div class="sheet-col"&gt; &lt;h3 style='font-family: courier; margin-left: 20px;'&gt;Gear&lt;/h3&gt; &lt;textarea name="attr_gear" style= 'height:100px; width:210px; margin-left:20px; margin-right:20px;'&gt;&lt;/textarea&gt; &lt;/div&gt; &lt;/div&gt; &lt;h3 style='font-family: courier; margin-left: 20px;'&gt;Bio&lt;/h3&gt; &lt;textarea name="attr_bio" style= 'height:200px; width:780px; margin-left:20px; margin-right:20px;'&gt;&lt;/textarea&gt; &lt;/div&gt;
1632411012
Andreas J.
Forum Champion
Sheet Author
Translator
- Default values that are set in the HTML aren't being added as Attributes on the A&amp;A tab unless those values are changed by the player; This is expected behaviour. The A&amp;A tab is from before sheets existed, and it doesn't show all sheet attrs created with char sheets(attributes in repeating sections doesn't show up either). When you have a sheet, the A&amp;A tab isn't needed. - Derived values are updating properly on the character sheet itself (e.g. the Toughness value updates correctly on the sheet when the Vigor die changes), but those derived values aren't getting added (or updated, once added manually) to the A&amp;A tab; Just of the many drawbacks on making sheet calculations using Auto-Calc . Just like the first point, this isn't important. If you end up making another sheet later on, I suggest you check out these Sheet Example &amp; Templates , as they are better made, and doesn't contain &lt;table&gt; (if you want to improve the looks of a sheet, &lt;table&gt; are kinda hard to apply CSS to). For general sheet building info, see Building Character Sheets &amp; it's sidebar. Is the sheet for just personal use, or did you intend to publish it? Roll20 doesn't accept sheet designs containing &lt;table&gt; .
1632425249
GiGs
Pro
Sheet Author
API Scripter
To further add to Andreas post: if you are making a character sheet you should completely ignore the A&amp;A tab. One of the most frequent mistakes new users make is to get worried when the A&amp;A tab doesnt show all the stats, or values look a bit weird. Here are two problems: The Attributes list can not show autocalculating attributes.(Or attributes in repeating sections, either.) When you manually add an attribute to that list with the same name as an autocalculating attribute, its value will be different to the value in the sheet, and this can cause errors. (It's best to delete any such attributes.)
Oh, that's interesting.&nbsp; I'll try and delete the conflicting attributes and see if that gets me where I want to be.&nbsp; I did notice, though, that when the character sheet is generated, the A&amp;A tab is empty of attributes.&nbsp; However, if I change the value of one of the attributes on the character sheet tab (say, for example, the Agility die size) and close-then-reopen the character record, I see that an entry has been created for the Agility attribute in the A&amp;A tab.&nbsp; So if I'm understanding correctly, this is intended behavior?&nbsp; I think I was just confused about the role of the A&amp;A tab -- I'd been thinking it was intended as a way to keep an eye on what values were stored in the character record, rather than a vestigial organ. :D But yeah, just to confirm, I am most definitely *not* looking to publish this sheet;&nbsp; it's just for personal use. Appreciate the heads-up, though!&nbsp;
1632427592
GiGs
Pro
Sheet Author
API Scripter
The A&amp;A tab comes from the time before character sheets, when that was the only way we had to record characters. The Abilities section is still very useful. The Attributes tab is a distraction if you have a character sheet. If the attribute on a character sheet is simple enough, it will be listed in the attributes tab. This is again a legacy of the past. The attributes that are too complex to show up on the attributes list (autocalcs, repeating attributes) weren't in the earliest version of the character sheet - so at that time it was reasonable for the attributes list to be linked to character sheets. They were just alternative ways of showing the same data, But as character sheets have gotten more sophisticated, and can do things that cant be done with a simple list, that list has grown less useful. (And even in the earliest days there were bugs with it when you had a character sheet - attributes with the same name could become disconencted with each other, and could have different values. I havent seen that for years, so I don't know if it's still possible, but used to be a not infrequent source of character corruption). So, overall, if you have a character sheet, the only reason to use the attribute list is for adding attributes that dont exist in the character sheet at all - personal additions. It would be really handy if you could hide all other attributes in that list.
Thanks for the additional context, GiGs!&nbsp; That's helpful to know, and is all new information for me. So now the issue I'm running into is that, since this is Savage Worlds-based, the dice explode.&nbsp; The sheet that I based my sheet on saves the values of the dice to the attributes with the "!" included, and this has been fine so far with all of my macros, as I can just call them with (for example) "/r d@{&lt;character&gt;|vigor}" to get an exploding die roll.&nbsp; For ease of reference, here's where the Vigor attribute is set. &lt;label&gt;Vigor:&lt;/label&gt;&lt;select name="attr_vigor" class="sheet-dtype" value='4!'&gt; &lt;option value="4!"&gt;d4&lt;/option&gt; &lt;option value="6!"&gt;d6&lt;/option&gt; &lt;option value="8!"&gt;d8&lt;/option&gt; &lt;option value="10!"&gt;d10&lt;/option&gt; &lt;option value="12!"&gt;d12&lt;/option&gt; &lt;option value="12!+1"&gt;d12+1&lt;/option&gt; &lt;option value="12!+2"&gt;d12+2&lt;/option&gt; &lt;option value="12!+3"&gt;d12+3&lt;/option&gt; &lt;option value="12!+4"&gt;d12+4&lt;/option&gt; &lt;/select&gt; &lt;label style="width:45px;" &gt;Mod:&lt;/label&gt;&lt;input type="number" name="attr_vigor_mod" class="sheet-short" value='0'&gt;&lt;br&gt; Next, in the autocalculated Toughness field, the formula currently in the sheet is: &lt;td&gt;&lt;input type="number" name="attr_toughness" class="sheet-short" value="(@{Vigor}/2)+2" disabled="true" /&gt;&lt;/td&gt; This resolves perfectly fine on the character sheet itself;&nbsp; for an attr_vigor value of d8, the attr_toughness field displays a value of 6 on the character sheet.&nbsp; If I change the Vigor die to d10, Toughness resolves to 7.&nbsp; However, when this value is called in my macros, it does not compute.&nbsp; Rather than pulling only the final resolved attr_toughness value, the macro pulls the whole formula, which then fails when it hits the "!" baked into the attr_vigor value. So, to get around this without having to just manually enter the toughness value, is there any way to either: A) Have a macro pull the resolved output value from the attr_toughness field rather than the whole formula?;&nbsp; or B) Somehow strip the "!" off the value of attr_vigor for only the purposes of calculating attr_toughness so that it doesn't break the macro when it tries to calculate the result? Thank you!
1632471029
GiGs
Pro
Sheet Author
API Scripter
It's a long shot, but in your macro, try putting [[ ]] around the attribute reference, like /r d@[[{&lt;character&gt;|vigor}]]. Normal ( ) brackets might work, too. If that doesnt work, you likely have no way to resolve this without making a massive edit to the sheet. Which would mean changing every select so the options have codes without the !, and a sheet worker to convert those into values for use in your macros. This could be done kind of quickly with find/replace if you know what you're doing and plan out the changes properly.
1632492980

Edited 1632520119
LOL -- there's the rub!&nbsp; I don't know what I'm doing! The brackets around the reference unfortunately didn't work -- the macro just hangs and doesn't provide any output at all when I do that.&nbsp; I've started reading up on sheetworkers (haven't used them at all yet) and have started to wrap my brain around how they work.&nbsp; I'm a total JavaScript novice, though, so may fumble a bit here. I took a look at the replace() function to see if it might be helpful here and came up with the below based on the example sheetworker in the "sheetworker examples for non-programmers" page, but the character sheet field isn't updating in response to changes to the attr_vigor &nbsp;value.&nbsp; Hoping there's just a simple dumb fix that I'm missing, but if you (or anyone else who does &nbsp;know what they're doing) can take a look and let me know where I'm going wrong, I'd appreciate it! For reference, here's where attr_toughness is displayed in the sheet: &lt;td&gt;&lt;input type="number" name="attr_toughness" class="sheet-short" value="4" /&gt;&lt;/td&gt; And here's the sheetworker I cobbled together with spit and baling wire: &lt;script type="text/worker"&gt; on("change:vigor sheet:opened", function() { getAttrs(["vigor"], function(values) { let vig = vigor; vig.replace("!", ""); let vig = parseInt(values.vig)||0; let toughcalc = (floor(vig/2)+2); setAttrs({ "toughness": toughcalc }); }); }); Intended behavior would be that attr_toughness &nbsp;defaults to a value of 4, but then when the sheet is opened or when the value of&nbsp; attr_vigor &nbsp;changes, the sheetworker pulls the value of attr_vigor , strips out the "!", runs the calculation, and then sets the value of attr_toughness &nbsp;to the result. Thank you!
1632495355
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I realize these statements come from the point of view of a sheet designer, but the Attributes section of the A&amp;A tab still has a great deal of utility for the end user. The end user can create homebrew attributes, tag information, new currencies, holding places for numbers that need to be referenced by formulas, and more. You can also use it to investigate attributes the sheet is using to diagnose problems. It's generally correct to say that a sheet should not need to have any presence on the A&amp;A tab, but to generally say that it isn't needed or that it is a distraction seems unwarranted. Unless I am missing some context. Andreas J. said: This is expected behaviour. The A&amp;A tab is from before sheets existed, and it doesn't show all sheet attrs created with char sheets(attributes in repeating sections doesn't show up either). When you have a sheet, the A&amp;A tab isn't needed. GiGs &nbsp;said: The A&amp;A tab comes from the time before character sheets, when that was the only way we had to record characters. The Abilities section is still very useful. The Attributes tab is a distraction if you have a character sheet
@Keith - FWIW I am most definitely still getting a great deal of use out of the Attributes section of the A&amp;A tab as I set up my game, using it for tracking temporary status effects, to-hit modifiers, etc.&nbsp; My misstep was not realizing that auto-calculated attributes in a character sheet did not automatically get a corresponding attribute field on the A&amp;A tab, and then adding my own field and seeing it populate with the correct number but without realizing that it would not autoupdate when the base attribute changed, so the conversation has been helpful to me in clarifying that. :) Now I just need to develop my understanding of sheetworkers so I can get the Toughness and Parry derived attributes to compute correctly!
1632520061
GiGs
Pro
Sheet Author
API Scripter
Keith, that's why I said this: GiGs said: So, overall, if you have a character sheet, the only reason to use the attribute list is for adding attributes that dont exist in the character sheet at all - personal additions. It would be really handy if you could hide all other attributes in that list. And I've made the last sentence bold because it would make that list much more useful and less of a distraction to new sheet designers.
1632522775
GiGs
Pro
Sheet Author
API Scripter
Jeff H. said: And here's the sheetworker I cobbled together with spit and baling wire: &lt;script type="text/worker"&gt; on("change:vigor sheet:opened", function() { getAttrs(["vigor"], function(values) { let vig = vigor; vig.replace("!", ""); let vig = parseInt(values.vig)||0; let toughcalc = (floor(vig/2)+2); setAttrs({ "toughness": toughcalc }); }); }); You do have a couple of problems in this worker, but dont feel too bad - we all make mistakes starting out. First, this line will be empty: let vig = vigor; Sheet workers have no knowledge of a sheet's contents. It doesnt know what 'vigor' is refering to here. The setAttrs function on the second line is the solution here: you supply a set of attribute names (or just one, like "vigur") here, and it reads the character sheet, grabs the value of that attribute, and stores it in the object called values named later on the same line: getAttrs(["vigor"], function(values) { To access that value you then have to grab it from the values object: let vig = values.vigor; With that done, you now have the value of vigour stored in your vig variable. Second, you define vig in two places. You define variables with the keywords let, const, or var . Generally if you don't know the differences, just use let like you have here. However, you cannot define the same variable multiple times. You have two let vig =&nbsp; statements. The second one is causing ther worker to crash. Another problem is the replace function vig.replace("!", ""); You need to save that value. You can do that by updating the vig variable, like so: vig = vig.replace("!", ""); This line is also a problem: let toughcalc = (floor(vig/2)+2); floor is a macro function, and isnt recognised in sheet workers. There you have to use Math.floor. It's used the same way though: let toughcalc = Math.floor(vig/2)+2; (You don't need the outer brackets.) The final problem is your parseInt statement, and this one is a biggie. Let's say vig is "12+3". parseInt will stop at the first entry that is not a number and ignore everything after, so the result of that would be vig = 12. the +3 would be ignored. This is the trickiest problem and isn't routine to solve. So when you have a value like 12+3, you need to split it into two variables (12 and 3) and add them together. In fact there are a lot of ways to do this, but there are all pretty hard to explain to people inexperienced in the madness of coding. The following is not the simplest way to write it, but is one of the easiest ways to explain it, and gives you code you can reuse later, so it's a useful example. let &nbsp; vigValue &nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( vig . includes ( "+" ))&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; let &nbsp; vigNumbers &nbsp;=&nbsp; vig . split ( "+" ); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vigValue &nbsp;=&nbsp; parseInt ( vigNumbers [ 0 ])&nbsp;+&nbsp; parseInt ( vigNumbers [ 1 ]); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if ( vig . includes ( "-" ))&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; let &nbsp; vigNumbers &nbsp;=&nbsp; vig . split ( "-" ); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vigValue &nbsp;=&nbsp; parseInt ( vigNumbers [ 0 ])&nbsp;-&nbsp; parseInt ( vigNumbers [ 1 ]); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vigValue &nbsp;=&nbsp; parseInt ( vig ) || 0; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} Lets break this down. We know that vigor is a select , and can only have the values listed in the select, or be undefined (if no one has selected anythign yet). So we need to handle 3 types of values - simple numbers: 4, 6, 8, 10, 12; those with a + in it: "12+1, 12+2, 12+3, 4-2; and those which havent been set. So we can do this with an if statement: we check if something is true, and if so, build a value using the method needed for that, and so on. So if vig includes("+") we need to split the value using the +, and add together the two values. Likewise if vig includes a minus, we need to split the two values and subtract the second from the first. (We could simply set the value to 2, since 4-2 is 2 and that's the only such value, but this method is universal and handles if the attributes are every changed). Finally we handle if vig includes numbers or is not a number with the same line: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vigValue&nbsp;=&nbsp;parseInt(vig) || 0; parseInt tries to turn vig into a number - and if it is 4, 6, 8, 10, or 12, this will work perfectly. If it is anything else, it will be set to 0 (thats what the ||0) does. So putting that all together, we get on ( "change:vigor&nbsp;sheet:opened" ,&nbsp; function ()&nbsp;{&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; getAttrs ([ "vigor" ],&nbsp; function ( values )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; let &nbsp; vig &nbsp;=&nbsp; values . vigor ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vig &nbsp;=&nbsp; vig . replace ( "!" ,&nbsp; "" ); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; let &nbsp; vigValue &nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( vig . includes ( "+" ))&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; let &nbsp; vigNumbers &nbsp;=&nbsp; vig . split ( "+" ); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vigValue &nbsp;=&nbsp; parseInt ( vigNumbers [ 0 ])&nbsp;+&nbsp; parseInt ( vigNumbers [ 1 ]); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp; if ( vig . includes ( "-" ))&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; let &nbsp; vigNumbers &nbsp;=&nbsp; vig . split ( "-" ); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vigValue &nbsp;=&nbsp; parseInt ( vigNumbers [ 0 ])&nbsp;-&nbsp; parseInt ( vigNumbers [ 1 ]); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vigValue &nbsp;=&nbsp; parseInt ( vig ); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; let &nbsp; toughcalc &nbsp;=&nbsp; Math . floor ( vigValue / 2 )+ 2 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setAttrs ({&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; toughness : &nbsp; toughcalc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}); &nbsp;&nbsp;&nbsp;&nbsp;}); &nbsp;}); Another final note: in setAttrs, you don;t need to use "toughness", you can drop the quotes if the name doesnt include any special characters like a dash. So, in conclusion, sheet workers can take a LOT more work to make work than simple autocalc attributes. But often they are the only way to do something, and they are a lot more efficient.
GiGs said: You do have a couple of problems in this worker, but dont feel too bad - we all make mistakes starting out. I'm actually pretty open and accepting of my inexperience here :D, but I really do appreciate the willingness of you and the rest of the community to help me not only work through the problems I'm encountering but also to include explanations to help me when I encounter similar issues down the line.&nbsp; I'm learning a lot!&nbsp; (including repurposing that sheetworker to get the derived Parry value to work...) So yes -- your post is hugely helpful and works perfectly (and I don't even have to rewrite swaths of macros!);&nbsp; thank you for the help, GiGs!
1632526570
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I would love it if this was a setting that could be toggled. Frequently, it serves a function by allowing end users to discover which attributes exist or what the hidden values might be. Example: sometimes I have seen Charactermancer issues solved by being able to find a toggle on the A&amp;A attribute and flipping it. Another example, the D&amp;D 5th Edition by Roll20 Sheet sheet uses a built-in Ability for ability checks*. In the case of high level characters with special features, those ability checks are expanded into attributes**, attributes that do not appear on the gui sheet.&nbsp; Although I imagine that you could find a lot of these attributes with the&nbsp; Inspector, most folks don't have a clue where to start with that. Primarily though, I didn't want a newcomer who might be following along to take the quoted statements at face value and believe that half of the tab to have no value.*** GiGs said: Keith, that's why I said this: GiGs said: So, overall, if you have a character sheet, the only reason to use the attribute list is for adding attributes that dont exist in the character sheet at all - personal additions. It would be really handy if you could hide all other attributes in that list. And I've made the last sentence bold because it would make that list much more useful and less of a distraction to new sheet designers. * I hate that confluence of terminologies ** Blech. Why can't we have nice things? *** That's why I prefaced with " I realize these statements come from the point of view of a sheet designer , but the Attributes section of the A&amp;A tab still has a great deal of utility for the end user." **** Ha! You've fallen into my trap! There is no fourth footnote origin! Roll a SAN check or I steal your Quickening!
1632541868

Edited 1632541972
GiGs
Pro
Sheet Author
API Scripter
keithcurtis said: I would love it if this was a setting that could be toggled. &lt;snip&gt; Primarily though, I didn't want a newcomer who might be following along to take the quoted statements at face value and believe that half of the tab to have no value.*** I think its better to discourage its use as strongly as possoble to sheet designers (we are in the character sheet forum after all), where it is a massive iirelevance and frequently trips up new designers - it's a very common topic here. While it's true they have some value, on occasion, to general users (not sheet designers), it still remains largely completely irrelevant for most users somehwere between 95 and 100% of the time. (I maybe be being glib with those numbers, but it's really not common.) I too would really love a togglable button, so you can hide the unneeded attributes by default, but get them back on the tiny percentage of time they are needed.
1632541920
GiGs
Pro
Sheet Author
API Scripter
Jeff H. said: So yes -- your post is hugely helpful and works perfectly (and I don't even have to rewrite swaths of macros!);&nbsp; thank you for the help, GiGs! I'm very happy to hear it :)