Files
roll20-character-sheets-tester/Star Wars 30th Anniversary Edition/StarWars30thAnniversaryEdition.html
T

974 lines
54 KiB
HTML

<div class="sheet-wrapper">
<div class="sheet-line-red"></div>
<div class="sheet-line-blue"></div>
<div class="sheet-line-yellow"></div>
<div class="sheet-content">
<!-- FLOATING LOGO -->
<div class="sheet-template-title">
<img src="https://orig00.deviantart.net/351c/f/2017/346/9/7/star_wars_logo_by_jmk_prime-d98b8ef.png" />
Character<br />
Template
</div>
<div class="sheet-help">
<strong>Dice Codes</strong><br />
Dice codes <i>must</i> be written as xD or xD+y. For example, 2D and 2D+2 are valid.
Damage codes for weapons can use str (Strength) and ctrl (Control for lightsabers),
for example str+2D.<br />
<br />
<strong>Important!</strong> For a dice code to update you need to tab away from the field before you press a roll button.<br />
<br />
<strong>Armor Codes</strong><br />
Armor code must be either a value with a plus sign, for example +1; or a normal dice code, example 1D.<br />
<br />
<strong>Wound Status</strong><br />
Write one or two letters:<br />
<ul>
<li>H = Healthy</li>
<li>S = Stunned</li>
<li>W = Wounded</li>
<li>I = Incapacitated</li>
<li>M = Mortally Wounded</li>
</ul>
W, I and M will reduce all dice codes with 1D. H and S will revert back to normal dice codes.
</div>
<!-- BIO -->
<div class="sheet-bio-section">
<div class="sheet-template-name">
<input type="text" class="sheet-pushed-input" placeholder="Template name" tabindex="1" name="attr_template_name" />
</div>
<div class="sheet-2colrow" style="width: 80%">
<div class="sheet-col">
<div class="sheet-input-group">
<label>Character Name</label>
<input type="text" tabindex="2" name="attr_character_name" />
</div>
</div>
<div class="sheet-col sheet-special-col">
<div class="sheet-input-group">
<label>Player Name</label>
<input type="text" tabindex="3" name="attr_player_name" />
</div>
</div>
</div>
<div class="sheet-4colrow">
<div class="sheet-col">
<div class="sheet-input-group">
<label>Height</label>
<input type="text" tabindex="4" name="attr_height" />
</div>
</div>
<div class="sheet-col">
<div class="sheet-input-group">
<label>Weight</label>
<input type="text" tabindex="5" name="attr_weight" />
</div>
</div>
<div class="sheet-col">
<div class="sheet-input-group">
<label>Sex</label>
<input type="text" tabindex="6" name="attr_sex" />
</div>
</div>
<div class="sheet-col">
<div class="sheet-input-group">
<label>Age</label>
<input type="text" tabindex="7" name="attr_age" />
</div>
</div>
</div>
<div class="sheet-input-group">
<label>Physical Description</label>
<textarea rows="3" tabindex="8" name="attr_physical_description"></textarea>
</div>
</div>
<div class="sheet-line"></div>
<div class="sheet-left-section">
<!-- ATTRIBUTES AND SKILLS -->
<div class="sheet-skills-section">
<div class="sheet-2colrow">
<div class="sheet-col">
<!-- DEXTERITY -->
<table>
<tr>
<th>Dexterity</th>
<th><input type="text" tabindex="9" name="attr_dexterity" /></th>
<th><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Dexterity}} {{dice_code=@{dexterity_dice_ref}}} {{result=[[@{dexterity_dice_ref}]]}}" name="roll_dexterity"></button></th>
</tr>
<tr>
<td>Blaster</td>
<td><input type="text" tabindex="10" name="attr_blaster" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Blaster}} {{dice_code=@{blaster_dice_ref}}} {{result=[[@{blaster_dice_ref}]]}}" name="roll_blaster"></button></td>
</tr>
<tr>
<td>Brawling Parry</td>
<td><input type="text" tabindex="11" name="attr_brawling_parry" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Brawling Parry}} {{dice_code=@{brawling_parry_dice_ref}}} {{result=[[@{brawling_parry_dice_ref}]]}}" name="roll_brawling_parry"></button></td>
</tr>
<tr>
<td>Dodge</td>
<td><input type="text" tabindex="12" name="attr_dodge" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Dodge}} {{dice_code=@{dodge_dice_ref}}} {{result=[[@{dodge_dice_ref}]]}}" name="roll_dodge"></button></td>
</tr>
<tr>
<td>Grenade</td>
<td><input type="text" tabindex="13" name="attr_grenade" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Grenade}} {{dice_code=@{grenade_dice_ref}}} {{result=[[@{grenade_dice_ref}]]}}" name="roll_grenade"></button></td>
</tr>
<tr>
<td>Heavy Weapons</td>
<td><input type="text" tabindex="14" name="attr_heavy_weapons" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Heavy Weapons}} {{dice_code=@{heavy_weapons_dice_ref}}} {{result=[[@{heavy_weapons_dice_ref}]]}}" name="roll_heavy_weapons"></button></td>
</tr>
<tr>
<td>Melee Parry</td>
<td><input type="text" tabindex="15" name="attr_melee_parry" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Melee Parry}} {{dice_code=@{melee_parry_dice_ref}}} {{result=[[@{melee_parry_dice_ref}]]}}" name="roll_melee_parry"></button></td>
</tr>
<tr>
<td>Melee</td>
<td><input type="text" tabindex="16" name="attr_melee" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Melee}} {{dice_code=@{melee_dice_ref}}} {{result=[[@{melee_dice_ref}]]}}" name="roll_melee"></button></td>
</tr>
<tr>
<td><input type="text" tabindex="17" name="attr_dexterity_blank_name" /></td>
<td><input type="text" tabindex="18" name="attr_dexterity_blank" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=@{dexterity_blank_name}}} {{dice_code=@{dexterity_blank_dice_ref}}} {{result=[[@{dexterity_blank_dice_ref}]]}}" name="roll_dexterity_skill"></button></td>
</tr>
</table>
<!-- KNOWLEDGE -->
<table>
<tr>
<th>Knowledge</th>
<th><input type="text" tabindex="19" name="attr_knowledge" /></th>
<th><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Knowledge}} {{dice_code=@{knowledge_dice_ref}}} {{result=[[@{knowledge_dice_ref}]]}}" name="roll_knowledge"></button></th>
</tr>
<tr>
<td>Alien Races</td>
<td><input type="text" tabindex="20" name="attr_alien_races" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Alien Races}} {{dice_code=@{alien_races_dice_ref}}} {{result=[[@{alien_races_dice_ref}]]}}" name="roll_alien_races"></button></td>
</tr>
<tr>
<td>Bureaucracy</td>
<td><input type="text" tabindex="21" name="attr_bureaucracy" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Bureaucracy}} {{dice_code=@{bureaucracy_dice_ref}}} {{result=[[@{bureaucracy_dice_ref}]]}}" name="roll_bureaucracy"></button></td>
</tr>
<tr>
<td>Cultures</td>
<td><input type="text" tabindex="22" name="attr_cultures" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Cultures}} {{dice_code=@{cultures_dice_ref}}} {{result=[[@{cultures_dice_ref}]]}}" name="roll_cultures"></button></td>
</tr>
<tr>
<td>Languages</td>
<td><input type="text" tabindex="23" name="attr_languages" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Languages}} {{dice_code=@{languages_dice_ref}}} {{result=[[@{languages_dice_ref}]]}}" name="roll_languages"></button></td>
</tr>
<tr>
<td>Planetary Systems</td>
<td><input type="text" tabindex="24" name="attr_planetary_systems" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Planetary Systems}} {{dice_code=@{planetary_systems_dice_ref}}} {{result=[[@{planetary_systems_dice_ref}]]}}" name="roll_planetary_systems"></button></td>
</tr>
<tr>
<td>Streetwise</td>
<td><input type="text" tabindex="25" name="attr_streetwise" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Streetwise}} {{dice_code=@{streetwise_dice_ref}}} {{result=[[@{streetwise_dice_ref}]]}}" name="roll_streetwise"></button></td>
</tr>
<tr>
<td>Survival</td>
<td><input type="text" tabindex="26" name="attr_survival" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Survival}} {{dice_code=@{survival_dice_ref}}} {{result=[[@{survival_dice_ref}]]}}" name="roll_survival"></button></td>
</tr>
<tr>
<td>Technology</td>
<td><input type="text" tabindex="27" name="attr_technology" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Technology}} {{dice_code=@{technology_dice_ref}}} {{result=[[@{technology_dice_ref}]]}}" name="roll_technology"></button></td>
</tr>
<tr>
<td><input type="text" tabindex="28" name="attr_knowledge_blank_name" /></td>
<td><input type="text" tabindex="29" name="attr_knowledge_blank" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=@{knowledge_blank_name}}} {{dice_code=@{knowledge_blank_dice_ref}}} {{result=[[@{knowledge_blank_dice_ref}]]}}" name="roll_knowledge_skill"></button></td>
</tr>
</table>
<!-- MECHANICAL -->
<table>
<tr>
<th>Mechanical</th>
<th><input type="text" tabindex="30" name="attr_mechanical" /></th>
<th><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Mechanical}} {{dice_code=@{mechanical_dice_ref}}} {{result=[[@{mechanical_dice_ref}]]}}" name="roll_mechanical"></button></th>
</tr>
<tr>
<td>Astrogation</td>
<td><input type="text" tabindex="31" name="attr_astrogation" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Astrogation}} {{dice_code=@{astrogation_dice_ref}}} {{result=[[@{astrogation_dice_ref}]]}}" name="roll_astrogation"></button></td>
</tr>
<tr>
<td>Beast Riding</td>
<td><input type="text" tabindex="32" name="attr_beast_riding" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Beast Riding}} {{dice_code=@{beast_riding_dice_ref}}} {{result=[[@{beast_riding_dice_ref}]]}}" name="roll_beast_riding"></button></td>
</tr>
<tr>
<td title="Repulsorlift Operation">Repulsorlift Op.</td>
<td><input type="text" tabindex="33" name="attr_repulsorlift_op" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Repulsorlift Operation}} {{dice_code=@{repulsorlift_op_dice_ref}}} {{result=[[@{repulsorlift_op_dice_ref}]]}}" name="roll_repulsorlift_op"></button></td>
</tr>
<tr>
<td>Starship Gunnery</td>
<td><input type="text" tabindex="34" name="attr_starship_gunnery" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Starship Gunnery}} {{dice_code=@{starship_gunnery_dice_ref}}} {{result=[[@{starship_gunnery_dice_ref}]]}}" name="roll_starship_gunnery"></button></td>
</tr>
<tr>
<td>Starship Piloting</td>
<td><input type="text" tabindex="35" name="attr_starship_piloting" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Starship Piloting}} {{dice_code=@{starship_piloting_dice_ref}}} {{result=[[@{starship_piloting_dice_ref}]]}}" name="roll_starship_piloting"></button></td>
</tr>
<tr>
<td>Starship Shields</td>
<td><input type="text" tabindex="36" name="attr_starship_shields" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Starship Shields}} {{dice_code=@{starship_shields_dice_ref}}} {{result=[[@{starship_shields_dice_ref}]]}}" name="roll_starship_shields"></button></td>
</tr>
<tr>
<td><input type="text" tabindex="37" name="attr_mechanical_blank_name" /></td>
<td><input type="text" tabindex="38" name="attr_mechanical_blank" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=@{mechanical_blank_name}}} {{dice_code=@{mechanical_blank_dice_ref}}} {{result=[[@{mechanical_blank_dice_ref}]]}}" name="roll_mechanical_skill"></button></td>
</tr>
</table>
</div>
<div class="sheet-col">
<!-- PERCEPTION -->
<table>
<tr>
<th>Perception</th>
<th><input type="text" tabindex="39" name="attr_perception" /></th>
<th><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Perception}} {{dice_code=@{perception_dice_ref}}} {{result=[[@{perception_dice_ref}]]}}" name="roll_perception"></button></th>
</tr>
<tr>
<td>Bargain</td>
<td><input type="text" tabindex="40" name="attr_bargain" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Bargain}} {{dice_code=@{bargain_dice_ref}}} {{result=[[@{bargain_dice_ref}]]}}" name="roll_bargain"></button></td>
</tr>
<tr>
<td>Command</td>
<td><input type="text" tabindex="41" name="attr_command" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Command}} {{dice_code=@{command_dice_ref}}} {{result=[[@{command_dice_ref}]]}}" name="roll_command"></button></td>
</tr>
<tr>
<td>Con</td>
<td><input type="text" tabindex="42" name="attr_con" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Con}} {{dice_code=@{con_dice_ref}}} {{result=[[@{con_dice_ref}]]}}" name="roll_con"></button></td>
</tr>
<tr>
<td>Gambling</td>
<td><input type="text" tabindex="43" name="attr_gambling" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Gambling}} {{dice_code=@{gambling_dice_ref}}} {{result=[[@{gambling_dice_ref}]]}}" name="roll_gambling"></button></td>
</tr>
<tr>
<td>Hide/Sneak</td>
<td><input type="text" tabindex="44" name="attr_hidesneak" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Hide/Sneak}} {{dice_code=@{hidesneak_dice_ref}}} {{result=[[@{hidesneak_dice_ref}]]}}" name="roll_hidesneak"></button></td>
</tr>
<tr>
<td>Search</td>
<td><input type="text" tabindex="45" name="attr_search" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Search}} {{dice_code=@{search_dice_ref}}} {{result=[[@{search_dice_ref}]]}}" name="roll_search"></button></td>
</tr>
<tr>
<td><input type="text" tabindex="46" name="attr_perception_blank_name" /></td>
<td><input type="text" tabindex="47" name="attr_perception_blank" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=@{perception_blank_name}}} {{dice_code=@{perception_blank_dice_ref}}} {{result=[[@{perception_blank_dice_ref}]]}}" name="roll_perception_skill"></button></td>
</tr>
</table>
<!-- STRENGTH -->
<table>
<tr>
<th>Strength</th>
<th><input type="text" tabindex="48" name="attr_strength" /></th>
<th><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Strength}} {{dice_code=@{strength_dice_ref}}} {{result=[[@{strength_dice_ref}]]}}" name="roll_strength"></button></th>
</tr>
<tr>
<td>Brawling</td>
<td><input type="text" tabindex="49" name="attr_brawling" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Brawling}} {{dice_code=@{brawling_dice_ref}}} {{result=[[@{brawling_dice_ref}]]}}" name="roll_brawling"></button></td>
</tr>
<tr>
<td>Climbing/Jumping</td>
<td><input type="text" tabindex="50" name="attr_climbingjumping" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Climbing/Jumping}} {{dice_code=@{climbingjumping_dice_ref}}} {{result=[[@{climbingjumping_dice_ref}]]}}" name="roll_climbingjumping"></button></td>
</tr>
<tr>
<td>Lifting</td>
<td><input type="text" tabindex="51" name="attr_lifting" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Lifting}} {{dice_code=@{lifting_dice_ref}}} {{result=[[@{lifting_dice_ref}]]}}" name="roll_lifting"></button></td>
</tr>
<tr>
<td>Stamina</td>
<td><input type="text" tabindex="52" name="attr_stamina" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Stamina}} {{dice_code=@{stamina_dice_ref}}} {{result=[[@{stamina_dice_ref}]]}}" name="roll_stamina"></button></td>
</tr>
<tr>
<td>Swimming</td>
<td><input type="text" tabindex="53" name="attr_swimming" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Swimming}} {{dice_code=@{swimming_dice_ref}}} {{result=[[@{swimming_dice_ref}]]}}" name="roll_swimming"></button></td>
</tr>
<tr>
<td><input type="text" tabindex="54" name="attr_strength_blank_name" /></td>
<td><input type="text" tabindex="55" name="attr_strength_blank" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=@{strength_blank_name}}} {{dice_code=@{strength_blank_dice_ref}}} {{result=[[@{strength_blank_dice_ref}]]}}" name="roll_strength_skill"></button></td>
</tr>
</table>
<!-- TECHNICAL -->
<table>
<tr>
<th>Technical</th>
<th><input type="text" tabindex="56" name="attr_technical" /></th>
<th><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Technical}} {{dice_code=@{technical_dice_ref}}} {{result=[[@{technical_dice_ref}]]}}" name="roll_technical"></button></th>
</tr>
<tr>
<td title="Computer Programming/Repair">Comp. Prog./Repair</td>
<td><input type="text" tabindex="57" name="attr_comp_progrepair" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Computer Programming/Repair}} {{dice_code=@{comp_progrepair_dice_ref}}} {{result=[[@{comp_progrepair_dice_ref}]]}}" name="roll_comp_progrepair"></button></td>
</tr>
<tr>
<td>Demolition</td>
<td><input type="text" tabindex="58" name="attr_demolition" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Demolition}} {{dice_code=@{demolition_dice_ref}}} {{result=[[@{demolition_dice_ref}]]}}" name="roll_demolition"></button></td>
</tr>
<tr>
<td title="Droid Programming/Repair">Droid Prog./Repair</td>
<td><input type="text" tabindex="59" name="attr_droid_progrepair" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Droid Programming/Repair}} {{dice_code=@{droid_progrepair_dice_ref}}} {{result=[[@{droid_progrepair_dice_ref}]]}}" name="roll_droid_progrepair"></button></td>
</tr>
<tr>
<td>Medicine</td>
<td><input type="text" tabindex="60" name="attr_medicine" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Medicine}} {{dice_code=@{medicine_dice_ref}}} {{result=[[@{medicine_dice_ref}]]}}" name="roll_medicine"></button></td>
</tr>
<tr>
<td>Repulsorlift Repair</td>
<td><input type="text" tabindex="61" name="attr_repulsorlift_repair" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Repulsorlift Repair}} {{dice_code=@{repulsorlift_repair_dice_ref}}} {{result=[[@{repulsorlift_repair_dice_ref}]]}}" name="roll_repulsorlift_repair"></button></td>
</tr>
<tr>
<td>Security</td>
<td><input type="text" tabindex="62" name="attr_security" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Security}} {{dice_code=@{security_dice_ref}}} {{result=[[@{security_dice_ref}]]}}" name="roll_security"></button></td>
</tr>
<tr>
<td>Starship Repair</td>
<td><input type="text" tabindex="63" name="attr_starship_repair" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Starship Repair}} {{dice_code=@{starship_repair_dice_ref}}} {{result=[[@{starship_repair_dice_ref}]]}}" name="roll_starship_repair"></button></td>
</tr>
<tr>
<td><input type="text" tabindex="64" name="attr_technical_blank_name" /></td>
<td><input type="text" tabindex="65" name="attr_technical_blank" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=@{technical_blank_name}}} {{dice_code=@{technical_blank_dice_ref}}} {{result=[[@{technical_blank_dice_ref}]]}}" name="roll_technical_skill"></button></td>
</tr>
</table>
<!-- FORCE SKILLS -->
<table class="sheet-force-skills">
<tr>
<td>Control</td>
<td><input type="text" tabindex="66" name="attr_control" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Control}} {{dice_code=@{control_dice_ref}}} {{result=[[@{control_dice_ref}]]}}" name="roll_control"></button></td>
</tr>
<tr>
<td>Sense</td>
<td><input type="text" tabindex="67" name="attr_sense" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Sense}} {{dice_code=@{sense_dice_ref}}} {{result=[[@{sense_dice_ref}]]}}" name="roll_sense"></button></td>
</tr>
<tr>
<td>Alter</td>
<td><input type="text" tabindex="68" name="attr_alter" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Alter}} {{dice_code=@{alter_dice_ref}}} {{result=[[@{alter_dice_ref}]]}}" name="roll_alter"></button></td>
</tr>
</table>
</div>
</div>
</div>
<!-- CIRCLES -->
<div class="sheet-circle-section">
<table>
<tr>
<td>
<div class="sheet-circle">
<input type="text" tabindex="69" name="attr_force_points" value="1" />
</div>
</td>
<td>
<div class="sheet-circle">
<input type="text" tabindex="70" name="attr_dark_side_points" value="0" />
</div>
</td>
<td>
<div class="sheet-circle">
<select name="attr_wound_status" title="(H)ealthy, (S)tunned, (W)ounded, (I)ncapacitated, (M)ortally Wounded">
<option value="H" title="Healthy" selected>H</option>
<option value="S" title="Stunned">S</option>
<option value="W" title="Wounded">W</option>
<option value="I" title="Incapacitated">I</option>
<option value="M" title="Mortally Wounded">M</option>
</select>
</div>
</td>
<td>
<div class="sheet-circle">
<input type="text" tabindex="72" name="attr_skill_points" value="0" />
</div>
</td>
</tr>
<tr>
<td>Force<br />Points</td>
<td>Dark Side<br />Points</td>
<td>Wound<br />Status</td>
<td>Skill<br />Points</td>
</tr>
</table>
</div>
</div>
<!-- RIGHT SECTION -->
<div class="sheet-right-section">
<!-- EQUIPMENT -->
<div class="sheet-equipment-section">
<!-- ARMOR -->
<table class="sheet-armor-table">
<tr>
<th>Armor</th>
<th>Armor Code</th>
</tr>
<tr>
<td><input type="text" tabindex="73" name="attr_armor_type" /></td>
<td><input type="text" tabindex="74" name="attr_armor_code" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=Strength plus armor}} {{dice_code=@{strengtharmor_dice_ref}}} {{result=[[@{strengtharmor_dice_ref}]]}}" name="roll_strength_plus_armor" title="Roll Strength + Armor against damage"></button></td>
</tr>
</table>
<!-- WEAPONS -->
<table class="sheet-weapons-table">
<tr>
<th>Weapons</th>
<th>Damage</th>
<th></th>
<th>Range</th>
<th title="Hand-to-Hand Difficulty Number">Diff.</th>
</tr>
<tr>
<td><input type="text" tabindex="75" name="attr_weapon_1" /></td>
<td><input type="text" tabindex="76" name="attr_weapon_1_damage_code" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=weapon damage for @{weapon_1}}} {{dice_code=@{weapon_1_damage_code_dice_ref}}} {{result=[[@{weapon_1_damage_code_dice_ref}]]}}" name="roll_weapon_1_damage" title="Roll weapon damage"></button></td>
<td><input type="text" tabindex="77" name="attr_weapon_1_range" /></td>
<td><input type="text" tabindex="78" name="attr_weapon_1_difficulty" /></td>
</tr>
<tr>
<td><input type="text" tabindex="79" name="attr_weapon_2" /></td>
<td><input type="text" tabindex="80" name="attr_weapon_2_damage_code" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=weapon damage for @{weapon_2}}} {{dice_code=@{weapon_2_damage_code_dice_ref}}} {{result=[[@{weapon_2_damage_code_dice_ref}]]}}" name="roll_weapon_2_damage" title="Roll weapon damage"></button></td>
<td><input type="text" tabindex="81" name="attr_weapon_2_range" /></td>
<td><input type="text" tabindex="82" name="attr_weapon_2_difficulty" /></td>
</tr>
<tr>
<td><input type="text" tabindex="83" name="attr_weapon_3" /></td>
<td><input type="text" tabindex="84" name="attr_weapon_3_damage_code" /></td>
<td><button type="roll" value="&{template:general} {{name=@{character_name}}} {{roll_name=weapon damage for @{weapon_3}}} {{dice_code=@{weapon_3_damage_code_dice_ref}}} {{result=[[@{weapon_3_damage_code_dice_ref}]]}}" name="roll_weapon_3_damage" title="Roll weapon damage"></button></td>
<td><input type="text" tabindex="85" name="attr_weapon_3_range" /></td>
<td><input type="text" tabindex="86" name="attr_weapon_3_difficulty" /></td>
</tr>
</table>
<!-- OTHER EQUIPMENT -->
<div class="sheet-input-group">
<label>Equipment</label>
<textarea rows="8" tabindex="87" name="attr_equipment"></textarea>
</div>
</div>
<div class="sheet-line"></div>
<!-- PERSONAL -->
<div class="sheet-personal-section">
<div class="sheet-input-group">
<label>Background</label>
<textarea rows="10" tabindex="88" name="attr_background"></textarea>
</div>
<div class="sheet-input-group">
<label>Personality</label>
<textarea rows="6" tabindex="89" name="attr_personality"></textarea>
</div>
<div class="sheet-input-group">
<label>A Quote</label>
<textarea rows="2" tabindex="90" name="attr_quote"></textarea>
</div>
<div class="sheet-input-group">
<label>Connection With Other Characters</label>
<textarea rows="4" tabindex="91" name="attr_connections"></textarea>
</div>
</div>
</div>
</div>
</div>
<input type="hidden" name="attr_dexterity_dice_ref" value="0d6" />
<input type="hidden" name="attr_knowledge_dice_ref" value="0d6" />
<input type="hidden" name="attr_mechanical_dice_ref" value="0d6" />
<input type="hidden" name="attr_perception_dice_ref" value="0d6" />
<input type="hidden" name="attr_strength_dice_ref" value="0d6" />
<input type="hidden" name="attr_technical_dice_ref" value="0d6" />
<input type="hidden" name="attr_blaster_dice_ref" value="0d6" />
<input type="hidden" name="attr_brawling_parry_dice_ref" value="0d6" />
<input type="hidden" name="attr_dodge_dice_ref" value="0d6" />
<input type="hidden" name="attr_grenade_dice_ref" value="0d6" />
<input type="hidden" name="attr_heavy_weapons_dice_ref" value="0d6" />
<input type="hidden" name="attr_melee_parry_dice_ref" value="0d6" />
<input type="hidden" name="attr_melee_dice_ref" value="0d6" />
<input type="hidden" name="attr_alien_races_dice_ref" value="0d6" />
<input type="hidden" name="attr_bureaucracy_dice_ref" value="0d6" />
<input type="hidden" name="attr_cultures_dice_ref" value="0d6" />
<input type="hidden" name="attr_languages_dice_ref" value="0d6" />
<input type="hidden" name="attr_planetary_systems_dice_ref" value="0d6" />
<input type="hidden" name="attr_streetwise_dice_ref" value="0d6" />
<input type="hidden" name="attr_survival_dice_ref" value="0d6" />
<input type="hidden" name="attr_technology_dice_ref" value="0d6" />
<input type="hidden" name="attr_astrogation_dice_ref" value="0d6" />
<input type="hidden" name="attr_beast_riding_dice_ref" value="0d6" />
<input type="hidden" name="attr_repulsorlift_op_dice_ref" value="0d6" />
<input type="hidden" name="attr_starship_gunnery_dice_ref" value="0d6" />
<input type="hidden" name="attr_starship_piloting_dice_ref" value="0d6" />
<input type="hidden" name="attr_starship_shields_dice_ref" value="0d6" />
<input type="hidden" name="attr_bargain_dice_ref" value="0d6" />
<input type="hidden" name="attr_command_dice_ref" value="0d6" />
<input type="hidden" name="attr_con_dice_ref" value="0d6" />
<input type="hidden" name="attr_gambling_dice_ref" value="0d6" />
<input type="hidden" name="attr_hidesneak_dice_ref" value="0d6" />
<input type="hidden" name="attr_search_dice_ref" value="0d6" />
<input type="hidden" name="attr_brawling_dice_ref" value="0d6" />
<input type="hidden" name="attr_climbingjumping_dice_ref" value="0d6" />
<input type="hidden" name="attr_lifting_dice_ref" value="0d6" />
<input type="hidden" name="attr_stamina_dice_ref" value="0d6" />
<input type="hidden" name="attr_swimming_dice_ref" value="0d6" />
<input type="hidden" name="attr_comp_progrepair_dice_ref" value="0d6" />
<input type="hidden" name="attr_demolition_dice_ref" value="0d6" />
<input type="hidden" name="attr_droid_progrepair_dice_ref" value="0d6" />
<input type="hidden" name="attr_medicine_dice_ref" value="0d6" />
<input type="hidden" name="attr_repulsorlift_repair_dice_ref" value="0d6" />
<input type="hidden" name="attr_security_dice_ref" value="0d6" />
<input type="hidden" name="attr_starship_repair_dice_ref" value="0d6" />
<input type="hidden" name="attr_dexterity_blank_dice_ref" value="0d6" />
<input type="hidden" name="attr_knowledge_blank_dice_ref" value="0d6" />
<input type="hidden" name="attr_mechanical_blank_dice_ref" value="0d6" />
<input type="hidden" name="attr_perception_blank_dice_ref" value="0d6" />
<input type="hidden" name="attr_strength_blank_dice_ref" value="0d6" />
<input type="hidden" name="attr_technical_blank_dice_ref" value="0d6" />
<input type="hidden" name="attr_control_dice_ref" value="0d6" />
<input type="hidden" name="attr_sense_dice_ref" value="0d6" />
<input type="hidden" name="attr_alter_dice_ref" value="0d6" />
<input type="hidden" name="attr_weapon_1_damage_code_dice_ref" value="0d6" />
<input type="hidden" name="attr_weapon_2_damage_code_dice_ref" value="0d6" />
<input type="hidden" name="attr_weapon_3_damage_code_dice_ref" value="0d6" />
<input type="hidden" name="attr_strengtharmor_dice_ref" value="0d6" />
<rolltemplate class="sheet-rolltemplate-general">
<div class="sheet-roll-line sheet-roll-line-top"></div>
<div class="sheet-roll-wrapper">
{{name}} rolls <strong>{{roll_name}}</strong> with {{dice_code}} and gets
<div class="sheet-roll-result">{{result}}</div>
</div>
<div class="sheet-roll-line sheet-roll-line-bottom"></div>
</rolltemplate>
<script type="text/worker">
// Dexterity
var dexSkills = [
'blaster', 'brawling_parry', 'dodge', 'grenade',
'heavy_weapons', 'melee_parry', 'melee'
];
on('change:dexterity', function() {
updateDiceRef('dexterity', true);
updateDefaultSkillCodes('dexterity', dexSkills);
});
dexSkills.forEach(function(skill) {
on('change:' + skill, function() {
updateDiceRef(skill, true);
});
});
// Knowledge
var knoSkills = [
'alien_races', 'bureaucracy', 'cultures', 'languages',
'planetary_systems', 'streetwise', 'survival', 'technology'
];
on('change:knowledge', function() {
updateDiceRef('knowledge', false);
updateDefaultSkillCodes('knowledge', knoSkills);
});
knoSkills.forEach(function(skill) {
on('change:' + skill, function() {
updateDiceRef(skill, false);
});
});
// Mechanical
var mecSkills = [
'astrogation', 'beast_riding', 'repulsorlift_op',
'starship_gunnery', 'starship_piloting', 'starship_shields'
];
on('change:mechanical', function() {
updateDiceRef('mechanical', false);
updateDefaultSkillCodes('mechanical', mecSkills);
});
mecSkills.forEach(function(skill) {
on('change:' + skill, function() {
updateDiceRef(skill, false);
});
});
// Perception
var perSkills = [
'bargain', 'command', 'con', 'gambling', 'hidesneak', 'search'
];
on('change:perception', function() {
updateDiceRef('perception', false);
updateDefaultSkillCodes('perception', perSkills);
});
perSkills.forEach(function(skill) {
on('change:' + skill, function() {
updateDiceRef(skill, false);
});
});
// Strength
var strSkills = [
'brawling', 'climbingjumping', 'lifting', 'stamina', 'swimming'
];
on('change:strength', function() {
updateDiceRef('strength', false);
updateDefaultSkillCodes('strength', strSkills);
updateStrengthArmorRef('strength');
weaponDamageCodes.forEach(function(weaponDamageCode) {
updateDiceRefForWeapon(weaponDamageCode);
});
});
strSkills.forEach(function(skill) {
on('change:' + skill, function() {
updateDiceRef(skill, false);
});
});
// Technical
var tecSkills = [
'comp_progrepair', 'demolition', 'droid_progrepair', 'medicine',
'repulsorlift_repair', 'security', 'starship_repair'
];
on('change:technical', function() {
updateDiceRef('technical', false);
updateDefaultSkillCodes('technical', tecSkills);
});
tecSkills.forEach(function(skill) {
on('change:' + skill, function() {
updateDiceRef(skill, false);
});
});
// Force skills
var forceSkills = ['control', 'sense', 'alter'];
forceSkills.forEach(function(skill) {
on('change:' + skill, function() {
updateDiceRef(skill, false);
if (skill == 'control') {
weaponDamageCodes.forEach(function(weaponDamageCode) {
updateDiceRefForWeapon(weaponDamageCode);
});
}
});
});
// Weapon damage codes
var weaponDamageCodes = [
'weapon_1_damage_code', 'weapon_2_damage_code', 'weapon_3_damage_code'
];
weaponDamageCodes.forEach(function(weaponDamageCode) {
on('change:' + weaponDamageCode, function() {
updateDiceRefForWeapon(weaponDamageCode);
});
});
// Blank skills
var blankSkills = [
'dexterity_blank', 'knowledge_blank', 'mechanical_blank',
'perception_blank', 'strength_blank', 'technical_blank'
];
blankSkills.forEach(function(skill) {
on('change:' + skill, function() {
updateDiceRef(skill, skill.indexOf('dexterity') > -1);
});
});
// Armor
on('change:armor_code', function() {
updateStrengthArmorRef('armor_code');
updateDexForArmor();
});
// Wound status
on('change:wound_status', function() {
updateDiceRefsForWoundStatus();
updateStrengthArmorRef('strength');
weaponDamageCodes.forEach(function(weaponDamageCode) {
updateDiceRefForWeapon(weaponDamageCode);
});
});
/* Updates an attributes skills to attribute value if the skill code is empty */
var updateDefaultSkillCodes = function(attribute, skills) {
getAttrs([attribute], function(attributeValues) {
skills.forEach(function(skillName) {
getAttrs([skillName], function(skillValues) {
if (skillValues[skillName] == '') {
var update = {};
update[skillName] = attributeValues[attribute];
setAttrs(update);
console.log('---> Setting ' + skillName + ' to ' + attributeValues[attribute]);
}
});
});
});
};
/* Update dice ref */
var updateDiceRef = function(attrName, applyArmorPenalty) {
getAttrs([attrName, 'armor_code', 'wound_status'], function(values) {
var update = {};
var diceRefName = attrName + '_dice_ref';
var diceRef;
var woundMod = getWoundMod(values['wound_status']);
var attrPips = getPips(values[attrName]);
var modifiedAttrPips = getModifiedPips(attrPips, woundMod);
if (applyArmorPenalty) {
var armorPips = getPips(values['armor_code']);
modifiedAttrPips = getModifiedPips(modifiedAttrPips, armorPips);
}
update[diceRefName] = calculateDiceRef(modifiedAttrPips);
setAttrs(update);
console.log('--> Setting ' + diceRefName + ' to ' + update[diceRefName]);
});
};
/* Update dice ref for damage code */
var updateDiceRefForWeapon = function(attrName) {
getAttrs([attrName, 'strength', 'control', 'wound_status'], function(values) {
var update = {};
var diceRefName = attrName + '_dice_ref';
var diceRef;
var attrPips = 0;
if (values[attrName].toLowerCase().indexOf('str+') > -1) {
var strPips = getPips(values['strength']);
var woundMod = getWoundMod(values['wound_status']);
var modifiedStrPips = getModifiedPips(strPips, woundMod);
var weaponDamagePips = getPips(values[attrName].split('str+')[1]);
attrPips = weaponDamagePips + modifiedStrPips;
} else if (values[attrName].toLowerCase().indexOf('ctrl+') > -1) {
var controlPips = getPips(values['control']);
var woundMod = getWoundMod(values['wound_status']);
var modifiedControlPips = getModifiedPips(controlPips, woundMod);
var weaponDamagePips = getPips(values[attrName].split('ctrl+')[1]);
attrPips = weaponDamagePips + modifiedControlPips;
} else {
attrPips = getPips(values[attrName]);
}
update[diceRefName] = calculateDiceRef(attrPips);
setAttrs(update);
console.log('--> Setting ' + diceRefName + ' to ' + update[diceRefName]);
});
};
/* Gets pips from dice code. xD+y = x*3+y */
var getPips = function(diceCode) {
if (diceCode == undefined || diceCode == '') {
return 0;
} else if (diceCode.indexOf('D') > -1) {
return eval(diceCode.replace('D', '*3'));
} else if (diceCode.indexOf('d') > -1) {
return eval(diceCode.replace('d', '*3'));
} else if (diceCode.indexOf('+') > -1 && diceCode.length == 2) {
return eval(diceCode.replace('+', ''));
} else {
return 0;
}
};
/* Calculates dice ref from pips */
var calculateDiceRef = function(pips) {
var diceCode = Math.floor(pips/3) + 'd6';
var mod = pips % 3;
var diceRef = diceCode + (mod > 0 ? '+' + mod : '');
return diceRef;
};
/* Modifies pips by subtracting the modifier. Minimum 0. */
var getModifiedPips = function(attrPips, mod) {
var modifiedPips = attrPips - mod;
return modifiedPips < 0 ? 0 : modifiedPips;
};
var updateDexForArmor = function() {
var neededAttrs = ['armor_code', 'dexterity', 'dexterity_blank', 'wound_status'].concat(dexSkills);
getAttrs(neededAttrs, function(values) {
var armorPips = getPips(values['armor_code']);
var woundMod = getWoundMod(values['wound_status']);
var update = {};
// Update dexterity
var dexPips = getPips(values['dexterity']);
var dexModifiedPips = getModifiedPips(dexPips, armorPips);
dexModifiedPips = getModifiedPips(dexModifiedPips, woundMod);
update['dexterity_dice_ref'] = calculateDiceRef(dexModifiedPips);
console.log('--> Armor changes dexterity_dice_ref to ' + update['dexterity_dice_ref']);
// Update blank dexterity skill
var blankSkillPips = getPips(values['dexterity_blank']);
var blankSkillModifiedPips = getModifiedPips(blankSkillPips, armorPips);
blankSkillModifiedPips = getModifiedPips(blankSkillModifiedPips, woundMod);
update['dexterity_blank_dice_ref'] = calculateDiceRef(blankSkillModifiedPips);
console.log('--> Armor changes dexterity_blank_dice_ref to ' + update['dexterity_blank_dice_ref']);
// Update dexterity skills
dexSkills.forEach(function(skillName) {
var skillPips = getPips(values[skillName]);
var skillModifiedPips = getModifiedPips(skillPips, armorPips);
skillModifiedPips = getModifiedPips(skillModifiedPips, woundMod);
var skillDiceRefName = skillName + '_dice_ref';
update[skillDiceRefName] = calculateDiceRef(skillModifiedPips);
console.log('--> Armor changes ' + skillDiceRefName + ' to ' + update[skillDiceRefName]);
});
setAttrs(update);
});
};
var updateStrengthArmorRef = function(attrName) {
if (attrName == 'strength' || attrName == 'armor_code') {
getAttrs(['strength', 'armor_code', 'wound_status'], function(values) {
var update = {};
var armorPips = getPips(values['armor_code']);
var woundMod = getWoundMod(values['wound_status']);
var strengthPips = getPips(values['strength']);
var modifiedStrengthPips = getModifiedPips(strengthPips, woundMod);
var strengthArmorDiceRef = calculateDiceRef(modifiedStrengthPips + armorPips);
update['strengtharmor_dice_ref'] = strengthArmorDiceRef;
setAttrs(update);
console.log('--> Updating strenghtarmor_dice_ref to ' + update['strengtharmor_dice_ref']);
});
}
};
var updateDiceRefsForWoundStatus = function() {
var allAttributes = [
'dexterity', 'knowledge', 'mechanical',
'perception', 'strength', 'technical'
];
var allSkills = dexSkills.concat(knoSkills).concat(mecSkills)
.concat(perSkills).concat(strSkills).concat(tecSkills)
.concat(blankSkills).concat(forceSkills);
var neededAttrs = ['wound_status', 'armor_code'].concat(allAttributes)
.concat(allSkills);
getAttrs(neededAttrs, function(values) {
console.log('--> Starting to update for wound status');
var update = {};
var woundMod = getWoundMod(values['wound_status']);
var armorPips = getPips(values['armor_code']);
allAttributes.forEach(function(attributeName) {
update[attributeName + '_dice_ref'] = getModifiedDiceRef(attributeName, values[attributeName], woundMod, armorPips);
console.log('--> Wounded status changes ' + attributeName + '_dice_ref to ' + update[attributeName + '_dice_ref']);
});
allSkills.forEach(function(skillName) {
update[skillName + '_dice_ref'] = getModifiedDiceRef(skillName, values[skillName], woundMod, armorPips);
console.log('--> Wounded status changes ' + skillName + '_dice_ref to ' + update[skillName + '_dice_ref']);
});
setAttrs(update);
});
};
var getModifiedDiceRef = function(attrName, attrValue, mod, armorPips) {
var pips = getPips(attrValue);
var modifiedPips = getModifiedPips(pips, mod);
if (attrName.indexOf('dexterity') > -1 || dexSkills.includes(attrName)) {
modifiedPips = getModifiedPips(modifiedPips, armorPips);
}
var diceRef = calculateDiceRef(modifiedPips);
return diceRef;
};
var getWoundMod = function(woundStatus) {
switch (woundStatus) {
case 'H':
case 'S':
return 0;
case 'W':
case 'I':
case 'M':
return 3;
}
};
</script>