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
WoW Universal Sheet
Author:
Corak
Slug:
corak_wow
Type:
GameCharacter
System:
World of Warcraft
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_player readonly"></td> <td class="dsf dsf_race"></td> <td class="dsf dsf_alignment"></td> </tr> <tr> <th>Character Name</th> <th>Player</th> <th>Race</th> <th>Alignment</th> </tr> <tr> <td class="dsf dsf_level"></td> <td class="dsf dsf_class"></td> <td class="dsf dsf_faith"></td> <td class="dsf dsf_gender"></td> </tr> <tr> <th>Level</th> <th>Class</th> <th>Faith</th> <th>Gender</th> </tr> <tr> <td class="dsf dsf_age"></td> <td class="dsf dsf_size"></td> <td class="dsf dsf_height"></td> <td class="dsf dsf_weight"></td> </tr> <tr> <th>Age</th> <th>Size</th> <th>Height</th> <th>Weight</th> </tr> <tr> <td class="dsf dsf_eyes"></td> <td class="dsf dsf_hair"></td> <td class="dsf dsf_skin"></td> <td class="dsf dsf_experience_points"></td> </tr> <tr> <th>Eyes</th> <th>Hair</th> <th>Skin</th> <th>Experience Points</th> </tr> <tr> <td colspan="2" class="dsf dsf_affiliation"></td> <td colspan="2" class="dsf dsf_languages"></td> </tr> <tr> <th colspan="2">Affiliation</th> <th colspan="2">Languages</th> </tr> </table> </div> <div class="fancybox statsbox"> <h3 class="title">Abilities</h3> <table width="195"> <tr> <th>Name</th> <th>Score</th> <th>Mod</th> <th>Temp<br />Dmg</th> <th>Temp<br />Boost</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_damage"></td> <td class="dsf dsf_str_boost"></td> </tr><tr> <th class="stat">Agy</th> <td class="dsf dsf_agy"></td> <td class="dsf dsf_agy_mod readonly"></td> <td class="dsf dsf_agy_damage"></td> <td class="dsf dsf_agy_boost"></td> </tr><tr> <th class="stat">Sta</th> <td class="dsf dsf_sta"></td> <td class="dsf dsf_sta_mod readonly"></td> <td class="dsf dsf_sta_damage"></td> <td class="dsf dsf_sta_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_damage"></td> <td class="dsf dsf_int_boost"></td> </tr><tr> <th class="stat">Spt</th> <td class="dsf dsf_spt"></td> <td class="dsf dsf_spt_mod readonly"></td> <td class="dsf dsf_spt_damage"></td> <td class="dsf dsf_spt_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_damage"></td> <td class="dsf dsf_cha_boost"></td> </tr> </table> </div> <div class="miscbox"> <div class="fancybox hpbox"> <h4 class="title">Hit Points</h4> <table width="100%"> <col /> <col width="33%" /> <col width="33%" /> <tr> <td class="dsf dsf_hp"></td> <td class="dsf dsf_wounds"></td> <td class="dsf dsf_nonlethal"></td> </tr><tr> <th>Max</th> <th>Current</th> <th>Nonlethal</th> </tr> </table> </div> <div class="fancybox hpbox"> <h4 class="title">Initiative</h4> <table width="100%"> <tr> <td class="dsf dsf_initative_total readonly"></td> <td class="dsf dsf_agy_mod readonly"></td> <td class="dsf dsf_misc_init_mod"></td> </tr><tr> <th>Total</th> <th>Agy Mod</th> <th>Misc</th> </tr> </table> </div> <div class="fancybox speedbox"> <h4 class="title">Speed</h4> <table width="100%"> <tr> <td class="dsf dsf_speed"></td> <td class="dsf dsf_speed_burrow"></td> <td class="dsf dsf_speed_climb"></td> <td class="dsf dsf_speed_fly"></td> <td class="dsf dsf_speed_swim"></td> </tr><tr> <th>Land</th> <th>Burrow</th> <th>Climb</th> <th>Fly</th> <th>Swim</th> </tr> </table> </div> <div class="fancybox acbox"> <h4 class="title">Armor Class</h4> <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_agy_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_misc_mod"></td> </tr><tr> <th>Total</th> <th>Touch</th> <th>Flat-F.</th> <th>Armor</th> <th>Shield</th> <th>Agy Mod</th> <th>Size</th> <th>Natural</th> <th>Defl.</th> <th>Misc</th> </tr> </table> </div> <div class="fancybox grapplebox"> <h4 class="title">Defenses</h4> <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>Damage Red.</th> <th>Spell Res.</th> </tr> </table> </div> <div class="fancybox grapplebox"> <h4 class="title">Grapple</h4> <table width="100%"> <tr> <td class="dsf dsf_grapple_total readonly"></td> <td class="collapse" rowspan="2">=</td> <td class="dsf dsf_bab"></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_grapple readonly"></td> <td class="collapse" rowspan="2">+</td> <td class="dsf dsf_misc_grapple_mod"></td> </tr><tr> <th>Total</th> <th>Base Att.</th> <th>Str Mod</th> <th>Size</th> <th>Misc</th> </tr> </table> </div> </div> <div class="fancybox halfwidth savesbox"> <h3 class="title">Saving Throws</h3> <table> <tr> <th> </th> <th>Total</th> <th>Base</th> <th>Abil. Mod</th> <th>Magic</th> <th>Misc.</th> <th>Temp.</th> <th>Conditional</th> </tr><tr> <th class="stat">Fort</th> <td class="dsf dsf_fortitude_total readonly"></td> <td class="dsf dsf_base_fort_save"></td> <td class="dsf dsf_sta_mod readonly"></td> <td class="dsf dsf_magic_fort_mod"></td> <td class="dsf dsf_misc_fort_mod"></td> <td class="dsf dsf_temp_fort_mod"></td> <td class="dsf dsf_saves_conditional" rowspan="3"></td> </tr><tr> <th class="stat">Reflex</th> <td class="dsf dsf_reflex_total readonly"></td> <td class="dsf dsf_base_reflex_save"></td> <td class="dsf dsf_agy_mod readonly"></td> <td class="dsf dsf_magic_reflex_mod"></td> <td class="dsf dsf_misc_reflex_mod"></td> <td class="dsf dsf_temp_reflex_mod"></td> </tr><tr> <th class="stat">Will</th> <td class="dsf dsf_willpower_total readonly"></td> <td class="dsf dsf_base_willpower_save"></td> <td class="dsf dsf_spt_mod readonly"></td> <td class="dsf dsf_magic_willpower_mod"></td> <td class="dsf dsf_misc_willpower_mod"></td> <td class="dsf dsf_temp_willpower_mod"></td> </tr> </table> </div> <div class="fancybox attackbox halfwidth"> <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_agy_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">Base Attack Bonus</th> <td class="noborder"></td> <th class="noborder">Abil. Mod</th> <td class="noborder"></td> <th class="noborder">Size</th> <td class="noborder"></td> <th class="noborder">Misc</th> </tr> </table> </div> <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>Attack Bonus</th> <th>Damage</th> <th>Critical</th> <th>Range</th> <th>Type</th> <th>Special Qualities</th> </tr> </table> </div> <div class="fancybox armorbox"> <h3 class="title">Protective Items</h3> <div> <h4 class="title">Armor</h4> <table width="100%"> <tr> <th>Name</th> <th>Type</th> <th>Bonus</th> <th>Max Agy</th> <th>Check Penalty</th> <th>Spell Failure</th> <th>Max Speed</th> <th>Special Qualities</th> </tr><tr> <td class="dsf dsf_armor1"></td> <td class="dsf dsf_armor1_type"></td> <td class="dsf dsf_armor1_ac_bonus"></td> <td class="dsf dsf_armor1_max_agy"></td> <td class="dsf dsf_armor1_penalty"></td> <td class="dsf dsf_armor1_spell_failure"></td> <td class="dsf dsf_armor1_speed"></td> <td class="dsf dsf_armor1_special_properties"></td> </tr><tr> <td class="dsf dsf_armor2"></td> <td class="dsf dsf_armor2_type"></td> <td class="dsf dsf_armor2_ac_bonus"></td> <td class="dsf dsf_armor2_max_agy"></td> <td class="dsf dsf_armor2_penalty"></td> <td class="dsf dsf_armor2_spell_failure"></td> <td class="dsf dsf_armor2_speed"></td> <td class="dsf dsf_armor2_special_properties"></td> </tr> </table> <h4 class="title">Shield</h4> <table width="100%"> <tr> <th>Name</th> <th>Type</th> <th>Bonus</th> <th>Check Penalty</th> <th>Spell Failure</th> <th>Special Qualities</th> </tr><tr> <td class="dsf dsf_shield1"></td> <td class="dsf dsf_shield1_type"></td> <td class="dsf dsf_shield1_ac_bonus"></td> <td class="dsf dsf_shield1_penalty"></td> <td class="dsf dsf_shield1_spell_failure"></td> <td class="dsf dsf_shield1_special_properties"></td> </tr><tr> <td class="dsf dsf_shield2"></td> <td class="dsf dsf_shield2_type"></td> <td class="dsf dsf_shield2_ac_bonus"></td> <td class="dsf dsf_shield2_penalty"></td> <td class="dsf dsf_shield2_spell_failure"></td> <td class="dsf dsf_shield2_special_properties"></td> </tr> </table> <h4 class="title">Ring / Amulet / Etc.</h4> <table width="100%"> <tr> <th>Name</th> <th>Type</th> <th>Bonus</th> <th>Special Qualities</th> <th rowspan="4" class="collapse" style="width: 2px !important;"></th> <th rowspan="4" class="collapse" style="width: 2px !important;border-left: 1px solid #000 !important;"></th> <th>Name</th> <th>Type</th> <th>Bonus</th> <th>Special Qualities</th> </tr><tr> <td class="dsf dsf_protitem1"></td> <td class="dsf dsf_protitem1_type"></td> <td class="dsf dsf_protitem1_ac_bonus"></td> <td class="dsf dsf_protitem1_special_properties"></td> <td class="dsf dsf_protitem2"></td> <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> <td class="dsf dsf_protitem3"></td> <td class="dsf dsf_protitem3_type"></td> <td class="dsf dsf_protitem3_ac_bonus"></td> <td class="dsf dsf_protitem3_special_properties"></td> <td class="dsf dsf_protitem4"></td> <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> <td class="dsf dsf_protitem5"></td> <td class="dsf dsf_protitem5_type"></td> <td class="dsf dsf_protitem5_ac_bonus"></td> <td class="dsf dsf_protitem5_special_properties"></td> <td class="dsf dsf_protitem6"></td> <td class="dsf dsf_protitem6_type"></td> <td class="dsf dsf_protitem6_ac_bonus"></td> <td class="dsf dsf_protitem6_special_properties"></td> </tr> </table> </div> </div> <div class="fancybox halfwidth skillbox"> <h3 class="title">Skills<span class="ctlAddSkill addButton">+ Add</span></h3> <div class="dsf dsf_ctlSkillCount" style="display:none"></div> <table width="100%" class="skillTable" prefix="skill"> <tr> <th>Skill</th> <th>Key<br />Abil.</th> <th>Total</th> <th>Abil.<br />Mod</th> <th>Ranks</th> <th>Misc</th> </tr><tr> <td>Appraise</td> <td>Int</td> <td class="dsf dsf_appraise_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_appraise_ranks"></td> <td class="dsf dsf_appraise_misc_mod"></td> </tr><tr> <td>Balance</td> <td>Agy</td> <td class="dsf dsf_balance_mod readonly"></td> <td class="dsf dsf_agy_mod readonly"></td> <td class="dsf dsf_balance_ranks"></td> <td class="dsf dsf_balance_misc_mod"></td> </tr><tr> <td>Bluff</td> <td>Cha</td> <td class="dsf dsf_bluff_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_bluff_ranks"></td> <td class="dsf dsf_bluff_misc_mod"></td> </tr><tr> <td>Climb</td> <td>Str</td> <td class="dsf dsf_climb_mod readonly"></td> <td class="dsf dsf_str_mod readonly"></td> <td class="dsf dsf_climb_ranks"></td> <td class="dsf dsf_climb_misc_mod"></td> </tr><tr> <td>Concentration</td> <td>Sta</td> <td class="dsf dsf_concentration_mod readonly"></td> <td class="dsf dsf_sta_mod readonly"></td> <td class="dsf dsf_concentration_ranks"></td> <td class="dsf dsf_concentration_misc_mod"></td> </tr><tr> <td>Craft (<span class="dsf dsf_craft1"></span>)</td> <td>Int</td> <td class="dsf dsf_craft1_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_craft1_ranks"></td> <td class="dsf dsf_craft1_misc_mod"></td> </tr><tr> <td>Craft (<span class="dsf dsf_craft2"></span>)</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>Craft (<span class="dsf dsf_craft3"></span>)</td> <td>Int</td> <td class="dsf dsf_craft3_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_craft3_ranks"></td> <td class="dsf dsf_craft3_misc_mod"></td> </tr><tr> <td>Decipher Script</td> <td>Int</td> <td class="dsf dsf_decipher_script_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_decipher_script_ranks"></td> <td class="dsf dsf_decipher_script_misc_mod"></td> </tr><tr> <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>Disable Device</td> <td>Int</td> <td class="dsf dsf_disable_device_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_disable_device_ranks"></td> <td class="dsf dsf_disable_device_misc_mod"></td> </tr><tr> <td>Disguise</td> <td>Cha</td> <td class="dsf dsf_disguise_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_disguise_ranks"></td> <td class="dsf dsf_disguise_misc_mod"></td> </tr><tr> <td>Escape Artist</td> <td>Agy</td> <td class="dsf dsf_escape_artist_mod readonly"></td> <td class="dsf dsf_agy_mod readonly"></td> <td class="dsf dsf_escape_artist_ranks"></td> <td class="dsf dsf_escape_artist_misc_mod"></td> </tr><tr> <td>Forgery</td> <td>Int</td> <td class="dsf dsf_forgery_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_forgery_ranks"></td> <td class="dsf dsf_forgery_misc_mod"></td> </tr><tr> <td>Gather Information</td> <td>Cha</td> <td class="dsf dsf_gather_information_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_gather_information_ranks"></td> <td class="dsf dsf_gather_information_misc_mod"></td> </tr><tr> <td>Handle Animal</td> <td>Cha</td> <td class="dsf dsf_handle_animal_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_handle_animal_ranks"></td> <td class="dsf dsf_handle_animal_misc_mod"></td> </tr><tr> <td>Heal</td> <td>Spt</td> <td class="dsf dsf_heal_mod readonly"></td> <td class="dsf dsf_spt_mod readonly"></td> <td class="dsf dsf_heal_ranks"></td> <td class="dsf dsf_heal_misc_mod"></td> </tr>><tr> <td>Intimidate</td> <td>Cha</td> <td class="dsf dsf_intimidate_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_intimidate_ranks"></td> <td class="dsf dsf_intimidate_misc_mod"></td> </tr><tr> <td>Jump</td> <td>Str</td> <td class="dsf dsf_jump_mod readonly"></td> <td class="dsf dsf_str_mod readonly"></td> <td class="dsf dsf_jump_ranks"></td> <td class="dsf dsf_jump_misc_mod"></td> </tr><tr> <td>Knowledge (<span class="dsf dsf_knowledge1"></span>)</td> <td>Int</td> <td class="dsf dsf_knowledge1_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_knowledge1_ranks"></td> <td class="dsf dsf_knowledge1_misc_mod"></td> </tr><tr> <td>Knowledge (<span class="dsf dsf_knowledge2"></span>)</td> <td>Int</td> <td class="dsf dsf_knowledge2_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_knowledge2_ranks"></td> <td class="dsf dsf_knowledge2_misc_mod"></td> </tr><tr> <td>Knowledge (<span class="dsf dsf_knowledge3"></span>)</td> <td>Int</td> <td class="dsf dsf_knowledge3_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_knowledge3_ranks"></td> <td class="dsf dsf_knowledge3_misc_mod"></td> </tr><tr> <td>Knowledge (<span class="dsf dsf_knowledge4"></span>)</td> <td>Int</td> <td class="dsf dsf_knowledge4_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_knowledge4_ranks"></td> <td class="dsf dsf_knowledge4_misc_mod"></td> </tr><tr> <td>Knowledge (<span class="dsf dsf_knowledge5"></span>)</td> <td>Int</td> <td class="dsf dsf_knowledge5_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_knowledge5_ranks"></td> <td class="dsf dsf_knowledge5_misc_mod"></td> </tr><tr> <td>Listen</td> <td>Spt</td> <td class="dsf dsf_listen_mod readonly"></td> <td class="dsf dsf_spt_mod readonly"></td> <td class="dsf dsf_listen_ranks"></td> <td class="dsf dsf_listen_misc_mod"></td> </tr><tr> <td>Open Lock</td> <td>Agy</td> <td class="dsf dsf_open_lock_mod readonly"></td> <td class="dsf dsf_agy_mod readonly"></td> <td class="dsf dsf_open_lock_ranks"></td> <td class="dsf dsf_open_lock_misc_mod"></td> </tr><tr> <td>Perform (<span class="dsf dsf_perform1"></span>)</td> <td>Cha</td> <td class="dsf dsf_perform1_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_perform1_ranks"></td> <td class="dsf dsf_perform1_misc_mod"></td> </tr><tr> <td>Perform (<span class="dsf dsf_perform2"></span>)</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>Perform (<span class="dsf dsf_perform3"></span>)</td> <td>Cha</td> <td class="dsf dsf_perform3_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_perform3_ranks"></td> <td class="dsf dsf_perform3_misc_mod"></td> </tr><tr> <td>Profession (<span class="dsf dsf_profession1"></span>)</td> <td>Spt</td> <td class="dsf dsf_profession1_mod readonly"></td> <td class="dsf dsf_spt_mod readonly"></td> <td class="dsf dsf_profession1_ranks"></td> <td class="dsf dsf_profession1_misc_mod"></td> </tr><tr> <td>Profession (<span class="dsf dsf_profession2"></span>)</td> <td>Spt</td> <td class="dsf dsf_profession2_mod readonly"></td> <td class="dsf dsf_spt_mod readonly"></td> <td class="dsf dsf_profession2_ranks"></td> <td class="dsf dsf_profession2_misc_mod"></td> </tr><tr> <td>Ride</td> <td>Agy</td> <td class="dsf dsf_ride_mod readonly"></td> <td class="dsf dsf_agy_mod readonly"></td> <td class="dsf dsf_ride_ranks"></td> <td class="dsf dsf_ride_misc_mod"></td> </tr><tr> <td>Search</td> <td>Int</td> <td class="dsf dsf_search_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_search_ranks"></td> <td class="dsf dsf_search_misc_mod"></td> </tr><tr> <td>Sense Motive</td> <td>Spt</td> <td class="dsf dsf_sense_motive_mod readonly"></td> <td class="dsf dsf_spt_mod readonly"></td> <td class="dsf dsf_sense_motive_ranks"></td> <td class="dsf dsf_sense_motive_misc_mod"></td> </tr><tr> <td>Sleight of Hand</td> <td>Agy</td> <td class="dsf dsf_sleight_of_hand_mod readonly"></td> <td class="dsf dsf_agy_mod readonly"></td> <td class="dsf dsf_sleight_of_hand_ranks"></td> <td class="dsf dsf_sleight_of_hand_misc_mod"></td> </tr><tr> <td>Spellcraft</td> <td>Int</td> <td class="dsf dsf_spellcraft_mod readonly"></td> <td class="dsf dsf_int_mod readonly"></td> <td class="dsf dsf_spellcraft_ranks"></td> <td class="dsf dsf_spellcraft_misc_mod"></td> </tr><tr> <td>Spot</td> <td>Spt</td> <td class="dsf dsf_spot_mod readonly"></td> <td class="dsf dsf_spt_mod readonly"></td> <td class="dsf dsf_spot_ranks"></td> <td class="dsf dsf_spot_misc_mod"></td> </tr><tr> <td>Stealth</td> <td>Agy</td> <td class="dsf dsf_stealth_mod readonly"></td> <td class="dsf dsf_agy_mod readonly"></td> <td class="dsf dsf_stealth_ranks"></td> <td class="dsf dsf_stealth_misc_mod"></td> </tr><tr> <td>Survival</td> <td>Spt</td> <td class="dsf dsf_survival_mod readonly"></td> <td class="dsf dsf_spt_mod readonly"></td> <td class="dsf dsf_survival_ranks"></td> <td class="dsf dsf_survival_misc_mod"></td> </tr><tr> <td>Swim</td> <td>Str</td> <td class="dsf dsf_swim_mod readonly"></td> <td class="dsf dsf_str_mod readonly"></td> <td class="dsf dsf_swim_ranks"></td> <td class="dsf dsf_swim_misc_mod"></td> </tr><tr> <td>Tumble</td> <td>Agy</td> <td class="dsf dsf_tumble_mod readonly"></td> <td class="dsf dsf_agy_mod readonly"></td> <td class="dsf dsf_tumble_ranks"></td> <td class="dsf dsf_tumble_misc_mod"></td> </tr><tr> <td>Use Magic Device</td> <td>Cha</td> <td class="dsf dsf_use_magic_device_mod readonly"></td> <td class="dsf dsf_cha_mod readonly"></td> <td class="dsf dsf_use_magic_device_ranks"></td> <td class="dsf dsf_use_magic_device_misc_mod"></td> </tr><tr> <td>Use Rope</td> <td>Agy</td> <td class="dsf dsf_use_rope_mod readonly"></td> <td class="dsf dsf_agy_mod readonly"></td> <td class="dsf dsf_use_rope_ranks"></td> <td class="dsf dsf_use_rope_misc_mod"></td> </tr> </table> </div> <div class="halfwidth"> <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">Special 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 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> <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:70px;"> <h4 class="title">Carrying Capacity</h4> <table width="100%"> <col /> <col width="20%" /> <col width="20%" /> <col width="20%" /> <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 Load</th> <th>Medium Load</th> <th>Heavy Load</th> <th>Lift Over Head</th> <th>Push/Drag</th> </tr> </table> </div> <div class="fancybox subbox halfwidth" style="height:70px;"> <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>WoW Character Sheet by: <span class="dsf dsf_dst_author readonly"></span> based on D&D 3.5 Universal Sheet by Karelzarath</div>
CSS
@import url(http://fonts.googleapis.com/css?family=Arapey); @import url(http://fonts.googleapis.com/css?family=Bitter); .ds_corak_wow { line-height: 14px; font-size: 12px; } .ds_corak_wow th, .ds_corak_wow td { font-family: "Bitter",georgia,times,"times new roman",serif; } .ds_corak_wow .dsf { height: 14px; vertical-align: bottom; } .ds_corak_wow.editable span.dsf { min-width: 20px; display: inline-block; } .ds_corak_wow .noborder { border: none !important; } .ds_corak_wow table { margin: 0; border-collapse: separate; border-spacing: 2px; } .ds_corak_wow th { font-size: 10px; border-top: 1px solid black; padding: 0; text-align: center; background: none; vertical-align: top; line-height: 11px; } .ds_corak_wow td { padding: 5px 5px 0 5px; text-align: center; font-size: 12px; } .ds_corak_wow td, .ds_corak_wow th { margin: 0 3px; } .ds_corak_wow .title { width: 100%; color: #ddd; text-align: center; margin: 0; padding: 2px 0; border-top-left-radius: inherit; border-top-right-radius: inherit; text-shadow: 1px 1px 1px #000; } .ds_corak_wow h3.title { font-family: Arapey,georgia,times,"times new roman",serif; background: #003c9f; /* Old browsers */ background: -moz-radial-gradient(center, ellipse cover, #008cff 0%, #000000 73%); /* FF3.6+ */ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#008cff), color-stop(73%,#000000)); /* Chrome,Safari4+ */ background: -webkit-radial-gradient(center, ellipse cover, #008cff 0%,#000000 73%); /* Chrome10+,Safari5.1+ */ background: -o-radial-gradient(center, ellipse cover, #008cff 0%,#000000 73%); /* Opera 12+ */ background: -ms-radial-gradient(center, ellipse cover, #008cff 0%,#000000 73%); /* IE10+ */ background: radial-gradient(center, ellipse cover, #008cff 0%,#000000 73%); /* W3C */ font-size: 18px; height: 18px; } .ds_corak_wow h4.title { font-family: Arapey,georgia,times,"times new roman",serif; background: #3c008f; /* Old browsers */ background: -moz-radial-gradient(center, ellipse cover, #604ccf 0%, #000000 73%); /* FF3.6+ */ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#604ccf), color-stop(73%,#000000)); /* Chrome,Safari4+ */ background: -webkit-radial-gradient(center, ellipse cover, #604ccf 0%,#000000 73%); /* Chrome10+,Safari5.1+ */ background: -o-radial-gradient(center, ellipse cover, #604ccf 0%,#000000 73%); /* Opera 12+ */ background: -ms-radial-gradient(center, ellipse cover, #604ccf 0%,#000000 73%); /* IE10+ */ background: radial-gradient(center, ellipse cover, #604ccf 0%,#000000 73%); /* W3C */ font-size: 14px; } .ds_corak_wow .newSpellsDialog { font-family: Arapey,georgia,times,"times new roman",serif; background: #008f00; /* Old browsers */ background: -moz-radial-gradient(center, ellipse cover, #009f00 0%, #000000 73%); /* FF3.6+ */ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#009f00), color-stop(73%,#000000)); /* Chrome,Safari4+ */ background: -webkit-radial-gradient(center, ellipse cover, #009f00 0%,#000000 73%); /* Chrome10+,Safari5.1+ */ background: -o-radial-gradient(center, ellipse cover, #009f00 0%,#000000 73%); /* Opera 12+ */ background: -ms-radial-gradient(center, ellipse cover, #009f00 0%,#000000 73%); /* IE10+ */ background: radial-gradient(center, ellipse cover, #009f00 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_corak_wow .newSpellsDialog label { display: inline; font: inherit; } .ds_corak_wow .newSpellsDialog input { padding: 0 2px; font: inherit; } .ds_corak_wow .collapse { width: 1px !important; padding: 0 !important; margin: 0 !important; border-spacing: 0 !important; border: none !important; } .ds_corak_wow .addButton, .ds_corak_wow .removeButton { display: none; } .ds_corak_wow.editable .addButton { display: inline; float: right; min-width: 14px; height: 14px; margin: 1px 5px 1px 0; padding: 1px 5px 0 5px; border-radius: 8px; background-color: #272; color: #fff; cursor: pointer; font-weight: normal; font-size: 12px; } .ds_corak_wow.editable .removeButton { display: inline; float: right; min-width: 14px; height: 14px; margin: 1px 5px 1px 0; padding: 1px 5px 0 5px; border-radius: 8px; background-color: #722; color: #fff; cursor: pointer; font-weight: normal; font-size: 12px; } .ds_corak_wow.editable .dsf { background-color: #CDF; color: #000; border-radius: 2px; } .ds_corak_wow.editable .dsf.readonly, .ds_corak_wow.editable .dsf.checkbox { background-color: #fff; color: #000; border-radius: 0; } .ds_corak_wow .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; } .ds_corak_wow .statsbox { width: 200px; height: 194px; } .ds_corak_wow .miscbox { width: 525px; display: inline-block; } .ds_corak_wow .acbox { width: 525px; } .ds_corak_wow .hpbox { width: 140px; } .ds_corak_wow .speedbox { width: 233px; } .ds_corak_wow .grapplebox { width: 259px; } .ds_corak_wow .halfwidth { width: 362px; display: inline-block; } .ds_corak_wow .quarterwidth { width: 180px; display: inline-block; margin-top: 0; } .ds_corak_wow .threequarterwidth { width: 545px; display: inline-block; margin-top: 0; } .ds_corak_wow .domain { border-top-left-radius: 0; border-top-right-radius: 0; margin-left: -1px; width: 181px; box-shadow: none; } .ds_corak_wow .dcbox { width: 184px; margin-right: -1px; } .ds_corak_wow .spellSection { margin-top: 5px; border-top-left-radius: inherit; border-top-right-radius: inherit; } .ds_corak_wow .subbox.halfwidth { width: 364px; } .ds_corak_wow .inventorybox .item { width: 237px; margin: 0 2px; display: inline-block; } .ds_corak_wow .subbox { border-top-left-radius: 0; border-top-right-radius: 0; margin: 0 -1px 5px -1px; box-shadow: none; } .ds_corak_wow .subbox + .subbox { margin-left: -2px; } .ds_corak_wow .statsbox table, .ds_corak_wow .savesbox table, .ds_corak_wow .attackbox table, .ds_corak_wow .armorbox table, .ds_corak_wow .weaponbox table, .ds_corak_wow .dcTable { border-spacing: 0 !important; border-collapse: collapse; width: 99%; margin-bottom: 4px; } .ds_corak_wow .armorbox table, .ds_corak_wow .weaponbox table { margin-left: 3px; width: 724px; } .ds_corak_wow .attackbox table { margin-top: 8px; } .ds_corak_wow .dcTable { margin-left: 2px; width: 180px; } .ds_corak_wow .statsbox th, .ds_corak_wow .savesbox th, .ds_corak_wow .armorbox th, .ds_corak_wow .featTable th, .ds_corak_wow .traitTable th, .ds_corak_wow .abilityTable th, .ds_corak_wow .skillTable th, .ds_corak_wow .weaponbox th, .ds_corak_wow .dcTable th { border: none; vertical-align: bottom; padding: 4px 2px; } .ds_corak_wow .skillTable tr > td:first-child { text-align: left; } .ds_corak_wow .statsbox th.stat, .ds_corak_wow .savesbox th.stat { font-size: 12px; font-variant: small-caps; vertical-align: middle; } .ds_corak_wow .statsbox td, .ds_corak_wow .savesbox td, .ds_corak_wow .attackbox td, .ds_corak_wow .armorbox td, .ds_corak_wow .weaponbox td, .ds_corak_wow .dcTable td { border: 1px solid black; padding: 3px; vertical-align: middle; } .ds_corak_wow .featTable td, .ds_corak_wow .abilityTable td, .ds_corak_wow .skillTable td, .ds_corak_wow .traitTable td { border-bottom: 1px solid black; padding: 3px; vertical-align: middle; } .ds_corak_wow .skillTable td { font-size: 11px; line-height: 10px; } .ds_corak_wow .spellList { width: 240px; margin: 2px 1px 2px 2px; display: inline-block; border-bottom: 1px solid black; } .ds_corak_wow .spellList .dsf { width: 225px; display: inline-block; height: 100%; } .ds_corak_wow .spellList .spellLevel { width: 15px; display: inline-block; } .ds_corak_wow .dsf_bio { min-height: 100px; height: 100%; padding: 5px; border-bottom-left-radius: inherit !important; border-bottom-right-radius: inherit !important; } .ds_corak_wow .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_corak_wow .dsf_avatar_image { height: 100%; }
Javascript
var $ = jQuery; aisleten.characters.jeditablePlaceholder = " "; function corak_wow_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", agy: "10", sta: "10", int: "10", spt: "10", cha: "10", languages: "Common", ctlFeatCount: 10, //Default number on Takissis's sheet ctlAbilityCount: 16, //Default number on Takissis's sheet ctlInventoryCount: 36, //Due to poor numbering, the max number on Takissis's sheet ctlSkillCount: 0, //Start with no extra skill lines ctlTraitCount: 2, //A little extra padding to fill space ctlWeaponCount: 2, //Two rows, primary and backup 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.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 < 5) { dynamic_sheet_attrs.ctlFeatCount = 5; } if (dynamic_sheet_attrs.ctlAbilityCount < 5) { dynamic_sheet_attrs.ctlAbilityCount = 5; } 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.ctlWeaponCount < 2) { dynamic_sheet_attrs.ctlWeaponCount = 2; } if (dynamic_sheet_attrs.ctlInventoryCount < 9) { dynamic_sheet_attrs.ctlInventoryCount = 9; } //Loading in editing mode, so wire up the event handlers $(containerId + " .ctlAddFeat").bind("click.corak_wow", function () { var ctl = $(containerId + " .dsf_ctlFeatCount"); var count = Number(ctl.text())+1; ctl.text(count); corak_wow_addFeatRow('featTable', 'feat', count, containerId, true); }); $(containerId + " .ctlAddAbility").bind("click.corak_wow", function () { var ctl = $(containerId + " .dsf_ctlAbilityCount"); var count = Number(ctl.text())+1; ctl.text(count); corak_wow_addFeatRow('abilityTable', 'special_ability', count, containerId, true); }); $(containerId + " .ctlAddTrait").bind("click.corak_wow", function () { var ctl = $(containerId + " .dsf_ctlTraitCount"); var count = Number(ctl.text())+1; ctl.text(count); corak_wow_addFeatRow('traitTable', 'trait', count, containerId, true); }); $(containerId + " .ctlAddSkill").bind("click.corak_wow", function () { var ctl = $(containerId + " .dsf_ctlSkillCount"); var count = Number(ctl.text())+1; ctl.text(count); corak_wow_addSkillRow('skillTable', count, containerId, true); }); $(containerId + " .ctlAddWeapon").bind("click.corak_wow", function () { var ctl = $(containerId + " .dsf_ctlWeaponCount"); var count = Number(ctl.text())+1; ctl.text(count); corak_wow_addWeaponRow('weaponTable', count, containerId, true); }); $(containerId + " .ctlAddInventory").bind("click.corak_wow", function () { var ctl = $(containerId + " .dsf_ctlInventoryCount"); var count = Number(ctl.text())+1; ctl.text(count); corak_wow_addInventoryRow('inventorybox', count, containerId, true); }); $(containerId + " .ctlAddSpellSection").bind("click.corak_wow", function () { var ctl = $(containerId + " .dsf_ctlSpellSectionCount"); var count = Number(ctl.text()); ctl.text(count + 1); corak_wow_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(); corak_wow_renumberSpellSections(ctl); }); } //Now, we initialize the dynamic rows to hold the incoming data for (var i=1; i<=dynamic_sheet_attrs.ctlFeatCount; i++) { corak_wow_addFeatRow('featTable', 'feat', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlAbilityCount; i++) { corak_wow_addFeatRow('abilityTable', 'special_ability', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlTraitCount; i++) { corak_wow_addFeatRow('traitTable', 'trait', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlSkillCount; i++) { corak_wow_addSkillRow('skillTable', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlWeaponCount; i++) { corak_wow_addWeaponRow('weaponTable', i, containerId, options.isEditable); } for (var i=1; i<=dynamic_sheet_attrs.ctlInventoryCount; i++) { corak_wow_addInventoryRow('inventorybox', i, containerId, options.isEditable); } for (var i=0; i<dynamic_sheet_attrs.ctlSpellSectionCount; i++) { corak_wow_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 corak_wow_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 corak_wow_updateStat("str", containerId); corak_wow_updateStat("agy", containerId); corak_wow_updateStat("sta", containerId); corak_wow_updateStat("int", containerId); corak_wow_updateStat("spt", containerId); corak_wow_updateStat("cha", containerId); corak_wow_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: corak_wow_renumberTable }); $(containerId + " .abilityTable").sortable({ items: "tr:not(:first)", helper: fixHelper, update: corak_wow_renumberTable }); $(containerId + " .traitTable").sortable({ items: "tr:not(:first)", helper: fixHelper, update: corak_wow_renumberTable }); $(containerId + " .inventorybox").sortable({ items: "div.item", helper: fixHelper, update: corak_wow_renumberItems }); $(containerId + " .featTable tr, " + containerId + " .abilityTable tr, " + containerId + " .traitTable tr, " + containerId + " .inventorybox div.item").disableSelection(); } } function corak_wow_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 $(containerId + " .dsf_" + field).text(val); switch (field) { case "str": case "str_damage": case "str_boost": corak_wow_updateStat("str", containerId); break; case "int": case "int_damage": case "int_boost": corak_wow_updateStat("int", containerId); break; case "spt": case "spt_damage": case "spt_boost": corak_wow_updateStat("spt", containerId); break; case "agy": case "agy_damage": case "agy_boost": corak_wow_updateStat("agy", containerId); break; case "sta": case "sta_damage": case "sta_boost": corak_wow_updateStat("sta", containerId); break; case "cha": case "cha_damage": case "cha_boost": corak_wow_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": corak_wow_updateSaves(containerId); break; case "misc_init_mod": corak_wow_updateInit(containerId); break; case "size_mod": corak_wow_updateAC(containerId); case "bab": corak_wow_updateAttacks(containerId); case "misc_grapple_mod": corak_wow_updateGrapple(containerId); break; case "armor_bonus": case "shield_bonus": case "agy_mod_armor": case "deflection_mod": case "misc_mod": case "natural_armor": corak_wow_updateAC(containerId); break; case "pp": case "gp": case "sp": case "cp": case "light_load": corak_wow_updateInventoryStuff(containerId); break; } if ((field.substr(field.length - 6) == '_ranks')) { corak_wow_updateSkill(containerId, "dsf_" + field.substr(0, field.length - 6)); } else if ((field.substr(field.length - 9) == '_misc_mod')) { corak_wow_updateSkill(containerId, "dsf_" + field.substr(0, field.length - 9)); } else if ((field.substr(field.length - 8) == '_ability')) { corak_wow_updateSkill(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 corak_wow_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 corak_wow_cleanTable("feat", "Feat", containerId); corak_wow_cleanTable("special_ability", "Ability", containerId); corak_wow_cleanTable("trait", "Trait", containerId); corak_wow_cleanTable("extra_skill", "Skill", containerId); corak_wow_cleanTable("weapon", "Weapon", containerId); corak_wow_cleanInventoryTable(containerId); //Because we're deleting rows, we need to recalculate the relevant cells //corak_wow_updateTotal("Equipment", "equMass", containerId); } // You can define your own variables...just make sure to namespace them! function corak_wow_updateStat(stat, containerId) { var value = Number($(containerId + " .dsf_" + stat).text()) - Number($(containerId + " .dsf_" + stat + "_damage").text()) + Number($(containerId + " .dsf_" + stat + "_boost").text()); if (corak_wow_isNumeric(value)) { $(containerId + " .dsf_" + stat + "_mod").text(Math.floor((parseInt(value) - 10) / 2)); switch (stat) { case "str": corak_wow_updateAttacks(containerId); corak_wow_updateGrapple(containerId); break; case "spt": corak_wow_updateSaves(containerId); break; case "agy": corak_wow_updateSaves(containerId); corak_wow_updateInit(containerId); corak_wow_updateAttacks(containerId); corak_wow_updateAC(containerId); break; case "sta": corak_wow_updateSaves(containerId); break; } corak_wow_updateSkills(containerId, stat); } } function corak_wow_updateSaves(containerId) { $(containerId + " .dsf_fortitude_total").text(Number($(containerId + " .dsf_base_fort_save").text()) + Number($(containerId + " .dsf_sta_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_spt_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_agy_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 corak_wow_updateInit(containerId) { $(containerId + " .dsf_initative_total").text(Number($(containerId + " .dsf_agy_mod:first").text()) + Number($(containerId + " .dsf_misc_init_mod").text())); } function corak_wow_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_agy_mod_armor").text()) + Number($(containerId + " .dsf_deflection_mod").text()) + Number($(containerId + " .dsf_misc_mod").text()) + Number($(containerId + " .dsf_natural_armor").text())); } function corak_wow_updateGrapple(containerId) { var val = $(containerId + " .dsf_size_mod:first").text(); if (corak_wow_isNumeric(val)) $(containerId + " .dsf_size_mod_grapple").text(-4 * parseFloat(val)); else $(containerId + " .dsf_size_mod_grapple").text(""); $(containerId + " .dsf_grapple_total").text(Number($(containerId + " .dsf_str_mod:first").text()) + Number($(containerId + " .dsf_bab:first").text()) + Number($(containerId + " .dsf_size_mod_grapple").text()) + Number($(containerId + " .dsf_misc_grapple_mod").text())); } function corak_wow_updateAttacks(containerId) { var bab = Number($(containerId + " .dsf_bab:first").text()); var ranged = bab + Number($(containerId + " .dsf_size_mod:first").text()) + Number($(containerId + " .dsf_agy_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(corak_wow_signedInt(melee)); $(containerId + " .dsf_attack_ranged_total").text(corak_wow_signedInt(ranged)); } else if (bab < 11) { $(containerId + " .dsf_attack_melee_total").text(corak_wow_signedInt(melee) + "/" + corak_wow_signedInt(melee-5)); $(containerId + " .dsf_attack_ranged_total").text(corak_wow_signedInt(ranged) + "/" + corak_wow_signedInt(ranged-5)); } else if (bab < 16) { $(containerId + " .dsf_attack_melee_total").text(corak_wow_signedInt(melee) + "/" + corak_wow_signedInt(melee-5) + "/" + corak_wow_signedInt(melee-10)); $(containerId + " .dsf_attack_ranged_total").text(corak_wow_signedInt(ranged) + "/" + corak_wow_signedInt(ranged-5) + "/" + corak_wow_signedInt(ranged-10)); } else { $(containerId + " .dsf_attack_melee_total").text(corak_wow_signedInt(melee) + "/" + corak_wow_signedInt(melee-5) + "/" + corak_wow_signedInt(melee-10) + "/" + corak_wow_signedInt(melee-15)); $(containerId + " .dsf_attack_ranged_total").text(corak_wow_signedInt(ranged) + "/" + corak_wow_signedInt(ranged-5) + "/" + corak_wow_signedInt(ranged-10) + "/" + corak_wow_signedInt(ranged-15)); } } function corak_wow_updateSkills(containerId, stat) { var id; stat = stat[0].toUpperCase() + stat.substr(1).toLowerCase(); $(containerId + " .skillTable td:contains(" + stat + ")").each(function (i, c) { id = corak_wow_findDsfClass($(c).next()); if (id) { corak_wow_updateSkill(containerId, id.substr(0, id.length - 4)); } }); } function corak_wow_updateSkill(containerId, skill) { var modtype = $(containerId + " ." + skill + "_mod").prev().text().toLowerCase(); var ranks = Number($(containerId + " ." + skill + "_ranks").text()); var abilMod = Number($(containerId + " .dsf_" + modtype + "_mod:first").text()); if (ranks <= 0) { ranks = 0; } var ctl = $(containerId + " ." + skill + "_ability_mod"); if (ctl.length) { //Custom field, so fill in the stat mod ctl.text(corak_wow_signedInt(abilMod)); } $(containerId + " ." + skill + "_mod").text(corak_wow_signedInt(ranks + Number($(containerId + " ." + skill + "_misc_mod").text()) + abilMod)); } function corak_wow_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 corak_wow_updateInventoryStuff(containerId) { var val = $(containerId + " .dsf_light_load").text(); if (corak_wow_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( 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 ); } function corak_wow_bindRow(newRow, containerId) { //Force-bind the new elements. Ah, sweet hax containerId = containerId.replace("#", ""); newRow.find(".dsf").each(function (i, c) { var name = corak_wow_findDsfClass(c); if (name) aisleten.characters.bindField(name.replace("dsf_", ""), containerId, 'corak_wow'); }); } function corak_wow_addFeatRow(table, prefix, num, containerId, isEditable) { var newRow = $('<tr class="corak_wow_' + 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(); corak_wow_bindRow(newRow, containerId); } } function corak_wow_addSkillRow(table, num, containerId, isEditable) { var newRow = $('<tr class="corak_wow_extra_skillRow' + num +'"><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(); corak_wow_bindRow(newRow, containerId); } } function corak_wow_addWeaponRow(table, num, containerId, isEditable) { var newRow = $('<tr class="corak_wow_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></tr>'); $(containerId + " ." + table).append(newRow); if (isEditable) { newRow.disableSelection(); corak_wow_bindRow(newRow, containerId); } } function corak_wow_addInventoryRow(table, num, containerId, isEditable) { var newRow = $('<div class="item corak_wow_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(); corak_wow_bindRow(newRow, containerId); } } function corak_wow_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 corak_wow_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 + '_Power"></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) { corak_wow_bindRow(newSection, containerId); } } function corak_wow_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.corak_wow_" + 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) corak_wow_renumberTable(null, { item: $(containerId + " ." + prefix + "Table td:first") }); $(containerId + " .dsf_ctl" + title + "Count").text(count); } function corak_wow_cleanInventoryTable(containerId) { var max = Number($(containerId + " .dsf_ctlInventoryCount").text()); var count = 0; for (var i=1; i<=max; i++) { var box = $(containerId + " div.corak_wow_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) corak_wow_renumberItems(null, { item: $(containerId + " .inventorybox div.item:first") }); $(containerId + " .dsf_ctlInventoryCount").text(count); } function corak_wow_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 corak_wow_isNumeric(n) { return ($.isNumeric && $.isNumeric(n)) || (!isNaN(parseFloat(n)) && isFinite(n)); } function corak_wow_signedInt(n) { return (n < 0) ? n : ("+" + n) } function corak_wow_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(".corak_wow_" + 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", "corak_wow_" + 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 corak_wow_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 corak_wow_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 corak_wow_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(".corak_wow_spellSection" + i).each(function (j, c) { $(c).prop("class", "spellSection spellSectionContainer corak_wow_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
Back