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

Repeating Section Attribute Not Being Created

I have a fieldset repeating section.. <table class="sheet-skillsTable"> <tr> <th class="sheet-skillClassSkill">CS</th> <th class="sheet-skillName"> Skill Name </th> <th class="sheet-skillBonus"> Bonus </th> <th class="sheet-skillEmpty"></th> <th class="sheet-skillRanks"> Ranks </th> <th class="sheet-skillEmpty"></th> <th class="sheet-skillAbility"> Mod </th> <th class="sheet-skillEmpty"></th> <th class="sheet-skillACP"> ACP </th> <th class="sheet-skillEmpty"></th> <th class="sheet-skillMisc"> Misc </th> <th class="sheet-skillEmpty"></th> <th class="sheet-skillMisc"> Misc </th> <th class="sheet-skillEmpty"></th> <th class="sheet-skillMisc"> Misc </th> <th class="sheet-skillNickname"> Nickname </th> </tr> </table> <fieldset class="repeating_skills"> <table class="sheet-repSkills"> <tr> <td class="sheet-skillClassSkill"><input type="checkbox" name="attr_classSkill" class="sheet-skillClassSkill"/></td> <td class="sheet-skillName"><input type="text" name="attr_skillName" class="sheet-skillName"/></td> <td class="sheet-skillBonus"><input type="number" name="attr_skillBonus" class="sheet-skillBonus" disabled="true" value="(@{skillRanks}+@{skillAbilityMod}+@{skillACP}+@{skillMisc1}+@{skillMisc2}+@{skillMisc3})"/></td> <td class="sheet-skillEmpty"><span class="sheet-skillEmpty">=</span></td> <td class="sheet-skillRanks"><input type="number" name="attr_skillRanks" class="sheet-skillRanks" value="0"/></td> <td class="sheet-skillEmpty"><span class="sheet-skillEmpty">+</span></td> <td class="sheet-skillAbility"><select name="attr_skillAbilityMod" class="sheet-skillAbility"> <option value="0">None</option> <option value="@{STR_Mod}" selected="selected">STR</option> <option value="@{DEX_Mod}">DEX</option> <option value="@{CON_Mod}">CON</option> <option value="@{INT_Mod}">INT</option> <option value="@{WIS_Mod}">WIS</option> <option value="@{CHA_Mod}">CHA</option> </select></td> <td class="sheet-skillEmpty"><span class="sheet-skillEmpty">+</span></td> <td class="sheet-skillACP"><input type="checkbox" value="@{armor_acp}+@{shield_acp}" name="attr_skillACP" class="sheet-skillACP"/></td> <td class="sheet-skillEmpty"><span class="sheet-skillEmpty">+</span></td> <td class="sheet-skillMisc"><input type="number" name="attr_skillMisc1" class="sheet-skillMisc" value="0"/></td> <td class="sheet-skillEmpty"><span class="sheet-skillEmpty">+</span></td> <td class="sheet-skillMisc"><input type="number" name="attr_skillMisc2" class="sheet-skillMisc" value="0"/></td> <td class="sheet-skillEmpty"><span class="sheet-skillEmpty">+</span></td> <td class="sheet-skillMisc"><input type="number" name="attr_skillMisc3" class="sheet-skillMisc" value="0"/></td> <td class="sheet-skillNickname"><input type="text" name="attr_skillNickName" class="sheet-skillNickname"/></td> </tr> </table> </fieldset> For some reason, the attr_skillBonus isn't being created. It still displays on the character sheet, but there's no attribute on the back end for it. {"name":"repeating_skills_9_skillName","current":"Move Silently","max":"","_id":"-JfpYnpXlmyXJFAk5wG-","_type":"attribute","_characterid":"-JfpEe27oTzuK5nfC_2S"} {"name":"repeating_skills_9_skillRanks","current":"2","max":"","_id":"-JfpYoMrPeYfyoRwdnPi","_type":"attribute","_characterid":"-JfpEe27oTzuK5nfC_2S"} {"name":"repeating_skills_9_skillAbilityMod","current":"@{DEX_Mod}","max":"","_id":"-JfpYogwidGSp9bQkrva","_type":"attribute","_characterid":"-JfpEe27oTzuK5nfC_2S"} {"name":"repeating_skills_9_skillMisc1","current":"5","max":"","_id":"-JfpYpufhVg7M80BMbj_","_type":"attribute","_characterid":"-JfpEe27oTzuK5nfC_2S"} {"name":"repeating_skills_9_skillACP","current":"@{armor_acp}+@{shield_acp}","max":"","_id":"-JfpYpwKD3499ZPLo4Mq","_type":"attribute","_characterid":"-JfpEe27oTzuK5nfC_2S"} {"name":"repeating_skills_9_skillMisc2","current":"0","max":"","_id":"-Jfp_jl_CBm5s04vZXyw","_type":"attribute","_characterid":"-JfpEe27oTzuK5nfC_2S"} {"name":"repeating_skills_9_skillMisc3","current":"0","max":"","_id":"-Jfp_jqweo-jYqyzDvmh","_type":"attribute","_characterid":"-JfpEe27oTzuK5nfC_2S"} According to the API documentation for working with character sheets : Note that fields which have auto-calculated values will return the formula rather than the result of the value. You can then pass that formula to sendChat() to use the dice engine to calculate the result for you automatically. I thought it may have something to do with the input being disabled, but my repeating weapons section works just fine. <fieldset class="repeating_weapons"> <table class="sheet-weaponsTable"> <tr> <th class="sheet-weaponName">Weapon Name</th> <th class="sheet-weaponMaterial">Material</th> <th class="sheet-weaponNickName">Nick Name</th> </tr> <tr> <td class="sheet-weaponName"><input type="text" name="attr_weaponName" class="sheet-weaponName"/></td> <td class="sheet-weaponMaterial"><input type="text" name="attr_weaponMaterial" class="sheet-weaponMaterial"/></td> <td class="sheet-weaponNickName"><input type="text" name="attr_weaponNickName" class="sheet-weaponNickName"/></td> </tr> </table> <table class="sheet-weaponsTable"> <tr> <th class="sheet-weaponEnh">Enh</th> <th class="sheet-weaponAtkMod">Atk Mod</th> <th class="sheet-weaponMiscAtk">Misc Atk</th> <th class="sheet-weaponTotalAtk">Total Atk</th> <th class="sheet-weaponCrit">Crit</th> <th class="sheet-weaponBase">Base</th> </tr> <tr> <td class="sheet-weaponEnh"><input type="number" name="attr_weaponEnh" class="sheet-weaponEnh"/></td> <td class="sheet-weaponAtkMod"><select name="attr_weaponAtkMod" class="sheet-weaponAtkMod"> <option value="0">None</option> <option value="@{STR_Mod}" selected="selected">STR</option> <option value="@{DEX_Mod}">DEX</option> <option value="@{INT_Mod}">INT</option> <option value="@{WIS_Mod}">WIS</option> <option value="@{CHA_Mod}">CHA</option> </select></td> <td class="sheet-weaponMiscAtkBonus"><input type="number" name="attr_weaponMiscAtkBonus"/></td> <td class="sheet-weaponTotalAtkBonus"><input type="number" name="attr_weaponTotalAtkBonus" disabled="true" value="@{weaponMiscAtkBonus}+@{weaponEnh}+@{weaponAtkMod}+@{BAB}"/></td> <td class="sheet-weaponCrit"> <input type="number" name="attr_weaponThreat" class="sheet-weaponCritThreat"/>-20/x <input type="number" name="attr_weaponCritMultiplier" class="sheet-weaponCritMultiplier"/> </td> <td class="sheet-weaponBase"><input type="text" name="attr_weaponBase" class="sheet-weaponBase"/></td> </tr> </table> <table class="sheet-weaponsTable"> <tr> <th class="sheet-weaponRange">Range</th> <th class="sheet-weaponDefend">Defense</th> <th class="sheet-weaponSpecial">Special</th> </tr> <tr> <td class="sheet-weaponRange"><input type="number" name="attr_weaponRange" class="sheet-weaponRange"/></td> <td class="sheet-weaponDefend"> <select name="attr_weaponDefend" class="sheet-weaponDefend"> <option value="ac">AC</option> <option value="t">Touch</option> <option value="ff">Flat-Footed</option> <option value="fort">Fort Save</option> <option value="ref">Reflex Save</option> <option value="will">Will Save</option> </select> </td> <td class="sheet-weaponSpecial"><input type="text" name="attr_weaponSpecial" class="sheet-weaponSpecial"/></td> </tr> </table> <table class="sheet-weaponsTable"> <tr> <th class="sheet-weaponDamage">Damage</th> </tr> <tr> <td class="sheet-weaponDamage"><input type="text" name="attr_weaponDamage" class="sheet-weaponDamage"/></td> </tr> </table> <table class="sheet-weaponsTable"> <tr> <th class="sheet-weaponCritDamage">Crit Damage</th> </tr> <tr> <td class="sheet-weaponCritDamage"><input type="text" name="attr_weaponCritDamage" class="sheet-weaponCritDamage"/></td> </tr> </table> <hr/> </fieldset> The attr_weaponTotalAtk bonus works just fine, which rules out the disabled control being the problem. Thoughts?
1432082754
Sam
Pro
Sheet Author
AFAIK, repeating sections don't create accessible attributes.
1432084861

Edited 1432084903
Coal Powered Puppet
Pro
Sheet Author
Double check your value. (@{skillRanks}+@{skillAbilityMod}+@{skillACP}+@{skillMisc1}+@{skillMisc2}+@{skillMisc3}) I think one or more of your "skillAbilityMod" or "skillACP" might be broken, which is shattering these fields. This is what I got when I made it: I needed to make "STR_MOD", "shield_acp" and "armor_acp", but once those were in, the numbers filled in nicely
The number calculates correctly when viewing the character sheet, it just doesn't create the attribute in the back end like it should, which prevents me from accessing it in the api. STR_MOD, shield_acp, and armor_acp are in a different section of the page, and those attributes exist. Functionally, it should be no different from the weaponTotalAtkBonus in the second code section I posted.
Do me a favor and remove it from the field set, and see if the number works then. It shouldn't matter, but if it doesn't work, then we'll know the problem is something else.
Remove which specifically? The select list and the acp check box? Or the skillBonus?
1432108978
Kryx
Pro
Sheet Author
API Scripter
Samuel T. said: AFAIK, repeating sections don't create accessible attributes. The attributes are definitely accessible. Rolls, however, are not.
1432110105
Finderski
Pro
Sheet Author
Compendium Curator
The problem with <fieldset>s is that they don't initialize until manually initialized. So, even if you put a default value in a field, it's not really there until you manually enter it. So, chances are, because you can't manually initialize the field (because it's disabled), it's not really going to be available. If you want to test it, put the skillBonus field outside of the field set and have it calculate using: @{repeating_skills_0_skillRanks}+@{repeating_skills_0_skillAbilityMod}+@{repeating_skills_0_skillACP}+@{repeating_skills_0_skillMisc1}+@{repeating_skills_0_skillMisc2}+@{repeating_skills_0_skillMisc3} If that works, then that is the problem, the calculated field, while displaying properly, isn't being initialized. Of course, that will only work after you manually enter values in all those fields. Then, you can go and cast a vote in support of repeating fields being more fully supported in character sheets . :)
@G V. : If that's the case, then why do my weapon total bonuses work? They're disabled as well, and cannot be manually set.