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

Ability only working in one game

1591554254

Edited 1591561591
Eli N.
Pro
Compendium Curator
So I have this weird thing happening. I have a test game where I work on my character sheets to see how they are working. Right now this ability is working perfect. So I have a box that displays the full defense value of a weapon, and a select option to allow a shield to be calculated or not.   <div class="sheet-col-1-16"><input type="number" name="attr_weapon_defense_mod_total" value="@{fatigue_defense}+@{weapon_misc_defense}+@{weapon_style_defense}+@{wisdom_defense_mod}+@{dexterity_defense_mod}+@{weapon_spec_defense}+@{weapon_talent_defense}+@{armor_defense_bonus}+@{shield_defense_bonus}+@{natural_defense_bonus}+@{encumbrance_defense_mod}" disabled="disabled"/></div>  <div class="sheet-col-1-16" title="Choose if this weapon uses a shield"> <select name="attr_shield_defense_bonus"> <option value="0">N</option> <option value="@{shield_defense_bonus_value}">Y</option> </select> </div> With the shield value                  <div class="sheet-col-1-8"><input type="number" name="attr_shield_defense_bonus_value" value="0"/></div> The shield value is not in a repeating section, but the shield selection and the defense mod total is in a repeating section.  The HTML&CSS is the same in both games.  The code is working in my tester  game. But I copied it over in to my other game....and it does not work. I don't know what to even thing. The code in the previous iteration looked like this, so I added a middle man variable.   <div class="sheet-col-1-16"><input type="number" name="attr_weapon_defense_mod_total" value="@{fatigue_defense}+@{weapon_misc_defense}+@{weapon_style_defense}+@{wisdom_defense_mod}+@{dexterity_defense_mod}+@{weapon_spec_defense}+@{weapon_talent_defense}+@{armor_defense_bonus}+@{shield_defense_bonus}+@{natural_defense_bonus}+@{encumbrance_defense_mod}" disabled="disabled"/></div> <div class="sheet-col-1-8"><input type="number" name="attr_shield_defense_bonus" value="0"/></div>
1591554685
Eli N.
Pro
Compendium Curator
Its working in 2 of my campaigns, and in another 2, not at all 
1591555258
GiGs
Pro
Sheet Author
API Scripter
When you say it's not working, what do you mean?  That the  weapon_defense_mod_total calculation is not displaying at all, not adding up to the correct total, or something else? If it's in a repeating section, does it work in some rows, and not others? If you enter the attribute in chat, do you get an error? Enter @{selected|repeating_SECTIONNAME_$0_weapon_defense_mod_total} with the characters token selected. (eRplace SECTIONNAME with whatever the section's name is)
1591559180

Edited 1591559319
Eli N.
Pro
Compendium Curator
Oh it's displaying, it's just not adding the shield modifier. It's not working in any of the repeating sections.  Sorry for lack of details, I thought it was working perfectly and then this is just driving me up the wall. 
1591560673

Edited 1591560705
It looks like you need a closing angle bracket for the input element before the </div> closing tag: <div class="sheet-col-1-8"><input type="number" name="attr_shield_defense_bonus" value="0"/ > </div>
1591561714
Eli N.
Pro
Compendium Curator
That was in the old code, that surprisingly worked