mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 19:52:29 +00:00
950 lines
51 KiB
HTML
950 lines
51 KiB
HTML
|
||
<input type="hidden" name="attr_version" value="1.73"/>
|
||
<div class="tab-buttons middle center">
|
||
<input class="npctoggle" type="hidden" name="attr_npc" value="0"/>
|
||
<button class="pc" type="action" name="act_character">Character</button>
|
||
<button class="pc" type="action" name="act_background">Background</button>
|
||
<button class="npc" type="action" name="act_npc">NPC</button>
|
||
<button type="action" name="act_settings">Settings</button><span class="version bold">Sheet Version: <span name="attr_version"></span></span>
|
||
</div>
|
||
<input class="tabstoggle" type="hidden" name="attr_sheetTab" value="character"/>
|
||
<main class="character">
|
||
<section class="name columnflex nowrap">
|
||
<div class="rowflex nowrap spaced">
|
||
<div class="columnflex nowrap">
|
||
<label style="width:100px;">Character name</label>
|
||
<input name="attr_character_name" type="text"/>
|
||
</div>
|
||
<div class="columnflex nowrap">
|
||
<label style="width:80px;">Player name</label>
|
||
<input name="attr_player_name" type="text"/>
|
||
</div>
|
||
<div class="columnflex nowrap">
|
||
<label>Campaign</label>
|
||
<input name="attr_campaign" type="text"/>
|
||
</div>
|
||
</div>
|
||
<div class="rowflex nowrap spaced">
|
||
<div class="columnflex nowrap">
|
||
<label>Race</label>
|
||
<input name="attr_race" list="race" placeholder="race" type="text"/>
|
||
</div>
|
||
<div class="columnflex nowrap">
|
||
<label>Origin</label>
|
||
<input name="attr_origin" list="origin" placeholder="origin" type="text"/>
|
||
</div>
|
||
<div class="columnflex nowrap">
|
||
<label>Class</label>
|
||
<input name="attr_class" list="rpgclass" placeholder="class" type="text"/>
|
||
</div>
|
||
<div class="columnflex nowrap">
|
||
<label class="w40" title="@{rank}">Level</label>
|
||
<input class="w40" name="attr_rank" title="@{rank}" type="number" placeholder="1"/>
|
||
</div>
|
||
<div class="columnflex nowrap">
|
||
<label class="w40" title="Hit Dice">HD</label>
|
||
<input class="w40" name="attr_hd" type="text" placeholder="d8" title="Hit Dice: @{hd}"/>
|
||
</div>
|
||
<div class="columnflex nowrap">
|
||
<label class="w30">MP</label>
|
||
<input class="w40" name="attr_mp" type="number" placeholder="" title="Mission Points"/>
|
||
</div>
|
||
<div class="columnflex nowrap">
|
||
<label class="w70" title="@{td}">Tension Die</label>
|
||
<select name="attr_td">
|
||
<option value="d4">d4</option>
|
||
<option value="d6" selected="">d6</option>
|
||
<option value="d8">d8</option>
|
||
<option value="d10">d10</option>
|
||
<option value="d12">d12</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<div class="attr columnflex nowrap spaced center">
|
||
<div class="stat columnflex nowrap center middle">
|
||
<button class="txt-btn large" name="roll_str" title="%{str}" type="roll" value="@{whisper}&{template:stargate} {{title=Strength Check}} @{show_name} {{[[d20+(@{str_mod})]]=[[d20+(@{str_mod})]]}}">STR</button>
|
||
<input name="attr_str" type="number" value="10"/><span class="mod" name="attr_str_mod" title="@{str_mod}"></span>
|
||
</div>
|
||
<div class="stat columnflex nowrap center middle">
|
||
<button class="txt-btn large" name="roll_dex" title="%{dex}" type="roll" value="@{whisper}&{template:stargate} {{title=Dexterity Check}} @{show_name} {{[[d20+(@{dex_mod})]]=[[d20+(@{dex_mod})]]}}">DEX</button>
|
||
<input name="attr_dex" type="number" value="10"/><span class="mod" name="attr_dex_mod" title="@{dex_mod}"></span>
|
||
</div>
|
||
<div class="stat columnflex nowrap center middle">
|
||
<button class="txt-btn large" name="roll_con" title="%{con}" type="roll" value="@{whisper}&{template:stargate} {{title=Constitution Check}} @{show_name} {{[[d20+(@{con_mod})]]=[[d20+(@{con_mod})]]}}">CON</button>
|
||
<input name="attr_con" type="number" value="10"/><span class="mod" name="attr_con_mod" title="@{con_mod}"></span>
|
||
</div>
|
||
<div class="stat columnflex nowrap center middle">
|
||
<button class="txt-btn large" name="roll_wis" title="%{wis}" type="roll" value="@{whisper}&{template:stargate} {{title=Wisdom Check}} @{show_name} {{[[d20+(@{wis_mod})]]=[[d20+(@{wis_mod})]]}}">WIS</button>
|
||
<input name="attr_wis" type="number" value="10"/><span class="mod" name="attr_wis_mod" title="@{wis_mod}"></span>
|
||
</div>
|
||
<div class="stat columnflex nowrap center middle">
|
||
<button class="txt-btn large" name="roll_int" title="%{int}" type="roll" value="@{whisper}&{template:stargate} {{title=Intelligence Check}} @{show_name} {{[[d20+(@{int_mod})]]=[[d20+(@{int_mod})]]}}">INT</button>
|
||
<input name="attr_int" type="number" value="10"/><span class="mod" name="attr_int_mod" title="@{int_mod}"></span>
|
||
</div>
|
||
<div class="stat columnflex nowrap center middle">
|
||
<button class="txt-btn large" name="roll_cha" title="%{cha}" type="roll" value="@{whisper}&{template:stargate} {{title=Charisma Check}} @{show_name} {{[[d20+(@{cha_mod})]]=[[d20+(@{cha_mod})]]}}">CHA</button>
|
||
<input name="attr_cha" type="number" value="10"/><span class="mod" name="attr_cha_mod" title="@{cha_mod}"></span>
|
||
</div>
|
||
</div>
|
||
<section class="skills columnflex nowrap spaced">
|
||
<h3>Skills</h3>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_acrobatics_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_acrobatics" type="number" title="@{acrobatics}" value="0"/>
|
||
<button class="txt-btn" name="roll_acrobatics" type="roll" value="@{whisper}&{template:stargate} {{title=Acrobatics Check}} @{show_name} {{[[d20+(@{acrobatics})]]=[[d20+(@{acrobatics})]]}}">Acrobatics</button><span>(dex)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_animalhandling_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_animalhandling" type="number" title="@{animalhandling}" value="0"/>
|
||
<button class="txt-btn" name="roll_animalhandling" type="roll" value="@{whisper}&{template:stargate} {{title=Animal Handling Check}} @{show_name} {{[[d20+(@{animalhandling})]]=[[d20+(@{animalhandling})]]}}">Animal Handling</button><span>(wis)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_athletics_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_athletics" type="number" title="@{athletics}" value="0"/>
|
||
<button class="txt-btn" name="roll_athletics" type="roll" value="@{whisper}&{template:stargate} {{title=Athletics Check}} @{show_name} {{[[d20+(@{athletics})]]=[[d20+(@{athletics})]]}}">Athletics</button><span>(str)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_culture_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_culture" type="number" title="@{culture}" value="0"/>
|
||
<button class="txt-btn" name="roll_culture" type="roll" value="@{whisper}&{template:stargate} {{title=Culture Check}} @{show_name} {{[[d20+(@{culture})]]=[[d20+(@{culture})]]}}">Culture</button><span>(wis)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_deception_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_deception" type="number" title="@{deception}" value="0"/>
|
||
<button class="txt-btn" name="roll_deception" type="roll" value="@{whisper}&{template:stargate} {{title=Deception Check}} @{show_name} {{[[d20+(@{deception})]]=[[d20+(@{deception})]]}}">Deception</button><span>(cha)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_engineering_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_engineering" type="number" title="@{engineering}" value="0"/>
|
||
<button class="txt-btn" name="roll_engineering" type="roll" value="@{whisper}&{template:stargate} {{title=Engineering Check}} @{show_name} {{[[d20+(@{engineering})]]=[[d20+(@{engineering})]]}}">Engineering</button><span>(int)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_insight_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_insight" type="number" title="@{insight}" value="0"/>
|
||
<button class="txt-btn" name="roll_insight" type="roll" value="@{whisper}&{template:stargate} {{title=Insight Check}} @{show_name} {{[[d20+(@{insight})]]=[[d20+(@{insight})]]}}">Insight</button><span>(wis)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_intimidation_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_intimidation" type="number" title="@{intimidation}" value="0"/>
|
||
<button class="txt-btn" name="roll_intimidation" type="roll" value="@{whisper}&{template:stargate} {{title=Intimidation Check}} @{show_name} {{[[d20+(@{intimidation})]]=[[d20+(@{intimidation})]]}}">Intimidation</button><span>(cha)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_investigation_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_investigation" type="number" title="@{investigation}" value="0"/>
|
||
<button class="txt-btn" name="roll_investigation" type="roll" value="@{whisper}&{template:stargate} {{title=Investigation Check}} @{show_name} {{[[d20+(@{investigation})]]=[[d20+(@{investigation})]]}}">Investigation</button><span>(int)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_medicine_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_medicine" type="number" title="@{medicine}" value="0"/>
|
||
<button class="txt-btn" name="roll_medicine" type="roll" value="@{whisper}&{template:stargate} {{title=Medicine Check}} @{show_name} {{[[d20+(@{medicine})]]=[[d20+(@{medicine})]]}}">Medicine</button><span>(wis)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_nature_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_nature" type="number" title="@{nature}" value="0"/>
|
||
<button class="txt-btn" name="roll_nature" type="roll" value="@{whisper}&{template:stargate} {{title=Nature Check}} @{show_name} {{[[d20+(@{nature})]]=[[d20+(@{nature})]]}}">Nature</button><span>(int)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_perception_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_perception" type="number" title="@{perception}" value="0"/>
|
||
<button class="txt-btn" name="roll_perception" type="roll" value="@{whisper}&{template:stargate} {{title=Perception Check}} @{show_name} {{[[d20+(@{perception})]]=[[d20+(@{perception})]]}}">Perception</button><span>(wis)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_performance_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_performance" type="number" title="@{performance}" value="0"/>
|
||
<button class="txt-btn" name="roll_performance" type="roll" value="@{whisper}&{template:stargate} {{title=performance Check}} @{show_name} {{[[d20+(@{performance})]]=[[d20+(@{performance})]]}}">performance</button><span>(cha)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_persuasion_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_persuasion" type="number" title="@{persuasion}" value="0"/>
|
||
<button class="txt-btn" name="roll_persuasion" type="roll" value="@{whisper}&{template:stargate} {{title=Persuasion Check}} @{show_name} {{[[d20+(@{persuasion})]]=[[d20+(@{persuasion})]]}}">Persuasion</button><span>(cha)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_pilot_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_pilot" type="number" title="@{pilot}" value="0"/>
|
||
<button class="txt-btn" name="roll_pilot" type="roll" value="@{whisper}&{template:stargate} {{title=Pilot Check}} @{show_name} {{[[d20+(@{pilot})]]=[[d20+(@{pilot})]]}}">Pilot</button><span>(dex)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_science_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_science" type="number" title="@{science}" value="0"/>
|
||
<button class="txt-btn" name="roll_science" type="roll" value="@{whisper}&{template:stargate} {{title=Science Check}} @{show_name} {{[[d20+(@{science})]]=[[d20+(@{science})]]}}">Science</button><span>(int)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_sleight_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_sleight" type="number" title="@{sleight}" value="0"/>
|
||
<button class="txt-btn" name="roll_sleight" type="roll" value="@{whisper}&{template:stargate} {{title=Sleight of Hand Check}} @{show_name} {{[[d20+(@{sleight})]]=[[d20+(@{sleight})]]}}">Sleight of Hand</button><span>(dex)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_stealth_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_stealth" type="number" title="@{stealth}" value="0"/>
|
||
<button class="txt-btn" name="roll_stealth" type="roll" value="@{whisper}&{template:stargate} {{title=Stealth Check}} @{show_name} {{[[d20+(@{stealth})]]=[[d20+(@{stealth})]]}}">Stealth</button><span>(dex)</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_survival_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_survival" type="number" title="@{survival}" value="0"/>
|
||
<button class="txt-btn" name="roll_survival" type="roll" value="@{whisper}&{template:stargate} {{title=Survival Check}} @{show_name} {{[[d20+(@{survival})]]=[[d20+(@{survival})]]}}">Survival</button><span>(wis)</span>
|
||
</div>
|
||
</section>
|
||
<section class="hp rowflex nowrap">
|
||
<div class="section columnflex nowrap middle center">
|
||
<label class="txtcenter" title="Hit Points">HP</label>
|
||
<div class="rowflex nowrap">
|
||
<input class="stat w40" name="attr_hp" type="number" value="" placeholder="20" title="@{hp}"/><span class="slash">/</span>
|
||
<input class="stat w40" name="attr_hp_max" type="number" value="" placeholder="20" title="@{hp|max}"/>
|
||
</div>
|
||
</div>
|
||
<div class="section columnflex nowrap middle center determ">
|
||
<label class="txtcenter" title="Temporary Hit Points">Temp HP</label>
|
||
<div class="rowflex nowrap">
|
||
<input class="stat w40" name="attr_hp_temp" type="number" value="" title="@{hp_temp}"/><span class="slash">/</span>
|
||
<input class="stat w40" name="attr_hp_temp_max" type="number" value="" title="@{hp_temp|max}"/>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="condition columnflex nowrap spaced">
|
||
<h3 class="txtcenter" title="@{condition}">CONDITION</h3>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_condition" type="radio" value="0" checked="true"/><span>Normal</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_condition" type="radio" value="1"/><span>Disadv ability checks</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_condition" type="radio" value="2"/><span>Speed Halved</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_condition" type="radio" value="3"/><span>Disadv Attacks, Saves</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_condition" type="radio" value="4"/><span>Max HP Halved</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_condition" type="radio" value="5"/><span>Speed Zero</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_condition" type="radio" value="6"/><span>Death</span>
|
||
</div>
|
||
</section>
|
||
<div class="prof rowflex nowrap">
|
||
<div class="section columnflex nowrap middle center">
|
||
<label class="wide" title="Proficiency Bonus">Prof Bonus</label>
|
||
<input class="stat w40" name="attr_prof" type="number" value="2" title="Proficiency Bonus: @{prof}"/>
|
||
</div>
|
||
<div class="section columnflex nowrap middle center init">
|
||
<button class="txt-btn" name="roll_init" type="roll" value="@{whisper}&{template:stargate} {{title=Initiative}} @{show_name} {{ Roll =[[d20+(@{init}) &{tracker}]]}}" title="%{init}">Initiative</button>
|
||
<input class="stat w40" name="attr_init" type="number" value="0" title="@{init}"/>
|
||
</div>
|
||
<div class="section columnflex nowrap middle center moxie">
|
||
<button class="txt-btn" name="roll_moxie" type="roll" value="@{whisper}&{template:stargate} {{title=Moxie}} @{show_name} {{ Roll =[[d20+(@{moxie}) &{tracker}]]}}" title="Social Initiative: %{moxie}">Moxie</button>
|
||
<input class="stat w40" name="attr_moxie" type="number" value="0" title="Social Initiative: @{moxie}"/>
|
||
</div>
|
||
</div>
|
||
<div class="ac rowflex nowrap">
|
||
<div class="section columnflex nowrap middle center">
|
||
<label class="wide">Armor Class</label>
|
||
<input class="stat w70" name="attr_ac" type="number" value="10" title="@{ac}"/>
|
||
</div>
|
||
<div class="section columnflex nowrap middle center">
|
||
<label class="wide">determination</label>
|
||
<div class="rowflex nowrap">
|
||
<input class="stat w40" name="attr_determination" type="number" value="2" title="@{determination}"/><span class="slash">/</span>
|
||
<input class="stat w40" name="attr_determination_max" type="number" value="2" title="@{determination|max}"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="speed rowflex nowrap">
|
||
<div class="section columnflex nowrap middle center">
|
||
<label class="bold txtcenter">Speed</label>
|
||
<input class="w70 stat" name="attr_speed" type="text" value="6m"/>
|
||
</div>
|
||
<div class="section death columnflex nowrap middle center">
|
||
<button class="txt-btn large" name="roll_deathsave" type="roll" value="@{whisper}&{template:stargate} {{color=black}} {{title=Death Save}} @{show_name} {{Result=[[d20]]}}" title="%{deathsave}">Death Save</button>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_death_success1" type="checkbox" value="1"/>
|
||
<input name="attr_death_success2" type="checkbox" value="1"/>
|
||
<input name="attr_death_success3" type="checkbox" value="1"/><span>Sucesses</span>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_death_failure1" type="checkbox" value="1"/>
|
||
<input name="attr_death_failure2" type="checkbox" value="1"/>
|
||
<input name="attr_death_failure3" type="checkbox" value="1"/><span>Failures</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<section class="saves columnflex nowrap">
|
||
<h3>Saves</h3>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_str_save_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_str_save" title="@{str_save}" type="number" value="0"/>
|
||
<button class="txt-btn" name="roll_str_save" title="%{str_save}" type="roll" value="@{whisper}&{template:stargate} {{title=Strength Save}} @{show_name} {{[[d20+(@{str_save})]]=[[d20+(@{str_save})]]}}">Strength</button>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_dex_save_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_dex_save" title="@{dex_save}" type="number" value="0"/>
|
||
<button class="txt-btn" name="roll_dex_save" title="%{dex_save}" type="roll" value="@{whisper}&{template:stargate} {{title=Dexterity Save}} @{show_name} {{[[d20+(@{dex_save})]]=[[d20+(@{dex_save})]]}}">Dexterity</button>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_con_save_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_con_save" title="@{con_save}" type="number" value="0"/>
|
||
<button class="txt-btn" name="roll_con_save" title="%{con_save}" type="roll" value="@{whisper}&{template:stargate} {{title=Constitution Save}} @{show_name} {{[[d20+(@{con_save})]]=[[d20+(@{con_save})]]}}">Constitution</button>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_wis_save_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_wis_save" title="@{wis_save}" type="number" value="0"/>
|
||
<button class="txt-btn" name="roll_wis_save" title="%{wis_save}" type="roll" value="@{whisper}&{template:stargate} {{title=Wisdom Save}} @{show_name} {{[[d20+(@{wis_save})]]=[[d20+(@{wis_save})]]}}">Wisdom</button>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_int_save_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_int_save" title="@{int_save}" type="number" value="0"/>
|
||
<button class="txt-btn" name="roll_int_save" title="%{int_save}" type="roll" value="@{whisper}&{template:stargate} {{title=Intelligence Save}} @{show_name} {{[[d20+(@{int_save})]]=[[d20+(@{int_save})]]}}">Intelligence</button>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<input name="attr_cha_save_c" type="checkbox" value="1"/>
|
||
<input class="w30" name="attr_cha_save" title="@{cha_save}" type="number" value="0"/>
|
||
<button class="txt-btn" name="roll_cha_save" title="%{cha_save}" type="roll" value="@{whisper}&{template:stargate} {{title=Charisma Save}} @{show_name} {{[[d20+(@{cha_save})]]=[[d20+(@{cha_save})]]}}">Charisma</button>
|
||
</div>
|
||
</section>
|
||
<section class="bulk columnflex nowrap middle center">
|
||
<h3>Tactical Vest Bulk</h3>
|
||
<input class="stat w40" name="attr_bulk" type="number" value="8"/>
|
||
</section>
|
||
<section class="inventory columnflex nowrap center">
|
||
<h4>Inventory</h4>
|
||
<textarea name="attr_inventory" title="@{inventory}"></textarea>
|
||
</section>
|
||
<section class="attacks"><span class="name bold">Attack/Action Name</span><span class="bold">to hit</span><span class="bold pl20">dmg</span><span class="bold dmg-type">type</span><span class="bold">range</span><span class="bold">Cap/Reload</span><span class="bold pl20">special</span>
|
||
<div class="rowflex nowrap">
|
||
<button name="roll_attack1" type="roll" title="%{attack1}" value="@{whisper}&{template:stargate} {{title=@{attack1}}} @{show_name} {{[[d20+(@{attack1_to_hit})]]=[[d20+(@{attack1_to_hit})]]}} {{Damage=[[@{attack1_dmg}+0]] @{attack1_dmgtype} }} {{desc=@{attack1_special} }}"></button>
|
||
<input class="ml15" name="attr_attack1" type="text" placeholder="Sidearm(Beretta M9)"/>
|
||
</div>
|
||
<div>
|
||
<input class="w40" name="attr_attack1_to_hit" type="text" placeholder="4"/>
|
||
</div>
|
||
<div>
|
||
<input class="w70 mr15" name="attr_attack1_dmg" type="text" placeholder="1d6"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack1_dmgtype" type="text" placeholder="piercing"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack1_range" type="text" placeholder="50/100"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack1_reload" type="text" placeholder="15/1"/>
|
||
</div>
|
||
<div>
|
||
<input class="w110 mr15" name="attr_attack1_special" type="text"/>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<button name="roll_attack2" type="roll" title="%{attack2}" value="@{whisper}&{template:stargate} {{title=@{attack2}}} @{show_name} {{[[d20+(@{attack2_to_hit})]]=[[d20+(@{attack2_to_hit})]]}} {{Damage=[[@{attack2_dmg}+0]] @{attack2_dmgtype} }} {{desc=@{attack2_special} }}"></button>
|
||
<input class="ml15" name="attr_attack2" type="text" placeholder="Sidearm(Beretta M9)"/>
|
||
</div>
|
||
<div>
|
||
<input class="w40" name="attr_attack2_to_hit" type="text" placeholder="4"/>
|
||
</div>
|
||
<div>
|
||
<input class="w70 mr15" name="attr_attack2_dmg" type="text" placeholder="1d6"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack2_dmgtype" type="text" placeholder="piercing"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack2_range" type="text" placeholder="50/100"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack2_reload" type="text" placeholder="15/1"/>
|
||
</div>
|
||
<div>
|
||
<input class="w110 mr15" name="attr_attack2_special" type="text"/>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<button name="roll_attack3" type="roll" title="%{attack3}" value="@{whisper}&{template:stargate} {{title=@{attack3}}} @{show_name} {{[[d20+(@{attack3_to_hit})]]=[[d20+(@{attack3_to_hit})]]}} {{Damage=[[@{attack3_dmg}+0]] @{attack3_dmgtype} }} {{desc=@{attack3_special} }}"></button>
|
||
<input class="ml15" name="attr_attack3" type="text" placeholder="Sidearm(Beretta M9)"/>
|
||
</div>
|
||
<div>
|
||
<input class="w40" name="attr_attack3_to_hit" type="text" placeholder="4"/>
|
||
</div>
|
||
<div>
|
||
<input class="w70 mr15" name="attr_attack3_dmg" type="text" placeholder="1d6"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack3_dmgtype" type="text" placeholder="piercing"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack3_range" type="text" placeholder="50/100"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack3_reload" type="text" placeholder="15/1"/>
|
||
</div>
|
||
<div>
|
||
<input class="w110 mr15" name="attr_attack3_special" type="text"/>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<button name="roll_attack4" type="roll" title="%{attack4}" value="@{whisper}&{template:stargate} {{title=@{attack4}}} @{show_name} {{[[d20+(@{attack4_to_hit})]]=[[d20+(@{attack4_to_hit})]]}} {{Damage=[[@{attack4_dmg}+0]] @{attack4_dmgtype} }} {{desc=@{attack4_special} }}"></button>
|
||
<input class="ml15" name="attr_attack4" type="text" placeholder="Sidearm(Beretta M9)"/>
|
||
</div>
|
||
<div>
|
||
<input class="w40" name="attr_attack4_to_hit" type="text" placeholder="4"/>
|
||
</div>
|
||
<div>
|
||
<input class="w70 mr15" name="attr_attack4_dmg" type="text" placeholder="1d6"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack4_dmgtype" type="text" placeholder="piercing"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack4_range" type="text" placeholder="50/100"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack4_reload" type="text" placeholder="15/1"/>
|
||
</div>
|
||
<div>
|
||
<input class="w110 mr15" name="attr_attack4_special" type="text"/>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<button name="roll_attack5" type="roll" title="%{attack5}" value="@{whisper}&{template:stargate} {{title=@{attack5}}} @{show_name} {{[[d20+(@{attack5_to_hit})]]=[[d20+(@{attack5_to_hit})]]}} {{Damage=[[@{attack5_dmg}+0]] @{attack5_dmgtype} }} {{desc=@{attack5_special} }}"></button>
|
||
<input class="ml15" name="attr_attack5" type="text" placeholder="Sidearm(Beretta M9)"/>
|
||
</div>
|
||
<div>
|
||
<input class="w40" name="attr_attack5_to_hit" type="text" placeholder="4"/>
|
||
</div>
|
||
<div>
|
||
<input class="w70 mr15" name="attr_attack5_dmg" type="text" placeholder="1d6"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack5_dmgtype" type="text" placeholder="piercing"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack5_range" type="text" placeholder="50/100"/>
|
||
</div>
|
||
<div>
|
||
<input class="w50" name="attr_attack5_reload" type="text" placeholder="15/1"/>
|
||
</div>
|
||
<div>
|
||
<input class="w110 mr15" name="attr_attack5_special" type="text"/>
|
||
</div>
|
||
</section>
|
||
</main>
|
||
<main class="background">
|
||
<section class="racial_abilities columnflex nowrap center">
|
||
<label>Racial Abilities</label>
|
||
<textarea name="attr_racial"></textarea>
|
||
</section>
|
||
<section class="feats columnflex nowrap center">
|
||
<label>Feats</label>
|
||
<textarea name="attr_feats"></textarea>
|
||
</section>
|
||
<section class="class columnflex nowrap center">
|
||
<label>Class Abilities</label>
|
||
<textarea name="attr_class_abilities"></textarea>
|
||
</section>
|
||
<section class="equipment columnflex nowrap center">
|
||
<label>Equipment</label>
|
||
<textarea name="attr_equipment"></textarea>
|
||
</section>
|
||
<section class="prof columnflex nowrap center">
|
||
<label>Proficiencies</label>
|
||
<textarea name="attr_proficiencies"></textarea>
|
||
</section>
|
||
<section class="notes columnflex nowrap center">
|
||
<label>Notes</label>
|
||
<textarea name="attr_notes"></textarea>
|
||
</section>
|
||
</main>
|
||
<main class="npc gap">
|
||
<h1>NPC</h1>
|
||
<div class="section columnflex nowrap">
|
||
<label class="other">NPC stuff</label>
|
||
<div class="rowflex nowrap"><span>CR:</span>
|
||
<input class="w40" name="attr_cr" type="number" placeholder="" title="Challenge Rating: @{cr}" value=""/><span>Speed</span>
|
||
<input class="w40" name="attr_speed_npc" type="text" style="width:200px" placeholder="1m Fly(6m)" title="@{speed_npc}" value=""/>
|
||
</div>
|
||
<div class="rowflex nowrap"><span>Type:</span>
|
||
<input class="w40" name="attr_type" type="text" style="width:350px" placeholder="Medium Humanoid(Scout 2)" title="Challenge Rating: @{type}" value=""/>
|
||
</div>
|
||
</div>
|
||
</main>
|
||
<main class="settings">
|
||
<section class="settings columnflex nowrap center">
|
||
<label>Settings</label>
|
||
<div class="rowflex nowrap"><span title="@{whisper}">Whisper rolls?</span>
|
||
<input name="attr_whisper" title="@{whisper}" type="checkbox" value="/w gm"/>
|
||
</div>
|
||
<div class="rowflex nowrap"><span title="@{show_name}">Show name in rolls?</span>
|
||
<select name="attr_show_name" title="@{show_name}">
|
||
<option value="{{subtitle=@{character_name} }}">Yes</option>
|
||
<option value=" ">No</option>
|
||
</select>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<button name="roll_hd" type="roll" title="%{hd}" value="@{whisper}&{template:stargate} {{color=green}} {{title=Short Rest}} @{show_name} !modbattr --silent --name @{character_name} --hp|{{Healing=[[@{hd}]]}}!!! {{desc=One roll of the Hit Dice.}}">Short Rest</button>
|
||
<button name="roll_longrest" type="roll" title="%{longrest}" value="@{whisper}&{template:stargate} {{color=green}} {{title=Long Rest}} @{show_name} !modbattr --silent --name @{character_name} --hp|{{Healing=[[@{rank}@{hd}]]}}!!! {{desc=Rolls a number of Hit Dice equal to the characters level, and recovers that amount of health. }}">Long Rest</button>
|
||
<button name="roll_td" type="roll" title="%{td}" value="@{whisper}&{template:stargate} {{title=Tension Die (@{td})}} @{show_name} {{Roll=[[@{td}]]}} {{desc=Rolls the current tension die for the episode. }}">Tension Dice</button>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<label>Custom roll</label>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<button name="roll_custom1" type="roll" value="@{whisper}@{custom1}"></button>
|
||
<input type="text" name="attr_custom1" value="&{template:stargate} {{color=green}} {{title=Med Kit}} @{show_name} {{Healing=[[1d4]]}} {{desc=Heals someone with a medic kit. }}"/>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<button name="roll_custom2" type="roll" value="@{whisper}@{custom2}"></button>
|
||
<input type="text" name="attr_custom2" value="&{template:stargate} {{color=white}} {{title=Scientific Discovery}} @{show_name} {{DC=[[8+(@{wis_mod}[wisdom modifier])+(@{prof}[proficiency])]] Wisdom or Intelligence Save}} {{desc=Archeologist: As an action you can cause a target emotional and mental distress by using cultural taboos against them. If the target fails a Wisdom save (DC 8+ Intelligence modifier + Proficiency Bonus) you may spend a number of Eureka points. The target is stunned for a number of rounds equal to the Eureka points spent. A target that passes its save is immune to this ability for 24 hours (and possibly very upset). }}"/>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<button name="roll_custom3" type="roll" value="@{whisper}@{custom3}"></button>
|
||
<input type="text" name="attr_custom3" value="&{template:stargate} {{color=white}} {{title=Tension Die (@{td})}} @{show_name} {{Roll=[[@{td}]]}} {{desc=Rolls the current tension die for the episode. }}"/>
|
||
</div>
|
||
<div class="rowflex nowrap">
|
||
<button name="roll_custom4" type="roll" value="@{whisper}@{custom4}"></button>
|
||
<input type="text" name="attr_custom4" value="&{template:stargate} {{title=Tension Die (@{td})}} @{show_name} {{Roll=[[@{td}]]}} {{desc=Rolls the current tension die for the episode. }}"/>
|
||
</div>
|
||
</section>
|
||
<section class="other columnflex nowrap center">
|
||
<label>Other stats</label>
|
||
<div class="rowflex nowrap"><span>Mission Points(MP):</span>
|
||
<input class="w40" name="attr_mp" type="number" placeholder="" title="Mission Points @{mp}"/> /
|
||
<input class="w40" name="attr_mp_max" type="number" placeholder="" title="Total Mission Points @{mp|max}"/>
|
||
</div>
|
||
<div class="rowflex nowrap"><span>Eureka Points:</span>
|
||
<input class="w40" name="attr_eureka" type="number" placeholder="" title="Eureka Points: @{eureka}" value="0"/> /
|
||
<input class="w40" name="attr_eureka_max" type="number" placeholder="" title="Max Eureka Points: @{eureka|max}"/>
|
||
</div>
|
||
<div class="columnflex nowrap"><span>Wounds/Ability Damage</span>
|
||
<textarea class="dmg" name="attr_ability_damage"></textarea>
|
||
</div>
|
||
</section>
|
||
<section class="changelog columnflex nowrap center">
|
||
<button class="txt-btn" name="roll_help" type="roll" value="@{whisper}&{template:stargate} {{title=[(Link)Sheet Userguide](https://wiki.roll20.net/Stargate) }} {{subtitle=Roll20 Wiki}} {{desc= (Right-click to open in a new tab)
|
||
**Official Stargate RPG**
|
||
**Roll20 Character Sheet**
|
||
created by **Andreas J.**([@anduh_](https://twitter.com/anduh_)) }}">Sheet Documentation</button><br/>
|
||
<h1>Changelog</h1>
|
||
<label>"v.1.73 (Aug 9th)"</label><span>* Remove History Skill (was skill in old beta rules)</span>
|
||
<label>"v.1.72 (June)"</label><span>* code refactor<br/> * page navigation made always visible</span>
|
||
<label>"v.1.70 (May)"</label><span>* replace page buttons<br/> * add datalists for race, origin, class<br/> * refactor sheet in PUG & SCSS<br/> * update the sheet to work with CSE</span>
|
||
<label>"v.1.55(Nov. 3rd)"</label><span>* more stats to track on Settings page</span>
|
||
<label>"v.1.50(Oct. 20th)"</label><span>* add Stargate Phoenix image to roll template<br/> * integrate ChatSetAttr commands to Short/Long Rest buttons<br/> * added whisper toggle to Saves<br/> * Link to sheet wiki page (button on settings page)</span>
|
||
</section>
|
||
<div class="ammo">
|
||
<div class="section columnflex nowrap">
|
||
<label class="other">Living Series</label>
|
||
<div class="rowflex nowrap"><span>Stargaterpg.com username</span>
|
||
<input class="w40" name="attr_living_series_user" type="text" placeholder="" value="" style="width:100px"/><span title="You can see your Roll20 id by going to your Roll20 profile page, and copying the numbers in the URL">Roll20 ID</span>
|
||
<input class="w40" name="attr_roll20id" type="text" style="width:100px" title="You can see your Roll20 id by going to your Roll20 profile page, and copying the numbers in the URL" value=""/>
|
||
</div>
|
||
<div class="rowflex nowrap"><span>Stargaterpg.com character link</span>
|
||
<input class="w40" name="attr_cahracter_link" type="text" style="width:350px" placeholder="The url to your character sheet" value=""/>
|
||
</div>
|
||
</div>
|
||
<div class="ammo grid">
|
||
<div class="section columnflex nowrap middle center">
|
||
<label>Ammo Weapon 1</label>
|
||
<input name="attr_ammo1" type="number" value="0"/>
|
||
</div>
|
||
<div class="section columnflex nowrap middle center">
|
||
<label>Ammo Weapon 2</label>
|
||
<input name="attr_ammo2" type="number" value="0"/>
|
||
</div>
|
||
<div class="section columnflex nowrap middle center">
|
||
<label>Ammo Weapon 3</label>
|
||
<input name="attr_ammo3" type="number" value="0"/>
|
||
</div>
|
||
<div class="section columnflex nowrap middle center">
|
||
<label>Ammo Weapon 4</label>
|
||
<input name="attr_ammo4" type="number" value="0"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</main>
|
||
<datalist id="race">
|
||
<option value="Aturen">Aturen</option>
|
||
<option value="Noxian Pacifist">Noxian Pacifist</option>
|
||
<option value="Human">Human</option>
|
||
<option value="Abydonian">Abydonian</option>
|
||
<option value="Tollan">Tollan</option>
|
||
<option value="Jaffa">Jaffa</option>
|
||
<option value="Hak’tyl Jaffa">Hak’tyl Jaffa</option>
|
||
<option value="Tok’Ra">Tok’Ra</option>
|
||
<option value="Pangaran">Pangaran</option>
|
||
<option value="Unas">Unas</option>
|
||
<option value="Possessed Unas">Possessed Unas</option>
|
||
</datalist>
|
||
<datalist id="origin">
|
||
<option value="Arboreal">Arboreal</option>
|
||
<option value="Artificial">Artificial</option>
|
||
<option value="Desert">Desert</option>
|
||
<option value="Grasslands">Grasslands</option>
|
||
<option value="Lunar">Lunar</option>
|
||
<option value="Mountainous">Mountainous</option>
|
||
<option value="Oceanic">Oceanic</option>
|
||
<option value="Rainforest">Rainforest</option>
|
||
<option value="Starship">Starship</option>
|
||
<option value="Terraformed">Terraformed</option>
|
||
<option value="Toxic">Toxic</option>
|
||
<option value="Tundra">Tundra</option>
|
||
<option value="Subterranean">Subterranean</option>
|
||
<option value="Swamp">Swamp</option>
|
||
<option value="Urban">Urban</option>
|
||
<option value="Volcanic">Volcanic</option>
|
||
</datalist>
|
||
<datalist id="rpgclass">
|
||
<option value="Diplomat">Diplomat</option>
|
||
<option value="Engineer">Engineer</option>
|
||
<option value="Medic">Medic</option>
|
||
<option value="Scientist">Scientist</option>
|
||
<option value="Scout">Scout</option>
|
||
<option value="Soldier">Soldier</option>
|
||
</datalist>
|
||
<input name="attr_str_mod" type="hidden" value="+0"/>
|
||
<input name="attr_dex_mod" type="hidden" value="+0"/>
|
||
<input name="attr_con_mod" type="hidden" value="+0"/>
|
||
<input name="attr_wis_mod" type="hidden" value="+0"/>
|
||
<input name="attr_int_mod" type="hidden" value="+0"/>
|
||
<input name="attr_cha_mod" type="hidden" value="+0"/>
|
||
<rolltemplate class="sheet-rolltemplate-stargate">
|
||
<div class="sheet-container sheet-color-{{color}}">
|
||
<div class="sheet-header">{{#title}}
|
||
<div class="sheet-title">{{title}}<img class="sheet-phoenix" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Stargate-RPG/images/SG-phoenix.png" alt="Stargate Phoenix logo"/></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>
|
||
<script type="text/worker">
|
||
//current sheet version
|
||
const currentversion = "1.73";
|
||
|
||
const int = score => parseInt(score, 10) || 0;
|
||
|
||
const stats = ["str", "dex", "con", "wis", "int", "cha"];
|
||
const skillslist = ["acrobatics", "animalhandling", "athletics", "culture", "deception", "engineering", "insight", "intimidation", "investigation", "medicine", "nature", "perception", "performance", "persuasion", "pilot", "science", "sleight", "stealth", "survival"];
|
||
const statmods = ["str_mod", "dex_mod", "con_mod", "wis_mod", "int_mod", "cha_mod", "prof"];
|
||
|
||
// Sheet Version
|
||
on("sheet:opened", function() {
|
||
getAttrs(["version", "sheettype"], function(v) {
|
||
const version = parseInt(v.version) || 0;
|
||
var attrs = {};
|
||
|
||
// get attribute updates for each version until the sheet has completed all steps
|
||
// NOTE: to maintain backwards compatibility with sheets predating the version attribute, all steps will be performed for new sheets
|
||
//if (version < currentversion) {
|
||
// attrs["version"] = currentversion;
|
||
//}
|
||
|
||
if (version < currentversion) {
|
||
attrs["version"] = currentversion;
|
||
console.log("Sheet updated to v." + currentversion);
|
||
}
|
||
|
||
if (Object.keys(attrs).length) {
|
||
setAttrs(attrs);
|
||
}
|
||
});
|
||
});
|
||
|
||
// tabs
|
||
|
||
const buttonlist = ["character","background","npc","settings"];
|
||
buttonlist.forEach(button => {
|
||
on(`clicked:${button}`, function() {
|
||
setAttrs({
|
||
sheetTab: button
|
||
});
|
||
});
|
||
});
|
||
|
||
on("sheet:opened", function() {
|
||
|
||
getAttrs(["npc", "sheetTab"], values => {
|
||
|
||
let npc = int(values["npc"]);
|
||
let sheetTab = values["sheetTab"];
|
||
console.log("sheetTab: ", sheetTab);
|
||
//let page = "character";
|
||
|
||
if (sheetTab === "character"){
|
||
npc = 0;
|
||
console.log("sheetTab was char, set NPC=0: ", npc);
|
||
}
|
||
else if (sheetTab === "npc"){
|
||
npc = 1;
|
||
console.log("sheetTab was npc, set NPC=1: ", npc);
|
||
}
|
||
else if (sheetTab === "background"){
|
||
console.log("sheetTab was note");
|
||
}
|
||
else if (sheetTab === "settings"){
|
||
console.log("sheetTab was settings");
|
||
}
|
||
setAttrs({
|
||
npc: npc
|
||
});
|
||
});
|
||
});
|
||
// Calculate Stat modifier
|
||
|
||
stats.forEach(stat => {
|
||
on(`change:${stat}`, () => {
|
||
getAttrs([stat], values => {
|
||
const stat_base = int(values[stat]);
|
||
console.log("stat changed");
|
||
console.log(stat_base);
|
||
let stat_mod = 0;
|
||
if (stat_base >= 30) stat_mod = "+10";
|
||
else if (stat_base >= 28) stat_mod = "+9";
|
||
else if (stat_base >= 26) stat_mod = "+8";
|
||
else if (stat_base >= 24) stat_mod = "+7";
|
||
else if (stat_base >= 22) stat_mod = "+6";
|
||
else if (stat_base >= 20) stat_mod = "+5";
|
||
else if (stat_base >= 18) stat_mod = "+4";
|
||
else if (stat_base >= 16) stat_mod = "+3";
|
||
else if (stat_base >= 14) stat_mod = "+2";
|
||
else if (stat_base >= 12) stat_mod = "+1";
|
||
else if (stat_base >= 10) stat_mod = "+0";
|
||
else if (stat_base >= 8) stat_mod = "-1";
|
||
else if (stat_base >= 6) stat_mod = "-2";
|
||
else if (stat_base >= 4) stat_mod = "-3";
|
||
else if (stat_base >= 2) stat_mod = "-4";
|
||
else if (stat_base <= 1) stat_mod = "-5";
|
||
else stat_mod = "+0";
|
||
|
||
setAttrs({
|
||
[`${stat}_mod`]: stat_mod
|
||
});
|
||
});
|
||
});
|
||
});
|
||
|
||
|
||
// skill prof check/uncheck
|
||
|
||
skillslist.forEach(skillcheckbox => {
|
||
on(`change:${skillcheckbox}_c`, (eventInfo) => {
|
||
console.log("skill prof toggle");
|
||
console.log(skillcheckbox);
|
||
let xbox = skillcheckbox + "_c";
|
||
|
||
console.log("xbox defined");
|
||
console.log("xbox is " + xbox);
|
||
|
||
let getlist = [ xbox, "acrobatics", "animalhandling", "athletics", "culture", "deception", "engineering", "insight", "intimidation", "investigation", "medicine", "nature", "perception", "performance", "persuasion", "pilot", "science", "sleight", "stealth", "survival", "acrobatics_c", "animalhandling_c", "athletics_c", "culture_c", "deception_c", "engineering_c", "history_c", "insight_c", "intimidation_c", "investigation_c", "medicine_c", "nature_c", "perception_c", "performance_c", "persuasion_c", "pilot_c", "science_c", "sleight_c", "stealth_c", "survival_c", "prof"];
|
||
console.log("def getlist");
|
||
|
||
getAttrs(getlist, values => {
|
||
console.log("getatt done");
|
||
let checkbox = int(values[xbox]);
|
||
let skillnow = int(values[skillcheckbox]);
|
||
let profval = int(values["prof"]);
|
||
let skillnew = 0;
|
||
console.log("checkbox " + checkbox + "skillnow " + skillnow);
|
||
|
||
if (checkbox === 1){
|
||
skillnew = skillnow + profval;
|
||
}
|
||
else{
|
||
skillnew = skillnow - profval;
|
||
}
|
||
console.log("skillew " + skillnew);
|
||
|
||
setAttrs({
|
||
[`${skillcheckbox}`]: skillnew
|
||
});
|
||
console.log("setAttr done");
|
||
});
|
||
});
|
||
});
|
||
|
||
|
||
// save prof check/uncheck
|
||
|
||
stats.forEach(savecheckbox => {
|
||
on(`change:${savecheckbox}_save_c`, (eventInfo) => {
|
||
console.log("save prof toggle");
|
||
console.log(savecheckbox);
|
||
let xbox = savecheckbox + "_save_c";
|
||
|
||
console.log("xbox defined");
|
||
console.log("xbox is " + xbox);
|
||
|
||
let getlist = [ xbox, "str_save", "dex_save", "con_save", "wis_save", "int_save", "cha_save","str_save_c", "dex_save_c", "con_save_c", "wis_save_c", "int_save_c", "cha_save_c", "prof"];
|
||
console.log("def getlist");
|
||
|
||
getAttrs(getlist, values => {
|
||
console.log("getatt done");
|
||
let checkbox = int(values[xbox]);
|
||
let savenow = int(values[`${savecheckbox}_save`]);
|
||
let profval = int(values["prof"]);
|
||
let savenew = 0;
|
||
console.log("checkbox " + checkbox + "savenow " + savenow);
|
||
|
||
if (checkbox === 1){
|
||
savenew = savenow + profval;
|
||
}
|
||
else{
|
||
savenew = savenow - profval;
|
||
}
|
||
console.log("skillew " + savenew);
|
||
|
||
setAttrs({
|
||
[`${savecheckbox}_save`]: savenew
|
||
});
|
||
console.log("setAttr done");
|
||
});
|
||
});
|
||
});
|
||
|
||
// proficiency changed, updates skills/saves
|
||
|
||
on(`change:prof`, eventInfo => {
|
||
console.log("prof change");
|
||
let profold = int(eventInfo.previousValue);
|
||
console.log("eventinfo: " + eventInfo.previousValue);
|
||
let getlist = ["acrobatics", "animalhandling", "athletics", "culture", "deception", "engineering", "insight", "intimidation", "investigation", "medicine", "nature", "perception", "performance", "persuasion", "pilot", "science", "sleight", "stealth", "survival", "acrobatics_c", "animalhandling_c", "athletics_c", "culture_c", "deception_c", "engineering_c", "history_c", "insight_c", "intimidation_c", "investigation_c", "medicine_c", "nature_c", "perception_c", "performance_c", "persuasion_c", "pilot_c", "science_c", "sleight_c", "stealth_c", "survival_c", "str_save", "dex_save", "con_save", "wis_save", "int_save", "cha_save","str_save_c", "dex_save_c", "con_save_c", "wis_save_c", "int_save_c", "cha_save_c", "prof", "determination", "determination_max"];
|
||
|
||
getAttrs(getlist, values => {
|
||
|
||
var update = {};
|
||
let profnew = int(values["prof"]);
|
||
let profdiff = profnew - profold;
|
||
let determination = int(values["determination"]) + profdiff;
|
||
let determination_max = int(values["determination_max"]) + profdiff;
|
||
|
||
//manual fix for when you change proficiency for first time
|
||
if (profnew === 3 && profold ===3)( profdiff = 1);
|
||
|
||
determination = int(values["determination"]) + profdiff;
|
||
determination_max = int(values["determination_max"]) + profdiff;
|
||
update["determination"] = determination;
|
||
console.log("det worked");
|
||
update["determination_max"] = determination_max;
|
||
console.log("det max worked");
|
||
|
||
console.log("profold:" + profold + " profnew:" + profnew + " proffdiff: " + profdiff);
|
||
|
||
let xboxlist = ["acrobatics", "animalhandling", "athletics", "culture", "deception", "engineering", "insight", "intimidation", "investigation", "medicine", "nature", "perception", "performance", "persuasion", "pilot", "science", "sleight", "stealth", "survival","str_save", "dex_save", "con_save", "wis_save", "int_save", "cha_save"];
|
||
|
||
xboxlist.forEach(number => {
|
||
|
||
let checkbox = int(values[`${number}_c`]);
|
||
|
||
if (checkbox === 1) {
|
||
let oldval = int(values[`${number}`]);
|
||
let newval = oldval + profdiff;
|
||
|
||
update[number] = newval;
|
||
}
|
||
|
||
});
|
||
|
||
console.log(update);
|
||
|
||
|
||
setAttrs(update);
|
||
|
||
});
|
||
});
|
||
|
||
// update skills & saves when attr mod changes
|
||
|
||
statmods.forEach(statmod => {
|
||
on(`change:${statmod}`, eventInfo => {
|
||
console.log("attr mod change");
|
||
console.log("old mod: " + eventInfo.previousValue);
|
||
let temp = eventInfo.previousValue;
|
||
if (temp === undefined){
|
||
temp = 0;
|
||
}else{
|
||
temp = temp.replace('+', '');
|
||
}
|
||
|
||
let oldstatmod = int(temp);
|
||
|
||
console.log("old mod: " + oldstatmod);
|
||
|
||
let getlist = ["str_mod", "dex_mod", "con_mod", "wis_mod", "int_mod", "cha_mod", "acrobatics", "animalhandling", "athletics", "culture", "deception", "engineering", "insight", "intimidation", "investigation", "medicine", "nature", "perception", "performance", "persuasion", "pilot", "science", "sleight", "stealth", "survival", "str_save", "dex_save", "con_save", "wis_save", "int_save", "cha_save", "prof", "init", "moxie", "ac", "ac_extra", "determination","determination_max"];
|
||
|
||
getAttrs(getlist, values => {
|
||
|
||
var update = {};
|
||
|
||
let modnew = int(values[`${statmod}`]);
|
||
let moddiff = modnew - oldstatmod;
|
||
|
||
switch (`${statmod}`) {
|
||
case "str_mod":
|
||
console.log("oldstatmod: " + oldstatmod + " modnew:" + modnew + " moddiff: " + moddiff);
|
||
update["athletics"] = int(values["athletics"]) + moddiff;
|
||
update["str_save"] = int(values["str_save"]) + moddiff;
|
||
update["bulk"] = 8 + modnew;
|
||
|
||
setAttrs(update);
|
||
break;
|
||
case "con_mod":
|
||
//let modnew = int(values[`${statmod}`]);
|
||
//let moddiff = modnew - oldstatmod;
|
||
update["con_save"] = int(values["con_save"]) + moddiff;
|
||
|
||
setAttrs(update);
|
||
break;
|
||
case "dex_mod":
|
||
update["acrobatics"] = int(values["acrobatics"]) + moddiff;
|
||
update["pilot"] = int(values["pilot"]) + moddiff;
|
||
update["sleight"] = int(values["sleight"]) + moddiff;
|
||
update["stealth"] = int(values["stealth"]) + moddiff;
|
||
update["ac"] = int(values["ac"]) + moddiff;
|
||
update["ac_extra"] = int(values["ac_extra"]) + moddiff;
|
||
update["init"] = int(values["init"]) + moddiff;
|
||
update["dex_save"] = int(values["dex_save"]) + moddiff;
|
||
|
||
setAttrs(update);
|
||
break;
|
||
case "int_mod":
|
||
update["engineering"] = int(values["engineering"]) + moddiff;
|
||
update["investigation"] = int(values["investigation"]) + moddiff;
|
||
update["nature"] = int(values["nature"]) + moddiff;
|
||
update["science"] = int(values["science"]) + moddiff;
|
||
update["int_save"] = int(values["int_save"]) + moddiff;
|
||
|
||
setAttrs(update);
|
||
break;
|
||
case "wis_mod":
|
||
update["animalhandling"] = int(values["animalhandling"]) + moddiff;
|
||
update["culture"] = int(values["culture"]) + moddiff;
|
||
update["insight"] = int(values["insight"]) + moddiff;
|
||
update["medicine"] = int(values["medicine"]) + moddiff;
|
||
update["perception"] = int(values["perception"]) + moddiff;
|
||
update["survival"] = int(values["survival"]) + moddiff;
|
||
update["wis_save"] = int(values["wis_save"]) + moddiff;
|
||
|
||
setAttrs(update);
|
||
break;
|
||
case "cha_mod":
|
||
update["deception"] = int(values["deception"]) + moddiff;
|
||
update["intimidation"] = int(values["intimidation"]) + moddiff;
|
||
update["performance"] = int(values["performance"]) + moddiff;
|
||
update["persuasion"] = int(values["persuasion"]) + moddiff;
|
||
update["moxie"] = int(values["moxie"]) + moddiff;
|
||
update["cha_save"] = int(values["cha_save"]) + moddiff;
|
||
|
||
setAttrs(update);
|
||
break;
|
||
default:
|
||
false;
|
||
}
|
||
console.log(update);
|
||
|
||
});
|
||
});
|
||
});
|
||
|
||
|
||
</script> |