Files
roll20-character-sheets/ADnD_1E/1ESheet.html
T
2022-03-10 23:24:00 -08:00

1657 lines
108 KiB
HTML

<div class="sheet-useBackground">
<!--background hidden inputs-->
<input type="checkbox" class="sheet-useBackground" style="display:none;" name="attr_background" value="1" checked />
<input type="checkbox" class="sheet-useBackground" style="display:none;" name="attr_background" value="2" />
<input type="checkbox" class="sheet-useBackground" style="display:none;" name="attr_background" value="3" />
<input type="checkbox" class="sheet-useBackground" style="display:none;" name="attr_background" value="4" />
<div class="sheet-background">
<div class="sheet-wrapper">
<span class="sheet-announcements-title">Announcements</span>
<input type="checkbox" class="sheet-sect-show" name="attr_toggle_announcements" value="1" style="width: 135px; margin: 0 -20px 0 -110px;" checked /><span></span>
<div class="sheet-sect sheet-announcements">
<h4>Important Sheet Announcements v.<input name="attr_sheet_version" type="text" value="0" class="sheet-version" readonly /></h4>
<ul>
3/10/22'
<li>Work has continued on a revised/updated version of the 1e sheet. Please visit the sheet thread on the roll20 forums for more info. <button type="roll" class="sheet-button-url" value="https://app.roll20.net/forum/post/10354613/ad-and-d-1e-update-part-2">Current AD&D1e sheet thread on Roll20.</button><br />
Beta test game:<button type="roll" class="sheet-button-url" value="https://app.roll20.net/join/731454/6RYNIQ">Join link</button><br />
Please feel free to give feedback/suggestions.</li>
<li>Added a little help for dark mode.</li>
<br />
<li>
<b>Important Info - </b>As of the 1.58 update, <b>ALL</b> repeating attributes have now been updated/renamed.<br /><br />
In advance of updating the 1e sheet to bring it inline with Roll20's recommended
<button type="roll" class="sheet-button-url" value="https://wiki.roll20.net/Building_Character_Sheets#Best_Practices">"Best Practices"</button>
as well as adding some additional quality of life improvements (monster sheet, localization/translations, additional auto-calculations, tabbed layout, and more...), ALL repeating attributes have been renamed for consistency and to prevent possible attribute naming conflicts.<br /><br />
Existing attribute data has been copied over to the new repeating attributes. The migration of data has been handled automatically without losing any sheet functionality. The vast majority of sheet users should be unaffected by this change. <br /><br />
That said;<br /><br />
<b>any existing, "off-sheet" macros (token/ability and/or collection macros) that use the old repeating attribute names will no longer function properly and will produce a chat error: "no attribute found" until they are manually edited to use the new repeating names.(see new attribute name examples below)</b> While I can automatically migrate attributes through a sheet update, I cannot update a user created custom macros... I apologize for any inconvenience this may cause some of you.<br /><br />
Repeating name change examples;<br /><br />
old attribute name: @{repeating_weapon_$0_name}<br />
new attribute name: @{repeating_weapon_$0_<b>weapon</b>_name}<br /><br />
old attribute name: @{repeating_equipment_$0_name}<br />
new attribute name: @{repeating_equipment_$0_<b>equipment</b>_name}<br /><br />
old attribute name: @{repeating_ability_$0_name}<br />
new attribute name: @{repeating_ability_$0_<b>ability</b>_name}<br /><br />
old attribute name: @{repeating_nonweaponproficiencies_$0_name}<br />
new attribute name: @{repeating_nonweaponproficiencies_$0_<b>nwp</b>_name}<br /><br />
old attribute name: @{repeating_spells_$0_name}<br />
new attribute name: @{repeating_spells_$0_<b>spell</b>_name}<br /><br />
This subtle but important difference ensures that the sheet uses <i>unique</i> attribute names in order to prevent any issues with sheetworker calculations, macros, API scripts, and/or Roll20 features. This naming schema applies to all repeating sections (repeating_weapon, repeating_equipment, repeating_ability, repeating_nonweaponproficiencies, and repeating_spells). FYI: hovering over a field on the sheet will show any given attribute's name.<br /><br />
More details about this update as well as upcoming updates can be found on the<br />
<button type="roll" class="sheet-button-url" value="https://app.roll20.net/forum/post/10354613/ad-and-d-1e-update-part-2">Current AD&D1e sheet thread.</button><br />
<button type="roll" class="sheet-button-url" value="https://app.roll20.net/forum/post/8460127/ad-and-d-1e-update">Old AD&D1e sheet thread discussions.</button><br /><br />
A "beta" game has been made available for testing the latest updates prior to going live as well;
<button type="roll" class="sheet-button-url" value="https://app.roll20.net/join/731454/6RYNIQ">Join link</button><br />
Feel free to import characters and review the latest changes. Please report any bugs and/or suggestions to the 1e discussion thread linked above.<br /><br />
</li>
<li>Added a couple new background options.(Goldenrod and Moldvay)</li>
</ul>
</div>
<div class="sheet-center sheet-logo-box sheet-normal-mode" style="padding-top:10px;">
<img src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png" />
</div>
<div class="sheet-center sheet-logo-box sheet-dark-mode" style="padding-top:10px;">
<img src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo_inverted.png" />
</div>
<div class="sheet-personal_attributes" style="margin:-40px 0 10px 0;">
<div class="sheet-header">PERSONAL ATTRIBUTES</div>
<input type="checkbox" class="sheet-sect-show" title="@{personal_attributes-info-show}" name="attr_personal_attributes-info-show" value="1" style="width: 230px; margin: 0 -20px 0 -200px;" checked="checked" /><span></span>
<table class="sheet-sect">
<tr>
<td>
<table>
<tr>
<td class="sheet-right">Name:</td>
<td colspan="3"><input type="text" class="sheet-input-large" name="attr_character_name" title="@{character_name}" placeholder="Character Name" /></td>
</tr>
<tr>
<td class="sheet-right">Alignment:</td>
<td colspan="3"><input type="text" class="sheet-input-large" name="attr_alignment" title="@{alignment}" placeholder="Description" /></td>
</tr>
<tr>
<td class="sheet-right">Class 1:</td>
<td><input type="text" class="sheet-input-large" name="attr_class" title="@{class}" placeholder="Class" /></td>
<td class="sheet-right">Lvl:</td>
<td><input type="text" class="sheet-input-small" name="attr_level" title="@{level}" value="0" /></td>
</tr>
<tr>
<td class="sheet-right">Class 2:</td>
<td><input type="text" class="sheet-input-large" name="attr_secondclass" title="@{secondclass}" placeholder="2nd class" /></td>
<td class="sheet-right">Lvl:</td>
<td><input type="text" class="sheet-input-small" name="attr_level_2" title="@{level_2}" value="0" /></td>
</tr>
<tr>
<td class="sheet-right">Class 3:</td>
<td><input type="text" class="sheet-input-large" name="attr_thirdclass" title="@{thirdclass}" placeholder="3rd class" /></td>
<td class="sheet-right">Lvl:</td>
<td><input type="text" class="sheet-input-small" name="attr_level_3" title="@{level_3}" value="0" /></td>
</tr>
</table>
</td>
<td>
<table style="margin-top:20px;">
<tr>
<td class="sheet-right sheet-text-large" style="padding:10px 5px 10px 40px;">HP:</td>
<td><input type="text" class="sheet-box" name="attr_HitPoints" title="@{HitPoints}" value="0" /></td>
<td></td>
<td colspan="3" style="min-width: 14em; text-align: center;">
<span class="sheet-right sheet-text-large" style="padding: 10px 5px 10px 12px;">AC:</span>
<input type="text" class="sheet-box" name="attr_ArmorClass" title="@{ArmorClass}" value="0" /></td>
</tr>
<tr>
<td class="sheet-right">HP Max:</td>
<td><input type="text" class="sheet-input-small" name="attr_hitpoints_max" title="@{hitpoints|max}" value="0" /></td>
<td class="sheet-right">Armor:</td>
<td colspan="3"><input type="text" class="sheet-input-large" name="attr_armortype" title="@{armortype}" style="width:100%;" placeholder="Description" /></td>
</tr>
<tr>
<td class="sheet-right">Hit Dice:</td>
<td><input type="text" class="sheet-input-small" name="attr_hitdice" title="@{hitdice}" value="1" /></td>
<td class="sheet-right">Shield:</td>
<td colspan="3"><input type="text" class="sheet-input-small" name="attr_armorshield" title="@{armorshield}" style="width:100%;" placeholder="Description" /></td>
</tr>
<tr>
<td></td>
<td></td>
<td class="sheet-right">Wt:</td>
<td><input type="text" class="sheet-input-small" name="attr_armor_weight" title="@{armor_weight}" value="0" /></td>
<td class="sheet-right">Cost:</td>
<td><input type="text" class="sheet-input-small" name="attr_armor_cost" title="@{armor_cost}" value="0" /></td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td class="sheet-right">Race:</td>
<td><input type="text" class="sheet-input-large" name="attr_race" title="@{race}" placeholder="Description" /></td>
<td class="sheet-right">XP:</td>
<td><input type="text" class="sheet-input-medium" name="attr_xp" title="@{xp}" value="0" /></td>
</tr>
<tr>
<td class="sheet-right">Deity:</td>
<td><input type="text" class="sheet-input-large" name="attr_deity" title="@{deity}" placeholder="Description" /></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="sheet-right">Gender:</td>
<td><input type="text" class="sheet-input-medium" name="attr_gender" title="@{gender}" placeholder="N/A" /></td>
<td class="sheet-right">Age:</td>
<td><input type="text" class="sheet-input-medium" name="attr_age" title="@{age}" value="0" /></td>
</tr>
<tr>
<td class="sheet-right">Ht:</td>
<td><input type="text" class="sheet-input-medium" name="attr_height" title="@{height}" value="0" /></td>
<td class="sheet-right">Wt:</td>
<td><input type="text" class="sheet-input-medium" name="attr_weight" title="@{weight}" value="0" /></td>
</tr>
<tr>
<td class="sheet-right">Eyes:</td>
<td><input type="text" class="sheet-input-medium" name="attr_eyes" title="@{eyes}" placeholder="Color" /></td>
<td class="sheet-right">Hair:</td>
<td><input type="text" class="sheet-input-medium" name="attr_hair" title="@{hair}" placeholder="Color" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" style="white-space: nowrap;">Languages:
<input type="text" name="attr_languages" placeholder="languages known" style="width: 87%;">
</td>
</tr>
</table>
</div>
<div class="sheet-abilities">
<div class="sheet-header">ABILITIES</div>
<input type="checkbox" class="sheet-sect-show" title="@{abilities-info-show}" name="attr_abilities-info-show" value="1" style="width: 115px; margin: 0 -20px 0 -85px;" checked="checked" /><span></span>
<table class="sheet-sect">
<tr>
<td class="sheet-center"><span class="sheet-text-large">STR</span></td>
<td><input type="text" class="sheet-input-small" name="attr_strength" title="@{strength}" value="10" />
(<input type="text" name="attr_ExceptionalStrength" title="@{ExceptionalStrength}" value="0" min="0" max="100" style="width:2.5em;">)</td>
<td class="sheet-right">To Hit:</td>
<td><input type="text" class="sheet-input-small" name="attr_meleebonus" title="@{meleebonus}" value="0" /></td>
<td class="sheet-right">DMG Bonus:</td>
<td><input type="text" class="sheet-input-small" name="attr_dmgbonus" title="@{dmgbonus}" value="0" /></td>
<td class="sheet-right">Encumbrance:</td>
<td><input type="text" class="sheet-input-small" name="attr_encumbrancebonus" title="@{encumbrancebonus}" value="0" /></td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="attr_minorstrengthfeat-roll" title="%{selected|minorstrengthfeat-roll}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Minor Strength Feat}} {{1d6 Roll=[[1d6cs<@{MinorStrengthFeat}cf>@{MinorStrengthFeat}]] }}">&nbsp;Open Doors</button></td>
<td><input type="text" class="sheet-input-small" name="attr_minorstrengthfeat" title="@{minorstrengthfeat}" value="0" /></td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="attr_majorstrengthfeat-roll" title="%{selected|majorstrengthfeat-roll}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Major Strength Feat}} {{ Major STR Feat=[[1d100cs<@{MajorStrengthFeat}cf>@{MajorStrengthFeat} ]] %}}">&nbsp;Bend Bars</button></td>
<td><input type="text" class="sheet-input-small" name="attr_majorstrengthfeat" title="@{majorstrengthfeat}" value="0" /></td>
</tr>
<tr>
<td class="sheet-center"><span class="sheet-text-large">INT</span></td>
<td><input type="text" class="sheet-input-small" name="attr_intelligence" title="@{intelligence}" value="10" />
(<input type="text" name="attr_exceptionalintelligence" title="@{exceptionalintelligence}" value="0" min="0" max="100" style="width:2.5em;">)</td>
<td class="sheet-right">Add. Lang:</td>
<td><input type="text" class="sheet-input-small" name="attr_bonuslanguages" title="@{bonuslanguages}" value="0" /></td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="attr_knowspell-roll" title="%{selected|knowspell-roll}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Chance to Know Spell}} {{Roll=[[1d100cs<@{KnowSpell}cf>@{KnowSpell}]] %}}">&nbsp;Know Spell</button></td>
<td><input type="text" class="sheet-input-small" name="attr_knowspell" title="@{knowspell}" value="0" /></td>
<td class="sheet-right">Min Spells:</td>
<td><input type="text" class="sheet-input-small" name="attr_minspells" title="@{minspells}" value="0" /></td>
<td class="sheet-right">Max Spells:</td>
<td><input type="text" class="sheet-input-small" name="attr_maxspells" title="@{maxspells}" value="0" /></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="sheet-center"><span class="sheet-text-large">WIS</span></td>
<td><input type="text" class="sheet-input-small" name="attr_wisdom" title="@{wisdom}" value="10" />
(<input type="text" name="attr_exceptionalwisdom" title="@{exceptionalwisdom}" value="0" min="0" max="100" style="width:2.5em;">)</td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="attr_mentalsave-roll" title="%{selected|mentalsave-roll}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Mental Save}} {{Roll=[[1d20cs>@{MentalSaveBonus}cf<@{MentalSaveBonus}]]}}">&nbsp;Mental Save</button></td>
<td><input type="text" class="sheet-input-small" name="attr_mentalsavebonus" title="@{mentalsavebonus}" value="0" /></td>
<td class="sheet-right">Spell Bonus:</td>
<td><input type="text" class="sheet-input-small" name="attr_spellbonus" title="@{spellbonus}" value="0" /></td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="attr_spellfailure-roll" title="%{selected|spellfailure-roll}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Chance of Spell Failure}} {{Roll=[[1d100cs>@{SpellFailure}cf<@{SpellFailure}]] %}}">&nbsp;Spell Fail</button></td>
<td><input type="text" class="sheet-input-small" name="attr_spellfailure" title="@{spellfailure}" value="0" /></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="sheet-center"><span class="sheet-text-large">DEX</span></td>
<td><input type="text" class="sheet-input-small" name="attr_dexterity" title="@{dexterity}" value="10" />
(<input type="text" name="attr_exceptionaldexterity" title="@{exceptionaldexterity}" value="0" min="0" max="100" style="width:2.5em;">)</td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="attr_surprise-roll" title="%{selected|surprise-roll}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Surprise}} {{Roll=[[ 1d6 + @{SurpriseBonus}[BON] + ?{Modifier?|0}[MOD] ]]}}" >&nbsp;Surprise</button></td>
<td><input type="text" class="sheet-input-small" name="attr_surprisebonus" title="@{surprisebonus}" value="0" /></td>
<td class="sheet-right">Missile Hit:</td>
<td><input type="text" class="sheet-input-small" name="attr_rangedbonus" title="@{rangedbonus}" value="0" /></td>
<td class="sheet-right">AC Bonus:</td>
<td><input type="text" class="sheet-input-small" name="attr_armorbonus" title="@{armorbonus}" value="0" /></td>
<td class="sheet-right"><button class="sheet-button" style="margin-right:-50px;" type="roll" name="attr_init-roll" title="%{selected|init-roll}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Initiative!}} {{Roll=[[ 1d6 + @{SurpriseBonus}[BON] + ?{Modifier?|0}[MOD] ]]}}" >&nbsp;INITIATIVE</button></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="sheet-center"><span class="sheet-text-large">CON</span></td>
<td><input type="text" class="sheet-input-small" name="attr_constitution" title="@{constitution}" value="10" />
(<input type="text" name="attr_exceptionalconstitution" title="@{exceptionalconstitution}" value="0" min="0" max="100" style="width:2.5em;">)</td>
<td class="sheet-right">HP Bonus:</td>
<td><input type="text" class="sheet-input-small" name="attr_hitpointbonus" title="@{hitpointbonus}" value="0" /></td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="attr_systemshock-roll" title="%{selected|systemshock-roll}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=System Shock Survival}} {{ Roll=[[1d100cs<@{SystemShock}cf>@{SystemShock} ]] %}}">&nbsp;Sys Shock</button></td>
<td><input type="text" class="sheet-input-small" name="attr_systemshock" title="@{systemshock}" value="0" /></td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="attr_resurrectionsurvival-roll" title="%{selected|resurrectionsurvival-roll}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Resurrection Survival}} {{Roll=[[ 1d100cs<@{ResurrectionSurvival}cf>@{ResurrectionSurvival} ]] %}}">&nbsp;Res Survive</button></td>
<td><input type="text" class="sheet-input-small" name="attr_resurrectionsurvival" title="@{resurrectionsurvival}" value="0" /></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="sheet-center"><span class="sheet-text-large">CHA</span></td>
<td><input type="text" class="sheet-input-small" name="attr_charisma" title="@{charisma}" value="10" />
(<input type="text" name="attr_exceptionalcharisma" title="@{exceptionalcharisma}" value="0" min="0" max="100" style="width:2.5em;">)</td>
<td class="sheet-right">Max Hench:</td>
<td><input type="text" class="sheet-input-small" name="attr_maximumhenchmen" title="@{maximumhenchmen}" value="0" /></td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="attr_loyalty-roll" title="%{selected|loyalty-roll}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Loyalty}} {{Roll=[[ 1d100 + @{LoyaltyBonus}[BON] ]] %}}">&nbsp;Loyalty</button></td>
<td><input type="text" class="sheet-input-small" name="attr_loyaltybonus" title="@{loyaltybonus}" value="0" /></td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="attr_reaction-roll" title="%{selected|reaction-roll}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Reaction}} {{Roll=[[ 1d100 + @{ReactionBonus}[BON] ]] %}}" >&nbsp;React</button></td>
<td><input type="text" class="sheet-input-small" name="attr_reactionbonus" title="@{reactionbonus}" value="0" /></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="sheet-center"><span class="sheet-text-large">COM</span></td>
<td><input type="text" class="sheet-input-small" name="attr_comeliness" title="@{comeliness}" value="10" />
(<input type="text" name="attr_exceptionalcomeliness" title="@{exceptionalcomeliness}" value="0" min="0" max="100" style="width:2.5em;">)</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table class="sheet-sect sheet-border" style="margin-top:5px;">
<tr>
<td class="sheet-text-large sheet-right">Movement:</td>
<td></td>
<td></td>
<td class="sheet-right">Run <span class="sheet-text-small">(x10)</span>:</td>
<td><input type="text" class="sheet-input-small" name="attr_movement_run" title="@{movement_run}" value="(@{movement}*10)" disabled /></td>
<td class="sheet-right">Normal <span class="sheet-text-small">(x5)</span>:</td>
<td><input type="text" class="sheet-input-small" name="attr_movement_normal" title="@{movement_normal}" value="(@{movement}*5)" disabled /></td>
<td class="sheet-right">Crawl <span class="sheet-text-small">(1/2)</span>:</td>
<td><input type="text" class="sheet-input-small" name="attr_movement_crawl" title="@{movement_crawl}" value="(@{movement}*0.5)" disabled /></td>
</tr>
<tr>
<td></td>
<td class="sheet-right">Base:</td>
<td><input type="text" class="sheet-input-small" name="attr_movement" title="@{movement}" min="0" value="12" />
&nbsp;<input type="checkbox" name="attr_current_encumbrance" value="0" checked="checked" readonly="readonly" /></td>
<td class="sheet-right">Heavy <span class="sheet-text-small">(-3)</span>:</td>
<td><input type="text" class="sheet-input-small" name="attr_movement_heavy" title="@{movement_heavy}" value="(@{movement}-3)" disabled />
&nbsp;<input type="checkbox" name="attr_current_encumbrance" value="1" readonly="readonly" /></td>
<td class="sheet-right">Very Heavy <span class="sheet-text-small">(-6)</span>:</td>
<td><input type="text" class="sheet-input-small" name="attr_movement_load" title="@{movement_load}" value="(@{movement}-6)" disabled />
&nbsp;<input type="checkbox" name="attr_current_encumbrance" value="2" readonly="readonly" /></td>
<td class="sheet-right">Max <span class="sheet-text-small">(-9)</span>:</td>
<td><input type="text" class="sheet-input-small" name="attr_movement_max" title="@{movement_max}" value="(@{movement}-9)" disabled />
&nbsp;<input type="checkbox" name="attr_current_encumbrance" value="3" readonly="readonly" /></td>
</tr>
</table>
<hr>
</div>
<div class="sheet-saves">
<div class="sheet-header">SAVES</div>
<input type="checkbox" class="sheet-sect-show" title="@{saves-info-show}" name="attr_saves-info-show" value="1" style="width: 90px; margin: 0 -20px 0 -60px;" checked="checked" /><span></span>
<table class="sheet-sect sheet-center">
<tr>
<td colspan="2">Paralysis, Poison, and Death<br /><button class="sheet-button" type="roll" value="/me must make a saving throw!&#x00A;&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Saving Throw}} {{Paralysis, Poison, Death=[[?{Mod?|0}+1d20cs>@{saveparalysispoisondeath}cf<@{saveparalysispoisondeath}]]}} {{Mod Applied=?{Mod?|0}}}" name="roll_saveparalysispoisondeath" title="%{selected|saveparalysispoisondeath}"> Roll</button><input type="text" class="sheet-input-small" name="attr_saveparalysispoisondeath" title="@{saveparalysispoisondeath}" value="0" /></td>
<td colspan="2">Petrification, Polymorph<br /><button class="sheet-button" type="roll" value="/me must make a saving throw!&#x00A;&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Saving Throw}} {{Petrification, Polymorph=[[?{Mod?|0}+1d20cs>@{savepetrificationpolymorph}cf<@{savepetrificationpolymorph}]]}} {{Mod Applied=?{Mod?|0}}}" name="roll_savepetrificationpolymorph" title="%{selected|savepetrificationpolymorph}"> Roll</button><input type="text" class="sheet-input-small" name="attr_savepetrificationpolymorph" title="@{savepetrificationpolymorph}" value="0" /></td>
<td colspan="2">Rods, Staves, and Wands<br /><button class="sheet-button" type="roll" value="/me must make a saving throw!&#x00A;&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Saving Throw}} {{Rods, Staves, Wands=[[?{Mod?|0}+1d20cs>@{saverodsstaveswands}cf<@{saverodsstaveswands}]]}} {{Mod Applied=?{Mod?|0}}}" name="roll_saverodsstaveswands" title="%{selected|saverodsstaveswands}"> Roll</button><input type="text" class="sheet-input-small" name="attr_saverodsstaveswands" title="@{saverodsstaveswands}" value="0" /></td>
<td colspan="2">Breath Weapon<br /><button class="sheet-button" type="roll" value="/me must make a saving throw!&#x00A;&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Saving Throw}} {{Breath Weapons=[[?{Mod?|0}+1d20cs>@{savebreathweapons}cf<@{savebreathweapons}]]}} {{Mod Applied=?{Mod?|0}}}" name="roll_savebreathweapons" title="%{selected|savebreathweapons}"> Roll</button><input type="text" class="sheet-input-small" name="attr_savebreathweapons" title="@{savebreathweapons}" value="0" /></td>
<td colspan="2">Spells<br /><button class="sheet-button" type="roll" value="/me must make a saving throw!&#x00A;&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Saving Throw}} {{Spells=[[?{Mod?|0}+1d20cs>@{savespells}cf<@{savespells}]]}} {{Mod Applied=?{Mod?|0}}}" name="roll_savespells" title="%{selected|savespells}"> Roll</button><input type="text" class="sheet-input-small" name="attr_savespells" title="@{savespells}" value="0" /></td>
</tr>
</table>
<hr>
</div>
<div class="sheet-weapons">
<div class="sheet-header">WEAPONS</div>
<input type="checkbox" class="sheet-sect-show" title="@{weapons-info-show}" name="attr_weapons-info-show" value="1" style="width: 115px; margin: 0 -20px 0 -85px;" checked="checked" /><span></span>
<div class="sheet-sect">
<fieldset class="repeating_weapon">
<div class="sheet-sect sheet-border">
<table class="sheet-sect sheet-center" style="width:99%;">
<tr>
<td><button class="sheet-button" type="roll" name="attr_weapon_attack_roll" title="%{selected|repeating_weapon_$X_weapon_attack_roll}" value="@{weapon_macro_text}">&nbsp;Roll&nbsp;</button></td>
<td style="width:22%;" colspan="2"><input type="text" name="attr_weapon_name" title="@{repeating_weapon_$X_weapon_name}" placeholder="Enter Weapon" style="width:100%;" /><br />Weapon</td>
<td style="width:11%;"><input type="text" class="sheet-input-small" name="attr_weapon_tohitbonus" title="@{repeating_weapon_$X_weapon_tohitbonus}" value="0" /><br />To-Hit Bonus</td>
<td colspan="2" style="width:11%;"><input type="text" class="sheet-input-small" name="attr_weapon_magicbonus" title="@{repeating_weapon_$X_weapon_magicbonus}" value="0" /><br />Magic Bonus</td>
<td colspan="2" style="width:11%;"><input type="text" class="sheet-input-small" name="attr_weapon_attackdmgbonus" title="@{repeating_weapon_$X_weapon_attackdmgbonus}" value="0" /><br />DMG Bonus</td>
<input type="hidden" name="attr_weapon_dmgbonus" value="0" />
<td>
<select name="attr_weapon_whisper_to_hit" style="width: 88%;height: 2em;margin: 4px 0 4px 0;" title="@{repeating_weapon_$X_weapon_whisper_to_hit}">
<option value="&#x00A;/w gm &{template:attacks} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=To Hit Armor Class}} {{ToHitAC-10to0=[[ @{THAC-10} ]]|[[ @{THAC-9} ]]|[[ @{THAC-8} ]]|[[ @{THAC-7} ]]|[[ @{THAC-6} ]]|[[ @{THAC-5} ]]|[[ @{THAC-4} ]]|[[ @{THAC-3} ]]|[[ @{THAC-2} ]]|[[ @{THAC-1} ]]|[[ @{THAC0} ]]}} {{ToHitAC1to10=[[ @{THAC0} ]]|[[ @{THAC1} ]]|[[ @{THAC2} ]]|[[ @{THAC3} ]]|[[ @{THAC4} ]]|[[ @{THAC5} ]]|[[ @{THAC6} ]]|[[ @{THAC7} ]]|[[ @{THAC8} ]]|[[ @{THAC9} ]]|[[ @{THAC10} ]] }}" selected="">Table</option>
<option value="&#x00A;/w gm &{template:attacks} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=THACO}} {{ToHitAC-10to0=@{THAC0-10}|@{THAC0-9}|@{THAC0-8}|@{THAC0-7}|@{THAC0-6}|@{THAC0-5}|@{THAC0-4}|@{THAC0-3}|@{THAC0-2}|@{THAC0-1}|**@{THAC00}**}} {{ToHitAC1to10=**@{THAC00}**|@{THAC01}|@{THAC02}|@{THAC03}|@{THAC04}|@{THAC05}|@{THAC06}|@{THAC07}|@{THAC08}|@{THAC09}|@{THAC010} }}">THACO</option>
<option value="&nbsp;">no</option>
</select>
<br />
<b title="Include '/w gm to-hit AC table or THACO'?">/w gm?</b>
</td>
<td><textarea name="attr_weapon_macro_text" title="@{repeating_weapon_$X_weapon_macro_text}" class="sheet-macro-text" style="width:96%; margin:5px 0 0 0;">&{template:attacks} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=@{weapon_name}}} {{attack1=[[1d20 + @{weapon_tohitbonus}[BON] + @{weapon_magicbonus}[MAG] + ?{To Hit Modifier?|0}[MOD] ]]}} {{damage1vsSM=[[@{weapon_damagesmallmedium} + @{weapon_attackdmgbonus}[BON] + @{weapon_magicbonus}[MAG] + ?{Damage Modifier?|0}[MOD] ]]}} {{damage1vsL=[[@{weapon_damagelarge} + @{weapon_attackdmgbonus}[BON] + @{weapon_magicbonus}[MAG] + ?{Damage Modifier?|0}[MOD] ]]}} {{WeaponNotes=@{weapon_notes}}} @{weapon_whisper_to_hit}</textarea><br />Macro-Text</td>
</tr>
<tr>
<td><input type="text" class="sheet-input-small" name="attr_weapon_damagesmallmedium" title="@{repeating_weapon_$X_weapon_damagesmallmedium} e.g. '1d4'" value="0" /><br />DMG vs S/M</td>
<td><input type="text" class="sheet-input-small" name="attr_weapon_damagelarge" title="@{repeating_weapon_$X_weapon_damagelarge} e.g. '1d4+1'" value="0" /><br />DMG vs L</td>
<td><input type="text" class="sheet-input-small" name="attr_weapon_rateoffire" title="@{repeating_weapon_$X_weapon_rateoffire}" value="0" /><br />Rate of Fire</td>
<td><input type="text" class="sheet-input-medium" name="attr_weapon_range" title="@{repeating_weapon_$X_weapon_range}" value="0" /><br />Range S/M/L</td>
<td><input type="text" class="sheet-input-small" name="attr_weapon_quantity" title="@{repeating_weapon_$X_weapon_quantity}" min="0" value="0" /><br />Qty</td>
<td><input type="text" class="sheet-input-small" name="attr_weapon_weight" title="@{repeating_weapon_$X_weapon_weight}" min="0" value="0" /><br />Wt</td>
<td><input type="text" class="sheet-input-small" name="attr_weapon_speed" title="@{repeating_weapon_$X_weapon_speed}" value="0" /><br />Speed</td>
<td><input type="text" class="sheet-input-small" name="attr_weapon_cost" title="@{repeating_weapon_$X_weapon_cost}" min="0" value="0" /><br />Cost</td>
<td colspan="3"><textarea class="sheet-weapons" name="attr_weapon_notes" title="@{repeating_weapon_$X_weapon_notes}" style="width:96%;" placeholder="Description"></textarea><br />Weapon Notes</td>
</tr>
</table>
<input type="hidden" name="attr_weapon_total_weight" value="0" />
<input type="hidden" name="attr_weapon_runningtotal" value="0" />
</div>
</fieldset>
</div>
<hr>
</div>
<div class="sheet-to_hit_AC">
<div class="sheet-header">TO HIT AC TABLE</div>
<input type="checkbox" class="sheet-sect-show" title="@{to_hit_ac-info-show} Use the To Hit tables from the DMG to input values." name="attr_to_hit_ac-info-show" value="1" style="width: 170px;margin: 0 -20px 0 -140px;" checked="checked" /><span></span>
<table class="sheet-sect sheet-center">
<tr class="sheet-to-hit">
<td>-10</td>
<td>-9</td>
<td>-8</td>
<td>-7</td>
<td>-6</td>
<td>-5</td>
<td>-4</td>
<td>-3</td>
<td>-2</td>
<td>-1</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
</tr>
<tr class="sheet-to-hit-input">
<td><input type="text" name="attr_THAC-10" title="@{THAC-10}" value="10" /></td>
<td><input type="text" name="attr_THAC-9" title="@{THAC-9}" value="10" /></td>
<td><input type="text" name="attr_THAC-8" title="@{THAC-8}" value="10" /></td>
<td><input type="text" name="attr_THAC-7" title="@{THAC-7}" value="10" /></td>
<td><input type="text" name="attr_THAC-6" title="@{THAC-6}" value="10" /></td>
<td><input type="text" name="attr_THAC-5" title="@{THAC-5}" value="10" /></td>
<td><input type="text" name="attr_THAC-4" title="@{THAC-4}" value="10" /></td>
<td><input type="text" name="attr_THAC-3" title="@{THAC-3}" value="10" /></td>
<td><input type="text" name="attr_THAC-2" title="@{THAC-2}" value="10" /></td>
<td><input type="text" name="attr_THAC-1" title="@{THAC-1}" value="10" /></td>
<td><input type="text" name="attr_THAC0" title="@{THAC0}" value="10" /></td>
<td><input type="text" name="attr_THAC1" title="@{THAC1}" value="10" /></td>
<td><input type="text" name="attr_THAC2" title="@{THAC2}" value="10" /></td>
<td><input type="text" name="attr_THAC3" title="@{THAC3}" value="10" /></td>
<td><input type="text" name="attr_THAC4" title="@{THAC4}" value="10" /></td>
<td><input type="text" name="attr_THAC5" title="@{THAC5}" value="10" /></td>
<td><input type="text" name="attr_THAC6" title="@{THAC6}" value="10" /></td>
<td><input type="text" name="attr_THAC7" title="@{THAC7}" value="10" /></td>
<td><input type="text" name="attr_THAC8" title="@{THAC8}" value="10" /></td>
<td><input type="text" name="attr_THAC9" title="@{THAC9}" value="10" /></td>
<td><input type="text" name="attr_THAC10" title="@{THAC10}" value="10" /></td>
</tr>
</table>
<hr>
</div>
<div class="sheet-thac0">
<div class="sheet-header">THAC0</div>
<input type="checkbox" class="sheet-sect-show" title="@{thac0-show} enter THAC0 to auto-calc table (values are not based off of the To Hit tables from the DMG)" name="attr_thac0-show" value="1" style="width: 90px;margin: 0 -20px 0 -60px;" checked="checked" /><span></span>
<table class="sheet-sect sheet-center">
<tr class="sheet-to-hit">
<td>-10</td>
<td>-9</td>
<td>-8</td>
<td>-7</td>
<td>-6</td>
<td>-5</td>
<td>-4</td>
<td>-3</td>
<td>-2</td>
<td>-1</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
</tr>
<tr class="sheet-to-hit-input">
<td><input type="text" name="attr_THAC0-10" title="@{THAC0-10}" value="[[@{THAC00}+10]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC0-9" title="@{THAC0-9}" value="[[@{THAC00}+9]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC0-8" title="@{THAC0-8}" value="[[@{THAC00}+8]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC0-7" title="@{THAC0-7}" value="[[@{THAC00}+7]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC0-6" title="@{THAC0-6}" value="[[@{THAC00}+6]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC0-5" title="@{THAC0-5}" value="[[@{THAC00}+5]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC0-4" title="@{THAC0-4}" value="[[@{THAC00}+4]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC0-3" title="@{THAC0-3}" value="[[@{THAC00}+3]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC0-2" title="@{THAC0-2}" value="[[@{THAC00}+2]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC0-1" title="@{THAC0-1}" value="[[@{THAC00}+1]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC00" title="@{THAC00}" value="19" style="font-weight:bold; border: 1px solid black;" /></td>
<td><input type="text" name="attr_THAC01" title="@{THAC01}" value="[[@{THAC00}-1]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC02" title="@{THAC02}" value="[[@{THAC00}-2]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC03" title="@{THAC03}" value="[[@{THAC00}-3]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC04" title="@{THAC04}" value="[[@{THAC00}-4]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC05" title="@{THAC05}" value="[[@{THAC00}-5]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC06" title="@{THAC06}" value="[[@{THAC00}-6]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC07" title="@{THAC07}" value="[[@{THAC00}-7]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC08" title="@{THAC08}" value="[[@{THAC00}-8]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC09" title="@{THAC09}" value="[[@{THAC00}-9]]" min="2" max="20" disabled /></td>
<td><input type="text" name="attr_THAC010" title="@{THAC010}" value="[[@{THAC00}-10]]" min="2" max="20" disabled /></td>
</tr>
</table>
<hr>
</div>
<div class="sheet-thief_skills">
<div class="sheet-header">THIEF SKILLS</div>
<input type="checkbox" class="sheet-sect-show" title="@{thief_skills-info-show}" name="attr_thief_skills-info-show" value="1" style="width: 135px; margin: 0 -20px 0 -105px;" /><span></span>
<table class="sheet-sect">
<tr>
<td class="sheet-right"><button class="sheet-button" type="roll" name="roll_pickpockets" title="%{selected|pickpockets}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Ability Check}} {{Pick Pockets=[[1d100cs<@{PickPockets}cf>@{pickpockets}]] %}}"> Roll</button></td>
<td style="width: 47px;"><input type="text" name="attr_pickpockets" class="sheet-input-small" title="@{pickpockets}" value="0" /></td>
<td>Pick Pockets</td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="roll_movequietly" title="%{selected|movequietly}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Ability Check}} {{Move Quietly=[[1d100cs<@{movequietly}cf>@{movequietly}]] %}}"> Roll</button></td>
<td style="width: 47px;"><input type="text" name="attr_movequietly" class="sheet-input-small" title="@{movequietly}" value="0" /></td>
<td>Move Silently</td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="roll_climbwalls" title="%{selected|climbwalls}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Ability Check}} {{Climb Walls=[[1d100cs<@{climbwalls}cf>@{climbwalls}]] %}}"> Roll</button></td>
<td style="width: 47px;"><input type="text" name="attr_climbwalls" class="sheet-input-small" title="@{climbwalls}" value="0" /></td>
<td>Climb Walls</td>
</tr>
<tr>
<td class="sheet-right"><button class="sheet-button" type="roll" name="roll_openlocks" title="%{selected|openlocks}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Ability Check}} {{Open Locks=[[1d100cs<@{openlocks}cf>@{openlocks}]] %}}"> Roll</button></td>
<td><input type="text" name="attr_openlocks" class="sheet-input-small" title="@{openlocks}" value="0" /></td>
<td>Open Locks</td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="roll_hideinshadows" title="%{selected|HideInShadows}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Ability Check}} {{Hide In Shadows=[[1d100cs<@{hideinshadows}cf>@{hideinshadows}]] %}}"> Roll</button></td>
<td><input type="text" name="attr_hideinshadows" class="sheet-input-small" title="@{hideinshadows}" value="0" /></td>
<td>Hide In Shadows</td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="roll_readlanguages" title="%{selected|readlanguages}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Ability Check}} {{Read Languages=[[1d100cs<@{readlanguages}cf>@{readlanguages}]] %}}"> Roll</button></td>
<td><input type="text" name="attr_readlanguages" class="sheet-input-small" title="@{readlanguages}" value="0" /></td>
<td>Read Languages</td>
</tr>
<tr>
<td class="sheet-right"><button class="sheet-button" type="roll" name="roll_findtraps" title="%{selected|findtraps}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Ability Check}} {{Find/Remove Traps=[[1d100cs<@{FindTraps}cf>@{FindTraps}]] %}}"> Roll</button></td>
<td><input type="text" name="attr_findtraps" class="sheet-input-small" title="@{findtraps}" value="0" /></td>
<td>Find/Remove Traps</td>
<td class="sheet-right"><button class="sheet-button" type="roll" name="roll_hearnoise" title="%{selected|hearnoise}" value="&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Ability Check}} {{Hear Noise=[[1d100cs<@{hearnoise}cf>@{hearnoise}]] %}}"> Roll</button></td>
<td><input type="text" name="attr_hearnoise" class="sheet-input-small" title="@{hearnoise}" value="0" /></td>
<td>Hear Noise</td>
<td></td>
<td><input type="text" name="attr_backstab" class="sheet-input-small" title="@{backstab}" value="2" min="2" max="5" /></td>
<td>Backstab</td>
</tr>
</table>
<hr>
</div>
<div class="sheet-wealth">
<div class="sheet-header">WEALTH</div>
<input type="checkbox" class="sheet-sect-show" title="@{wealth-info-show}" name="attr_wealth-info-show" value="1" style="width: 100px; margin: 0 -20px 0 -70px;" /><span></span>
<div class="sheet-sect">
<table class="sheet-sect sheet-center">
<tr>
<td style="width:20%;"><b class="sheet-text-large">Carried Coins:</b></td>
<td style="width:15%;">PP: <input type="text" class="sheet-input-medium" name="attr_pp" title="@{pp}" min="0" value="0" /></td>
<td style="width:15%;">GP: <input type="text" class="sheet-input-medium" name="attr_gp" title="@{gp}" min="0" value="0" /></td>
<td style="width:15%;">EP: <input type="text" class="sheet-input-medium" name="attr_ep" title="@{ep}" min="0" value="0" /></td>
<td style="width:15%;">SP: <input type="text" class="sheet-input-medium" name="attr_sp" title="@{sp}" min="0" value="0" /></td>
<td style="width:15%;">CP: <input type="text" class="sheet-input-medium" name="attr_cp" title="@{cp}" min="0" value="0" /></td>
</tr>
<tr>
<td style="width:20%;"><b class="sheet-text-large">Total Coins:</b></td>
<td style="width:15%;">PP: <input type="text" class="sheet-input-medium" name="attr_pp-total" title="@{pp-total}" min="0" value="0" /></td>
<td style="width:15%;">GP: <input type="text" class="sheet-input-medium" name="attr_gp-total" title="@{gp-total}" min="0" value="0" /></td>
<td style="width:15%;">EP: <input type="text" class="sheet-input-medium" name="attr_ep-total" title="@{ep-total}" min="0" value="0" /></td>
<td style="width:15%;">SP: <input type="text" class="sheet-input-medium" name="attr_sp-total" title="@{sp-total}" min="0" value="0" /></td>
<td style="width:15%;">CP: <input type="text" class="sheet-input-medium" name="attr_cp-total" title="@{cp-total}" min="0" value="0" /></td>
</tr>
</table>
<div class="sheet-table">
<b style="margin-left:20px;">Wealth Notes</b>
<input type="checkbox" class="sheet-sect-show" title="@{wealthnotes-show}" name="attr_wealthnotes-show" value="1" style="width: 115px; margin: 0 -20px 0 -90px;" checked="checked" /><span></span>
<div class="sheet-table-row sheet-sect">
<textarea name="attr_wealthNotes" title="@{wealthNotes}" placeholder="Wealth Notes"></textarea>
</div>
</div>
</div>
<hr>
</div>
<div class="sheet-equipment">
<div class="sheet-header">EQUIPMENT</div>
<input type="checkbox" class="sheet-sect-show" title="@{equipment-info-show}" name="attr_equipment-info-show" value="1" style="width: 125px; margin: 0 -20px 0 -95px;" /><span></span>
<div class="sheet-table sheet-sect sheet-repeating-fields">
<table class="sheet-sect sheet-center">
<tr>
<td style="width:4%;"></td>
<td style="width:38%;">Item/Description</td>
<td style="width:20%;">Location</td>
<td style="width:7%;">Carried?</td>
<td style="width:7%;">Qty</td>
<td style="width:1%;">/</td>
<td style="width:7%;">Max</td>
<td style="width:7%;">Wt</td>
<td style="width:10%;">Cost</td>
</tr>
</table>
<div class="sheet-sect">
<fieldset class="repeating_equipment">
<table class="sheet-sect sheet-center">
<tr>
<td style="width:4%;"><input type="checkbox" name="attr_equipment_item_show" title="@{repeating_equipment_$X_equipment_item_show}" class="sheet-counted sheet-sect-show" value="1" style="opacity:0; position:absolute; cursor:default; z-index: 1; width:0;" checked="checked" /><span></span></td>
<td style="width:38%;"><input type="text" name="attr_equipment_item" title="@{repeating_equipment_$X_equipment_item}" placeholder="Item/Description" /></td>
<td style="width:20%;"><input type="text" name="attr_equipment_location" title="@{repeating_equipment_$X_equipment_location}" placeholder="Location" /></td>
<td style="width:7%;"><input type="checkbox" name="attr_equipment_carried" title="@{repeating_equipment_$X_equipment_carried}" value="1" /></td>
<td style="width:7%;"><input type="text" name="attr_equipment_quantity" title="@{repeating_equipment_$X_equipment_quantity}" min="0" value="0" /></td>
<td style="width:1%;">/</td>
<td style="width:7%;"><input type="text" name="attr_equipment_quantity_max" title="@{repeating_equipment_$X_equipment_quantity|max}" value="1" /></td>
<td style="width:7%;"><input type="text" name="attr_equipment_weight" title="@{repeating_equipment_$X_equipment_weight}" value="0" /></td>
<td style="width:10%;"><input type="text" name="attr_equipment_cost" title="@{repeating_equipment_$X_equipment_cost}" value="0" /></td>
</tr>
</table>
<input type="hidden" name="attr_equipment_equipment_total_weight" value="0" />
<input type="hidden" name="attr_equipment_equipment_runningtotal" value="0" />
</fieldset>
</div>
<table class="sheet-sect">
<tr>
<td rowspan="5" style="width:74%; vertical-align:top;">
<div class="sheet-table sheet-left">
<b style="margin-left:20px;">Equipment Notes</b>
<input type="checkbox" class="sheet-sect-show" title="@{itemnotes-show}" name="attr_itemnotes-show" value="1" style="width: 135px; margin: 0 -20px 0 -105px;" checked="checked" /><span></span>
<div class="sheet-table-row sheet-sect">
<textarea name="attr_itemnotes" title="@{itemnotes}" placeholder="Equipment Notes"></textarea>
</div>
</div>
<table class="sheet-sect sheet-center">
<tr>
<td><b class="sheet-text-large">Carrying Capacity:</b></td>
<td><input type="text" class="sheet-input-medium" name="attr_normal_load" title="@{normal_load} Enter the maximum amount for a 'Normal load'(default 350gp based on STR 8-11. Add STR bonus if applicable.)" value="350" /><br />Normal&nbsp;
<input type="checkbox" name="attr_current_encumbrance" value="0" checked="checked" readonly="readonly" /></td>
<td><input type="text" class="sheet-input-medium" name="attr_heavy_load" title="@{heavy_load} Enter the maximum amount for a 'Heavy load'(default 700gp based on STR 8-11. Add STR bonus if applicable.)" value="700" /><br />Heavy&nbsp;
<input type="checkbox" name="attr_current_encumbrance" value="1" readonly="readonly" /></td>
<td><input type="text" class="sheet-input-medium" name="attr_very_heavy_load" title="@{very_heavy_load} Enter the maximum amount for a 'Very heavy load'(default 1050gp based on STR 8-11. Add STR bonus if applicable.)" value="1050" /><br />Very Heavy&nbsp;
<input type="checkbox" name="attr_current_encumbrance" value="2" readonly="readonly" /></td>
<td><input type="text" class="sheet-input-medium" name="attr_max_load" title="@{max_load} Minimum amount for a max/encumbered load(defaults to 'Very heavy load' + 1)." value="(@{very_heavy_load}+1)" disabled /><b class="sheet-text-large">+</b><br />Max&nbsp;
<input type="checkbox" name="attr_current_encumbrance" value="3" readonly="readonly" /></td>
</tr>
<tr>
<td colspan="5">
Strength Encumbrance Bonus:
<input class="sheet-input-small" name="attr_encumbrancebonus" title="@{encumbrancebonus}" value="0" readonly="">&nbsp;&nbsp;<b>hint:</b> increases carrying capacity limits.
</td>
</tr>
</table>
</td>
<td style="width:10%;" class="sheet-right">Equipment:</td>
<td style="width:7%;"><input type="text" style="width:100%;" name="attr_total_equipment_weight" title="@{total_equipment_weight}" value="0" readonly="readonly" /></td>
<td style="width:10%;"><input type="text" style="width:100%;" name="attr_total_equipment_cost" title="@{total_equipment_cost}" value="0" readonly="readonly" /></td>
</tr>
<tr>
<td class="sheet-right">Armor:</td>
<td><input type="text" style="width:100%;" name="attr_total_armor_weight" title="@{total_armor_weight}" value="0" readonly="readonly" /></td>
<td><input type="text" style="width:100%;" name="attr_total_armor_cost" title="@{total_armor_cost}" value="0" readonly="readonly" /></td>
</tr>
<tr>
<td class="sheet-right">Weapons:</td>
<td><input type="text" style="width:100%;" name="attr_total_weapon_weight" title="@{total_weapon_weight}" value="0" readonly="readonly" /></td>
<td><input type="text" style="width:100%;" name="attr_total_weapon_cost" title="@{total_weapon_cost}" value="0" readonly="readonly" /></td>
</tr>
<tr>
<td class="sheet-right">Coins:</td>
<td><input type="text" style="width:100%;" name="attr_total_coin_weight" title="@{total_coin_weight}" value="0" readonly="readonly" /></td>
<td class="sheet-center"><b>&nbsp;-&nbsp;-&nbsp;-&nbsp;</b></td>
</tr>
<tr>
<td class="sheet-right">TOTALS:</td>
<td><input type="text" style="width:100%;" name="attr_total_weight" title="@{total_weight}" value="0" readonly="readonly" /></td>
<td><input type="text" style="width:100%;" name="attr_total_cost" title="@{total_cost}" value="0" readonly="readonly" /></td>
</tr>
</table>
</div>
<hr>
</div>
<div class="sheet-special_abilities">
<div class="sheet-header">SPECIAL ABILITIES</div>
<input type="checkbox" class="sheet-sect-show" title="@{special_abilities-info-show}" name="attr_special_abilities-info-show" value="1" style="width: 180px; margin: 0 -20px 0 -150px;" /><span></span>
<div class="sheet-sect">
<fieldset class="repeating_ability">
<div class="sheet-sect sheet-border">
<table class="sheet-sect sheet-center" style="width:99%;">
<tr>
<td style="width:5%;"><button class="sheet-button" type="roll" name="attr_ability_roll" title="%{repeating_ability_$X_ability_roll}" value="@{ability_macro_text}"></button></td>
<td style="width:22%;"><input type="text" name="attr_ability_name" title="@{repeating_ability_$X_ability_name}" placeholder="Ability Name" /><br />Name</td>
<td style="width:44%;"><textarea name="attr_ability_short_description" title="@{repeating_ability_$X_ability_short_description}" class="sheet-weapons" style="width:100%;" placeholder="Short Description"></textarea><br />Short Description</td>
<td style="width:8%;"><input type="text" name="attr_ability_current" title="@{repeating_ability_$X_ability_current}" value="0" class="sheet-input-small" /><br />Cur</td>
<td style="width:1%;">/<br />/</td>
<td style="width:8%;"><input type="text" name="attr_ability_current_max" title="@{repeating_ability_$X_ability_current|max}" value="0" class="sheet-input-small" /><br />Max</td>
<!--attr_max kept as hidden attribute in order migrate attribute data to-->
<input type="hidden" name="attr_ability_max" value="1">
<td style="width:10%;">
<textarea name="attr_ability_macro_text" title="@{repeating_ability_$X_ability_macro_text}" class="sheet-macro-text" style="width:90%; height:1em;">&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Special Ability: @{ability_name}}} {{freetext=@{ability_short_description} @{ability_description}}}</textarea><br />Macro-Text
</td>
</tr>
</table>
<b style="margin-left:20px;">Ability Description</b>
<input type="checkbox" class="sheet-sect-show" title="@{repeating_ability_$X_ability_description_show}" name="attr_ability_description_show" value="1" style="width: 160px; margin: 0 -20px 0 -135px;" /><span></span>
<div class="sheet-table sheet-sect">
<div class="sheet-table-row sheet-center sheet-sect">
<textarea name="attr_ability_description" title="@{repeating_ability_$X_ability_description}" placeholder="Ability Description"></textarea>
</div>
</div>
</div>
</fieldset>
<div class="sheet-table">
<b style="margin-left:20px;">Special Abilities Notes</b>
<input type="checkbox" class="sheet-sect-show" title="@{special_abilitiesnotes-show}" name="attr_special_abilitiesnotes-show" value="1" style="width: 180px; margin: 0 -20px 0 -150px;" /><span></span>
<div class="sheet-table-row sheet-sect">
<textarea name="attr_special_abilitiesnotes" title="@{special_abilitiesnotes}" placeholder="Special Abilities Notes"></textarea>
</div>
</div>
</div>
<hr>
</div>
<div class="sheet-nonweapon_proficiencies">
<div class="sheet-header">NON WEAPON PROFICIENCIES</div>
<input type="checkbox" class="sheet-sect-show" title="@{nonweapon_proficiencies-info-show}" name="attr_nonweapon_proficiencies-info-show" value="1" style="width: 275px; margin: 0 -20px 0 -245px;" /><span></span>
<div class="sheet-sect">
<fieldset class="repeating_nonweaponproficiencies">
<div class="sheet-sect sheet-border">
<table class="sheet-sect sheet-center" style="width:99%;">
<tr>
<td style="width:5%;"><button class="sheet-button" type="roll" name="attr_nwp_roll" title="%{repeating_nonweaponproficiencies_$X_nwp_roll}" value="@{nwp_macro_text}"></button></td>
<td style="width:20%; padding-right:20px;"><input type="text" style="width:100%;" name="attr_nwp_name" title="@{repeating_nonweaponproficiencies_$X_nwp_name}" placeholder="Proficiency Name" /><br />Proficiency</td>
<td class="sheet-right">Attribute:</td>
<td class="sheet-left" style="padding-left:5px;">
<select name="attr_nwp_attribute" title="%{repeating_nonweaponproficiencies_$X_nwp_attribute}" style="width: 7em; vertical-align: text-bottom; margin-top: -5px;">
<option value="0" selected="">None</option>
<option value="@{strength}">Strength</option>
<option value="@{dexterity}">Dexterity</option>
<option value="@{constitution}">Constitution</option>
<option value="@{intelligence}">Intelligence</option>
<option value="@{wisdom}">Wisdom</option>
<option value="@{charisma}">Charisma</option>
</select>
</td>
<td>
<textarea name="attr_nwp_short_description" title="@{repeating_nonweaponproficiencies_$X_nwp_short_description}" class="sheet-weapons" style="width:90%;" placeholder="Short Description"></textarea><br />Short Description</td>
<td>
<input type="number" name="attr_nwp_slots" title="@{repeating_nonweaponproficiencies_$X_nwp_slots}" value="0" class="sheet-input-small" style="margin-bottom: 6px;" /><br />Slots</td>
<td>/<br /><span style="opacity: 0;margin: 2px;">/</span></td>
<td>
<input type="number" name="attr_nwp_modifier" title="@{repeating_nonweaponproficiencies_$X_nwp_modifier}" value="0" class="sheet-input-small" style="margin-bottom: 6px;" /><br />Modifier</td>
<td>
<textarea name="attr_nwp_macro_text" title="@{repeating_nonweaponproficiencies_$X_nwp_macro_text}" class="sheet-macro-text" style="width:90%; height:1em;">&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Non Weapon Proficiency: @{nwp_name}}} {{Proficiency Check=[[ 1d20 + [[@{nwp_modifier}]][MOD] + [[?{Additional modifier?|0}]][MOD] ]] vs [[ @{nwp_attribute}[ATTR] ]]}}{{freetext=@{nwp_short_description}}}</textarea>
<br />Macro-Text
</td>
</tr>
</table>
<b style="margin-left:20px;">Non Weapon Proficiency Description</b>
<input type="checkbox" class="sheet-sect-show" title="@{repeating_nonweaponproficiencies_$X_nwp_description_show}" name="attr_nwp_description_show" value="1" style="width: 275px; margin: 0 -20px 0 -245px;" /><span></span>
<div class="sheet-table sheet-sect">
<div class="sheet-table-row sheet-center sheet-sect">
<textarea name="attr_nwp_description" title="@{repeating_nonweaponproficiencies_$X_nwp_description}" placeholder="Ability Description"></textarea>
</div>
</div>
</div>
</fieldset>
</div>
<hr>
</div>
<div class="sheet-spells">
<div class="sheet-header">SPELLS</div>
<input type="checkbox" class="sheet-sect-show" title="@{spells-info-show}" name="attr_spells-info-show" value="1" style="width: 90px; margin: 0 -20px 0 -60px;" /><span></span>
<div class="sheet-sect">
<table class="sheet-sect sheet-center">
<tr>
<td colspan="2">Cur&nbsp;/&nbsp;Max</td>
<td colspan="2">Cur&nbsp;/&nbsp;Max</td>
<td colspan="2">Cur&nbsp;/&nbsp;Max</td>
<td colspan="2">Cur&nbsp;/&nbsp;Max</td>
<td colspan="2">Cur&nbsp;/&nbsp;Max</td>
<td colspan="2">Cur&nbsp;/&nbsp;Max</td>
<td colspan="2">Cur&nbsp;/&nbsp;Max</td>
<td colspan="2">Cur&nbsp;/&nbsp;Max</td>
<td colspan="2">Cur&nbsp;/&nbsp;Max</td>
<td colspan="2">Cur&nbsp;/&nbsp;Max</td>
</tr>
<tr>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_0_current" title="@{spells_lvl_0_current}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_0_max" title="@{spells_lvl_0_max}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_1_current" title="@{spells_lvl_1_current}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_1_max" title="@{spells_lvl_1_max}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_2_current" title="@{spells_lvl_2_current}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_2_max" title="@{spells_lvl_2_max}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_3_current" title="@{spells_lvl_3_current}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_3_max" title="@{spells_lvl_3_max}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_4_current" title="@{spells_lvl_4_current}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_4_max" title="@{spells_lvl_4_max}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_5_current" title="@{spells_lvl_5_current}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_5_max" title="@{spells_lvl_5_max}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_6_current" title="@{spells_lvl_6_current}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_6_max" title="@{spells_lvl_6_max}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_7_current" title="@{spells_lvl_7_current}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_7_max" title="@{spells_lvl_7_max}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_8_current" title="@{spells_lvl_8_current}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_8_max" title="@{spells_lvl_8_max}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_9_current" title="@{spells_lvl_9_current}" value="0" style="width:3em;" /></td>
<td><input type="text" class="sheet-input-small" name="attr_spells_lvl_9_max" title="@{spells_lvl_9_max}" value="0" style="width:3em;" /></td>
</tr>
<tr class="sheet-to-hit">
<td colspan="2">Cantrips</td>
<td colspan="2">1st</td>
<td colspan="2">2nd</td>
<td colspan="2">3rd</td>
<td colspan="2">4th</td>
<td colspan="2">5th</td>
<td colspan="2">6th</td>
<td colspan="2">7th</td>
<td colspan="2">8th</td>
<td colspan="2">9th</td>
</tr>
</table>
<br />
<div class="sheet-spell-tabs">
<input type="radio" class="sheet-tab-hidden sheet-tab" name="attr_spell_tabs" value="0"><span class="sheet-tab">Cantrips</span>
<input type="radio" class="sheet-tab-hidden sheet-tab" name="attr_spell_tabs" value="1"><span class="sheet-tab">1st</span>
<input type="radio" class="sheet-tab-hidden sheet-tab" name="attr_spell_tabs" value="2"><span class="sheet-tab">2nd</span>
<input type="radio" class="sheet-tab-hidden sheet-tab" name="attr_spell_tabs" value="3"><span class="sheet-tab">3rd</span>
<input type="radio" class="sheet-tab-hidden sheet-tab" name="attr_spell_tabs" value="4"><span class="sheet-tab">4th</span>
<input type="radio" class="sheet-tab-hidden sheet-tab" name="attr_spell_tabs" value="5"><span class="sheet-tab">5th</span>
<input type="radio" class="sheet-tab-hidden sheet-tab" name="attr_spell_tabs" value="6"><span class="sheet-tab">6th</span>
<input type="radio" class="sheet-tab-hidden sheet-tab" name="attr_spell_tabs" value="7"><span class="sheet-tab">7th</span>
<input type="radio" class="sheet-tab-hidden sheet-tab" name="attr_spell_tabs" value="8"><span class="sheet-tab">8th</span>
<input type="radio" class="sheet-tab-hidden sheet-tab" name="attr_spell_tabs" value="9"><span class="sheet-tab">9th</span>
<input type="radio" class="sheet-tab-hidden sheet-tab" name="attr_spell_tabs" value="-1"><span class="sheet-tab">All</span>
</div>
<div class="sheet-sect">
<fieldset class="repeating_spells">
<input type="hidden" class="sheet-toggle-show" name="attr_spell_show" value="1">
<div class="sheet-spell-display sheet-sect sheet-border">
<div class="sheet-table sheet-center" style="width:99%;">
<div class="sheet-table-row">
<span class="sheet-input-sm"><button class="sheet-button" type="roll" name="attr_spell_roll" title="%{selected|repeating_spells_$X_spell_roll}" value="@{spell_macro_text}"></button></span>
<span class="sheet-input-sm"><input type="text" name="attr_spell_memorized" title="@{repeating_spells_$X_spell_memorized}" style="width: 100% ; height: 1.8em" value="0"><br />#Mem</span>
<span class="sheet-input-sm1">
<select name="attr_spell_level" class="sheet-input-select" title="@{repeating_spells_$X_spell_level}">
<option selected>?</option>
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
</select>
<br />Lvl
</span>
<span class="sheet-input-long"><input type="text" name="attr_spell_name" title="@{repeating_spells_$X_spell_name}" style="width:100%; height:1.8em;" placeholder="Spell Name" /><br />Name</span>
<span class="sheet-input-med1"><input type="text" name="attr_spell_school" title="@{repeating_spells_$X_spell_school}" style="width:100%; height:1.8em;" value="N/A" /><br />School</span>
<span class="sheet-input-med1"><input type="text" name="attr_spell_range" title="@{repeating_spells_$X_spell_range}" style="width:100%; height:1.8em;" value="N/A" /><br />Range</span>
<span class="sheet-input-med1"><input type="text" name="attr_spell_duration" title="@{repeating_spells_$X_spell_duration}" style="width:100%; height:1.8em;" value="N/A" /><br />Duration</span>
<span class="sheet-input-med1"><input type="text" name="attr_spell_aoe" title="@{repeating_spells_$X_spell_aoe}" style="width:100%; height:1.8em;" value="N/A" /><br />Area</span>
<span class="sheet-input-med"><input type="text" name="attr_spell_components" title="@{repeating_spells_$X_spell_components}" style="width:100%; height:1.8em;" value="N/A" /><br />Comp</span>
<span class="sheet-input-sm"><input type="text" name="attr_spell_ct" title="@{repeating_spells_$X_spell_ct}" style="width:100%; height:1.8em;" value="N/A" /><br />CT</span>
<span class="sheet-input-med"><input type="text" name="attr_spell_save" title="@{repeating_spells_$X_spell_save}" style="width:100%; height:1.8em;" value="N/A" /><br />Save</span>
<span class="sheet-input"><textarea name="attr_spell_macro_text" class="sheet-macro-text-short" title="@{repeating_spells_$X_spell_macro_text}">&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Casts: @{spell_name}}} {{Level:=@{spell_level}}} {{Range:=@{spell_range}}} {{Duration:=@{spell_duration}}} {{AOE:=@{spell_aoe}}} {{Comp:=@{spell_components}}} {{CT:=@{spell_ct}}} {{Save:=@{spell_save}}} {{freetext=@{spell_description}}}</textarea><br /><span style="white-space: nowrap;">Macro-Text</span></span>
</div>
</div>
<b style="margin-left:20px;">Spell Description</b>
<input type="checkbox" class="sheet-sect-show" title="@{repeating_spells_$X_spell_description_show}" name="attr_spell_description_show" value="1" style="width: 140px; margin: 0 -20px 0 -115px;" /><span></span>
<div class="sheet-table sheet-sect">
<div class="sheet-table-row sheet-center sheet-sect">
<textarea name="attr_spell_description" title="@{repeating_spells_$X_spell_description}" placeholder="Spell Description"></textarea>
</div>
</div>
</div>
</fieldset>
</div>
<div class="sheet-table-row" style="margin-top: 1em;">
<b style="margin-left:20px;">Spells Notes</b>
<input type="checkbox" class="sheet-sect-show" title="@{spellsnotes-show}" name="attr_spellsnotes-show" value="1" style="width: 140px; margin: 0 -20px 0 -115px;" /><span></span>
<div class="sheet-table sheet-sect">
<div class="sheet-table-row sheet-center sheet-sect">
<textarea name="attr_spellsnotes" title="@{spellsnotes}" placeholder="Spells Notes"></textarea>
</div>
</div>
</div>
</div>
<hr>
</div>
<div class="sheet-notes">
<div class="sheet-header">NOTES</div>
<input type="checkbox" class="sheet-sect-show" title="@{notes-info-show}" name="attr_notes-info-show" value="1" style="width: 90px; margin: 0 -20px 0 -60px;" /><span></span>
<div class="sheet-sect">
<div class="sheet-table">
<div class="sheet-table-row sheet-center">
<textarea name="attr_notes" title="@{notes}" placeholder="Misc Notes"></textarea>
</div>
</div>
</div>
<hr>
</div>
<h4>Settings</h4>
<div class="sheet-options">
<span>
<label>
Background:
<select class="sheet-useBackground" name="attr_background" style="width:8em;">
<option value="1">Nothing</option>
<option value="2">Parchment</option>
<option value="3">Goldenrod</option>
<option value="4">Moldvay</option>
</select>
</label>
</span>
<span>
<label>
Roll Template Color:
<select name="attr_color_option" title="@{color_option}" style="width: 8em;">
<option value="black" selected>black</option>
<option value="grey">grey</option>
<option value="darkgrey">darkgrey</option>
<option value="white">white</option>
<option value="red">red</option>
<option value="darkred">darkred</option>
<option value="orange">orange</option>
<option value="darkorange">darkorange</option>
<option value="yellow">yellow</option>
<option value="darkyellow">darkyellow</option>
<option value="green">green</option>
<option value="darkgreen">darkgreen</option>
<option value="blue">blue</option>
<option value="darkblue">darkblue</option>
<option value="purple">purple</option>
<option value="darkpurple">darkpurple</option>
</select>
</label>
</span>
</div>
<div class="sheet-footer sheet-text-small">
<div class="sheet-data">
<span class="sheet-data sheet-center">Questions/feedback?:
<button type="roll" class="sheet-button-url" value="https://app.roll20.net/forum/post/10354613/ad-and-d-1e-update-part-2">Current AD&D1e sheet thread on Roll20.</button>
</span>
</div>
<div class="sheet-data" style="float: right; margin-top: -1.5em;">
<span class="sheet-data sheet-center">Original Author: Adam Ness | Contributions by: Vince &amp; Community. | sheet v.<input name="attr_sheet_version" type="text" value="0" class="sheet-version" readonly />
</span>
</div>
</div>
</div>
</div>
</div>
<div class="sheet-roll_templates">
<!-- Attack Roll Template -->
<rolltemplate class="sheet-rolltemplate-attacks">
<table class="sheet-rolltemplate-attacks {{#color}}color-{{color}}{{/color}}">
{{#name}}
<tr>
<th>{{name}}</th>
</tr>
{{/name}}
{{#subtag}}
<tr>
<td class="sheet-subheader">{{subtag}}</td>
</tr>
{{/subtag}}
{{#attack1}}
<tr>
<td><span class="sheet-tcat">Attack = </span>{{attack1}}</td>
</tr>
{{/attack1}}
{{#damage1vsSM}}
<tr>
<td><span class="sheet-tcat">Damage vs S/M = </span>{{damage1vsSM}}</td>
</tr>
{{/damage1vsSM}}
{{#damage1vsL}}
<tr>
<td><span class="sheet-tcat">Damage vs L = </span>{{damage1vsL}}</td>
</tr>
{{/damage1vsL}}
{{#attack2}}
<tr>
<td><span class="sheet-tcat">Attack 2 = </span>{{attack2}}</td>
</tr>
{{/attack2}}
{{#damage2vsSM}}
<tr>
<td><span class="sheet-tcat">Damage vs S/M = </span>{{damage2vsSM}}</td>
</tr>
{{/damage2vsSM}}
{{#damage2vsL}}
<tr>
<td><span class="sheet-tcat">Damage vs L = </span>{{damage2vsL}}</td>
</tr>
{{/damage2vsL}}
{{#attack3}}
<tr>
<td><span class="sheet-tcat">Attack 3 = </span>{{attack3}}</td>
</tr>
{{/attack3}}
{{#damage3vsSM}}
<tr>
<td><span class="sheet-tcat">Damage vs S/M = </span>{{damage3vsSM}}</td>
</tr>
{{/damage3vsSM}}
{{#damage3vsL}}
<tr>
<td><span class="sheet-tcat">Damage vs L = </span>{{damage3vsL}}</td>
</tr>
{{/damage3vsL}}
{{#attack4}}
<tr>
<td><span class="sheet-tcat">Attack 4 = </span>{{attack4}}</td>
</tr>
{{/attack4}}
{{#damage4vsSM}}
<tr>
<td><span class="sheet-tcat">Damage vs S/M = </span>{{damage4vsSM}}</td>
</tr>
{{/damage4vsSM}}
{{#damage4vsL}}
<tr>
<td><span class="sheet-tcat">Damage vs L = </span>{{damage4vsL}}</td>
</tr>
{{/damage4vsL}}
{{#ToHitAC-10to0}}
<tr>
<td class="sheet-ToHit">-10|-9|-8|-7|-6|-5|-4|-3|-2|-1|&nbsp;**0**<br />{{ToHitAC-10to0}}</td>
</tr>
{{/ToHitAC-10to0}}
{{#ToHitAC1to10}}
<tr>
<td class="sheet-ToHit"> **0**| 1| 2| 3| 4| 5| 6| 7| 8| 9|10<br />{{ToHitAC1to10}}</td>
</tr>
{{/ToHitAC1to10}}
{{#allprops() name subtag color attack1 attack2 attack3 attack4 damage1vsSM damage2vsSM damage3vsSM damage4vsSM damage1vsL damage2vsL damage3vsL damage4vsL ToHitAC-10to0 ToHitAC1to10 WeaponNotes freetext}}
<tr>
<td><span class="sheet-tcat">{{key}} = </span>{{value}}</td>
</tr>
{{/allprops() name subtag color attack1 attack2 attack3 attack4 damage1vsSM damage2vsSM damage3vsSM damage4vsSM damage1vsL damage2vsL damage3vsL damage4vsL ToHitAC-10to0 ToHitAC1to10 WeaponNotes freetext}}
{{#WeaponNotes}}
<tr>
<td class="sheet-text">**Notes:** {{WeaponNotes}}</td>
</tr>
{{/WeaponNotes}}
{{#freetext}}
<tr>
<td colspan="2" class="sheet-text">{{freetext}}</td>
</tr>
{{/freetext}}
</table>
</rolltemplate>
<!-- General Roll Template -->
<rolltemplate class="sheet-rolltemplate-general">
<table class="sheet-rolltemplate-general {{#color}}color-{{color}}{{/color}}">
{{#name}}
<tr>
<th colspan="2">{{name}}</th>
</tr>
{{/name}}
{{#subtag}}
<tr>
<td colspan="2" class="sheet-subheader">{{subtag}}</td>
</tr>
{{/subtag}}
{{#allprops() name subtag freetext color}}
<tr>
<td style="vertical-align:middle;"><span class="sheet-tcat">{{key}}</span></td>
<td>{{value}}</td>
</tr>
{{/allprops() name subtag freetext color}}
{{#freetext}}
<tr>
<td colspan="2" class="sheet-text">{{freetext}}</td>
</tr>
{{/freetext}}
</table>
</rolltemplate>
</div>
<script type="text/worker">
// type="text/worker"
'use strict';
//custom handling for number type and logs
const int = (score, error = 0) => parseInt(score) || error;
const float = (score, error = 0) => parseFloat(score) || error;
const clog = (text, color = 'green') => {
const message = `%c ${text}`;
console.log(message, `color: ${color}; font-weight:bold`);
};
// during version updates, we need to check that an attribute exists and is not equal to its default, before updating it.
const doUpdate = (stat, def = 0) => (typeof stat != 'undefined' && stat != def);
//handles regex for testing and replacing macrotext attributes
const replaceSet = (attr, set) => {
// set must be an object, with key: value pairs of 'itemToReplace': 'replaceWith'.
Object.entries(set).forEach(([toReplace, replaceWith]) => {
attr = attr.replace(new RegExp(toReplace.replace('{', '\{'), 'gi'), replaceWith);
});
return attr;
};
/* ===== Repeating Sum PARAMETERS ==========
destinations = the name of the attribute that stores the total quantity
section = name of repeating fieldset, WITHOUT "repeating_"
fields = the name of the attribute field to be summed
destination and fields both can be a single attribute: 'weight'
or an array of attributes: ['weight','number','equipped']
*/
const repeatingSum = (destinations, section, fields) => {
if (!Array.isArray(destinations)) destinations = [destinations];
if (!Array.isArray(fields)) fields = [fields];
getSectionIDs(`repeating_${section}`, idArray => {
const attrArray = idArray.reduce((m, id) => [...m, ...(fields.map(field => `repeating_${section}_${id}_${field}`))], []);
getAttrs([...attrArray], v => {
const getValue = (section, id, field) => v[`repeating_${section}_${id}_${field}`] === 'on' ? 1 : parseFloat(v[`repeating_${section}_${id}_${field}`]) || 0;
const commonMultipliers = (fields.length <= destinations.length) ? [] : fields.splice(destinations.length, fields.length - destinations.length);
const output = {};
destinations.forEach((destination, index) => {
output[destination] = idArray.reduce((total, id) => total + getValue(section, id, fields[index]) * commonMultipliers.reduce((subtotal, mult) => subtotal * getValue(section, id, mult), 1), 0);
});
setAttrs(output);
});
});
};
//weapon weight
on('change:repeating_weapon:weapon_weight change:repeating_weapon:weapon_quantity remove:repeating_weapon', function () {
repeatingSum('total_weapon_weight', 'weapon', ['weapon_weight', 'weapon_quantity']);
});
//weapon cost
on('change:repeating_weapon:weapon_cost change:repeating_weapon:weapon_quantity remove:repeating_weapon', function () {
repeatingSum('total_weapon_cost', 'weapon', ['weapon_cost', 'weapon_quantity']);
});
//equipment weight
on('change:repeating_equipment:equipment_weight change:repeating_equipment:equipment_quantity change:repeating_equipment:equipment_carried remove:repeating_equipment', function () {
repeatingSum('total_equipment_weight', 'equipment', ['equipment_weight', 'equipment_quantity', 'equipment_carried']);
});
//equipment cost
on('change:repeating_equipment:equipment_cost change:repeating_equipment:equipment_quantity remove:repeating_equipment', function () {
repeatingSum('total_equipment_cost', 'equipment', ['equipment_cost', 'equipment_quantity']);
});
on('sheet:opened change:pp change:gp change:ep change:sp change:cp change:armor_weight change:armor_cost', function () {
getAttrs(['pp', 'gp', 'ep', 'sp', 'cp', 'armor_weight', 'armor_cost'], function (values) {
setAttrs({
total_coin_weight: Math.round((float(values.pp) + float(values.gp) + float(values.ep) + float(values.sp) + float(values.cp)) / 1),
total_armor_weight: float(values.armor_weight),
total_armor_cost: float(values['armor_cost']).toFixed(2)
});
});
});
on('sheet:opened change:total_armor_weight change:total_weapon_weight change:total_coin_weight change:total_equipment_weight change:repeating_equipment remove:repeating_equipment change:repeating_weapon remove:repeating_weapon change:pp change:gp change:ep change:sp change:cp change:armor_weight change:armor_cost change:total_armor_cost change:total_weapon_cost change:total_equipment_cost', function () {
getAttrs(['total_armor_weight', 'total_weapon_weight', 'total_coin_weight', 'total_equipment_weight', 'total_armor_cost', 'total_weapon_cost', 'total_equipment_cost'], function (values) {
setAttrs({
total_weight: Math.round(float(values.total_armor_weight) + float(values.total_weapon_weight) + float(values.total_coin_weight) + float(values.total_equipment_weight)),
total_cost: (float(values['total_armor_cost']) + float(values['total_weapon_cost']) + float(values['total_equipment_cost'])).toFixed(2)
});
});
});
/* check and set encumbrance */
on('sheet:opened change:normal_load change:heavy_load change:very_heavy_load change:max_load change:total_weight', function () {
getAttrs(['normal_load', 'heavy_load', 'very_heavy_load', 'max_load', 'total_weight'], function (values) {
if (values.total_weight <= values.normal_load) {
setAttrs({
current_encumbrance: 0
});
clog('===== Encumbrance is Normal =====');
} else if (values.total_weight > values.normal_load && values.total_weight <= values.heavy_load) {
setAttrs({
current_encumbrance: 1
});
clog('===== Encumbrance is Heavy =====');
} else if (values.total_weight > values.heavy_load && values.total_weight <= values.very_heavy_load) {
setAttrs({
current_encumbrance: 2
});
clog('===== Encumbrance is Very Heavy =====');
} else {
setAttrs({
current_encumbrance: 3
});
clog('===== Encumbrance is Max =====');
}
});
});
// Spell Tabs
on('change:spell_tabs', () => {
getSectionIDs('repeating_spells', idarray => {
const fieldnames = [];
idarray.forEach(id => {
fieldnames.push(`repeating_spells_${id}_spell_level`);
});
getAttrs(['spell_tabs', ...fieldnames], v => {
const output = {};
const level = +v.spell_tabs || 0;
idarray.forEach(id => {
const thislevel = +v[`repeating_spells_${id}_spell_level`] || 0;
output[`repeating_spells_${id}_spell_show`] = (level === -1 || level === thislevel) ? 1 : 0;
});
setAttrs(output);
});
});
});
//Versioning
on('sheet:opened', () => {
// SET LATEST VERSION HERE. needs to be => the last update made in versionator below
let final_version = 1.58;
getAttrs(['sheet_version'], function (v) {
let current_version = float(v['sheet_version']);
clog('Current sheet data version:' + current_version + ', Sheet code version:' + final_version);
versionator(current_version, final_version);
});
});
//versioning routine to handle attribute migration
const versionator = (current_version, final_version) => {
if (current_version < 0.1) {
dmgSwap(0.1, final_version);
} else if (current_version < 1.2) {
maxSwap(1.2, final_version);
} else if (current_version < 1.5) {
nwpMacroUpdate(1.5, final_version);
} else if (current_version < 1.52) {
weaponNameFix(1.52, final_version);
} else if (current_version < 1.53) {
spellNameFix(1.53, final_version);
} else if (current_version < 1.54) {
equipmentNameFix(1.54, final_version);
} else if (current_version < 1.55) {
abilityNameFix(1.55, final_version);
} else if (current_version < 1.56) {
nwpNameFix(1.56, final_version);
} else if (current_version < 1.57) {
macroColorUpdate(1.57, final_version);
}
// all updates completed
else if (current_version < final_version) {
setAttrs({
sheet_version: final_version
});
}
};
//START use blankUpdateTemplate below as a guide to add updates to versionator.
const blankUpdateTemplate = function (current_version, final_version) {
// have this line up near the start
const update = {};
// do your stuff = geSectionIDs, getAttrs, all the various calculations
// then end the worker
update.sheet_version = current_version;
setAttrs(update, {
silent: true
}, versionator(current_version, final_version));
// dont forget any close brackets for getattrs, etc.
};
// END blankUpdateTemplate
//fix duplicated repeating attribute names. Replaces old attribute names in macro_text
const nwpNameFix = function (current_version, final_version) {
getSectionIDs('repeating_nonweaponproficiencies', idarray => {
const fieldnames = [];
idarray.forEach(id => fieldnames.push(
`repeating_nonweaponproficiencies_${id}_roll`,
`repeating_nonweaponproficiencies_${id}_name`,
`repeating_nonweaponproficiencies_${id}_rAttribute`,
`repeating_nonweaponproficiencies_${id}_short_description`,
`repeating_nonweaponproficiencies_${id}_rSlots`,
`repeating_nonweaponproficiencies_${id}_rModifier`,
`repeating_nonweaponproficiencies_${id}_macro-text`,
`repeating_nonweaponproficiencies_${id}_description-show`,
`repeating_nonweaponproficiencies_${id}_description`
));
getAttrs([...fieldnames], v => {
const update = {};
const namesToFix = {
'@{name}': '@{nwp_name}',
'@{rAttribute}': '@{nwp_attribute}',
'@{rSlots}': '@{nwp_slots}',
'@{rModifier}': '@{nwp_modifier}',
'@{short_description}': '@{nwp_short_description}',
'@{macro-text}': '@{nwp_macro_text}',
'@{description}': '@{nwp_description}'
};
const oldMacrotext = "&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Non Weapon Proficiency: @{name}}} {{Proficiency Check=[[ 1d20 + [[@{rmodifier}]][MOD] + [[?{Additional modifier?|0}]][MOD] ]] vs [[ @{rAttribute}[ATTR] ]]}}{{freetext=@{short_description}}}";
idarray.forEach(id => {
if (doUpdate(v[`repeating_nonweaponproficiencies_${id}_roll`])) update[`repeating_nonweaponproficiencies_${id}_nwp_roll`] = v[`repeating_nonweaponproficiencies_${id}_roll`];
if (doUpdate(v[`repeating_nonweaponproficiencies_${id}_name`])) update[`repeating_nonweaponproficiencies_${id}_nwp_name`] = v[`repeating_nonweaponproficiencies_${id}_name`];
if (doUpdate(v[`repeating_nonweaponproficiencies_${id}_rAttribute`])) update[`repeating_nonweaponproficiencies_${id}_nwp_attribute`] = v[`repeating_nonweaponproficiencies_${id}_rAttribute`].toLowerCase();
if (doUpdate(v[`repeating_nonweaponproficiencies_${id}_short_description`])) update[`repeating_nonweaponproficiencies_${id}_nwp_short_description`] = v[`repeating_nonweaponproficiencies_${id}_short_description`];
if (doUpdate(v[`repeating_nonweaponproficiencies_${id}_rSlots`])) update[`repeating_nonweaponproficiencies_${id}_nwp_slots`] = int(v[`repeating_nonweaponproficiencies_${id}_rSlots`]);
if (doUpdate(v[`repeating_nonweaponproficiencies_${id}_rModifier`])) update[`repeating_nonweaponproficiencies_${id}_nwp_modifier`] = int(v[`repeating_nonweaponproficiencies_${id}_rModifier`]);
if (doUpdate(v[`repeating_nonweaponproficiencies_${id}_macro-text`], oldMacrotext))
update[`repeating_nonweaponproficiencies_${id}_nwp_macro_text`] = replaceSet(v[`repeating_nonweaponproficiencies_${id}_macro-text`], namesToFix);
if (doUpdate(v[`repeating_nonweaponproficiencies_${id}_description-show`])) update[`repeating_nonweaponproficiencies_${id}_nwp_description_show`] = int(v[`repeating_nonweaponproficiencies_${id}_description-show`]);
if (doUpdate(v[`repeating_nonweaponproficiencies_${id}_description`])) update[`repeating_nonweaponproficiencies_${id}_nwp_description`] = v[`repeating_nonweaponproficiencies_${id}_description`];
});
update.sheet_version = current_version;
clog('nwpNameFix check completed on: ' + fieldnames);
setAttrs(update, {
silent: true
}, versionator(current_version, final_version)); //Update
});
});
};
const abilityNameFix = function (current_version, final_version) {
getSectionIDs('repeating_ability', idarray => {
const fieldnames = [];
idarray.forEach(id => fieldnames.push(
`repeating_ability_${id}_roll`,
`repeating_ability_${id}_name`,
`repeating_ability_${id}_short_description`,
`repeating_ability_${id}_current`,
`repeating_ability_${id}_current_max`,
`repeating_ability_${id}_macro-text`,
`repeating_ability_${id}_description`,
`repeating_ability_${id}_description-show`
));
getAttrs([...fieldnames], v => {
const update = {};
const namesToFix = {
'@{name}': '@{ability_name}',
'@{current}': '@{ability_current}',
'@{current_max}': '@{ability_current_max}',
'@{short_description}': '@{ability_short_description}',
'@{macro-text}': '@{ability_macro_text}',
'@{description}': '@{ability_description}'
};
const oldMacrotext = "&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Special Ability: @{name}}} {{freetext=@{short_description} @{description}}}";
idarray.forEach(id => {
if (doUpdate(v[`repeating_ability_${id}_roll`])) update[`repeating_ability_${id}_ability_roll`] = v[`repeating_ability_${id}_roll`];
if (doUpdate(v[`repeating_ability_${id}_name`])) update[`repeating_ability_${id}_ability_name`] = v[`repeating_ability_${id}_name`];
if (doUpdate(v[`repeating_ability_${id}_short_description`])) update[`repeating_ability_${id}_ability_short_description`] = v[`repeating_ability_${id}_short_description`];
if (doUpdate(v[`repeating_ability_${id}_current`])) update[`repeating_ability_${id}_ability_current`] = int(v[`repeating_ability_${id}_current`]);
if (doUpdate(v[`repeating_ability_${id}_current_max`])) update[`repeating_ability_${id}_ability_current_max`] = int(v[`repeating_ability_${id}_current_max`]);
if (doUpdate(v[`repeating_ability_${id}_macro-text`], oldMacrotext))
update[`repeating_ability_${id}_ability_macro_text`] = replaceSet(v[`repeating_ability_${id}_macro-text`], namesToFix);
if (doUpdate(v[`repeating_ability_${id}_description`])) update[`repeating_ability_${id}_ability_description`] = v[`repeating_ability_${id}_description`];
if (doUpdate(v[`repeating_ability_${id}_description-show`])) update[`repeating_ability_${id}_ability_description_show`] = int(v[`repeating_ability_${id}_description-show`]);
});
update.sheet_version = current_version;
clog('abilityNameFix check completed on: ' + fieldnames);
setAttrs(update, {
silent: true
}, versionator(current_version, final_version)); //Update
});
});
};
const equipmentNameFix = function (current_version, final_version) {
getSectionIDs('repeating_equipment', idarray => {
const fieldnames = [];
idarray.forEach(id => fieldnames.push(
`repeating_equipment_${id}_item-show`,
`repeating_equipment_${id}_item`,
`repeating_equipment_${id}_location`,
`repeating_equipment_${id}_carried`,
`repeating_equipment_${id}_quantity`,
`repeating_equipment_${id}_quantity_max`,
`repeating_equipment_${id}_weight`,
`repeating_equipment_${id}_cost`
));
getAttrs([...fieldnames], v => {
const update = {};
idarray.forEach(id => {
if (doUpdate(v[`repeating_equipment_${id}_item-show`])) update[`repeating_equipment_${id}_equipment_item_show`] = v[`repeating_equipment_${id}_item-show`];
if (doUpdate(v[`repeating_equipment_${id}_item`])) update[`repeating_equipment_${id}_equipment_item`] = v[`repeating_equipment_${id}_item`];
if (doUpdate(v[`repeating_equipment_${id}_location`])) update[`repeating_equipment_${id}_equipment_location`] = v[`repeating_equipment_${id}_location`];
if (doUpdate(v[`repeating_equipment_${id}_carried`])) update[`repeating_equipment_${id}_equipment_carried`] = v[`repeating_equipment_${id}_carried`];
if (doUpdate(v[`repeating_equipment_${id}_quantity`])) update[`repeating_equipment_${id}_equipment_quantity`] = float(v[`repeating_equipment_${id}_quantity`]);
if (doUpdate(v[`repeating_equipment_${id}_quantity_max`])) update[`repeating_equipment_${id}_equipment_quantity_max`] = float(v[`repeating_equipment_${id}_quantity_max`]);
if (doUpdate(v[`repeating_equipment_${id}_weight`])) update[`repeating_equipment_${id}_equipment_weight`] = float(v[`repeating_equipment_${id}_weight`]);
if (doUpdate(v[`repeating_equipment_${id}_cost`])) update[`repeating_equipment_${id}_equipment_cost`] = float(v[`repeating_equipment_${id}_cost`]);
});
update.sheet_version = current_version;
clog('equipmentNameFix check completed on: ' + fieldnames);
setAttrs(update, {
silent: true
}, versionator(current_version, final_version)); //Update
});
});
};
const spellNameFix = function (current_version, final_version) {
getSectionIDs('repeating_spells', idarray => {
const fieldnames = [];
idarray.forEach(id => fieldnames.push(
`repeating_spells_${id}_roll`,
`repeating_spells_${id}_memorized`,
`repeating_spells_${id}_level`,
`repeating_spells_${id}_name`,
`repeating_spells_${id}_school`,
`repeating_spells_${id}_range`,
`repeating_spells_${id}_duration`,
`repeating_spells_${id}_aoe`,
`repeating_spells_${id}_components`,
`repeating_spells_${id}_ct`,
`repeating_spells_${id}_save`,
`repeating_spells_${id}_macro-text`,
`repeating_spells_${id}_description`,
`repeating_spells_${id}_description-show`
));
getAttrs([...fieldnames], v => {
const update = {};
const namesToFix = {
'@{memorized}': '@{spell_memorized}',
'@{level}': '@{spell_level}',
'@{name}': '@{spell_name}',
'@{school}': '@{spell_school}',
'@{range}': '@{spell_range}',
'@{duration}': '@{spell_duration}',
'@{aoe}': '@{spell_aoe}',
'@{components}': '@{spell_components}',
'@{ct}': '@{spell_ct}',
'@{save}': '@{spell_save}',
'@{macro-text}': '@{spell_macro_text}',
'@{description}': '@{spell_description}'
};
const oldMacrotext = "&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Casts: @{name}}} {{Level:=@{level}}} {{Range:=@{range}}} {{Duration:=@{duration}}} {{AOE:=@{aoe}}} {{Comp:=@{components}}} {{CT:=@{ct}}} {{Save:=@{save}}} {{freetext=@{description}}}";
idarray.forEach(id => {
if (doUpdate(v[`repeating_spells_${id}_roll`])) update[`repeating_spells_${id}_spell_roll`] = v[`repeating_spells_${id}_roll`];
if (doUpdate(v[`repeating_spells_${id}_memorized`])) update[`repeating_spells_${id}_spell_memorized`] = int(v[`repeating_spells_${id}_memorized`]);
if (doUpdate(v[`repeating_spells_${id}_level`])) update[`repeating_spells_${id}_spell_level`] = v[`repeating_spells_${id}_level`];
if (doUpdate(v[`repeating_spells_${id}_name`])) update[`repeating_spells_${id}_spell_name`] = v[`repeating_spells_${id}_name`];
if (doUpdate(v[`repeating_spells_${id}_school`])) update[`repeating_spells_${id}_spell_school`] = v[`repeating_spells_${id}_school`];
if (doUpdate(v[`repeating_spells_${id}_range`])) update[`repeating_spells_${id}_spell_range`] = v[`repeating_spells_${id}_range`];
if (doUpdate(v[`repeating_spells_${id}_duration`])) update[`repeating_spells_${id}_spell_duration`] = v[`repeating_spells_${id}_duration`];
if (doUpdate(v[`repeating_spells_${id}_aoe`])) update[`repeating_spells_${id}_spell_aoe`] = v[`repeating_spells_${id}_aoe`];
if (doUpdate(v[`repeating_spells_${id}_components`])) update[`repeating_spells_${id}_spell_components`] = v[`repeating_spells_${id}_components`];
if (doUpdate(v[`repeating_spells_${id}_ct`])) update[`repeating_spells_${id}_spell_ct`] = v[`repeating_spells_${id}_ct`];
if (doUpdate(v[`repeating_spells_${id}_save`])) update[`repeating_spells_${id}_spell_save`] = v[`repeating_spells_${id}_save`];
if (doUpdate(v[`repeating_spells_${id}_macro-text`], oldMacrotext))
update[`repeating_spells_${id}_spell_macro_text`] = replaceSet(v[`repeating_spells_${id}_macro-text`], namesToFix);
if (doUpdate(v[`repeating_spells_${id}_description`])) update[`repeating_spells_${id}_spell_description`] = v[`repeating_spells_${id}_description`];
if (doUpdate(v[`repeating_spells_${id}_description-show`])) update[`repeating_spells_${id}_spell_description_show`] = int(v[`repeating_spells_${id}_description-show`]);
});
update.sheet_version = current_version;
clog('spellNameFix check completed on: ' + fieldnames);
setAttrs(update, {
silent: true
}, versionator(current_version, final_version)); //Update
});
});
};
const weaponNameFix = function (current_version, final_version) {
getSectionIDs('repeating_weapon', idarray => {
const fieldnames = [];
idarray.forEach(id => fieldnames.push(
`repeating_weapon_${id}_roll`,
`repeating_weapon_${id}_weaponname`,
`repeating_weapon_${id}_tohitbonus`,
`repeating_weapon_${id}_magicbonus`,
`repeating_weapon_${id}_attackdmgbonus`,
`repeating_weapon_${id}_whisper_to-hit`,
`repeating_weapon_${id}_macro-text`,
`repeating_weapon_${id}_damagesmallmedium`,
`repeating_weapon_${id}_damagelarge`,
`repeating_weapon_${id}_rateoffire`,
`repeating_weapon_${id}_range`,
`repeating_weapon_${id}_quantity`,
`repeating_weapon_${id}_weight`,
`repeating_weapon_${id}_weaponspeed`,
`repeating_weapon_${id}_cost`,
`repeating_weapon_${id}_weaponnotes`
));
getAttrs([...fieldnames], v => {
const update = {};
const namesToFix = {
'@{rateoffire}': '@{weapon_rateoffire}',
'@{weaponname}': '@{weapon_name}',
'@{tohitbonus}': '@{weapon_tohitbonus}',
'@{magicbonus}': '@{weapon_magicbonus}',
'@{attackdmgbonus}': '@{weapon_attackdmgbonus}',
'@{whisper_to-hit}': '@{weapon_whisper_to_hit}',
'@{damagesmallmedium}': '@{weapon_damagesmallmedium}',
'@{damagelarge}': '@{weapon_damagelarge}',
'@{range}': '@{weapon_range}',
'@{quantity}': '@{weapon_quantity}',
'@{weight}': '@{weapon_weight}',
'@{weaponspeed}': '@{weapon_speed}',
'@{cost}': '@{weapon_cost}',
'@{macro-text}': '@{weapon_macro_text}',
'@{weaponnotes}': '@{weapon_notes}'
};
const oldMacrotext = "&{template:attacks} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=@{WeaponName}}} {{attack1=[[1d20 + @{ToHitBonus}[BON] + @{MagicBonus}[MAG] + ?{To Hit Modifier?|0}[MOD] ]]}} {{damage1vsSM=[[@{DamageSmallMedium} + @{AttackDmgBonus}[BON] + @{MagicBonus}[MAG] + ?{Damage Modifier?|0}[MOD] ]]}} {{damage1vsL=[[@{DamageLarge} + @{AttackDmgBonus}[BON] + @{MagicBonus}[MAG] + ?{Damage Modifier?|0}[MOD] ]]}} {{WeaponNotes=@{WeaponNotes}}} @{whisper_to-hit}";
idarray.forEach(id => {
if (doUpdate(v[`repeating_weapon_${id}_rateoffire`])) update[`repeating_weapon_${id}_weapon_rateoffire`] = int(v[`repeating_weapon_${id}_rateoffire`]);
if (doUpdate(v[`repeating_weapon_${id}_roll`])) update[`repeating_weapon_${id}_weapon_roll`] = v[`repeating_weapon_${id}_roll`];
if (doUpdate(v[`repeating_weapon_${id}_weaponname`])) update[`repeating_weapon_${id}_weapon_name`] = v[`repeating_weapon_${id}_weaponname`];
if (doUpdate(v[`repeating_weapon_${id}_tohitbonus`])) update[`repeating_weapon_${id}_weapon_tohitbonus`] = int(v[`repeating_weapon_${id}_tohitbonus`]);
if (doUpdate(v[`repeating_weapon_${id}_magicbonus`])) update[`repeating_weapon_${id}_weapon_magicbonus`] = int(v[`repeating_weapon_${id}_magicbonus`]);
if (doUpdate(v[`repeating_weapon_${id}_attackdmgbonus`])) update[`repeating_weapon_${id}_weapon_attackdmgbonus`] = int(v[`repeating_weapon_${id}_attackdmgbonus`]);
if (doUpdate(v[`repeating_weapon_${id}_whisper_to-hit`])) update[`repeating_weapon_${id}_weapon_whisper_to_hit`] = v[`repeating_weapon_${id}_whisper_to-hit`];
if (doUpdate(v[`repeating_weapon_${id}_macro-text`], oldMacrotext))
update[`repeating_weapon_${id}_weapon_macro_text`] = replaceSet(v[`repeating_weapon_${id}_macro-text`], namesToFix);
if (doUpdate(v[`repeating_weapon_${id}_damagesmallmedium`])) update[`repeating_weapon_${id}_weapon_damagesmallmedium`] = v[`repeating_weapon_${id}_damagesmallmedium`];
if (doUpdate(v[`repeating_weapon_${id}_damagelarge`])) update[`repeating_weapon_${id}_weapon_damagelarge`] = v[`repeating_weapon_${id}_damagelarge`];
if (doUpdate(v[`repeating_weapon_${id}_range`])) update[`repeating_weapon_${id}_weapon_range`] = v[`repeating_weapon_${id}_range`];
if (doUpdate(v[`repeating_weapon_${id}_quantity`])) update[`repeating_weapon_${id}_weapon_quantity`] = float(v[`repeating_weapon_${id}_quantity`]);
if (doUpdate(v[`repeating_weapon_${id}_weight`])) update[`repeating_weapon_${id}_weapon_weight`] = float(v[`repeating_weapon_${id}_weight`]);
if (doUpdate(v[`repeating_weapon_${id}_weaponspeed`])) update[`repeating_weapon_${id}_weapon_speed`] = int(v[`repeating_weapon_${id}_weaponspeed`]);
if (doUpdate(v[`repeating_weapon_${id}_cost`])) update[`repeating_weapon_${id}_weapon_cost`] = float(v[`repeating_weapon_${id}_cost`]);
if (doUpdate(v[`repeating_weapon_${id}_weaponnotes`])) update[`repeating_weapon_${id}_weapon_notes`] = v[`repeating_weapon_${id}_weaponnotes`];
});
update.sheet_version = current_version;
clog('weaponNameFix check completed on: ' + fieldnames);
setAttrs(update, {
silent: true
}, versionator(current_version, final_version)); //Update
});
});
};
//replace default macro-text of non-weapon proficiencies ONLY IF they haven't been edited
const nwpMacroUpdate = function (current_version, final_version) {
var update = {},
updateNwps = {};
getSectionIDs('repeating_nonweaponproficiencies', function (idnwps) {
const attrsNWPs = [];
_.each(idnwps, function (itemid) {
attrsNWPs.push('repeating_nonweaponproficiencies_' + itemid + '_macro-text');
});
getAttrs([...attrsNWPs], function (v) {
const replacements = {
nwp_old: '&{template:general} {{name=@{character_name}}} {{subtag=Non Weapon Proficiency: @{name}}} {{=@{short_description}}}{{Success Amount=[[((@{rAttribute})+(@{rSlots}-1)-1d20)cs>1cf<-1]]}}',
nwp_new: '&{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Non Weapon Proficiency: @{name}}} {{Proficiency Check=[[ 1d20 + [[@{rmodifier}]][MOD] + [[?{Additional modifier?|0}]][MOD] ]] vs [[ @{rAttribute}[ATTR] ]]}}{{freetext=@{short_description}}}'
};
_.each(idnwps, function (id) {
if (v['repeating_nonweaponproficiencies_' + id + '_macro-text']) {
update['repeating_nonweaponproficiencies_' + id + '_macro-text'] = v['repeating_nonweaponproficiencies_' + id + '_macro-text'].replace(replacements.nwp_old, replacements.nwp_new);
clog('nwpMacroUpdate check completed on: ' + attrsNWPs);
}
});
update.sheet_version = current_version;
setAttrs( update, {
silent: true
}, versionator(current_version, final_version)); //Update
});
});
};
//add {{color=@{color}}} to all repeating macro-text
const macroColorUpdate = function (current_version, final_version) {
var update = {},
updateNwp = {},
updateWeapon = {},
updateAbility = {},
updateSpells = {};
getSectionIDs('repeating_nonweaponproficiencies', function (idnwps) {
getSectionIDs('repeating_weapon', function (idweapons) {
getSectionIDs('repeating_ability', function (idabilities) {
getSectionIDs('repeating_spells', function (idspells) {
const attrsNWP = [],
attrsWeapon = [],
attrsAbility = [],
attrsSpells = [];
_.each(idnwps, function (itemid) {
attrsNWP.push('repeating_nonweaponproficiencies_' + itemid + '_nwp_macro_text');
});
_.each(idweapons, function (itemid) {
attrsWeapon.push('repeating_weapon_' + itemid + '_weapon_macro_text');
});
_.each(idabilities, function (itemid) {
attrsAbility.push('repeating_ability_' + itemid + '_ability_macro_text');
});
_.each(idspells, function (itemid) {
attrsSpells.push('repeating_spells_' + itemid + '_spell_macro_text');
});
getAttrs([...attrsNWP, ...attrsWeapon, ...attrsAbility, ...attrsSpells], function (v) {
const replacements = {
nwp_old: '&{template:general} {{name=@{character_name}}}',
nwp_new: '&{template:general} {{color=@{color_option}}} {{name=@{character_name}}}',
wpn_old: '&{template:attacks} {{name=@{character_name}}}',
wpn_new: '&{template:attacks} {{color=@{color_option}}} {{name=@{character_name}}}',
abl_old: '&{template:general} {{name=@{character_name}}}',
abl_new: '&{template:general} {{color=@{color_option}}} {{name=@{character_name}}}',
spl_old: '&{template:general} {{name=@{character_name}}}',
spl_new: '&{template:general} {{color=@{color_option}}} {{name=@{character_name}}}'
};
_.each(idnwps, function (id) {
if (v['repeating_nonweaponproficiencies_' + id + '_nwp_macro_text']) {
update['repeating_nonweaponproficiencies_' + id + '_nwp_macro_text'] = v['repeating_nonweaponproficiencies_' + id + '_nwp_macro_text'].replace(replacements.nwp_old, replacements.nwp_new);
clog('nwpMacroUpdate check completed on: ' + attrsNWP);
}
});
_.each(idweapons, function (id) {
if (v['repeating_weapon_' + id + '_weapon_macro_text']) {
update['repeating_weapon_' + id + '_weapon_macro_text'] = v['repeating_weapon_' + id + '_weapon_macro_text'].replace(replacements.wpn_old, replacements.wpn_new);
clog('colorUpdate check completed on: ' + attrsWeapon);
}
});
_.each(idabilities, function (id) {
if (v['repeating_ability_' + id + '_ability_macro_text']) {
update['repeating_ability_' + id + '_ability_macro_text'] = v['repeating_ability_' + id + '_ability_macro_text'].replace(replacements.abl_old, replacements.abl_new);
clog('colorUpdate check completed on: ' + attrsAbility);
}
});
_.each(idspells, function (id) {
if (v['repeating_spells_' + id + '_spell_macro_text']) {
update['repeating_spells_' + id + '_spell_macro_text'] = v['repeating_spells_' + id + '_spell_macro_text'].replace(replacements.spl_old, replacements.spl_new);
clog('colorUpdate check completed on: ' + attrsSpells);
}
});
update.sheet_version = current_version;
setAttrs( update, {
silent: true
}, versionator(current_version, final_version)); //Update
});
});
});
});
});
};
//fixes attribute name conflict
const dmgSwap = function (current_version, final_version) {
// copy DmgBonus value to AttackDmgBonus
// replace all instances of @{DmgBonus} with @{AttackDmgBonus} in macro-text
//Get oldSectionID
getSectionIDs('repeating_weapon', function (idarray) {
const fieldnames = [];
_.each(idarray, function (currentID) {
fieldnames.push(
'repeating_weapon_' + currentID + '_DmgBonus',
'repeating_weapon_' + currentID + '_macro-text'
);
});
getAttrs([...fieldnames], function (v) {
const update = {};
const macrodefault = '&{template:attacks} {{name=@{character_name}}} {{subtag=@{WeaponName}}} {{attack1=[[1d20 + @{ToHitBonus}[BON] + @{MagicBonus}[MAG] + ?{To Hit Modifier?|0}[MOD] ]]}} {{damage1vsSM=[[@{DamageSmallMedium} + @{DmgBonus}[BON] + @{MagicBonus}[MAG] + ?{Damage Modifier?|0}[MOD] ]]}} {{damage1vsL=[[@{DamageLarge} + @{AttackDmgBonus}[BON] + @{MagicBonus}[MAG] + ?{Damage Modifier?|0}[MOD] ]]}} {{WeaponNotes=@{WeaponNotes}}} @{whisper_to-hit}';
_.each(idarray, function (currentID) {
const macrotext = v['repeating_weapon_' + currentID + '_macro-text'] || macrodefault;
//replaces old attribute value with new
update['repeating_weapon_' + currentID + '_macro-text'] = macrotext.replace(new RegExp('@{DmgBonus}', 'g'), '@{AttackDmgBonus}');
update['repeating_weapon_' + currentID + '_AttackDmgBonus'] = int(v['repeating_weapon_' + currentID + '_DmgBonus']);
});
update.sheet_version = current_version;
setAttrs(update, {
silent: true
//Update
}, versionator(current_version, final_version));
clog('dmgSwap check completed on: ' + fieldnames);
});
});
};
//fixes attribute name conflict
const maxSwap = function (current_version, final_version) {
//Get oldSectionID
getSectionIDs('repeating_ability', function (idarray) {
const fieldnames = [];
_.each(idarray, function (currentID) {
fieldnames.push('repeating_ability_' + currentID + '_max');
});
getAttrs([...fieldnames], v => {
var update = {};
_.each(idarray, function (currentID) {
//replaces old attribute value with new
update['repeating_ability_' + currentID + '_current_max'] = int(v['repeating_ability_' + currentID + '_max']);
});
update.sheet_version = current_version;
setAttrs(update, {
silent: true
//Update
}, versionator(current_version, final_version));
clog('maxSwap check completed on: ' + fieldnames);
});
});
};
</script>