mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 19:52:29 +00:00
2033 lines
103 KiB
HTML
2033 lines
103 KiB
HTML
<div>
|
||
|
||
<div class="top-ribbon">
|
||
<input type="text" name="attr_version" class="none " value="0.5" title="Sheet Version" />
|
||
<div style="display:flex; flex-direction:row-reverse;">
|
||
<details>
|
||
<summary><h3 style="display:flex; flex-direction:row-reverse; font-family: 'Pictos'; cursor:pointer;">y</h3></summary>
|
||
|
||
<div style="display:flex; flex-direction:row; length:100%; margin-left:-800px;">
|
||
|
||
<input type="radio" name="attr_tab" class="sheet-tab sheet-tab1" value="1" title="PC" checked="checked" /><span></span>
|
||
<input type="radio" name="attr_tab" class="sheet-tab sheet-tab2" value="2" title="NPC" /><span></span>
|
||
<input type="radio" name="attr_tab" class="none sheet-tab sheet-tab3" value="3" title="Location" /><span></span>
|
||
<input type="radio" name="attr_tab" class="none sheet-tab sheet-tab4" value="4" title="Faction" /><span></span>
|
||
|
||
<div>
|
||
<div class="sheet-flexed" style=""><div class="sheet-slant "><label class="sheet-slant">Whisper</label></div><select name="attr_whisper" style="margin-left:10px;width:100px;"> <option value="">Everyone</option><option value="/w gm ">GM</option></select></div>
|
||
</div>
|
||
|
||
</div>
|
||
</details>
|
||
</div>
|
||
<div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div class ="Yellow-Ribbon">
|
||
|
||
<div class="sheet-flexed"><div class="sheet-slant " style="justify-items:start;"><label class="sheet-slant">Name</label></div><input type="text" class="sheet-attribword" name="attr_character_name" style="width: min(200px, 400px);" placeholder=" Character Name"/></div>
|
||
|
||
<input type="radio" name="attr_flexed_show" class="sheet-show1" value="1" style="display:none;" title="PC" checked="checked"/><span></span>
|
||
<input type="radio" name="attr_flexed_show" class="none sheet-tab sheet-show2" value="2" title="NPC" /><span></span>
|
||
<input type="radio" name="attr_flexed_show" class="none sheet-tab sheet-tab3" value="3" title="Location" /><span></span>
|
||
<input type="radio" name="attr_flexed_show" class="none sheet-tab sheet-tab4" value="4" title="Faction" /><span></span>
|
||
<div class="none sheet-flexed"id="hitpoints"><div class="sheet-slant " ><label class="sheet-slant">Hit Points</label></div><input type="number" class="sheet-circle" name="attr_hp" style="width:40px;margin:5px;"/></div>
|
||
<div class="none sheet-flexed"id="max_hitpoints"><div class="sheet-slant " ><label class="sheet-slant">Max HP</label></div><input type="number" class="sheet-circle" name="attr_hp_max" style="width:40px;margin:5px;"/></div>
|
||
<div class="none sheet-flexed"><div class="sheet-slant " ><label class="sheet-slant">Hit Dice</label></div><input type="text" class="sheet-skillword" name="attr_HD" style="width:50px;margin:5px;"/></div>
|
||
<div class="none sheet-flexed"><div class="sheet-slant"><label class="sheet-slant">Level</label><span class="tooltiptext">level</span></div><input type="number" class="sheet-attribword sheet-circle" name="attr_level" style="width:40px; margin:5px;"/></div>
|
||
|
||
</div >
|
||
<!--div class=""-->
|
||
|
||
|
||
<div class="Yellow-Ribbon">
|
||
<div name="header" class="sheet-header-ribbon">
|
||
<img class="img1" name="attr_character_avatar">
|
||
<span class="sheet-headertitle" style="left:100px;">Worlds Without Number</span>
|
||
<img class="img1" name="attr_character_token">
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<input type="radio" name="attr_tab_store" class="sheet-tab1" value="1" style="display:none;" title="PC" checked="checked"/><span></span>
|
||
<input type="radio" name="attr_tab_store" class="none sheet-tab sheet-tab2" value="2" title="NPC" /><span></span>
|
||
|
||
|
||
<!-- 840px is the set width defined by div.sheet-tab-content -->
|
||
<!-- 420px is 1/2 and 1/3 is 280px -->
|
||
|
||
|
||
|
||
<!-- <input type="hidden" name="attr_tab" class="sheet-tab sheet-tab2" value="2" title="NPC" /><span></span>
|
||
<input type="hidden" name="attr_tab" class="sheet-tab sheet-tab3" value="3" title="Location" /><span></span>
|
||
<input type="hidden" name="attr_tab" class="sheet-tab sheet-tab4" value="4" title="Faction" /><span></span> -->
|
||
<!-- Tab One PC information -->
|
||
<div class="sheet-tab1" name="characterbasics" title="Player Character">
|
||
|
||
<!--could add hide and show check boxes here to determine which items show below -->
|
||
|
||
<div class="sheet-border">
|
||
<div class='sheet-2colrow' >
|
||
|
||
<div class='sheet-col' title="left side" >
|
||
<details>
|
||
<summary><h3 style="cursor:pointer;">Attributes</h3></summary>
|
||
<div class = "sheet-border">
|
||
<div class="sheet-attributes">
|
||
<div class="sheet-slant"><label class="sheet-slant">STR <span name="attr_str_mod" title="str_mod"></span></label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">DEX <span name="attr_dex_mod"></span></label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">CON <span name="attr_con_mod"></span></label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">INT <span name="attr_int_mod"></span></label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">WIS <span name="attr_wis_mod"></span></label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">CHA <span name="attr_cha_mod"></span></label></div>
|
||
</div>
|
||
<div class="sheet-attributes">
|
||
<input type="number" min="3" max="18" class="sheet-circle" style="width:30px; margin-left:5px;" name="attr_strength" title="strength from 3 to 18"/>
|
||
<input type="number" min="3" max="18" class="sheet-circle" style="width:30px; margin-left:10px;" name="attr_dexderity" />
|
||
<input type="number" min="3" max="18" class="sheet-circle" style="width:30px; margin-left:10px;" name="attr_constitution" />
|
||
<input type="number" min="3" max="18" class="sheet-circle" style="width:30px; margin-left:10px;" name="attr_intelegence" />
|
||
<input type="number" min="3" max="18" class="sheet-circle" style="width:30px; margin-left:10px;" name="attr_wisdom" />
|
||
<input type="number" min="3" max="18" class="sheet-circle" style="width:30px; margin-left:10px;" name="attr_charisma"/>
|
||
</div>
|
||
<details>
|
||
<summary><h3 title="Adds to the corresponding attributes modifier">Additional Attribute Modifer Changes<h3></summary>
|
||
<div class="sheet-attributes">
|
||
<input type="number" class="sheet-circle" style="width:30px; margin-left:10px;" name="attr_str_mod_1" value="0">
|
||
<input type="number" class="sheet-circle" style="width:30px; margin-left:10px;" name="attr_dex_mod_1" value="0">
|
||
<input type="number" class="sheet-circle" style="width:30px; margin-left:10px;" name="attr_con_mod_1" value="0">
|
||
<input type="number" class="sheet-circle" style="width:30px; margin-left:10px;" name="attr_int_mod_1" value="0">
|
||
<input type="number" class="sheet-circle" style="width:30px; margin-left:10px;" name="attr_wis_mod_1" value="0">
|
||
<input type="number" class="sheet-circle" style="width:30px; margin-left:10px;" name="attr_cha_mod_1" value="0">
|
||
</div>
|
||
<div><p style="color:yellow;">Adds to the respective modifer.</p> </div>
|
||
</details>
|
||
|
||
|
||
<div class="sheet-flexed" style="justify-content: space-evenly; margin-top:5px;">
|
||
<div class="shield" name="shield">
|
||
<div style="display:grid; justify-content:center; margin-left:5px; margin-top:1px; margin-right:5px; "><h4>AC</h4></div>
|
||
<div style="display:grid; justify-content:center; margin-left:5px; margin-right:5px;"><input type="number" class="sheet-circle" name="attr_AC" style="width:30px;"/></div>
|
||
</div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Move</label></div><input type="text" name="attr_move" class="sheet-skillword2" style="width:80px; margin-left:-80px; margin-top:20px; height:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">XP</label></div><input type="number" name="attr_xp" class="sheet-circle" style="width:40px; height:40px; margin-left:-50px; margin-top:20px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Base Attack</label></div><input type="number" name="attr_base_attack" class="sheet-circle" style="width:40px; height:40px; margin-left:-80px; margin-top:20px;">
|
||
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Initiative<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_initiative" value="&{template:WWN} {{title=Determine Initiative }} {{subtitle=@{character_name} }} {{Initiative= [[1d8 + @{dex_mod} + @{initiative} &{tracker}]] }}" ><span style="font-size: 10px;"></span></button></label></div><input type="number" name="attr_initiative" class="sheet-circle" style="width:40px; height:40px; margin-left:-70px; margin-top:20px;">
|
||
</div>
|
||
<!--system strain -->
|
||
<div class="sheet-flexed" style="justify-content: space-evenly; margin-top:5px;">
|
||
|
||
<div class="sheet-slant"><label class="sheet-slant">System Strain</label></div><input type="number" name="attr_system_strain" class="sheet-circle" value="0" style="width:40px; height:40px; margin-left:-80px; margin-top:20px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Permanent System Strain</label></div><input type="number" name="attr_system_strain_perm" value="0" class="sheet-circle" style="width:40px; height:40px; margin-left:-80px; margin-top:20px;">
|
||
<div class="sheet-slant"><label class="sheet-slant ">Total System Strain</label></div><input type="number" name="attr_system_strain_total" value="0" class="sheet-circle sheet-noclick" style="width:40px; height:40px; margin-left:-80px; margin-top:20px;">
|
||
</div>
|
||
</div>
|
||
</details>
|
||
|
||
|
||
|
||
|
||
|
||
<details>
|
||
<summary><h3 style="cursor:pointer;">Class & Background</h3></summary>
|
||
<div class = "sheet-border">
|
||
<div class="sheet-flexed" style="justify-content: space-evenly; margin-top:5px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Class</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Background</label></div>
|
||
</div>
|
||
|
||
<div class="sheet-flexed" style="justify-content: space-evenly; margin-top:5px;">
|
||
<input type="text" class="sheet-skillword" name="attr_character_class" style="width:150px;"/>
|
||
<input type="text" class="sheet-skillword" name="attr_background" style="width:150px;"/>
|
||
</div>
|
||
<div class="sheet-flexed" style="justify-content: space-evenly; margin-top:5px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Details</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Benefits</label></div>
|
||
</div>
|
||
<div class="sheet-flexed" style="justify-content: space-evenly; margin-top:5px;">
|
||
|
||
<textarea name="attr_class_benefits" class="sheet-textarea" style="width:180px; "></textarea>
|
||
<textarea name="attr_background_details" class="sheet-textarea" style="width:180px; "></textarea>
|
||
</div>
|
||
</div>
|
||
</details>
|
||
<details>
|
||
<summary><h3 style="cursor:pointer;">Armor</h3></summary>
|
||
<div class="sheet-border">
|
||
<div style="display:grid; grid-template-columns: 40px 120px 40px 120px; grid-template-rows: auto; grid-column-gap:20px;">
|
||
<div><div class="sheet-slant"><label class="sheet-slant">Worn</label></div></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Armor</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">AC</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Special</label></div>
|
||
</div>
|
||
<fieldset class="repeating_armor" >
|
||
<div style="display:grid; grid-template-columns: 30px 150px 40px 150px; grid-template-rows: auto; grid-column-gap:5px;">
|
||
<input type="checkbox" style="background-color:grey;" name="attr_worn" style="width:20px;">
|
||
<input type="text" name="attr_armor_name" class="sheet-equipment" >
|
||
<input type="number" name="attr_armor_AC" class="sheet-skillnumber" style="width:40px;">
|
||
<input type="text" name="attr_armor_special" class="sheet-equipment">
|
||
</div>
|
||
</fieldset>
|
||
</div>
|
||
</details>
|
||
|
||
<details>
|
||
<summary><h3>Resources</h3> </summary> <!-- name of resource, min amount, max amount, decrementing, topping back up-->
|
||
<div class="sheet-border">
|
||
<div style="display:grid; grid-template-columns: 150px 45px 45px 45px 45px; grid-template-rows: auto; grid-column-gap:10px; margin-left:10px;grid-row-gap:10px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Name</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Cur</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Max</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Scene</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Daily</label></div>
|
||
</div>
|
||
<fieldset class="repeating_resource" >
|
||
<div style="display:grid; grid-template-columns: 150px 45px 45px 45px 45px; grid-column-gap:10px; grid-row-gap:10px;">
|
||
<input type="text" name="attr_resource_name" class="sheet-skillword2" style="width:150px;">
|
||
<input type="number" name="attr_cur_resource" class="sheet-circle" style="margin:0px; width:40px; height:40px;" >
|
||
<input type="number" name="attr_cur_resource_max" class="sheet-circle" style="margin:0px; width:40px; height:40px;" >
|
||
<input type="number" name="attr_scene_resource" class="sheet-circle" style="margin:0px; width:40px; height:40px;" >
|
||
<input type="number" name="attr_daily_resource" class="sheet-circle" style="margin:0px; width:40px; height:40px;" >
|
||
</div>
|
||
</fieldset>
|
||
|
||
|
||
</div>
|
||
</details>
|
||
|
||
</div>
|
||
|
||
<div class='sheet-col'>
|
||
<details>
|
||
<summary><h3>Saves</h3></summary>
|
||
<div class = "sheet-border">
|
||
|
||
<div class="sheet-flexed" style="justify-content: space-evenly;">
|
||
<button type="roll" style="" name="roll_physical" class= "sheet-button2" value="&{template:WWN} {{title=Roll Versus Save }} {{subtitle=@{character_name} }} {{The Roll= [[1d20]] }} {{Physical=@{physical} }} {{Evasion=@{evasion} }} {{Mental=@{mental} }} {{Luck=@{luck} }}" ></button>
|
||
<div class="sheet-slant"><label class="sheet-slant ">Physical</label></div><input type="number" name="attr_physical" class="sheet-circle sheet-noclick" style="width:40px; height:40px; margin-left:-80px; margin-top:20px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Evasion</label></div><input type="number" name="attr_evasion" class="sheet-circle sheet-noclick" style="width:40px; height:40px; margin-left:-70px; margin-top:20px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Mental</label></div><input type="number" name="attr_mental" class="sheet-circle sheet-noclick" style="width:40px; height:40px; margin-left:-70px; margin-top:20px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Luck</label></div><input type="number" name="attr_luck" class="sheet-circle sheet-noclick" style="width:40px; height:40px; margin-left:-70px; margin-top:20px;">
|
||
</div>
|
||
</div>
|
||
</details>
|
||
<details>
|
||
<summary><h3>Demographics</h3></summary>
|
||
<div class = "sheet-border">
|
||
<div class="sheet-flexed" style="justify-content: space-evenly;">
|
||
<div class="sheet-slant"><label class="sheet-slant">species</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Gender</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Age</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Height</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Weight</label></div>
|
||
|
||
|
||
</div>
|
||
<div class="sheet-flexed" style="justify-content: space-evenly;">
|
||
<input type="text" class="sheet-skillword" name="attr_species" style="font-size:10px; width:70px;" value="human"/>
|
||
<input type="text" class="sheet-skillword" name="attr_gender" style="font-size:10px; width:55px;"/>
|
||
<input type="number" class="sheet-circle " name="attr_age" style="font-size:10px; width:40px;"/>
|
||
<input type="text" class="sheet-skillword" name="attr_height" style="font-size:10px; width:50px;"/>
|
||
<input type="text" class="sheet-skillword" name="attr_weight" style="font-size:10px; width:55px;"/>
|
||
|
||
</div>
|
||
</div>
|
||
</details>
|
||
|
||
<details>
|
||
<summary><h3>Skills</h3></summary>
|
||
|
||
<div class="sheet-border" title="Skills"> <!--total column width is 420px -->
|
||
<div class="sheet-flexed" style="justify-content:space-evenly ; width:400px; margin-top:5px; margin-bottom:5px; ">
|
||
<div class="sheet-flexed"style="justify-content: left; width:150px;">
|
||
<div class="sheet-slant" style="margin-right:5px; width:80px;"><label class="sheet-slant">Roll Modifier</label><span class="tooltiptext">Set for each roll.</span></div>
|
||
<select name="attr_skill_roll" style="width:45px;">
|
||
<option value="-6" >-6</option>
|
||
<option value="-5">-5</option>
|
||
<option value="-4">-4</option>
|
||
<option value="-3">-3</option>
|
||
<option value="-2">-2</option>
|
||
<option value="-1">-1</option>
|
||
<option value="0"selected="selected">0</option>
|
||
<option value="1">1</option>
|
||
<option value="2">2</option>
|
||
<option value="3">3</option>
|
||
<option value="4">4</option>
|
||
<option value="5">5</option>
|
||
<option value="6">6</option>
|
||
</select>
|
||
<!--input type="number" class="sheet-circle" name="attr_skill_roll" style="font-size:10px; width:40px;"/-->
|
||
</div>
|
||
<!--div ><input type="button" class="" name="attr_clear_skill_roll" style="
|
||
</div-->
|
||
<div class="sheet-flexed"style="justify-content: right; width:200px;">
|
||
<div class="sheet-slant" style="margin-right:2px;"><label class="sheet-slant">Skill Points</label></div>
|
||
<input type="number" class="sheet-circle" name="attr_skill_points" style="font-size:10px; width:40px; margin-right:50px;"/>
|
||
</div>
|
||
</div>
|
||
<div class="sheet-flexed" style="justify-content: left; width:400px; margin-top:0px; margin-bottom:0px; ">
|
||
<p style="font-size:10px; color:yellow;">For attributes and other bonsues for next roll. </p>
|
||
</div>
|
||
<div style="display:grid; grid-template-columns: 80px 40px 80px 40px 80px 40px; grid-template-rows: auto; grid-column-gap:5px;margin-left:5px; grid-row-gap:5px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Administer<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_administer" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Administer }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{administer} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{administer} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{administer} + @{skill_roll}]] }} {{desc=Keep an organization running smoothly, scribe things well, plan out logistics, identify incompetent or treacherous workers, analyze records or archives, or otherwise do things that an executive or middle-manager would need to do.}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_administer" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Lead<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_lead" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Lead }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{lead} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{lead} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{lead} + @{skill_roll}]] }} {{desc=Inspire others to follow your lead and believe in your plans and goals. Manage subordinates and keep them focused, loyal, and motivated in the face of danger or failure. A successful leader will keep their subordinate’s faith and confidence even whenreason might make the leader’s plan appear quesionable at best}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_lead" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Sail <button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_sail" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Sail }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{sail} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{sail} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{sail} + @{skill_roll}]] }} {{desc=Sail or repair a ship, build small craft, navigate by the stars, read sea weather, manage sailors, and otherwise conduct the business of a professional mariner. This skill may apply to more esoteric means of vehicular travel in some societies.}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_sail" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Connect<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_connect" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Connect }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{connect} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{connect} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{connect} + @{skill_roll}]] }} {{desc=Find or know people who are useful to your purposes, make friendships or social acquaintances,know who to talk to get favors or services, and call on the help or resources of organizations you belong to. Connect covers your PC’s ability to find the people you need, though convincing them to help may require more than this.}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_connect" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Magic<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_magic" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Magic }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{magic} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{magic} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{magic} + @{skill_roll}]] }} {{desc=Cast or analyze magic and know things about famous mages or notable magical events. Classes that can’t cast spells obtain only intellectual and scholarly benefits from this skill.}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_magic" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Shoot<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_shoot" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill shoot }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{shoot} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{shoot} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{shoot} + @{skill_roll}]] }} {{desc=Fire a bow or crossbow or throw a hurled weapon. Maintain ranged weaponry and fletch arrows.}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_shoot" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Convince<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_convince" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Convince }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{convince} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{convince} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{convince} + @{skill_roll}]] }} {{desc=Persuade a listener that something you are saying is true. Naturally, the more implausible the claim or more emotionally repugnant it is to them, the more difficult it is to persuade them. Further more, how they act on their newfound conviction is up to them and their motivations, and may not be perfectly predictable.}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_convince" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Notice<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_notice" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Notice }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{notice} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{notice} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{notice} + @{skill_roll}]] }} {{desc=Notice small details, impending ambushes, hidden features, or concealed objects. Detect subtle smells, sounds, or other sensory input. Notice cannot be used simply to detect a lie, but keen attention can often discern a subject’s emotional state.}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_notice" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Sneak<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_sneak" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Sneak }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{sneak} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{sneak} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{sneak} + @{skill_roll}]] }} {{desc=Move silently, hide in shadows, avoid notice, pick pockets, disguise yourself, pick locks, defeat traps, or otherwise overcome security measures.}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_sneak" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Craft<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_craft" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Craft }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{craft} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{craft} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{craft} + @{skill_roll}]] }} {{desc=Craft or repair goods and technology appropriate to the PC’s background and society. The Craft skill can be used for a wide range of artisan pursuits, though a GM is within their rights to keep the PC from building complex things that are too far away from their past background and experience. }}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_craft" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Perform<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_perform" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Perform }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{perform} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{perform} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{perform} + @{skill_roll}]] }} {{desc=Sing, act, dance, orate, or otherwise perform impressively for an audience. Compose music, plays, writings, or other works of performance art. Most performers will have a particular field they excel at, though polymaths might exist if the PC’s background is appropriate for such versatility}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_perform" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Stab<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_stab" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Stab }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{stab} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{stab} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{stab} + @{skill_roll}]] }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_stab" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Exert<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_exert" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Exert }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{exert} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{exert} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{exert} + @{skill_roll}]] }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_exert" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Pray<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_pray" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Pray }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{pray} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{pray} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{pray} + @{skill_roll}]] }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_pray" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Survive<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_survive" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Survive }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{survive} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{survive} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{survive} + @{skill_roll}]] }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_survive" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Heal<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_heal" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Heal }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{heal} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{heal} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{heal} + @{skill_roll}]] }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_heal" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Punch<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_punch" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Punch }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{punch} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{punch} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{punch} + @{skill_roll}]] }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_punch" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Trade<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_trade" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Trade }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{trade} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{trade} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{trade} + @{skill_roll}]] }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_trade" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Know<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_know" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Know }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{know} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{know} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{know} + @{skill_roll}]] }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_know" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Ride<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_ride" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Ride }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{ride} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{ride} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{ride} + @{skill_roll}]] }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_ride" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Work<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_work" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill Work }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{work} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{work} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{work} + @{skill_roll}]] }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<input type="number" name="attr_work" value="-1" class="sheet-circle" style="width:30px;">
|
||
<div style="display:grid; grid-template-columns: 400px; " >
|
||
<fieldset class="repeating_skill" >
|
||
<div style="display:grid; grid-template-columns: 170px 40px 60px; margin:5px;" >
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer width:80px; "><input type="text" class="sheet-attribword" name="attr_skill_name" style="width:80px; font-size: 10px;" /></label></div> <button type="roll" class="sheet-blank-button" name="roll_skills" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=@{skill_name} }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{skills} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{skills} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{skills} + @{skill_roll}]] }} {{desc=}}" ></button>
|
||
<input type="number" name="attr_skills" value="-1" class="sheet-circle" style="width:30px;">
|
||
</div>
|
||
</fieldset>
|
||
</div>
|
||
</div>
|
||
<div style="margin-left:10px;margin-top:10px;">
|
||
<div class="sheet-slant" style="width:80px;"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">Language<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_language" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Languages Known }} {{subtitle=@{character_name} }} {{desc=@{language} }}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<textarea name="attr_language" class="sheet-textarea" style="width:360px; height:50px; margin-left:5px; margin-right:5px;"></textarea>
|
||
</div>
|
||
</div>
|
||
</details>
|
||
|
||
<details>
|
||
<summary><h3>Foci<h3></summary>
|
||
<div class="sheet-border">
|
||
|
||
|
||
|
||
<div style="display:grid; grid-template-columns: 350px ; grid-template-rows: auto; grid-column-gap: 10px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Focus</label></div>
|
||
</div>
|
||
|
||
|
||
<fieldset class="repeating_foci" >
|
||
|
||
<details>
|
||
<summary>
|
||
<h3><input type="text" class="sheet-attribword" name="attr_foci_name" style="width: min(250px, 400px);" /> <span style="margin-left:30px;"> more </span></h3>
|
||
</summary>
|
||
<div style="display:grid; grid-template-columns: 35px 280px 35px; grid-template-rows: auto; grid-column-gap: 10px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Show</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Description</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Level</label></div>
|
||
</div>
|
||
|
||
|
||
|
||
<div style="display:grid; grid-template-columns: 45px 300px 40px; grid-template-rows: auto;">
|
||
<button type="roll" class="sheet-btn" name="roll_foci" value="@{whisper} &{template:WWN} {{color=blue }} {{title=@{foci_name} }} {{subtitle=@{character_name} }} {{focus= }} {{level=@{foci_level} }} {{desc=@{foci} }}" style="width:30px; height:30px;"></button>
|
||
<textarea class="sheet-textarea" name="attr_foci" style="width:280px;"></textarea>
|
||
<input type="number" name="attr_foci_level" class="sheet-circle" style="margin:0px; width:25px; height:25px;" >
|
||
|
||
</div>
|
||
</details>
|
||
</fieldset>
|
||
|
||
|
||
</div>
|
||
</details>
|
||
|
||
|
||
<details>
|
||
<summary><h3>Arts</h3></summary>
|
||
<div class="sheet-border">
|
||
<div style="display:grid; grid-template-columns: 200px 100px 50px; grid-template-rows: auto; grid-column-gap: 10px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Art</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Tradition</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Duration</label></div>
|
||
</div>
|
||
<fieldset class="repeating_arts" >
|
||
|
||
<details>
|
||
<summary>
|
||
<div style="display:grid; grid-template-columns: 200px 100px 40px; grid-template-rows: auto; grid-column-gap: 10px;">
|
||
<div><input type="text" class="sheet-attribword" name="attr_arts_name" style="width: 200px;"/> </div>
|
||
<div><input type="text" class="sheet-attribword" name="attr_arts_tradition" style="width: 100px;"/> </div>
|
||
<div>
|
||
<select name="attr_arts_duration" style="width:60px;">
|
||
<option value="Day">Day</option>
|
||
<option value="Scene" >Scene</option>
|
||
<option value="Indefinitely">Indefinitely</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<h3> <span style="margin-left:30px;">more</span></h3>
|
||
</summary>
|
||
<div style="display:grid; grid-template-columns: 45px 350px ; grid-template-rows: auto; grid-column-gap: 10px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Show</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Description</label></div>
|
||
</div>
|
||
<div style="display:grid; grid-template-columns: 45px 330px ; grid-template-rows: auto;">
|
||
<button type="roll" class="sheet-btn" name="roll_arts" value="@{whisper} &{template:WWN} {{color=blue }} {{title=@{arts_name} }} {{subtitle=@{character_name} }} {{Commitment Duration= @{arts_duration} }} {{Tradition=@{arts_tradition} }} {{desc=@{arts} }}" style="width:30px; height:30px;"></button>
|
||
<textarea class="sheet-textarea" name="attr_arts" style="width:330px;"></textarea>
|
||
</div>
|
||
</details>
|
||
</fieldset>
|
||
</div>
|
||
</details>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<!-- On same page but not split -->
|
||
|
||
|
||
<details>
|
||
<summary><h3>Weapons</h3></summary>
|
||
<div class="sheet-border"> <!--total column width is 420px -->
|
||
<div style="display:grid; grid-template-columns: 150px 80px 80px 80px 80px 40px 80px 80px 60px; grid-template-rows: auto; grid-column-gap:10px;">
|
||
<div><div class="sheet-slant"><label class="sheet-slant">Weapon</label></div></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Dmg</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Shock</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Attribute</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Skill</label></div>
|
||
|
||
<div class="sheet-slant"><label class="sheet-slant">Atk +</label></div>
|
||
|
||
<div class="sheet-slant"><label class="sheet-slant">Range</label></div>
|
||
|
||
<div class="sheet-slant"><label class="sheet-slant">Traits</label></div>
|
||
<!--div class="sheet-slant"><label class="sheet-slant">Cost</label></div-->
|
||
<div class="sheet-slant"><label class="sheet-slant">Roll</label></div>
|
||
<!--div class="sheet-slant"><label class="sheet-slant">Roll</label></div-->
|
||
</div>
|
||
<fieldset class="repeating_weapons" >
|
||
<div style="display:grid; grid-template-columns: 150px 80px 80px 80px 80px 40px 80px 80px 50px; grid-template-rows: auto; grid-column-gap:10px;">
|
||
<input type="text" name="attr_weapon_name" class="sheet-skillword2" style="width:150px;">
|
||
<input type="text" name="attr_weapon_damage" class="sheet-skillword2" style="width:80px;">
|
||
<input type="text" name="attr_weapon_shock" class="sheet-skillword2" style="width:80px;">
|
||
<select name="attr_weapon_attributes" style="width:80px;">
|
||
<option value="@{str_mod}">str</option>
|
||
<option value="@{dex_mod}" selected="selected" >dex</option>
|
||
<option value="@{con_mod}">con</option>
|
||
<option value="@{int_mod}">int</option>
|
||
<option value="@{wis_mod}">wis</option>
|
||
<option value="@{cha_mod}">cha</option>
|
||
</select>
|
||
<select name="attr_weapon_skill" style="width:80px;">
|
||
<option value="@{punch}" >punch</option>
|
||
<option value="@{stab}" selected="selected" >stab</option>
|
||
<option value="@{shoot}">shoot</option>
|
||
<option value="@{magic}">magic</option>
|
||
<option value="@{exert)">exert</option>
|
||
<option value="-2">unskilled</option>
|
||
</select>
|
||
<input type="number" value="0" name="attr_attack_bonus" class="sheet-circle" style="width:30px; margin-left:5px;">
|
||
<input type="text" name="attr_weapon_range" class="sheet-skillword2" style="width:80px;">
|
||
<input type="text" name="attr_weapon_traits" class="sheet-skillword2" style="width:80px;">
|
||
<!-- input type="number" name="attr_weapon_cost" value="-1" class="sheet-circle" style="width:30px;"-->
|
||
<button type="roll" class="sheet-btn" name="roll_weapons_attack" value="@{whisper} &{template:WWN} {{color=red }} {{title=@{weapon_name} }} {{subtitle=@{character_name} }} {{attack=[[1d20 + @{base_attack} + @{weapon_attributes} + @{weapon_skill} + @{attack_bonus} ]] }} {{damage=[[ @{weapon_damage} + @{weapon_attributes}]] }} {{shock=@{weapon_shock} }} {{desc=Range @{weapon_range} }}" style="width:30px; height:30px;"></button>
|
||
|
||
</div>
|
||
</fieldset>
|
||
</div>
|
||
</details>
|
||
|
||
|
||
|
||
<details>
|
||
<summary><h3>Items</h3></summary>
|
||
<div class="sheet-border">
|
||
<div style="display:grid; grid-template-columns: 20px 390px 5px 360px 80px; grid-template-rows: auto; grid-column-gap: 10px; ">
|
||
<div></div>
|
||
<div class="sheet-border" style="display:grid; grid-template-columns: 120px 120px 120px; grid-column-gap: 10px;">
|
||
<div style="width:60px; padding-left:5px;" > <div class="sheet-slant"><label class="sheet-slant">Gold</label></div> <input type="number" name="attr_gold" value="0" class="sheet-circle" style="margin:0px; width:120px; height:40px;" > </div>
|
||
<div style="width:60px;" > <div class="sheet-slant"><label class="sheet-slant">Silver</label></div> <input type="number" name="attr_silver" value="0" class="sheet-circle" style="margin:0px; width:120px; height:40px;" ></div>
|
||
<div style= "width:60px;" > <div class="sheet-slant"><label class="sheet-slant">Copper</label></div> <input type="number" name="attr_copper" value="0" class="sheet-circle" style="margin:0px; width:120px; height:40px;" ></div>
|
||
<input type="number" readonly name="attr_coins" title="coins item weight" class="sheet-circle" style="margin:0px; width:30px; height:30px; color:black; cursor:default;" >
|
||
</div>
|
||
<!-- combined weight max--> <div><input type="number" name="attr_combined_weight" title="combined_weight" readonly class="sheet-circle none" style="left-padding:15px; margin:0px; width:30px; height:30px; color:black; cursor:default;" ></div>
|
||
|
||
<div class="sheet-border" style="display:grid; grid-template-columns: 80px 80px 100px 95px; grid-template-rows: auto; grid-column-gap: 10px;">
|
||
<div style="width:80px; padding-left:5px;" > <div class="sheet-slant"><label class="sheet-slant">ready used</label></div> <input type="number" readonly name="attr_ready_weight" value="" class="sheet-circle" style="margin:0px; width:30px; height:30px; cursor:default; color:black;" ></div>
|
||
<div style="width:80px;" > <div class="sheet-slant"><label class="sheet-slant">ready cap</label></div><input type="number" readonly name="attr_ready_weight_max" class="sheet-circle" style="margin:0px; width:30px; height:30px; color:black; cursor:default;" ></div>
|
||
<div style="width:100px;" > <div class="sheet-slant"><label class="sheet-slant">stowed used</label></div><input type="number" disabled="true" name="attr_stowed_weight" class="sheet-circle" value="@{combined_weight}-@{ready_weight}+@{coins}" style="margin:0px; width:30px; height:30px; color:black; cursor:default;" ></div>
|
||
<div style="width:85px;" > <div class="sheet-slant"><label class="sheet-slant">stowed cap</label></div><input type="number" readonly name="attr_stowed_weight_max" class="sheet-circle" style="margin:0px; width:30px; height:30px; color:black; cursor:default;" ></div>
|
||
|
||
</div>
|
||
</div>
|
||
<!-- show ready encumbrance and stowed encumbrance -->
|
||
<!--Totals at the top of the sheet to show readied encumbrance vs total and stored encumbrance vs total-->
|
||
<!-- check box for ready else it is stored, Worn, Bundled (3), -->
|
||
<div style="display:grid; grid-template-columns: 30px 300px 50px 80px 60px; grid-template-rows: auto; grid-column-gap: 30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Ready</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Item</label></div>
|
||
<!-- select standard, worn, bundled, weightless, coins (every 100 is 1 encumbrance) :: determines if it counts when worn as weight-->
|
||
<div class="sheet-slant"><label class="sheet-slant">Quantity</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Encumbrance</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Total</label></div>
|
||
</div>
|
||
<fieldset class="repeating_stowedorstored" >
|
||
<div style="display:grid; grid-template-columns: 30px 300px 50px 80px 60px; grid-template-rows: auto; grid-column-gap: 30px;">
|
||
<input type="checkbox" style="background-color:grey;" name="attr_items_ready" style="width:20px;">
|
||
<input type="text" name="attr_items_name" class="sheet-attribword" style="width:300px; font-size:12px;" />
|
||
<input type="number" name="attr_items_quantity" class="sheet-circle" style="margin:0px; width:30px; height:30px;" >
|
||
<input type="number" name="attr_items_encumbrance" class="sheet-circle" style="margin:0px; width:30px; height:30px;" >
|
||
<input type="number" name="attr_items_total_encumbrance" value="" class="sheet-circle" style="margin:0px; width:30px; height:30px;" >
|
||
</div>
|
||
</fieldset>
|
||
</div>
|
||
</details>
|
||
|
||
|
||
<details>
|
||
<summary><h3>Spells</h3></summary>
|
||
<div class="sheet-border">
|
||
|
||
|
||
<!-- add magic type and then show it in the desc when rolled -->
|
||
<!-- prep spell lvl type range -->
|
||
<div style="display:grid; grid-template-columns: 20px 300px 50px 80px 60px; grid-template-rows: auto; grid-column-gap: 30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Prep</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">spell</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Level</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant" title="The magic type like high mage">Type</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant" title="Range of magic. If not listed is typically a bow of 600feet.">Range</label></div>
|
||
</div>
|
||
|
||
|
||
<fieldset class="repeating_highmagic" >
|
||
|
||
<details>
|
||
<summary>
|
||
<h3><input type="checkbox" style="background-color:grey;" name="attr_high_magic_prep" style="margin-left:5px; width:20px;"> <input type="text" class="sheet-attribword" name="attr_high_magic_name" style="margin-left:20px; width:300px;" /> <input type="number" name="attr_high_magic_level" class="sheet-circle" style="margin-left:20px; width:50px; height:25px;" ><input type="text" class="sheet-attribword" name="attr_high_magic_type" style="margin-left:10px; width:80;" /><input type="text" class="sheet-attribword" name="attr_high_magic_range" value="600'" style="margin-left:20px; width:50;" /> <span style="margin-left:30px;"> more </span></h3>
|
||
</summary>
|
||
<div style="display:grid; grid-template-columns: 35px 350px 100px 80px; grid-template-rows: auto; grid-column-gap: 10px; margin-top:15px; margin-left:20px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Show</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Description</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Affected</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant" title="dice value needs to be entered or it errors out can be 0">Damage</label></div>
|
||
</div>
|
||
|
||
|
||
|
||
<div style="display:grid; grid-template-columns: 45px 350px 120px 80px; grid-template-rows: auto; margin-left:20px;">
|
||
<button type="roll" class="sheet-btn" name="roll_high_magic" value="@{whisper} &{template:WWN} {{color=green }} {{title=@{high_magic_name} }} {{subtitle=@{character_name} }} {{Magic Type=@{high_magic_type} }} {{level=@{high_magic_level} }} {{Range= @{high_magic_range} }} {{Affected= @{high_magic_affected} }} {{damage= [[@{high_magic_damage}]] }} {{desc=@{high_magic_description} }}" style="width:30px; height:30px;"></button>
|
||
<textarea class="sheet-textarea" name="attr_high_magic_description" style="width:350px; "></textarea>
|
||
<input type="text" class="sheet-attribword" name="attr_high_magic_affected" style="width:100px; height:20px;" />
|
||
<input type="text" class="sheet-attribword" name="attr_high_magic_damage" value="0" style="width:80px; height: 20px;" />
|
||
</div>
|
||
</details>
|
||
</fieldset>
|
||
</div>
|
||
</details>
|
||
|
||
|
||
|
||
<details>
|
||
<summary><h3>Notes</h3></summary>
|
||
<!-- Topic then contents -->
|
||
<div class="sheet-border">
|
||
<div style="display:grid; grid-template-columns: 400px; grid-template-rows: auto; grid-column-gap: 30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Topic</label></div>
|
||
</div>
|
||
<fieldset class="repeating_notes" >
|
||
<details>
|
||
|
||
<summary>
|
||
<div><input type="text" class="sheet-attribword" name="attr_topic" style="width:400px; height:20px;" /></div>
|
||
|
||
<div><h3>more</h3></div>
|
||
</summary>
|
||
|
||
<div style="display:grid; grid-template-columns: 60px 700px; grid-template-rows: auto; grid-column-gap: 30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">show</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Content</label></div>
|
||
<button type="roll" class="sheet-btn" name="roll_notes" value="@{whisper} &{template:WWN} {{color=green }} {{title=@{topic} }} {{subtitle=@{character_name} }} {{desc=@{content} }}" style="width:30px; height:30px;"></button>
|
||
<textarea class="sheet-textarea" name="attr_content" style="width:700px; "></textarea>
|
||
|
||
</div>
|
||
</details>
|
||
</fieldset>
|
||
</div>
|
||
</details>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div> <!--sheet border for tabbed page -->
|
||
</div> <!--character basics tab end -->
|
||
|
||
|
||
<div class="sheet-tab-content sheet-tab2" name="NPC">
|
||
|
||
|
||
<h4>Stats</h4>
|
||
<div class="sheet-border"> <!--total column width is 840px -->
|
||
<!--ac atk move morale Instinct Skill save -->
|
||
<div style="display:grid; grid-template-columns: 80px 90px 100px 80px 80px 80px 80px; grid-template-rows: auto; grid-column-gap:20px;">
|
||
<div><div class="sheet-slant"><label class="sheet-slant">Armor Class</label></div></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Attack Bonus</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Move</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Morale</label></div>
|
||
|
||
<div class="sheet-slant"><label class="sheet-slant">Instinct</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">skill</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Save</label></div>
|
||
<!--div class="sheet-slant"><label class="sheet-slant">Roll</label></div-->
|
||
</div>
|
||
<!--ac atk move morale Instinct Skill save -->
|
||
<div style="display:grid; grid-template-columns: 80px 80px 100px 80px 80px 80px 80px; grid-template-rows: auto; grid-column-gap:20px;">
|
||
<input type="text" name="attr_AC" class="sheet-skillword2" style="width:80px;">
|
||
<input type="number" name="attr_npc_attack" class="sheet-circle" >
|
||
<input type="text" name="attr_move" class="sheet-skillword2" style="width:100px;">
|
||
<input type="number" name="attr_morale" class="sheet-circle">
|
||
<!-- input type="number" name="attr_weapon_cost" value="-1" class="sheet-circle" style="width:30px;"-->
|
||
<input type="number" name="attr_instinct" class="sheet-circle">
|
||
<input type="number" name="attr_npc_skill" class="sheet-circle">
|
||
<input type="number" name="attr_npc_save" class="sheet-circle">
|
||
</div>
|
||
</div>
|
||
<div style="padding-bottom:20px;"> </div>
|
||
<h4>Rolls</h4>
|
||
<div class="sheet-border"> <!--total column width is 840px -->
|
||
<!-- morale Instinct Skill save -->
|
||
<div style="display:grid; grid-template-columns: 80px 80px 80px 80px ; grid-template-rows: auto; grid-column-gap:10px;">
|
||
|
||
<!--div class="sheet-slant"><label class="sheet-slant">Roll</label></div-->
|
||
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;"> Morale<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_morale" value="@{whisper} &{template:WWN} {{title=NPC Morale }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6]] }} {{morale=@{morale} }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;"> Instinct<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_instinct" value="@{whisper} &{template:WWN} {{title=NPC Instinct }} {{subtitle=@{character_name} }} {{Roll= [[1d10]]}} {{instinct=@{instinct} }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;">npc skill<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_npc_skill" value="@{whisper} &{template:WWN} {{color=bisque }} {{title=Skill npc_skill }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[2d6 + @{npc_skill} + @{skill_roll}]] }} {{3D6 keep highest 2 Skill Roll= [[3d6k2 + @{npc_skill} + @{skill_roll}]] }}{{4d6 keep highest 2 Skill Roll= [[4d6k2 + @{npc_skill} + @{skill_roll}]] }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant sheet-roll-notice" style="cursor:pointer;"> Save<button type="roll" class="sheet-blank-button" style="background:transparent; z-index:5; border:none;" name="roll_npc_save" value="@{whisper} &{template:WWN} {{title=NPC Save }} {{subtitle=@{character_name} }} {{Straight Skill Roll= [[1d20]] }} {{Save=@{npc_save} }} {{desc=}}" ><span style="font-size: 10px;"></span></button></label></div>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
<div style="padding-bottom:20px;"> </div>
|
||
|
||
|
||
<details>
|
||
|
||
<summary><h3>Attacks</h3></summary>
|
||
<div class="sheet-border"> <!--total column width is 840px -->
|
||
<!--name dmg shock range traits roll-->
|
||
<div style="display:grid; grid-template-columns: 200px 100px 100px 100px 120px 80px ; grid-template-rows: auto; grid-column-gap:10px;">
|
||
<div><div class="sheet-slant"><label class="sheet-slant">Attack</label></div></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Dmg</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Shock</label></div>
|
||
|
||
<div class="sheet-slant"><label class="sheet-slant">Range</label></div>
|
||
|
||
<div class="sheet-slant"><label class="sheet-slant">Traits</label></div>
|
||
|
||
<div class="sheet-slant"><label class="sheet-slant">Attack roll</label></div>
|
||
|
||
</div>
|
||
<fieldset class="repeating_attacks" > <!-- name dmg shock range traits roll-->
|
||
<div style="display:grid; grid-template-columns: 200px 100px 100px 100px 120px 80px; grid-template-rows: auto; grid-column-gap:10px;">
|
||
<input type="text" name="attr_attack_name" class="sheet-skillword2" style="width:200px;">
|
||
<input type="text" name="attr_attack_damage" class="sheet-skillword2" style="width:100px;">
|
||
<input type="text" name="attr_attack_shock" class="sheet-skillword2" style="width:100px;">
|
||
<input type="text" name="attr_attack_range" class="sheet-skillword2" style="width:100px;">
|
||
<input type="text" name="attr_attack_traits" class="sheet-skillword2" style="width:120px;">
|
||
|
||
<button type="roll" class="sheet-btn" name="roll_attacks_attack" value="@{whisper} &{template:WWN} {{color=red }} {{title=@{attack_name} }} {{subtitle=@{character_name} }} {{attack=[[1d20 + @{npc_attack} ]] }} {{damage=[[ @{attack_damage} ]] }} {{shock=@{attack_shock}}} {{desc=Range @{attack_range} }}" style="width:30px; height:30px;"></button>
|
||
|
||
</div>
|
||
</fieldset>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</details>
|
||
<!--instinct table -->
|
||
|
||
|
||
<!--notes-->
|
||
<details>
|
||
<summary><h3>Notes</h3></summary>
|
||
<!-- Topic then contents -->
|
||
<div class="sheet-border">
|
||
<div style="display:grid; grid-template-columns: 400px; grid-template-rows: auto; grid-column-gap: 30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Topic</label></div>
|
||
</div>
|
||
<fieldset class="repeating_notes" >
|
||
<details>
|
||
|
||
<summary>
|
||
<div><input type="text" class="sheet-attribword" name="attr_topic" style="width:400px; height:20px;" /></div>
|
||
|
||
<div><h3>more</h3></div>
|
||
</summary>
|
||
|
||
<div style="display:grid; grid-template-columns: 60px 700px; grid-template-rows: auto; grid-column-gap: 30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">show</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Content</label></div>
|
||
<button type="roll" class="sheet-btn" name="roll_notes" value="@{whisper} &{template:WWN} {{color=green }} {{title=@{topic} }} {{subtitle=@{character_name} }} {{desc=@{content} }}" style="width:30px; height:30px;"></button>
|
||
<textarea class="sheet-textarea" name="attr_content" style="width:700px; "></textarea>
|
||
|
||
</div>
|
||
</details>
|
||
</fieldset>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</details>
|
||
|
||
|
||
|
||
|
||
|
||
<details>
|
||
<summary><h3>Spells</h3></summary>
|
||
<div class="sheet-border">
|
||
|
||
|
||
<!-- add magic type and then show it in the desc when rolled -->
|
||
<!-- prep spell lvl type range -->
|
||
<div style="display:grid; grid-template-columns: 20px 300px 50px 80px 60px; grid-template-rows: auto; grid-column-gap: 30px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Prep</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">spell</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Level</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant" title="The magic type like high mage">Type</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant" title="Range of magic. If not listed is typically a bow of 600feet.">Range</label></div>
|
||
</div>
|
||
|
||
|
||
<fieldset class="repeating_highmagic" >
|
||
|
||
<details>
|
||
<summary>
|
||
<h3><input type="checkbox" style="background-color:grey;" name="attr_high_magic_prep" style="margin-left:5px; width:20px;"> <input type="text" class="sheet-attribword" name="attr_high_magic_name" style="margin-left:20px; width:300px;" /> <input type="number" name="attr_high_magic_level" class="sheet-circle" style="margin-left:20px; width:50px; height:25px;" ><input type="text" class="sheet-attribword" name="attr_high_magic_type" style="margin-left:10px; width:80;" /><input type="text" class="sheet-attribword" name="attr_high_magic_range" value="600'" style="margin-left:20px; width:50;" /> <span style="margin-left:30px;"> more </span></h3>
|
||
</summary>
|
||
<div style="display:grid; grid-template-columns: 35px 350px 100px 80px; grid-template-rows: auto; grid-column-gap: 10px; margin-top:15px; margin-left:20px;">
|
||
<div class="sheet-slant"><label class="sheet-slant">Show</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Description</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant">Affected</label></div>
|
||
<div class="sheet-slant"><label class="sheet-slant" title="Dice value needs to be entered or it errors out. Can be 0.">Damage</label></div>
|
||
</div>
|
||
|
||
|
||
|
||
<div style="display:grid; grid-template-columns: 45px 350px 120px 80px; grid-template-rows: auto; margin-left:20px;">
|
||
<button type="roll" class="sheet-btn" name="roll_high_magic" value="@{whisper} &{template:WWN} {{color=green }} {{title=@{high_magic_name} }} {{subtitle=@{character_name} }} {{Magic Type=@{high_magic_type} }} {{level=@{high_magic_level} }} {{Range= @{high_magic_range} }} {{Affected= @{high_magic_affected} }} {{damage= [[@{high_magic_damage}]] }} {{desc=@{high_magic_description} }}" style="width:30px; height:30px;"></button>
|
||
<textarea class="sheet-textarea" name="attr_high_magic_description" style="width:350px; "></textarea>
|
||
<input type="text" class="sheet-attribword" name="attr_high_magic_affected" style="width:100px; height:20px;" />
|
||
<input type="text" class="sheet-attribword" name="attr_high_magic_damage" value="0" style="width:80px; height: 20px;" />
|
||
</div>
|
||
</details>
|
||
</fieldset>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</details>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<!--Roll Templates-->
|
||
<div class="sheet-hidden">
|
||
<rolltemplate class="sheet-rolltemplate-dscreen">
|
||
<div class="sheet-in">
|
||
<h1>{{screen}}</h1>
|
||
<div style="background-color:black(.5);">{{story}}</div>
|
||
</div>
|
||
</rolltemplate>
|
||
|
||
|
||
<rolltemplate class="sheet-rolltemplate-WWN">
|
||
<div class="sheet-container sheet-color-{{color}}">
|
||
<div class="sheet-header">
|
||
{{#title}}<div class="sheet-title">{{title}}</div>{{/title}}
|
||
{{#subtitle}}<div class="sheet-subtitle">{{subtitle}}</div>{{/subtitle}}
|
||
</div>
|
||
<div class="sheet-content">
|
||
{{#allprops() title subtitle desc color}}
|
||
<div class="sheet-key">{{key}}</div>
|
||
<div class="sheet-value">{{value}}</div>
|
||
{{/allprops() title subtitle desc color}}
|
||
{{#desc}}<div class="sheet-desc">{{desc}}</div>{{/desc}}
|
||
</div>
|
||
</div>
|
||
</rolltemplate>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<!--https://wiki.roll20.net/Building_Character_Sheets/Roll_Templates#Jakob.27s_Better_Default_Rolltemplate -->
|
||
|
||
|
||
|
||
|
||
|
||
<!-- Sheet Worker Scripts -->
|
||
<script type="text/worker">
|
||
//general update update
|
||
|
||
on('change:repeating_stowedorstored remove:repeating_stowedorstored sheet:opened change:gold change:copper change:silver change:coins', function() {
|
||
repeatingSum(['ready_weight'], "stowedorstored", ['items_total_encumbrance','items_ready']);
|
||
repeatingSum(['combined_weight'], "stowedorstored", ['items_total_encumbrance']); //repeatingSum(['combined_weight'], "stowedorstored", ['items_total_encumbrance'], 'coins');
|
||
|
||
// getAttrs(["combined_weight", "ready_weight"], function (values) {
|
||
// let cwm = values.combined_weight||0;
|
||
// let rw = values.ready_weight||0;
|
||
// let sw = cwm - rw;
|
||
|
||
// setAttrs({ stowed_weight: sw });
|
||
|
||
|
||
// });
|
||
|
||
});
|
||
|
||
|
||
|
||
on("change:repeating_stowedorstored", function() {
|
||
getAttrs(["repeating_stowedorstored_items_quantity", "repeating_stowedorstored_items_encumbrance"], function(values) {
|
||
|
||
let qty = values.repeating_stowedorstored_items_quantity||0;
|
||
let enc = values.repeating_stowedorstored_items_encumbrance||0;
|
||
let tenc = qty * enc;
|
||
|
||
setAttrs({
|
||
repeating_stowedorstored_items_total_encumbrance: tenc
|
||
});
|
||
});
|
||
});
|
||
|
||
|
||
|
||
on("change:system_strain change:system_strain_perm sheet:opened", function() {
|
||
//sheetworker triggers on any changes to tab attribute or when opened.
|
||
getAttrs(["system_strain", "system_strain_total", "system_strain_perm"], function(values) {
|
||
//get the values for attributes.
|
||
let ss = parseInt(values.system_strain)||0;
|
||
let sp = parseInt(values.system_strain_perm)||0;
|
||
//saves the current values of the attributes on a temporary variables, which then can be used easily in calculations.
|
||
setAttrs({
|
||
system_strain_total: parseInt(ss + sp)
|
||
// changes the "system_strain_total" sheet attribute
|
||
});
|
||
});
|
||
});
|
||
|
||
on("sheet:opened change:gold change:copper change:silver", function() {
|
||
getAttrs(["gold", "silver", "copper"], function(values) {
|
||
//creates the weight of coins.
|
||
let gp = parseInt(values.gold)||0;
|
||
let sp = parseInt(values.silver)||0;
|
||
let cp = parseInt(values.copper)||0;
|
||
let cn = Math.floor((gp + sp + cp)/100);
|
||
|
||
setAttrs({ coins: cn
|
||
});
|
||
});
|
||
|
||
});
|
||
|
||
on("change:tab sheet:opened", function() {
|
||
//sheetworker triggers on any changes to tab attribute or when opened.
|
||
getAttrs(["tab"], function(values) {
|
||
//get the values for attributes.
|
||
let tab = parseInt(values.tab)||0;
|
||
//saves the current values of the attributes on a temporary variables, which then can be used easily in calculations.
|
||
setAttrs({
|
||
flexed_show: tab,
|
||
tab_store: tab,
|
||
flexed_show: tab
|
||
// changes the "flexed_show" sheet attribute
|
||
});
|
||
});
|
||
});
|
||
|
||
on("change:level sheet:opened change:str_mod change:con_mod change:int_mod change:dex_mod change:wis_mod change:cha_mod", function() {
|
||
//sheetworker triggers on any changes to tab attribute or when opened.
|
||
getAttrs(["level", "str_mod", "con_mod","wis_mod","int_mod", "dex_mod", "wis_mod", "cha_mod"], function(values) {
|
||
//get the values for attributes.
|
||
let level = parseInt(values.level)||0;
|
||
//gets level
|
||
let str_mod = parseInt(values.str_mod)||0;
|
||
let con_mod = parseInt(values.con_mod)||0;
|
||
let phA = parseInt(str_mod);
|
||
if (values.con_mod > values.str_mod) { phA = parseInt(con_mod) };
|
||
|
||
let dex_mod = parseInt(values.dex_mod)||0;
|
||
let int_mod = parseInt(values.int_mod)||0;
|
||
let evA = parseInt(dex_mod);
|
||
if (values.int_mod > values.dex_mod) { evA = parseInt(int_mod) };
|
||
|
||
let wis_mod = parseInt(values.wis_mod)||0;
|
||
let cha_mod = parseInt(values.cha_mod)||0;
|
||
let meA = parseInt(wis_mod);
|
||
if (values.cha_mod > values.wis_mod) { meA = parseInt(cha_mod) };
|
||
|
||
setAttrs({
|
||
physical: (16 - level - phA),
|
||
evasion: (16 - level - evA),
|
||
mental: (16 - level - meA),
|
||
luck: (16 - level)
|
||
// changes the sheet attributes
|
||
});
|
||
});
|
||
});
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/* ===== PARAMETERS ==========
|
||
|
||
Summing function
|
||
|
||
|
||
destinations = the name of the attribute that stores the total quantity
|
||
section = name of repeating fieldset, without the repeating_
|
||
fields = the name of the attribute field to be summed
|
||
can be a single attribute: 'weight'
|
||
or an array of attributes: ['weight','number','equipped']
|
||
extras: everything after the fields parameter is optional and can be in any order:
|
||
'ceil'
|
||
'round'
|
||
'floor'
|
||
'ceil: 3'
|
||
'round: -2'
|
||
'round: equipment_weight, equipment_cost|2
|
||
you want to round the final total.
|
||
If you supply a field name, it will round just that total. You can supply multiple fields, separated by commas.
|
||
If you supply a number, it will round to that many digits.
|
||
round:1 rounds to tenths; floor:-3 rounds down to thousands, so 3567 would be shown as 3000.
|
||
If you dont supply a number, it assumes 0, and returns an integer (whole numbers).
|
||
IMPORTANT: if you list ANY field, then ALL fields to be rounded must be specifically stated.
|
||
Don't do this: floor:equipment_weight|2, round,
|
||
|
||
'multiplier: 2'
|
||
'multiplier:equipment_weight|2'
|
||
'multiplier: equipment_weight|2, equipment_cost|3'
|
||
Multiplier will apply a multiple to the final total. You can multiple all fields, or specific fields.
|
||
It doesnt apply to attributes being added from outside the repeating section.
|
||
Multiplier can be negative, representing a subtraction.
|
||
|
||
'an_attribute'
|
||
'an_attribute:-1'
|
||
'an_attribute:0.5'
|
||
'an_attribute:equipment_cost'
|
||
'an_attribute:equipment_cost|-1'
|
||
'an_attribute:equipment_cost|-1,equipment_weight|2'
|
||
You can also list attributes from outside the repeating section. Don't try to add attributes from other repeating sections.
|
||
by default, the listed attribute will be added to all fields.
|
||
You can list one or more fields, and it will only be added to those fields.
|
||
You can list a number: the attribute will be multiplied by that amount. So -1 subtracts the attribute.
|
||
*/
|
||
|
||
|
||
|
||
const repeatingSum = (destinations, section, fields, ...extras) => {
|
||
const isNumber = value => parseFloat(value).toString() === value.toString();
|
||
const isOption = value => [...checks.valid, ...checks.roundtypes].includes(value);
|
||
const isRounding = value => checks.roundtypes.includes(value);
|
||
const isFraction = value => value.includes('/') && !(value.includes(',') || value.includes('|'));
|
||
const getTrimmed = value => value.toLowerCase().replace(/\s/g, '');
|
||
const getRounded = (type, value, pow) => (Math[type](value * Math.pow(10, pow)) / Math.pow(10, pow)).toFixed(Math.max(0, pow));
|
||
const getFraction = (value) => /*{ console.log(`value: ${value}`); */
|
||
parseInt(value.split('/')[0]) / parseInt(value.split('/')[1]);
|
||
const getMultiplier = (value, rounding = 1) => 'undefined' === typeof value ? (rounding ? 0: 1) : (
|
||
isNumber(value) ? parseFloat(value) : (isFraction(value) ? getFraction(value) : value));
|
||
if (!Array.isArray(destinations)) destinations = [getTrimmed(destinations)];
|
||
if (!Array.isArray(fields)) fields = [getTrimmed(fields)];
|
||
const fields_trimmed = fields.map(field => getTrimmed(field).split(':')[0]);
|
||
const subfields = fields_trimmed.slice(0,destinations.length);
|
||
const checks = { valid: ['multiplier'], roundtypes: ['ceil', 'round', 'floor'] };
|
||
let properties = {attributes: {}, options: {}};
|
||
extras.forEach(extra => {
|
||
const [prop, v] = getTrimmed(extra).split(':');
|
||
const multiplier_maybe = getMultiplier(v, isRounding(prop));
|
||
const obj = isNumber(multiplier_maybe) ? subfields.reduce((obj,field) => {
|
||
obj[field] = multiplier_maybe;
|
||
return obj;
|
||
},{}) : multiplier_maybe.split(',').reduce((obj, item) => {
|
||
const [stat, value] = item.split('|');
|
||
const multiplier = getMultiplier(value, isRounding(prop));
|
||
obj[stat] = multiplier;
|
||
return obj;
|
||
}, {});
|
||
properties[isOption(prop) ? 'options' : 'attributes'][prop] = obj;
|
||
});
|
||
getSectionIDs(`repeating_${section}`, idArray => {
|
||
const attrArray = idArray.reduce((m, id) => [...m, ...(fields_trimmed.map(field => `repeating_${section}_${id}_${field}`))], []);
|
||
getAttrs([...attrArray, ...Object.keys(properties.attributes)], 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.reduce((obj, destination, index) => {
|
||
let sumTotal = idArray.reduce((total, id) => total + getValue(section, id, fields_trimmed[index]) * commonMultipliers.reduce((subtotal, mult) => subtotal * ((!mult.includes(':') || mult.split(':')[1].split(',').includes(fields_trimmed[index])) ? getValue(section, id, mult.split(':')[0]) : 1), 1), 0);
|
||
sumTotal *= (properties.options.hasOwnProperty('multiplier') && Object.keys(properties.options.multiplier).includes(fields_trimmed[index])) ? (parseFloat(properties.options.multiplier[fields_trimmed[index]]) || 0): 1;
|
||
sumTotal += Object.entries(properties.attributes).reduce((total, [key, value]) =>
|
||
total += (value.hasOwnProperty(fields_trimmed[index]) ? parseFloat(v[key] || 0) * (parseFloat(value[fields_trimmed[index]]) || 1): 0) , 0);
|
||
checks.roundtypes.forEach(type => {
|
||
if (properties.options.hasOwnProperty(type)) {
|
||
if (Object.keys(properties.options[type]).includes(fields_trimmed[index])) {
|
||
sumTotal = getRounded(type, sumTotal, (+properties.options[type][fields_trimmed[index]] || 0));
|
||
} else if (properties.options[type] == '0' || !isNaN(+properties.options[type] || 'x') ) {
|
||
sumTotal = getRounded(type, sumTotal, +properties.options[type]);
|
||
}
|
||
}
|
||
});
|
||
obj[destination] = sumTotal;
|
||
return obj;
|
||
}, {});
|
||
setAttrs(output);
|
||
});
|
||
});
|
||
};
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/* ---- Attributes ---- */
|
||
on("change:strength change:str_mod_1 sheet:opened", function() {
|
||
getAttrs(["strength", "str_mod_1"], function(values) {
|
||
|
||
let swm = parseInt(values.strength)||0;
|
||
|
||
let rwm = Math.floor(parseInt(values.strength)/2)||0;
|
||
|
||
|
||
setAttrs ({ stowed_weight_max: swm,
|
||
ready_weight_max: rwm });
|
||
|
||
|
||
|
||
if (values.strength == 3) {
|
||
let sm = parseInt(values.str_mod_1)||0;
|
||
let s = -2;
|
||
let str = s + sm;
|
||
setAttrs({
|
||
str_mod: str
|
||
});
|
||
};
|
||
if (values.strength == 18) {
|
||
let sm = parseInt(values.str_mod_1)||0;
|
||
let s = 2;
|
||
let str = s + sm;
|
||
setAttrs({
|
||
str_mod: str
|
||
});
|
||
};
|
||
if (values.strength > 3 && values.strength < 8) {
|
||
let sm = parseInt(values.str_mod_1)||0;
|
||
let s = -1;
|
||
let str = s + sm;
|
||
setAttrs({
|
||
str_mod: str
|
||
});
|
||
};
|
||
if (values.strength > 13 && values.strength < 18) {
|
||
let sm = parseInt(values.str_mod_1)||0;
|
||
let s = 1;
|
||
let str = s + sm;
|
||
setAttrs({
|
||
str_mod: str
|
||
});
|
||
};
|
||
if (values.strength < 14 && values.strength > 7) {
|
||
let sm = parseInt(values.str_mod_1)||0;
|
||
let s = 0;
|
||
let str = s + sm;
|
||
setAttrs({
|
||
str_mod: str
|
||
});
|
||
};
|
||
|
||
|
||
|
||
});
|
||
});
|
||
|
||
|
||
on("change:dexderity sheet:opened change:dex_mod_1", function() {
|
||
getAttrs(["dexderity","dex_mod_1"], function(values) {
|
||
if (values.dexderity == 3) {
|
||
let dm = parseInt(values.dex_mod_1)||0;
|
||
let d = -2;
|
||
let dex = d + dm;
|
||
|
||
setAttrs({
|
||
dex_mod: dex
|
||
});
|
||
};
|
||
if (values.dexderity == 18) {
|
||
let dm = parseInt(values.dex_mod_1)||0;
|
||
let d = 2;
|
||
let dex = d + dm;
|
||
|
||
setAttrs({
|
||
dex_mod: dex
|
||
});
|
||
};
|
||
if (values.dexderity > 3 && values.dexderity < 8) {
|
||
let dm = parseInt(values.dex_mod_1)||0;
|
||
let d = -1;
|
||
let dex = d + dm;
|
||
|
||
|
||
setAttrs({
|
||
dex_mod: dex
|
||
});
|
||
};
|
||
if (values.dexderity > 13 && values.dexderity < 18) {
|
||
let dm = parseInt(values.dex_mod_1)||0;
|
||
let d = 1;
|
||
let dex = d + dm;
|
||
|
||
|
||
setAttrs({
|
||
dex_mod: dex
|
||
});
|
||
};
|
||
if (values.dexderity < 14 && values.dexderity > 7) {
|
||
let dm = parseInt(values.dex_mod_1)||0;
|
||
let d = 0;
|
||
let dex = d + dm;
|
||
|
||
|
||
setAttrs({
|
||
dex_mod: dex
|
||
});
|
||
};
|
||
});
|
||
});
|
||
|
||
on("change:constitution sheet:opened change:con_mod_1", function() {
|
||
getAttrs(["constitution", "con_mod_1"], function(values) {
|
||
if (values.constitution == 3) {
|
||
let co = parseInt(values.con_mod_1)||0;
|
||
let c = -2;
|
||
let con = c + co;
|
||
|
||
setAttrs({
|
||
con_mod: con
|
||
});
|
||
};
|
||
if (values.constitution == 18) {
|
||
let co = parseInt(values.con_mod_1)||0;
|
||
let c = 2;
|
||
let con = c + co;
|
||
|
||
setAttrs({
|
||
con_mod: con
|
||
});
|
||
};
|
||
if (values.constitution > 3 && values.constitution < 8) {
|
||
let co = parseInt(values.con_mod_1)||0;
|
||
let c = -1;
|
||
let con = c + co;
|
||
|
||
setAttrs({
|
||
con_mod: con
|
||
});
|
||
};
|
||
if (values.constitution > 13 && values.constitution < 18) {
|
||
let co = parseInt(values.con_mod_1)||0;
|
||
let c = 1;
|
||
let con = c + co;
|
||
|
||
setAttrs({
|
||
con_mod: con
|
||
});
|
||
};
|
||
if (values.constitution < 14 && values.constitution > 7) {
|
||
let co = parseInt(values.con_mod_1)||0;
|
||
let c = 0;
|
||
let con = c + co;
|
||
|
||
setAttrs({
|
||
con_mod: con
|
||
});
|
||
};
|
||
});
|
||
});
|
||
|
||
|
||
on("change:intelegence sheet:opened change:int_mod_1", function() {
|
||
getAttrs(["intelegence", "int_mod_1"], function(values) {
|
||
if (values.intelegence == 3) {
|
||
let xa = parseInt(values.int_mod_1)||0;
|
||
let i = -2;
|
||
let int = xa + i;
|
||
setAttrs({
|
||
int_mod: int
|
||
});
|
||
};
|
||
if (values.intelegence == 18) {
|
||
let xa = parseInt(values.int_mod_1)||0;
|
||
let i = 2;
|
||
let int = xa + i;
|
||
setAttrs({
|
||
int_mod: int
|
||
});
|
||
};
|
||
if (values.intelegence > 3 && values.intelegence < 8) {
|
||
let xa = parseInt(values.int_mod_1)||0;
|
||
let i = -1;
|
||
let int = xa + i;
|
||
setAttrs({
|
||
int_mod: int
|
||
});
|
||
};
|
||
if (values.intelegence > 13 && values.intelegence < 18) {
|
||
let xa = parseInt(values.int_mod_1)||0;
|
||
let i = 1;
|
||
let int = xa + i;
|
||
setAttrs({
|
||
int_mod: int
|
||
});
|
||
};
|
||
if (values.intelegence < 14 && values.intelegence > 7) {
|
||
let xa = parseInt(values.int_mod_1)||0;
|
||
let i = 0;
|
||
let int = xa + i;
|
||
setAttrs({
|
||
int_mod: int
|
||
});
|
||
};
|
||
});
|
||
});
|
||
|
||
on("change:wisdom sheet:opened change:wis_mod_1", function() {
|
||
getAttrs(["wisdom", "wis_mod_1"], function(values) {
|
||
if (values.wisdom == 3) {
|
||
let wi = parseInt(values.wis_mod_1)||0;
|
||
let w = -2;
|
||
let wis = wi + w;
|
||
setAttrs({
|
||
wis_mod: wis
|
||
});
|
||
};
|
||
if (values.wisdom == 18) {
|
||
let wi = parseInt(values.wis_mod_1)||0;
|
||
let w = 2;
|
||
let wis = wi + w;
|
||
setAttrs({
|
||
wis_mod: wis
|
||
});
|
||
};
|
||
if (values.wisdom > 3 && values.wisdom < 8) {
|
||
let wi = parseInt(values.wis_mod_1)||0;
|
||
let w = -1;
|
||
let wis = wi + w;
|
||
setAttrs({
|
||
wis_mod: wis
|
||
});
|
||
};
|
||
if (values.wisdom > 13 && values.wisdom < 18) {
|
||
let wi = parseInt(values.wis_mod_1)||0;
|
||
let w = 1;
|
||
let wis = wi + w;
|
||
setAttrs({
|
||
wis_mod: wis
|
||
});
|
||
};
|
||
if (values.wisdom < 14 && values.wisdom > 7) {
|
||
let wi = parseInt(values.wis_mod_1)||0;
|
||
let w = 0;
|
||
let wis = wi + w;
|
||
setAttrs({
|
||
wis_mod: wis
|
||
});
|
||
};
|
||
});
|
||
});
|
||
|
||
|
||
on("change:charisma sheet:opened change:cha_mod_1", function() {
|
||
getAttrs(["charisma","cha_mod_1"], function(values) {
|
||
if (values.charisma == 3) {
|
||
let ch = parseInt(values.cha_mod_1)||0;
|
||
let c = -2;
|
||
let cha = ch + c;
|
||
setAttrs({
|
||
cha_mod: cha
|
||
});
|
||
};
|
||
if (values.charisma == 18) {
|
||
let ch = parseInt(values.cha_mod_1)||0;
|
||
let c = 2;
|
||
let cha = ch + c;
|
||
setAttrs({
|
||
cha_mod: cha
|
||
});
|
||
};
|
||
if (values.charisma > 3 && values.charisma < 8) {
|
||
let ch = parseInt(values.cha_mod_1)||0;
|
||
let c = -1;
|
||
let cha = ch + c;
|
||
setAttrs({
|
||
cha_mod: cha
|
||
});
|
||
};
|
||
if (values.charisma > 13 && values.charisma < 18) {
|
||
let ch = parseInt(values.cha_mod_1)||0;
|
||
let c = 1;
|
||
let cha = ch + c;
|
||
setAttrs({
|
||
cha_mod: cha
|
||
});
|
||
};
|
||
if (values.charisma < 14 && values.charisma > 7) {
|
||
let ch = parseInt(values.cha_mod_1)||0;
|
||
let c = 0;
|
||
let cha = ch + c;
|
||
setAttrs({
|
||
cha_mod: cha
|
||
});
|
||
};
|
||
});
|
||
});
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/* ---- BEGIN: TheAaronSheet.js ---- */
|
||
var TAS = TAS || (function(){
|
||
'use strict';
|
||
|
||
var version = '0.2.3',
|
||
lastUpdate = 1457098056,
|
||
|
||
loggingSettings = {
|
||
debug: {
|
||
key: 'debug',
|
||
title: 'DEBUG',
|
||
color: {
|
||
bgLabel: '#7732A2',
|
||
label: '#F2EF40',
|
||
bgText: '#FFFEB7',
|
||
text: '#7732A2'
|
||
}
|
||
},
|
||
error: {
|
||
key: 'error',
|
||
title: 'Error',
|
||
color: {
|
||
bgLabel: '#C11713',
|
||
label: 'white',
|
||
bgText: '#C11713',
|
||
text: 'white'
|
||
}
|
||
},
|
||
warn: {
|
||
key: 'warn',
|
||
title: 'Warning',
|
||
color: {
|
||
bgLabel: '#F29140',
|
||
label: 'white',
|
||
bgText: '#FFD8B7',
|
||
text: 'black'
|
||
}
|
||
},
|
||
info: {
|
||
key: 'info',
|
||
title: 'Info',
|
||
color: {
|
||
bgLabel: '#413FA9',
|
||
label: 'white',
|
||
bgText: '#B3B2EB',
|
||
text: 'black'
|
||
}
|
||
},
|
||
notice: {
|
||
key: 'notice',
|
||
title: 'Notice',
|
||
color: {
|
||
bgLabel: '#33C133',
|
||
label: 'white',
|
||
bgText: '#ADF1AD',
|
||
text: 'black'
|
||
}
|
||
},
|
||
log: {
|
||
key: 'log',
|
||
title: 'Log',
|
||
color: {
|
||
bgLabel: '#f2f240',
|
||
label: 'black',
|
||
bgText: '#ffff90',
|
||
text: 'black'
|
||
}
|
||
},
|
||
callstack: {
|
||
key: 'TAS',
|
||
title: 'function',
|
||
color: {
|
||
bgLabel: '#413FA9',
|
||
label: 'white',
|
||
bgText: '#B3B2EB',
|
||
text: 'black'
|
||
}
|
||
},
|
||
callstack_async: {
|
||
key: 'TAS',
|
||
title: 'ASYNC CALL',
|
||
color: {
|
||
bgLabel: '#413FA9',
|
||
label: 'white',
|
||
bgText: '#413FA9',
|
||
text: 'white'
|
||
}
|
||
},
|
||
TAS: {
|
||
key: 'TAS',
|
||
title: 'TAS',
|
||
color: {
|
||
bgLabel: 'grey',
|
||
label: 'black;background:linear-gradient(#304352,#d7d2cc,#d7d2cc,#d7d2cc,#304352)',
|
||
bgText: 'grey',
|
||
text: 'black;background:linear-gradient(#304352,#d7d2cc,#d7d2cc,#d7d2cc,#304352)'
|
||
}
|
||
}
|
||
},
|
||
|
||
|
||
config = {
|
||
debugMode: false,
|
||
logging: {
|
||
log: true,
|
||
notice: true,
|
||
info: true,
|
||
warn: true,
|
||
error: true,
|
||
debug: false
|
||
}
|
||
},
|
||
|
||
callstackRegistry = [],
|
||
queuedUpdates = {}, //< Used for delaying saves till the last momment.
|
||
|
||
complexType = function(o){
|
||
switch(typeof o){
|
||
case 'string':
|
||
return 'string';
|
||
case 'boolean':
|
||
return 'boolean';
|
||
case 'number':
|
||
return (_.isNaN(o) ? 'NaN' : (o.toString().match(/\./) ? 'decimal' : 'integer'));
|
||
case 'function':
|
||
return 'function: '+(o.name ? o.name+'()' : '(anonymous)');
|
||
case 'object':
|
||
return (_.isArray(o) ? 'array' : (_.isArguments(o) ? 'arguments' : ( _.isNull(o) ? 'null' : 'object')));
|
||
default:
|
||
return typeof o;
|
||
}
|
||
},
|
||
|
||
dataLogger = function(primaryLogger,secondaryLogger,data){
|
||
_.each(data,function(m){
|
||
var type = complexType(m);
|
||
switch(type){
|
||
case 'string':
|
||
primaryLogger(m);
|
||
break;
|
||
case 'undefined':
|
||
case 'null':
|
||
case 'NaN':
|
||
primaryLogger('['+type+']');
|
||
break;
|
||
case 'number':
|
||
case 'not a number':
|
||
case 'integer':
|
||
case 'decimal':
|
||
case 'boolean':
|
||
primaryLogger('['+type+']: '+m);
|
||
break;
|
||
default:
|
||
primaryLogger('['+type+']:=========================================');
|
||
secondaryLogger(m);
|
||
primaryLogger('=========================================================');
|
||
break;
|
||
}
|
||
});
|
||
},
|
||
|
||
|
||
colorLog = function(options){
|
||
var coloredLoggerFunction,
|
||
key = options.key,
|
||
label = options.title || 'TAS',
|
||
lBGColor = (options.color && options.color.bgLabel) || 'blue',
|
||
lTxtColor = (options.color && options.color.label) || 'white',
|
||
mBGColor = (options.color && options.color.bgText) || 'blue',
|
||
mTxtColor = (options.color && options.color.text) || 'white';
|
||
|
||
coloredLoggerFunction = function(message){
|
||
console.log(
|
||
'%c '+label+': %c '+message + ' ',
|
||
'background-color: '+lBGColor+';color: '+lTxtColor+'; font-weight:bold;',
|
||
'background-color: '+mBGColor+';color: '+mTxtColor+';'
|
||
);
|
||
};
|
||
return function(){
|
||
if('TAS'===key || config.logging[key]){
|
||
dataLogger(coloredLoggerFunction,function(m){console.log(m);},_.toArray(arguments));
|
||
}
|
||
};
|
||
},
|
||
|
||
logDebug = colorLog(loggingSettings.debug),
|
||
logError = colorLog(loggingSettings.error),
|
||
logWarn = colorLog(loggingSettings.warn),
|
||
logInfo = colorLog(loggingSettings.info),
|
||
logNotice = colorLog(loggingSettings.notice),
|
||
logLog = colorLog(loggingSettings.log),
|
||
log = colorLog(loggingSettings.TAS),
|
||
logCS = colorLog(loggingSettings.callstack),
|
||
logCSA = colorLog(loggingSettings.callstack_async),
|
||
|
||
registerCallstack = function(callstack,label){
|
||
var idx=_.findIndex(callstackRegistry,function(o){
|
||
return (_.difference(o.stack,callstack).length === _.difference(callstack,o.stack).length) &&
|
||
_.difference(o.stack,callstack).length === 0 &&
|
||
o.label === label;
|
||
});
|
||
if(-1 === idx){
|
||
idx=callstackRegistry.length;
|
||
callstackRegistry.push({
|
||
stack: callstack,
|
||
label: label
|
||
});
|
||
}
|
||
return idx;
|
||
},
|
||
|
||
setConfigOption = function(options){
|
||
var newconf =_.defaults(options,config);
|
||
newconf.logging=_.defaults(
|
||
(options && options.logging)||{},
|
||
config.logging
|
||
);
|
||
config=newconf;
|
||
},
|
||
|
||
debugMode = function(){
|
||
config.logging.debug=true;
|
||
config.debugMode = true;
|
||
},
|
||
|
||
getCallstack = function(){
|
||
var e = new Error('dummy'),
|
||
stack = _.map(_.rest(e.stack.replace(/^[^\(]+?[\n$]/gm, '')
|
||
.replace(/^\s+at\s+/gm, '')
|
||
.replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@')
|
||
.split('\n')),function(l){
|
||
return l.replace(/\s+.*$/,'');
|
||
});
|
||
return stack;
|
||
},
|
||
logCallstackSub = function(cs){
|
||
var matches, csa;
|
||
_.find(cs,function(line){
|
||
matches = line.match(/TAS_CALLSTACK_(\d+)/);
|
||
if(matches){
|
||
csa=callstackRegistry[matches[1]];
|
||
logCSA( '===================='+(csa.label ? '> '+csa.label+' <' : '')+'====================');
|
||
logCallstackSub(csa.stack);
|
||
return true;
|
||
}
|
||
logCS(line);
|
||
return false;
|
||
});
|
||
},
|
||
logCallstack = function(){
|
||
var cs;
|
||
if(config.debugMode){
|
||
cs = getCallstack();
|
||
cs.shift();
|
||
log('==============================> CALLSTACK <==============================');
|
||
logCallstackSub(cs);
|
||
log('=========================================================================');
|
||
}
|
||
},
|
||
|
||
|
||
wrapCallback = function (label, callback, context){
|
||
var callstack;
|
||
if('function' === typeof label){
|
||
context=callback;
|
||
callback=label;
|
||
label=undefined;
|
||
}
|
||
if(!config.debugMode){
|
||
return (function(cb,ctx){
|
||
return function(){
|
||
cb.apply(ctx||{},arguments);
|
||
};
|
||
}(callback,context));
|
||
}
|
||
|
||
callstack = getCallstack();
|
||
callstack.shift();
|
||
|
||
return (function(cb,ctx,cs,lbl){
|
||
var ctxref=registerCallstack(cs,lbl);
|
||
|
||
/*jshint -W054 */
|
||
return new Function('cb','ctx','TASlog',
|
||
"return function TAS_CALLSTACK_"+ctxref+"(){"+
|
||
"TASlog('Entering: '+(cb.name||'(anonymous function)'));"+
|
||
"cb.apply(ctx||{},arguments);"+
|
||
"TASlog('Exiting: '+(cb.name||'(anonymous function)'));"+
|
||
"};")(cb,ctx,log);
|
||
/*jshint +W054 */
|
||
}(callback,context,callstack,label));
|
||
},
|
||
|
||
|
||
prepareUpdate = function( attribute, value ){
|
||
queuedUpdates[attribute]=value;
|
||
},
|
||
|
||
applyQueuedUpdates = function() {
|
||
setAttrs(queuedUpdates);
|
||
queuedUpdates = {};
|
||
},
|
||
|
||
namesFromArgs = function(args,base){
|
||
return _.chain(args)
|
||
.reduce(function(memo,attr){
|
||
if('string' === typeof attr) {
|
||
memo.push(attr);
|
||
} else if(_.isArray(args) || _.isArguments(args)){
|
||
memo = namesFromArgs(attr,memo);
|
||
}
|
||
return memo;
|
||
},(_.isArray(base) && base) || [])
|
||
.uniq()
|
||
.value();
|
||
},
|
||
|
||
addId = function(obj,value){
|
||
Object.defineProperty(obj,'id',{
|
||
value: value,
|
||
writeable: false,
|
||
enumerable: false
|
||
});
|
||
},
|
||
|
||
addProp = function(obj,prop,value,fullname){
|
||
(function(){
|
||
var pname=(_.contains(['S','F','I','D'],prop) ? '_'+prop : prop),
|
||
full_pname = fullname || prop,
|
||
pvalue=value;
|
||
|
||
_.each(['S','I','F'],function(p){
|
||
if( !_.has(obj,p)){
|
||
Object.defineProperty(obj, p, {
|
||
value: {},
|
||
enumerable: false,
|
||
readonly: true
|
||
});
|
||
}
|
||
});
|
||
if( !_.has(obj,'D')){
|
||
Object.defineProperty(obj, 'D', {
|
||
value: _.reduce(_.range(10),function(m,d){
|
||
Object.defineProperty(m, d, {
|
||
value: {},
|
||
enumerable: true,
|
||
readonly: true
|
||
});
|
||
return m;
|
||
},{}),
|
||
enumerable: false,
|
||
readonly: true
|
||
});
|
||
}
|
||
|
||
|
||
// Raw value
|
||
Object.defineProperty(obj, pname, {
|
||
enumerable: true,
|
||
set: function(v){
|
||
if(v!==pvalue) {
|
||
pvalue=v;
|
||
prepareUpdate(full_pname,v);
|
||
}
|
||
},
|
||
get: function(){
|
||
return pvalue;
|
||
}
|
||
});
|
||
|
||
// string value
|
||
Object.defineProperty(obj.S, pname, {
|
||
enumerable: true,
|
||
set: function(v){
|
||
var val=v.toString();
|
||
if(val !== pvalue) {
|
||
pvalue=val;
|
||
prepareUpdate(full_pname,val);
|
||
}
|
||
},
|
||
get: function(){
|
||
return pvalue.toString();
|
||
}
|
||
});
|
||
|
||
// int value
|
||
Object.defineProperty(obj.I, pname, {
|
||
enumerable: true,
|
||
set: function(v){
|
||
var val=parseInt(v,10) || 0;
|
||
if(val !== pvalue){
|
||
pvalue=val;
|
||
prepareUpdate(full_pname,val);
|
||
}
|
||
},
|
||
get: function(){
|
||
return parseInt(pvalue,10) || 0;
|
||
}
|
||
});
|
||
|
||
// float value
|
||
Object.defineProperty(obj.F, pname, {
|
||
enumerable: true,
|
||
set: function(v){
|
||
var val=parseFloat(v) || 0;
|
||
if(val !== pvalue) {
|
||
pvalue=val;
|
||
prepareUpdate(full_pname,val);
|
||
}
|
||
},
|
||
get: function(){
|
||
return parseFloat(pvalue) || 0;
|
||
}
|
||
});
|
||
_.each(_.range(10),function(d){
|
||
Object.defineProperty(obj.D[d], pname, {
|
||
enumerable: true,
|
||
set: function(v){
|
||
var val=(parseFloat(v) || 0).toFixed(d);
|
||
if(val !== pvalue){
|
||
pvalue=val;
|
||
prepareUpdate(full_pname,val);
|
||
}
|
||
},
|
||
get: function(){
|
||
return (parseFloat(pvalue) || 0).toFixed(d);
|
||
}
|
||
});
|
||
});
|
||
|
||
}());
|
||
},
|
||
|
||
repeating = function( section ) {
|
||
return (function(s){
|
||
var sectionName = s,
|
||
attrNames = [],
|
||
fieldNames = [],
|
||
operations = [],
|
||
after = [],
|
||
|
||
repAttrs = function TAS_Repeating_Attrs(){
|
||
attrNames = namesFromArgs(arguments,attrNames);
|
||
return this;
|
||
},
|
||
repFields = function TAS_Repeating_Fields(){
|
||
fieldNames = namesFromArgs(arguments,fieldNames);
|
||
return this;
|
||
},
|
||
repReduce = function TAS_Repeating_Reduce(func, initial, final, context) {
|
||
operations.push({
|
||
type: 'reduce',
|
||
func: (func && _.isFunction(func) && func) || _.noop,
|
||
memo: (_.isUndefined(initial) && 0) || initial,
|
||
final: (final && _.isFunction(final) && final) || _.noop,
|
||
context: context || {}
|
||
});
|
||
return this;
|
||
},
|
||
repMap = function TAS_Repeating_Map(func, final, context) {
|
||
operations.push({
|
||
type: 'map',
|
||
func: (func && _.isFunction(func) && func) || _.noop,
|
||
final: (final && _.isFunction(final) && final) || _.noop,
|
||
context: context || {}
|
||
});
|
||
return this;
|
||
},
|
||
repEach = function TAS_Repeating_Each(func, final, context) {
|
||
operations.push({
|
||
type: 'each',
|
||
func: (func && _.isFunction(func) && func) || _.noop,
|
||
final: (final && _.isFunction(final) && final) || _.noop,
|
||
context: context || {}
|
||
});
|
||
return this;
|
||
},
|
||
repTap = function TAS_Repeating_Tap(final, context) {
|
||
operations.push({
|
||
type: 'tap',
|
||
final: (final && _.isFunction(final) && final) || _.noop,
|
||
context: context || {}
|
||
});
|
||
return this;
|
||
},
|
||
repAfter = function TAS_Repeating_After(callback,context) {
|
||
after.push({
|
||
callback: (callback && _.isFunction(callback) && callback) || _.noop,
|
||
context: context || {}
|
||
});
|
||
return this;
|
||
},
|
||
repExecute = function TAS_Repeating_Execute(callback,context){
|
||
var rowSet = {},
|
||
attrSet = {},
|
||
fieldIds = [],
|
||
fullFieldNames = [];
|
||
|
||
repAfter(callback,context);
|
||
|
||
// call each operation per row.
|
||
// call each operation's final
|
||
getSectionIDs("repeating_"+sectionName,function(ids){
|
||
fieldIds = ids;
|
||
fullFieldNames = _.reduce(fieldIds,function(memo,id){
|
||
return memo.concat(_.map(fieldNames,function(name){
|
||
return 'repeating_'+sectionName+'_'+id+'_'+name;
|
||
}));
|
||
},[]);
|
||
getAttrs( _.uniq(attrNames.concat(fullFieldNames)), function(values){
|
||
_.each(attrNames,function(aname){
|
||
if(values.hasOwnProperty(aname)){
|
||
addProp(attrSet,aname,values[aname]);
|
||
}
|
||
});
|
||
|
||
rowSet = _.reduce(fieldIds,function(memo,id){
|
||
var r={};
|
||
addId(r,id);
|
||
_.each(fieldNames,function(name){
|
||
var fn = 'repeating_'+sectionName+'_'+id+'_'+name;
|
||
addProp(r,name,values[fn],fn);
|
||
});
|
||
|
||
memo[id]=r;
|
||
|
||
return memo;
|
||
},{});
|
||
|
||
_.each(operations,function(op){
|
||
var res;
|
||
switch(op.type){
|
||
case 'tap':
|
||
_.bind(op.final,op.context,rowSet,attrSet)();
|
||
break;
|
||
|
||
case 'each':
|
||
_.each(rowSet,function(r){
|
||
_.bind(op.func,op.context,r,attrSet,r.id,rowSet)();
|
||
});
|
||
_.bind(op.final,op.context,rowSet,attrSet)();
|
||
break;
|
||
|
||
case 'map':
|
||
res = _.map(rowSet,function(r){
|
||
return _.bind(op.func,op.context,r,attrSet,r.id,rowSet)();
|
||
});
|
||
_.bind(op.final,op.context,res,rowSet,attrSet)();
|
||
break;
|
||
|
||
case 'reduce':
|
||
res = op.memo;
|
||
_.each(rowSet,function(r){
|
||
res = _.bind(op.func,op.context,res,r,attrSet,r.id,rowSet)();
|
||
});
|
||
_.bind(op.final,op.context,res,rowSet,attrSet)();
|
||
break;
|
||
}
|
||
});
|
||
|
||
// finalize attrs
|
||
applyQueuedUpdates();
|
||
_.each(after,function(op){
|
||
_.bind(op.callback,op.context)();
|
||
});
|
||
});
|
||
});
|
||
};
|
||
|
||
return {
|
||
attrs: repAttrs,
|
||
attr: repAttrs,
|
||
|
||
column: repFields,
|
||
columns: repFields,
|
||
field: repFields,
|
||
fields: repFields,
|
||
|
||
reduce: repReduce,
|
||
inject: repReduce,
|
||
foldl: repReduce,
|
||
|
||
map: repMap,
|
||
collect: repMap,
|
||
|
||
each: repEach,
|
||
forEach: repEach,
|
||
|
||
tap: repTap,
|
||
'do': repTap,
|
||
|
||
after: repAfter,
|
||
last: repAfter,
|
||
done: repAfter,
|
||
|
||
execute: repExecute,
|
||
go: repExecute,
|
||
run: repExecute
|
||
};
|
||
}(section));
|
||
},
|
||
|
||
|
||
repeatingSimpleSum = function(section, field, destination){
|
||
repeating(section)
|
||
.attr(destination)
|
||
.field(field)
|
||
.reduce(function(m,r){
|
||
return m + (r.F[field]);
|
||
},0,function(t,r,a){
|
||
a.S[destination]=t;
|
||
})
|
||
.execute();
|
||
};
|
||
|
||
console.log('%c•.¸¸.•*´¨`*•.¸¸.•*´¨`*•.¸ The Aaron Sheet v'+version+' ¸.•*´¨`*•.¸¸.•*´¨`*•.¸¸.•','background: linear-gradient(to right,green,white,white,green); color:black;text-shadow: 0 0 8px white;');
|
||
console.log('%c•.¸¸.•*´¨`*•.¸¸.•*´¨`*•.¸ Last update: '+(new Date(lastUpdate*1000))+' ¸.•*´¨`*•.¸¸.•*´¨`*•.¸¸.•','background: linear-gradient(to right,green,white,white,green); color:black;text-shadow: 0 0 8px white;');
|
||
|
||
|
||
return {
|
||
/* Repeating Sections */
|
||
repeatingSimpleSum: repeatingSimpleSum,
|
||
repeating: repeating,
|
||
|
||
/* Configuration */
|
||
config: setConfigOption,
|
||
|
||
/* Debugging */
|
||
callback: wrapCallback,
|
||
callstack: logCallstack,
|
||
debugMode: debugMode,
|
||
_fn: wrapCallback,
|
||
|
||
/* Logging */
|
||
debug: logDebug,
|
||
error: logError,
|
||
warn: logWarn,
|
||
info: logInfo,
|
||
notice: logNotice,
|
||
log: logLog
|
||
};
|
||
}());
|
||
|
||
/* ---- END: TheAaronSheet.js ---- */
|
||
|
||
|
||
</script>
|
||
|
||
|
||
|
||
|