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

Character Sheet not creating attributes

I tried posting this on the character sheet forum, but it's going nowhere quickly. Since the problem impacts my ability to use the API, I figured someone here might know. I have a fieldset repeating section.. <table> <tr> <th>CS</th> <th> Skill Name </th> <th> Bonus </th> <th></th> <th> Ranks </th> <th></th> <th> Mod </th> <th></th> <th> ACP </th> <th></th> <th> Misc </th> <th></th> <th> Misc </th> <th></th> <th> Misc </th> <th> Nickname </th> </tr> </table> <fieldset> <table> <tr> <td ><input type="checkbox" name="attr_classSkill" /></td> <td><input type="text" name="attr_skillName"/></td> <td><input type="number" name="attr_skillBonus" disabled="true" value="(@{skillRanks}+@{skillAbilityMod}+@{skillACP}+@{skillMisc1}+@{skillMisc2}+@{skillMisc3})"/></td> <td><span >=</span></td> <td><input type="number" name="attr_skillRanks" value="0"/></td> <td><span >+</span></td> <td><select name="attr_skillAbilityMod" > <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><span >+</span></td> <td><input type="checkbox" value="@{armor_acp}+@{shield_acp}" name="attr_skillACP" /></td> <td><span >+</span></td> <td><input type="number" name="attr_skillMisc1" value="0"/></td> <td><span >+</span></td> <td><input type="number" name="attr_skillMisc2" value="0"/></td> <td><span >+</span></td> <td><input type="number" name="attr_skillMisc3" value="0"/></td> <td><input type="text" name="attr_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> <table> <tr> <th>Weapon Name</th> <th>Material</th> <th>Nick Name</th> </tr> <tr> <td><input type="text" name="attr_weaponName"/></td> <td><input type="text" name="attr_weaponMaterial"/></td> <td><input type="text" name="attr_weaponNickName"/></td> </tr> </table> <table> <tr> <th>Enh</th> <th>Atk Mod</th> <th>Misc Atk</th> <th>Total Atk</th> <th>Crit</th> <th>Base</th> </tr> <tr> <td><input type="number" name="attr_weaponEnh"/></td> <td><select name="attr_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><input type="number" name="attr_weaponMiscAtkBonus"/></td> <td><input type="number" name="attr_weaponTotalAtkBonus" disabled="true" value="@{weaponMiscAtkBonus}+@{weaponEnh}+@{weaponAtkMod}+@{BAB}"/></td> <td> <input type="number" name="attr_weaponThreat"/>-20/x <input type="number" name="attr_weaponCritMultiplier"/> </td> <td><input type="text" name="attr_weaponBase"/></td> </tr> </table> <table> <tr> <th>Range</th> <th>Defense</th> <th>Special</th> </tr> <tr> <td><input type="number" name="attr_weaponRange" /></td> <td> <select name="attr_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><input type="text" name="attr_weaponSpecial"/></td> </tr> </table> <table> <tr> <th>Damage</th> </tr> <tr> <td><input type="text" name="attr_weaponDamage"/></td> </tr> </table> <table> <tr> <th>Crit Damage</th> </tr> <tr> <td><input type="text" name="attr_weaponCritDamage"/></td> </tr> </table> <hr/> </fieldset> The attr_weaponTotalAtk bonus works just fine, which rules out the disabled control being the problem. Thoughts?
1432133942
The Aaron
Pro
API Scripter
Can you pull it with getAttrByName()?
1432134075
The Aaron
Pro
API Scripter
One other thing, which might not be it (and if it is, it's a bit dumb...), I notice that your attr_weaponTotalAtk appears after the fieldset it references, and your attr_skillBonus appears before the fieldset it references. Some sort of order of operations issue maybe?
I can't pull it using getAttrByName. I had it list all attributes with the given integer in their name, which only returned {"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"} The attribute just doesn't seem to exist. I'll try reordering them this afternoon and see if that works.
1432135074
The Aaron
Pro
API Scripter
Another difference I notice is the parentheses around the formula. That shouldn't affect it, but it is a difference. If you were able to pull it with findObjs(), it would have the formula for the current, not the result. Ditto getAttrByName().
Yeah, just getting the formula would be great. That's what I get from the totalWeaponAtkBonus attribute. I've removed the parenthases, testing now, then reordering and retesting.
No luck with either of those. :(
1432142583
The Aaron
Pro
API Scripter
Bummer. =/
1432142667
Umbra
Plus
Sheet Author
I had the opposite problem with the L5R sheet: the background attribute was created, but the value itself didn't show. The way I managed to solve it was to remove the fieldset tags that don't have a name attached to them. The tag has a specific purpose in HTML forms, but don't apply in this particular case and might be screwing with your variables. Give your fieldset a name (like "repeating_skills") and see if that helps you.
I just noticed it removed my classes in the forum post. Yes, it already has classes... <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>
since my weapon bonus didn't have a class on the input, I removed the class from the skill input control and added a new skill to test it. No luck. :(