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
Homebrew Pathfinder Sheet
Author:
Solarbear
Slug:
jhbpfs
System:
other
DST Source Code
HTML Template
<div class="fancybox"> <h3 class="title">Basic Information</h3> <table width="100%"> <col width="125"/> <col width="151"/> <col width="151"/> <col width="151"/> <col /> <tr> <td rowspan="10"><div class="dsf dsf_avatar_image readonly"></div></td> <td class="dsf dsf_name readonly"></td> <td class="dsf dsf_alignment"></td> <td class="dsf dsf_race"></td> <td class="dsf dsf_class"></td> </tr> <tr> <th>Character Name</th> <th>Alignment</th> <th>Race</th> <th>Favored Class</th> </tr> <tr> <td class="dsf dsf_homeland"></td> <td class="dsf dsf_deity"></td> <td class="dsf dsf_gender"></td> <td class="dsf dsf_age"></td> </tr> <tr> <th>Homeland</th> <th>Deity</th> <th>Gender</th> <th>Age</th> </tr> <tr> <td class="dsf dsf_height"></td> <td class="dsf dsf_weight"></td> <td class="dsf dsf_skin"></td> <td class="dsf dsf_eyes"></td> </tr> <tr> <th>Height</th> <th>Weight</th> <th>Skin</th> <th>Hair/Eyes</th> </tr> <tr> <td class="dsf dsf_level"></td> <td class="dsf dsf_mythic"></td> <td class="dsf dsf_reputation"></td> <td class="dsf dsf_experience_points"></td> </tr> <tr> <th>Class Level(s)</th> <th>Mythic Tier</th> <th>Fame/Reputation</th> <th>Experience Points</th> </tr> <tr> <td colspan="4" class="dsf dsf_languages"></td> </tr> <tr> <th colspan="4">Languages</th> </tr> </table> </div> <br> <div class="fancybox statsbox"> <h3 class="title">Abilities</h3> <table width="160"> <tr> <th>Name</th> <th>Score</th> <th>Mod</th> <th>Temp<br />Change</th> </tr><tr> <th class="stat">Str</th> <td class="dsf dsf_str"></td> <td class="dsf dsf_str_mod readonly"></td> <td class="dsf dsf_str_boost"></td> </tr><tr> <th class="stat">Dex</th> <td class="dsf dsf_dex"></td> <td class="dsf dsf_dex_mod readonly"></td> <td class="dsf dsf_dex_boost"></td> </tr><tr> <th class="stat">Con</th> <td class="dsf dsf_con"></td> <td class="dsf dsf_con_mod readonly"></td> <td class="dsf dsf_con_boost"></td> </tr><tr> <th class="stat">Int</th> <td class="dsf dsf_int"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_int_boost"></td> </tr><tr> <th class="stat">Wis</th> <td class="dsf dsf_wis"></td> <td class="dsf dsf_wis_mod readonly"></td> <td class="dsf dsf_wis_boost"></td> </tr><tr> <th class="stat">Cha</th> <td class="dsf dsf_cha"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_cha_boost"></td> </tr> </table> </div> <div class="miscbox"> <div class="fancybox hpbox"> <h3 class="title">Hit Points</h3> <table width="100%"> <col /> <col width="33%" /> <col width="33%" /> <tr> <td class="dsf dsf_wounds"></td> <td class="dsf dsf_hp"></td> <td class="dsf dsf_nonlethal"></td> </tr><tr> <th>Current</th> <th>Max</th> <th>Nonlethal</th> </tr> </table> </div> <div class="fancybox initbox"> <h3 class="title">Initiative</h3> <table width="100%"> <tr> <td class="dsf dsf_initative_total readonly"></td> <td class="dsf dsf_dex_mod readonly"></td> <td class="dsf dsf_misc_init_mod"></td> </tr><tr> <th>Total</th> <th>Dex</th> <th>Misc</th> </tr> </table> </div> <div class="fancybox speedbox"> <h3 class="title">Movement</h3> <table width="100%"> <tr> <td class="dsf dsf_speed"></td> </tr><tr> <th>Speed</th> </tr> </table> </div> <div class="fancybox acbox"> <h3 class="title">Armor Class</h3> <table width="100%"> <tr> <td class="dsf dsf_ac readonly"></td> <td class="dsf dsf_touch_ac"></td> <td class="dsf dsf_flat_footed_ac"></td> <td class="collapse" rowspan="2">=</td> <td class="dsf dsf_armor_bonus"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_shield_bonus"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_dex_mod_armor"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_size_mod"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_natural_armor"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_deflection_mod"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_dodge_mod"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_misc_mod"></td> </tr><tr> <th>Total</th> <th>Touch</th> <th>Flat-F.</th> <th>Armor</th> <th>Shield</th> <th>Dex</th> <th>Size</th> <th>Natural</th> <th>Defl.</th> <th>Dodge</th> <th>Misc</th> </tr> </table> </div> <div class="fancybox grapplebox"> <h3 class="title">Defenses</h3> <table width="100%"> <tr> <td class="dsf dsf_miss_chance"></td> <td class="dsf dsf_damage_reduction"></td> <td class="dsf dsf_sr"></td> </tr><tr> <th>Miss %</th> <th>DR</th> <th>SR</th> </tr><tr> <td class="dsf dsf_resistance" colspan="3"></td> </tr><tr> <th colspan="3">Resistances</th> </tr> </table> </div> <div class="fancybox attackbox grapplebox"> <h3 class="title">Attack Bonuses</h3> <table width="100%"> <col width="50" /> <col width="150" /> <col width="1" /> <col /> <col width="1" /> <col /> <col width="1" /> <col /> <col width="1" /> <col /> <tr> <td class="noborder">Melee</td> <td class="dsf dsf_attack_melee_total readonly"></td> <td class="collapse">=</td> <td class="dsf dsf_bab" rowspan="2"></td> <td class="collapse">+</td> <td class="dsf dsf_str_mod readonly"></td> <td class="collapse">+</td> <td class="dsf dsf_size_mod" rowspan="2"></td> <td class="collapse">+</td> <td class="dsf dsf_attack_melee_misc"></td> </tr><tr> <td class="noborder">Ranged</td> <td class="dsf dsf_attack_ranged_total readonly"></td> <td class="collapse">=</td> <td class="collapse">+</td> <td class="dsf dsf_dex_mod readonly"></td> <td class="collapse">+</td> <td class="collapse">+</td> <td class="dsf dsf_attack_ranged_misc"></td> </tr><tr> <td class="noborder"></td> <th class="noborder">Total</th> <td class="noborder"></td> <th class="noborder">BAB</th> <td class="noborder"></td> <th class="noborder">Mod</th> <td class="noborder"></td> <th class="noborder">Size</th> <td class="noborder"></td> <th class="noborder">Misc</th> </tr><tr> <td class="noborder" height="3" colspan="10"></td> </tr> </table> </div> </div> <br> <div class="fancybox attackbox halfwidth"> <h3 class="title">Saving Throws</h3> <table> <tr> <td class="noborder">Fort</td> <td class="dsf dsf_fortitude_total readonly"></td> <td class="noborder">=</td> <td class="dsf dsf_base_fort_save"></td> <td class="noborder">+</td> <td class="dsf dsf_con_mod readonly"></td> <td class="noborder">+</td> <td class="dsf dsf_misc_fort_mod"></td> <td class="noborder"> </td> <td class="dsf dsf_saves_conditional" rowspan="3"></td> </tr><tr> <td class="noborder">Reflex</td> <td class="dsf dsf_reflex_total readonly"></td> <td class="noborder">=</td> <td class="dsf dsf_base_reflex_save"></td> <td class="noborder">+</td> <td class="dsf dsf_dex_mod readonly"></td> <td class="noborder">+</td> <td class="dsf dsf_misc_reflex_mod"></td> <td class="noborder"> </td> </tr><tr> <td class="noborder">Will</td> <td class="dsf dsf_willpower_total readonly"></td> <td class="noborder">=</td> <td class="dsf dsf_base_willpower_save"></td> <td class="noborder">+</td> <td class="dsf dsf_wis_mod readonly"></td> <td class="noborder">+</td> <td class="dsf dsf_misc_willpower_mod"></td> <td class="noborder"> </td> </tr><tr> <td class="noborder"> </td> <th>Total</th> <td class="noborder"> </td> <th>Base</th> <td class="noborder"> </td> <th>Mod</th> <td class="noborder"> </td> <th>Misc.</th> <td class="noborder"> </td> <th>Conditional</th> </tr> </table> </div> <div class="fancybox halfwidth"> <h3 class="title">CMB/CMD</h3> <table width="100%"> <tr> <td class="dsf dsf_cmb_total readonly"></td> <td class="collapse" rowspan="2">=</td> <td class="dsf dsf_bab readonly"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_str_mod readonly"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_size_mod_cmb readonly"></td> <td></td> <td></td> <td class="dsf dsf_conditional_cmb_mod" rowspan="3"></td> </tr><tr> <th>CMB</th> <th>BAB</th> <th>Str</th> <th>Size</th> </tr><tr> <td class="dsf dsf_cmd_total readonly"></td> <td class="collapse" rowspan="2">=</td> <td class="dsf dsf_bab readonly"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_str_mod readonly"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_dex_mod readonly"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_size_mod_cmd readonly"></td> </tr><tr> <th>CMD</th> <th>BAB</th> <th>Str</th> <th>Dex</th> <th>Size</th> <th>Conditional</th> </tr><tr> <td class="noborder"> </td> </tr> </table> </div> <br> <div class="fancybox weaponbox"> <h3 class="title">Weapons<span class="ctlAddWeapon addButton">+ Add</span></h3> <div class="dsf dsf_ctlWeaponCount" style="display:none"></div> <table class="weaponTable" prefix="weapon"> <tr> <th>Name</th> <th>Att.</th> <th>Dmg.</th> <th>Crit</th> <th>Range</th> <th>Type</th> <th>SQ</th> <th>HP</th> <th>Hardness</th> </tr> </table> </div> <br> <div class="halfwidth valigntop"> <div class="fancybox halfwidth traitbox"> <h3 class="title">Traits<span class="ctlAddTrait addButton">+ Add</span></h3> <div class="dsf dsf_ctlTraitCount" style="display:none"></div> <table width="100%" class="traitTable" prefix="trait"> <tr><th>Trait</th><th>Description</th></tr> </table> </div> <div class="fancybox halfwidth skillbox"> <h3 class="title">Skills</h3> <div class="dsf dsf_ctlSkillCount" style="display:none"></div> <div class="halfwidth"> <h4 class="title">Core Skills<span class="ctlAddSkill addButton">+ Add</span></h4> </div> <table width="100%" class="skillTable" prefix="skill"> <tr> <th>CS</th> <th>Skill</th> <th>Ability</th> <th>Total</th> <th>Mod</th> <th>Ranks</th> <th>Misc</th> </tr><tr> <td><span class="dsf dsf_acrobatics_cs checkbox"></span></td> <td>Acrobatics</td> <td>Dex</td> <td class="dsf dsf_acrobatics_mod readonly"></td> <td class="dsf dsf_dex_mod readonly"></td> <td class="dsf dsf_acrobatics_ranks"></td> <td class="dsf dsf_acrobatics_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_anthropology_cs checkbox"></span></td> <td>Anthropology<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_anthropology_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_anthropology_ranks"></td> <td class="dsf dsf_anthropology_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_appraisal_cs checkbox"></span></td> <td>Appraisal<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_appraisal_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_appraisal_ranks"></td> <td class="dsf dsf_appraisal_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_arcana_cs checkbox"></span></td> <td>Arcana<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_arcana_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_arcana_ranks"></td> <td class="dsf dsf_arcana_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_athletics_cs checkbox"></span></td> <td>Athletics</td> <td>Str</td> <td class="dsf dsf_athletics_mod readonly"></td> <td class="dsf dsf_str_mod readonly"></td> <td class="dsf dsf_athletics_ranks"></td> <td class="dsf dsf_athletics_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_ciphers_cs checkbox"></span></td> <td>Ciphers<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_ciphers_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_ciphers_ranks"></td> <td class="dsf dsf_ciphers_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_creature_handling_cs checkbox"></span></td> <td>Creature Handling</td> <td>Wis</td> <td class="dsf dsf_creature_handling_mod readonly"></td> <td class="dsf dsf_wis_mod readonly"></td> <td class="dsf dsf_creature_handling_ranks"></td> <td class="dsf dsf_creature_handling_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_deception_cs checkbox"></span></td> <td>Deception</td> <td>Cha</td> <td class="dsf dsf_deception_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_deception_ranks"></td> <td class="dsf dsf_bluff_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_diplomacy_cs checkbox"></span></td> <td>Diplomacy</td> <td>Cha</td> <td class="dsf dsf_diplomacy_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_diplomacy_ranks"></td> <td class="dsf dsf_diplomacy_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_engineering_cs checkbox"></span></td> <td>Engineering<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_engineering_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_engineering_ranks"></td> <td class="dsf dsf_engineering_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_finesse_cs checkbox"></span></td> <td>Finesse<sup>TO</sup></td> <td>Dex</td> <td class="dsf dsf_finesse_mod readonly"></td> <td class="dsf dsf_dex_mod readonly"></td> <td class="dsf dsf_finesse_ranks"></td> <td class="dsf dsf_finesse_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_healing_cs checkbox"></span></td> <td>Healing</td> <td>Wis</td> <td class="dsf dsf_healing_mod readonly"></td> <td class="dsf dsf_wis_mod readonly"></td> <td class="dsf dsf_healing_ranks"></td> <td class="dsf dsf_healing_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_intimidation_cs checkbox"></span></td> <td>Intimidation</td> <td>Cha</td> <td class="dsf dsf_intimidation_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_intimidation_ranks"></td> <td class="dsf dsf_intimidation_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_insight_cs checkbox"></span></td> <td>Insight</td> <td>Wis</td> <td class="dsf dsf_insight_mod readonly"></td> <td class="dsf dsf_wis_mod readonly"></td> <td class="dsf dsf_insight_ranks"></td> <td class="dsf dsf_insight_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_noetics_cs checkbox"></span></td> <td>Noetics<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_noetics_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_noetics_ranks"></td> <td class="dsf dsf_noetics_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_perception_cs checkbox"></span></td> <td>Perception</td> <td>Wis</td> <td class="dsf dsf_perception_mod readonly"></td> <td class="dsf dsf_wis_mod readonly"></td> <td class="dsf dsf_perception_ranks"></td> <td class="dsf dsf_perception_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_stealth_cs checkbox"></span></td> <td>Stealth</td> <td>Dex</td> <td class="dsf dsf_stealth_mod readonly"></td> <td class="dsf dsf_dex_mod readonly"></td> <td class="dsf dsf_stealth_ranks"></td> <td class="dsf dsf_stealth_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_survival_cs checkbox"></span></td> <td>Survival</td> <td>Wis</td> <td class="dsf dsf_survival_mod readonly"></td> <td class="dsf dsf_wis_mod readonly"></td> <td class="dsf dsf_survival_ranks"></td> <td class="dsf dsf_survival_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_theology_cs checkbox"></span></td> <td>Theology<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_theology_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_theology_ranks"></td> <td class="dsf dsf_theology_misc_mod"></td> </tr> </table> <div class="dsf dsf_ctlNoncoreCount" style="display:none"></div> <div class="halfwidth"> <h4 class="title">Non-core Skills<span class="ctlAddNoncore addButton">+ Add</span></h4> </div> <table width="100%" class="noncoreTable" prefix="noncore"> <tr> <th>CS</th> <th>Skill</th> <th>Ability</th> <th>Total</th> <th>Mod</th> <th>Ranks</th> <th>Misc</th> </tr><tr> <td><span class="dsf dsf_artistry_cs checkbox"></span></td> <td>Artistry (<span class="dsf dsf_artistry"></span>)<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_artistry_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_artistry_ranks"></td> <td class="dsf dsf_artistry_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_craft_cs checkbox"></span></td> <td>Craft (<span class="dsf dsf_craft"></span>)<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_craft_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_craft_ranks"></td> <td class="dsf dsf_craft_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_craft2_cs checkbox"></span></td> <td>Craft (<span class="dsf dsf_craft2"></span>)<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_craft2_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_craft2_ranks"></td> <td class="dsf dsf_craft2_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_lore_cs checkbox"></span></td> <td>Lore (<span class="dsf dsf_lore"></span>)<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_lore_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_lore_ranks"></td> <td class="dsf dsf_lore_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_lore2_cs checkbox"></span></td> <td>Lore (<span class="dsf dsf_lore2"></span>)<sup>TO</sup></td> <td>Int</td> <td class="dsf dsf_lore2_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_lore2_ranks"></td> <td class="dsf dsf_lore2_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_perform_cs checkbox"></span></td> <td>Perform (<span class="dsf dsf_perform"></span>)<sup>TO</sup></td> <td>Cha</td> <td class="dsf dsf_perform_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_perform_ranks"></td> <td class="dsf dsf_perform_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_perform2_cs checkbox"></span></td> <td>Perform (<span class="dsf dsf_perform2"></span>)<sup>TO</sup></td> <td>Cha</td> <td class="dsf dsf_perform2_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_perform2_ranks"></td> <td class="dsf dsf_perform2_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_profession_cs checkbox"></span></td> <td>Profession (<span class="dsf dsf_profession"></span>)<sup>TO</sup></td> <td>Wis</td> <td class="dsf dsf_profession_mod readonly"></td> <td class="dsf dsf_wis_mod readonly"></td> <td class="dsf dsf_profession_ranks"></td> <td class="dsf dsf_profession_misc_mod"></td> </tr><tr> <td><span class="dsf dsf_profession2_cs checkbox"></span></td> <td>Profession (<span class="dsf dsf_profession2"></span>)<sup>TO</sup></td> <td>Wis</td> <td class="dsf dsf_profession2_mod readonly"></td> <td class="dsf dsf_wis_mod readonly"></td> <td class="dsf dsf_profession2_ranks"></td> <td class="dsf dsf_profession2_misc_mod"></td> </tr> </table> </div> </div> <div class="halfwidth valigntop"> <div class="fancybox halfwidth featbox"> <h3 class="title">Feats<span class="ctlAddFeat addButton">+ Add</span></h3> <div class="dsf dsf_ctlFeatCount" style="display:none"></div> <table width="100%" class="featTable" prefix="feat"> <tr><th>Feat</th><th>Description</th></tr> </table> </div> <div class="fancybox halfwidth abilitybox"> <h3 class="title">Class Abilities<span class="ctlAddAbility addButton">+ Add</span></h3> <div class="dsf dsf_ctlAbilityCount" style="display:none"></div> <table width="100%" class="abilityTable" prefix="special_ability"> <tr><th>Ability</th><th>Description</th></tr> </table> </div> <div class="fancybox halfwidth mythicbox"> <h3 class="title">Mythic Abilities<span class="ctlAddMythic addButton">+ Add</span></h3> <div class="dsf dsf_ctlMythicCount" style="display:none"></div> <table width="100%" class="mythicTable" prefix="mythic_ability"> <tr><th>Ability</th><th>Description</th></tr> </table> </div> </div> <div class="fancybox armorbox"> <h3 class="title">Equipment</h3> <div> <h4 class="title">Armor/Shield</h4> <table width="100%"> <tr> <th>Type</th> <th>Name</th> <th>Armor Bonus</th> <th>Max Dex</th> <th>Armor Check Penalty</th> <th>Spell Failure</th> <th>SQ</th> <th>HP</th> <th>Hardness</th> </tr><tr> <th>Armor</th> <td class="dsf dsf_armor1_type"></td> <td class="dsf dsf_armor1_ac_bonus"></td> <td class="dsf dsf_armor1_max_dex"></td> <td class="dsf dsf_armor1_penalty"></td> <td class="dsf dsf_armor1_spell_failure"></td> <td class="dsf dsf_armor1_special_properties"></td> <td class="dsf dsf_armor1_hp"></td> <td class="dsf dsf_armor1_hardness"></td> </tr><tr> <th>Armor</th> <td class="dsf dsf_armor2_type"></td> <td class="dsf dsf_armor2_ac_bonus"></td> <td class="dsf dsf_armor2_max_dex"></td> <td class="dsf dsf_armor2_penalty"></td> <td class="dsf dsf_armor2_spell_failure"></td> <td class="dsf dsf_armor2_special_properties"></td> <td class="dsf dsf_armor2_hp"></td> <td class="dsf dsf_armor2_hardness"></td> </tr><tr> <th>Armor</th> <td class="dsf dsf_armor3_type"></td> <td class="dsf dsf_armor3_ac_bonus"></td> <td class="dsf dsf_armor3_max_dex"></td> <td class="dsf dsf_armor3_penalty"></td> <td class="dsf dsf_armor3_spell_failure"></td> <td class="dsf dsf_armor3_special_properties"></td> <td class="dsf dsf_armor3_hp"></td> <td class="dsf dsf_armor3_hardness"></td> </tr><tr> <th>Shield</th> <td class="dsf dsf_armor4_type"></td> <td class="dsf dsf_armor4_ac_bonus"></td> <td class="dsf dsf_armor4_max_dex"></td> <td class="dsf dsf_armor4_penalty"></td> <td class="dsf dsf_armor4_spell_failure"></td> <td class="dsf dsf_armor4_special_properties"></td> <td class="dsf dsf_armor4_hp"></td> <td class="dsf dsf_armor4_hardness"></td> </tr> </table> <h4 class="title">Magic Items</h4> <table width="100%"> <tr> <th>Slot</th> <th>Name</th> <th>Bonus</th> <th>Item Description</th> </tr><tr> <th>Belt</th> <td class="dsf dsf_protitem1_type"></td> <td class="dsf dsf_protitem1_ac_bonus"></td> <td class="dsf dsf_protitem1_special_properties"></td> </tr><tr> <th>Body</th> <td class="dsf dsf_protitem3_type"></td> <td class="dsf dsf_protitem3_ac_bonus"></td> <td class="dsf dsf_protitem3_special_properties"></td> </tr><tr> <th>Chest</th> <td class="dsf dsf_protitem5_type"></td> <td class="dsf dsf_protitem5_ac_bonus"></td> <td class="dsf dsf_protitem5_special_properties"></td> </tr><tr> <th>Eyes</th> <td class="dsf dsf_protitem7_type"></td> <td class="dsf dsf_protitem7_ac_bonus"></td> <td class="dsf dsf_protitem7_special_properties"></td> </tr><tr> <th>Feet</th> <td class="dsf dsf_protitem9_type"></td> <td class="dsf dsf_protitem9_ac_bonus"></td> <td class="dsf dsf_protitem9_special_properties"></td> </tr><tr> <th>Hands</th> <td class="dsf dsf_protitem11_type"></td> <td class="dsf dsf_protitem11_ac_bonus"></td> <td class="dsf dsf_protitem11_special_properties"></td> </tr><tr> <th>Head</th> <td class="dsf dsf_protitem13_type"></td> <td class="dsf dsf_protitem13_ac_bonus"></td> <td class="dsf dsf_protitem13_special_properties"></td> </tr><tr> <th>Headband</th> <td class="dsf dsf_protitem15_type"></td> <td class="dsf dsf_protitem15_ac_bonus"></td> <td class="dsf dsf_protitem15_special_properties"></td> </tr><tr> <th>Neck</th> <td class="dsf dsf_protitem2_type"></td> <td class="dsf dsf_protitem2_ac_bonus"></td> <td class="dsf dsf_protitem2_special_properties"></td> </tr><tr> <th>Ring</th> <td class="dsf dsf_protitem4_type"></td> <td class="dsf dsf_protitem4_ac_bonus"></td> <td class="dsf dsf_protitem4_special_properties"></td> </tr><tr> <th>Ring</th> <td class="dsf dsf_protitem6_type"></td> <td class="dsf dsf_protitem6_ac_bonus"></td> <td class="dsf dsf_protitem6_special_properties"></td> </tr><tr> <th>Shoulders</th> <td class="dsf dsf_protitem8_type"></td> <td class="dsf dsf_protitem8_ac_bonus"></td> <td class="dsf dsf_protitem8_special_properties"></td> </tr><tr> <th>Wrist</th> <td class="dsf dsf_protitem10_type"></td> <td class="dsf dsf_protitem10_ac_bonus"></td> <td class="dsf dsf_protitem10_special_properties"></td> </tr><tr> <th>Slotless</th> <td class="dsf dsf_protitem12_type"></td> <td class="dsf dsf_protitem12_ac_bonus"></td> <td class="dsf dsf_protitem12_special_properties"></td> </tr><tr> <th>Slotless</th> <td class="dsf dsf_protitem14_type"></td> <td class="dsf dsf_protitem14_ac_bonus"></td> <td class="dsf dsf_protitem14_special_properties"></td> </tr><tr> <th>Slotless</th> <td class="dsf dsf_protitem16_type"></td> <td class="dsf dsf_protitem16_ac_bonus"></td> <td class="dsf dsf_protitem16_special_properties"></td> </tr> </table> </div> </div> <div class="fancybox inventorybox"> <h3 class="title">Inventory<span class="ctlAddInventory addButton">+ Add</span></h3> <div class="dsf dsf_ctlInventoryCount" style="display:none"></div> <div class="fancybox subbox halfwidth" style="height:60px;"> <h4 class="title">Carrying Capacity</h4> <table width="100%"> <col width="17%" /> <col width="17%" /> <col width="17%" /> <col width="29%" /> <col width="20%" /> <tr> <td style="text-align:right;"><span class="dsf dsf_light_load"></span> lbs.</td> <td style="text-align:right;"><span class="dsf dsf_medium_load readonly"></span> lbs.</td> <td style="text-align:right;"><span class="dsf dsf_heavy_load readonly"></span> lbs.</td> <td style="text-align:right;"><span class="dsf dsf_lift_over_head readonly"></span> lbs.</td> <td style="text-align:right;"><span class="dsf dsf_push_or_drag readonly"></span> lbs.</td> </tr><tr> <th>Light</th> <th>Medium</th> <th>Heavy</th> <th>Lift Over Head</th> <th>Push/Drag</th> </tr> </table> </div> <div class="fancybox subbox halfwidth" style="height:60px;"> <h4 class="title">Money</h4> <table width="100%"> <col /> <col width="20%" /> <col width="20%" /> <col width="20%" /> <col width="20%" /> <tr> <td style="text-align:right;" class="dsf dsf_wealth_total readonly"></td> <td style="text-align:right;" class="dsf dsf_pp"></td> <td style="text-align:right;" class="dsf dsf_gp"></td> <td style="text-align:right;" class="dsf dsf_sp"></td> <td style="text-align:right;" class="dsf dsf_cp"></td> </tr><tr> <th>Total</th> <th>PP</th> <th>GP</th> <th>SP</th> <th>CP</th> </tr> </table> </div> </div> <div class="fancybox spellbox"> <h3 class="title">Spells</h3> <div class="newSpellsDialog"><b>New Spells Section:</b> <input type="checkbox" name="spontaneous" /><label for="spontaneous">Spontaneous Caster</label> <input type="checkbox" name="spellbook" /><label for="spellbook">Uses Spellbook</label> <input type="checkbox" name="domains" /><label for="domains">Domains</label> <input type="text" name="minSpellLevel" size="1" maxlength="1" value="0" />—<input type="text" name="maxSpellLevel" size="1" maxlength="1" value="9" /> Spell Levels<span class="ctlAddSpellSection addButton">+ Add</span></div> <div class="dsf dsf_ctlSpellSectionCount" style="display:none"></div> </div> <div class="fancybox"> <h3 class="title">Character Bio</h3> <div class="dsf dsf_bio readonly"></div> </div> <br /> <br /> <div class="campaign">Campaign: <span class="dsf readonly dsf_campaign"></span></div> <div class="player">Player: <span class="dsf readonly dsf_player"></span></div> <div>Homebrew Pathfinder Sheet by: <span class="dsf readonly dsf_dst_author"></span></div>
CSS
@import url(http://fonts.googleapis.com/css?family=Arapey%7CBitter); .ds_jhbpfs .valigntop { display: inline-block; /* IE 7 hack */ *zoom:1; *display: inline; vertical-align: top; } .ds_jhbpfs { line-height: 12px; font-size: 10px !important; } .ds_jhbpfs th, .ds_jhbpfs td { font-family: 'Bitter',georgia,times,'times new roman',serif !important; } .ds_jhbpfs .dsf { height: 12px; vertical-align: bottom; } .ds_jhbpfs.editable span.dsf { min-width: 20px; display: inline-block; } .ds_jhbpfs .noborder { border: none !important; } .ds_jhbpfs table { margin: 0; border-collapse: separate; border-spacing: 2px; background-color: transparent; } .ds_jhbpfs th { font-size: 10px; border-top: 1px solid black; padding: 0; text-align: center; background: none; vertical-align: top; line-height: 11px; } .ds_jhbpfs sup { font-size: 60% } .ds_jhbpfs td { padding: 5px 5px 0 5px; text-align: center; font-size: 12px; } .ds_jhbpfs td, .ds_jhbpfs th { margin: 0 3px; } .ds_jhbpfs h3.title { font-family: Arapey,georgia,times,'times new roman',serif !important; background: #003c9f; /* Old browsers */ background: -moz-radial-gradient(center, ellipse cover, #A52A2A 0%, #000000 73%); /* FF3.6+ */ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#A52A2A), color-stop(73%,#000000)); /* Chrome,Safari4+ */ background: -webkit-radial-gradient(center, ellipse cover, #A52A2A 0%,#000000 73%); /* Chrome10+,Safari5.1+ */ background: -o-radial-gradient(center, ellipse cover, #A52A2A 0%,#000000 73%); /* Opera 12+ */ background: -ms-radial-gradient(center, ellipse cover, #A52A2A 0%,#000000 73%); /* IE10+ */ background: radial-gradient(center, ellipse cover, #A52A2A 0%,#000000 73%); /* W3C */ font-size: 16px; height: 16px; width: 100%; color: #ddd !important; text-align: center; margin: 0 !important; padding: 0px 0px 8px 0px !important; border-top-left-radius: inherit; border-top-right-radius: inherit; text-shadow: 1px 1px 1px #000 !important; } .ds_jhbpfs input, .ds_jhbpfs select { margin: 0; width: auto; height: auto; display: inline; } .ds_jhbpfs h4.title { font-family: Arapey,georgia,times,'times new roman',serif !important; background: #3c008f; /* Old browsers */ background: -moz-radial-gradient(center, ellipse cover, #B8860B 0%, #000000 73%); /* FF3.6+ */ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#B8860B), color-stop(73%,#000000)); /* Chrome,Safari4+ */ background: -webkit-radial-gradient(center, ellipse cover, #B8860B 0%,#000000 73%); /* Chrome10+,Safari5.1+ */ background: -o-radial-gradient(center, ellipse cover, #B8860B 0%,#000000 73%); /* Opera 12+ */ background: -ms-radial-gradient(center, ellipse cover, #B8860B 0%,#000000 73%); /* IE10+ */ background: radial-gradient(center, ellipse cover, #B8860B 0%,#000000 73%); /* W3C */ font-size: 14px; height: 14px; width: 100%; color: #ddd !important; text-align: center; margin: 0 !important; padding: 0px 0px 6px 0px !important; border-top-left-radius: inherit; border-top-right-radius: inherit; text-shadow: 1px 1px 1px #000 !important; } .ds_jhbpfs .newSpellsDialog { font-family: Arapey,georgia,times,'times new roman',serif !important; background: #008f00; /* Old browsers */ background: -moz-radial-gradient(center, ellipse cover, #B8860B 0%, #000000 73%); /* FF3.6+ */ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#B8860B), color-stop(73%,#000000)); /* Chrome,Safari4+ */ background: -webkit-radial-gradient(center, ellipse cover, #B8860B 0%,#000000 73%); /* Chrome10+,Safari5.1+ */ background: -o-radial-gradient(center, ellipse cover, #B8860B 0%,#000000 73%); /* Opera 12+ */ background: -ms-radial-gradient(center, ellipse cover, #B8860B 0%,#000000 73%); /* IE10+ */ background: radial-gradient(center, ellipse cover, #B8860B 0%,#000000 73%); /* W3C */ font-size: 14px; border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; width: 100%; color: #ddd; text-align: center; margin: 0; padding: 2px 0; text-shadow: 1px 1px 1px #000; } .ds_jhbpfs .newSpellsDialog label { display: inline; font: inherit; } .ds_jhbpfs .newSpellsDialog input { padding: 0 2px; font: inherit; } .ds_jhbpfs .collapse { width: 1px !important; padding: 0 !important; margin: 0 !important; border-spacing: 0 !important; border: none !important; } .ds_jhbpfs .addButton, .ds_jhbpfs .removeButton { display: none; } .ds_jhbpfs.editable .addButton { display: inline; float: right; min-width: 12px; height: 0px; margin: 3px 5px 3px 0px; padding: 0px 5px 0px 5px; border-radius: 8px; background-color: #722; color: #fff; cursor: pointer; font-weight: normal; font-size: 10px; } .ds_jhbpfs.editable .removeButton { display: inline; float: right; min-width: 12px; height: 0px; margin: 3px 5px 3px 0px; padding: 0px 5px 0px 5px; border-radius: 8px; background-color: #722; color: #fff; cursor: pointer; font-weight: normal; font-size: 10px; } .ds_jhbpfs.editable .dsf { background-color: #CDF; color: #000; border-radius: 2px; } .ds_jhbpfs.editable .dsf.readonly, .ds_jhbpfs.editable .dsf.checkbox { background-color: #fff; color: #000; border-radius: 0; } .ds_jhbpfs .fancybox { padding: 0 0 2px 0; margin: 5px 0 0 0; display: inline-block; width: 730px; vertical-align: top; border: 1px solid black; box-shadow: 3px 3px 3px #999; border-radius: 20px / 8px; background: #FFF; color: #000; } .ds_jhbpfs .statsbox { width: 200px; height: 175px; } .ds_jhbpfs .miscbox { width: 525px; display: inline-block; } .ds_jhbpfs .acbox { width: 524px; } .ds_jhbpfs .hpbox { width: 180px; } .ds_jhbpfs .initbox { width: 160px; } .ds_jhbpfs .speedbox { width: 172px; } .ds_jhbpfs .grapplebox { width: 258px; } .ds_jhbpfs .halfwidth { width: 364px; display: inline-block; } .ds_jhbpfs .quarterwidth { width: 180px; display: inline-block; margin-top: 0; } .ds_jhbpfs .threequarterwidth { width: 545px; display: inline-block; margin-top: 0; } .ds_jhbpfs .domain { border-top-left-radius: 0; border-top-right-radius: 0; margin-left: -1px; width: 181px; box-shadow: none; } .ds_jhbpfs .dcbox { width: 184px; margin-right: -1px; } .ds_jhbpfs .spellSection { margin-top: 5px; border-top-left-radius: inherit; border-top-right-radius: inherit; } .ds_jhbpfs .subbox.halfwidth { width: 364px; } .ds_jhbpfs .inventorybox .item { width: 237px; margin: 0 2px; display: inline-block; } .ds_jhbpfs .subbox { border-top-left-radius: 0; border-top-right-radius: 0; margin: 0 -1px 5px -1px; box-shadow: none; } .ds_jhbpfs .subbox + .subbox { margin-left: -2px; } .ds_jhbpfs .statsbox table, .ds_jhbpfs .savesbox table, .ds_jhbpfs .attackbox table, .ds_jhbpfs .armorbox table, .ds_jhbpfs .weaponbox table, .ds_jhbpfs .dcTable { border-spacing: 0 !important; border-collapse: collapse; width: 99%; margin-bottom: 4px; } .ds_jhbpfs .armorbox table, .ds_jhbpfs .weaponbox table { margin-left: 3px; width: 724px; } .ds_jhbpfs .attackbox table { margin-top: 8px; } .ds_jhbpfs .dcTable { margin-left: 2px; width: 180px; } .ds_jhbpfs .statsbox th, .ds_jhbpfs .savesbox th, .ds_jhbpfs .armorbox th, .ds_jhbpfs .featTable th, .ds_jhbpfs .traitTable th, .ds_jhbpfs .abilityTable th, .ds_jhbpfs .skillTable th, .ds_jhbpfs .noncoreTable th, .ds_jhbpfs .weaponbox th, .ds_jhbpfs .dcTable th, .ds_jhbpfs .mythicTable th { border: none; vertical-align: bottom; padding: 4px 2px; } .ds_jhbpfs .skillTable tr > td:first-child, .ds_jhbpfs .noncoreTable tr > td:first-child { text-align: left; } .ds_jhbpfs .statsbox th.stat, .ds_jhbpfs .savesbox th.stat { font-size: 12px; font-variant: small-caps; vertical-align: middle; } .ds_jhbpfs .statsbox td, .ds_jhbpfs .savesbox td, .ds_jhbpfs .attackbox td, .ds_jhbpfs .armorbox td, .ds_jhbpfs .weaponbox td, .ds_jhbpfs .dcTable td { border: 1px solid black; padding: 3px; vertical-align: middle; } .ds_jhbpfs .featTable td, .ds_jhbpfs .abilityTable td, .ds_jhbpfs .skillTable td, .ds_jhbpfs .noncoreTable td, .ds_jhbpfs .traitTable td, .ds_jhbpfs .mythicTable td { border-bottom: 1px solid black; padding: 3px; vertical-align: middle; } .ds_jhbpfs .skillTable td .ds_jhbpfs .noncorelTable td { font-size: 11px; line-height: 10px; } .ds_jhbpfs .spellList { width: 240px; margin: 2px 1px 2px 2px; display: inline-block; border-bottom: 1px solid black; } .ds_jhbpfs .spellList .dsf { width: 225px; display: inline-block; height: 100%; } .ds_jhbpfs .spellList .spellLevel { width: 15px; display: inline-block; } .ds_jhbpfs .dsf_bio { min-height: 100px; height: 100%; padding: 5px; border-bottom-left-radius: inherit !important; border-bottom-right-radius: inherit !important; } .ds_jhbpfs .sideways { -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); text-align: left; vertical-align: top; display: block; margin: 10px 0 15px 0; font-size: 10px; } .ds_jhbpfs .dsf_avatar_image { display: block; height: 100%; }
Javascript
var $ = jQuery; aisleten.characters.jeditablePlaceholder = " "; function jhbpfs_dataPreLoad(options) { if ($.browser.msie) { } if(typeof dynamic_sheet_attrs == "undefined") dynamic_sheet_attrs = {}; var containerId = "#" + options['containerId']; //Set defaults to keep the editing fields from making the form gross var defaults = { str: "10", dex: "10", "con": "10", "int": "10", wis: "10", cha: "10", languages: "", ctlFeatCount: 2, //Default number on Takissis's sheet ctlAbilityCount: 2, //Default number on Takissis's sheet ctlInventoryCount: 6, //Due to poor numbering, the max number on Takissis's sheet ctlSkillCount: 0, //Start with no extra skill lines ctlNoncoreCount2: 0, //Start with no extra noncore lines ctlTraitCount: 2, //A little extra padding to fill space ctlWeaponCount: 2, //Two rows, primary and backup ctlMythicCount: 2, //Default number on Takissis's sheet ctlSpellSectionCount: 0 } dynamic_sheet_attrs = $.extend(defaults, dynamic_sheet_attrs); if (!options.isEditable) { //We're in read-only mode, so alter the sheet a little to make it more useful //Can't add if it's not an edit $(containerId + " .newSpellsDialog").hide(); if (dynamic_sheet_attrs.ctlSpellSectionCount <= 0) { //Not a wielder, so hide that section $(containerId + " .spellbox").hide(); } if (dynamic_sheet_attrs.ctlTraitCount <= 0) { //Not a wielder, so hide that section $(containerId + " .traitbox").hide(); } if (dynamic_sheet_attrs.ctlMythicCount <= 0) { //Not a wielder, so hide that section $(containerId + " .mythicbox").hide(); } if (dynamic_sheet_attrs.ctlFeatCount <= 0) { //Not a wielder, so hide that section $(containerId + " .featbox").hide(); } if (dynamic_sheet_attrs.ctlAbilityCount <= 0) { //Not a wielder, so hide that section $(containerId + " .abilitybox").hide(); } } else { //First, we ensure that all the dynamic tables show at least one row if (dynamic_sheet_attrs.ctlFeatCount < 2) { dynamic_sheet_attrs.ctlFeatCount = 2; } if (dynamic_sheet_attrs.ctlAbilityCount < 2) { dynamic_sheet_attrs.ctlAbilityCount = 2; } if (dynamic_sheet_attrs.ctlMythicCount < 2) { dynamic_sheet_attrs.ctlMythicCount = 2; } if (dynamic_sheet_attrs.ctlTraitCount < 2) { dynamic_sheet_attrs.ctlTraitCount = 2; } if (dynamic_sheet_attrs.ctlSkillCount < 0) { dynamic_sheet_attrs.ctlSkillCount = 0; } if (dynamic_sheet_attrs.ctlNoncoreCount < 0) { dynamic_sheet_attrs.ctlNoncoreCount = 0; } if (dynamic_sheet_attrs.ctlWeaponCount < 2) { dynamic_sheet_attrs.ctlWeaponCount = 2; } if (dynamic_sheet_attrs.ctlInventoryCount < 6) { dynamic_sheet_attrs.ctlInventoryCount = 6; } //Loading in editing mode, so wire up the event handlers $(containerId + " .ctlAddFeat").bind("click.jhbpfs", function () { var ctl = $(containerId + " .dsf_ctlFeatCount"); var count = Number(ctl.text())+1; ctl.text(count); jhbpfs_addFeatRow('featTable', 'feat', count, containerId, true); }); $(containerId + " .ctlAddAbility").bind("click.jhbpfs", function () { var ctl = $(containerId + " .dsf_ctlAbilityCount"); var count = Number(ctl.text())+1; ctl.text(count); jhbpfs_addFeatRow('abilityTable', 'special_ability', count, containerId, true); }); $(containerId + " .ctlAddMythic").bind("click.jhbpfs", function () { var ctl = $(containerId + " .dsf_ctlMythicCount"); var count = Number(ctl.text())+1; ctl.text(count); jhbpfs_addFeatRow('mythicTable', 'mythic_ability', count, containerId, true); }); $(containerId + " .ctlAddTrait").bind("click.jhbpfs", function () { var ctl = $(containerId + " .dsf_ctlTraitCount"); var count = Number(ctl.text())+1; ctl.text(count); jhbpfs_addFeatRow('traitTable', 'trait', count, containerId, true); }); $(containerId + " .ctlAddSkill").bind("click.jhbpfs", function () { var ctl = $(containerId + " .dsf_ctlSkillCount"); var count = Number(ctl.text())+1; ctl.text(count); jhbpfs_addSkillRow('skillTable', count, containerId, true); }); $(containerId + " .ctlAddNoncore").bind("click.jhbpfs", function () { var ctl = $(containerId + " .dsf_ctlNoncoreCount"); var count = Number(ctl.text())+1; ctl.text(count); jhbpfs_addNoncoreRow('noncoreTable', count, containerId, true); }); $(containerId + " .ctlAddWeapon").bind("click.jhbpfs", function () { var ctl = $(containerId + " .dsf_ctlWeaponCount"); var count = Number(ctl.text())+1; ctl.text(count); jhbpfs_addWeaponRow('weaponTable', count, containerId, true); }); $(containerId + " .ctlAddInventory").bind("click.jhbpfs", function () { var ctl = $(containerId + " .dsf_ctlInventoryCount"); var count = Number(ctl.text())+1; ctl.text(count); jhbpfs_addInventoryRow('inventorybox', count, containerId, true); }); $(containerId + " .ctlAddSpellSection").bind("click.jhbpfs", function () { var ctl = $(containerId + " .dsf_ctlSpellSectionCount"); var count = Number(ctl.text()); ctl.text(count + 1); jhbpfs_addSpellSection('spellbox', count, containerId, true); }); $(containerId).delegate(".ctlRemoveSpellSection", "click", function () { var ctl = $(containerId + " .dsf_ctlSpellSectionCount"); var count = Number(ctl.text()) - 1; ctl.text(count); ctl = $(this).parents(".spellSectionContainer").next(); $(this).parents(".spellSectionContainer").remove(); jhbpfs_renumberSpellSections(ctl); }); } //Now, we initialize the dynamic rows to hold the incoming data for (var i=1; i<=dynamic_sheet_attrs.ctlFeatCount; i++) { jhbpfs_addFeatRow('featTable', 'feat', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlAbilityCount; i++) { jhbpfs_addFeatRow('abilityTable', 'special_ability', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlMythicCount; i++) { jhbpfs_addFeatRow('mythicTable', 'mythic_ability', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlTraitCount; i++) { jhbpfs_addFeatRow('traitTable', 'trait', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlSkillCount; i++) { jhbpfs_addSkillRow('skillTable', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlNoncoreCount; i++) { jhbpfs_addNoncoreRow('noncoreTable', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlWeaponCount; i++) { jhbpfs_addWeaponRow('weaponTable', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlInventoryCount; i++) { jhbpfs_addInventoryRow('inventorybox', i, containerId, options.isEditable); } for (var i=0; i<dynamic_sheet_attrs.ctlSpellSectionCount; i++) { jhbpfs_addSpellSection('spellbox', i, containerId, options.isEditable, dynamic_sheet_attrs["spsSec" + i + "_Spontaneous"] == '1', dynamic_sheet_attrs["spsSec" + i + "_Spellbook"] == '1', dynamic_sheet_attrs["spsSec" + i + "_Domains"] == '1', dynamic_sheet_attrs["spsSec" + i + "_MinLevel"], dynamic_sheet_attrs["spsSec" + i + "_MaxLevel"]); } } function jhbpfs_dataPostLoad(options) { //alert(JSON.stringify(dynamic_sheet_attrs)); // Called just after the data is loaded. if (options.isEditable) { var containerId = "#" + options['containerId']; //since we're editing, make sure that all the data is recalculated and correct jhbpfs_updateStat("str", containerId); jhbpfs_updateStat("dex", containerId); jhbpfs_updateStat("con", containerId); jhbpfs_updateStat("int", containerId); jhbpfs_updateStat("wis", containerId); jhbpfs_updateStat("cha", containerId); jhbpfs_updateInventoryStuff(containerId); var fixHelper = function(e, ui) { ui.children().each(function() { $(this).width($(this).width()); }); return ui; }; //Wire up sortable tables $(containerId + " .featTable").sortable({ items: "tr:not(:first)", helper: fixHelper, update: jhbpfs_renumberTable }); $(containerId + " .abilityTable").sortable({ items: "tr:not(:first)", helper: fixHelper, update: jhbpfs_renumberTable }); $(containerId + " .mythicTable").sortable({ items: "tr:not(:first)", helper: fixHelper, update: jhbpfs_renumberTable }); $(containerId + " .traitTable").sortable({ items: "tr:not(:first)", helper: fixHelper, update: jhbpfs_renumberTable }); $(containerId + " .inventorybox").sortable({ items: "div.item", helper: fixHelper, update: jhbpfs_renumberItems }); $(containerId + " .featTable tr, " + containerId + " .abilityTable tr, " + containerId + " .mythicTable tr, " + containerId + " .traitTable tr, " + containerId + " .inventorybox div.item").disableSelection(); } } function jhbpfs_dataChange(options) { // Called immediately after a data value is changed. // alert("dataChange. " + options['fieldName'] + " = " + options['fieldValue']); var field = options['fieldName']; var val = options['fieldValue']; var containerId = "#" + options['containerId']; //need to push the values to the other versions of the field //required due to how jEditable works //but exclude checkboxes if ((field.substr(field.length - 3) != '_cs')) $(containerId + " .dsf_" + field).text(val); switch (field) { case "str": case "str_damage": case "str_boost": jhbpfs_updateStat("str", containerId); break; case "int": case "int_damage": case "int_boost": jhbpfs_updateStat("int", containerId); break; case "wis": case "wis_damage": case "wis_boost": jhbpfs_updateStat("wis", containerId); break; case "dex": case "dex_damage": case "dex_boost": jhbpfs_updateStat("dex", containerId); break; case "con": case "con_damage": case "con_boost": jhbpfs_updateStat("con", containerId); break; case "cha": case "cha_damage": case "cha_boost": jhbpfs_updateStat("cha", containerId); break; case "base_fort_save": case "magic_fort_mod": case "misc_fort_mod": case "temp_fort_mod": case "base_reflex_save": case "magic_reflex_mod": case "misc_reflex_mod": case "temp_reflex_mod": case "base_willpower_save": case "magic_willpower_mod": case "misc_willpower_mod": case "temp_willpower_mod": jhbpfs_updateSaves(containerId); break; case "misc_init_mod": jhbpfs_updateInit(containerId); break; case "size_mod": jhbpfs_updateAC(containerId); jhbpfs_updateGrapple(containerId); case "bab": jhbpfs_updateAttacks(containerId); case "misc_mod_cmd": jhbpfs_updateGrapple(containerId); break; case "armor_bonus": case "shield_bonus": case "dex_mod_armor": case "misc_mod": case "natural_armor": jhbpfs_updateAC(containerId); break; case "deflection_mod": case "dodge_mod": jhbpfs_updateAC(containerId); jhbpfs_updateGrapple(containerId); break; case "pp": case "gp": case "sp": case "cp": case "light_load": jhbpfs_updateInventoryStuff(containerId); break; } if ((field.substr(field.length - 6) == '_ranks')) { jhbpfs_updateSkill(containerId, "dsf_" + field.substr(0, field.length - 6)); jhbpfs_updateNoncore(containerId, "dsf_" + field.substr(0, field.length - 6)); } else if ((field.substr(field.length - 9) == '_misc_mod')) { jhbpfs_updateSkill(containerId, "dsf_" + field.substr(0, field.length - 9)); jhbpfs_updateNoncore(containerId, "dsf_" + field.substr(0, field.length - 9)); } else if ((field.substr(field.length - 3) == '_cs')) { jhbpfs_updateSkill(containerId, "dsf_" + field.substr(0, field.length - 3)); jhbpfs_updateNoncore(containerId, "dsf_" + field.substr(0, field.length - 3)); } else if ((field.substr(field.length - 8) == '_ability')) { jhbpfs_updateSkill(containerId, "dsf_" + field.substr(0, field.length - 8)); jhbpfs_updateNoncore(containerId, "dsf_" + field.substr(0, field.length - 8)); } else if ((field.length >= 14) && (field.substr(0, 6) == 'spsSec') && (field.substr(field.length - 6) == 'BaseDC')) { for (var l=0; l<=9; l++) { $(containerId + " .dsf_" + field.substr(0, 7) + "_DC" + l).text(Number(val) + l); } } } function jhbpfs_dataPreSave(options) { // Called just before the data is saved to the server. // alert("dataPreSave"); var containerId = "#" + options['containerId']; //Comb through the dynamic tables and remove empty values jhbpfs_cleanTable("feat", "Feat", containerId); jhbpfs_cleanTable("special_ability", "Ability", containerId); jhbpfs_cleanTable("mythic_ability", "Mythic", containerId); jhbpfs_cleanTable("trait", "Trait", containerId); jhbpfs_cleanSkillTable("skill", "Skill", containerId); jhbpfs_cleanNoncoreTable("noncore", "Noncore", containerId); jhbpfs_cleanTable("weapon", "Weapon", containerId); jhbpfs_cleanInventoryTable("inventory", "Inventory", containerId); } // You can define your own variables...just make sure to namespace them! function jhbpfs_updateStat(stat, containerId) { var value = Number($(containerId + " .dsf_" + stat).text()) - Number($(containerId + " .dsf_" + stat + "_damage").text()) + Number($(containerId + " .dsf_" + stat + "_boost").text()); if (jhbpfs_isNumeric(value)) { $(containerId + " .dsf_" + stat + "_mod").text(Math.floor((parseInt(value) - 10) / 2)); switch (stat) { case "str": jhbpfs_updateAttacks(containerId); jhbpfs_updateGrapple(containerId); break; case "wis": jhbpfs_updateSaves(containerId); break; case "dex": jhbpfs_updateSaves(containerId); jhbpfs_updateInit(containerId); jhbpfs_updateAttacks(containerId); jhbpfs_updateAC(containerId); jhbpfs_updateGrapple(containerId); break; case "con": jhbpfs_updateSaves(containerId); break; } jhbpfs_updateSkills(containerId, stat); jhbpfs_updateNoncores(containerId, stat); } } function jhbpfs_updateSaves(containerId) { $(containerId + " .dsf_fortitude_total").text(Number($(containerId + " .dsf_base_fort_save").text()) + Number($(containerId + " .dsf_con_mod:first").text()) + Number($(containerId + " .dsf_magic_fort_mod").text()) + Number($(containerId + " .dsf_misc_fort_mod").text()) + Number($(containerId + " .dsf_temp_fort_mod").text())); $(containerId + " .dsf_willpower_total").text(Number($(containerId + " .dsf_base_willpower_save").text()) + Number($(containerId + " .dsf_wis_mod:first").text()) + Number($(containerId + " .dsf_magic_willpower_mod").text()) + Number($(containerId + " .dsf_misc_willpower_mod").text()) + Number($(containerId + " .dsf_temp_willpower_mod").text())); $(containerId + " .dsf_reflex_total").text(Number($(containerId + " .dsf_base_reflex_save").text()) + Number($(containerId + " .dsf_dex_mod:first").text()) + Number($(containerId + " .dsf_magic_reflex_mod").text()) + Number($(containerId + " .dsf_misc_reflex_mod").text()) + Number($(containerId + " .dsf_temp_reflex_mod").text())); } function jhbpfs_updateInit(containerId) { $(containerId + " .dsf_initative_total").text(Number($(containerId + " .dsf_dex_mod:first").text()) + Number($(containerId + " .dsf_misc_init_mod").text())); } function jhbpfs_updateAC(containerId) { $(containerId + " .dsf_ac").text(10 + Number($(containerId + " .dsf_armor_bonus").text()) + Number($(containerId + " .dsf_size_mod:first").text()) + Number($(containerId + " .dsf_shield_bonus").text()) + Number($(containerId + " .dsf_dex_mod_armor").text()) + Number($(containerId + " .dsf_deflection_mod").text()) + Number($(containerId + " .dsf_dodge_mod").text()) + Number($(containerId + " .dsf_misc_mod").text()) + Number($(containerId + " .dsf_natural_armor").text())); } function jhbpfs_updateGrapple(containerId) { var val = $(containerId + " .dsf_size_mod:first").text(); if (jhbpfs_isNumeric(val)) $(containerId + " .dsf_size_mod_cmb").text(-1 * parseInt(val)); else $(containerId + " .dsf_size_mod_cmb").text("0"); $(containerId + " .dsf_cmb_total").text(Number($(containerId + " .dsf_str_mod:first").text()) + Number($(containerId + " .dsf_bab:first").text()) + Number($(containerId + " .dsf_size_mod_cmb").text())); $(containerId + " .dsf_cmd_total").text(10 + Number($(containerId + " .dsf_str_mod:first").text()) + Number($(containerId + " .dsf_bab:first").text()) + Number($(containerId + " .dsf_size_mod_cmd").text()) + Number($(containerId + " .dsf_dex_mod:first").text()) + Number($(containerId + " .dsf_deflection_mod").text()) + Number($(containerId + " .dsf_dodge_mod").text())); $(containerId + " .dsf_size_mod_cmd").text(Number($(containerId + " .dsf_size_mod_cmb").text())); } function jhbpfs_updateAttacks(containerId) { var bab = Number($(containerId + " .dsf_bab:first").text()); var ranged = bab + Number($(containerId + " .dsf_size_mod:first").text()) + Number($(containerId + " .dsf_dex_mod:first").text()) + Number($(containerId + " .dsf_attack_ranged_misc").text()); var melee = bab + Number($(containerId + " .dsf_size_mod:first").text()) + Number($(containerId + " .dsf_str_mod:first").text()) + Number($(containerId + " .dsf_attack_melee_misc").text()); if (bab < 6) { $(containerId + " .dsf_attack_melee_total").text(jhbpfs_signedInt(melee)); $(containerId + " .dsf_attack_ranged_total").text(jhbpfs_signedInt(ranged)); } else if (bab < 11) { $(containerId + " .dsf_attack_melee_total").text(jhbpfs_signedInt(melee) + "/" + jhbpfs_signedInt(melee-5)); $(containerId + " .dsf_attack_ranged_total").text(jhbpfs_signedInt(ranged) + "/" + jhbpfs_signedInt(ranged-5)); } else if (bab < 16) { $(containerId + " .dsf_attack_melee_total").text(jhbpfs_signedInt(melee) + "/" + jhbpfs_signedInt(melee-5) + "/" + jhbpfs_signedInt(melee-10)); $(containerId + " .dsf_attack_ranged_total").text(jhbpfs_signedInt(ranged) + "/" + jhbpfs_signedInt(ranged-5) + "/" + jhbpfs_signedInt(ranged-10)); } else { $(containerId + " .dsf_attack_melee_total").text(jhbpfs_signedInt(melee) + "/" + jhbpfs_signedInt(melee-5) + "/" + jhbpfs_signedInt(melee-10) + "/" + jhbpfs_signedInt(melee-15)); $(containerId + " .dsf_attack_ranged_total").text(jhbpfs_signedInt(ranged) + "/" + jhbpfs_signedInt(ranged-5) + "/" + jhbpfs_signedInt(ranged-10) + "/" + jhbpfs_signedInt(ranged-15)); } } function jhbpfs_updateSkills(containerId, stat) { var id; stat = stat[0].toUpperCase() + stat.substr(1).toLowerCase(); $(containerId + " .skillTable td:contains(" + stat + ")").each(function (i, c) { id = jhbpfs_findDsfClass($(c).next()); if (id) { jhbpfs_updateSkill(containerId, id.substr(0, id.length - 4)); } }); } function jhbpfs_updateSkill(containerId, skill) { var modtype = $(containerId + " ." + skill + "_mod").prev().text().toLowerCase(); var classmod = Number($(containerId + " ." + skill + "_cs input").val()) ? 3 : 0; var ranks = Number($(containerId + " ." + skill + "_ranks").text()); var abilMod = Number($(containerId + " .dsf_" + modtype + "_mod:first").text()); if (ranks <= 0) { ranks = 0; classmod = 0; } var ctl = $(containerId + " ." + skill + "_ability_mod"); if (ctl.length) { //Custom field, so fill in the stat mod ctl.text(jhbpfs_signedInt(abilMod)); } $(containerId + " ." + skill + "_mod").text(jhbpfs_signedInt(classmod + ranks + Number($(containerId + " ." + skill + "_misc_mod").text()) + abilMod)); } function jhbpfs_updateNoncores(containerId, stat) { var id; stat = stat[0].toUpperCase() + stat.substr(1).toLowerCase(); $(containerId + " .noncoreTable td:contains(" + stat + ")").each(function (i, c) { id = jhbpfs_findDsfClass($(c).next()); if (id) { jhbpfs_updateNoncore(containerId, id.substr(0, id.length - 4)); } }); } function jhbpfs_updateNoncore(containerId, noncore) { var modtype = $(containerId + " ." + noncore + "_mod").prev().text().toLowerCase(); var classmod = Number($(containerId + " ." + noncore + "_cs input").val()) ? 3 : 0; var ranks = Number($(containerId + " ." + noncore + "_ranks").text()); var abilMod = Number($(containerId + " .dsf_" + modtype + "_mod:first").text()); if (ranks <= 0) { ranks = 0; classmod = 0; } var ctl = $(containerId + " ." + noncore + "_ability_mod"); if (ctl.length) { //Custom field, so fill in the stat mod ctl.text(jhbpfs_signedInt(abilMod)); } $(containerId + " ." + noncore + "_mod").text(jhbpfs_signedInt(classmod + ranks + Number($(containerId + " ." + noncore + "_misc_mod").text()) + abilMod)); } function jhbpfs_updateTotal(countTitle, fieldName, containerId) { var count = Number($(containerId + " .dsf_ctl" + countTitle + "Count").text()); var sum = 0; for (var i=0; i<count; i++) { var val = Number($(containerId + " .dsf_" + fieldName + i).text()); if (!isNaN(val)) sum += val; } $(containerId + " .dsf_" + fieldName + "Total").text(Math.round(100.0 * sum) / 100.0); } function jhbpfs_updateInventoryStuff(containerId) { var val = $(containerId + " .dsf_light_load").text(); if (jhbpfs_isNumeric(val)) { val = Number(val); var heavy = val * 3; //hack to fix 33 * 3 = 100 if (heavy % 10 == 9) heavy++; $(containerId + " .dsf_medium_load").text(val * 2); $(containerId + " .dsf_heavy_load").text(heavy); $(containerId + " .dsf_lift_over_head").text(heavy * 2); $(containerId + " .dsf_push_or_drag").text(heavy * 5); } $(containerId + " .dsf_wealth_total").text( Math.round(100 * (Number($(containerId + " .dsf_pp").text()) * 10 + Number($(containerId + " .dsf_gp").text()) + Number($(containerId + " .dsf_sp").text()) / 10.0 + Number($(containerId + " .dsf_cp").text()) / 100.0)) / 100.0 ); } function jhbpfs_bindRow(newRow, containerId) { //Force-bind the new elements. Ah, sweet hax containerId = containerId.replace("#", ""); newRow.find(".dsf").each(function (i, c) { var name = jhbpfs_findDsfClass(c); if (name) aisleten.characters.bindField(name.replace("dsf_", ""), containerId, 'jhbpfs'); }); } function jhbpfs_addFeatRow(table, prefix, num, containerId, isEditable) { var newRow = $('<tr class="jhbpfs_' + prefix + 'Row' + num +'"><td class="dsf dsf_' + prefix + num + '" /><td class="dsf dsf_' + prefix + 'Description' + num + '"> </td></tr>'); $(containerId + " ." + table).append(newRow); if (isEditable) { newRow.disableSelection(); jhbpfs_bindRow(newRow, containerId); } } function jhbpfs_addSkillRow(table, num, containerId, isEditable) { var newRow = $('<tr class="jhbpfs_extra_skillRow' + num +'"><td><span class="dsf dsf_skill' + num + '_cs checkbox"></span></td><td class="dsf dsf_skill' + num + '" /><td class="dsf dsf_skill' + num + '_ability"> </td><td class="dsf dsf_skill' + num + '_mod readonly"> </td><td class="dsf dsf_skill' + num + '_ability_mod readonly"> </td><td class="dsf dsf_skill' + num + '_ranks"> </td><td class="dsf dsf_skill' + num + '_misc_mod"> </td></tr>'); $(containerId + " ." + table).append(newRow); if (isEditable) { newRow.disableSelection(); jhbpfs_bindRow(newRow, containerId); } } function jhbpfs_addNoncoreRow(table, num, containerId, isEditable) { var newRow = $('<tr class="jhbpfs_extra_noncoreRow' + num +'"><td><span class="dsf dsf_noncore' + num + '_cs checkbox"></span></td><td class="dsf dsf_noncore' + num + '" /><td class="dsf dsf_noncore' + num + '_ability"> </td><td class="dsf dsf_noncore' + num + '_mod readonly"> </td><td class="dsf dsf_noncore' + num + '_ability_mod readonly"> </td><td class="dsf dsf_noncore' + num + '_ranks"> </td><td class="dsf dsf_noncore' + num + '_misc_mod"> </td></tr>'); $(containerId + " ." + table).append(newRow); if (isEditable) { newRow.disableSelection(); jhbpfs_bindRow(newRow, containerId); } } function jhbpfs_addWeaponRow(table, num, containerId, isEditable) { var newRow = $('<tr class="jhbpfs_weaponRow' + num +'"><td class="dsf dsf_weapon' + num + '" /><td class="dsf dsf_weapon' + num + '_attack_bonus"> </td><td class="dsf dsf_weapon' + num + '_damage"> </td><td class="dsf dsf_weapon' + num + '_critical"> </td><td class="dsf dsf_weapon' + num + '_range"> </td><td class="dsf dsf_weapon' + num + '_type"> </td><td class="dsf dsf_weapon' + num + '_notes"> </td><td class="dsf dsf_weapon' + num + '_hp"> </td><td class="dsf dsf_weapon' + num + '_hardness"> </td></tr>'); $(containerId + " ." + table).append(newRow); if (isEditable) { newRow.disableSelection(); jhbpfs_bindRow(newRow, containerId); } } function jhbpfs_addInventoryRow(table, num, containerId, isEditable) { var newRow = $('<div class="item jhbpfs_item' + num + '"><table><col /><col width="35" /><tr><td class="dsf dsf_item' + num + '" /><td class="dsf dsf_item' + num + '_weight"> </td></tr><tr><th>Name</th><th>Wt.</th></tr></table></div>'); $(containerId + " ." + table).append(newRow); if (isEditable) { newRow.disableSelection(); jhbpfs_bindRow(newRow, containerId); } } function jhbpfs_addSpellSection(table, num, containerId, isEditable, isSpontaneous, usesSpellbook, hasDomains, minLevel, maxLevel) { if (!maxLevel) { //new section, so pull the values from the add dialog isSpontaneous = $(containerId + " .newSpellsDialog input[name=spontaneous]")[0].checked; usesSpellbook = $(containerId + " .newSpellsDialog input[name=spellbook]")[0].checked; hasDomains = $(containerId + " .newSpellsDialog input[name=domains]")[0].checked; minLevel = Number($(containerId + " .newSpellsDialog input[name=minSpellLevel]").val()); maxLevel = Number($(containerId + " .newSpellsDialog input[name=maxSpellLevel]").val()); } //Make sure we have at least some rows to add if (!maxLevel || (maxLevel < 4)) maxLevel = 4; if (!minLevel || (minLevel < 0)) minLevel = 0; if (maxLevel > 9) maxLevel = 9; if (minLevel > maxLevel) { var tmp = minLevel; minLevel = maxLevel; maxLevel = tmp; } var html = '<div class="spellSection spellSectionContainer jhbpfs_spellSection' + num + '"><div class="dsf dsf_spsSec' + num + '_Spontaneous" style="display:none;">' + (isSpontaneous ? '1' : '0') + '</div><div class="dsf dsf_spsSec' + num + '_Spellbook" style="display:none;">' + (usesSpellbook ? '1' : '0') + '</div><div class="dsf dsf_spsSec' + num + '_Domains" style="display:none;">' + (hasDomains ? '1' : '0') + '</div><div class="dsf dsf_spsSec' + num + '_MaxLevel" style="display:none;">' + maxLevel + '</div><div class="dsf dsf_spsSec' + num + '_MinLevel" style="display:none;">' + minLevel + '</div><div class="spellSection"><h3 class="title"><span class="dsf dsf_spsSec' + num + '_Name"></span><span class="ctlRemoveSpellSection removeButton">- Remove</span></h3>'; var dcTable = '<div class="fancybox domain dcbox quarterwidth"><h4 class="title">DCs / Per-Day</h4><table><tr><td class="dsf dsf_spsSec' + num + '_BaseDC"></td><td class="dsf dsf_spsSec' + num + '_SpellFailure"></td></tr><tr><th>Base DC</th><th>Arcane Spell Failure</th></tr></table><table class="dcTable"><col width="15" /><col /><col /><col /><tr><th>Lvl</th><th>DC</th>' if (isSpontaneous) dcTable += '<th>Known</th>'; dcTable += '<th>Per Day</th><th>Bonus</th></tr>'; for (var l=minLevel; l<=maxLevel; l++) { dcTable += '<tr><td class="spellLevel">' + l + ':</td><td class="dsf readonly dsf_spsSec' + num + '_DC' + l + '"></td>' if (isSpontaneous) dcTable += '<td class="dsf dsf_spsSec' + num + '_KnownNumber' + l + '"></td>'; dcTable += '<td class="dsf dsf_spsSec' + num + '_PerDayNumber' + l + '"></td>' if (l == 0) dcTable += '<td>—</td>'; else dcTable += '<td class="dsf dsf_spsSec' + num + '_BonusNumber' + l + '"></td>'; dcTable += '</tr>'; } dcTable += "</table>"; if (hasDomains) { for (var d=0; d<3; d++) { html += '<div class="fancybox domain quarterwidth"><h4 class="title"><span class="dsf dsf_spsSec' + num + '_Domain' + d + '_Name"></span></h4><table class="domainTable"><col width="13" /><col /><tr><td colspan="2" class="dsf dsf_spsSec' + num + '_Domain' + d + '_Power1"></td></tr><tr><th colspan="2">Domain Power</th></tr><tr><td colspan="2" class="dsf dsf_spsSec' + num + '_Domain' + d + '_Power2"></td></tr><tr><th colspan="2">Domain Power</th></tr>'; for (var l=Math.max(1, minLevel); l<=maxLevel; l++) { html += '<tr><td class="spellLevel">' + l + ':</td><td class="dsf dsf_spsSec' + num + '_Domain' + d + '_Spells' + l + '"></td></tr>'; } html += "</table></div>"; } html += dcTable + "</div>"; } else html += '<div class="threequarterwidth">'; if (usesSpellbook) { html += '<h4 class="title">Spellbook</h4>'; for (var l=minLevel; l<=maxLevel; l++) { html += '<div class="spellList"><div class="spellLevel" style="display:inline-block;">' + l + ':</div><div class="dsf dsf_spsSec' + num + '_Known' + l + '"></div></div>'; } } if (isSpontaneous) html += '<h4 class="title">Spells Known</h4>'; else html += '<h4 class="title">Spells Prepared</h4>'; for (var l=minLevel; l<=maxLevel; l++) { html += '<div class="spellList"><div class="spellLevel" style="display:inline-block;">' + l + ':</div><div class="dsf dsf_spsSec' + num + '_Prepared' + l + '"></div></div>'; } if (!hasDomains) html += "</div>" + dcTable; var newSection = $(html); $(containerId + " ." + table).append(newSection); if (isEditable) { jhbpfs_bindRow(newSection, containerId); } } function jhbpfs_cleanTable(prefix, title, containerId) { var max = Number($(containerId + " .dsf_ctl" + title + "Count").text()); var count = 0; for (var i=1; i<=max; i++) { var row = $(containerId + " tr.jhbpfs_" + prefix + "Row" + i); var obj = row.find("td:first"); if ("" == $.trim(obj.text())) { //This row is empty, so find the relevant tr tags and remove them row.remove(); } else { count++; } } //Nothing to renumber if we remove them all if (count > 0) jhbpfs_renumberTable(null, { item: $(containerId + " ." + prefix + "Table td:first") }); $(containerId + " .dsf_ctl" + title + "Count").text(count); } function jhbpfs_cleanSkillTable(containerId) { var max = Number($(containerId + " .dsf_ctlSkillCount").text()); var count = 0; for (var i=1; i<=max; i++) { var row = $(containerId + " tr.jhbpfs_SkillRow" + i); var obj = row.find("td:nth(2)"); if ("" == $.trim(obj.text())) { //This row is empty, so find the relevant tr tags and remove them row.remove(); } else { count++; } } //Nothing to renumber if we remove them all if (count > 0) jhbpfs_renumberTable(null, { item: $(containerId + " .SkillTable td:first") }); $(containerId + " .dsf_ctl" + title + "Count").text(count); } function jhbpfs_cleanNoncoreTable(containerId) { var max = Number($(containerId + " .dsf_ctlNoncoreCount").text()); var count = 0; for (var i=1; i<=max; i++) { var row = $(containerId + " tr.jhbpfs_NoncoreRow" + i); var obj = row.find("td:nth(2)"); if ("" == $.trim(obj.text())) { //This row is empty, so find the relevant tr tags and remove them row.remove(); } else { count++; } } //Nothing to renumber if we remove them all if (count > 0) jhbpfs_renumberTable(null, { item: $(containerId + " .NoncoreTable td:first") }); $(containerId + " .dsf_ctl" + title + "Count").text(count); } function jhbpfs_cleanInventoryTable(containerId) { var max = Number($(containerId + " .dsf_ctlInventoryCount").text()); var count = 0; for (var i=1; i<=max; i++) { var box = $(containerId + " div.jhbpfs_item" + i); var obj = box.find("td:first"); if ("" == $.trim(obj.text())) { //This row is empty, so find the relevant tr tags and remove them box.remove(); } else { count++; } } //Nothing to renumber if we remove them all if (count > 0) jhbpfs_renumberItems(null, { item: $(containerId + " .inventorybox div.item:first") }); $(containerId + " .dsf_ctlInventoryCount").text(count); } function jhbpfs_findDsfClass(element) { var classes = $(element).attr('class'); if (!classes) return null; classes = classes.split(/\s/); var fieldName = null; $.each(classes, function(i, className) { if(className.substr(0,4) == "dsf_") { fieldName = className; } }); return fieldName; } function jhbpfs_isNumeric(n) { return ($.isNumeric && $.isNumeric(n)) || (!isNaN(parseFloat(n)) && isFinite(n)); } function jhbpfs_signedInt(n) { return (n < 0) ? n : ("+" + n) } function jhbpfs_renumberTable(e, ui) { //ui.item is the tr tag that got moved var parent = ui.item.parents("table"); var prefix = parent.attr("prefix"); var baserow = parent.find(".jhbpfs_" + prefix + "Row1").children(); baserow.each(function (i, c) { baserow[i] = $(c).prop("class").replace("1", "{0}"); }); //Now that we have the templates, reorder things parent.find("tr:not(:first)").each(function (i, c) { $(c).prop("class", "jhbpfs_" + prefix + "Row" + (i+1)); $(c).find("td").each(function (j, cc) { var str = baserow[j]; $(cc).prop("class", str.replace(/\{0\}/g, (i+1))); }); }); } function jhbpfs_renumberItems(e, ui) { //ui.item is the tr tag that got moved var parent = ui.item.parents(".inventorybox"); var baserow = [ "dsf dsf_item{0}", "dsf dsf_item{0}_weight" ]; //Now that we have the templates, reorder things parent.find(".item").each(function (i, c) { $(c).prop("class", "item jhbpfs_item" + (i+1)); $(c).find("tr:first td").each(function (j, cc) { var str = baserow[j]; $(cc).prop("class", str.replace(/\{0\}/g, (i+1))); }); }); } function jhbpfs_renumberSpellSections(ctl) { //ctl is the div tag after the item that got removed if (!ctl.length) return; //Removed the last item, so nothing to do var parent = ctl.parents(".spellbox"); var count = Number(parent.find(".dsf_ctlSpellSectionCount").text()); var start = Number(ctl.prop("class").substr(54)); //Now that we have the templates, reorder things for (var i = start; i <= count; i++) { parent.find(".jhbpfs_spellSection" + i).each(function (j, c) { $(c).prop("class", "spellSection spellSectionContainer jhbpfs_spellSection" + (i-1)); $(c).find(".dsf").each(function (j, cc) { var str = $(cc).prop("class"); $(cc).prop("class", str.replace("dsf_spsSec" + i, "dsf_spsSec" + (i-1))); }); }); } }
Submit Notes
Changed Speedbox to single editable field, resized boxes
Back
I'm sorry, but we no longer support this web browser. Please
upgrade your browser
or install
Chrome
or
Firefox
to enjoy the full functionality of this site.