mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 19:52:29 +00:00
Added Oaths section. Added Magic Items section. Added Initiative roller and Turn Tracker integration, with calculations. Fixed minimum width to account for Traits section. Fixed calculation of Unaware AC. Deleted Shields from armor proficiencies since they aren't a separate category. Added tooltips to some elements.
1830 lines
90 KiB
HTML
1830 lines
90 KiB
HTML
<input type="hidden" class="sheet-tabstoggle" name="attr_sheetTab" value="character" />
|
|
<div>
|
|
<button type="action" name="act_character" class="sheet-button0">Character</button>
|
|
<button type="action" name="act_skills" class="sheet-button1">Skills</button>
|
|
<button type="action" name="act_traits" class="sheet-button2">Traits</button>
|
|
<button type="action" name="act_classf" class="sheet-button3">Class Features</button>
|
|
<button type="action" name="act_feats" class="sheet-button4">Feats</button>
|
|
<button type="action" name="act_attacks" class="sheet-button5">Attacks</button>
|
|
<button type="action" name="act_defenses" class="sheet-button6">Defenses</button>
|
|
<button type="action" name="act_spells" class="sheet-button7">Spells</button>
|
|
<button type="action" name="act_oaths" class="sheet-button8">Oaths</button>
|
|
<button type="action" name="act_magicitems" class="sheet-button9">Magic Items</button>
|
|
<button type="action" name="act_notes" class="sheet-button10">Notes</button>
|
|
</div>
|
|
|
|
<div class="sheet-character">
|
|
<h2>Character</h2>
|
|
<span>
|
|
<div class="sheet-frontsheet sheet-grid-sectionfront">
|
|
<div class="sheet-namelvl sheet-block">
|
|
<label>Name:</label><input type="text" name="attr_character_name" />
|
|
<label>Primary Class:</label><input type="text" name="attr_primaryclass" />
|
|
<label>Secondary Class:</label><input type="text" name="attr_secondaryclass" />
|
|
<label>Level:</label><input type="number" value="1" name="attr_characterlevel" />
|
|
<label>Initiative:</label>
|
|
<div class="sheet-grid-sectioninit">
|
|
<div class="sheet-reflexsave">
|
|
<textarea title="Reflex Modifier" name="attr_finalrefsave" class="sheet-numwindow" readonly>0</textarea>
|
|
</div>
|
|
<div class="sheet-arbinit">
|
|
<input title="Arbitrary Initiative Modifier" type="number" placeholder="0" name="attr_initmod" />
|
|
</div>
|
|
<div class="sheet-fininit">
|
|
<textarea title="Final Initiative Modifier" name="attr_finalinit" class="sheet-numwindow" readonly>0</textarea>
|
|
</div>
|
|
<div class="sheet-rollforinit">
|
|
<button title="Roll Initiative (Select your token first!)" type='roll' name='roll_testinit' value='&{template:default} {{name=@{character_name}}} {{Initiative=[[1d20 + @{finalinit} &{tracker}]]}}'></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="sheet-lineage sheet-block">
|
|
<label>Lineage:</label><input type="text" name="attr_lineage" />
|
|
<label>Culture:</label><input type="text" name="attr_culture" />
|
|
<label>Size:</label>
|
|
<select name="attr_sizecat" class="sizecat">
|
|
<option value="tiny">Tiny</option>
|
|
<option value="small">Small</option>
|
|
<option value="medium" selected>Medium</option>
|
|
<option value="large">Large</option>
|
|
<option value="huge">Huge</option>
|
|
</select>
|
|
<label>Speed:</label><input type="number" name="attr_speed" class='sheet-arrowless' />
|
|
</div>
|
|
|
|
<div class="sheet-hp sheet-block">
|
|
<label>HP/Max:</label><input type="number" name="attr_hp" class='sheet-arrowless' /><input type="number" name="attr_hp_max" class='sheet-arrowless' />
|
|
<label>Primary Mana/Max:</label><input type="number" placeholder="0" name="attr_primana" /><input type="number" placeholder="0" name="attr_primana_max" />
|
|
<label>Secondary Mana/Max:</label><input type="number" placeholder="0" name="attr_secmana" /><input type="number" placeholder="0" name="attr_secmana_max" />
|
|
<label>Personal Hero Dice Current/Max:</label><input type="number" placeholder="0" name="attr_herodice_current" /><input type="number" class='sheet-arrowless' name="attr_herodice_max" value="10" readonly />
|
|
</div>
|
|
|
|
<div class="sheet-attributes sheet-block">
|
|
<h2>Attributes</h2>
|
|
|
|
<label>Strength </label><input type="number" placeholder="0" name='attr_strength' class='sheet-short' value='0'>
|
|
<button type='roll' name='roll_testattack' value='&{template:default} {{name=@{character_name}}} {{Strength check=[[1d20 + @{strength}]]}}'></button>
|
|
<br />
|
|
<label>Dexterity </label><input type="number" placeholder="0" name='attr_dexterity' class='sheet-short' value='0'>
|
|
<button type='roll' name='roll_testattack' value='&{template:default} {{name=@{character_name}}} {{Dexterity check=[[1d20 + @{dexterity}]]}}'></button>
|
|
<br />
|
|
<label>Constitution </label><input type="number" placeholder="0" name='attr_constitution' class='sheet-short' value='0'>
|
|
<button type='roll' name='roll_testattack' value='&{template:default} {{name=@{character_name}}} {{Constitution check=[[1d20 + @{constitution}]]}}'></button>
|
|
<br />
|
|
<label>Intelligence </label><input type="number" placeholder="0" name='attr_intelligence' class='sheet-short' value='0'>
|
|
<button type='roll' name='roll_testattack' value='&{template:default} {{name=@{character_name}}} {{Intelligence check=[[1d20 + @{intelligence}]]}}'></button>
|
|
<br />
|
|
<label>Wisdom </label><input type="number" placeholder="0" name='attr_wisdom' class='sheet-short' value='0'>
|
|
<button type='roll' name='roll_testattack' value='&{template:default} {{name=@{character_name}}} {{Wisdom check=[[1d20 + @{wisdom}]]}}'></button>
|
|
<br />
|
|
<label>Charisma </label><input type="number" placeholder="0" name='attr_charisma' class='sheet-short' value='0'>
|
|
<button type='roll' name='roll_testattack' value='&{template:default} {{name=@{character_name}}} {{Charisma check=[[1d20 + @{charisma}]]}}'></button>
|
|
<hr />
|
|
</div>
|
|
<div class="sheet-keywords sheet-block">
|
|
<h2>Keywords</h2>
|
|
|
|
<fieldset class="repeating_keyword">
|
|
<input type="text" name="attr_keywordname" />
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
<div class="sheet-defenses sheet-block">
|
|
<h2>Defenses</h2>
|
|
<div class="defenses">
|
|
<label>Defense Proficiency</label>
|
|
<select name="attr_proftypedefense" class="proftypedef">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<label>AC/Threshold</label><textarea name="attr_finalactotal" class="sheet-numwindow" readonly>0</textarea><textarea name="attr_finalthreshold" class="sheet-numwindow" readonly>0</textarea>
|
|
<label>Unaware</label><textarea name="attr_finalunawarearmorclass" class="sheet-numwindow"readonly>0</textarea>
|
|
<label>Fortitude Save</label>
|
|
<select name="attr_saveproffort" class="proftypedef">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select><input type="number" placeholder="0" name="attr_fortsave" /><textarea name="attr_finalfortsave" class="sheet-numwindow" readonly>0</textarea>
|
|
<button type='roll' name='roll_testsave' value='&{template:default} {{name=@{character_name}}} {{Fortitude Save=[[1d20 + @{finalfortsave}]]}}'></button>
|
|
<label>Reflex Save</label>
|
|
<select name="attr_saveprofref" class="proftypedef">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select><input type="number" placeholder="0" name="attr_refsave" /><textarea name="attr_finalrefsave" class="sheet-numwindow" readonly>0</textarea>
|
|
<button type='roll' name='roll_testsave' value='&{template:default} {{name=@{character_name}}} {{Reflex Save=[[1d20 + @{finalrefsave}]]}}'></button>
|
|
<label>Will Save</label>
|
|
<select name="attr_saveprofwill" class="proftypedef">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select><input type="number" placeholder="0" name="attr_willsave" /><textarea name="attr_finalwillsave" class="sheet-numwindow" readonly>0</textarea>
|
|
<button type='roll' name='roll_testsave' value='&{template:default} {{name=@{character_name}}} {{Will Save=[[1d20 + @{finalwillsave}]]}}'></button>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="sheet-skills">
|
|
<h2>Skills</h2>
|
|
<span>
|
|
<label>Academia</label>
|
|
<select name="attr_proftypeacademia" class="proftype">
|
|
<option value="0" selected>Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoreacademia" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3" selected>Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_academia" /><textarea name="attr_finalacademiabonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Academia check=[[1d20 + @{finalacademiabonus}]]}}'></button>
|
|
<label>Acrobatics</label>
|
|
<select name="attr_proftypeacrobatics" class="proftype">
|
|
<option value="0" selected>Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoreacrobatics" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1" selected>Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_acrobatics" /><textarea name="attr_finalacrobaticsbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Acrobatics check=[[1d20 + @{finalacrobaticsbonus}]]}}'></button>
|
|
<label>Animal Husbandry</label>
|
|
<select name="attr_proftypeanimalh" class="proftype">
|
|
<option value="0" selected>Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoreanimalh" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4" selected>Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_animalh" /><textarea name="attr_finalanimalhbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Animal Husbandry check=[[1d20 + @{finalanimalhbonus}]]}}'></button>
|
|
<label>Aquatic</label>
|
|
<select name="attr_proftypeaquatic" class="proftype">
|
|
<option value="0" selected>Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoreaquatic" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3" selected>Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_aquatic" /><textarea name="attr_finalaquaticbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Aquatic check=[[1d20 + @{finalaquaticbonus}]]}}'></button>
|
|
<label>Arcane Lore</label>
|
|
<select name="attr_proftypearcanel" class="proftype">
|
|
<option value="0" selected>Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscorearcanel" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3" selected>Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_arcanel" /><textarea name="attr_finalarcanelbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Arcane Lore check=[[1d20 + @{finalarcanelbonus}]]}}'></button>
|
|
<label>Athletics</label>
|
|
<select name="attr_proftypeathletics" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoreathletics" class="abilitytype">
|
|
<option value="0" selected>Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_athletics" /><textarea name="attr_finalathleticsbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Athletics check=[[1d20 + @{finalathleticsbonus}]]}}'></button>
|
|
<label>Bluff</label>
|
|
<select name="attr_proftypebluff" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscorebluff" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5" selected>Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_bluff" /><textarea name="attr_finalbluffbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Bluff check=[[1d20 + @{finalbluffbonus}]]}}'></button>
|
|
<label>Fieldcraft</label>
|
|
<select name="attr_proftypefieldcraft" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscorefieldcraft" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4" selected>Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_fieldcraft" /><textarea name="attr_finalfieldcraftbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Fieldcraft check=[[1d20 + @{finalfieldcraftbonus}]]}}'></button>
|
|
<label>Intimidate</label>
|
|
<select name="attr_proftypeintimidate" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoreintimidate" class="abilitytype">
|
|
<option value="0" selected>Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_intimidate" /><textarea name="attr_finalintimidatebonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Intimidate check=[[1d20 + @{finalintimidatebonus}]]}}'></button>
|
|
<label>Investigation</label>
|
|
<select name="attr_proftypeinvestigation" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoreinvestigation" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3" selected>Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_investigation" /><textarea name="attr_finalinvestigationbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Investigation check=[[1d20 + @{finalinvestigationbonus}]]}}'></button>
|
|
<label>Medicine</label>
|
|
<select name="attr_proftypemedicine" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoremedicine" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4" selected>Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_medicine" /><textarea name="attr_finalmedicinebonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Medicine check=[[1d20 + @{finalmedicinebonus}]]}}'></button>
|
|
<label>Merchant Lore</label>
|
|
<select name="attr_proftypemerchantl" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoremerchantl" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3" selected>Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_merchantl" /><textarea name="attr_finalmerchantlbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Merchant Lore check=[[1d20 + @{finalmerchantlbonus}]]}}'></button>
|
|
<label>Military Lore</label>
|
|
<select name="attr_proftypemilitaryl" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoremilitaryl" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3" selected>Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_militaryl" /><textarea name="attr_finalmilitarylbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Military Lore check=[[1d20 + @{finalmilitarylbonus}]]}}'></button>
|
|
<label>Perception</label>
|
|
<select name="attr_proftypeperception" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoreperception" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4" selected>Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_perception" /><textarea name="attr_finalperceptionbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Perception check=[[1d20 + @{finalperceptionbonus}]]}}'></button>
|
|
<label>Perform</label>
|
|
<select name="attr_proftypeperform" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoreperform" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5" selected>Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_perform" /><textarea name="attr_finalperformbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Perform check=[[1d20 + @{finalperformbonus}]]}}'></button>
|
|
<label>Profession</label>
|
|
<select name="attr_proftypeprofession" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoreprofession" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3" selected>Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_profession" /><textarea name="attr_finalprofessionbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Profession check=[[1d20 + @{finalprofessionbonus}]]}}'></button>
|
|
<label>Politique</label>
|
|
<select name="attr_proftypepolitique" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscorepolitique" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3" selected>Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_politique" /><textarea name="attr_finalpolitiquebonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Politique check=[[1d20 + @{finalpolitiquebonus}]]}}'></button>
|
|
<label>Religion</label>
|
|
<select name="attr_proftypereligion" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscorereligion" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4" selected>Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_religion" /><textarea name="attr_finalreligionbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Religion check=[[1d20 + @{finalreligionbonus}]]}}'></button>
|
|
<label>Stealth</label>
|
|
<select name="attr_proftypestealth" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscorestealth" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1" selected>Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_stealth" /><textarea name="attr_finalstealthbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Stealth check=[[1d20 + @{finalstealthbonus}]]}}'></button>
|
|
<label>Technological Lore</label>
|
|
<select name="attr_proftypetechl" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<select name="attr_abilityscoretechl" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3" selected>Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<input type="number" placeholder="0" name="attr_techl" /><textarea name="attr_finaltechlbonus" class="sheet-numwindow" readonly></textarea>
|
|
<button type='roll' name='roll_testskill' value='&{template:default} {{name=@{character_name}}} {{Technological Lore check=[[1d20 + @{finaltechlbonus}]]}}'></button>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="sheet-traits">
|
|
<h2>Traits</h2>
|
|
<span>
|
|
<div class="sheet-traitssheet sheet-grid-sectiontraits">
|
|
<div class="sheet-lineagetraits sheet-block">
|
|
<h2>Lineage Traits</h2>
|
|
<fieldset class="repeating_lineagetraits">
|
|
<input type="text" name="attr_lineagetrait" />
|
|
<textarea placeholder='Enter lineage trait info' maxlength='2000' minlength='10' name="attr_lineagetext"></textarea>
|
|
<button type='roll' name='roll_pastelineagetrait' value='&{template:default} {{name=@{character_name}}} {{@{lineagetrait}}} {{@{lineagetext}}}'></button>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="sheet-culturetraits sheet-block">
|
|
<h2>Culture Traits</h2>
|
|
<fieldset class="repeating_culturetraits">
|
|
<input type="text" name="attr_culturetrait" />
|
|
<textarea placeholder='Enter lineage trait info' maxlength='2000' minlength='10' name="attr_culturetext"></textarea>
|
|
<button type='roll' name='roll_pasteculturetrait' value='&{template:default} {{name=@{character_name}}} {{@{culturetrait}}} {{@{culturetext}}}'></button>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="sheet-honors sheet-block">
|
|
<h2>Honors</h2>
|
|
<fieldset class="repeating_honors">
|
|
<input type="text" name="attr_honors" />
|
|
<textarea placeholder='Enter honor info' maxlength='2000' minlength='10' name="attr_honortext"></textarea>
|
|
<button type='roll' name='roll_pasteclasstrait' value='&{template:default} {{name=@{character_name}}} {{@{honors}}} {{@{honortext}}}'></button>
|
|
</fieldset>
|
|
</div>
|
|
|
|
</div>
|
|
</span>
|
|
</div>
|
|
<div class="sheet-classf">
|
|
<h2>Class Features</h2>
|
|
<span>
|
|
<div class="sheet-classfsheet sheet-grid-sectionclassf">
|
|
<div class="sheet-classf sheet-block">
|
|
<fieldset class="repeating_classf">
|
|
<input type="text" name="attr_classf" />
|
|
<textarea placeholder='Enter class feature info' maxlength='4000' minlength='10' name="attr_classftext"></textarea>
|
|
<button type='roll' name='roll_pasteclassfeature' value='&{template:default} {{name=@{character_name}}} {{@{classf}}} {{@{classftext}}}'></button>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
</span>
|
|
</div>
|
|
<div class="sheet-feats">
|
|
<h2>Feats</h2>
|
|
<span>
|
|
<div class="sheet-featssheet sheet-grid-sectionfeats">
|
|
<div class="sheet-feats sheet-block">
|
|
<fieldset class="repeating_feats">
|
|
<input type="text" name="attr_feats" />
|
|
<textarea placeholder='Enter feat info' maxlength='4000' minlength='10' name="attr_featstext"></textarea>
|
|
<button type='roll' name='roll_pastefeat' value='&{template:default} {{name=@{character_name}}} {{@{feats}}} {{@{featstext}}}'></button>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
</span>
|
|
</div>
|
|
<div class="sheet-attacks">
|
|
|
|
<h2>Attacks</h2><br>
|
|
<span>
|
|
<label>Simple Weapons</label>
|
|
<select name="attr_proftypesimpleweapons" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<label>Martial Weapons</label>
|
|
<select name="attr_proftypemartialweapons" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<fieldset class="repeating_attacks">
|
|
<input title="Name of the attack" type="text" placeholder="Attack Name" name="attr_attackname" />
|
|
<input title="To-hit bonus" type="text" value="0" name="attr_attackbonus" />
|
|
<input title="Damage roll (include all bonuses)" type="text" value="1d4" name="attr_attackdamage" />
|
|
<input title="Attack Properties, like Finesse or Reach" type="text" value="Properties" name="attr_attackproperties" />
|
|
<button type='roll' name='roll_testattackroll' value='&{template:default} {{name=@{character_name}}} {{Attack roll to hit=[[1d20 + @{attackbonus}]]}} {{Damage value rolled=[[@{attackdamage}]]}}'></button>
|
|
</fieldset>
|
|
|
|
</span>
|
|
</div>
|
|
<div class="sheet-defenses">
|
|
|
|
<h2>Defenses</h2><br>
|
|
<span>
|
|
<div class="sheet-defensessheet sheet-grid-sectiondefenses">
|
|
<div class="sheet-generaldef sheet-block">
|
|
<div class="defenses">
|
|
<h2>Defenses</h2>
|
|
<label>Defense Proficiency</label>
|
|
<select name="attr_proftypedefense" class="proftypedef">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<label>AC/Threshold Modifiers</label><input type="number" placeholder="0" name="attr_armorclassmod" /><input type="number" placeholder="0" name="attr_thresholdmod" />
|
|
<label>Total AC/Threshold</label><textarea name="attr_finalactotal" class="sheet-numwindow" readonly>0</textarea><textarea name="attr_finalthreshold" class="sheet-numwindow" readonly>0</textarea>
|
|
<label>Unaware AC Modifier</label><input type="number" name="attr_unawarearmorclassmod" />
|
|
<label>Total Unaware</label><textarea name="attr_finalunawarearmorclass" class="sheet-numwindow"readonly>0</textarea>
|
|
<label>Fortitude Save</label>
|
|
<select name="attr_saveproffort" class="proftypedef">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select><input type="number" placeholder="0" name="attr_fortsave" /><textarea name="attr_finalfortsave" class="sheet-numwindow" readonly>0</textarea>
|
|
<button type='roll' name='roll_testsave' value='&{template:default} {{name=@{character_name}}} {{Fortitude Save=[[1d20 + @{finalfortsave}]]}}'></button>
|
|
<label>Reflex Save</label>
|
|
<select name="attr_saveprofref" class="proftypedef">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select><input type="number" placeholder="0" name="attr_refsave" /><textarea name="attr_finalrefsave" class="sheet-numwindow" readonly>0</textarea>
|
|
<button type='roll' name='roll_testsave' value='&{template:default} {{name=@{character_name}}} {{Reflex Save=[[1d20 + @{finalrefsave}]]}}'></button>
|
|
<label>Will Save</label>
|
|
<select name="attr_saveprofwill" class="proftypedef">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select><input type="number" placeholder="0" name="attr_willsave" /><textarea name="attr_finalwillsave" class="sheet-numwindow" readonly>0</textarea>
|
|
<button type='roll' name='roll_testsave' value='&{template:default} {{name=@{character_name}}} {{Will Save=[[1d20 + @{finalwillsave}]]}}'></button>
|
|
</div>
|
|
</div>
|
|
<div class="sheet-armor sheet-block">
|
|
<div class="armor">
|
|
<h2>Armor</h2>
|
|
<label>Armor Proficiency</label>
|
|
<input type="checkbox" id="armorlight" name="attr_armorlight" value="yes"> Light Armor<br>
|
|
<input type="checkbox" id="armormedium" name="attr_armormedium" value="yes"> Medium Armor<br>
|
|
<input type="checkbox" id="armorheavy" name="attr_armorheavy" value="yes"> Heavy Armor<br>
|
|
<input type="checkbox" id="armorsuperheavy" name="attr_armorsuperheavy" value="yes"> Superheavy Armor<br>
|
|
<label>Armor Name</label>
|
|
<input title="Armor name. Include shields here too." type="text" name="attr_armorname" />
|
|
<label>Armor AC Bonus</label><input type="number" placeholder="0" name='attr_armoracbonus' value='0'>
|
|
<label>Armor Max Dex Bonus</label>(put 10 or higher for no max dex limit)<br><input type="number" name='attr_armormaxdexbonus' value='10'>
|
|
<label>Armor Threshold</label><input type="number" placeholder="0" name='attr_armorthreshold' value='0'>
|
|
<label>Armor Movement Penalty</label><input type="number" placeholder="0" name='attr_armormovementpenalty' value='0'>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="sheet-spells">
|
|
<h2>Spells</h2><br>
|
|
<span>
|
|
<label>Primary Spellcasting Proficiency</label>
|
|
<select name="attr_proftypespellspri" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<label>Primary Spellcasting Attribute</label>
|
|
<select name="attr_spellcastingattribpri" class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3" selected>Intelligence</option>
|
|
<option value="4">Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<label>Primary Spellcasting DC Modifier</label>
|
|
<input type="number" value="0" name="attr_spellcastingdcpri" />
|
|
<br>
|
|
<h3>Final Primary DC</h3>
|
|
<br>
|
|
<textarea name="attr_finalspellcastingdcpri" class="sheet-numwindow" readonly></textarea>
|
|
<br>
|
|
<label>Secondary Spellcasting Proficiency</label>
|
|
<select name="attr_proftypespellssec" class="proftype">
|
|
<option value="0">Unskilled</option>
|
|
<option value="1">Skilled</option>
|
|
<option value="2">Professional</option>
|
|
<option value="3">Exceptional</option>
|
|
</select>
|
|
<label>Secondary Spellcasting Attribute</label>
|
|
<select name='attr_spellcastingattribsec' class="abilitytype">
|
|
<option value="0">Strength</option>
|
|
<option value="1">Dexterity</option>
|
|
<option value="2">Constitution</option>
|
|
<option value="3">Intelligence</option>
|
|
<option value="4" selected>Wisdom</option>
|
|
<option value="5">Charisma</option>
|
|
</select>
|
|
<label>Secondary Spellcasting DC Modifier</label>
|
|
<input type="number" value="0" name="attr_spellcastingdcsec" />
|
|
<br>
|
|
<h3>Final Secondary DC</h3>
|
|
<br>
|
|
<textarea name="attr_finalspellcastingdcsec" class="sheet-numwindow" readonly></textarea>
|
|
<br>
|
|
<h2>Individual Spells</h2>
|
|
<fieldset class="repeating_Spell Example">
|
|
<label>Spell Name</label><input type="text" name="attr_spellname" placeholder="Spell Name" />
|
|
<label>Spell Text</label><textarea placeholder='Enter spell info' maxlength='2000' minlength='10' name="attr_spelltext"></textarea>
|
|
<button title="Paste this spell into chat" type='roll' name='roll_pastespell' value='&{template:default} {{name=@{character_name}}} {{Primary Spell DC=@{finalspellcastingdcpri}}} {{Secondary Spell DC=@{finalspellcastingdcsec}}} {{Spell Name=@{spellname}}} {{Spell Text=@{spelltext}}}'></button>
|
|
</fieldset>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="sheet-notes">
|
|
<h2>Notes</h2><br>
|
|
<span>
|
|
<textarea placeholder='Notes go here' maxlength='10000' minlength='1' name="attr_notetext"></textarea>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="sheet-oaths">
|
|
<h2>Oaths</h2><br>
|
|
<span>
|
|
<fieldset class="repeating_Oath">
|
|
<label>Oath</label><textarea placeholder='Enter your oath' maxlength='2000' minlength='1' name="attr_oathtext"></textarea>
|
|
<button title="Paste this oath into chat" type='roll' name='roll_pasteoath' value='&{template:default} {{name=@{character_name}}} {{Oath=@{oathtext}}}'></button>
|
|
</fieldset>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="sheet-magicitems">
|
|
<h2>Magic Item Inventory</h2><br>
|
|
<span>
|
|
<fieldset class="repeating_Magicitem">
|
|
<label>Item Name</label><input type="text" name="attr_magicitemname" placeholder="Item Name" />
|
|
<label>Item Description</label><textarea placeholder='Describe your item' maxlength='2000' minlength='1' name="attr_magicitemtext"></textarea><br>
|
|
<select name='attr_magicitemslot' class="abilitytype">
|
|
<option value="0">Head</option>
|
|
<option value="1">Hands</option>
|
|
<option value="2">Accessory</option>
|
|
<option value="3">Worn</option>
|
|
<option value="4" selected>Wielded</option>
|
|
<option value="5">Legs</option>
|
|
<option value="6">Exotic</option>
|
|
<option value="7">Stored</option>
|
|
</select>
|
|
<input type="checkbox" id="attunedornot" name="attr_attunedorno" value="no"> Attunement Required?
|
|
<button title="Paste item description into chat" type='roll' name='roll_pastemagicitem' value='&{template:default} {{name=@{character_name}}} {{Magic Item Name=@{magicitemname}}} {{Magic Item Description=@{magicitemtext}}}'></button>
|
|
</fieldset>
|
|
</span>
|
|
</div>
|
|
|
|
|
|
<script type="text/worker">
|
|
const buttonlist = ["character", "skills", "traits", "classf", "feats", "attacks", "defenses", "spells", "oaths", "magicitems", "notes"];
|
|
buttonlist.forEach(button => {
|
|
on(`clicked:${button}`, function() {
|
|
setAttrs({
|
|
sheetTab: button
|
|
});
|
|
});
|
|
});
|
|
//Spellcasting and Saving Throws section
|
|
on("sheet:opened change:characterlevel change:strength change:dexterity change:constitution change:intelligence change:wisdom change:charisma change:initmod change:proftypespellspri change:proftypespellssec change:spellcastingattribpri change:spellcastingattribsec change:spellcastingdcpri change:spellcastingdcsec change:saveproffort change:fortsave change:saveprofref change:refsave change:saveprofwill change:willsave change:proftypeacademia change:abilityscoreacademia change:academia change:proftypeacrobatics change:abilityscoreacrobatics change:acrobatics change:proftypeanimalh change:abilityscoreanimalh change:animalh change:proftypeaquatic change:abilityscoreaquatic change:aquatic change:proftypearcanel change:abilityscorearcanel change:arcanel change:proftypeathletics change:abilityscoreathletics change:athletics change:proftypebluff change:abilityscorebluff change:bluff change:proftypefieldcraft change:abilityscorefieldcraft change:fieldcraft change:proftypeintimidate change:abilityscoreintimidate change:intimidate change:proftypeinvestigation change:abilityscoreinvestigation change:investigation change:proftypemedicine change:abilityscoremedicine change:medicine change:proftypemerchantl change:abilityscoremerchantl change:merchantl change:proftypemilitaryl change:abilityscoremilitaryl change:militaryl change:proftypeperception change:abilityscoreperception change:perception change:proftypeperform change:abilityscoreperform change:profession change:proftypeprofession change:abilityscoreprofession change:profession change:proftypepolitique change:abilityscorepolitique change:politique change:proftypereligion change:abilityscorereligion change:religion change:proftypestealth change:abilityscorestealth change:stealth change:proftypetechl change:abilityscoretechl change:techl", function(){
|
|
getAttrs(["characterlevel","strength","dexterity","constitution","intelligence","wisdom","charisma","initmod","proftypespellspri","proftypespellssec","spellcastingattribpri","spellcastingdcpri","spellcastingattribsec","spellcastingdcsec","saveproffort","fortsave","saveprofref","refsave","saveprofwill","willsave","proftypeacademia","abilityscoreacademia","academia","proftypeacrobatics","abilityscoreacrobatics","acrobatics","proftypeanimalh","abilityscoreanimalh","animalh","proftypeaquatic","abilityscoreaquatic","aquatic","proftypearcanel","abilityscorearcanel","arcanel","proftypeathletics","abilityscoreathletics","athletics","proftypebluff","abilityscorebluff","bluff","proftypefieldcraft","abilityscorefieldcraft","fieldcraft","proftypeintimidate","abilityscoreintimidate","intimidate","proftypeinvestigation","abilityscoreinvestigation","investigation","proftypemedicine","abilityscoremedicine","medicine","proftypemerchantl","abilityscoremerchantl","merchantl","proftypemilitaryl","abilityscoremilitaryl","militaryl","proftypeperception","abilityscoreperception","perception","proftypeperform","abilityscoreperform","profession","proftypeprofession","abilityscoreprofession","profession","proftypepolitique","abilityscorepolitique","politique","proftypereligion","abilityscorereligion","religion","proftypestealth","abilityscorestealth","stealth","proftypetechl","abilityscoretechl","techl"], function(values) {
|
|
|
|
//Variables
|
|
let tempcharacterlevel = parseInt(values.characterlevel)||0;
|
|
|
|
//proficiency level holders
|
|
let skilledbonus = tempcharacterlevel;
|
|
let professionalbonus = tempcharacterlevel + 3;
|
|
let exceptionalbonus = tempcharacterlevel + 6;
|
|
|
|
//modifier holders
|
|
let tempstrength = parseInt(values.strength)||0;
|
|
let tempdexterity = parseInt(values.dexterity)||0;
|
|
let tempconstitution = parseInt(values.constitution)||0;
|
|
let tempintelligence = parseInt(values.intelligence)||0;
|
|
let tempwisdom = parseInt(values.wisdom)||0;
|
|
let tempcharisma = parseInt(values.charisma)||0;
|
|
|
|
//temporary holders of save proficiencies
|
|
let tempfortprof = parseInt(values.saveproffort)||0;
|
|
let temprefprof = parseInt(values.saveprofref)||0;
|
|
let tempwillprof = parseInt(values.saveprofwill)||0;
|
|
|
|
//temporary holders of arbitrary save bonuses
|
|
let temparbitraryfortbonus = parseInt(values.fortsave)||0;
|
|
let temparbitraryrefbonus = parseInt(values.refsave)||0;
|
|
let temparbitrarywillbonus = parseInt(values.willsave)||0;
|
|
|
|
//temporary holders of final save values
|
|
let tempfinalfortsave = 0;
|
|
let tempfinalrefsave = 0;
|
|
let tempfinalwillsave = 0;
|
|
|
|
//temporary holder of initiative modifier
|
|
let temparbitraryinitmod = parseInt(values.initmod)||0;
|
|
|
|
//temporary holder of final initiative modifier
|
|
let tempfinalinit = 0;
|
|
|
|
//temporary holders of the final spell dc values
|
|
let tempfinalspellcastingdcpri = 0;
|
|
let tempfinalspellcastingdcsec = 0;
|
|
|
|
//temporary holders of the spell attribute mods
|
|
let spellvaluepri = 0;
|
|
let spellvaluesec = 0;
|
|
|
|
//temporary holders of arbitrary spell DC modifiers
|
|
let arbitraryspellmodpri = parseInt(values.spellcastingdcpri)||0;
|
|
let arbitraryspellmodsec = parseInt(values.spellcastingdcsec)||0;
|
|
|
|
//temporary holders of spellcasting attribute modifier type
|
|
let abilitymodpri = parseInt(values.spellcastingattribpri)||0;
|
|
let abilitymodsec = parseInt(values.spellcastingattribsec)||0;
|
|
|
|
let spellproficiencytypepri = parseInt(values.proftypespellspri)||0;
|
|
let spellproficiencytypesec = parseInt(values.proftypespellssec)||0;
|
|
|
|
//Do primary spellcasting attribute
|
|
if (abilitymodpri === 0){
|
|
spellvaluepri = tempstrength;
|
|
} else if (abilitymodpri === 1){
|
|
spellvaluepri = tempdexterity;
|
|
} else if (abilitymodpri === 2){
|
|
spellvaluepri = tempconstitution;
|
|
} else if (abilitymodpri === 3){
|
|
spellvaluepri = tempintelligence;
|
|
} else if (abilitymodpri === 4){
|
|
spellvaluepri = tempwisdom;
|
|
} else if (abilitymodpri === 5){
|
|
spellvaluepri = tempcharisma;
|
|
} else {
|
|
spellvaluepri = tempstrength;
|
|
}
|
|
|
|
//Do primary spellcasting DC
|
|
if (spellproficiencytypepri === 0){
|
|
tempfinalspellcastingdcpri = 10 + arbitraryspellmodpri + spellvaluepri;
|
|
} else if (spellproficiencytypepri === 1){
|
|
tempfinalspellcastingdcpri = 10 + arbitraryspellmodpri + spellvaluepri + tempcharacterlevel;
|
|
} else if (spellproficiencytypepri === 2){
|
|
tempfinalspellcastingdcpri = 10 + arbitraryspellmodpri + spellvaluepri + tempcharacterlevel + 3;
|
|
} else if (spellproficiencytypepri === 3){
|
|
tempfinalspellcastingdcpri = 10 + arbitraryspellmodpri + spellvaluepri + tempcharacterlevel + 6;
|
|
} else{
|
|
tempfinalspellcastingdcpri = 10 + arbitraryspellmodpri + spellvaluepri;
|
|
}
|
|
|
|
//Do secondary spellcasting attribute
|
|
if (abilitymodsec === 0){
|
|
spellvaluesec = tempstrength;
|
|
} else if (abilitymodsec === 1){
|
|
spellvaluesec = tempdexterity;
|
|
} else if (abilitymodsec === 2){
|
|
spellvaluesec = tempconstitution;
|
|
} else if (abilitymodsec === 3){
|
|
spellvaluesec = tempintelligence;
|
|
} else if (abilitymodsec === 4){
|
|
spellvaluesec = tempwisdom;
|
|
} else if (abilitymodsec === 5){
|
|
spellvaluesec = tempcharisma;
|
|
} else{
|
|
spellvaluesec = strength;
|
|
}
|
|
|
|
//Do secondary spellcasting DC
|
|
if (spellproficiencytypesec === 0) {
|
|
tempfinalspellcastingdcsec = 10 + arbitraryspellmodsec + spellvaluesec;
|
|
} else if (spellproficiencytypesec === 1){
|
|
tempfinalspellcastingdcsec = 10 + arbitraryspellmodsec + spellvaluesec + tempcharacterlevel;
|
|
} else if (spellproficiencytypesec === 2){
|
|
tempfinalspellcastingdcsec = 10 + arbitraryspellmodsec + spellvaluesec + tempcharacterlevel + 3;
|
|
} else if (spellproficiencytypesec === 3){
|
|
tempfinalspellcastingdcsec = 10 + arbitraryspellmodsec + spellvaluesec + tempcharacterlevel + 6;
|
|
} else {
|
|
tempfinalspellcastingdcsec = 10 + arbitraryspellmodsec + spellvaluesec;
|
|
}
|
|
|
|
//Do fort save
|
|
if (tempfortprof === 0){
|
|
tempfinalfortsave = tempconstitution + temparbitraryfortbonus;
|
|
} else if (tempfortprof === 1){
|
|
tempfinalfortsave = tempconstitution + temparbitraryfortbonus + skilledbonus;
|
|
} else if (tempfortprof === 2){
|
|
tempfinalfortsave = tempconstitution + temparbitraryfortbonus + professionalbonus;
|
|
} else if (tempfortprof === 3){
|
|
tempfinalfortsave = tempconstitution + temparbitraryfortbonus + exceptionalbonus;
|
|
} else {
|
|
tempfinalfortsave = tempconstitution + temparbitraryfortbonus;
|
|
}
|
|
//Do ref save
|
|
if (temprefprof === 0){
|
|
tempfinalrefsave = tempdexterity + temparbitraryrefbonus;
|
|
} else if (temprefprof === 1){
|
|
tempfinalrefsave = tempdexterity + temparbitraryrefbonus + skilledbonus;
|
|
} else if (temprefprof === 2){
|
|
tempfinalrefsave = tempdexterity + temparbitraryrefbonus + professionalbonus;
|
|
} else if (temprefprof === 3){
|
|
tempfinalrefsave = tempdexterity + temparbitraryrefbonus + exceptionalbonus;
|
|
} else{
|
|
tempfinalrefsave = tempdexterity + temparbitraryrefbonus ;
|
|
}
|
|
|
|
//Do will save
|
|
if (tempwillprof === 0){
|
|
tempfinalwillsave = tempwisdom + temparbitrarywillbonus;
|
|
} else if (tempwillprof === 1){
|
|
tempfinalwillsave = tempwisdom + temparbitrarywillbonus + skilledbonus;
|
|
} else if (tempwillprof === 2){
|
|
tempfinalwillsave = tempwisdom + temparbitrarywillbonus + professionalbonus;
|
|
} else if (tempwillprof === 3){
|
|
tempfinalwillsave = tempwisdom + temparbitrarywillbonus + exceptionalbonus;
|
|
} else {
|
|
tempfinalwillsave = tempwisdom + temparbitrarywillbonus;
|
|
}
|
|
|
|
//do Initiative
|
|
tempfinalinit = tempfinalrefsave + temparbitraryinitmod;
|
|
|
|
setAttrs({
|
|
//spellcasting dcs
|
|
finalspellcastingdcpri: tempfinalspellcastingdcpri,
|
|
finalspellcastingdcsec: tempfinalspellcastingdcsec,
|
|
|
|
//saving throws
|
|
finalfortsave: tempfinalfortsave,
|
|
finalrefsave: tempfinalrefsave,
|
|
finalwillsave: tempfinalwillsave,
|
|
|
|
//initiative
|
|
finalinit: tempfinalinit
|
|
|
|
});
|
|
});
|
|
});
|
|
//Skills Section
|
|
on("sheet:opened change:characterlevel change:strength change:dexterity change:constitution change:intelligence change:wisdom change:charisma change:proftypeacademia change:abilityscoreacademia change:academia change:proftypeacrobatics change:abilityscoreacrobatics change:acrobatics change:proftypeanimalh change:abilityscoreanimalh change:animalh change:proftypeaquatic change:abilityscoreaquatic change:aquatic change:proftypearcanel change:abilityscorearcanel change:arcanel change:proftypeathletics change:abilityscoreathletics change:athletics change:proftypebluff change:abilityscorebluff change:bluff change:proftypefieldcraft change:abilityscorefieldcraft change:fieldcraft change:proftypeintimidate change:abilityscoreintimidate change:intimidate change:proftypeinvestigation change:abilityscoreinvestigation change:investigation change:proftypemedicine change:abilityscoremedicine change:medicine change:proftypemerchantl change:abilityscoremerchantl change:merchantl change:proftypemilitaryl change:abilityscoremilitaryl change:militaryl change:proftypeperception change:abilityscoreperception change:perception change:proftypeperform change:abilityscoreperform change:profession change:proftypeprofession change:abilityscoreprofession change:profession change:proftypepolitique change:abilityscorepolitique change:politique change:proftypereligion change:abilityscorereligion change:religion change:proftypestealth change:abilityscorestealth change:stealth change:proftypetechl change:abilityscoretechl change:techl", function(){
|
|
getAttrs(["characterlevel","strength","dexterity","constitution","intelligence","wisdom","charisma","proftypeacademia","abilityscoreacademia","academia","proftypeacrobatics","abilityscoreacrobatics","acrobatics","proftypeanimalh","abilityscoreanimalh","animalh","proftypeaquatic","abilityscoreaquatic","aquatic","proftypearcanel","abilityscorearcanel","arcanel","proftypeathletics","abilityscoreathletics","athletics","proftypebluff","abilityscorebluff","bluff","proftypefieldcraft","abilityscorefieldcraft","fieldcraft","proftypeintimidate","abilityscoreintimidate","intimidate","proftypeinvestigation","abilityscoreinvestigation","investigation","proftypemedicine","abilityscoremedicine","medicine","proftypemerchantl","abilityscoremerchantl","merchantl","proftypemilitaryl","abilityscoremilitaryl","militaryl","proftypeperception","abilityscoreperception","perception","proftypeperform","abilityscoreperform","profession","proftypeprofession","abilityscoreprofession","profession","proftypepolitique","abilityscorepolitique","politique","proftypereligion","abilityscorereligion","religion","proftypestealth","abilityscorestealth","stealth","proftypetechl","abilityscoretechl","techl"], function(values) {
|
|
|
|
//Variables
|
|
let tempcharacterlevel = parseInt(values.characterlevel)||0;
|
|
|
|
//proficiency level holders
|
|
let skilledbonus = tempcharacterlevel;
|
|
let professionalbonus = tempcharacterlevel + 3;
|
|
let exceptionalbonus = tempcharacterlevel + 6;
|
|
|
|
//modifier holders
|
|
let tempstrength = parseInt(values.strength)||0;
|
|
let tempdexterity = parseInt(values.dexterity)||0;
|
|
let tempconstitution = parseInt(values.constitution)||0;
|
|
let tempintelligence = parseInt(values.intelligence)||0;
|
|
let tempwisdom = parseInt(values.wisdom)||0;
|
|
let tempcharisma = parseInt(values.charisma)||0;
|
|
|
|
//temporary skill arbitrary modifier holders
|
|
let temparbitraryacademia = parseInt(values.academia)||0;
|
|
let temparbitraryacrobatics = parseInt(values.acrobatics)||0;
|
|
let temparbitraryanimalh = parseInt(values.animalh)||0;
|
|
let temparbitraryaquatic = parseInt(values.aquatic)||0;
|
|
let temparbitraryarcanel = parseInt(values.arcanel)||0;
|
|
let temparbitraryathletics = parseInt(values.athletics)||0;
|
|
let temparbitrarybluff = parseInt(values.bluff)||0;
|
|
let temparbitraryfieldcraft = parseInt(values.fieldcraft)||0;
|
|
let temparbitraryintimidate = parseInt(values.intimidate)||0;
|
|
let temparbitraryinvestigation = parseInt(values.investigation)||0;
|
|
let temparbitrarymedicine = parseInt(values.medicine)||0;
|
|
let temparbitrarymerchantl = parseInt(values.merchantl)||0;
|
|
let temparbitrarymilitaryl = parseInt(values.militaryl)||0;
|
|
let temparbitraryperception = parseInt(values.perception)||0;
|
|
let temparbitraryperform = parseInt(values.perform)||0;
|
|
let temparbitrarypolitique = parseInt(values.politique)||0;
|
|
let temparbitraryprofession = parseInt(values.profession)||0;
|
|
let temparbitraryreligion = parseInt(values.religion)||0;
|
|
let temparbitrarystealth = parseInt(values.stealth)||0;
|
|
let temparbitrarytechl = parseInt(values.techl)||0;
|
|
|
|
//temporary skill attribute type holders
|
|
let tempacademiaattrib = parseInt(values.abilityscoreacademia)||0;
|
|
let tempacrobaticsattrib = parseInt(values.abilityscoreacrobatics)||0;
|
|
let tempanimalhattrib = parseInt(values.abilityscoreanimalh)||0;
|
|
let tempaquaticattrib = parseInt(values.abilityscoreaquatic)||0;
|
|
let temparcanelattrib = parseInt(values.abilityscorearcanel)||0;
|
|
let tempathleticsattrib = parseInt(values.abilityscoreathletics)||0;
|
|
let tempbluffattrib = parseInt(values.abilityscorebluff)||0;
|
|
let tempfieldcraftattrib = parseInt(values.abilityscorefieldcraft)||0;
|
|
let tempintimidateattrib = parseInt(values.abilityscoreintimidate)||0;
|
|
let tempinvestigationattrib = parseInt(values.abilityscoreinvestigation)||0;
|
|
let tempmedicineattrib = parseInt(values.abilityscoremedicine)||0;
|
|
let tempmerchantlattrib = parseInt(values.abilityscoremerchantl)||0;
|
|
let tempmilitarylattrib = parseInt(values.abilityscoremilitaryl)||0;
|
|
let tempperceptionattrib = parseInt(values.abilityscoreperception)||0;
|
|
let tempperformattrib = parseInt(values.abilityscoreperform)||0;
|
|
let temppolitiqueattrib = parseInt(values.abilityscorepolitique)||0;
|
|
let tempprofessionattrib = parseInt(values.abilityscoreprofession)||0;
|
|
let tempreligionattrib = parseInt(values.abilityscorereligion)||0;
|
|
let tempstealthattrib = parseInt(values.abilityscorestealth)||0;
|
|
let temptechlattrib = parseInt(values.abilityscoretechl)||0;
|
|
|
|
//temporary skill attribute value holders
|
|
let academiamod = 0;
|
|
let acrobaticsmod = 0;
|
|
let animalhmod = 0;
|
|
let aquaticmod = 0;
|
|
let arcanelmod = 0;
|
|
let athleticsmod = 0;
|
|
let bluffmod = 0;
|
|
let fieldcraftmod = 0;
|
|
let intimidatemod = 0;
|
|
let investigationmod = 0;
|
|
let medicinemod = 0;
|
|
let merchantlmod = 0;
|
|
let militarylmod = 0;
|
|
let perceptionmod = 0;
|
|
let performmod = 0;
|
|
let politiquemod = 0;
|
|
let professionmod = 0;
|
|
let religionmod = 0;
|
|
let stealthmod = 0;
|
|
let techlmod = 0;
|
|
|
|
//temporary holders of skill prof levels
|
|
let tempacademiaproflevel = parseInt(values.proftypeacademia)||0;
|
|
let tempacrobaticsproflevel = parseInt(values.proftypeacrobatics)||0;
|
|
let tempanimalhproflevel = parseInt(values.proftypeanimalh)||0;
|
|
let tempaquaticproflevel = parseInt(values.proftypeaquatic)||0;
|
|
let temparcanelproflevel = parseInt(values.proftypearcanel)||0;
|
|
let tempathleticsproflevel = parseInt(values.proftypeathletics)||0;
|
|
let tempbluffproflevel = parseInt(values.proftypebluff)||0;
|
|
let tempfieldcraftproflevel = parseInt(values.proftypefieldcraft)||0;
|
|
let tempintimidateproflevel = parseInt(values.proftypeintimidate)||0;
|
|
let tempinvestigationproflevel = parseInt(values.proftypeinvestigation)||0;
|
|
let tempmedicineproflevel = parseInt(values.proftypemedicine)||0;
|
|
let tempmerchantlproflevel = parseInt(values.proftypemerchantl)||0;
|
|
let tempmilitarylproflevel = parseInt(values.proftypemilitaryl)||0;
|
|
let tempperceptionproflevel = parseInt(values.proftypeperception)||0;
|
|
let tempperformproflevel = parseInt(values.proftypeperform)||0;
|
|
let temppolitiqueproflevel = parseInt(values.proftypepolitique)||0;
|
|
let tempprofessionproflevel = parseInt(values.proftypeprofession)||0;
|
|
let tempreligionproflevel = parseInt(values.proftypereligion)||0;
|
|
let tempstealthproflevel = parseInt(values.proftypestealth)||0;
|
|
let temptechlproflevel = parseInt(values.proftypetechl)||0;
|
|
|
|
//temporary final skill level holders
|
|
let tempfinalacademiabonus = 0;
|
|
let tempfinalacrobaticsbonus = 0;
|
|
let tempfinalanimalhbonus = 0;
|
|
let tempfinalaquaticbonus = 0;
|
|
let tempfinalarcanelbonus = 0;
|
|
let tempfinalathleticsbonus = 0;
|
|
let tempfinalbluffbonus = 0;
|
|
let tempfinalfieldcraftbonus = 0;
|
|
let tempfinalintimidatebonus = 0;
|
|
let tempfinalinvestigationbonus = 0;
|
|
let tempfinalmedicinebonus = 0;
|
|
let tempfinalmerchantlbonus = 0;
|
|
let tempfinalmilitarylbonus = 0;
|
|
let tempfinalperceptionbonus = 0;
|
|
let tempfinalperformbonus = 0;
|
|
let tempfinalpolitiquebonus = 0;
|
|
let tempfinalprofessionbonus = 0;
|
|
let tempfinalreligionbonus = 0;
|
|
let tempfinalstealthbonus = 0;
|
|
let tempfinaltechlbonus = 0;
|
|
|
|
//Determining skill Attribute Modifiers
|
|
//academia
|
|
if (tempacademiaattrib === 0){
|
|
academiamod = tempstrength;
|
|
} else if (tempacademiaattrib === 1){
|
|
academiamod = tempdexterity;
|
|
} else if (tempacademiaattrib === 2){
|
|
academiamod = tempconstitution;
|
|
} else if (tempacademiaattrib === 3){
|
|
academiamod = tempintelligence;
|
|
} else if (tempacademiaattrib === 4){
|
|
academiamod = tempwisdom;
|
|
} else if (tempacademiaattrib === 5){
|
|
academiamod = tempcharisma;
|
|
} else{
|
|
academiamod = tempintelligence;
|
|
}
|
|
//Acrobatics
|
|
if (tempacrobaticsattrib === 0){
|
|
acrobaticsmod = tempstrength;
|
|
} else if (tempacrobaticsattrib === 1){
|
|
acrobaticsmod = tempdexterity;
|
|
} else if (tempacrobaticsattrib === 2){
|
|
acrobaticsmod = tempconstitution;
|
|
} else if (tempacrobaticsattrib === 3){
|
|
acrobaticsmod = tempintelligence;
|
|
} else if (tempacrobaticsattrib === 4){
|
|
acrobaticsmod = tempwisdom;
|
|
} else if (tempacrobaticsattrib === 5){
|
|
acrobaticsmod = tempcharisma;
|
|
} else{
|
|
acrobaticsmod = tempdexterity;
|
|
}
|
|
//animal husbandry
|
|
if (tempanimalhattrib === 0){
|
|
animalhmod = tempstrength;
|
|
} else if (tempanimalhattrib === 1){
|
|
animalhmod = tempdexterity;
|
|
} else if (tempanimalhattrib === 2){
|
|
animalhmod = tempconstitution;
|
|
} else if (tempanimalhattrib === 3){
|
|
animalhmod = tempintelligence;
|
|
} else if (tempanimalhattrib === 4){
|
|
animalhmod = tempwisdom;
|
|
} else if (tempanimalhattrib === 5){
|
|
animalhmod = tempcharisma;
|
|
} else{
|
|
animalhmod = tempwisdom;
|
|
}
|
|
//Aquatic
|
|
if (tempaquaticattrib === 0){
|
|
aquaticmod = tempstrength;
|
|
} else if (tempaquaticattrib === 1){
|
|
aquaticmod = tempdexterity;
|
|
} else if (tempaquaticattrib === 2){
|
|
aquaticmod = tempconstitution;
|
|
} else if (tempaquaticattrib === 3){
|
|
aquaticmod = tempintelligence;
|
|
} else if (tempaquaticattrib === 4){
|
|
aquaticmod = tempwisdom;
|
|
} else if (tempaquaticattrib === 5){
|
|
aquaticmod = tempcharisma;
|
|
} else{
|
|
aquaticmod = tempintelligence;
|
|
}
|
|
|
|
//Arcane Lore
|
|
if (temparcanelattrib === 0){
|
|
arcanelmod = tempstrength;
|
|
} else if (temparcanelattrib === 1){
|
|
arcanelmod = tempdexterity;
|
|
} else if (temparcanelattrib === 2){
|
|
arcanelmod = tempconstitution;
|
|
} else if (temparcanelattrib === 3){
|
|
arcanelmod = tempintelligence;
|
|
} else if (temparcanelattrib === 4){
|
|
arcanelmod = tempwisdom;
|
|
} else if (temparcanelattrib === 5){
|
|
arcanelmod = tempcharisma;
|
|
} else{
|
|
arcanelmod = tempintelligence;
|
|
}
|
|
//Athletics
|
|
if (tempathleticsattrib === 0){
|
|
athleticsmod = tempstrength;
|
|
} else if (tempathleticsattrib === 1){
|
|
athleticsmod = tempdexterity;
|
|
} else if (tempathleticsattrib === 2){
|
|
athleticsmod = tempconstitution;
|
|
} else if (tempathleticsattrib === 3){
|
|
athleticsmod = tempintelligence;
|
|
} else if (tempathleticsattrib === 4){
|
|
athleticsmod = tempwisdom;
|
|
} else if (tempathleticsattrib === 5){
|
|
athleticsmod = tempcharisma;
|
|
} else{
|
|
athleticsmod = tempstrength;
|
|
}
|
|
//Bluff
|
|
if (tempbluffattrib === 0){
|
|
bluffmod = tempstrength;
|
|
} else if (tempbluffattrib === 1){
|
|
bluffmod = tempdexterity;
|
|
} else if (tempbluffattrib === 2){
|
|
bluffmod = tempconstitution;
|
|
} else if (tempbluffattrib === 3){
|
|
bluffmod = tempintelligence;
|
|
} else if (tempbluffattrib === 4){
|
|
bluffmod = tempwisdom;
|
|
} else if (tempbluffattrib === 5){
|
|
bluffmod = tempcharisma;
|
|
} else{
|
|
bluffmod = tempstrength;
|
|
}
|
|
//Fieldcraft
|
|
if (tempfieldcraftattrib === 0){
|
|
fieldcraftmod = tempstrength;
|
|
} else if (tempfieldcraftattrib === 1){
|
|
fieldcraftmod = tempdexterity;
|
|
} else if (tempfieldcraftattrib === 2){
|
|
fieldcraftmod = tempconstitution;
|
|
} else if (tempfieldcraftattrib === 3){
|
|
fieldcraftmod = tempintelligence;
|
|
} else if (tempfieldcraftattrib === 4){
|
|
fieldcraftmod = tempwisdom;
|
|
} else if (tempfieldcraftattrib === 5){
|
|
fieldcraftmod = tempcharisma;
|
|
} else{
|
|
fieldcraftmod = tempwisdom;
|
|
}
|
|
//Intimidate
|
|
if (tempintimidateattrib === 0){
|
|
intimidatemod = tempstrength;
|
|
} else if (tempintimidateattrib === 1){
|
|
intimidatemod = tempdexterity;
|
|
} else if (tempintimidateattrib === 2){
|
|
intimidatemod = tempconstitution;
|
|
} else if (tempintimidateattrib === 3){
|
|
intimidatemod = tempintelligence;
|
|
} else if (tempintimidateattrib === 4){
|
|
intimidatemod = tempwisdom;
|
|
} else if (tempintimidateattrib === 5){
|
|
intimidatemod = tempcharisma;
|
|
} else{
|
|
intimidatemod = tempstrength;
|
|
}
|
|
//Investigation
|
|
if (tempinvestigationattrib === 0){
|
|
investigationmod = tempstrength;
|
|
} else if (tempinvestigationattrib === 1){
|
|
investigationmod = tempdexterity;
|
|
} else if (tempinvestigationattrib === 2){
|
|
investigationmod = tempconstitution;
|
|
} else if (tempinvestigationattrib === 3){
|
|
investigationmod = tempintelligence;
|
|
} else if (tempinvestigationattrib === 4){
|
|
investigationmod = tempwisdom;
|
|
} else if (tempinvestigationattrib === 5){
|
|
investigationmod = tempcharisma;
|
|
} else{
|
|
investigationmod = tempintelligence;
|
|
}
|
|
//Medicine
|
|
if (tempmedicineattrib === 0){
|
|
medicinemod = tempstrength;
|
|
} else if (tempmedicineattrib === 1){
|
|
medicinemod = tempdexterity;
|
|
} else if (tempmedicineattrib === 2){
|
|
medicinemod = tempconstitution;
|
|
} else if (tempmedicineattrib === 3){
|
|
medicinemod = tempintelligence;
|
|
} else if (tempmedicineattrib === 4){
|
|
medicinemod = tempwisdom;
|
|
} else if (tempmedicineattrib === 5){
|
|
medicinemod = tempcharisma;
|
|
} else{
|
|
medicinemod = tempwisdom;
|
|
}
|
|
//Merchant Lore
|
|
if (tempmerchantlattrib === 0){
|
|
merchantlmod = tempstrength;
|
|
} else if (tempmerchantlattrib === 1){
|
|
merchantlmod = tempdexterity;
|
|
} else if (tempmerchantlattrib === 2){
|
|
merchantlmod = tempconstitution;
|
|
} else if (tempmerchantlattrib === 3){
|
|
merchantlmod = tempintelligence;
|
|
} else if (tempmerchantlattrib === 4){
|
|
merchantlmod = tempwisdom;
|
|
} else if (tempmerchantlattrib === 5){
|
|
merchantlmod = tempcharisma;
|
|
} else{
|
|
merchantlmod = tempintelligence;
|
|
}
|
|
//Military Lore
|
|
if (tempmilitarylattrib === 0){
|
|
militarylmod = tempstrength;
|
|
} else if (tempmilitarylattrib === 1){
|
|
militarylmod = tempdexterity;
|
|
} else if (tempmilitarylattrib === 2){
|
|
militarylmod = tempconstitution;
|
|
} else if (tempmilitarylattrib === 3){
|
|
militarylmod = tempintelligence;
|
|
} else if (tempmilitarylattrib === 4){
|
|
militarylmod = tempwisdom;
|
|
} else if (tempmilitarylattrib === 5){
|
|
militarylmod = tempcharisma;
|
|
} else{
|
|
militarylmod = tempintelligence;
|
|
}
|
|
|
|
//Perception
|
|
if (tempperceptionattrib === 0){
|
|
perceptionmod = tempstrength;
|
|
} else if (tempperceptionattrib === 1){
|
|
perceptionmod = tempdexterity;
|
|
} else if (tempperceptionattrib === 2){
|
|
perceptionmod = tempconstitution;
|
|
} else if (tempperceptionattrib === 3){
|
|
perceptionmod = tempintelligence;
|
|
} else if (tempperceptionattrib === 4){
|
|
perceptionmod = tempwisdom;
|
|
} else if (tempperceptionattrib === 5){
|
|
perceptionmod = tempcharisma;
|
|
} else{
|
|
perceptionmod = tempwisdom;
|
|
}
|
|
|
|
//Perform
|
|
if (tempperformattrib === 0){
|
|
performmod = tempstrength;
|
|
} else if (tempperformattrib === 1){
|
|
performmod = tempdexterity;
|
|
} else if (tempperformattrib === 2){
|
|
performmod = tempconstitution;
|
|
} else if (tempperformattrib === 3){
|
|
performmod = tempintelligence;
|
|
} else if (tempperformattrib === 4){
|
|
performmod = tempwisdom;
|
|
} else if (tempperformattrib === 5){
|
|
performmod = tempcharisma;
|
|
} else{
|
|
performmod = tempcharisma;
|
|
}
|
|
|
|
//Profession
|
|
if (tempprofessionattrib === 0){
|
|
professionmod = tempstrength;
|
|
} else if (tempprofessionattrib === 1){
|
|
professionmod = tempdexterity;
|
|
} else if (tempprofessionattrib === 2){
|
|
professionmod = tempconstitution;
|
|
} else if (tempprofessionattrib === 3){
|
|
professionmod = tempintelligence;
|
|
} else if (tempprofessionattrib === 4){
|
|
professionmod = tempwisdom;
|
|
} else if (tempprofessionattrib === 5){
|
|
professionmod = tempcharisma;
|
|
} else{
|
|
professionmod = tempintelligence;
|
|
}
|
|
|
|
//Politique
|
|
if (temppolitiqueattrib === 0){
|
|
politiquemod = tempstrength;
|
|
} else if (temppolitiqueattrib === 1){
|
|
politiquemod = tempdexterity;
|
|
} else if (temppolitiqueattrib === 2){
|
|
politiquemod = tempconstitution;
|
|
} else if (temppolitiqueattrib === 3){
|
|
politiquemod = tempintelligence;
|
|
} else if (temppolitiqueattrib === 4){
|
|
politiquemod = tempwisdom;
|
|
} else if (temppolitiqueattrib === 5){
|
|
politiquemod = tempcharisma;
|
|
} else{
|
|
politiquemod = tempintelligence;
|
|
}
|
|
|
|
//Religion
|
|
if (tempreligionattrib === 0){
|
|
religionmod = tempstrength;
|
|
} else if (tempreligionattrib === 1){
|
|
religionmod = tempdexterity;
|
|
} else if (tempreligionattrib === 2){
|
|
religionmod = tempconstitution;
|
|
} else if (tempreligionattrib === 3){
|
|
religionmod = tempintelligence;
|
|
} else if (tempreligionattrib === 4){
|
|
religionmod = tempwisdom;
|
|
} else if (tempreligionattrib === 5){
|
|
religionmod = tempcharisma;
|
|
} else{
|
|
religionmod = tempwisdom;
|
|
}
|
|
|
|
//Stealth
|
|
if (tempstealthattrib === 0){
|
|
stealthmod = tempstrength;
|
|
} else if (tempstealthattrib === 1){
|
|
stealthmod = tempdexterity;
|
|
} else if (tempstealthattrib === 2){
|
|
stealthmod = tempconstitution;
|
|
} else if (tempstealthattrib === 3){
|
|
stealthmod = tempintelligence;
|
|
} else if (tempstealthattrib === 4){
|
|
stealthmod = tempwisdom;
|
|
} else if (tempstealthattrib === 5){
|
|
stealthmod = tempcharisma;
|
|
} else{
|
|
stealthmod = tempdexterity;
|
|
}
|
|
|
|
//Tech Lore
|
|
if (temptechlattrib === 0){
|
|
techlmod = tempstrength;
|
|
} else if (temptechlattrib === 1){
|
|
techlmod = tempdexterity;
|
|
} else if (temptechlattrib === 2){
|
|
techlmod = tempconstitution;
|
|
} else if (temptechlattrib === 3){
|
|
techlmod = tempintelligence;
|
|
} else if (temptechlattrib === 4){
|
|
techlmod = tempwisdom;
|
|
} else if (temptechlattrib === 5){
|
|
techlmod = tempcharisma;
|
|
} else{
|
|
techlmod = tempintelligence;
|
|
}
|
|
|
|
//Determining Skill Proficiency Modifiers + Arbitrary modifiers
|
|
|
|
//Academia
|
|
if (tempacademiaproflevel === 0){
|
|
tempfinalacademiabonus = academiamod + temparbitraryacademia;
|
|
} else if (tempacademiaproflevel === 1){
|
|
tempfinalacademiabonus = academiamod + temparbitraryacademia + skilledbonus;
|
|
} else if (tempacademiaproflevel === 2){
|
|
tempfinalacademiabonus = academiamod + temparbitraryacademia + professionalbonus;
|
|
} else if (tempacademiaproflevel === 3){
|
|
tempfinalacademiabonus = academiamod + temparbitraryacademia + exceptionalbonus;
|
|
} else {
|
|
tempfinalacademiabonus = academiamod + temparbitraryacademia;
|
|
}
|
|
|
|
//Acrobatics
|
|
if (tempacrobaticsproflevel === 0){
|
|
tempfinalacrobaticsbonus = acrobaticsmod + temparbitraryacrobatics;
|
|
} else if (tempacrobaticsproflevel === 1){
|
|
tempfinalacrobaticsbonus = acrobaticsmod + temparbitraryacrobatics + skilledbonus;
|
|
} else if (tempacrobaticsproflevel === 2){
|
|
tempfinalacrobaticsbonus = acrobaticsmod + temparbitraryacrobatics + professionalbonus;
|
|
} else if (tempacrobaticsproflevel === 3){
|
|
tempfinalacrobaticsbonus = acrobaticsmod + temparbitraryacrobatics + exceptionalbonus;
|
|
} else {
|
|
tempfinalacrobaticsbonus = acrobaticsmod + temparbitraryacrobatics;
|
|
}
|
|
|
|
//Animal Husbandry
|
|
if (tempanimalhproflevel === 0){
|
|
tempfinalanimalhbonus = animalhmod + temparbitraryanimalh;
|
|
} else if (tempanimalhproflevel === 1){
|
|
tempfinalanimalhbonus = animalhmod + temparbitraryanimalh + skilledbonus;
|
|
} else if (tempanimalhproflevel === 2){
|
|
tempfinalanimalhbonus = animalhmod + temparbitraryanimalh + professionalbonus;
|
|
} else if (tempanimalhproflevel === 3){
|
|
tempfinalanimalhbonus = animalhmod + temparbitraryanimalh + exceptionalbonus;
|
|
} else {
|
|
tempfinalanimalhbonus = animalhmod + temparbitraryanimalh;
|
|
}
|
|
|
|
//Aquatic
|
|
if (tempaquaticproflevel === 0){
|
|
tempfinalaquaticbonus = aquaticmod + temparbitraryaquatic;
|
|
} else if (tempaquaticproflevel === 1){
|
|
tempfinalaquaticbonus = aquaticmod + temparbitraryaquatic + skilledbonus;
|
|
} else if (tempaquaticproflevel === 2){
|
|
tempfinalaquaticbonus = aquaticmod + temparbitraryaquatic + professionalbonus;
|
|
} else if (tempaquaticproflevel === 3){
|
|
tempfinalaquaticbonus = aquaticmod + temparbitraryaquatic + exceptionalbonus;
|
|
} else {
|
|
tempfinalaquaticbonus = aquaticmod + temparbitraryaquatic;
|
|
}
|
|
|
|
//Arcane Lore
|
|
if (temparcanelproflevel === 0){
|
|
tempfinalarcanelbonus = arcanelmod + temparbitraryarcanel;
|
|
} else if (temparcanelproflevel === 1){
|
|
tempfinalarcanelbonus = arcanelmod + temparbitraryarcanel + skilledbonus;
|
|
} else if (temparcanelproflevel === 2){
|
|
tempfinalarcanelbonus = arcanelmod + temparbitraryarcanel + professionalbonus;
|
|
} else if (temparcanelproflevel === 3){
|
|
tempfinalarcanelbonus = arcanelmod + temparbitraryarcanel + exceptionalbonus;
|
|
} else {
|
|
tempfinalarcanelbonus = arcanelmod + temparbitraryarcanel;
|
|
}
|
|
|
|
//Athletics
|
|
if (tempathleticsproflevel === 0){
|
|
tempfinalathleticsbonus = athleticsmod + temparbitraryathletics;
|
|
} else if (tempathleticsproflevel === 1){
|
|
tempfinalathleticsbonus = athleticsmod + temparbitraryathletics + skilledbonus;
|
|
} else if (tempathleticsproflevel === 2){
|
|
tempfinalathleticsbonus = athleticsmod + temparbitraryathletics + professionalbonus;
|
|
} else if (tempathleticsproflevel === 3){
|
|
tempfinalathleticsbonus = athleticsmod + temparbitraryathletics + exceptionalbonus;
|
|
} else {
|
|
tempfinalathleticsbonus = athleticsmod + temparbitraryathletics;
|
|
}
|
|
|
|
//Bluff
|
|
if (tempbluffproflevel === 0){
|
|
tempfinalbluffbonus = bluffmod + temparbitrarybluff;
|
|
} else if (tempbluffproflevel === 1){
|
|
tempfinalbluffbonus = bluffmod + temparbitrarybluff + skilledbonus;
|
|
} else if (tempbluffproflevel === 2){
|
|
tempfinalbluffbonus = bluffmod + temparbitrarybluff + professionalbonus;
|
|
} else if (tempbluffproflevel === 3){
|
|
tempfinalbluffbonus = bluffmod + temparbitrarybluff + exceptionalbonus;
|
|
} else {
|
|
tempfinalbluffbonus = bluffmod + temparbitrarybluff;
|
|
}
|
|
|
|
//Fieldcraft
|
|
if (tempfieldcraftproflevel === 0){
|
|
tempfinalfieldcraftbonus = fieldcraftmod + temparbitraryfieldcraft;
|
|
} else if (tempfieldcraftproflevel === 1){
|
|
tempfinalfieldcraftbonus = fieldcraftmod + temparbitraryfieldcraft + skilledbonus;
|
|
} else if (tempfieldcraftproflevel === 2){
|
|
tempfinalfieldcraftbonus = fieldcraftmod + temparbitraryfieldcraft + professionalbonus;
|
|
} else if (tempfieldcraftproflevel === 3){
|
|
tempfinalfieldcraftbonus = fieldcraftmod + temparbitraryfieldcraft + exceptionalbonus;
|
|
} else {
|
|
tempfinalfieldcraftbonus = fieldcraftmod + temparbitraryfieldcraft;
|
|
}
|
|
|
|
//Intimidate
|
|
if (tempintimidateproflevel === 0){
|
|
tempfinalintimidatebonus = intimidatemod + temparbitraryintimidate;
|
|
} else if (tempintimidateproflevel === 1){
|
|
tempfinalintimidatebonus = intimidatemod + temparbitraryintimidate + skilledbonus;
|
|
} else if (tempintimidateproflevel === 2){
|
|
tempfinalintimidatebonus = intimidatemod + temparbitraryintimidate + professionalbonus;
|
|
} else if (tempintimidateproflevel === 3){
|
|
tempfinalintimidatebonus = intimidatemod + temparbitraryintimidate + exceptionalbonus;
|
|
} else {
|
|
tempfinalintimidatebonus = intimidatemod + temparbitraryintimidate;
|
|
}
|
|
|
|
//Investigation
|
|
if (tempinvestigationproflevel === 0){
|
|
tempfinalinvestigationbonus = investigationmod + temparbitraryinvestigation;
|
|
} else if (tempinvestigationproflevel === 1){
|
|
tempfinalinvestigationbonus = investigationmod + temparbitraryinvestigation + skilledbonus;
|
|
} else if (tempinvestigationproflevel === 2){
|
|
tempfinalinvestigationbonus = investigationmod + temparbitraryinvestigation + professionalbonus;
|
|
} else if (tempinvestigationproflevel === 3){
|
|
tempfinalinvestigationbonus = investigationmod + temparbitraryinvestigation + exceptionalbonus;
|
|
} else {
|
|
tempfinalinvestigationbonus = investigationmod + temparbitraryinvestigation;
|
|
}
|
|
|
|
//Medicine
|
|
if (tempmedicineproflevel === 0){
|
|
tempfinalmedicinebonus = medicinemod + temparbitrarymedicine;
|
|
} else if (tempmedicineproflevel === 1){
|
|
tempfinalmedicinebonus = medicinemod + temparbitrarymedicine + skilledbonus;
|
|
} else if (tempmedicineproflevel === 2){
|
|
tempfinalmedicinebonus = medicinemod + temparbitrarymedicine + professionalbonus;
|
|
} else if (tempmedicineproflevel === 3){
|
|
tempfinalmedicinebonus = medicinemod + temparbitrarymedicine + exceptionalbonus;
|
|
} else {
|
|
tempfinalmedicinebonus = medicinemod + temparbitrarymedicine;
|
|
}
|
|
|
|
//Merchant Lore
|
|
if (tempmerchantlproflevel === 0){
|
|
tempfinalmerchantlbonus = merchantlmod + temparbitrarymerchantl;
|
|
} else if (tempmerchantlproflevel === 1){
|
|
tempfinalmerchantlbonus = merchantlmod + temparbitrarymerchantl + skilledbonus;
|
|
} else if (tempmerchantlproflevel === 2){
|
|
tempfinalmerchantlbonus = merchantlmod + temparbitrarymerchantl + professionalbonus;
|
|
} else if (tempmerchantlproflevel === 3){
|
|
tempfinalmerchantlbonus = merchantlmod + temparbitrarymerchantl + exceptionalbonus;
|
|
} else {
|
|
tempfinalmerchantlbonus = merchantlmod + temparbitrarymerchantl;
|
|
}
|
|
|
|
//Military Lore
|
|
if (tempmilitarylproflevel === 0){
|
|
tempfinalmilitarylbonus = militarylmod + temparbitrarymilitaryl;
|
|
} else if (tempmilitarylproflevel === 1){
|
|
tempfinalmilitarylbonus = militarylmod + temparbitrarymilitaryl + skilledbonus;
|
|
} else if (tempmilitarylproflevel === 2){
|
|
tempfinalmilitarylbonus = militarylmod + temparbitrarymilitaryl + professionalbonus;
|
|
} else if (tempmilitarylproflevel === 3){
|
|
tempfinalmilitarylbonus = militarylmod + temparbitrarymilitaryl + exceptionalbonus;
|
|
} else {
|
|
tempfinalmilitarylbonus = militarylmod + temparbitrarymilitaryl;
|
|
}
|
|
|
|
//Perception
|
|
if (tempperceptionproflevel === 0){
|
|
tempfinalperceptionbonus = perceptionmod + temparbitraryperception;
|
|
} else if (tempperceptionproflevel === 1){
|
|
tempfinalperceptionbonus = perceptionmod + temparbitraryperception + skilledbonus;
|
|
} else if (tempperceptionproflevel === 2){
|
|
tempfinalperceptionbonus = perceptionmod + temparbitraryperception + professionalbonus;
|
|
} else if (tempperceptionproflevel === 3){
|
|
tempfinalperceptionbonus = perceptionmod + temparbitraryperception + exceptionalbonus;
|
|
} else {
|
|
tempfinalperceptionbonus = perceptionmod + temparbitraryperception;
|
|
}
|
|
|
|
//Perform
|
|
if (tempperformproflevel === 0){
|
|
tempfinalperformbonus = performmod + temparbitraryperform;
|
|
} else if (tempperformproflevel === 1){
|
|
tempfinalperformbonus = performmod + temparbitraryperform + skilledbonus;
|
|
} else if (tempperformproflevel === 2){
|
|
tempfinalperformbonus = performmod + temparbitraryperform + professionalbonus;
|
|
} else if (tempperformproflevel === 3){
|
|
tempfinalperformbonus = performmod + temparbitraryperform + exceptionalbonus;
|
|
} else {
|
|
tempfinalperformbonus = performmod + temparbitraryperform;
|
|
}
|
|
|
|
//Profession
|
|
if (tempprofessionproflevel === 0){
|
|
tempfinalprofessionbonus = professionmod + temparbitraryprofession;
|
|
} else if (tempprofessionproflevel === 1){
|
|
tempfinalprofessionbonus = professionmod + temparbitraryprofession + skilledbonus;
|
|
} else if (tempprofessionproflevel === 2){
|
|
tempfinalprofessionbonus = professionmod + temparbitraryprofession + professionalbonus;
|
|
} else if (tempprofessionproflevel === 3){
|
|
tempfinalprofessionbonus = professionmod + temparbitraryprofession + exceptionalbonus;
|
|
} else {
|
|
tempfinalprofessionbonus = professionmod + temparbitraryprofession;
|
|
}
|
|
|
|
//Politique
|
|
if (temppolitiqueproflevel === 0){
|
|
tempfinalpolitiquebonus = politiquemod + temparbitrarypolitique;
|
|
} else if (temppolitiqueproflevel === 1){
|
|
tempfinalpolitiquebonus = politiquemod + temparbitrarypolitique + skilledbonus;
|
|
} else if (temppolitiqueproflevel === 2){
|
|
tempfinalpolitiquebonus = politiquemod + temparbitrarypolitique + professionalbonus;
|
|
} else if (temppolitiqueproflevel === 3){
|
|
tempfinalpolitiquebonus = politiquemod + temparbitrarypolitique + exceptionalbonus;
|
|
} else {
|
|
tempfinalpolitiquebonus = politiquemod + temparbitrarypolitique;
|
|
}
|
|
|
|
//religion
|
|
if (tempreligionproflevel === 0){
|
|
tempfinalreligionbonus = religionmod + temparbitraryreligion;
|
|
} else if (tempreligionproflevel === 1){
|
|
tempfinalreligionbonus = religionmod + temparbitraryreligion + skilledbonus;
|
|
} else if (tempreligionproflevel === 2){
|
|
tempfinalreligionbonus = religionmod + temparbitraryreligion + professionalbonus;
|
|
} else if (tempreligionproflevel === 3){
|
|
tempfinalreligionbonus = religionmod + temparbitraryreligion + exceptionalbonus;
|
|
} else {
|
|
tempfinalreligionbonus = religionmod + temparbitraryreligion;
|
|
}
|
|
|
|
//Stealth
|
|
if (tempstealthproflevel === 0){
|
|
tempfinalstealthbonus = stealthmod + temparbitrarystealth;
|
|
} else if (tempstealthproflevel === 1){
|
|
tempfinalstealthbonus = stealthmod + temparbitrarystealth + skilledbonus;
|
|
} else if (tempstealthproflevel === 2){
|
|
tempfinalstealthbonus = stealthmod + temparbitrarystealth + professionalbonus;
|
|
} else if (tempstealthproflevel === 3){
|
|
tempfinalstealthbonus = stealthmod + temparbitrarystealth + exceptionalbonus;
|
|
} else {
|
|
tempfinalstealthbonus = stealthmod + temparbitrarystealth;
|
|
}
|
|
|
|
//Tech Lore
|
|
if (temptechlproflevel === 0){
|
|
tempfinaltechlbonus = techlmod + temparbitrarytechl;
|
|
} else if (temptechlproflevel === 1){
|
|
tempfinaltechlbonus = techlmod + temparbitrarytechl + skilledbonus;
|
|
} else if (temptechlproflevel === 2){
|
|
tempfinaltechlbonus = techlmod + temparbitrarytechl + professionalbonus;
|
|
} else if (temptechlproflevel === 3){
|
|
tempfinaltechlbonus = techlmod + temparbitrarytechl + exceptionalbonus;
|
|
} else {
|
|
tempfinaltechlbonus = techlmod + temparbitrarytechl;
|
|
}
|
|
|
|
setAttrs({
|
|
//setting final skill values
|
|
finalacademiabonus: tempfinalacademiabonus,
|
|
finalacrobaticsbonus: tempfinalacrobaticsbonus,
|
|
finalanimalhbonus: tempfinalanimalhbonus,
|
|
finalaquaticbonus: tempfinalaquaticbonus,
|
|
finalarcanelbonus: tempfinalarcanelbonus,
|
|
finalathleticsbonus: tempfinalathleticsbonus,
|
|
finalbluffbonus: tempfinalbluffbonus,
|
|
finalfieldcraftbonus: tempfinalfieldcraftbonus,
|
|
finalintimidatebonus: tempfinalintimidatebonus,
|
|
finalinvestigationbonus: tempfinalinvestigationbonus,
|
|
finalmedicinebonus: tempfinalmedicinebonus,
|
|
finalmerchantlbonus: tempfinalmerchantlbonus,
|
|
finalmilitarylbonus: tempfinalmilitarylbonus,
|
|
finalperceptionbonus: tempfinalperceptionbonus,
|
|
finalperformbonus: tempfinalperformbonus,
|
|
finalpolitiquebonus: tempfinalpolitiquebonus,
|
|
finalprofessionbonus: tempfinalprofessionbonus,
|
|
finalreligionbonus: tempfinalreligionbonus,
|
|
finalstealthbonus: tempfinalstealthbonus,
|
|
finaltechlbonus: tempfinaltechlbonus
|
|
});
|
|
});
|
|
});
|
|
//Defenses Section
|
|
on("sheet:opened change:characterlevel change:dexterity change:proftypedefense change:saveproffort change:fortsave change:saveprofref change:refsave change:saveprofwill change:willsave change:armoracbonus change:armormaxdexbonus change:armorthreshold change:armormovementpenalty change:armorname change:armorclassmod change:thresholdmod change:unawarearmorclassmod", function(){
|
|
getAttrs(["characterlevel","proftypedefense","strength","dexterity","constitution","intelligence","wisdom","charisma","proftypespellspri","proftypespellssec","spellcastingattribpri","armoracbonus","armormaxdexbonus","armorthreshold","armorclassmod","thresholdmod","unawarearmorclassmod","spellcastingdcpri","spellcastingattribsec","spellcastingdcsec","saveproffort","fortsave","saveprofref","refsave","saveprofwill","willsave","proftypeacademia","abilityscoreacademia","academia","proftypeacrobatics","abilityscoreacrobatics","acrobatics","proftypeanimalh","abilityscoreanimalh","animalh","proftypeaquatic","abilityscoreaquatic","aquatic","proftypearcanel","abilityscorearcanel","arcanel","proftypeathletics","abilityscoreathletics","athletics","proftypebluff","abilityscorebluff","bluff","proftypefieldcraft","abilityscorefieldcraft","fieldcraft","proftypeintimidate","abilityscoreintimidate","intimidate","proftypeinvestigation","abilityscoreinvestigation","investigation","proftypemedicine","abilityscoremedicine","medicine","proftypemerchantl","abilityscoremerchantl","merchantl","proftypemilitaryl","abilityscoremilitaryl","militaryl","proftypeperception","abilityscoreperception","perception","proftypeperform","abilityscoreperform","profession","proftypeprofession","abilityscoreprofession","profession","proftypepolitique","abilityscorepolitique","politique","proftypereligion","abilityscorereligion","religion","proftypestealth","abilityscorestealth","stealth","proftypetechl","abilityscoretechl","techl"], function(values) {
|
|
|
|
//Variables
|
|
let tempcharacterlevel = parseInt(values.characterlevel)||0;
|
|
|
|
//proficiency level holders
|
|
let skilledbonus = tempcharacterlevel;
|
|
let professionalbonus = tempcharacterlevel + 3;
|
|
let exceptionalbonus = tempcharacterlevel + 6;
|
|
|
|
//modifier holders
|
|
let tempstrength = parseInt(values.strength)||0;
|
|
let tempdexterity = parseInt(values.dexterity)||0;
|
|
let tempconstitution = parseInt(values.constitution)||0;
|
|
let tempintelligence = parseInt(values.intelligence)||0;
|
|
let tempwisdom = parseInt(values.wisdom)||0;
|
|
let tempcharisma = parseInt(values.charisma)||0;
|
|
|
|
//temporary holders of save proficiencies
|
|
let tempfortprof = parseInt(values.saveproffort)||0;
|
|
let temprefprof = parseInt(values.saveprofref)||0;
|
|
let tempwillprof = parseInt(values.saveprofwill)||0;
|
|
|
|
//temporary holder of AC prof
|
|
let tempdefenseprof = parseInt(values.proftypedefense)||0;
|
|
|
|
//temporary holder of ac and Threshold
|
|
let tempactotal = parseInt(values.armorclassmod)||0;
|
|
let temparmorac = parseInt(values.armoracbonus)||0;
|
|
let tempthreshold = parseInt(values.thresholdmod)||0;
|
|
let temparmorthreshold = parseInt(values.armorthreshold)||0;
|
|
let tempunaware = parseInt(values.unawarearmorclassmod)||0;
|
|
|
|
//temporary holders of max dex and capped dex value
|
|
let tempmaxdex = parseInt(values.armormaxdexbonus)||0;
|
|
let tempcappeddex = 0;
|
|
|
|
//temporary holders of arbitrary save bonuses
|
|
let temparbitraryfortbonus = parseInt(values.fortsave)||0;
|
|
let temparbitraryrefbonus = parseInt(values.refsave)||0;
|
|
let temparbitrarywillbonus = parseInt(values.willsave)||0;
|
|
|
|
//temporary holders of final save values
|
|
let tempfinalfortsave = 0;
|
|
let tempfinalrefsave = 0;
|
|
let tempfinalwillsave = 0;
|
|
//temporary holders of final defense values
|
|
let tempfinalactotal = 0;
|
|
let tempfinalthreshold = 0;
|
|
let tempfinalunaware = 0;
|
|
|
|
//Evaluate larger threshold and set value
|
|
if (tempthreshold>=temparmorthreshold){
|
|
tempfinalthreshold = tempthreshold;
|
|
} else {
|
|
tempfinalthreshold = temparmorthreshold;
|
|
}
|
|
|
|
|
|
//Check max dex
|
|
if (tempdexterity>=tempmaxdex){
|
|
tempcappeddex = tempmaxdex;
|
|
} else {
|
|
tempcappeddex = tempdexterity;
|
|
}
|
|
|
|
//Do Defenses
|
|
if (tempdefenseprof === 0){
|
|
tempfinalactotal = 10 + tempcappeddex + tempactotal + temparmorac;
|
|
if (tempfinalactotal <= 15 + tempunaware){
|
|
tempfinalunaware = tempfinalactotal;
|
|
} else {
|
|
tempfinalunaware = 15 + tempunaware;
|
|
}
|
|
} else if (tempdefenseprof === 1){
|
|
tempfinalactotal = 10 + tempcappeddex + tempactotal + temparmorac + skilledbonus;
|
|
if (tempfinalactotal <= 15 + tempunaware){
|
|
tempfinalunaware = tempfinalactotal;
|
|
} else {
|
|
tempfinalunaware = 15 + tempunaware;
|
|
}
|
|
} else if (tempdefenseprof === 2){
|
|
tempfinalactotal = 10 + tempcappeddex + tempactotal + temparmorac + professionalbonus;
|
|
if (tempfinalactotal <= 15 + tempunaware){
|
|
tempfinalunaware = tempfinalactotal;
|
|
} else {
|
|
tempfinalunaware = 15 + tempunaware;
|
|
}
|
|
} else if (tempdefenseprof === 3){
|
|
tempfinalactotal = 10 + tempcappeddex + tempactotal + temparmorac + exceptionalbonus;
|
|
if (tempfinalactotal <= 15 + tempunaware){
|
|
tempfinalunaware = tempfinalactotal;
|
|
} else {
|
|
tempfinalunaware = 15 + tempunaware;
|
|
}
|
|
} else {
|
|
tempfinalactotal = 10 + tempcappeddex + tempactotal + temparmorac;
|
|
if (tempfinalactotal <= 15 + tempunaware){
|
|
tempfinalunaware = tempfinalactotal;
|
|
} else {
|
|
tempfinalunaware = 15 + tempunaware;
|
|
}
|
|
}
|
|
|
|
|
|
//Do fort save
|
|
if (tempfortprof === 0){
|
|
tempfinalfortsave = tempconstitution + temparbitraryfortbonus;
|
|
} else if (tempfortprof === 1){
|
|
tempfinalfortsave = tempconstitution + temparbitraryfortbonus + skilledbonus;
|
|
} else if (tempfortprof === 2){
|
|
tempfinalfortsave = tempconstitution + temparbitraryfortbonus + professionalbonus;
|
|
} else if (tempfortprof === 3){
|
|
tempfinalfortsave = tempconstitution + temparbitraryfortbonus + exceptionalbonus;
|
|
} else {
|
|
tempfinalfortsave = tempconstitution + temparbitraryfortbonus;
|
|
}
|
|
//Do ref save
|
|
if (temprefprof === 0){
|
|
tempfinalrefsave = tempdexterity + temparbitraryrefbonus;
|
|
} else if (temprefprof === 1){
|
|
tempfinalrefsave = tempdexterity + temparbitraryrefbonus + skilledbonus;
|
|
} else if (temprefprof === 2){
|
|
tempfinalrefsave = tempdexterity + temparbitraryrefbonus + professionalbonus;
|
|
} else if (temprefprof === 3){
|
|
tempfinalrefsave = tempdexterity + temparbitraryrefbonus + exceptionalbonus;
|
|
} else{
|
|
tempfinalrefsave = tempdexterity + temparbitraryrefbonus;
|
|
}
|
|
|
|
//Do will save
|
|
if (tempwillprof === 0){
|
|
tempfinalwillsave = tempwisdom + temparbitrarywillbonus;
|
|
} else if (tempwillprof === 1){
|
|
tempfinalwillsave = tempwisdom + temparbitrarywillbonus + skilledbonus;
|
|
} else if (tempwillprof === 2){
|
|
tempfinalwillsave = tempwisdom + temparbitrarywillbonus + professionalbonus;
|
|
} else if (tempwillprof === 3){
|
|
tempfinalwillsave = tempwisdom + temparbitrarywillbonus + exceptionalbonus;
|
|
} else {
|
|
tempfinalwillsave = tempwisdom + temparbitrarywillbonus;
|
|
}
|
|
|
|
setAttrs({
|
|
//threshold
|
|
finalthreshold: tempfinalthreshold,
|
|
//ac totals
|
|
finalunawarearmorclass: tempfinalunaware,
|
|
finalactotal: tempfinalactotal,
|
|
|
|
//saving throws
|
|
finalfortsave: tempfinalfortsave,
|
|
finalrefsave: tempfinalrefsave,
|
|
finalwillsave: tempfinalwillsave
|
|
|
|
});
|
|
|
|
});
|
|
});
|
|
</script> |