Obsidian Portal
Menu
Sign In / Create Account
JavaScript is currently disabled. Obsidian Portal has a lot of really cool features that use JavaScript. You should check them out. We think you'll have a much more enjoyable experience.
Home
Campaigns
Games Nearby
Plans
Community
Help
Resources
Theoremancer's D&D 5e sheet
Author:
Theoremancer
Slug:
theoremancer_dnd5e
Type:
GameCharacter
System:
D&D 5E
DST Source Code
HTML Template
<!-- General --> <section class="theoremancer_dnd5e_section"> <table class="theoremancer_dnd5e_general_info" cellspacing="0" cellpadding="0" border="0"> <tr> <td rowspan="5"> <span class="dsf dsf_avatar_image readonly"></span> </td> <td colspan="2"> <span class="dsf dsf_name readonly"></span> </td> </tr> <tr> <td> <label>Campaign</label> <span class="dsf dsf_campaign readonly"></span> </td> <td> <label>Player</label> <span class="dsf dsf_player readonly"></span> </td> </tr> <tr> <td> <label>Race</label> <span class="dsf dsf_race"></span> </td> <td> <label>Size</label> <span class="dsf dsf_size"></span> </td> </tr> <tr> <td> <label>Class & Level</label> <span class="dsf dsf_class"></span> </td> <td> <label>Current XP</label> <span class="dsf dsf_experience"></span> </td> </tr> <tr> <td> <label>Background</label> <span class="dsf dsf_background"></span> </td> <td> <label>Next Level at</label> <span class="dsf dsf_experience_next"></span> </td> </tr> </table> </section> <!-- Abilities, Combat, Attacks, Traits/Feats, Items --> <section class="theoremancer_dnd5e_section"> <div class="theoremancer_dnd5e_abilitiessavesskills"> <table class="theoremancer_dnd5e_headersection theoremancer_dnd5e_abilities" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th>Abilities</th> </tr> </thead> <tbody> <tr> <td> <div class="theoremancer_dnd5e_proficiency"> <span class="theoremancer_dnd5e_mod dsf dsf_proficiency">+2</span> <label>Proficiency Bonus</label> </div> <div class="theoremancer_dnd5e_str theoremancer_dnd5e_addtarget_strskill"> <div class="theoremancer_dnd5e_abilitytemp"> <span class="theoremancer_dnd5e_score dsf dsf_strtemp" title="Temporary score"></span> <label>Temporary</label> </div> <div class="theoremancer_dnd5e_ability"> <span class="theoremancer_dnd5e_score dsf dsf_str" title="Natural score"></span> <span class="theoremancer_dnd5e_mod dsf dsf_str_mod readonly" title="Strength modifier"></span> <label>Strength</label> <span class="dsf dsf_ctlStrSkillCount" style="display:none">0</span> </div> <div class="theoremancer_dnd5e_save"> <span class="dsf dsf_strsave_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_strsave_mod readonly"></span> <label>Saving Throw</label> (<span class="theoremancer_dnd5e_score dsf dsf_strsave_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_athletics_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_athletics_mod readonly"></span> <label>Athletics</label> (<span class="theoremancer_dnd5e_score dsf dsf_athletics_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill theoremancer_dnd5e_customskill"> <span class="dsf dsf_strskill1_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_strskill1_mod readonly"></span> <label class="dsf dsf_strskill1_name"></label> (<span class="theoremancer_dnd5e_score dsf dsf_strskill1_misc_mod" title="Miscellaneous"></span>) </div> </div> <div class="theoremancer_dnd5e_dex theoremancer_dnd5e_addtarget_dexskill"> <div class="theoremancer_dnd5e_abilitytemp"> <span class="theoremancer_dnd5e_score dsf dsf_dextemp" title="Temporary score"></span> <label>Temporary</label> </div> <div class="theoremancer_dnd5e_ability"> <span class="theoremancer_dnd5e_score dsf dsf_dex" title="Natural score"></span> <span class="theoremancer_dnd5e_mod dsf dsf_dex_mod readonly" title="Dexterity modifier"></span> <label>Dexterity</label> <span class="dsf dsf_ctlDexSkillCount" style="display:none">0</span> </div> <div class="theoremancer_dnd5e_save"> <span class="dsf dsf_dexsave_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_dexsave_mod readonly"></span> <label>Saving Throw</label> (<span class="theoremancer_dnd5e_score dsf dsf_dexsave_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_acrobatics_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_acrobatics_mod readonly"></span> <label>Acrobatics</label> (<span class="theoremancer_dnd5e_score dsf dsf_acrobatics_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_slightofhand_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_slightofhand_mod readonly"></span><!-- sic --> <label>Sleight of Hand</label> (<span class="theoremancer_dnd5e_score dsf dsf_slightofhand_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_stealth_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_stealth_mod readonly"></span> <label>Stealth</label> (<span class="theoremancer_dnd5e_score dsf dsf_stealth_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill theoremancer_dnd5e_customskill"> <span class="dsf dsf_dexskill1_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_dexskill1_mod readonly"></span> <label class="dsf dsf_dexskill1_name"></label> (<span class="theoremancer_dnd5e_score dsf dsf_dexskill1_misc_mod" title="Miscellaneous"></span>) </div> </div> <div class="theoremancer_dnd5e_con theoremancer_dnd5e_addtarget_conskill"> <div class="theoremancer_dnd5e_abilitytemp"> <span class="theoremancer_dnd5e_score dsf dsf_contemp" title="Temporary score"></span> <label>Temporary</label> </div> <div class="theoremancer_dnd5e_ability"> <span class="theoremancer_dnd5e_score dsf dsf_con" title="Natural score"></span> <span class="theoremancer_dnd5e_mod dsf dsf_con_mod readonly" title="Constitution modifier"></span> <label>Constitution</label> <span class="dsf dsf_ctlConSkillCount" style="display:none">0</span> </div> <div class="theoremancer_dnd5e_save"> <span class="dsf dsf_consave_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_consave_mod readonly"></span> <label>Saving Throw</label> (<span class="theoremancer_dnd5e_score dsf dsf_consave_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill theoremancer_dnd5e_customskill"> <span class="dsf dsf_conskill1_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_conskill1_mod readonly"></span> <label class="dsf dsf_conskill1_name"></label> (<span class="theoremancer_dnd5e_score dsf dsf_conskill1_misc_mod" title="Miscellaneous"></span>) </div> </div> <div class="theoremancer_dnd5e_int theoremancer_dnd5e_addtarget_intskill"> <div class="theoremancer_dnd5e_abilitytemp"> <span class="theoremancer_dnd5e_score dsf dsf_inttemp" title="Temporary score"></span> <label>Temporary</label> </div> <div class="theoremancer_dnd5e_ability"> <span class="theoremancer_dnd5e_score dsf dsf_int" title="Natural score"></span> <span class="theoremancer_dnd5e_mod dsf dsf_int_mod readonly" title="Intelligence modifier"></span> <label>Intelligence</label> <span class="dsf dsf_ctlIntSkillCount" style="display:none">0</span> </div> <div class="theoremancer_dnd5e_save"> <span class="dsf dsf_intsave_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_intsave_mod readonly"></span> <label>Saving Throw</label> (<span class="theoremancer_dnd5e_score dsf dsf_intsave_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_arcana_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_arcana_mod readonly"></span> <label>Arcana</label> (<span class="theoremancer_dnd5e_score dsf dsf_arcana_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_history_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_history_mod readonly"></span> <label>History</label> (<span class="theoremancer_dnd5e_score dsf dsf_history_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_investigation_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_investigation_mod readonly"></span> <label>Investigation</label> (<span class="theoremancer_dnd5e_score dsf dsf_investigation_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_nature_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_nature_mod readonly"></span> <label>Nature</label> (<span class="theoremancer_dnd5e_score dsf dsf_nature_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_religion_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_religion_mod readonly"></span> <label>Religion</label> (<span class="theoremancer_dnd5e_score dsf dsf_religion_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill theoremancer_dnd5e_customskill"> <span class="dsf dsf_intskill1_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_intskill1_mod readonly"></span> <label class="dsf dsf_intskill1_name"></label> (<span class="theoremancer_dnd5e_score dsf dsf_intskill1_misc_mod" title="Miscellaneous"></span>) </div> </div> <div class="theoremancer_dnd5e_wis theoremancer_dnd5e_addtarget_wisskill"> <div class="theoremancer_dnd5e_abilitytemp"> <span class="theoremancer_dnd5e_score dsf dsf_wistemp" title="Temporary score"></span> <label>Temporary</label> </div> <div class="theoremancer_dnd5e_ability"> <span class="theoremancer_dnd5e_score dsf dsf_wis" title="Natural score"></span> <span class="theoremancer_dnd5e_mod dsf dsf_wis_mod readonly" title="Wisdom modifier"></span> <label>Wisdom</label> <span class="dsf dsf_ctlWisSkillCount" style="display:none">0</span> </div> <div class="theoremancer_dnd5e_save"> <span class="dsf dsf_wissave_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_wissave_mod readonly"></span> <label>Saving Throw</label> (<span class="theoremancer_dnd5e_score dsf dsf_wissave_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_animalhandling_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_animalhandling_mod readonly"></span> <label>Animal Handling</label> (<span class="theoremancer_dnd5e_score dsf dsf_animalhandling_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_insight_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_insight_mod readonly"></span> <label>Insight</label> (<span class="theoremancer_dnd5e_score dsf dsf_insight_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_medicine_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_medicine_mod readonly"></span> <label>Medicine</label> (<span class="theoremancer_dnd5e_score dsf dsf_medicine_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_perception_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_perception_mod readonly"></span> <label>Perception</label> (<span class="theoremancer_dnd5e_score dsf dsf_perception_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_survival_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_survival_mod readonly"></span> <label>Survival</label> (<span class="theoremancer_dnd5e_score dsf dsf_survival_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill theoremancer_dnd5e_customskill"> <span class="dsf dsf_wisskill1_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_wisskill1_mod readonly"></span> <label class="dsf dsf_wisskill1_name"></label> (<span class="theoremancer_dnd5e_score dsf dsf_wisskill1_misc_mod" title="Miscellaneous"></span>) </div> </div> <div class="theoremancer_dnd5e_cha theoremancer_dnd5e_addtarget_chaskill"> <div class="theoremancer_dnd5e_abilitytemp"> <span class="theoremancer_dnd5e_score dsf dsf_chatemp" title="Temporary score"></span> <label>Temporary</label> </div> <div class="theoremancer_dnd5e_ability"> <span class="theoremancer_dnd5e_score dsf dsf_cha" title="Natural score"></span> <span class="theoremancer_dnd5e_mod dsf dsf_cha_mod readonly" title="Charisma modifier"></span> <label>Charisma</label> <span class="dsf dsf_ctlChaSkillCount" style="display:none">0</span> </div> <div class="theoremancer_dnd5e_save"> <span class="dsf dsf_chasave_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_chasave_mod readonly"></span> <label>Saving Throw</label> (<span class="theoremancer_dnd5e_score dsf dsf_chasave_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_deception_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_deception_mod readonly"></span> <label>Deception</label> (<span class="theoremancer_dnd5e_score dsf dsf_deception_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_intimidation_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_intimidation_mod readonly"></span> <label>Intimidation</label> (<span class="theoremancer_dnd5e_score dsf dsf_intimidation_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_performance_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_performance_mod readonly"></span> <label>Performance</label> (<span class="theoremancer_dnd5e_score dsf dsf_performance_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill"> <span class="dsf dsf_persuasion_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_persuasion_mod readonly"></span> <label>Persuasion</label> (<span class="theoremancer_dnd5e_score dsf dsf_persuasion_misc_mod" title="Miscellaneous"></span>) </div> <div class="theoremancer_dnd5e_skill theoremancer_dnd5e_customskill"> <span class="dsf dsf_chaskill1_cs checkbox" title="Proficiency"></span> <span class="theoremancer_dnd5e_mod dsf dsf_chaskill1_mod readonly"></span> <label class="dsf dsf_chaskill1_name"></label> (<span class="theoremancer_dnd5e_score dsf dsf_chaskill1_misc_mod" title="Miscellaneous"></span>) </div> </div> </td> </tr> </tbody> </table> <span class="dsf dsf_ctlTraitCount" style="display:none">0</span> <table class="theoremancer_dnd5e_headersection theoremancer_dnd5e_proficiencies" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th>Other Proficiencies</th> </tr> </thead> <tbody class="theoremancer_dnd5e_addtarget_trait"> <tr><td class="dsf dsf_trait1"></td></tr> </tbody> </table> </div> <div class="theoremancer_dnd5e_combatsenseshp"> <div class="theoremancer_dnd5e_combat"> <table class="theoremancer_dnd5e_headersection theoremancer_dnd5e_acspeedinit" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th>Combat</th> </tr> </thead> <tbody> <tr> <td> <table class="theoremancer_dnd5e_formula" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr class="theoremancer_dnd5e_armorclass"> <td> <span class="theoremancer_dnd5e_score dsf dsf_ac readonly">10</span> </td> <td>=</td> <td> <span class="theoremancer_dnd5e_score dsf dsf_armor_bonus">10</span> </td> <td>+</td> <td> <span class="theoremancer_dnd5e_score dsf dsf_shield_bonus"></span> </td> <td>+</td> <td> <span class="theoremancer_dnd5e_score dsf dsf_dex_mod_armor"></span> </td> <td>+</td> <td> <span class="theoremancer_dnd5e_score dsf dsf_misc_mod"></span> </td> </tr> <tr class="theoremancer_dnd5e_armorclass"> <th>AC</th> <th></th> <th>Base</th> <th colspan="3">Shield</th> <th>Dex</th> <th></th> <th>Misc</th> </tr> </tbody> <tbody> <tr> <td class="theoremancer_dnd5e_speed"> <span class="theoremancer_dnd5e_score dsf dsf_speed"></span> </td> <td></td> <td colspan="3" class="theoremancer_dnd5e_initiative"> <span class="theoremancer_dnd5e_mod dsf dsf_initative_total readonly"></span> </td> <td>=</td> <td> <span class="theoremancer_dnd5e_score dsf dsf_dex_init_mod readonly"></span> </td> <td>+</td> <td> <span class="theoremancer_dnd5e_score dsf dsf_misc_init_mod"></span> </td> </tr> <tr> <th>Speed</th> <th></th> <th colspan="3" class="theoremancer_dnd5e_initiative">Initiative</th> <th></th> <th>Dex</th> <th></th> <th>Misc</th> </tr> </tbody> <tbody> <tr> <td colspan="5"> <span class="dsf dsf_inspiration checkbox"></span> <label>Inspiration</label> </td> <td colspan="4"></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </div> <div class="theoremancer_dnd5e_hp"> <table class="theoremancer_dnd5e_headersection" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th>Hit Points</th> <th>Hit Dice</th> </tr> </thead> <tbody> <tr> <td rowspan="3"> <table class="theoremancer_dnd5e_innertable" cellspacing="0" cellpadding="0" border="0"> <tr title="Used when maximum hp are reduced"> <td> <span class="theoremancer_dnd5e_score dsf dsf_temporarymaxhp"></span> </td> <th>Temp Max</th> </tr> <tr> <td> <span class="theoremancer_dnd5e_score dsf dsf_hp"></span> </td> <th>Max</th> </tr> <tr> <td> <span class="theoremancer_dnd5e_score dsf dsf_temporaryhp"></span> </td> <th>Temp</th> </tr> <tr> <td> <!-- j5es uses wounds instead of current HP --> <span class="theoremancer_dnd5e_score dsf dsf_wounds"></span> </td> <th>Current</th> </tr> </table> </td> <td class="theoremancer_dnd5e_hitdice"> <div> <span class="dsf dsf_hitdice"></span> <label>Max</label> </div> <div> <span class="dsf dsf_hitdice_used"></span> <label>Used</label> </div> </td> </tr> <tr> <th>Death Saves</th> </tr> <tr> <td class="theoremancer_dnd5e_deathsaves"> <div> <span class="dsf dsf_deathsuccess1_cs checkbox"></span> <span class="dsf dsf_deathsuccess2_cs checkbox"></span> <span class="dsf dsf_deathsuccess3_cs checkbox"></span> <label>Success</label> </div> <div> <span class="dsf dsf_deathfails1_cs checkbox"></span> <span class="dsf dsf_deathfails2_cs checkbox"></span> <span class="dsf dsf_deathfails3_cs checkbox"></span> <label>Failure</label> </div> </td> </tr> </tbody> </table> </div> <div class="theoremancer_dnd5e_senses"> <span class="dsf dsf_ctlSenseCount" style="display:none">0</span> <table class="theoremancer_dnd5e_headersection" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th colspan="2">Senses</th> </tr> </thead> <tbody> <tr> <td> <table class="theoremancer_dnd5e_innertable" cellspacing="0" cellpadding="0" border="0"> <tr> <td> <span class="theoremancer_dnd5e_score dsf dsf_perception_passive_score"></span> </td> <th>Passive<br>Perception</th> </tr> </table> </td> </tr> </tbody> <tbody class="theoremancer_dnd5e_addtarget_sense"> <tr><td colspan="2" class="dsf dsf_sense1"></td></tr> </tbody> </table> </div> <div class="theoremancer_dnd5e_languages"> <span class="dsf dsf_ctlLanguageCount" style="display:none">0</span> <table class="theoremancer_dnd5e_headersection" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th>Languages</th> </tr> </thead> <tbody class="theoremancer_dnd5e_addtarget_language"> <tr><td class="dsf dsf_language1"></td></tr> </tbody> </table> </div> <span class="dsf dsf_ctlWeaponCount" style="display:none">0</span> <table class="theoremancer_dnd5e_headersection" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th class="theoremancer_dnd5e_weapon_name">Attack Name</th> <th class="theoremancer_dnd5e_weapon_range">Range</th> <th class="theoremancer_dnd5e_weapon_attack">Bonus</th> <th class="theoremancer_dnd5e_weapon_damage">Damage/Effect</th> <th class="theoremancer_dnd5e_weapon_notes">Notes</th> </tr> </thead> <tbody class="theoremancer_dnd5e_addtarget_weapon"> <tr> <td class="theoremancer_dnd5e_weapon_name dsf dsf_weapon1"></td> <td class="theoremancer_dnd5e_weapon_range dsf dsf_weapon1_type"></td><!-- j5es has range and type mislabeled --> <td class="theoremancer_dnd5e_mod theoremancer_dnd5e_weapon_attack dsf dsf_weapon1_attack_bonus"></td> <td class="theoremancer_dnd5e_weapon_damage dsf dsf_weapon1_damage"></td> <td class="theoremancer_dnd5e_weapon_notes dsf dsf_weapon1_notes"></td> </tr> </tbody> </table> <span class="dsf dsf_ctlFeatCount" style="display:none">0</span> <table class="theoremancer_dnd5e_headersection" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th class="theoremancer_dnd5e_feat_name">Trait/Feature/Feat</th> <th class="theoremancer_dnd5e_feat_desc">Notes</th> </tr> </thead> <tbody class="theoremancer_dnd5e_addtarget_feat"> <tr> <td class="theoremancer_dnd5e_feat_name dsf dsf_feat1"></td> <td class="theoremancer_dnd5e_feat_desc dsf dsf_featDescription1"></td> </tr> </tbody> </table> <span class="dsf dsf_ctlProtitemCount" style="display:none">0</span> <table class="theoremancer_dnd5e_headersection" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th class="theoremancer_dnd5e_feat_name">Magic Item</th> <th class="theoremancer_dnd5e_feat_desc">Notes</th> </tr> </thead> <tbody class="theoremancer_dnd5e_addtarget_protitem"> <tr> <td class="theoremancer_dnd5e_feat_name dsf dsf_protitem1_type"></td> <td class="theoremancer_dnd5e_feat_desc dsf dsf_protitem1_special_properties"></td> </tr> </tbody> </table> <span class="dsf dsf_ctlInventoryCount" style="display:none">0</span> <table class="theoremancer_dnd5e_headersection" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th class="theoremancer_dnd5e_itemweight" title="Weight (lbs)">Wt</th> <th class="theoremancer_dnd5e_itemvalue" title="Value (gp)">Val</th> <th class="theoremancer_dnd5e_itemname">Item/Treasure</th> <th class="theoremancer_dnd5e_itemdesc">Notes</th> </tr> </thead> <tbody class="theoremancer_dnd5e_addtarget_item"> <tr> <td class="theoremancer_dnd5e_score theoremancer_dnd5e_itemweight dsf dsf_item1_weight" title="Prefix ~ to exclude from Total"></td> <td class="theoremancer_dnd5e_score theoremancer_dnd5e_itemvalue dsf dsf_item1_value"></td> <td class="theoremancer_dnd5e_itemname dsf dsf_item1"></td> <td class="theoremancer_dnd5e_itemdesc dsf dsf_item1_desc"></td> </tr> </tbody> <tfoot> <tr> <td colspan="4"> <table class="theoremancer_dnd5e_itemweighttotal" cellspacing="0" cellpadding="0" border="0"> <tr> <td class="theoremancer_dnd5e_list_total"> <span class="theoremancer_dnd5e_score dsf dsf_item_weight_total readonly"></span> <label>Total (lbs)</label> </td> <td colspan="2"> <span class="theoremancer_dnd5e_score dsf dsf_light_load"></span> <label>Encumbered</label> </td> <td colspan="2"> <span class="theoremancer_dnd5e_score dsf dsf_medium_load"></span> <label>Heavily Enc</label> </td> <td> <span class="theoremancer_dnd5e_score dsf dsf_heavy_load"></span> <label>Max Load</label> </td> <td> <span class="theoremancer_dnd5e_score dsf dsf_lift_over_head"></span> <label>Push/Drag/Lift</label> </td> </tr> <tr> <td class="theoremancer_dnd5e_list_total"> <span class="dsf dsf_item_value_total readonly"></span> <label>Total (gp)</label> </td> <td title="Copper pieces (100cp = 1gp)"> <span class="theoremancer_dnd5e_score dsf dsf_cp"></span> <label>cp</label> </td> <td title="Silver pieces (10sp = 1gp)"> <span class="theoremancer_dnd5e_score dsf dsf_sp"></span> <label>sp</label> </td> <td title="Electrum pieces (2ep = 1gp)"> <span class="theoremancer_dnd5e_score dsf dsf_ep"></span> <label>ep</label> </td> <td title="Gold pieces"> <span class="theoremancer_dnd5e_score dsf dsf_gp"></span> <label>gp</label> </td> <td title="Platinum pieces (1pp = 10gp)"> <span class="theoremancer_dnd5e_score dsf dsf_pp"></span> <label>pp</label> </td> <td title="Sum of treasure values in above table"> <span class="theoremancer_dnd5e_score dsf dsf_item_value_subtotal readonly"></span> <label>Treasure subtotal (gp)</label> </td> </tr> </table> </td> </tr> </tfoot> </table> </div> </section> <!-- Magic --> <section class="theoremancer_dnd5e_section"> <span class="dsf dsf_lvl_count" style="display:none">0</span> <table class="theoremancer_dnd5e_headersection" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th>Magic</th> </tr> </thead> <tbody> <tr> <td> <table cellspacing="0" cellpadding="0" border="0"> <colgroup> <col width="28%"/> <col width="26%"/> <col width="19%"/> <col width="27%"/> </colgroup> <tr> <td> <span class="dsf dsf_spellcasting_ability" style="display:none"></span> <select class="theoremancer_dnd5e_spellcasting_ability" data-customforms="disabled"> <option value=""></option> <option value="str">Str</option> <option value="dex">Dex</option> <option value="con">Con</option> <option value="int">Int</option> <option value="wis">Wis</option> <option value="cha">Cha</option> </select> <label>Spellcasting Ability</label> </td> <td> <span class="theoremancer_dnd5e_mod dsf dsf_spell_attack"></span> <label>Spell Attack Bonus</label> </td> <td> <span class="theoremancer_dnd5e_score dsf dsf_spell_dc"></span> <label>Spell DC</label> </td> <td> <span class="theoremancer_dnd5e_score dsf dsf_spells_prepared readonly" title="Current prepared/known spells (checkboxes below)">0</span>/<span class="theoremancer_dnd5e_score dsf dsf_spells_prepared_total" title="Maximum prepared/known spells"></span> <label>Spells Prepared or Known</label> </td> </tr> </table> </td> </tr> </tbody> </table> <table class="theoremancer_dnd5e_headersection theoremancer_dnd5e_addtarget_lvl" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th class="theoremancer_dnd5e_spellprep"></th> <th class="theoremancer_dnd5e_spellname">Spell</th> <th class="theoremancer_dnd5e_spellnote">Notes</th> </tr> </thead> <tbody class="theoremancer_dnd5e_slots"> <tr> <td colspan="2" class="theoremancer_dnd5e_spelllevel dsf dsf_lvl0 readonly" title="Spell Level">Cantrips</td> <td> <span class="dsf dsf_lvl0_spell_count" style="display:none">0</span> </td> </tr> </tbody> <tbody class="theoremancer_dnd5e_spells theoremancer_dnd5e_addtarget_lvl0_spell"> <tr> <td class="theoremancer_dnd5e_spellprep"></td> <td class="theoremancer_dnd5e_spellname dsf dsf_lvl0_spell1" title="Spell Name"></td> <td class="theoremancer_dnd5e_spellnote dsf dsf_lvl0_spell1_desc"></td> </tr> </tbody> <tbody class="theoremancer_dnd5e_slots"> <tr> <td colspan="2" class="theoremancer_dnd5e_spelllevel dsf dsf_lvl1" title="Spell Level"></td> <td> <span class="dsf dsf_lvl1_spell_count" style="display:none">0</span> <span class="theoremancer_dnd5e_spellslots dsf dsf_lvl1_slots" title="Slots at this Level"></span> <label>Slots</label> <span class="dsf dsf_lvl1_spent1 checkbox" title="Check if slot is expended" style="display:none"></span> <span class="dsf dsf_lvl1_spent2 checkbox" title="Check if slot is expended" style="display:none"></span> <span class="dsf dsf_lvl1_spent3 checkbox" title="Check if slot is expended" style="display:none"></span> <span class="dsf dsf_lvl1_spent4 checkbox" title="Check if slot is expended" style="display:none"></span> <span class="dsf dsf_lvl1_spent5 checkbox" title="Check if slot is expended" style="display:none"></span> <span class="dsf dsf_lvl1_spent6 checkbox" title="Check if slot is expended" style="display:none"></span> <span class="dsf dsf_lvl1_spent7 checkbox" title="Check if slot is expended" style="display:none"></span> <span class="dsf dsf_lvl1_spent8 checkbox" title="Check if slot is expended" style="display:none"></span> <span class="dsf dsf_lvl1_spent9 checkbox" title="Check if slot is expended" style="display:none"></span> <span class="dsf dsf_lvl1_spent10 checkbox" title="Check if slot is expended" style="display:none"></span> </td> </tr> </tbody> <tbody class="theoremancer_dnd5e_spells theoremancer_dnd5e_addtarget_lvl1_spell" style="display:none"> <tr> <td class="theoremancer_dnd5e_spellprep dsf dsf_lvl1_spell1_prep checkbox" title="Spell is prepared/known"></td> <td class="theoremancer_dnd5e_spellname dsf dsf_lvl1_spell1" title="Spell Name"></td> <td class="theoremancer_dnd5e_spellnote dsf dsf_lvl1_spell1_desc"></td> </tr> </tbody> </table> </section> <!-- Personality --> <section class="theoremancer_dnd5e_section"> <table class="theoremancer_dnd5e_headersection" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th class="theoremancer_dnd5e_personality">Alignment</th> <th class="theoremancer_dnd5e_personality">Personality Traits</th> <th class="theoremancer_dnd5e_personality">Bonds</th> </tr> </thead> <tbody> <tr> <td class="theoremancer_dnd5e_personality dsf dsf_alignment"></td> <td class="theoremancer_dnd5e_personality dsf dsf_personality"></td> <td class="theoremancer_dnd5e_personality dsf dsf_bonds"></td> </tr> </tbody> <thead> <tr> <th class="theoremancer_dnd5e_personality">Deity</th> <th class="theoremancer_dnd5e_personality">Ideals</th> <th class="theoremancer_dnd5e_personality">Flaws</th> </tr> </thead> <tbody> <tr> <td class="theoremancer_dnd5e_personality dsf dsf_deity"></td> <td class="theoremancer_dnd5e_personality dsf dsf_ideals"></td> <td class="theoremancer_dnd5e_personality dsf dsf_flaws"></td> </tr> </tbody> </table> </section> <!-- Physical Description --> <section class="theoremancer_dnd5e_section"> <table class="theoremancer_dnd5e_headersection" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th class="theoremancer_dnd5e_physical">Sex</th> <th class="theoremancer_dnd5e_physical">Age</th> <th class="theoremancer_dnd5e_physical">Height</th> <th class="theoremancer_dnd5e_physical">Weight</th> <th class="theoremancer_dnd5e_physical">Hair</th> <th class="theoremancer_dnd5e_physical">Skin</th> <th class="theoremancer_dnd5e_physical">Eyes</th> </tr> </thead> <tbody> <tr> <td class="theoremancer_dnd5e_physical dsf dsf_gender"></td> <td class="theoremancer_dnd5e_physical dsf dsf_age"></td> <td class="theoremancer_dnd5e_physical dsf dsf_height"></td> <td class="theoremancer_dnd5e_physical dsf dsf_weight"></td> <td class="theoremancer_dnd5e_physical dsf dsf_hair"></td> <td class="theoremancer_dnd5e_physical dsf dsf_skin"></td> <td class="theoremancer_dnd5e_physical dsf dsf_eyes"></td> </tr> </tbody> </table> </section> <!-- Biography --> <section class="theoremancer_dnd5e_section"> <table class="theoremancer_dnd5e_headersection" cellspacing="0" cellpadding="2" border="1"> <thead> <tr> <th>Biography</th> </tr> </thead> <tbody> <tr> <td class="dsf dsf_bio readonly"></td> </tr> </tbody> </table> </section> <!-- Author --> <section class="theoremancer_dnd5e_section theoremancer_dnd5e_author"> <label>DST Author:</label> <span class="dsf dsf_dst_author readonly"></span> </section>
CSS
.ds_theoremancer_dnd5e * { font-weight: normal; color: #000000; padding: 0; margin: 0; } .ds_theoremancer_dnd5e th { font-weight: bold; } /* ========================================================================= */ /* Form element formatting */ /* ------------------------------------------------------------------------- */ .ds_theoremancer_dnd5e { font-family: sans-serif; font-size: 8pt; width: 732px; background-color: white; padding: 3px; border: 1px solid black; } .ds_theoremancer_dnd5e a:link, .ds_theoremancer_dnd5e a:visited { color: blue; text-decoration: none; } .ds_theoremancer_dnd5e a:hover { color: red; } .ds_theoremancer_dnd5e form { display: inline; margin: 0; padding: 0; } .ds_theoremancer_dnd5e form button { display: none; } .ds_theoremancer_dnd5e label { display: inline-block; height: 14px; line-height: 12px; padding-top: 2px; font-size: inherit; cursor: inherit; color: inherit; } .ds_theoremancer_dnd5e span.dsf { display: inline-block; border-bottom: 1px solid silver; min-width: 18px; min-height: 14px; line-height: 12px; padding-top: 2px; padding-left: 2px; padding-right: 2px; vertical-align: bottom; } .ds_theoremancer_dnd5e table { margin: 0; } .ds_theoremancer_dnd5e table tr { background: none; } .ds_theoremancer_dnd5e th { text-align: center; } .ds_theoremancer_dnd5e td, .ds_theoremancer_dnd5e th { padding: 0; } .ds_theoremancer_dnd5e td { vertical-align: top; } .ds_theoremancer_dnd5e td.dsf { line-height: 12px; min-height: 18px; vertical-align: top; padding-top: 3px; padding-bottom: 1px; } .ds_theoremancer_dnd5e .dsf input { border: none; font: inherit; } .ds_theoremancer_dnd5e span.dsf input { margin-top: -1px; padding: 0; } .ds_theoremancer_dnd5e td.dsf input { margin-top: -1px; margin-bottom: -0.5px; padding: 0; vertical-align: top; } .ds_theoremancer_dnd5e td .dsf.checkbox { padding: 0; } .ds_theoremancer_dnd5e span.dsf.checkbox { background-color: transparent; border: none; text-align: center; vertical-align: bottom; cursor: inherit; min-width: 13px; height: 14px; line-height: 12px; font-size: 5px; } .ds_theoremancer_dnd5e .dsf.checkbox:hover { background-color: transparent; } .ds_theoremancer_dnd5e .dsf.checkbox input { padding: 0; margin: 0; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_textarea { white-space: pre; } /* ========================================================================= */ /* Editable */ /* ------------------------------------------------------------------------- */ .ds_theoremancer_dnd5e.editable .dsf { background-color: #eeeeff; cursor: pointer; } .ds_theoremancer_dnd5e.editable .dsf:hover { background-color: #f8f8dd; } .ds_theoremancer_dnd5e.editable .dsf.readonly, .ds_theoremancer_dnd5e.editable .dsf.readonly:hover { background-color: inherit; cursor: inherit; } .ds_theoremancer_dnd5e.editable .dsf.checkbox { background-color: inherit; cursor: inherit; } .ds_theoremancer_dnd5e.editable .dsf.checkbox input { cursor: pointer; } .ds_theoremancer_dnd5e.editable .theoremancer_dnd5e_desc, .ds_theoremancer_dnd5e.editable .theoremancer_dnd5e_bio { display: none; } /* ========================================================================= */ /* Field layout (general) */ /* ------------------------------------------------------------------------- */ .ds_theoremancer_dnd5e section.theoremancer_dnd5e_section { padding: 0; margin: 0; clear: both; } .ds_theoremancer_dnd5e table { border-collapse: collapse; } .ds_theoremancer_dnd5e table tfoot { background-color: inherit; } .ds_theoremancer_dnd5e table tfoot table { width: 100%; } .ds_theoremancer_dnd5e table tfoot table td { text-align: center; } .ds_theoremancer_dnd5e table.theoremancer_dnd5e_general_info, .ds_theoremancer_dnd5e table.theoremancer_dnd5e_headersection { margin-bottom: 1em; width: 100%; } .ds_theoremancer_dnd5e table.theoremancer_dnd5e_headersection > thead > tr > th, .ds_theoremancer_dnd5e table.theoremancer_dnd5e_headersection > tbody > tr > th { background-color: #dddddd; font-variant: small-caps; height: 16px; } .ds_theoremancer_dnd5e table.theoremancer_dnd5e_headersection > thead > tr > th, .ds_theoremancer_dnd5e table.theoremancer_dnd5e_headersection > tbody > tr > th, .ds_theoremancer_dnd5e table.theoremancer_dnd5e_headersection > tbody > tr > td, .ds_theoremancer_dnd5e table.theoremancer_dnd5e_headersection > tfoot > tr > td { border: 1px solid silver; padding: 2px; } .ds_theoremancer_dnd5e table.theoremancer_dnd5e_formula td { text-align: center; } .ds_theoremancer_dnd5e table.theoremancer_dnd5e_formula th { font-weight: normal; vertical-align: top; text-align: center; padding-bottom: 5px; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_headersection td { height: 14px; } .ds_theoremancer_dnd5e .dsf.theoremancer_dnd5e_maxwidth { width: 100%; } .ds_theoremancer_dnd5e .dsf.theoremancer_dnd5e_mediumtext { min-width: 100px; } .ds_theoremancer_dnd5e .dsf.theoremancer_dnd5e_shorttext { min-width: 80px; } .ds_theoremancer_dnd5e .dsf.theoremancer_dnd5e_numerical, .ds_theoremancer_dnd5e .dsf.theoremancer_dnd5e_numerical input, .ds_theoremancer_dnd5e .dsf.theoremancer_dnd5e_score, .ds_theoremancer_dnd5e .dsf.theoremancer_dnd5e_score input, .ds_theoremancer_dnd5e .dsf.theoremancer_dnd5e_mod, .ds_theoremancer_dnd5e .dsf.theoremancer_dnd5e_mod input { text-align: center; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_formula th, .ds_theoremancer_dnd5e .theoremancer_dnd5e_formula td { vertical-align: middle; } /* ========================================================================= */ /* Field layout (specific) */ /* ------------------------------------------------------------------------- */ .ds_theoremancer_dnd5e span.dsf.readonly.dsf_avatar_image { background-color: #dddddd; display: block; min-width: 140px; min-height: 140px; border: none; margin-right: 3px; padding: 0; } .ds_theoremancer_dnd5e span.dsf.readonly.dsf_avatar_image:hover { background-color: #dddddd; } .ds_theoremancer_dnd5e .dsf.dsf_campaign, .ds_theoremancer_dnd5e .dsf.dsf_race, .ds_theoremancer_dnd5e .dsf.dsf_class, .ds_theoremancer_dnd5e .dsf.dsf_background { min-width: 310px; } .ds_theoremancer_dnd5e .dsf.dsf_player, .ds_theoremancer_dnd5e .dsf.dsf_size, .ds_theoremancer_dnd5e .dsf.dsf_experience, .ds_theoremancer_dnd5e .dsf.dsf_experience_next, .ds_theoremancer_dnd5e .dsf.dsf_alignment { min-width: 115px; } .ds_theoremancer_dnd5e span.dsf_name { width: 584px; font-size: 16pt; height: 17pt; line-height: 17pt; } .ds_theoremancer_dnd5e span.dsf_ac, .ds_theoremancer_dnd5e span.dsf_speed, .ds_theoremancer_dnd5e span.dsf_initative_total, .ds_theoremancer_dnd5e span.dsf_wounds, .ds_theoremancer_dnd5e span.dsf_hp, .ds_theoremancer_dnd5e span.dsf_temporaryhp, .ds_theoremancer_dnd5e span.dsf_temporarymaxhp, .ds_theoremancer_dnd5e span.dsf_perception_passive_score { font-size: 16pt; height: 17pt; line-height: 17pt; min-width: 32px; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_innertable th { font-weight: normal; text-align: left; padding-left: 3px; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_general_info label { text-align: right; min-width: 66px; padding-right: 3px; color: silver; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_combatsenseshp, .ds_theoremancer_dnd5e .theoremancer_dnd5e_combat, .ds_theoremancer_dnd5e .theoremancer_dnd5e_hp, .ds_theoremancer_dnd5e .theoremancer_dnd5e_senses, .ds_theoremancer_dnd5e .theoremancer_dnd5e_languages { display: inline-block; vertical-align: top; } .theoremancer_dnd5e_combatsenseshp { width: 556px; font-size: 0; /* Remove text spaces between inline-block div children */ } .theoremancer_dnd5e_combatsenseshp div, .theoremancer_dnd5e_combatsenseshp table { font-size: 8pt; /* Reset font size for children */ } .ds_theoremancer_dnd5e .theoremancer_dnd5e_combat, .ds_theoremancer_dnd5e .theoremancer_dnd5e_senses, .ds_theoremancer_dnd5e .theoremancer_dnd5e_hp { margin-right: 4px; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_abilitiessavesskills { width: 170px; float: left; margin-right: 4px; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_ability label { font-weight: bold; font-size: 11pt; min-width: 109px; font-variant: small-caps; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_str, .ds_theoremancer_dnd5e .theoremancer_dnd5e_dex, .ds_theoremancer_dnd5e .theoremancer_dnd5e_con, .ds_theoremancer_dnd5e .theoremancer_dnd5e_int, .ds_theoremancer_dnd5e .theoremancer_dnd5e_wis, .ds_theoremancer_dnd5e .theoremancer_dnd5e_cha { margin-top: 12px; } .ds_theoremancer_dnd5e span.dsf.dsf_proficiency { margin-left: 25px; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_abilities .dsf.checkbox { padding-left: 9px; padding-right: 0px; vertical-align: bottom; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_save label, .ds_theoremancer_dnd5e .theoremancer_dnd5e_skill label { display: inline-block; min-width: 80px; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_abilitytemp label { color: #808080; font-style: italic; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_save label { font-style: italic; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_customskill label.dsf { border-bottom: 1px solid silver; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_proficiencies .dsf { width: 163px; } .ds_theoremancer_dnd5e .dsf_temporarymaxhp, .ds_theoremancer_dnd5e .dsf_hp, .ds_theoremancer_dnd5e .dsf_temporaryhp, .ds_theoremancer_dnd5e .dsf_hitdice, .ds_theoremancer_dnd5e .dsf_hitdice_used, .ds_theoremancer_dnd5e .theoremancer_dnd5e_deathsaves div { margin-bottom: 2px; } .ds_theoremancer_dnd5e .dsf_wounds, .ds_theoremancer_dnd5e .dsf_hp, .ds_theoremancer_dnd5e .dsf_temporaryhp, .ds_theoremancer_dnd5e .dsf_temporarymaxhp { width: 40px; } .ds_theoremancer_dnd5e .dsf_hitdice, .ds_theoremancer_dnd5e .dsf_hitdice_used { width: 50px; text-align: center; } .ds_theoremancer_dnd5e table tbody tr td.theoremancer_dnd5e_hitdice, .ds_theoremancer_dnd5e table tbody tr td.theoremancer_dnd5e_deathsaves { padding-bottom: 7px; } .ds_theoremancer_dnd5e table.theoremancer_dnd5e_formula th.theoremancer_dnd5e_initiative, .ds_theoremancer_dnd5e table.theoremancer_dnd5e_formula td.theoremancer_dnd5e_initiative { text-align: right; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_languages { width: 90px; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_weapon_name { width: 100px; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_weapon_attack, .ds_theoremancer_dnd5e .theoremancer_dnd5e_weapon_attack input { width: 36px; text-align: center; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_weapon_range, .ds_theoremancer_dnd5e .theoremancer_dnd5e_weapon_range input { width: 44px; text-align: center; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_weapon_damage, .ds_theoremancer_dnd5e .theoremancer_dnd5e_weapon_damage input { width: 100px; text-align: center; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_feat_name { width: 190px; } .ds_theoremancer_dnd5e td.theoremancer_dnd5e_itemweight, .ds_theoremancer_dnd5e td.theoremancer_dnd5e_itemweight input, .ds_theoremancer_dnd5e td.theoremancer_dnd5e_itemvalue, .ds_theoremancer_dnd5e td.theoremancer_dnd5e_itemvalue input { width: 22px; text-align: right; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_itemname, .ds_theoremancer_dnd5e .theoremancer_dnd5e_itemname input { width: 200px; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_itemweighttotal td { text-align: left; } .ds_theoremancer_dnd5e .dsf_light_load, .ds_theoremancer_dnd5e .dsf_light_load input, .ds_theoremancer_dnd5e .dsf_medium_load, .ds_theoremancer_dnd5e .dsf_medium_load input, .ds_theoremancer_dnd5e .dsf_heavy_load, .ds_theoremancer_dnd5e .dsf_heavy_load input, .ds_theoremancer_dnd5e .dsf_lift_over_head, .ds_theoremancer_dnd5e .dsf_lift_over_head input { width: 28px; text-align: center; } .ds_theoremancer_dnd5e .dsf_item_value_subtotal, .ds_theoremancer_dnd5e .dsf_cp, .ds_theoremancer_dnd5e .dsf_cp input, .ds_theoremancer_dnd5e .dsf_sp, .ds_theoremancer_dnd5e .dsf_sp input, .ds_theoremancer_dnd5e .dsf_ep, .ds_theoremancer_dnd5e .dsf_ep input, .ds_theoremancer_dnd5e .dsf_gp, .ds_theoremancer_dnd5e .dsf_gp input, .ds_theoremancer_dnd5e .dsf_pp, .ds_theoremancer_dnd5e .dsf_pp input { width: 28px; text-align: center; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_list_total { text-align: left; width: 98px; } .ds_theoremancer_dnd5e .dsf_item_weight_total, .ds_theoremancer_dnd5e .dsf_item_value_total { width: 38px; text-align: center; margin-bottom: 2px; } .ds_theoremancer_dnd5e .dsf_spellcasting_ability { text-transform: capitalize; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_spellcasting_ability { font-size: 8pt; width: 45px; } .ds_theoremancer_dnd5e .dsf_spells_prepared { text-align: right; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_spelllevel { text-align: left; vertical-align: middle; width: 160px; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_spellprep { width: 14px; } .ds_theoremancer_dnd5e td.theoremancer_dnd5e_spellprep { text-align: right; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_spellname { width: 140px; } .ds_theoremancer_dnd5e span.dsf.theoremancer_dnd5e_spellslots { padding: 0; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_slots label { padding: 0; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_personality { width: 33.333%; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_physical { width: 99px; } .ds_theoremancer_dnd5e .dsf.dsf_spell_dc, .ds_theoremancer_dnd5e .dsf.dsf_spell_dc input, .ds_theoremancer_dnd5e .theoremancer_dnd5e_spellslots, .ds_theoremancer_dnd5e .theoremancer_dnd5e_spellslots input, .ds_theoremancer_dnd5e .theoremancer_dnd5e_personality, .ds_theoremancer_dnd5e .theoremancer_dnd5e_personality input, .ds_theoremancer_dnd5e .theoremancer_dnd5e_physical, .ds_theoremancer_dnd5e .theoremancer_dnd5e_physical input { text-align: center; } .ds_theoremancer_dnd5e .theoremancer_dnd5e_author { text-align: right; }
JavaScript
(function ($) { //Save the field when it loses focus. Allows us to hide OK buttons for //cleaner UI. $.fn.editable.defaults.onblur = 'submit'; })(jQuery); $.extend(aisleten.characters, { //Don't show "click to edit" on each field. Non-readonly fields are styled //with background color and pointer cursor, indicating they are clickable. jeditablePlaceholder: ' ' }); var theoremancer_dnd5e_namespace = { "abilities": [ "str", "dex", "con", "int", "wis", "cha" ], "skillsByAbility": { "str": [ "athletics" ], "dex": [ "acrobatics", "slightofhand", "stealth" ], "con": [], "int": [ "arcana", "history", "investigation", "nature", "religion" ], "wis": [ "animalhandling", "insight", "medicine", "perception", "survival" ], "cha": [ "deception", "intimidation", "performance", "persuasion" ] }, "skillAbility": { "athletics": "str", "acrobatics": "dex", "slightofhand": "dex", "stealth": "dex", "arcana": "int", "history": "int", "investigation": "int", "nature": "int", "religion": "int", "animalhandling": "wis", "insight": "wis", "medicine": "wis", "perception": "wis", "survival": "wis", "deception": "cha", "intimidation": "cha", "performance": "cha", "persuasion": "cha" }, "countLookup": { "strskill": "ctlStrSkillCount", "dexskill": "ctlDexSkillCount", "conskill": "ctlConSkillCount", "intskill": "ctlIntSkillCount", "wisskill": "ctlWisSkillCount", "chaskill": "ctlChaSkillCount", "trait": "ctlTraitCount", "sense": "ctlSenseCount", "language": "ctlLanguageCount", "weapon": "ctlWeaponCount", "feat": "ctlFeatCount", "protitem": "ctlProtitemCount", "item": "ctlInventoryCount" }, "currencies": { "cp": 0.01, "sp": 0.1, "ep": 0.5, "gp": 1, "pp": 10 }, "multiRow": [ "strskill", "dexskill", "conskill", "intskill", "wisskill", "chaskill", "trait", "sense", "language", "weapon", "feat", "protitem", "item", "lvl" ], "updateAbility": function(ability) { var score = theoremancer_dnd5e_namespace.getAbilityScore(ability); var mod = ""; if (score) { mod = Math.floor((score - 10) / 2); } theoremancer_dnd5e_namespace.setIntValue(ability + "_mod", mod); theoremancer_dnd5e_namespace.updateSave(ability); theoremancer_dnd5e_namespace.updateSkills(ability); switch (ability) { case "str": theoremancer_dnd5e_namespace.updateEncumbrance(ability); break; case "dex": theoremancer_dnd5e_namespace.updateInitiative(); break; } if (ability == theoremancer_dnd5e_namespace.getStringValue("spellcasting_ability")) { theoremancer_dnd5e_namespace.updateMagicStats(); } }, "updateSave": function(ability) { var abilityMod = theoremancer_dnd5e_namespace.getAbilityMod(ability); var proficiency = theoremancer_dnd5e_namespace.getCheckboxProficiency( ability + "save_cs"); var misc = theoremancer_dnd5e_namespace.getIntValue( ability + "save_misc_mod"); theoremancer_dnd5e_namespace.setIntValue( ability + "save_mod", abilityMod + proficiency + misc); }, "updateSkills": function(ability) { var skills = theoremancer_dnd5e_namespace.skillsByAbility[ability]; for (var i = 0; i < skills.length; i++) { theoremancer_dnd5e_namespace.updateSkill(skills[i], ability); } var customSkillContainerClass = ".theoremancer_dnd5e_addtarget_" + ability + "skill"; var customSkills = $(customSkillContainerClass + " .theoremancer_dnd5e_customskill").length; for (i = 1; i < customSkills; i++) { theoremancer_dnd5e_namespace.updateSkill(ability + "skill" + i, ability); } }, "updateSkill": function(skill, ability) { var abilityMod = theoremancer_dnd5e_namespace.getAbilityMod(ability); var proficiency = theoremancer_dnd5e_namespace.getCheckboxProficiency(skill + "_cs"); var misc = theoremancer_dnd5e_namespace.getIntValue(skill + "_misc_mod"); var total = abilityMod + proficiency + misc; theoremancer_dnd5e_namespace.setIntValue( skill + "_mod", total); if (skill == "perception") { theoremancer_dnd5e_namespace.setIntValue( "perception_passive_score", total + 10); } }, "updateAC": function() { var armor = theoremancer_dnd5e_namespace.getIntValue("armor_bonus"); var shield = theoremancer_dnd5e_namespace.getIntValue("shield_bonus"); var dex = theoremancer_dnd5e_namespace.getIntValue("dex_mod_armor"); var misc = theoremancer_dnd5e_namespace.getIntValue("misc_mod"); var ac = armor + shield + dex + misc; theoremancer_dnd5e_namespace.setIntValue("ac", ac); }, "updateInitiative": function() { var dex = theoremancer_dnd5e_namespace.getIntValue("dex_mod"); var misc = theoremancer_dnd5e_namespace.getIntValue("misc_init_mod"); var init = dex + misc; theoremancer_dnd5e_namespace.setIntValue("dex_init_mod", dex); theoremancer_dnd5e_namespace.setIntValue( "initative_total" /* sic j5es */, init); }, "updateEncumbrance": function(field) { switch (field) { case "str": var str = theoremancer_dnd5e_namespace.getAbilityScore("str"); theoremancer_dnd5e_namespace.setIntValue( "light_load", str ? str * 5 : ""); //fallthrough case "light_load": var lightLoad = theoremancer_dnd5e_namespace.getIntValue("light_load"); theoremancer_dnd5e_namespace.setIntValue( "medium_load", lightLoad ? lightLoad * 2 : ""); //fallthrough case "medium_load": var mediumLoad = theoremancer_dnd5e_namespace.getIntValue("medium_load"); theoremancer_dnd5e_namespace.setIntValue( "heavy_load", mediumLoad ? mediumLoad * 1.5 : ""); //fallthrough case "heavy_load": var heavyLoad = theoremancer_dnd5e_namespace.getIntValue("heavy_load"); theoremancer_dnd5e_namespace.setIntValue( "lift_over_head", heavyLoad ? heavyLoad * 2 : ""); } }, "updateSpellSlotCheckboxes": function(level) { // TODO: domain spells don't count against prepared spells var slots = theoremancer_dnd5e_namespace.getField("lvl" + level + "_slots"); slots.parent().find(".dsf.checkbox").hide(); var slotCount = parseInt(slots.text().trim()) || 0; for (var i = 1; i <= slotCount; i++) { theoremancer_dnd5e_namespace.getField("lvl" + level + "_spent" + i). show().css("display", "inline-block"); } }, "updateTotal": function(category, property) { var total = 0; $(".theoremancer_dnd5e_addtarget_" + category + " .dsf.theoremancer_dnd5e_" + category + property).each( function(i, element) { var val = Number($(element).text()); if (val) { total += val; } }); if (category == "item" && property == "value") { theoremancer_dnd5e_namespace.setStringValue("item_value_subtotal", total); } if (property == "value") { var currencies = Object.keys(theoremancer_dnd5e_namespace.currencies); for (var i = 0; i < currencies.length; i++) { var currency = currencies[i]; var multiplier = theoremancer_dnd5e_namespace.currencies[currency]; var val = theoremancer_dnd5e_namespace.getIntValue(currency); if (val) { total += (val * multiplier); } } } theoremancer_dnd5e_namespace.setStringValue(category + "_" + property + "_total", total); }, "updateMagicStats": function() { var spellcastingAbility = theoremancer_dnd5e_namespace.getStringValue("spellcasting_ability"); var spellDC = ""; var spellAttackMod = ""; if (spellcastingAbility) { var abilityMod = theoremancer_dnd5e_namespace.getAbilityMod(spellcastingAbility); var proficiency = theoremancer_dnd5e_namespace.getIntValue("proficiency"); spellAttackMod = proficiency + abilityMod; spellDC = 8 + proficiency + abilityMod; } theoremancer_dnd5e_namespace.setIntValue("spell_dc", spellDC); theoremancer_dnd5e_namespace.setIntValue("spell_attack", spellAttackMod); }, "getFields": function(field) { return $(".dsf.dsf_" + field); }, "getField": function(field) { return $(".dsf.dsf_" + field + ":first"); }, "getStringValue": function(field) { return theoremancer_dnd5e_namespace.getField(field).text(); }, "getIntValue": function(field) { return theoremancer_dnd5e_namespace.parseMod( theoremancer_dnd5e_namespace.getStringValue(field)); }, "getCheckboxProficiency": function(field) { return Number($(".dsf.dsf_" + field + " input").val()) ? theoremancer_dnd5e_namespace.getIntValue("proficiency") : 0; }, "parseMod": function(value) { if (typeof(value) == "string") { if (value.charAt(0) == "+") { return parseInt(value.substring(1)); } else if (value.trim() == "") { return 0; } } return parseInt(value); }, "getAbilityScore": function(ability) { return theoremancer_dnd5e_namespace.getIntValue(ability + "temp") || theoremancer_dnd5e_namespace.getIntValue(ability); }, "getAbilityMod": function(ability) { return theoremancer_dnd5e_namespace.getIntValue(ability + "_mod"); }, "formatMod": function(value) { if (value === "") { return ""; } return (value < 0) ? value : ("+" + value) }, "setIntValue": function(field, value) { if (value !== "") { value = theoremancer_dnd5e_namespace.parseMod(value); } if (theoremancer_dnd5e_namespace.getField(field).hasClass("theoremancer_dnd5e_mod")) { var modValue = theoremancer_dnd5e_namespace.formatMod(value); } theoremancer_dnd5e_namespace.setStringValue(field, value); if (modValue) { $(".theoremancer_dnd5e_mod.dsf.dsf_" + field).text(modValue); } }, "setStringValue": function(field, value) { $(".dsf.dsf_" + field).text(value); }, "ensureAtLeastRows": function(fieldStub, minRows, options) { var containerId = "#" + options['containerId']; var isEditable = options["isEditable"] || (options['fieldName'] != undefined); function rebind(newRow) { $(newRow).find(".dsf").each(function(i, element) { var name = findDsfClass(element); if (name) aisleten.characters.bindField( name.replace("dsf_", ""), containerId.replace("#", ""), 'theoremancer_dnd5e'); }); } function findDsfClass(element) { var classes = $(element).attr('class'); if (!classes) { return; } classes = classes.split(/\s/); var fieldName = undefined; $.each(classes, function(i, className) { if (className.substr(0,4) == "dsf_") { fieldName = className; } }); return fieldName; } var addTarget = ".theoremancer_dnd5e_addtarget_" + fieldStub; if (!$(addTarget).length) { return; } if (fieldStub == "lvl") { var tableMagic = $(addTarget); // Create blank tbodies var tbodyLevel = $(tableMagic).find("tbody.theoremancer_dnd5e_slots:last").clone(); $(tbodyLevel).find("tr td.theoremancer_dnd5e_spelllevel").text(""); $(tbodyLevel).find("tr td span").text(""); $(tbodyLevel).find("tr td span.checkbox").hide(); var tbodySpells = $(tableMagic).find("tbody.theoremancer_dnd5e_spells:last").clone(); $(tbodySpells).find("tr td").text(""); // Remove tbody pairs with all empty cells var spells = $(tableMagic).find("tbody.theoremancer_dnd5e_spells"); $(tableMagic).find("tbody.theoremancer_dnd5e_slots").each( function(i, slot) { var spell = spells[i]; var spellLevel = $(slot).find("tr td.theoremancer_dnd5e_spelllevel"); var spellSlots = $(slot).find("tr td span.theoremancer_dnd5e_spellslots"); var spellCells = $(spell).find("tr td"); if (spellLevel.text().trim() == "" && spellSlots.text().trim() == "" && spellCells.text().trim() == "") { $(slot).remove(); $(spell).remove(); } }); // Append as many blank tbodies as are needed to achieve the minimim. var currentRows = $(tableMagic).find("tbody").length / 2; minRows = Math.max(currentRows + 1, minRows || 1); while (currentRows < minRows) { $(tableMagic).append(tbodyLevel.clone()); $(tableMagic).append(tbodySpells.clone()); currentRows++; } // Renumber fields by spell level $(tableMagic).find("tbody").each(function(i, tbody) { var lvl = Math.floor(i/2); $(tbody).attr("class").split(/\s/).filter(function(val, j) { return val.startsWith("theoremancer_dnd5e_addtarget_lvl"); }).forEach(function(oldClass) { var newClass = oldClass.replace( /(\w+)lvl\d/, "$1lvl" + lvl); $(tbody).removeClass(oldClass).addClass(newClass); }); $(tbody).find("tr .dsf").each(function(j, td) { var oldDsfClass = findDsfClass(td); var newDsfClass = oldDsfClass.replace( /(\w+)lvl\d+(\w*)/, "$1lvl" + lvl + "$2"); $(td).removeClass(oldDsfClass).addClass(newDsfClass); }); }); $(tableMagic).find("tbody.theoremancer_dnd5e_spells").show(); if (isEditable) { $(tableMagic).find("tbody.theoremancer_dnd5e_spells:last").hide(); } } else if (fieldStub == "strskill" || fieldStub == "dexskill" || fieldStub == "conskill" || fieldStub == "intskill" || fieldStub == "wisskill" || fieldStub == "chaskill") { // Custom skills var abilityBlock = $(addTarget); // Create a blank row var newSkillBlock = $(abilityBlock).find("div.theoremancer_dnd5e_customskill:last").clone(); $(newSkillBlock).find(".dsf").text(""); // Remove rows with all empty skill names $(abilityBlock).find("div").filter(function() { return $("label", this).text().trim() == ""; }).remove(); // Append as many blank rows as are needed to achieve the minimim. var currentRows = $(abilityBlock).find("div.theoremancer_dnd5e_customskill").length; minRows = Math.max(currentRows + 1, minRows || 1); while (currentRows < minRows) { $(abilityBlock).append(newSkillBlock.clone()); currentRows++; } // Renumber fields by row number $(abilityBlock).find("div.theoremancer_dnd5e_customskill").each(function(i, skillDiv) { $(skillDiv).find("span, label").each(function(j, field) { var oldDsfClass = findDsfClass(field); if (oldDsfClass) { var newDsfClass = oldDsfClass.replace(/([A-Za-z_]+\d+[A-Za-z_]+|[A-Za-z_]+)\d+/, "$1" + (i + 1)); $(field).removeClass(oldDsfClass).addClass(newDsfClass); } }); }); } else { var tbody = $(addTarget); // Create a blank row var tr = $(tbody).find("tr:last").clone(); $(tr).find("td").text(""); // Remove rows with all empty cells $(tbody).find("tr").filter(function() { return $("td", this).text().trim() == ""; }).remove(); // Append as many blank rows as are needed to achieve the minimim. var currentRows = $(tbody).find("tr").length; minRows = Math.max(currentRows + 1, minRows || 1); while (currentRows < minRows) { $(tbody).append(tr.clone()); currentRows++; } // Renumber fields by row number $(tbody).find("tr").each(function(i, tr) { $(tr).find("td").each(function(j, td) { var oldDsfClass = findDsfClass(td); if (oldDsfClass) { var newDsfClass = oldDsfClass.replace(/([A-Za-z_]+\d+[A-Za-z_]+|[A-Za-z_]+)\d+/, "$1" + (i + 1)); $(td).removeClass(oldDsfClass).addClass(newDsfClass); } }); }); } // Rebind fields rebind($(addTarget)); // Update value count var ctlCount = theoremancer_dnd5e_namespace.countLookup[fieldStub] || fieldStub + "_count"; if (ctlCount && currentRows) { theoremancer_dnd5e_namespace.setIntValue(ctlCount, currentRows - 1); } }, "_placeholder":"" }; function theoremancer_dnd5e_dataChange(options) { // alert("dataChange. " + options['fieldName'] + " = " + options['fieldValue']); var field = options['fieldName']; var val = options['fieldValue']; var containerId = "#" + options['containerId']; switch (field) { case "proficiency": // Update saves and skills theoremancer_dnd5e_namespace.abilities.forEach( function(ability) { theoremancer_dnd5e_namespace.updateSave(ability); theoremancer_dnd5e_namespace.updateSkills(ability); }); theoremancer_dnd5e_namespace.updateMagicStats(); break; case "armor_bonus": case "shield_bonus": case "dex_mod_armor": case "misc_mod": theoremancer_dnd5e_namespace.updateAC(); break; case "dex_mod_init": case "misc_init_mod": theoremancer_dnd5e_namespace.updateInitiative(); break; case "str": case "strtemp": case "dex": case "dextemp": case "con": case "contemp": case "int": case "inttemp": case "wis": case "wistemp": case "cha": case "chatemp": var ability = field.substring(0, 3); theoremancer_dnd5e_namespace.updateAbility(ability); break; case "strsave_misc_mod": case "dexsave_misc_mod": case "consave_misc_mod": case "intsave_misc_mod": case "wissave_misc_mod": case "chasave_misc_mod": case "strsave_cs": case "dexsave_cs": case "consave_cs": case "intsave_cs": case "wissave_cs": case "chasave_cs": var ability = field.substring(0, 3); theoremancer_dnd5e_namespace.updateSave(ability); break; case "athletics_misc_mod": case "acrobatics_misc_mod": case "slightofhand_misc_mod": case "stealth_misc_mod": case "arcana_misc_mod": case "history_misc_mod": case "investigation_misc_mod": case "nature_misc_mod": case "religion_misc_mod": case "animalhandling_misc_mod": case "insight_misc_mod": case "medicine_misc_mod": case "perception_misc_mod": case "survival_misc_mod": case "deception_misc_mod": case "intimidation_misc_mod": case "performance_misc_mod": case "persuasion_misc_mod": case "athletics_cs": case "acrobatics_cs": case "slightofhand_cs": case "stealth_cs": case "arcana_cs": case "history_cs": case "investigation_cs": case "nature_cs": case "religion_cs": case "animalhandling_cs": case "insight_cs": case "medicine_cs": case "perception_cs": case "survival_cs": case "deception_cs": case "intimidation_cs": case "performance_cs": case "persuasion_cs": var skill = field.substring(0, field.indexOf("_")); ability = theoremancer_dnd5e_namespace.skillAbility[skill]; theoremancer_dnd5e_namespace.updateSkill(skill, ability); break; case "light_load": case "medium_load": case "heavy_load": theoremancer_dnd5e_namespace.updateEncumbrance(field); break; case "cp": case "sp": case "ep": case "gp": case "pp": theoremancer_dnd5e_namespace.updateTotal("item", "value"); break; } if (field.startsWith("strskill") || field.startsWith("dexskill") || field.startsWith("conskill") || field.startsWith("intskill") || field.startsWith("wisskill") || field.startsWith("chaskill")) { var skill = field.substring(0, field.indexOf("_")); var ability = field.substring(0, 3); theoremancer_dnd5e_namespace.updateSkill(skill, ability); } // TODO: proficiency bonus multipliers (e.g. Jack of All Trades, Expertise) // TODO: move Initiative to be a Dex skill? // TODO: checkbox to track equipped items (count against carrying capacity) // TODO: checkbox to track attunement for magic items // TODO: inventory quantity (ammunition) // TODO: inventory contains (sum weights of contents) // TODO: trait/feature/feat expenditure and refresh-on-rest // TODO: lifestyle expenses // TODO: multiclass spellcasters if (field.startsWith("item")) { if (field.endsWith("_weight")) { theoremancer_dnd5e_namespace.updateTotal("item", "weight"); } else if (field.endsWith("_value")) { theoremancer_dnd5e_namespace.updateTotal("item", "value"); } } // TODO: multi-valued: personality traits, ideals, bonds, flaws // TODO: rename spell fields to support j5es import var multi = /^([A-Za-z_]+)(\d+)(?:([A-Za-z_]+)(?:(\d+)([A-Za-z_]+)?)?)?/.exec(field); if (multi) { if (multi[1] == "lvl" && multi[3] == "_slots") { // Update number of slot checkboxes shown theoremancer_dnd5e_namespace.updateSpellSlotCheckboxes(multi[2]); } else if (multi[1] == "lvl" && multi[3] == "_spell" && multi[5] == "_prep") { // Update number of prepared/known spells theoremancer_dnd5e_namespace.setIntValue( "spells_prepared", $(".dsf.checkbox.theoremancer_dnd5e_spellprep input:checked").length); } else { if (multi[4]) { var fieldStub = multi[1] + multi[2] + multi[3]; var index = parseInt(multi[4]); } else { var fieldStub = multi[1]; var index = parseInt(multi[2]); } if (fieldStub == "featDescription") { fieldStub = "feat"; } else if (multi[1] == "lvl" && multi[3] == "_spent") { fieldStub = "lvl"; } theoremancer_dnd5e_namespace.ensureAtLeastRows(fieldStub, 1, options); } } if (theoremancer_dnd5e_namespace.getField(field).hasClass("theoremancer_dnd5e_mod") || theoremancer_dnd5e_namespace.getField(field).hasClass("theoremancer_dnd5e_score")) { theoremancer_dnd5e_namespace.setIntValue(field, val); } } function theoremancer_dnd5e_dataPreLoad(options) { var containerId = "#" + options['containerId']; var isEditable = options['isEditable']; $(containerId + " .theoremancer_dnd5e_spellcasting_ability").change( function(event) { theoremancer_dnd5e_namespace.setStringValue( "spellcasting_ability", $(this).val()); theoremancer_dnd5e_namespace.updateMagicStats(); }); var minimum = 0; // TODO: migrate old fields to new fields /* vision => sense# languages => language# (special abilities => trait/feature/feat) ctlAbilityCount => +ctlFeatcount special_ability# => feat# special_abilityDescription# => featDescription# (armor => items) armor1_type => item# armor1_special_properties => item#_desc armor4_type => item# armor4_special_properties => item#_desc (spells) dsf_ctlSpellSectionCount spsSec#_Domain#_Name (0+)(0+) spsSec#_Domain#_Power# (0+)(0+)(1+) spsSec#_Known# (0+)(0-9) spsSec#_Prepared# (0+)(0-9) spsSec#_KnownNumber# (0+)(0-9) spsSec#_PerDayNumber# (0+)(0-9) spsSec#_BonusNumber# (0+)(1-9) spsSec#_Domain0_Spells# (0+)(1-9) */ theoremancer_dnd5e_namespace.multiRow.forEach( function(fieldStub) { var ctlCount = theoremancer_dnd5e_namespace.countLookup[fieldStub] || fieldStub + "_count"; if (!dynamic_sheet_attrs[ctlCount] || dynamic_sheet_attrs[ctlCount] < minimum) { dynamic_sheet_attrs[ctlCount] = minimum; } // TODO: make room only for values that are defined. theoremancer_dnd5e_namespace.ensureAtLeastRows( fieldStub, parseInt(dynamic_sheet_attrs[ctlCount]) + (isEditable ? 1 : 0), options); if (fieldStub == "lvl") { for (var i = 0; i < dynamic_sheet_attrs[ctlCount]; i++) { var spellCount = parseInt(dynamic_sheet_attrs["lvl" + i + "_spell_count"]) || 1; theoremancer_dnd5e_namespace.ensureAtLeastRows( "lvl" + i + "_spell", spellCount + (isEditable ? 1 : 0), options); } } }); } function theoremancer_dnd5e_dataPostLoad(options) { var containerId = "#" + options['containerId']; var spellLevels = theoremancer_dnd5e_namespace.getIntValue("lvl_count") || 0; for (var i = 0; i <= spellLevels; i++) { theoremancer_dnd5e_namespace.updateSpellSlotCheckboxes(i); } theoremancer_dnd5e_namespace.updateTotal("item", "weight"); theoremancer_dnd5e_namespace.updateTotal("item", "value"); // Hide dropdown menu if (options["isEditable"]) { // Populate dropdown with spellcasting ability $(containerId + " .theoremancer_dnd5e_spellcasting_ability").val( theoremancer_dnd5e_namespace.getStringValue("spellcasting_ability")); } else { // Hide dropdown and show $(containerId + " .theoremancer_dnd5e_spellcasting_ability").hide(); $(containerId + " .dsf.dsf_spellcasting_ability").show(); } }
Submit Notes
- Custom skills. - Add Temporary Max HP. - Rename "Total" hit dice to "Max" hit dice. - Add treasure value subtotal. - Minor layout tweaks.
Back