mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 11:42:29 +00:00
4074 lines
244 KiB
HTML
4074 lines
244 KiB
HTML
|
||
<input name="attr_template_start" value="@{whisper}&{template:storypath} {{footer=@{character_name}}} {{character_id=@{character_id}}} {{system=@{system}}}" type="hidden" title="@{template_start}"/>
|
||
<input name="attr_sheet_state" value="settings" type="hidden" title="@{sheet_state}"/>
|
||
<input name="attr_collapsed" value="" type="hidden" title="@{collapsed}"/>
|
||
<div class="subsystem-style compendium-drop-target" id="main">
|
||
<input name="attr_drop_name" accept="Name" value="" type="hidden" title="@{drop_name}"/>
|
||
<input name="attr_drop_data" accept="data" value="" type="hidden" title="@{drop_data}"/>
|
||
<nav class="sheet-nav" id="main-nav">
|
||
<button class="subsystem-style sheet-nav__tab all" name="act_nav-all" data-i18n="all pages" data-i18n-title="View all sections" role="heading" aria-level="5" type="action" title="%{nav-all}">
|
||
</button>
|
||
<button class="subsystem-style sheet-nav__tab general" name="act_nav-general" data-i18n="general pages" data-i18n-title="View general information" role="heading" aria-level="5" type="action" title="%{nav-general}">
|
||
</button>
|
||
<button class="subsystem-style sheet-nav__tab powers" name="act_nav-powers" data-i18n="powers pages" data-i18n-title="View powers information" role="heading" aria-level="5" type="action" title="%{nav-powers}">
|
||
</button>
|
||
<button class="subsystem-style sheet-nav__tab antagonist" name="act_nav-antagonist" data-i18n="antagonist" data-i18n-title="View antagonist" role="heading" aria-level="5" type="action" title="%{nav-antagonist}">
|
||
</button>
|
||
<button class="subsystem-style sheet-nav__tab gm_screen" name="act_nav-gm_screen" data-i18n="gm screen" data-i18n-title="View gm screen" role="heading" aria-level="5" type="action" title="%{nav-gm_screen}">
|
||
</button>
|
||
<button class="subsystem-style sheet-nav__tab party_screen" name="act_nav-party_screen" data-i18n="party screen" data-i18n-title="View party screen" role="heading" aria-level="5" type="action" title="%{nav-party_screen}">
|
||
</button>
|
||
<button class="pictos active sheet-nav__tab settings" name="act_nav-settings" data-i18n-title="open the settings page" role="heading" aria-level="5" type="action" title="%{nav-settings}">y
|
||
</button>
|
||
</nav>
|
||
<article class="settings active" id="settings">
|
||
<section class="section-system-panel" id="system-panel">
|
||
<h2 data-i18n="system options"></h2>
|
||
<label class="input-label"><span data-i18n="system"></span>
|
||
<select class="underlined input-label__input" name="attr_system" title="@{system}">
|
||
<option value="scion-origin" data-i18n="scion-origin" selected="">
|
||
</option>
|
||
<option value="scion-hero" data-i18n="scion-hero">
|
||
</option>
|
||
</select>
|
||
</label>
|
||
<label class="input-label"><span data-i18n="sheet type"></span>
|
||
<select class="underlined input-label__input" name="attr_sheet_type" title="@{sheet_type}">
|
||
<option value="character" data-i18n="character" selected="">
|
||
</option>
|
||
<option value="antagonist" data-i18n="antagonist">
|
||
</option>
|
||
<option value="gm_screen" data-i18n="gm screen">
|
||
</option>
|
||
<option value="party_screen" data-i18n="party screen">
|
||
</option>
|
||
</select>
|
||
</label>
|
||
<label class="input-label"><span data-i18n="target number"></span>
|
||
<input class="underlined input-label__input" name="attr_target_number" type="number" value="8" title="@{target_number}"/>
|
||
</label>
|
||
<label class="input-label"><span data-i18n="again"></span>
|
||
<input class="underlined input-label__input" name="attr_again" type="number" value="10" min="2" max="10" title="@{again}"/>
|
||
</label>
|
||
</section>
|
||
<section class="section-sheet-behavior" id="sheet-behavior">
|
||
<h2 data-i18n="sheet behavior"></h2>
|
||
<label class="input-label"><span data-i18n="difficulty automation"></span>
|
||
<select class="underlined input-label__input" name="attr_difficulty_query" title="@{difficulty_query}">
|
||
<option value="off" data-i18n="off" selected="">
|
||
</option>
|
||
<option value="on" data-i18n="on">
|
||
</option>
|
||
</select>
|
||
</label>
|
||
<label class="input-label"><span data-i18n="enhancement automation"></span>
|
||
<select class="underlined input-label__input" name="attr_enhancement_query" title="@{enhancement_query}">
|
||
<option value="off" data-i18n="off" selected="">
|
||
</option>
|
||
<option value="on" data-i18n="on">
|
||
</option>
|
||
</select>
|
||
</label>
|
||
<label class="input-label"><span data-i18n="rolls are"></span>
|
||
<select class="underlined input-label__input" name="attr_whisper" title="@{whisper}">
|
||
<option value="" data-i18n="public" selected="">
|
||
</option>
|
||
<option value="/w gm " data-i18n="whispered to gm">
|
||
</option>
|
||
</select>
|
||
</label>
|
||
</section>
|
||
</article>
|
||
<article class="sheet subsystem-style system-scion-origin system-scion-hero" id="sheet">
|
||
<section class="section-image-head" id="image-head"><img class="subsystem-display scion-origin active" alt="Scion Origin" role="heading" aria-level="1" src="https://s3.amazonaws.com/files.d20.io/images/251683701/lgeAjNoeRDqQccd7s0hsNQ/original.png"/><img class="subsystem-display scion-hero" alt="Scion Hero" role="heading" aria-level="1" src="https://s3.amazonaws.com/files.d20.io/images/251683696/wYblqZVpGI3AhAS9R3a-TA/original.png"/></section>
|
||
<section class="section-character_details" id="character_details">
|
||
<label class="input-label stacked"><span data-i18n="name"></span>
|
||
<input class="underlined input-label__input" name="attr_character_name" type="text" role="heading" aria-level="4" title="@{character_name}"/>
|
||
</label>
|
||
<label class="input-label stacked"><span data-i18n="player"></span>
|
||
<input class="underlined input-label__input" name="attr_player" type="text" role="heading" aria-level="4" title="@{player}"/>
|
||
</label>
|
||
<label class="input-label stacked subsystem-display scion-origin scion-hero active"><span data-i18n="chronicle"></span>
|
||
<input class="underlined input-label__input" name="attr_chronicle" type="text" role="heading" aria-level="4" title="@{chronicle}"/>
|
||
</label>
|
||
<label class="input-label stacked subsystem-display scion-origin scion-hero active"><span data-i18n="parent"></span>
|
||
<input class="underlined input-label__input" name="attr_parent" type="text" role="heading" aria-level="4" title="@{parent}"/>
|
||
</label>
|
||
</section>
|
||
<section class="section-momentum subsystem-style" id="momentum">
|
||
<button class="subsystem-style subsystem-display scion-origin expandable-header momentum" name="act_momentum" data-i18n="momentum" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{momentum}">
|
||
</button>
|
||
<button class="subsystem-style subsystem-display scion-hero split expandable-header momentum" name="act_momentum" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{momentum}">
|
||
<h2 data-i18n="momentum"></h2>
|
||
<h2 data-i18n="legend"></h2>
|
||
</button>
|
||
<div class="dot-row twelve-dots momentum-content boxes">
|
||
<select class="dot-number underlined" name="attr_momentum" title="@{momentum}">
|
||
<option value="0" 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>
|
||
<option value="7">7
|
||
</option>
|
||
<option value="8">8
|
||
</option>
|
||
<option value="9">9
|
||
</option>
|
||
<option value="10">10
|
||
</option>
|
||
<option value="11">11
|
||
</option>
|
||
<option value="12">12
|
||
</option>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="clearer dot" name="attr_momentum" checked="" value="0" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="1" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="2" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="3" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="4" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="5" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="6" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="7" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="8" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="9" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="10" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="11" type="radio" title="@{momentum}"/>
|
||
<input class="dot" name="attr_momentum" value="12" type="radio" title="@{momentum}"/>
|
||
</div>
|
||
</div>
|
||
<div class="dot-row four-dots legend-content subsystem-display scion-hero">
|
||
<select class="dot-number underlined" name="attr_legend" title="@{legend}">
|
||
<option value="0" selected="">0
|
||
</option>
|
||
<option value="1">1
|
||
</option>
|
||
<option value="2">2
|
||
</option>
|
||
<option value="3">3
|
||
</option>
|
||
<option value="4">4
|
||
</option>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="clearer dot" name="attr_legend" checked="" value="0" type="radio" title="@{legend}"/>
|
||
<input class="dot" name="attr_legend" value="1" type="radio" title="@{legend}"/>
|
||
<input class="dot" name="attr_legend" value="2" type="radio" title="@{legend}"/>
|
||
<input class="dot" name="attr_legend" value="3" type="radio" title="@{legend}"/>
|
||
<input class="dot" name="attr_legend" value="4" type="radio" title="@{legend}"/>
|
||
</div>
|
||
</div>
|
||
<div class="dot-row four-dots legend-max-content boxes subsystem-display scion-hero">
|
||
<select class="dot-number underlined" name="attr_legend_max" title="@{legend|max}">
|
||
<option value="0" selected="">0
|
||
</option>
|
||
<option value="1">1
|
||
</option>
|
||
<option value="2">2
|
||
</option>
|
||
<option value="3">3
|
||
</option>
|
||
<option value="4">4
|
||
</option>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="clearer dot" name="attr_legend_max" checked="" value="0" type="radio" title="@{legend|max}"/>
|
||
<input class="dot" name="attr_legend_max" value="1" type="radio" title="@{legend|max}"/>
|
||
<input class="dot" name="attr_legend_max" value="2" type="radio" title="@{legend|max}"/>
|
||
<input class="dot" name="attr_legend_max" value="3" type="radio" title="@{legend|max}"/>
|
||
<input class="dot" name="attr_legend_max" value="4" type="radio" title="@{legend|max}"/>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="section-virtue subsystem-display scion-hero scion-origin active" id="virtue">
|
||
<button class="subsystem-style expandable-header virtue" name="act_virtue" data-i18n="virtue" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{virtue}">
|
||
</button>
|
||
<div class="dot-row size-number">
|
||
<input class="underlined" name="attr_virtue_1" type="text" title="@{virtue_1}"/>
|
||
<select class="dot-number underlined" name="attr_virtue" title="@{virtue}">
|
||
<option value="-2">-2
|
||
</option>
|
||
<option value="-1">-1
|
||
</option>
|
||
<option value="0" selected="">0
|
||
</option>
|
||
<option value="1">1
|
||
</option>
|
||
<option value="2">2
|
||
</option>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-fill dot" name="attr_virtue" value="-2" type="radio" title="@{virtue}"/>
|
||
<input class="no-fill dot" name="attr_virtue" value="-1" type="radio" title="@{virtue}"/>
|
||
<input class="no-fill dot" name="attr_virtue" checked="" value="0" type="radio" title="@{virtue}"/>
|
||
<input class="no-fill dot" name="attr_virtue" value="1" type="radio" title="@{virtue}"/>
|
||
<input class="no-fill dot" name="attr_virtue" value="2" type="radio" title="@{virtue}"/>
|
||
</div>
|
||
<input class="underlined" name="attr_virtue_2" type="text" title="@{virtue_2}"/>
|
||
</div>
|
||
</section>
|
||
<section class="section-skills" id="skills">
|
||
<button class="subsystem-style expandable-header skills" name="act_skills" data-i18n="skills" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{skills}">
|
||
</button><span class="locked column-2" hidden=""></span>
|
||
<fieldset class="repeating_skill">
|
||
<input name="attr_name" hidden="" type="text" title="@{repeating_skill_$X_name}"/>
|
||
<input name="attr_path" type="checkbox" title="@{repeating_skill_$X_path}"/>
|
||
<div class="dot-row">
|
||
<button class="roller" name="roll_roll" value="@{action}" title="%{repeating_skill_$X_roll}" type="roll"><span name="attr_name" data-i18n-dynamic="" title="@{repeating_skill_$X_name}"></span>
|
||
</button>
|
||
<button name="act_action" hidden="" type="action" title="%{repeating_skill_$X_action}">
|
||
</button>
|
||
<input name="attr_action" type="hidden" title="@{repeating_skill_$X_action}"/>
|
||
<input class="subsystem-display scion-origin scion-hero active underlined" name="attr_specialty" type="text" title="@{repeating_skill_$X_specialty}"/>
|
||
<select class="dot-number underlined" name="attr_rating" title="@{repeating_skill_$X_rating}">
|
||
<option value="0" 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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="clearer dot" name="attr_rating" checked="" value="0" type="radio" title="@{repeating_skill_$X_rating}"/>
|
||
<input class="dot" name="attr_rating" value="1" type="radio" title="@{repeating_skill_$X_rating}"/>
|
||
<input class="dot" name="attr_rating" value="2" type="radio" title="@{repeating_skill_$X_rating}"/>
|
||
<input class="dot" name="attr_rating" value="3" type="radio" title="@{repeating_skill_$X_rating}"/>
|
||
<input class="dot" name="attr_rating" value="4" type="radio" title="@{repeating_skill_$X_rating}"/>
|
||
<input class="dot" name="attr_rating" value="5" type="radio" title="@{repeating_skill_$X_rating}"/>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
</section>
|
||
<section class="section-attributes" id="attributes">
|
||
<button class="subsystem-style expandable-header attributes" name="act_attributes" data-i18n="attributes" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{attributes}">
|
||
</button>
|
||
<h3 class="subsystem-display scion-hero scion-origin active" data-i18n="mental"></h3>
|
||
<h3 class="subsystem-display scion-hero scion-origin active" data-i18n="physical"></h3>
|
||
<h3 class="subsystem-display scion-hero scion-origin active" data-i18n="social"></h3>
|
||
<div class="approach-container power">
|
||
<h4 class="subsystem-display scion-hero scion-origin active" data-i18n="power"></h4>
|
||
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
||
<button class="roller" name="roll_intellect" role="header" aria-level="5" data-i18n="intellect" value="@{intellect_action}" title="%{intellect}" type="roll">
|
||
</button>
|
||
<button name="act_intellect-action" hidden="" type="action" title="%{intellect-action}">
|
||
</button>
|
||
<input name="attr_intellect_action" type="hidden" title="@{intellect_action}"/>
|
||
<select class="dot-number underlined" name="attr_intellect" title="@{intellect}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_intellect" value="1" type="radio" title="@{intellect}"/>
|
||
<input class="no-clear dot" name="attr_intellect" value="2" type="radio" title="@{intellect}"/>
|
||
<input class="no-clear dot" name="attr_intellect" value="3" type="radio" title="@{intellect}"/>
|
||
<input class="no-clear dot" name="attr_intellect" value="4" type="radio" title="@{intellect}"/>
|
||
<input class="no-clear dot" name="attr_intellect" value="5" type="radio" title="@{intellect}"/>
|
||
</div>
|
||
</div>
|
||
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
||
<button class="roller" name="roll_might" role="header" aria-level="5" data-i18n="might" value="@{might_action}" title="%{might}" type="roll">
|
||
</button>
|
||
<button name="act_might-action" hidden="" type="action" title="%{might-action}">
|
||
</button>
|
||
<input name="attr_might_action" type="hidden" title="@{might_action}"/>
|
||
<select class="dot-number underlined" name="attr_might" title="@{might}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_might" value="1" type="radio" title="@{might}"/>
|
||
<input class="no-clear dot" name="attr_might" value="2" type="radio" title="@{might}"/>
|
||
<input class="no-clear dot" name="attr_might" value="3" type="radio" title="@{might}"/>
|
||
<input class="no-clear dot" name="attr_might" value="4" type="radio" title="@{might}"/>
|
||
<input class="no-clear dot" name="attr_might" value="5" type="radio" title="@{might}"/>
|
||
</div>
|
||
</div>
|
||
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
||
<button class="roller" name="roll_presence" role="header" aria-level="5" data-i18n="presence" value="@{presence_action}" title="%{presence}" type="roll">
|
||
</button>
|
||
<button name="act_presence-action" hidden="" type="action" title="%{presence-action}">
|
||
</button>
|
||
<input name="attr_presence_action" type="hidden" title="@{presence_action}"/>
|
||
<select class="dot-number underlined" name="attr_presence" title="@{presence}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_presence" value="1" type="radio" title="@{presence}"/>
|
||
<input class="no-clear dot" name="attr_presence" value="2" type="radio" title="@{presence}"/>
|
||
<input class="no-clear dot" name="attr_presence" value="3" type="radio" title="@{presence}"/>
|
||
<input class="no-clear dot" name="attr_presence" value="4" type="radio" title="@{presence}"/>
|
||
<input class="no-clear dot" name="attr_presence" value="5" type="radio" title="@{presence}"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="approach-container finesse">
|
||
<h4 class="subsystem-display scion-hero scion-origin active" data-i18n="finesse"></h4>
|
||
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
||
<button class="roller" name="roll_cunning" role="header" aria-level="5" data-i18n="cunning" value="@{cunning_action}" title="%{cunning}" type="roll">
|
||
</button>
|
||
<button name="act_cunning-action" hidden="" type="action" title="%{cunning-action}">
|
||
</button>
|
||
<input name="attr_cunning_action" type="hidden" title="@{cunning_action}"/>
|
||
<select class="dot-number underlined" name="attr_cunning" title="@{cunning}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_cunning" value="1" type="radio" title="@{cunning}"/>
|
||
<input class="no-clear dot" name="attr_cunning" value="2" type="radio" title="@{cunning}"/>
|
||
<input class="no-clear dot" name="attr_cunning" value="3" type="radio" title="@{cunning}"/>
|
||
<input class="no-clear dot" name="attr_cunning" value="4" type="radio" title="@{cunning}"/>
|
||
<input class="no-clear dot" name="attr_cunning" value="5" type="radio" title="@{cunning}"/>
|
||
</div>
|
||
</div>
|
||
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
||
<button class="roller" name="roll_dexterity" role="header" aria-level="5" data-i18n="dexterity" value="@{dexterity_action}" title="%{dexterity}" type="roll">
|
||
</button>
|
||
<button name="act_dexterity-action" hidden="" type="action" title="%{dexterity-action}">
|
||
</button>
|
||
<input name="attr_dexterity_action" type="hidden" title="@{dexterity_action}"/>
|
||
<select class="dot-number underlined" name="attr_dexterity" title="@{dexterity}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_dexterity" value="1" type="radio" title="@{dexterity}"/>
|
||
<input class="no-clear dot" name="attr_dexterity" value="2" type="radio" title="@{dexterity}"/>
|
||
<input class="no-clear dot" name="attr_dexterity" value="3" type="radio" title="@{dexterity}"/>
|
||
<input class="no-clear dot" name="attr_dexterity" value="4" type="radio" title="@{dexterity}"/>
|
||
<input class="no-clear dot" name="attr_dexterity" value="5" type="radio" title="@{dexterity}"/>
|
||
</div>
|
||
</div>
|
||
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
||
<button class="roller" name="roll_manipulation" role="header" aria-level="5" data-i18n="manipulation" value="@{manipulation_action}" title="%{manipulation}" type="roll">
|
||
</button>
|
||
<button name="act_manipulation-action" hidden="" type="action" title="%{manipulation-action}">
|
||
</button>
|
||
<input name="attr_manipulation_action" type="hidden" title="@{manipulation_action}"/>
|
||
<select class="dot-number underlined" name="attr_manipulation" title="@{manipulation}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_manipulation" value="1" type="radio" title="@{manipulation}"/>
|
||
<input class="no-clear dot" name="attr_manipulation" value="2" type="radio" title="@{manipulation}"/>
|
||
<input class="no-clear dot" name="attr_manipulation" value="3" type="radio" title="@{manipulation}"/>
|
||
<input class="no-clear dot" name="attr_manipulation" value="4" type="radio" title="@{manipulation}"/>
|
||
<input class="no-clear dot" name="attr_manipulation" value="5" type="radio" title="@{manipulation}"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="approach-container resistance">
|
||
<h4 class="subsystem-display scion-hero scion-origin active" data-i18n="resistance"></h4>
|
||
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
||
<button class="roller" name="roll_resolve" role="header" aria-level="5" data-i18n="resolve" value="@{resolve_action}" title="%{resolve}" type="roll">
|
||
</button>
|
||
<button name="act_resolve-action" hidden="" type="action" title="%{resolve-action}">
|
||
</button>
|
||
<input name="attr_resolve_action" type="hidden" title="@{resolve_action}"/>
|
||
<select class="dot-number underlined" name="attr_resolve" title="@{resolve}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_resolve" value="1" type="radio" title="@{resolve}"/>
|
||
<input class="no-clear dot" name="attr_resolve" value="2" type="radio" title="@{resolve}"/>
|
||
<input class="no-clear dot" name="attr_resolve" value="3" type="radio" title="@{resolve}"/>
|
||
<input class="no-clear dot" name="attr_resolve" value="4" type="radio" title="@{resolve}"/>
|
||
<input class="no-clear dot" name="attr_resolve" value="5" type="radio" title="@{resolve}"/>
|
||
</div>
|
||
</div>
|
||
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
||
<button class="roller" name="roll_stamina" role="header" aria-level="5" data-i18n="stamina" value="@{stamina_action}" title="%{stamina}" type="roll">
|
||
</button>
|
||
<button name="act_stamina-action" hidden="" type="action" title="%{stamina-action}">
|
||
</button>
|
||
<input name="attr_stamina_action" type="hidden" title="@{stamina_action}"/>
|
||
<select class="dot-number underlined" name="attr_stamina" title="@{stamina}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_stamina" value="1" type="radio" title="@{stamina}"/>
|
||
<input class="no-clear dot" name="attr_stamina" value="2" type="radio" title="@{stamina}"/>
|
||
<input class="no-clear dot" name="attr_stamina" value="3" type="radio" title="@{stamina}"/>
|
||
<input class="no-clear dot" name="attr_stamina" value="4" type="radio" title="@{stamina}"/>
|
||
<input class="no-clear dot" name="attr_stamina" value="5" type="radio" title="@{stamina}"/>
|
||
</div>
|
||
</div>
|
||
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
||
<button class="roller" name="roll_composure" role="header" aria-level="5" data-i18n="composure" value="@{composure_action}" title="%{composure}" type="roll">
|
||
</button>
|
||
<button name="act_composure-action" hidden="" type="action" title="%{composure-action}">
|
||
</button>
|
||
<input name="attr_composure_action" type="hidden" title="@{composure_action}"/>
|
||
<select class="dot-number underlined" name="attr_composure" title="@{composure}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_composure" value="1" type="radio" title="@{composure}"/>
|
||
<input class="no-clear dot" name="attr_composure" value="2" type="radio" title="@{composure}"/>
|
||
<input class="no-clear dot" name="attr_composure" value="3" type="radio" title="@{composure}"/>
|
||
<input class="no-clear dot" name="attr_composure" value="4" type="radio" title="@{composure}"/>
|
||
<input class="no-clear dot" name="attr_composure" value="5" type="radio" title="@{composure}"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="section-health" id="health">
|
||
<button class="subsystem-style expandable-header health" name="act_health" data-i18n="health" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{health}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-injury" data-i18n-title="create a injury" type="action" title="%{add-injury}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-injury" data-i18n-title="edit section" type="action" title="%{edit-injury}">
|
||
</button>
|
||
<div class="input-label input-label--button">
|
||
<button class="roller" name="roll_movement_dice" data-i18n="movement dice" role="heading" aria-level="5" value="@{movement_dice_action}" title="%{movement_dice}" type="roll">
|
||
</button>
|
||
<input class="underlined input-label__input" name="attr_movement_dice" type="number" readonly="" value="1" title="@{movement_dice}"/>
|
||
</div>
|
||
<button name="act_movement-dice-action" hidden="" type="action" title="%{movement-dice-action}">
|
||
</button>
|
||
<input name="attr_movement_dice_action" type="hidden" title="@{movement_dice_action}"/>
|
||
<div class="input-label input-label--button">
|
||
<button class="roller" name="roll_defense" role="heading" data-i18n="defense roll" aria-level="5" value="@{defense_action}" title="%{defense}" type="roll">
|
||
</button>
|
||
<input class="underlined input-label__input" name="attr_defense" type="number" readonly="" value="1" title="@{defense}"/>
|
||
</div>
|
||
<button name="act_defense-action" hidden="" type="action" title="%{defense-action}">
|
||
</button>
|
||
<input name="attr_defense_action" type="hidden" title="@{defense_action}"/><span class="pseudo-control" hidden=""></span>
|
||
<fieldset class="repeating_injury">
|
||
<input class="type-control" name="attr_display_state" value="bruised" type="hidden" title="@{repeating_injury_$X_display_state}"/>
|
||
<div class="type">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_injury_$X_collapse}"/>
|
||
<label class="collapse-interface">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_injury_$X_collapse}"/>
|
||
</label>
|
||
<input name="attr_affected" type="checkbox" title="@{repeating_injury_$X_affected}"/>
|
||
<select class="underlined" name="attr_type" title="@{repeating_injury_$X_type}">
|
||
<option value="bruised" data-i18n="bruised" selected="">
|
||
</option>
|
||
<option value="injured" data-i18n="injured">
|
||
</option>
|
||
<option value="maimed" data-i18n="maimed">
|
||
</option>
|
||
</select>
|
||
<input class="underlined" name="attr_name" data-i18n-placeholder="injury name" type="text" title="@{repeating_injury_$X_name}"/>
|
||
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_effect" title="@{repeating_injury_$X_effect}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_effect" data-i18n-placeholder="injury effect" title="@{repeating_injury_$X_effect}"></textarea>
|
||
</div>
|
||
</div>
|
||
<div class="taken-out">
|
||
<input name="attr_affected" type="checkbox" title="@{repeating_injury_$X_affected}"/><span name="attr_type" data-i18n-dynamic="" title="@{repeating_injury_$X_type}"></span>
|
||
</div>
|
||
</fieldset>
|
||
</section>
|
||
<section class="section-deeds subsystem-display scion-hero scion-origin active" id="deeds">
|
||
<button class="subsystem-style expandable-header deeds" name="act_deeds" data-i18n="deeds" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{deeds}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-deed" data-i18n-title="create a deed" type="action" title="%{add-deed}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-deed" data-i18n-title="edit section" type="action" title="%{edit-deed}">
|
||
</button>
|
||
<div class="experience">
|
||
<h5 data-i18n="experience">
|
||
</h5>
|
||
<div class="input-label"><span data-i18n="used"></span>
|
||
<input class="underlined" name="attr_experience_used" type="number" title="@{experience_used}"/>
|
||
</div>
|
||
<div class="input-label"><span data-i18n="earned"></span>
|
||
<input class="underlined" name="attr_experience_earned" type="number" title="@{experience_earned}"/>
|
||
</div>
|
||
<div class="input-label"><span data-i18n="remaining"></span>
|
||
<input class="underlined" name="attr_experience_remaining" readonly="" type="number" title="@{experience_remaining}"/>
|
||
</div>
|
||
</div><span class="pseudo-control" hidden=""></span>
|
||
<fieldset class="repeating_deed">
|
||
<input class="display-control" name="attr_display_state" type="hidden" title="@{repeating_deed_$X_display_state}"/>
|
||
<div class="header">
|
||
<button class="subsystem-style" name="act_collapse" data-i18n="completed deeds" data-i18n-title="expand/collapse completed deeds" role="heading" aria-level="3" type="action" title="%{repeating_deed_$X_collapse}">
|
||
</button>
|
||
</div>
|
||
<input class="hide-control" name="attr_hide" hidden="" value="1" type="checkbox" title="@{repeating_deed_$X_hide}"/>
|
||
<div class="content display-target">
|
||
<select name="attr_type" title="@{repeating_deed_$X_type}">
|
||
<option value="short" data-i18n="short" selected="">
|
||
</option>
|
||
<option value="long" data-i18n="long">
|
||
</option>
|
||
<option value="band" data-i18n="band">
|
||
</option>
|
||
</select>
|
||
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_name" title="@{repeating_deed_$X_name}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_name" data-i18n-placeholder="deed description" title="@{repeating_deed_$X_name}"></textarea>
|
||
</div>
|
||
<input name="attr_completed" value="1" type="checkbox" title="@{repeating_deed_$X_completed}"/>
|
||
</div>
|
||
</fieldset>
|
||
</section>
|
||
<section class="section-paths" id="paths">
|
||
<button class="subsystem-style expandable-header paths" name="act_paths" data-i18n="paths" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{paths}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-path" data-i18n-title="create a path" type="action" title="%{add-path}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-path" data-i18n-title="edit section" type="action" title="%{edit-path}">
|
||
</button><span class="pseudo-control image-borders" hidden=""></span>
|
||
<fieldset class="repeating_path">
|
||
<input class="border-control" name="attr_display_state" type="hidden" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="image-border">
|
||
<div class="upper-blur"></div>
|
||
<div class="lower-blur"></div>
|
||
</div>
|
||
<input name="attr_master_id" type="hidden" title="@{repeating_path_$X_master_id}"/>
|
||
<input class="display-control" name="attr_display_state" value="short-master" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="display-target short-master">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
||
</label><span name="attr_type" role="heading" aria-level="5" title="@{repeating_path_$X_type}"></span><span name="attr_name" title="@{repeating_path_$X_name}"></span>
|
||
<select name="attr_status" title="@{repeating_path_$X_status}">
|
||
<option value="available" data-i18n="available" selected="">
|
||
</option>
|
||
<option value="invoked" data-i18n="invoked">
|
||
</option>
|
||
<option value="suspended" data-i18n="suspended">
|
||
</option>
|
||
<option value="revoked" data-i18n="revoked">
|
||
</option>
|
||
</select><span class="short-text description" name="attr_condition" title="@{repeating_path_$X_condition}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="master" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="display-target master">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
||
</label>
|
||
<input class="underlined" name="attr_type" data-i18n-placeholder="type" role="heading" aria-level="5" type="text" title="@{repeating_path_$X_type}"/>
|
||
<input class="underlined" name="attr_name" data-i18n-placeholder="name of the path" type="text" title="@{repeating_path_$X_name}"/>
|
||
<input name="attr_status" value="available" type="hidden" title="@{repeating_path_$X_status}"/>
|
||
<select name="attr_status" title="@{repeating_path_$X_status}">
|
||
<option value="available" data-i18n="available" selected="">
|
||
</option>
|
||
<option value="invoked" data-i18n="invoked">
|
||
</option>
|
||
<option value="suspended" data-i18n="suspended">
|
||
</option>
|
||
<option value="revoked" data-i18n="revoked">
|
||
</option>
|
||
</select>
|
||
<input class="underlined skills" name="attr_skill" data-i18n-placeholder="Associated skills" type="text" title="@{repeating_path_$X_skill}"/>
|
||
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_condition" title="@{repeating_path_$X_condition}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_condition" data-i18n-placeholder="Path condition" title="@{repeating_path_$X_condition}"></textarea>
|
||
</div>
|
||
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_path_$X_description}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="describe the path" title="@{repeating_path_$X_description}"></textarea>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="short-contact" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="display-target short-contact">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="contact">
|
||
</h5><span name="attr_name" title="@{repeating_path_$X_name}"></span>
|
||
<input class="underlined" name="attr_tags" data-i18n-placeholder="tags" type="text" title="@{repeating_path_$X_tags}"/>
|
||
<select class="dot-number underlined" name="attr_rating" title="@{repeating_path_$X_rating}">
|
||
<option value="0">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>
|
||
</select>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="contact" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="display-target contact">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="contact">
|
||
</h5>
|
||
<input class="underlined" name="attr_name" data-i18n-placeholder="name" type="text" title="@{repeating_path_$X_name}"/>
|
||
<input class="underlined" name="attr_tags" data-i18n-placeholder="tags" type="text" title="@{repeating_path_$X_tags}"/>
|
||
<div class="dot-row size-number">
|
||
<select class="dot-number underlined" name="attr_rating" title="@{repeating_path_$X_rating}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_rating" value="1" type="radio" title="@{repeating_path_$X_rating}"/>
|
||
<input class="no-clear dot" name="attr_rating" value="2" type="radio" title="@{repeating_path_$X_rating}"/>
|
||
<input class="no-clear dot" name="attr_rating" value="3" type="radio" title="@{repeating_path_$X_rating}"/>
|
||
<input class="no-clear dot" name="attr_rating" value="4" type="radio" title="@{repeating_path_$X_rating}"/>
|
||
<input class="no-clear dot" name="attr_rating" value="5" type="radio" title="@{repeating_path_$X_rating}"/>
|
||
</div>
|
||
</div>
|
||
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_path_$X_description}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="describe your contact" title="@{repeating_path_$X_description}"></textarea>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="short-group" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="display-target short-group">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="group">
|
||
</h5><span class="short-text" name="attr_group" title="@{repeating_path_$X_group}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="group" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="display-target group">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="group">
|
||
</h5>
|
||
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_group" title="@{repeating_path_$X_group}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_group" data-i18n-placeholder="describe the group" title="@{repeating_path_$X_group}"></textarea>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="short-access" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="display-target short-access">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="access">
|
||
</h5><span class="short-text" name="attr_access" title="@{repeating_path_$X_access}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="access" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="display-target access">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="access">
|
||
</h5>
|
||
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_access" title="@{repeating_path_$X_access}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_access" data-i18n-placeholder="describe the access" title="@{repeating_path_$X_access}"></textarea>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="short-obligation" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="display-target short-obligation">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="obligation">
|
||
</h5><span class="short-text" name="attr_obligation" title="@{repeating_path_$X_obligation}"></span>
|
||
<select class="underlined" name="attr_obligation_status" title="@{repeating_path_$X_obligation_status}">
|
||
<option value="pending" data-i18n="pending" selected="">
|
||
</option>
|
||
<option value="completed" data-i18n="completed">
|
||
</option>
|
||
<option value="failed" data-i18n="failed">
|
||
</option>
|
||
</select>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="obligation" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="display-target obligation">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="obligation">
|
||
</h5>
|
||
<input name="attr_obligation_status" value="pending" type="hidden" title="@{repeating_path_$X_obligation_status}"/>
|
||
<select class="underlined" name="attr_obligation_status" title="@{repeating_path_$X_obligation_status}">
|
||
<option value="pending" data-i18n="pending" selected="">
|
||
</option>
|
||
<option value="completed" data-i18n="completed">
|
||
</option>
|
||
<option value="failed" data-i18n="failed">
|
||
</option>
|
||
</select>
|
||
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_obligation" title="@{repeating_path_$X_obligation}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_obligation" data-i18n-placeholder="describe the obligation" title="@{repeating_path_$X_obligation}"></textarea>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="add-detail" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
||
<div class="display-target add-detail">
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-contact" data-i18n-title="create a contact" data-i18n="contact" type="action" title="%{repeating_path_$X_add-contact}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-group" data-i18n-title="create a group" data-i18n="group" type="action" title="%{repeating_path_$X_add-group}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-access" data-i18n-title="create a access" data-i18n="access" type="action" title="%{repeating_path_$X_add-access}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-obligation" data-i18n-title="create a obligation" data-i18n="obligation" type="action" title="%{repeating_path_$X_add-obligation}">
|
||
</button>
|
||
</div>
|
||
</fieldset>
|
||
</section>
|
||
<section class="section-calling subsystem-display scion-hero scion-origin active" id="calling">
|
||
<button class="subsystem-display subsystem-style scion-origin expandable-header calling" name="act_calling" data-i18n="calling & knacks" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{calling}">
|
||
</button>
|
||
<button class="subsystem-display subsystem-style scion-hero expandable-header calling" name="act_calling" data-i18n="callings & knacks" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{calling}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-calling" data-i18n-title="create a calling" type="action" title="%{add-calling}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-calling" data-i18n-title="edit section" type="action" title="%{edit-calling}">
|
||
</button><span class="pseudo-control image-borders" hidden=""></span>
|
||
<fieldset class="repeating_calling">
|
||
<input name="attr_level" value="mortal" type="hidden" title="@{repeating_calling_$X_level}"/>
|
||
<input class="border-control" name="attr_display_state" type="hidden" title="@{repeating_calling_$X_display_state}"/>
|
||
<div class="image-border">
|
||
<div class="upper-blur"></div>
|
||
<div class="lower-blur"></div>
|
||
</div>
|
||
<input name="attr_master_id" type="hidden" title="@{repeating_calling_$X_master_id}"/>
|
||
<input class="display-control" name="attr_display_state" value="master" hidden="" type="radio" title="@{repeating_calling_$X_display_state}"/>
|
||
<div class="display-target calling">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_calling_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_calling_$X_collapse}"/>
|
||
</label>
|
||
<div class="dot-row size-number contents used"><span class="dot-number" name="attr_rating" title="@{repeating_calling_$X_rating}"></span>
|
||
<div class="dot-button-container">
|
||
<input class="dot" name="attr_rating" value="0" hidden="" checked="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
||
<input class="dot" name="attr_rating" value="1" hidden="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
||
<input class="dot" name="attr_rating" value="2" hidden="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
||
<input class="dot" name="attr_rating" value="3" hidden="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
||
<input class="dot" name="attr_rating" value="4" hidden="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
||
<input class="dot" name="attr_rating" value="5" hidden="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
||
</div>
|
||
</div>
|
||
<div class="dot-row size-number contents">
|
||
<input class="underlined" name="attr_name" role="heading" aria-level="5" type="text" title="@{repeating_calling_$X_name}"/>
|
||
<select class="dot-number underlined" name="attr_rating_max" title="@{repeating_calling_$X_rating|max}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_rating_max" value="1" type="radio" title="@{repeating_calling_$X_rating|max}"/>
|
||
<input class="no-clear dot" name="attr_rating_max" value="2" type="radio" title="@{repeating_calling_$X_rating|max}"/>
|
||
<input class="no-clear dot" name="attr_rating_max" value="3" type="radio" title="@{repeating_calling_$X_rating|max}"/>
|
||
<input class="no-clear dot" name="attr_rating_max" value="4" type="radio" title="@{repeating_calling_$X_rating|max}"/>
|
||
<input class="no-clear dot" name="attr_rating_max" value="5" type="radio" title="@{repeating_calling_$X_rating|max}"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="short-knack" hidden="" type="radio" title="@{repeating_calling_$X_display_state}"/>
|
||
<div class="display-target short-knack">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_calling_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_calling_$X_collapse}"/>
|
||
</label>
|
||
<button class="roller" name="roll_clash" data-i18n-alt="roll clash of wills" title="%{repeating_calling_$X_calling}" value="@{clash_action}" type="roll">
|
||
</button>
|
||
<button name="act_clash-action" hidden="" type="action" title="%{repeating_calling_$X_clash-action}">
|
||
</button>
|
||
<input name="attr_clash_action" type="hidden" title="@{repeating_calling_$X_clash_action}"/><span name="attr_name" title="@{repeating_calling_$X_name}"></span><span class="parentheses subsystem-display scion-hero" name="attr_level" data-i18n-dynamic="" title="@{repeating_calling_$X_level}"></span>
|
||
<input name="attr_active" value="1" type="checkbox" title="@{repeating_calling_$X_active}"/>
|
||
<input name="attr_clash_stat_2" value="rating" type="hidden" title="@{repeating_calling_$X_clash_stat_2}"/>
|
||
<input class="clash-display-control" name="attr_clash_stat_1" value="select" type="hidden" title="@{repeating_calling_$X_clash_stat_1}"/>
|
||
<div class="clash"><span name="attr_clash_stat_1" data-i18n-dynamic="" title="@{repeating_calling_$X_clash_stat_1}"></span><span>+</span><span name="attr_clash_stat_2" value="rating" data-i18n-dynamic="" title="@{repeating_calling_$X_clash_stat_2}"></span>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="knack" hidden="" type="radio" title="@{repeating_calling_$X_display_state}"/>
|
||
<div class="display-target knack">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_calling_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_calling_$X_collapse}"/>
|
||
</label>
|
||
<button class="roller" name="roll_clash" data-i18n-alt="roll clash of wills" title="%{repeating_calling_$X_calling}" value="@{clash_action}" type="roll">
|
||
</button>
|
||
<button name="act_clash-action" hidden="" type="action" title="%{repeating_calling_$X_clash-action}">
|
||
</button>
|
||
<input name="attr_clash_action" type="hidden" title="@{repeating_calling_$X_clash_action}"/>
|
||
<input class="underlined" name="attr_name" type="text" title="@{repeating_calling_$X_name}"/>
|
||
<input name="attr_level" value="mortal" type="hidden" title="@{repeating_calling_$X_level}"/>
|
||
<select class="parentheses subsystem-display scion-hero" name="attr_level" title="@{repeating_calling_$X_level}">
|
||
<option value="mortal" data-i18n="mortal" selected="">
|
||
</option>
|
||
<option value="immortal" data-i18n="immortal">
|
||
</option>
|
||
</select>
|
||
<input name="attr_active" value="1" type="checkbox" title="@{repeating_calling_$X_active}"/>
|
||
<div class="clash">
|
||
<h5>
|
||
</h5>
|
||
<div class="select-container">
|
||
<select class="underlined" name="attr_clash_stat_1" title="@{repeating_calling_$X_clash_stat_1}">
|
||
<option value="select" data-i18n="select" selected="">
|
||
</option>
|
||
<option value="query" data-i18n="query">
|
||
</option>
|
||
<option value="academics" data-i18n="academics">
|
||
</option>
|
||
<option value="athletics" data-i18n="athletics">
|
||
</option>
|
||
<option value="close combat" data-i18n="close combat">
|
||
</option>
|
||
<option value="culture" data-i18n="culture">
|
||
</option>
|
||
<option value="empathy" data-i18n="empathy">
|
||
</option>
|
||
<option value="firearms" data-i18n="firearms">
|
||
</option>
|
||
<option value="integrity" data-i18n="integrity">
|
||
</option>
|
||
<option value="leadership" data-i18n="leadership">
|
||
</option>
|
||
<option value="medicine" data-i18n="medicine">
|
||
</option>
|
||
<option value="occult" data-i18n="occult">
|
||
</option>
|
||
<option value="persuasion" data-i18n="persuasion">
|
||
</option>
|
||
<option value="pilot" data-i18n="pilot">
|
||
</option>
|
||
<option value="science" data-i18n="science">
|
||
</option>
|
||
<option value="subterfuge" data-i18n="subterfuge">
|
||
</option>
|
||
<option value="survival" data-i18n="survival">
|
||
</option>
|
||
<option value="technology" data-i18n="technology">
|
||
</option>
|
||
</select><span>+</span><span name="attr_clash_stat_2" value="rating" data-i18n-dynamic="" title="@{repeating_calling_$X_clash_stat_2}"></span>
|
||
</div>
|
||
</div>
|
||
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_calling_$X_description}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_description" title="@{repeating_calling_$X_description}"></textarea>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="add-detail" hidden="" type="radio" title="@{repeating_calling_$X_display_state}"/>
|
||
<div class="display-target add-detail">
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-knack" data-i18n-title="create a knack" type="action" title="%{repeating_calling_$X_add-knack}">
|
||
</button>
|
||
</div>
|
||
</fieldset>
|
||
</section>
|
||
<section class="section-purview subsystem-display scion-hero" id="purview">
|
||
<button class="subsystem-display subsystem-style scion-hero expandable-header purview" name="act_purview" data-i18n="purviews" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{purview}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-purview" data-i18n-title="create a purview" type="action" title="%{add-purview}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-purview" data-i18n-title="edit section" type="action" title="%{edit-purview}">
|
||
</button><span class="pseudo-control image-borders" hidden=""></span>
|
||
<fieldset class="repeating_purview">
|
||
<input class="border-control" name="attr_display_state" type="hidden" title="@{repeating_purview_$X_display_state}"/>
|
||
<div class="image-border">
|
||
<div class="upper-blur"></div>
|
||
<div class="lower-blur"></div>
|
||
</div>
|
||
<input name="attr_master_id" type="hidden" title="@{repeating_purview_$X_master_id}"/>
|
||
<input class="display-control" name="attr_display_state" value="short-master" hidden="" type="radio" title="@{repeating_purview_$X_display_state}"/>
|
||
<div class="display-target short-master">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_purview_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_purview_$X_collapse}"/>
|
||
</label><span name="attr_name" role="heading" aria-level="4" title="@{repeating_purview_$X_name}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="master" hidden="" type="radio" title="@{repeating_purview_$X_display_state}"/>
|
||
<div class="display-target master">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_purview_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_purview_$X_collapse}"/>
|
||
</label>
|
||
<input class="underlined" name="attr_name" role="heading" aria-level="4" data-i18n-placeholder="purview name" type="text" title="@{repeating_purview_$X_name}"/>
|
||
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_purview_$X_description}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="describe the purview" title="@{repeating_purview_$X_description}"></textarea>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="short-boon" hidden="" type="radio" title="@{repeating_purview_$X_display_state}"/>
|
||
<div class="display-target short-boon">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_purview_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_purview_$X_collapse}"/>
|
||
</label><span class="name" name="attr_name" role="heading" aria-level="5" title="@{repeating_purview_$X_name}"></span>
|
||
<input class="display-control" name="attr_cost" value="" type="hidden" title="@{repeating_purview_$X_cost}"/>
|
||
<label class="input-label cost">
|
||
<h5 class="cost" data-i18n="cost">
|
||
</h5><span class="cost" name="attr_cost" title="@{repeating_purview_$X_cost}"></span>
|
||
</label>
|
||
<input class="display-control" name="attr_duration" value="" type="hidden" title="@{repeating_purview_$X_duration}"/>
|
||
<label class="input-label duration">
|
||
<h5 class="duration" data-i18n="duration">
|
||
</h5><span class="duration" name="attr_duration" title="@{repeating_purview_$X_duration}"></span>
|
||
</label>
|
||
<input class="display-control" name="attr_subject" value="" type="hidden" title="@{repeating_purview_$X_subject}"/>
|
||
<label class="input-label subject">
|
||
<h5 class="subject" data-i18n="subject">
|
||
</h5><span class="subject" name="attr_subject" title="@{repeating_purview_$X_subject}"></span>
|
||
</label>
|
||
<input class="display-control" name="attr_range" value="" type="hidden" title="@{repeating_purview_$X_range}"/>
|
||
<label class="input-label range">
|
||
<h5 class="range" data-i18n="range">
|
||
</h5><span class="range" name="attr_range" title="@{repeating_purview_$X_range}"></span>
|
||
</label>
|
||
<input class="display-control" name="attr_action" value="" type="hidden" title="@{repeating_purview_$X_action}"/>
|
||
<label class="input-label action">
|
||
<h5 class="action" data-i18n="action">
|
||
</h5><span class="action" name="attr_action" title="@{repeating_purview_$X_action}"></span>
|
||
</label>
|
||
<input class="clash-display-control" name="attr_clash_stat_1" value="select" type="hidden" title="@{repeating_purview_$X_clash_stat_1}"/>
|
||
<input class="clash-display-control" name="attr_clash_stat_2" value="select" type="hidden" title="@{repeating_purview_$X_clash_stat_2}"/>
|
||
<div class="clash">
|
||
<button class="roller" name="roll_clash" data-i18n-alt="roll clash of wills" title="%{repeating_purview_$X_purview}" value="@{clash_action}" type="roll">
|
||
</button>
|
||
<button name="act_clash-action" hidden="" type="action" title="%{repeating_purview_$X_clash-action}">
|
||
</button>
|
||
<input name="attr_clash_action" type="hidden" title="@{repeating_purview_$X_clash_action}"/><span name="attr_clash_stat_1" data-i18n-dynamic="" title="@{repeating_purview_$X_clash_stat_1}"></span><span>+</span><span name="attr_clash_stat_2" data-i18n-dynamic="" title="@{repeating_purview_$X_clash_stat_2}"></span><span class="vs" data-i18n="vs"></span><span name="attr_clash_defense_1" data-i18n-dynamic="" title="@{repeating_purview_$X_clash_defense_1}"></span><span>+</span><span name="attr_clash_defense_2" data-i18n-dynamic="" title="@{repeating_purview_$X_clash_defense_2}"></span>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="boon" hidden="" type="radio" title="@{repeating_purview_$X_display_state}"/>
|
||
<div class="display-target boon">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_purview_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_purview_$X_collapse}"/>
|
||
</label>
|
||
<input class="name underlined" name="attr_name" role="heading" aria-level="5" data-i18n-placeholder="boon name" type="text" title="@{repeating_purview_$X_name}"/>
|
||
<label class="input-label cost">
|
||
<h5 data-i18n="cost">
|
||
</h5>
|
||
<input class="underlined" name="attr_cost" type="text" title="@{repeating_purview_$X_cost}"/>
|
||
</label>
|
||
<label class="input-label duration">
|
||
<h5 data-i18n="duration">
|
||
</h5>
|
||
<input class="underlined" name="attr_duration" type="text" title="@{repeating_purview_$X_duration}"/>
|
||
</label>
|
||
<label class="input-label subject">
|
||
<h5 data-i18n="subject">
|
||
</h5>
|
||
<input class="underlined" name="attr_subject" type="text" title="@{repeating_purview_$X_subject}"/>
|
||
</label>
|
||
<label class="input-label range">
|
||
<h5 data-i18n="range">
|
||
</h5>
|
||
<input class="underlined" name="attr_range" type="text" title="@{repeating_purview_$X_range}"/>
|
||
</label>
|
||
<label class="input-label action">
|
||
<h5 data-i18n="action">
|
||
</h5>
|
||
<input class="underlined" name="attr_action" type="text" title="@{repeating_purview_$X_action}"/>
|
||
</label>
|
||
<div class="clash">
|
||
<button class="roller" name="roll_clash" data-i18n-alt="roll clash of wills" title="%{repeating_purview_$X_purview}" value="@{clash_action}" type="roll">
|
||
</button>
|
||
<button name="act_clash-action" hidden="" type="action" title="%{repeating_purview_$X_clash-action}">
|
||
</button>
|
||
<input name="attr_clash_action" type="hidden" title="@{repeating_purview_$X_clash_action}"/>
|
||
<h5 data-i18n="clash">
|
||
</h5>
|
||
<div class="select-container">
|
||
<select class="underlined" name="attr_clash_stat_1" title="@{repeating_purview_$X_clash_stat_1}">
|
||
<option value="select" data-i18n="select" selected="">
|
||
</option>
|
||
<option value="query" data-i18n="query">
|
||
</option>
|
||
<option value="legend" data-i18n="legend">
|
||
</option>
|
||
<option value="intellect" data-i18n="intellect">
|
||
</option>
|
||
<option value="cunning" data-i18n="cunning">
|
||
</option>
|
||
<option value="resolve" data-i18n="resolve">
|
||
</option>
|
||
<option value="might" data-i18n="might">
|
||
</option>
|
||
<option value="dexterity" data-i18n="dexterity">
|
||
</option>
|
||
<option value="stamina" data-i18n="stamina">
|
||
</option>
|
||
<option value="presence" data-i18n="presence">
|
||
</option>
|
||
<option value="manipulation" data-i18n="manipulation">
|
||
</option>
|
||
<option value="composure" data-i18n="composure">
|
||
</option>
|
||
<option value="academics" data-i18n="academics">
|
||
</option>
|
||
<option value="athletics" data-i18n="athletics">
|
||
</option>
|
||
<option value="close combat" data-i18n="close combat">
|
||
</option>
|
||
<option value="culture" data-i18n="culture">
|
||
</option>
|
||
<option value="empathy" data-i18n="empathy">
|
||
</option>
|
||
<option value="firearms" data-i18n="firearms">
|
||
</option>
|
||
<option value="integrity" data-i18n="integrity">
|
||
</option>
|
||
<option value="leadership" data-i18n="leadership">
|
||
</option>
|
||
<option value="medicine" data-i18n="medicine">
|
||
</option>
|
||
<option value="occult" data-i18n="occult">
|
||
</option>
|
||
<option value="persuasion" data-i18n="persuasion">
|
||
</option>
|
||
<option value="pilot" data-i18n="pilot">
|
||
</option>
|
||
<option value="science" data-i18n="science">
|
||
</option>
|
||
<option value="subterfuge" data-i18n="subterfuge">
|
||
</option>
|
||
<option value="survival" data-i18n="survival">
|
||
</option>
|
||
<option value="technology" data-i18n="technology">
|
||
</option>
|
||
</select><span>+</span>
|
||
<select class="underlined" name="attr_clash_stat_2" title="@{repeating_purview_$X_clash_stat_2}">
|
||
<option value="select" data-i18n="select" selected="">
|
||
</option>
|
||
<option value="query" data-i18n="query">
|
||
</option>
|
||
<option value="legend" data-i18n="legend">
|
||
</option>
|
||
<option value="intellect" data-i18n="intellect">
|
||
</option>
|
||
<option value="cunning" data-i18n="cunning">
|
||
</option>
|
||
<option value="resolve" data-i18n="resolve">
|
||
</option>
|
||
<option value="might" data-i18n="might">
|
||
</option>
|
||
<option value="dexterity" data-i18n="dexterity">
|
||
</option>
|
||
<option value="stamina" data-i18n="stamina">
|
||
</option>
|
||
<option value="presence" data-i18n="presence">
|
||
</option>
|
||
<option value="manipulation" data-i18n="manipulation">
|
||
</option>
|
||
<option value="composure" data-i18n="composure">
|
||
</option>
|
||
<option value="academics" data-i18n="academics">
|
||
</option>
|
||
<option value="athletics" data-i18n="athletics">
|
||
</option>
|
||
<option value="close combat" data-i18n="close combat">
|
||
</option>
|
||
<option value="culture" data-i18n="culture">
|
||
</option>
|
||
<option value="empathy" data-i18n="empathy">
|
||
</option>
|
||
<option value="firearms" data-i18n="firearms">
|
||
</option>
|
||
<option value="integrity" data-i18n="integrity">
|
||
</option>
|
||
<option value="leadership" data-i18n="leadership">
|
||
</option>
|
||
<option value="medicine" data-i18n="medicine">
|
||
</option>
|
||
<option value="occult" data-i18n="occult">
|
||
</option>
|
||
<option value="persuasion" data-i18n="persuasion">
|
||
</option>
|
||
<option value="pilot" data-i18n="pilot">
|
||
</option>
|
||
<option value="science" data-i18n="science">
|
||
</option>
|
||
<option value="subterfuge" data-i18n="subterfuge">
|
||
</option>
|
||
<option value="survival" data-i18n="survival">
|
||
</option>
|
||
<option value="technology" data-i18n="technology">
|
||
</option>
|
||
</select><span class="vs" data-i18n="vs"></span>
|
||
<select class="underlined" name="attr_clash_defense_1" title="@{repeating_purview_$X_clash_defense_1}">
|
||
<option value="select" data-i18n="select" selected="">
|
||
</option>
|
||
<option value="query" data-i18n="query">
|
||
</option>
|
||
<option value="legend" data-i18n="legend">
|
||
</option>
|
||
<option value="intellect" data-i18n="intellect">
|
||
</option>
|
||
<option value="cunning" data-i18n="cunning">
|
||
</option>
|
||
<option value="resolve" data-i18n="resolve">
|
||
</option>
|
||
<option value="might" data-i18n="might">
|
||
</option>
|
||
<option value="dexterity" data-i18n="dexterity">
|
||
</option>
|
||
<option value="stamina" data-i18n="stamina">
|
||
</option>
|
||
<option value="presence" data-i18n="presence">
|
||
</option>
|
||
<option value="manipulation" data-i18n="manipulation">
|
||
</option>
|
||
<option value="composure" data-i18n="composure">
|
||
</option>
|
||
<option value="academics" data-i18n="academics">
|
||
</option>
|
||
<option value="athletics" data-i18n="athletics">
|
||
</option>
|
||
<option value="close combat" data-i18n="close combat">
|
||
</option>
|
||
<option value="culture" data-i18n="culture">
|
||
</option>
|
||
<option value="empathy" data-i18n="empathy">
|
||
</option>
|
||
<option value="firearms" data-i18n="firearms">
|
||
</option>
|
||
<option value="integrity" data-i18n="integrity">
|
||
</option>
|
||
<option value="leadership" data-i18n="leadership">
|
||
</option>
|
||
<option value="medicine" data-i18n="medicine">
|
||
</option>
|
||
<option value="occult" data-i18n="occult">
|
||
</option>
|
||
<option value="persuasion" data-i18n="persuasion">
|
||
</option>
|
||
<option value="pilot" data-i18n="pilot">
|
||
</option>
|
||
<option value="science" data-i18n="science">
|
||
</option>
|
||
<option value="subterfuge" data-i18n="subterfuge">
|
||
</option>
|
||
<option value="survival" data-i18n="survival">
|
||
</option>
|
||
<option value="technology" data-i18n="technology">
|
||
</option>
|
||
</select><span>+</span>
|
||
<select class="underlined" name="attr_clash_defense_2" title="@{repeating_purview_$X_clash_defense_2}">
|
||
<option value="select" data-i18n="select" selected="">
|
||
</option>
|
||
<option value="query" data-i18n="query">
|
||
</option>
|
||
<option value="legend" data-i18n="legend">
|
||
</option>
|
||
<option value="intellect" data-i18n="intellect">
|
||
</option>
|
||
<option value="cunning" data-i18n="cunning">
|
||
</option>
|
||
<option value="resolve" data-i18n="resolve">
|
||
</option>
|
||
<option value="might" data-i18n="might">
|
||
</option>
|
||
<option value="dexterity" data-i18n="dexterity">
|
||
</option>
|
||
<option value="stamina" data-i18n="stamina">
|
||
</option>
|
||
<option value="presence" data-i18n="presence">
|
||
</option>
|
||
<option value="manipulation" data-i18n="manipulation">
|
||
</option>
|
||
<option value="composure" data-i18n="composure">
|
||
</option>
|
||
<option value="academics" data-i18n="academics">
|
||
</option>
|
||
<option value="athletics" data-i18n="athletics">
|
||
</option>
|
||
<option value="close combat" data-i18n="close combat">
|
||
</option>
|
||
<option value="culture" data-i18n="culture">
|
||
</option>
|
||
<option value="empathy" data-i18n="empathy">
|
||
</option>
|
||
<option value="firearms" data-i18n="firearms">
|
||
</option>
|
||
<option value="integrity" data-i18n="integrity">
|
||
</option>
|
||
<option value="leadership" data-i18n="leadership">
|
||
</option>
|
||
<option value="medicine" data-i18n="medicine">
|
||
</option>
|
||
<option value="occult" data-i18n="occult">
|
||
</option>
|
||
<option value="persuasion" data-i18n="persuasion">
|
||
</option>
|
||
<option value="pilot" data-i18n="pilot">
|
||
</option>
|
||
<option value="science" data-i18n="science">
|
||
</option>
|
||
<option value="subterfuge" data-i18n="subterfuge">
|
||
</option>
|
||
<option value="survival" data-i18n="survival">
|
||
</option>
|
||
<option value="technology" data-i18n="technology">
|
||
</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_purview_$X_description}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="describe the boon" title="@{repeating_purview_$X_description}"></textarea>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="add-detail" hidden="" type="radio" title="@{repeating_purview_$X_display_state}"/>
|
||
<div class="display-target add-detail">
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-boon" data-i18n-title="create a boon" type="action" title="%{repeating_purview_$X_add-boon}">
|
||
</button>
|
||
</div>
|
||
</fieldset>
|
||
</section>
|
||
<section class="section-birthrights subsystem-display scion-hero" id="birthrights">
|
||
<button class="subsystem-style expandable-header birthrights" name="act_birthrights" data-i18n="birthrights" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{birthrights}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-birthright" data-i18n-title="edit section" type="action" title="%{edit-birthright}">
|
||
</button>
|
||
<label class="input-label"><span class="input-label__text" data-i18n="legendary titles" role="heading" aria-level="5"></span>
|
||
<input class="underlined input-label__input" name="attr_legendary_title" type="text" value="" title="@{legendary_title}"/>
|
||
</label><span class="pseudo-control bordered-item" hidden=""></span>
|
||
<fieldset class="repeating_birthright">
|
||
<div class="image-border"></div>
|
||
<input class="display-control" name="attr_display_state" value="short-relic" hidden="" type="radio" title="@{repeating_birthright_$X_display_state}"/>
|
||
<div class="display-target short-relic">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_birthright_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_birthright_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="relic">
|
||
</h5><span class="name" name="attr_name" role="heading" aria-level="4" title="@{repeating_birthright_$X_name}"></span>
|
||
<select class="dot-number underlined" name="attr_rating" title="@{repeating_birthright_$X_rating}">
|
||
<option value="0">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>
|
||
</select>
|
||
<input class="display-control" name="attr_variety" value="" type="hidden" title="@{repeating_birthright_$X_variety}"/>
|
||
<div class="input-label variety">
|
||
<h5 data-i18n="variety">
|
||
</h5><span name="attr_variety" title="@{repeating_birthright_$X_variety}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_tag" value="" type="hidden" title="@{repeating_birthright_$X_tag}"/>
|
||
<div class="input-label tag">
|
||
<h5 data-i18n="tag">
|
||
</h5><span name="attr_tag" title="@{repeating_birthright_$X_tag}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_deed" value="" type="hidden" title="@{repeating_birthright_$X_deed}"/>
|
||
<div class="input-label deed">
|
||
<h5 data-i18n="deed">
|
||
</h5><span name="attr_deed" title="@{repeating_birthright_$X_deed}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_purview" value="" type="hidden" title="@{repeating_birthright_$X_purview}"/>
|
||
<div class="input-label purview">
|
||
<h5 data-i18n="purview">
|
||
</h5><span name="attr_purview" title="@{repeating_birthright_$X_purview}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_motif" value="" type="hidden" title="@{repeating_birthright_$X_motif}"/>
|
||
<div class="input-label motif">
|
||
<h5 data-i18n="motif">
|
||
</h5><span name="attr_motif" title="@{repeating_birthright_$X_motif}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_enhancement" value="" type="hidden" title="@{repeating_birthright_$X_enhancement}"/>
|
||
<div class="input-label enhancement">
|
||
<h5 data-i18n="enhancement">
|
||
</h5><span name="attr_enhancement" title="@{repeating_birthright_$X_enhancement}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_knack" value="" type="hidden" title="@{repeating_birthright_$X_knack}"/>
|
||
<div class="input-label knack">
|
||
<h5 data-i18n="knack">
|
||
</h5><span name="attr_knack" title="@{repeating_birthright_$X_knack}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_flaw" value="" type="hidden" title="@{repeating_birthright_$X_flaw}"/>
|
||
<div class="input-label flaw">
|
||
<h5 data-i18n="flaw">
|
||
</h5><span name="attr_flaw" title="@{repeating_birthright_$X_flaw}"></span>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="short-guide" hidden="" type="radio" title="@{repeating_birthright_$X_display_state}"/>
|
||
<div class="display-target short-guide">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_birthright_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_birthright_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="guide">
|
||
</h5><span class="name" name="attr_name" role="heading" aria-level="4" title="@{repeating_birthright_$X_name}"></span>
|
||
<select class="dot-number underlined" name="attr_rating" title="@{repeating_birthright_$X_rating}">
|
||
<option value="0">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>
|
||
</select>
|
||
<input class="display-control" name="attr_skills" value="" type="hidden" title="@{repeating_birthright_$X_skills}"/>
|
||
<div class="input-label skills">
|
||
<h5 data-i18n="skills">
|
||
</h5><span name="attr_skills" title="@{repeating_birthright_$X_skills}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_benefit" value="" type="hidden" title="@{repeating_birthright_$X_benefit}"/>
|
||
<div class="input-label benefit">
|
||
<h5 data-i18n="benefit">
|
||
</h5><span name="attr_benefit" title="@{repeating_birthright_$X_benefit}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_stunt" value="" type="hidden" title="@{repeating_birthright_$X_stunt}"/>
|
||
<div class="input-label stunt">
|
||
<h5 data-i18n="stunt">
|
||
</h5><span name="attr_stunt" title="@{repeating_birthright_$X_stunt}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_purview" value="" type="hidden" title="@{repeating_birthright_$X_purview}"/>
|
||
<div class="input-label purview">
|
||
<h5 data-i18n="purview">
|
||
</h5><span name="attr_purview" title="@{repeating_birthright_$X_purview}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_calling" value="" type="hidden" title="@{repeating_birthright_$X_calling}"/>
|
||
<div class="input-label calling">
|
||
<h5 data-i18n="calling">
|
||
</h5><span name="attr_calling" title="@{repeating_birthright_$X_calling}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_title" value="" type="hidden" title="@{repeating_birthright_$X_title}"/>
|
||
<div class="input-label title">
|
||
<h5 data-i18n="title">
|
||
</h5><span name="attr_title" title="@{repeating_birthright_$X_title}"></span>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="short-follower" hidden="" type="radio" title="@{repeating_birthright_$X_display_state}"/>
|
||
<div class="display-target short-follower">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_birthright_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_birthright_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="follower">
|
||
</h5><span class="name" name="attr_name" role="heading" aria-level="4" title="@{repeating_birthright_$X_name}"></span>
|
||
<select class="dot-number underlined" name="attr_rating" title="@{repeating_birthright_$X_rating}">
|
||
<option value="0">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>
|
||
</select>
|
||
<input class="display-control" name="attr_archetype" value="" type="hidden" title="@{repeating_birthright_$X_archetype}"/>
|
||
<div class="input-label archetype">
|
||
<h5 data-i18n="archetype">
|
||
</h5><span name="attr_archetype" title="@{repeating_birthright_$X_archetype}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_tag" value="" type="hidden" title="@{repeating_birthright_$X_tag}"/>
|
||
<div class="input-label tag">
|
||
<h5 data-i18n="tag">
|
||
</h5><span name="attr_tag" title="@{repeating_birthright_$X_tag}"></span>
|
||
</div>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="short-creature" hidden="" type="radio" title="@{repeating_birthright_$X_display_state}"/>
|
||
<div class="display-target short-creature">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_birthright_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_birthright_$X_collapse}"/>
|
||
</label>
|
||
<h5 data-i18n="creature">
|
||
</h5><span class="name" name="attr_name" role="heading" aria-level="4" data-i18n-placeholder="name" title="@{repeating_birthright_$X_name}"></span>
|
||
<select class="dot-number underlined" name="attr_rating" title="@{repeating_birthright_$X_rating}">
|
||
<option value="0">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>
|
||
</select>
|
||
</div>
|
||
<input class="expanded-control" name="attr_display_state" value="relic" type="hidden" title="@{repeating_birthright_$X_display_state}"/>
|
||
<div class="display-target">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_birthright_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_birthright_$X_collapse}"/>
|
||
</label>
|
||
<h5 class="relic conditional-show" data-i18n="relic">
|
||
</h5>
|
||
<h5 class="guide conditional-show" data-i18n="guide">
|
||
</h5>
|
||
<h5 class="follower conditional-show" data-i18n="follower">
|
||
</h5>
|
||
<h5 class="creature conditional-show" data-i18n="creature">
|
||
</h5>
|
||
<input class="name underlined" name="attr_name" role="heading" aria-level="4" data-i18n-placeholder="name" type="text" title="@{repeating_birthright_$X_name}"/>
|
||
<div class="dot-row size-number rating">
|
||
<select class="dot-number underlined" name="attr_rating" title="@{repeating_birthright_$X_rating}">
|
||
<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>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="no-clear dot" name="attr_rating" value="1" type="radio" title="@{repeating_birthright_$X_rating}"/>
|
||
<input class="no-clear dot" name="attr_rating" value="2" type="radio" title="@{repeating_birthright_$X_rating}"/>
|
||
<input class="no-clear dot" name="attr_rating" value="3" type="radio" title="@{repeating_birthright_$X_rating}"/>
|
||
<input class="no-clear dot" name="attr_rating" value="4" type="radio" title="@{repeating_birthright_$X_rating}"/>
|
||
<input class="no-clear dot" name="attr_rating" value="5" type="radio" title="@{repeating_birthright_$X_rating}"/>
|
||
</div>
|
||
</div>
|
||
<div class="detail-container">
|
||
<label class="input-label variety conditional-show relic">
|
||
<h5 data-i18n="variety">
|
||
</h5>
|
||
<input class="underlined" name="attr_variety" type="text" title="@{repeating_birthright_$X_variety}"/>
|
||
</label>
|
||
<label class="input-label archetype conditional-show follower">
|
||
<h5 data-i18n="archetype">
|
||
</h5>
|
||
<input class="underlined" name="attr_archetype" type="text" title="@{repeating_birthright_$X_archetype}"/>
|
||
</label>
|
||
<label class="input-label tag conditional-show relic follower">
|
||
<h5 data-i18n="tag">
|
||
</h5>
|
||
<input class="underlined" name="attr_tag" type="text" title="@{repeating_birthright_$X_tag}"/>
|
||
</label>
|
||
<label class="input-label deed conditional-show relic">
|
||
<h5 data-i18n="deed">
|
||
</h5>
|
||
<input class="underlined" name="attr_deed" type="text" title="@{repeating_birthright_$X_deed}"/>
|
||
</label>
|
||
<label class="input-label skills conditional-show guide">
|
||
<h5 data-i18n="skills">
|
||
</h5>
|
||
<input class="underlined" name="attr_skills" type="text" title="@{repeating_birthright_$X_skills}"/>
|
||
</label>
|
||
<label class="input-label benefit conditional-show guide">
|
||
<h5 data-i18n="benefit">
|
||
</h5>
|
||
<input class="underlined" name="attr_benefit" type="text" title="@{repeating_birthright_$X_benefit}"/>
|
||
</label>
|
||
<label class="input-label stunt conditional-show guide">
|
||
<h5 data-i18n="stunt">
|
||
</h5>
|
||
<input class="underlined" name="attr_stunt" type="text" title="@{repeating_birthright_$X_stunt}"/>
|
||
</label>
|
||
<label class="input-label purview conditional-show relic guide">
|
||
<h5 data-i18n="purview">
|
||
</h5>
|
||
<input class="underlined" name="attr_purview" type="text" title="@{repeating_birthright_$X_purview}"/>
|
||
</label>
|
||
<label class="input-label calling conditional-show guide">
|
||
<h5 data-i18n="calling">
|
||
</h5>
|
||
<input class="underlined" name="attr_calling" type="text" title="@{repeating_birthright_$X_calling}"/>
|
||
</label>
|
||
<label class="input-label motif conditional-show relic">
|
||
<h5 data-i18n="motif">
|
||
</h5>
|
||
<input class="underlined" name="attr_motif" type="text" title="@{repeating_birthright_$X_motif}"/>
|
||
</label>
|
||
<label class="input-label enhancement conditional-show relic">
|
||
<h5 data-i18n="enhancement">
|
||
</h5>
|
||
<input class="underlined" name="attr_enhancement" type="text" title="@{repeating_birthright_$X_enhancement}"/>
|
||
</label>
|
||
<label class="input-label knack conditional-show relic">
|
||
<h5 data-i18n="knack">
|
||
</h5>
|
||
<input class="underlined" name="attr_knack" type="text" title="@{repeating_birthright_$X_knack}"/>
|
||
</label>
|
||
<label class="input-label flaw conditional-show relic">
|
||
<h5 data-i18n="flaw">
|
||
</h5>
|
||
<input class="underlined" name="attr_flaw" type="text" title="@{repeating_birthright_$X_flaw}"/>
|
||
</label>
|
||
<label class="input-label title conditional-show guide">
|
||
<h5 data-i18n="title">
|
||
</h5>
|
||
<input class="underlined" name="attr_title" type="text" title="@{repeating_birthright_$X_title}"/>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<div class="add-container bordered-item">
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-birthright-creature" data-i18n-title="create a birthright-creature" data-i18n="creature" type="action" title="%{add-birthright-creature}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-birthright-follower" data-i18n-title="create a birthright-follower" data-i18n="follower" type="action" title="%{add-birthright-follower}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-birthright-guide" data-i18n-title="create a birthright-guide" data-i18n="guide" type="action" title="%{add-birthright-guide}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-birthright-relic" data-i18n-title="create a birthright-relic" data-i18n="relic" type="action" title="%{add-birthright-relic}">
|
||
</button>
|
||
</div>
|
||
</section>
|
||
<section class="section-equipment subsystem-style" id="equipment">
|
||
<button class="subsystem-style expandable-header equipment" name="act_equipment" data-i18n="equipment" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{equipment}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--add" name="act_add-equipment" data-i18n-title="create a equipment" type="action" title="%{add-equipment}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-equipment" data-i18n-title="edit section" type="action" title="%{edit-equipment}">
|
||
</button><span class="pseudo-control bordered-item" hidden=""></span>
|
||
<fieldset class="repeating_equipment">
|
||
<input class="display-control" name="attr_display_state" type="hidden" title="@{repeating_equipment_$X_display_state}"/>
|
||
<div class="image-border"></div>
|
||
<input class="display-control" name="attr_display_state" value="short-equipment" hidden="" type="radio" title="@{repeating_equipment_$X_display_state}"/>
|
||
<div class="display-target short-equipment">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_equipment_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_equipment_$X_collapse}"/>
|
||
</label><span name="attr_name" title="@{repeating_equipment_$X_name}"></span><span name="attr_tag" title="@{repeating_equipment_$X_tag}"></span>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="equipment" hidden="" type="radio" title="@{repeating_equipment_$X_display_state}"/>
|
||
<div class="display-target equipment">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_equipment_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_equipment_$X_collapse}"/>
|
||
</label>
|
||
<input class="underlined" name="attr_name" data-i18n-placeholder="name" type="text" title="@{repeating_equipment_$X_name}"/>
|
||
<input class="underlined" name="attr_tag" data-i18n-placeholder="tags" type="text" title="@{repeating_equipment_$X_tag}"/>
|
||
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_equipment_$X_description}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="describe the item" title="@{repeating_equipment_$X_description}"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
</section>
|
||
<section class="section-notes" id="notes">
|
||
<button class="subsystem-style expandable-header notes" name="act_notes" data-i18n="notes" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action" title="%{notes}">
|
||
</button>
|
||
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_notes" title="@{notes}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_notes" title="@{notes}"></textarea>
|
||
</div>
|
||
</section>
|
||
</article>
|
||
<article class="antagonist subsystem-style system-scion-origin statblock" id="antagonist">
|
||
<section class="antagonist" id="antagonist-details">
|
||
<div class="statblock__row statblock__row--header">
|
||
<input class="image-display-control" name="attr_archetype_symbol" value="" type="hidden" title="@{archetype_symbol}"/><img name="attr_archetype_symbol" src=" " data-i18n-alt="archetype symbol" title="@{archetype_symbol}"/>
|
||
<input name="attr_character_name" role="heading" aria-level="1" type="text" title="@{character_name}"/>
|
||
</div>
|
||
<div class="statblock__row">
|
||
<label class="input-label"><span class="input-label__text" data-i18n="archetype" role="heading" aria-level="3"></span>
|
||
<input class="underlined input-label__input" name="attr_archetype" type="text" title="@{archetype}"/>
|
||
</label>
|
||
</div>
|
||
<div class="statblock__row">
|
||
<label class="input-label"><span class="input-label__text" data-i18n="drive" role="heading" aria-level="3"></span>
|
||
<input class="underlined input-label__input" name="attr_drive" type="text" title="@{drive}"/>
|
||
</label>
|
||
</div>
|
||
<div class="statblock__row">
|
||
<div class="input-label input-label--button">
|
||
<button class="roller" name="roll_primary_pool" data-i18n="primary pool" role="heading" aria-level="3" value="@{primary_pool_action}" title="%{primary_pool}" type="roll">
|
||
</button>
|
||
<input class="input-label__input" name="attr_primary_pool" type="number" value="1" role="heading" aria-level="3" title="@{primary_pool}"/>
|
||
</div>
|
||
<button name="act_primary-pool-action" hidden="" type="action" title="%{primary-pool-action}">
|
||
</button>
|
||
<input name="attr_primary_pool_action" type="hidden" title="@{primary_pool_action}"/>
|
||
<input class="underlined" name="attr_primary_actions" type="text" title="@{primary_actions}"/>
|
||
</div>
|
||
<div class="statblock__row">
|
||
<div class="input-label input-label--button">
|
||
<button class="roller" name="roll_secondary_pool" data-i18n="secondary pool" role="heading" aria-level="3" value="@{secondary_pool_action}" title="%{secondary_pool}" type="roll">
|
||
</button>
|
||
<input class="input-label__input" name="attr_secondary_pool" type="number" value="1" role="heading" aria-level="3" title="@{secondary_pool}"/>
|
||
</div>
|
||
<button name="act_secondary-pool-action" hidden="" type="action" title="%{secondary-pool-action}">
|
||
</button>
|
||
<input name="attr_secondary_pool_action" type="hidden" title="@{secondary_pool_action}"/>
|
||
<input class="underlined" name="attr_secondary_actions" type="text" title="@{secondary_actions}"/>
|
||
</div>
|
||
<div class="statblock__row">
|
||
<div class="input-label input-label--button">
|
||
<button class="roller" name="roll_desperation_pool" data-i18n="desperation pool" role="heading" aria-level="3" value="@{desperation_pool_action}" title="%{desperation_pool}" type="roll">
|
||
</button>
|
||
<input class="input-label__input" name="attr_desperation_pool" type="number" value="1" role="heading" aria-level="3" title="@{desperation_pool}"/>
|
||
</div>
|
||
<button name="act_desperation-pool-action" hidden="" type="action" title="%{desperation-pool-action}">
|
||
</button>
|
||
<input name="attr_desperation_pool_action" type="hidden" title="@{desperation_pool_action}"/>
|
||
</div>
|
||
<div class="statblock__row statblock__row--auto-grid">
|
||
<label class="input-label"><span class="input-label__text" data-i18n="health" role="heading" aria-level="3"></span>
|
||
<input class="underlined input-label__input" name="attr_health" type="number" title="@{health}"/>
|
||
</label>
|
||
<label class="input-label"><span class="input-label__text" data-i18n="defense" role="heading" aria-level="3"></span>
|
||
<input class="underlined input-label__input" name="attr_defense" type="number" title="@{defense}"/>
|
||
</label>
|
||
<div class="input-label input-label--button">
|
||
<button class="roller" name="roll_initiative" data-i18n="initiative" role="heading" aria-level="3" value="@{initiative_action}" title="%{initiative}" type="roll">
|
||
</button>
|
||
<input class="underlined input-label__input" name="attr_initiative" type="number" title="@{initiative}"/>
|
||
</div>
|
||
<button name="act_initiative-action" hidden="" type="action" title="%{initiative-action}">
|
||
</button>
|
||
<input name="attr_initiative_action" type="hidden" title="@{initiative_action}"/>
|
||
</div>
|
||
<div class="statblock__row statblock__row--inline-container">
|
||
<h3 data-i18n="qualities"></h3><span class="inline-fieldset" hidden=""></span>
|
||
<fieldset class="repeating_quality">
|
||
<input class="display-control" name="attr_display_state" value="short-quality" hidden="" type="radio" title="@{repeating_quality_$X_display_state}"/>
|
||
<div class="inline-fieldset__summary display-target">
|
||
<label class="pointer">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_quality_$X_collapse}"/><span class="inline-fieldset__summary__text" name="attr_name" title="@{repeating_quality_$X_name}"></span>
|
||
</label>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="quality" checked="" hidden="" type="radio" title="@{repeating_quality_$X_display_state}"/>
|
||
<div class="inline-fieldset__detail display-target">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_quality_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_quality_$X_collapse}"/>
|
||
</label>
|
||
<input class="underlined" name="attr_name" role="heading" aria-level="3" data-i18n-placeholder="quality name" type="text" title="@{repeating_quality_$X_name}"/>
|
||
<div class="statblock__row statblock__row--flex display-target">
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cost" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cost" title="@{repeating_quality_$X_cost}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_cost" type="text" title="@{repeating_quality_$X_cost}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="duration" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_duration" title="@{repeating_quality_$X_duration}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_duration" type="text" title="@{repeating_quality_$X_duration}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="subject" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_subject" title="@{repeating_quality_$X_subject}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_subject" type="text" title="@{repeating_quality_$X_subject}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="range" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_range" title="@{repeating_quality_$X_range}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_range" type="text" title="@{repeating_quality_$X_range}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="action" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_action" title="@{repeating_quality_$X_action}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_action" type="text" title="@{repeating_quality_$X_action}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cooldown" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cooldown" title="@{repeating_quality_$X_cooldown}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_cooldown" type="text" title="@{repeating_quality_$X_cooldown}"/>
|
||
</div>
|
||
</label>
|
||
</div>
|
||
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_description" title="@{repeating_quality_$X_description}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="qualities description" title="@{repeating_quality_$X_description}"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<button class="repcontrol-button repcontrol-button--add repcontrol-button--inline" name="act_add-quality" type="action" title="%{add-quality}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--edit repcontrol-button--inline" name="act_edit-quality" type="action" title="%{edit-quality}">
|
||
</button>
|
||
</div>
|
||
<div class="statblock__row statblock__row--inline-container">
|
||
<h3 data-i18n="flairs"></h3><span class="inline-fieldset" hidden=""></span>
|
||
<fieldset class="repeating_flair">
|
||
<input class="display-control" name="attr_display_state" value="short-flair" hidden="" type="radio" title="@{repeating_flair_$X_display_state}"/>
|
||
<div class="inline-fieldset__summary display-target">
|
||
<label class="pointer">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_flair_$X_collapse}"/><span class="inline-fieldset__summary__text" name="attr_name" title="@{repeating_flair_$X_name}"></span>
|
||
</label>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="flair" checked="" hidden="" type="radio" title="@{repeating_flair_$X_display_state}"/>
|
||
<div class="inline-fieldset__detail display-target">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_flair_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_flair_$X_collapse}"/>
|
||
</label>
|
||
<input class="underlined" name="attr_name" role="heading" aria-level="3" data-i18n-placeholder="flair name" type="text" title="@{repeating_flair_$X_name}"/>
|
||
<div class="statblock__row statblock__row--flex display-target">
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cost" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cost" title="@{repeating_flair_$X_cost}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_cost" type="text" title="@{repeating_flair_$X_cost}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="duration" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_duration" title="@{repeating_flair_$X_duration}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_duration" type="text" title="@{repeating_flair_$X_duration}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="subject" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_subject" title="@{repeating_flair_$X_subject}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_subject" type="text" title="@{repeating_flair_$X_subject}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="range" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_range" title="@{repeating_flair_$X_range}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_range" type="text" title="@{repeating_flair_$X_range}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="action" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_action" title="@{repeating_flair_$X_action}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_action" type="text" title="@{repeating_flair_$X_action}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cooldown" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cooldown" title="@{repeating_flair_$X_cooldown}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_cooldown" type="text" title="@{repeating_flair_$X_cooldown}"/>
|
||
</div>
|
||
</label>
|
||
</div>
|
||
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_description" title="@{repeating_flair_$X_description}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="flairs description" title="@{repeating_flair_$X_description}"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<button class="repcontrol-button repcontrol-button--add repcontrol-button--inline" name="act_add-flair" type="action" title="%{add-flair}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--edit repcontrol-button--inline" name="act_edit-flair" type="action" title="%{edit-flair}">
|
||
</button>
|
||
</div>
|
||
<div class="statblock__row statblock__row--inline-container">
|
||
<h3 data-i18n="extras"></h3><span class="inline-fieldset" hidden=""></span>
|
||
<fieldset class="repeating_extra">
|
||
<input class="display-control" name="attr_display_state" value="short-extra" hidden="" type="radio" title="@{repeating_extra_$X_display_state}"/>
|
||
<div class="inline-fieldset__summary display-target">
|
||
<label class="pointer">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_extra_$X_collapse}"/><span class="inline-fieldset__summary__text" name="attr_name" title="@{repeating_extra_$X_name}"></span>
|
||
</label>
|
||
</div>
|
||
<input class="display-control" name="attr_display_state" value="extra" checked="" hidden="" type="radio" title="@{repeating_extra_$X_display_state}"/>
|
||
<div class="inline-fieldset__detail display-target">
|
||
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_extra_$X_collapse}"/>
|
||
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
||
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_extra_$X_collapse}"/>
|
||
</label>
|
||
<input class="underlined" name="attr_name" role="heading" aria-level="3" data-i18n-placeholder="extra name" type="text" title="@{repeating_extra_$X_name}"/>
|
||
<div class="statblock__row statblock__row--flex display-target">
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cost" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cost" title="@{repeating_extra_$X_cost}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_cost" type="text" title="@{repeating_extra_$X_cost}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="duration" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_duration" title="@{repeating_extra_$X_duration}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_duration" type="text" title="@{repeating_extra_$X_duration}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="subject" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_subject" title="@{repeating_extra_$X_subject}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_subject" type="text" title="@{repeating_extra_$X_subject}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="range" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_range" title="@{repeating_extra_$X_range}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_range" type="text" title="@{repeating_extra_$X_range}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="action" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_action" title="@{repeating_extra_$X_action}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_action" type="text" title="@{repeating_extra_$X_action}"/>
|
||
</div>
|
||
</label>
|
||
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cooldown" role="heading" aria-level="4"></span>
|
||
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cooldown" title="@{repeating_extra_$X_cooldown}"></span>
|
||
<input class="underlined input-label__input adaptive--input__input" name="attr_cooldown" type="text" title="@{repeating_extra_$X_cooldown}"/>
|
||
</div>
|
||
</label>
|
||
</div>
|
||
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_description" title="@{repeating_extra_$X_description}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="extras description" title="@{repeating_extra_$X_description}"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<button class="repcontrol-button repcontrol-button--add repcontrol-button--inline" name="act_add-extra" type="action" title="%{add-extra}">
|
||
</button>
|
||
<button class="repcontrol-button repcontrol-button--edit repcontrol-button--inline" name="act_edit-extra" type="action" title="%{edit-extra}">
|
||
</button>
|
||
</div>
|
||
</section>
|
||
</article>
|
||
<article class="gm-screen subsystem-style system-scion-origin statblock" id="gm-screen">
|
||
<section class="section-tension subsystem-style" id="tension">
|
||
<h2 class="subsystem-style scion-hero" data-i18n="tension">
|
||
</h2>
|
||
<div class="dot-row twelve-dots momentum-content boxes">
|
||
<select class="dot-number underlined" name="attr_tension" title="@{tension}">
|
||
<option value="0" 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>
|
||
<option value="7">7
|
||
</option>
|
||
<option value="8">8
|
||
</option>
|
||
<option value="9">9
|
||
</option>
|
||
<option value="10">10
|
||
</option>
|
||
<option value="11">11
|
||
</option>
|
||
<option value="12">12
|
||
</option>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="clearer dot" name="attr_tension" checked="" value="0" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="1" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="2" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="3" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="4" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="5" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="6" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="7" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="8" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="9" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="10" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="11" type="radio" title="@{tension}"/>
|
||
<input class="dot" name="attr_tension" value="12" type="radio" title="@{tension}"/>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</article>
|
||
<article class="party-screen subsystem-style system-scion-origin statblock" id="party-screen">
|
||
<section class="section-party-momentum subsystem-style" id="party-momentum">
|
||
<h2 class="subsystem-style scion-hero" data-i18n="momentum">
|
||
</h2>
|
||
<div class="dot-row twelve-dots momentum-content boxes">
|
||
<select class="dot-number underlined" name="attr_party_momentum" title="@{party_momentum}">
|
||
<option value="0" 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>
|
||
<option value="7">7
|
||
</option>
|
||
<option value="8">8
|
||
</option>
|
||
<option value="9">9
|
||
</option>
|
||
<option value="10">10
|
||
</option>
|
||
<option value="11">11
|
||
</option>
|
||
<option value="12">12
|
||
</option>
|
||
</select>
|
||
<div class="dot-button-container">
|
||
<input class="clearer dot" name="attr_party_momentum" checked="" value="0" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="1" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="2" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="3" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="4" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="5" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="6" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="7" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="8" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="9" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="10" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="11" type="radio" title="@{party_momentum}"/>
|
||
<input class="dot" name="attr_party_momentum" value="12" type="radio" title="@{party_momentum}"/>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="section-party-notes" id="notes">
|
||
<h2 class="subsystem-style scion-hero" data-i18n="notes">
|
||
</h2>
|
||
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_notes" title="@{notes}"></span>
|
||
<textarea class="underlined adaptive--text__textarea" name="attr_notes" title="@{notes}"></textarea>
|
||
</div>
|
||
</section>
|
||
</article>
|
||
</div>
|
||
<rolltemplate class="sheet-rolltemplate-storypath">{{#^rollBetween() computed::finished 0 0}}<span class="finished"></span>{{/^rollBetween() computed::finished 0 0}}
|
||
<div class="template storypath system-{{system}}{{#continuation}} continuation{{/continuation}}{{#first}} first{{/first}} finished">
|
||
<div class="upper-blur"></div>
|
||
<div class="lower-blur"></div>
|
||
<div class="content">
|
||
<div class="header">{{#title}}
|
||
<h3 class="title">{{title}}</h3>{{/title}}{{#attribute}}
|
||
<h4>{{attribute}}</h4>{{/attribute}}{{#skill}}{{#attribute}}
|
||
<h4 class="amp">&</h4>{{/attribute}}
|
||
<h4>{{skill}}</h4>{{/skill}}{{^continuation}}{{#footer}}{{#character_id}}
|
||
<h4 class="character_name" tabindex="-1">[{{footer}}](http://journal.roll20.net/character/{{character_id}})</h4>{{/character_id}}{{^character_id}}
|
||
<h4 class="character_name" tabindex="-1">{{footer}}</h4>{{/character_id}}{{/footer}}{{/continuation}}
|
||
</div>{{#display_dice}}
|
||
<div class="template-row results">{{^continuation}}
|
||
<h5 data-i18n="results"></h5>{{/continuation}}{{roll_1}}{{roll_2}}{{roll_3}}{{roll_4}}{{roll_5}}{{roll_6}}{{roll_7}}{{roll_8}}{{roll_9}}{{roll_10}}
|
||
</div>{{/display_dice}}{{#^rollTotal() computed::finished 0}}{{#enhancements}}
|
||
<div class="template-row">
|
||
<h5 data-i18n="enhancements"></h5><span>{{enhancements}}</span>
|
||
</div>{{/enhancements}}{{#successes}}
|
||
<div class="template-row">
|
||
<h5 data-i18n="successes"></h5><span>{{computed::successes}}</span>
|
||
</div>{{/successes}}{{#difficulty}}
|
||
<div class="template-row">
|
||
<h5 data-i18n="difficulty"></h5><span>{{computed::difficulty}}</span>
|
||
</div>{{/difficulty}}{{#extra_successes}}
|
||
<div class="template-row">
|
||
<h5 data-i18n="extra successes"></h5><span>{{computed::extra_successes}}</span>
|
||
</div>{{/extra_successes}}{{#description}}
|
||
<div class="template-block">
|
||
<h5 data-i18n="description"></h5><span class="description">{{description}}</span>
|
||
</div>{{/description}}{{/^rollTotal() computed::finished 0}}
|
||
</div>
|
||
</div>
|
||
</rolltemplate>
|
||
<script type="text/worker">/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
/**
|
||
* Replaces problem characters to use a string as a regex.
|
||
* @param {string} text
|
||
* @returns {string}
|
||
*/
|
||
const sanitizeForRegex = function(text){
|
||
return text.replace(/\.|\||\(|\)|\[|\]|\-|\+|\?|\/|\{|\}|\^|\$|\*/g,'\\$&');
|
||
};
|
||
//
|
||
/**
|
||
* Converts a value to a number, it's default value, or 0
|
||
* @param {*} val
|
||
* @param {number} def
|
||
* @returns {number}
|
||
*/
|
||
const value = function(val,def){
|
||
return (+val||def||0);
|
||
};
|
||
|
||
/*
|
||
e.g. repeating_equipment_-09Jhu89z_bulk would give:
|
||
section: equipment
|
||
rowID: -09Jhu89z
|
||
field: bulk
|
||
*/
|
||
/**
|
||
* Extracts the section (e.g. `repeating_equipment`), rowID (e.g `-;lkj098J:LKj`), and field name (e.g. `bulk`) from a repeating attribute name
|
||
* @param {string} string
|
||
* @returns {string[]}
|
||
*/
|
||
const parseRepeatName = function(string){
|
||
let match = string.match(/(repeating_[^_]+)_([^_]+)(?:_(.+))?/);
|
||
match.shift();
|
||
return match;
|
||
};
|
||
|
||
/**
|
||
* Parses out the components of a trigger name similar to {@link parseRepeatName}. Aliases: parseClickTrigger.
|
||
* @param {string} string
|
||
* @returns {string[]}
|
||
*/
|
||
const parseTriggerName = function(string){
|
||
let match = string.replace(/^clicked:/,'').match(/(?:(repeating_[^_]+)_([^_]+)_)?(.+)/);
|
||
match.shift();
|
||
return match;
|
||
};
|
||
const parseClickTrigger = parseTriggerName;
|
||
|
||
/**
|
||
* Parses out the attribute name from the htmlattribute name.
|
||
* @param {string} string
|
||
* @returns {string[]}
|
||
*/
|
||
const parseHTMLName = function(string){
|
||
let match = string.match(/(?:attr|act|roll)_(.+)/);
|
||
match.shift();
|
||
return match[0];
|
||
};
|
||
|
||
/**
|
||
* Capitalize each word in a string
|
||
* @param {string} string
|
||
* @returns {string}
|
||
*/
|
||
const capitalize = function(string){
|
||
return string.replace(/(?:^|\s+|\/)[a-z]/ig,(letter)=>letter.toUpperCase());
|
||
};
|
||
|
||
/**
|
||
* Extracts a roll query result for use in later functions. Must be awaited as per [startRoll documentation](https://wiki.roll20.net/Sheet_Worker_Scripts#Roll_Parsing.28NEW.29).
|
||
* @param {string} query - The query should be just the text as the `?{` and `}` at the start/end of the query are added by the function.
|
||
* @returns {string}
|
||
*/
|
||
const extractQueryResult = async function(query){
|
||
debug('entering extractQueryResult');
|
||
let queryRoll = await startRoll(`!{{query=[[0[response=?{${query}}]]]}}`);
|
||
finishRoll(queryRoll.rollId);
|
||
return queryRoll.results.query.expression.replace(/^.+?response=|\]$/g,'');
|
||
};
|
||
|
||
/**
|
||
* Simulates a query for ensuring that async/await works correctly in the sheetworker environment when doing conditional startRolls. E.g. if you have an if/else and only one of the conditions results in `startRoll` being called (and thus an `await`), the sheetworker environment would normally crash. Awaiting this in the condition that does not actually need to call `startRoll` will keep the environment in sync.
|
||
* @param {string|number|undefined|null} value
|
||
* @returns {string}
|
||
*/
|
||
const pseudoQuery = async function(value){
|
||
debug('entering pseudoQuery');
|
||
let queryRoll = await startRoll(`!{{query=[[0[response=${value}]]]}}`);
|
||
finishRoll(queryRoll.rollId);
|
||
return queryRoll.results.query.expression.replace(/^.+?response=|\]$/g,'');
|
||
};
|
||
|
||
//# Utility Functions #
|
||
/**
|
||
* An alias for console.log.
|
||
* @param {string|object|Array} msg - The message can be straight string or an object. If it is an object, the object will be broken down so that each key is used as a label to output followed by the value of that key. If the value of the key is an object or array, it will be output via console.table.
|
||
* @returns {void}
|
||
*/
|
||
const log = function(msg){
|
||
if(typeof msg === 'string'){
|
||
console.log(`%c${sheetName} log| ${msg}`,"background-color:#159ccf");
|
||
}else if(typeof msg === 'object'){
|
||
Object.keys(msg).forEach((m)=>{
|
||
if(typeof msg[m] === 'string'){
|
||
console.log(`%c${sheetName} log| ${m}: ${msg[m]}`,"background-color:#159ccf");
|
||
}else{
|
||
console.log(`%c${sheetName} log| ${typeof msg[m]} ${m}`,"background-color:#159ccf");
|
||
console.table(msg[m]);
|
||
}
|
||
});
|
||
}
|
||
};
|
||
/**
|
||
* Alias for console.log that only triggers when debug mode is enabled or when the sheet's version is `0`.
|
||
* @param {string|object|Array} msg - See {@link log}.
|
||
* @param {boolean|string|number} [force=false] - Pass as a truthy value to force the debug output to be output to the console regardless of debug mode.
|
||
* @returns {void}
|
||
*/
|
||
const debug = function(msg,force){
|
||
if(!debugMode && !force && version > 0) return;
|
||
if(typeof msg === 'string'){
|
||
console.log(`%c${sheetName} DEBUG| ${msg}`,"background-color:tan;color:red;");
|
||
}else if(typeof msg === 'object'){
|
||
Object.keys(msg).forEach((m)=>{
|
||
if(typeof msg[m] === 'string'){
|
||
console.log(`%c${sheetName} DEBUG| ${m}: ${msg[m]}`,"background-color:tan;color:red;");
|
||
}else{
|
||
console.log(`%c${sheetName} DEBUG| ${typeof msg[m]} ${m}`,"background-color:tan;color:red;font-weight:bold;");
|
||
console.table(msg[m]);
|
||
}
|
||
});
|
||
}
|
||
};
|
||
|
||
//Section ordering
|
||
//orders the section id arrays to match the repOrder attribute
|
||
/**
|
||
* Orders the section id arrays to match the repOrder attribute
|
||
* @param {attributesProxy} attributes - An instance of the {@link attributesProxy}.
|
||
* @param {sectionObj} sections - Array of details about a section to get the IDs for and attributes that need to be gotten.
|
||
* @returns {void}
|
||
*/
|
||
const orderSections = function(attributes,sections){
|
||
Object.keys(sections).forEach((section)=>{
|
||
attributes.attributes[`_reporder_${section}`] = commaArray(attributes[`_reporder_${section}`]);
|
||
orderSection(attributes.attributes[`_reporder_${section}`],sections[section]);
|
||
});
|
||
};
|
||
|
||
//
|
||
/**
|
||
* Orders a single ID array
|
||
* @param {string[]} repOrder - Array of IDs in the order they are in on the sheet.
|
||
* @param {string[]} IDs - Array of IDs to be ordered
|
||
* @returns {void}
|
||
*/
|
||
const orderSection = function(repOrder,IDs=[]){
|
||
IDs.sort((a,b)=>{
|
||
return repOrder.indexOf(a.toLowerCase()) - repOrder.indexOf(b.toLowerCase());
|
||
});
|
||
};
|
||
|
||
//splits a comma delimited string into an array
|
||
/**
|
||
* Description
|
||
* @param {string} [string='']
|
||
* @returns {string[]}
|
||
*/
|
||
const commaArray = function(string=''){
|
||
return string.toLowerCase().split(/\s*,\s*/);
|
||
};
|
||
|
||
//
|
||
/**
|
||
* Creates a custom rowID which can be useful for complex repeating section creation.
|
||
* @param {string} string - The string to replace the beginning of the ID with
|
||
* @param {string} [rowID] - a rowID to modify. If not passed, a new ID is generated.
|
||
* @returns {string}
|
||
*/
|
||
const generateCustomID = function(string,rowID){
|
||
if(!string.startsWith('-')){
|
||
string = `-${string}`;
|
||
}
|
||
rowID = rowID || generateRowID();
|
||
let re = new RegExp(`^.{${string.length}}`);
|
||
return `${string}${rowID.replace(re,'')}`;
|
||
};
|
||
|
||
const repeatingSectionDetails = [{"section":"repeating_skill","fields":["name","path","action","specialty","rating"]},{"section":"repeating_injury","fields":["display_state","collapse","affected","type","name","effect"]},{"section":"repeating_deed","fields":["display_state","hide","type","name","completed"]},{"section":"repeating_path","fields":["display_state","master_id","collapse","type","name","status","condition","skill","description","tags","rating","group","access","obligation","obligation_status"]},{"section":"repeating_calling","fields":["level","display_state","master_id","collapse","rating","name","rating_max","clash_action","active","clash_stat_2","clash_stat_1","description"]},{"section":"repeating_purview","fields":["display_state","master_id","collapse","name","description","cost","duration","subject","range","action","clash_stat_1","clash_stat_2","clash_action","clash_defense_1","clash_defense_2"]},{"section":"repeating_birthright","fields":["display_state","collapse","name","rating","variety","tag","deed","purview","motif","enhancement","knack","flaw","skills","benefit","stunt","calling","title","archetype"]},{"section":"repeating_equipment","fields":["display_state","collapse","name","tag","description"]},{"section":"repeating_quality","fields":["display_state","collapse","name","cost","duration","subject","range","action","cooldown","description"]},{"section":"repeating_flair","fields":["display_state","collapse","name","cost","duration","subject","range","action","cooldown","description"]},{"section":"repeating_extra","fields":["display_state","collapse","name","cost","duration","subject","range","action","cooldown","description"]}];
|
||
|
||
const cascades = {"attr_template_start":{"name":"template_start","type":"hidden","defaultValue":"@{whisper}&{template:storypath} {{footer=@{character_name}}} {{character_id=@{character_id}}} {{system=@{system}}}","triggeredFuncs":[],"affects":[]},"attr_sheet_state":{"name":"sheet_state","type":"hidden","defaultValue":"settings","triggeredFuncs":[],"affects":[]},"attr_collapsed":{"name":"collapsed","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_drop_name":{"listenerFunc":"handleCompendiumDrop","name":"drop_name","listener":"change:drop_name","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_drop_data":{"name":"drop_data","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_nav-all":{"listenerFunc":"navigateSheet","name":"nav-all","listener":"clicked:nav-all","type":"action"},"act_nav-general":{"listenerFunc":"navigateSheet","name":"nav-general","listener":"clicked:nav-general","type":"action"},"act_nav-powers":{"listenerFunc":"navigateSheet","name":"nav-powers","listener":"clicked:nav-powers","type":"action"},"act_nav-antagonist":{"listenerFunc":"navigateSheet","name":"nav-antagonist","listener":"clicked:nav-antagonist","type":"action"},"act_nav-gm_screen":{"listenerFunc":"navigateSheet","name":"nav-gm_screen","listener":"clicked:nav-gm_screen","type":"action"},"act_nav-party_screen":{"listenerFunc":"navigateSheet","name":"nav-party_screen","listener":"clicked:nav-party_screen","type":"action"},"act_nav-settings":{"listenerFunc":"navigateSheet","name":"nav-settings","listener":"clicked:nav-settings","type":"action"},"attr_system":{"triggeredFuncs":["setupSystem","clashBasis"],"name":"system","listener":"change:system","listenerFunc":"accessSheet","type":"select","defaultValue":"scion-origin","affects":[]},"attr_sheet_type":{"triggeredFuncs":["styleCharacterType"],"name":"sheet_type","listener":"change:sheet_type","listenerFunc":"accessSheet","type":"select","defaultValue":"character","affects":[]},"attr_target_number":{"name":"target_number","type":"number","defaultValue":"8","triggeredFuncs":[],"affects":[]},"attr_again":{"name":"again","type":"number","defaultValue":"10","triggeredFuncs":[],"affects":[]},"attr_difficulty_query":{"name":"difficulty_query","type":"select","defaultValue":"off","triggeredFuncs":[],"affects":[]},"attr_enhancement_query":{"name":"enhancement_query","type":"select","defaultValue":"off","triggeredFuncs":[],"affects":[]},"attr_whisper":{"name":"whisper","type":"select","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_character_name":{"triggeredFuncs":["setActionCalls"],"name":"character_name","listener":"change:character_name","listenerFunc":"accessSheet","type":"text","defaultValue":"","affects":[]},"attr_player":{"name":"player","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_chronicle":{"name":"chronicle","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_parent":{"name":"parent","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_momentum":{"listenerFunc":"expandHeader","name":"momentum","listener":"clicked:momentum","type":"action"},"attr_momentum":{"name":"momentum","type":"select","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_legend":{"name":"legend","type":"select","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_legend_max":{"name":"legend_max","type":"select","defaultValue":0,"triggeredFuncs":[null],"affects":[],"listener":"change:legend_max","listenerFunc":"accessSheet"},"act_virtue":{"listenerFunc":"expandHeader","name":"virtue","listener":"clicked:virtue","type":"action"},"attr_virtue_1":{"name":"virtue_1","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_virtue":{"name":"virtue","type":"select","defaultValue":-2,"triggeredFuncs":[],"affects":[]},"attr_virtue_2":{"name":"virtue_2","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_skills":{"listenerFunc":"expandHeader","name":"skills","listener":"clicked:skills","type":"action"},"attr_repeating_skill_$X_name":{"name":"repeating_skill_$X_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_skill_$X_path":{"name":"repeating_skill_$X_path","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"act_repeating_skill_$X_action":{"listenerFunc":"rollTask","name":"repeating_skill_$X_action","listener":"clicked:repeating_skill:action","type":"action"},"attr_repeating_skill_$X_action":{"name":"repeating_skill_$X_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_skill_$X_specialty":{"name":"repeating_skill_$X_specialty","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_skill_$X_rating":{"name":"repeating_skill_$X_rating","type":"select","defaultValue":0,"triggeredFuncs":["calculateMovement"],"affects":[],"listener":"change:repeating_skill:rating","listenerFunc":"accessSheet"},"act_attributes":{"listenerFunc":"expandHeader","name":"attributes","listener":"clicked:attributes","type":"action"},"act_intellect-action":{"listenerFunc":"rollTask","name":"intellect-action","listener":"clicked:intellect-action","type":"action"},"attr_intellect_action":{"name":"intellect_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_intellect":{"name":"intellect","type":"select","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_might-action":{"listenerFunc":"rollTask","name":"might-action","listener":"clicked:might-action","type":"action"},"attr_might_action":{"name":"might_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_might":{"name":"might","type":"select","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_presence-action":{"listenerFunc":"rollTask","name":"presence-action","listener":"clicked:presence-action","type":"action"},"attr_presence_action":{"name":"presence_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_presence":{"name":"presence","type":"select","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_cunning-action":{"listenerFunc":"rollTask","name":"cunning-action","listener":"clicked:cunning-action","type":"action"},"attr_cunning_action":{"name":"cunning_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_cunning":{"name":"cunning","type":"select","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_dexterity-action":{"listenerFunc":"rollTask","name":"dexterity-action","listener":"clicked:dexterity-action","type":"action"},"attr_dexterity_action":{"name":"dexterity_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_dexterity":{"name":"dexterity","type":"select","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_manipulation-action":{"listenerFunc":"rollTask","name":"manipulation-action","listener":"clicked:manipulation-action","type":"action"},"attr_manipulation_action":{"name":"manipulation_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_manipulation":{"name":"manipulation","type":"select","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_resolve-action":{"listenerFunc":"rollTask","name":"resolve-action","listener":"clicked:resolve-action","type":"action"},"attr_resolve_action":{"name":"resolve_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_resolve":{"name":"resolve","type":"select","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_stamina-action":{"listenerFunc":"rollTask","name":"stamina-action","listener":"clicked:stamina-action","type":"action"},"attr_stamina_action":{"name":"stamina_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_stamina":{"name":"stamina","type":"select","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_composure-action":{"listenerFunc":"rollTask","name":"composure-action","listener":"clicked:composure-action","type":"action"},"attr_composure_action":{"name":"composure_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_composure":{"name":"composure","type":"select","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_health":{"listenerFunc":"expandHeader","name":"health","listener":"clicked:health","type":"action"},"act_add-injury":{"listenerFunc":"sectionInteract","name":"add-injury","listener":"clicked:add-injury","type":"action"},"act_edit-injury":{"listenerFunc":"sectionInteract","name":"edit-injury","listener":"clicked:edit-injury","type":"action"},"attr_movement_dice":{"name":"movement_dice","type":"number","defaultValue":"1","triggeredFuncs":[],"affects":[]},"act_movement-dice-action":{"listenerFunc":"singleAttributeRoll","name":"movement-dice-action","listener":"clicked:movement-dice-action","type":"action"},"attr_movement_dice_action":{"name":"movement_dice_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_defense":{"name":"defense","type":"number","defaultValue":"1","triggeredFuncs":[],"affects":[]},"act_defense-action":{"listenerFunc":"singleAttributeRoll","name":"defense-action","listener":"clicked:defense-action","type":"action"},"attr_defense_action":{"name":"defense_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_injury_$X_display_state":{"name":"repeating_injury_$X_display_state","type":"hidden","defaultValue":"bruised","triggeredFuncs":[],"affects":[]},"attr_repeating_injury_$X_collapse":{"name":"repeating_injury_$X_collapse","type":"hidden","defaultValue":"0","triggeredFuncs":["collapseSection"],"affects":[],"listener":"change:repeating_injury:collapse","listenerFunc":"accessSheet"},"attr_repeating_injury_$X_affected":{"name":"repeating_injury_$X_affected","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_injury_$X_type":{"name":"repeating_injury_$X_type","type":"select","defaultValue":"bruised","triggeredFuncs":[],"affects":[]},"attr_repeating_injury_$X_name":{"name":"repeating_injury_$X_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_injury_$X_effect":{"name":"repeating_injury_$X_effect","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_deeds":{"listenerFunc":"expandHeader","name":"deeds","listener":"clicked:deeds","type":"action"},"act_add-deed":{"listenerFunc":"sectionInteract","name":"add-deed","listener":"clicked:add-deed","type":"action"},"act_edit-deed":{"listenerFunc":"sectionInteract","name":"edit-deed","listener":"clicked:edit-deed","type":"action"},"attr_experience_used":{"affects":["experience_remaining"],"name":"experience_used","listener":"change:experience_used","listenerFunc":"accessSheet","type":"number","defaultValue":"","triggeredFuncs":[]},"attr_experience_earned":{"affects":["experience_remaining"],"name":"experience_earned","listener":"change:experience_earned","listenerFunc":"accessSheet","type":"number","defaultValue":"","triggeredFuncs":[]},"attr_experience_remaining":{"calculation":"calcXP","name":"experience_remaining","type":"number","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_deed_$X_display_state":{"name":"repeating_deed_$X_display_state","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_repeating_deed_$X_collapse":{"listenerFunc":"expandHeader","name":"repeating_deed_$X_collapse","listener":"clicked:repeating_deed:collapse","type":"action"},"attr_repeating_deed_$X_hide":{"name":"repeating_deed_$X_hide","type":"checkbox","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_deed_$X_type":{"name":"repeating_deed_$X_type","type":"select","defaultValue":"short","triggeredFuncs":[],"affects":[]},"attr_repeating_deed_$X_name":{"name":"repeating_deed_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_deed_$X_completed":{"triggeredFuncs":["orderDeeds"],"name":"repeating_deed_$X_completed","listener":"change:repeating_deed:completed","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"act_paths":{"listenerFunc":"expandHeader","name":"paths","listener":"clicked:paths","type":"action"},"act_add-path":{"listenerFunc":"sectionInteract","name":"add-path","listener":"clicked:add-path","type":"action"},"act_edit-path":{"listenerFunc":"sectionInteract","name":"edit-path","listener":"clicked:edit-path","type":"action"},"fieldset_repeating_path":{"listener":"remove:repeating_path","listenerFunc":"clearChildItems","name":"repeating_path","type":"fieldset"},"attr_repeating_path_$X_display_state":{"name":"repeating_path_$X_display_state","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_master_id":{"name":"repeating_path_$X_master_id","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_collapse":{"name":"repeating_path_$X_collapse","type":"hidden","defaultValue":"0","triggeredFuncs":["collapseSection"],"affects":[],"listener":"change:repeating_path:collapse","listenerFunc":"accessSheet"},"attr_repeating_path_$X_type":{"name":"repeating_path_$X_type","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_name":{"name":"repeating_path_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_status":{"name":"repeating_path_$X_status","type":"select","defaultValue":"available","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_condition":{"name":"repeating_path_$X_condition","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_skill":{"name":"repeating_path_$X_skill","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_description":{"name":"repeating_path_$X_description","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_tags":{"name":"repeating_path_$X_tags","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_rating":{"name":"repeating_path_$X_rating","type":"select","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_group":{"name":"repeating_path_$X_group","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_access":{"name":"repeating_path_$X_access","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_obligation":{"name":"repeating_path_$X_obligation","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_path_$X_obligation_status":{"name":"repeating_path_$X_obligation_status","type":"select","defaultValue":"pending","triggeredFuncs":[],"affects":[]},"act_repeating_path_$X_add-contact":{"listenerFunc":"addSubsection","name":"repeating_path_$X_add-contact","listener":"clicked:repeating_path:add-contact","type":"action"},"act_repeating_path_$X_add-group":{"listenerFunc":"addSubsection","name":"repeating_path_$X_add-group","listener":"clicked:repeating_path:add-group","type":"action"},"act_repeating_path_$X_add-access":{"listenerFunc":"addSubsection","name":"repeating_path_$X_add-access","listener":"clicked:repeating_path:add-access","type":"action"},"act_repeating_path_$X_add-obligation":{"listenerFunc":"addSubsection","name":"repeating_path_$X_add-obligation","listener":"clicked:repeating_path:add-obligation","type":"action"},"act_calling":{"listenerFunc":"expandHeader","name":"calling","listener":"clicked:calling","type":"action"},"act_add-calling":{"listenerFunc":"sectionInteract","name":"add-calling","listener":"clicked:add-calling","type":"action"},"act_edit-calling":{"listenerFunc":"sectionInteract","name":"edit-calling","listener":"clicked:edit-calling","type":"action"},"fieldset_repeating_calling":{"listener":"remove:repeating_calling","listenerFunc":"clearChildItems","name":"repeating_calling","type":"fieldset"},"attr_repeating_calling_$X_level":{"name":"repeating_calling_$X_level","type":"hidden","defaultValue":"mortal","triggeredFuncs":[],"affects":[]},"attr_repeating_calling_$X_display_state":{"name":"repeating_calling_$X_display_state","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_calling_$X_master_id":{"name":"repeating_calling_$X_master_id","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_calling_$X_collapse":{"name":"repeating_calling_$X_collapse","type":"hidden","defaultValue":"0","triggeredFuncs":["collapseSection"],"affects":[],"listener":"change:repeating_calling:collapse","listenerFunc":"accessSheet"},"attr_repeating_calling_$X_rating":{"name":"repeating_calling_$X_rating","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_calling_$X_name":{"name":"repeating_calling_$X_name","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_calling_$X_rating_max":{"name":"repeating_calling_$X_rating_max","type":"select","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_repeating_calling_$X_clash-action":{"listenerFunc":"rollClash","name":"repeating_calling_$X_clash-action","listener":"clicked:repeating_calling:clash-action","type":"action"},"attr_repeating_calling_$X_clash_action":{"name":"repeating_calling_$X_clash_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_calling_$X_active":{"triggeredFuncs":["sumActiveCallings"],"name":"repeating_calling_$X_active","listener":"change:repeating_calling:active","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_repeating_calling_$X_clash_stat_2":{"triggeredFuncs":["sumActiveCallings","clashBasis"],"name":"repeating_calling_$X_clash_stat_2","listener":"change:repeating_calling:clash_stat_2","listenerFunc":"accessSheet","type":"hidden","defaultValue":"rating","affects":[]},"attr_repeating_calling_$X_clash_stat_1":{"name":"repeating_calling_$X_clash_stat_1","type":"hidden","defaultValue":"select","triggeredFuncs":[],"affects":[]},"attr_repeating_calling_$X_description":{"name":"repeating_calling_$X_description","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_repeating_calling_$X_add-knack":{"listenerFunc":"addSubsection","name":"repeating_calling_$X_add-knack","listener":"clicked:repeating_calling:add-knack","type":"action"},"act_purview":{"listenerFunc":"expandHeader","name":"purview","listener":"clicked:purview","type":"action"},"act_add-purview":{"listenerFunc":"sectionInteract","name":"add-purview","listener":"clicked:add-purview","type":"action"},"act_edit-purview":{"listenerFunc":"sectionInteract","name":"edit-purview","listener":"clicked:edit-purview","type":"action"},"fieldset_repeating_purview":{"listener":"remove:repeating_purview","listenerFunc":"clearChildItems","name":"repeating_purview","type":"fieldset"},"attr_repeating_purview_$X_display_state":{"name":"repeating_purview_$X_display_state","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_master_id":{"name":"repeating_purview_$X_master_id","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_collapse":{"name":"repeating_purview_$X_collapse","type":"hidden","defaultValue":"0","triggeredFuncs":["collapseSection"],"affects":[],"listener":"change:repeating_purview:collapse","listenerFunc":"accessSheet"},"attr_repeating_purview_$X_name":{"name":"repeating_purview_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_description":{"name":"repeating_purview_$X_description","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_cost":{"name":"repeating_purview_$X_cost","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_duration":{"name":"repeating_purview_$X_duration","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_subject":{"name":"repeating_purview_$X_subject","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_range":{"name":"repeating_purview_$X_range","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_action":{"name":"repeating_purview_$X_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_clash_stat_1":{"name":"repeating_purview_$X_clash_stat_1","type":"hidden","defaultValue":"select","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_clash_stat_2":{"name":"repeating_purview_$X_clash_stat_2","type":"hidden","defaultValue":"select","triggeredFuncs":[],"affects":[]},"act_repeating_purview_$X_clash-action":{"listenerFunc":"rollClash","name":"repeating_purview_$X_clash-action","listener":"clicked:repeating_purview:clash-action","type":"action"},"attr_repeating_purview_$X_clash_action":{"name":"repeating_purview_$X_clash_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_clash_defense_1":{"name":"repeating_purview_$X_clash_defense_1","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_purview_$X_clash_defense_2":{"name":"repeating_purview_$X_clash_defense_2","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_repeating_purview_$X_add-boon":{"listenerFunc":"addSubsection","name":"repeating_purview_$X_add-boon","listener":"clicked:repeating_purview:add-boon","type":"action"},"act_birthrights":{"listenerFunc":"expandHeader","name":"birthrights","listener":"clicked:birthrights","type":"action"},"act_edit-birthright":{"listenerFunc":"sectionInteract","name":"edit-birthright","listener":"clicked:edit-birthright","type":"action"},"attr_legendary_title":{"name":"legendary_title","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_display_state":{"name":"repeating_birthright_$X_display_state","type":"radio","defaultValue":"short-relic","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_collapse":{"name":"repeating_birthright_$X_collapse","type":"hidden","defaultValue":"0","triggeredFuncs":["collapseSection"],"affects":[],"listener":"change:repeating_birthright:collapse","listenerFunc":"accessSheet"},"attr_repeating_birthright_$X_name":{"name":"repeating_birthright_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_rating":{"name":"repeating_birthright_$X_rating","type":"select","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_variety":{"name":"repeating_birthright_$X_variety","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_tag":{"name":"repeating_birthright_$X_tag","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_deed":{"name":"repeating_birthright_$X_deed","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_purview":{"name":"repeating_birthright_$X_purview","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_motif":{"name":"repeating_birthright_$X_motif","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_enhancement":{"name":"repeating_birthright_$X_enhancement","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_knack":{"name":"repeating_birthright_$X_knack","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_flaw":{"name":"repeating_birthright_$X_flaw","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_skills":{"name":"repeating_birthright_$X_skills","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_benefit":{"name":"repeating_birthright_$X_benefit","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_stunt":{"name":"repeating_birthright_$X_stunt","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_calling":{"name":"repeating_birthright_$X_calling","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_title":{"name":"repeating_birthright_$X_title","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_birthright_$X_archetype":{"name":"repeating_birthright_$X_archetype","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_add-birthright-creature":{"listenerFunc":"addSubsection","name":"add-birthright-creature","listener":"clicked:add-birthright-creature","type":"action"},"act_add-birthright-follower":{"listenerFunc":"addSubsection","name":"add-birthright-follower","listener":"clicked:add-birthright-follower","type":"action"},"act_add-birthright-guide":{"listenerFunc":"addSubsection","name":"add-birthright-guide","listener":"clicked:add-birthright-guide","type":"action"},"act_add-birthright-relic":{"listenerFunc":"addSubsection","name":"add-birthright-relic","listener":"clicked:add-birthright-relic","type":"action"},"act_equipment":{"listenerFunc":"expandHeader","name":"equipment","listener":"clicked:equipment","type":"action"},"act_add-equipment":{"listenerFunc":"sectionInteract","name":"add-equipment","listener":"clicked:add-equipment","type":"action"},"act_edit-equipment":{"listenerFunc":"sectionInteract","name":"edit-equipment","listener":"clicked:edit-equipment","type":"action"},"attr_repeating_equipment_$X_display_state":{"name":"repeating_equipment_$X_display_state","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_equipment_$X_collapse":{"name":"repeating_equipment_$X_collapse","type":"hidden","defaultValue":"0","triggeredFuncs":["collapseSection"],"affects":[],"listener":"change:repeating_equipment:collapse","listenerFunc":"accessSheet"},"attr_repeating_equipment_$X_name":{"name":"repeating_equipment_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_equipment_$X_tag":{"name":"repeating_equipment_$X_tag","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_equipment_$X_description":{"name":"repeating_equipment_$X_description","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_notes":{"listenerFunc":"expandHeader","name":"notes","listener":"clicked:notes","type":"action"},"attr_notes":{"name":"notes","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_archetype_symbol":{"name":"archetype_symbol","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_archetype":{"name":"archetype","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_drive":{"name":"drive","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_primary_pool":{"name":"primary_pool","type":"number","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_primary-pool-action":{"listenerFunc":"singleAttributeRoll","name":"primary-pool-action","listener":"clicked:primary-pool-action","type":"action"},"attr_primary_pool_action":{"name":"primary_pool_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_primary_actions":{"name":"primary_actions","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_secondary_pool":{"name":"secondary_pool","type":"number","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_secondary-pool-action":{"listenerFunc":"singleAttributeRoll","name":"secondary-pool-action","listener":"clicked:secondary-pool-action","type":"action"},"attr_secondary_pool_action":{"name":"secondary_pool_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_secondary_actions":{"name":"secondary_actions","type":"text","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_desperation_pool":{"name":"desperation_pool","type":"number","defaultValue":1,"triggeredFuncs":[],"affects":[]},"act_desperation-pool-action":{"listenerFunc":"singleAttributeRoll","name":"desperation-pool-action","listener":"clicked:desperation-pool-action","type":"action"},"attr_desperation_pool_action":{"name":"desperation_pool_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_health":{"name":"health","type":"number","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_initiative":{"name":"initiative","type":"number","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_initiative-action":{"listenerFunc":"singleAttributeRoll","name":"initiative-action","listener":"clicked:initiative-action","type":"action"},"attr_initiative_action":{"name":"initiative_action","type":"hidden","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_quality_$X_display_state":{"name":"repeating_quality_$X_display_state","type":"radio","defaultValue":"short-quality","triggeredFuncs":[],"affects":[]},"attr_repeating_quality_$X_collapse":{"triggeredFuncs":["collapseSection"],"name":"repeating_quality_$X_collapse","listener":"change:repeating_quality:collapse","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_repeating_quality_$X_name":{"name":"repeating_quality_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_quality_$X_cost":{"name":"repeating_quality_$X_cost","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_quality_$X_duration":{"name":"repeating_quality_$X_duration","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_quality_$X_subject":{"name":"repeating_quality_$X_subject","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_quality_$X_range":{"name":"repeating_quality_$X_range","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_quality_$X_action":{"name":"repeating_quality_$X_action","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_quality_$X_cooldown":{"name":"repeating_quality_$X_cooldown","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_quality_$X_description":{"name":"repeating_quality_$X_description","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_add-quality":{"listenerFunc":"sectionInteract","name":"add-quality","listener":"clicked:add-quality","type":"action"},"act_edit-quality":{"listenerFunc":"sectionInteract","name":"edit-quality","listener":"clicked:edit-quality","type":"action"},"attr_repeating_flair_$X_display_state":{"name":"repeating_flair_$X_display_state","type":"radio","defaultValue":"short-flair","triggeredFuncs":[],"affects":[]},"attr_repeating_flair_$X_collapse":{"triggeredFuncs":["collapseSection"],"name":"repeating_flair_$X_collapse","listener":"change:repeating_flair:collapse","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_repeating_flair_$X_name":{"name":"repeating_flair_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_flair_$X_cost":{"name":"repeating_flair_$X_cost","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_flair_$X_duration":{"name":"repeating_flair_$X_duration","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_flair_$X_subject":{"name":"repeating_flair_$X_subject","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_flair_$X_range":{"name":"repeating_flair_$X_range","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_flair_$X_action":{"name":"repeating_flair_$X_action","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_flair_$X_cooldown":{"name":"repeating_flair_$X_cooldown","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_flair_$X_description":{"name":"repeating_flair_$X_description","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_add-flair":{"listenerFunc":"sectionInteract","name":"add-flair","listener":"clicked:add-flair","type":"action"},"act_edit-flair":{"listenerFunc":"sectionInteract","name":"edit-flair","listener":"clicked:edit-flair","type":"action"},"attr_repeating_extra_$X_display_state":{"name":"repeating_extra_$X_display_state","type":"radio","defaultValue":"short-extra","triggeredFuncs":[],"affects":[]},"attr_repeating_extra_$X_collapse":{"triggeredFuncs":["collapseSection"],"name":"repeating_extra_$X_collapse","listener":"change:repeating_extra:collapse","listenerFunc":"accessSheet","type":"checkbox","defaultValue":0,"affects":[]},"attr_repeating_extra_$X_name":{"name":"repeating_extra_$X_name","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_extra_$X_cost":{"name":"repeating_extra_$X_cost","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_extra_$X_duration":{"name":"repeating_extra_$X_duration","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_extra_$X_subject":{"name":"repeating_extra_$X_subject","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_extra_$X_range":{"name":"repeating_extra_$X_range","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_extra_$X_action":{"name":"repeating_extra_$X_action","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_extra_$X_cooldown":{"name":"repeating_extra_$X_cooldown","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"attr_repeating_extra_$X_description":{"name":"repeating_extra_$X_description","type":"span","defaultValue":"","triggeredFuncs":[],"affects":[]},"act_add-extra":{"listenerFunc":"sectionInteract","name":"add-extra","listener":"clicked:add-extra","type":"action"},"act_edit-extra":{"listenerFunc":"sectionInteract","name":"edit-extra","listener":"clicked:edit-extra","type":"action"},"attr_tension":{"name":"tension","type":"select","defaultValue":0,"triggeredFuncs":[],"affects":[]},"attr_party_momentum":{"name":"party_momentum","type":"select","defaultValue":0,"triggeredFuncs":[],"affects":[]}};
|
||
|
||
const actionAttributes = ["repeating_skill_$x_action","intellect_action","might_action","presence_action","cunning_action","dexterity_action","manipulation_action","resolve_action","stamina_action","composure_action","movement_dice_action","defense_action","repeating_calling_$x_clash_action","repeating_purview_$x_clash_action","primary_pool_action","secondary_pool_action","desperation_pool_action","initiative_action"];
|
||
|
||
const inlineFieldsets = ["quality","flair","extra"];
|
||
/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
//Sheet Variables
|
||
const sheetName = 'Storypath';
|
||
const version = 1;
|
||
let debugMode = false;
|
||
const sectionDisplays = {
|
||
general:['section-skills','section-attributes','section-equipment','section-notes','section-deeds'],
|
||
powers:['section-paths','section-calling','section-purview','section-birthrights']
|
||
};
|
||
sectionDisplays.all = Object.entries(sectionDisplays).reduce((arr,[prop,sections])=>[...arr,...sections],[]);
|
||
|
||
const navDisplays = {
|
||
antagonist:{show:['antagonist'],hide:['all','general','powers','gm_screen','party_screen']},
|
||
character:{show:['all','general','powers'],hide:['antagonist','gm_screen','party_screen']},
|
||
gm_screen:{show:['gm_screen'],hide:['all','general','powers','antagonist','party_screen']},
|
||
party_screen:{show:['party_screen'],hide:['all','general','powers','antagonist','gm_screen']}
|
||
};
|
||
|
||
const generalSections = ['skills','attributes','equipment','notes','deeds'];
|
||
const powerSections = ['paths','calling','purview','birthrights'];
|
||
//Object that defines how the attributes affect each other
|
||
const complexRepeatingSections = ['repeating_calling','repeating_path','repeating_purview'];
|
||
const collapsibleMasters = ['repeating_path','repeating_purview'];
|
||
const systemDefaults = {
|
||
'scion-origin':{
|
||
repeating_skill:{field:'name',additional:false,values:['academics','athletics','close combat','culture','empathy','firearms','integrity','leadership','medicine','occult','persuasion','pilot','science','subterfuge','survival','technology']},
|
||
repeating_path:{field:'display_state',values:['master','add-detail'],additional:true},
|
||
repeating_calling:{field:'display_state',values:['master','add-detail'],additional:true},
|
||
repeating_deed:{field:'type',values:['short','long','band'],additional:true},
|
||
repeating_injury:{field:'type',values:['taken out'],additional:true},
|
||
repeating_equipment:{number:0,field:'display_state',values:['equipment'],additional:true},
|
||
repeating_quality:{number:0,field:'name',values:[''],additional:true},
|
||
repeating_flair:{number:0,field:'name',values:[''],additional:true},
|
||
repeating_extra:{number:0,field:'name',values:[''],additional:true},
|
||
attributes:['intellect','cunning','resolve','might','dexterity','stamina','presence','manipulation','composure'],
|
||
clashStats:['intellect','cunning','resolve','might','dexterity','stamina','presence','manipulation','composure']
|
||
},
|
||
'scion-hero':{
|
||
repeating_skill:{field:'name',additional:false,values:['academics','athletics','close combat','culture','empathy','firearms','integrity','leadership','medicine','occult','persuasion','pilot','science','subterfuge','survival','technology']},
|
||
repeating_path:{field:'display_state',values:['master','add-detail'],additional:true},
|
||
repeating_calling:{field:'display_state',values:['master','add-detail'],additional:true},
|
||
repeating_deed:{field:'display_state',values:['short','long','band'],additional:true},
|
||
repeating_injury:{field:'type',values:['taken out'],additional:true},
|
||
repeating_purview:{field:'display_state',values:['master','add-detail'],additional:true},
|
||
repeating_birthright:{number:0,additional:true},
|
||
repeating_equipment:{number:0,field:'display_state',values:['equipment'],additional:true},
|
||
repeating_quality:{number:0,field:'name',values:[''],additional:true},
|
||
repeating_flair:{number:0,field:'name',values:[''],additional:true},
|
||
repeating_extra:{number:0,field:'name',values:[''],additional:true},
|
||
attributes:['intellect','cunning','resolve','might','dexterity','stamina','presence','manipulation','composure'],
|
||
clashStats:['legend','intellect','cunning','resolve','might','dexterity','stamina','presence','manipulation','composure']
|
||
}
|
||
};
|
||
|
||
const systems = ['scion-origin','scion-hero'];
|
||
const repeatMonitor = [];
|
||
const listeners = {};
|
||
const baseGet = Object.entries(cascades).reduce((memo,[attrName,detailObj])=>{
|
||
if(!/repeating/.test(attrName) && detailObj.type !== 'action'){
|
||
memo.push(detailObj.name);
|
||
}
|
||
if(detailObj.listener){
|
||
listeners[detailObj.listener] = detailObj.listenerFunc;
|
||
}
|
||
return memo;
|
||
},['sheet_state','section_state','character_name']);/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
//# Attribute Obj Proxy handler
|
||
const createAttrProxy = function(attrs){
|
||
//creates a proxy for the attributes object so that values can be worked with more easily.
|
||
const getCascObj = function(event,casc){
|
||
let typePrefix = event.htmlAttributes ? 'act_' : 'attr_';
|
||
let cascName = `${typePrefix}${event.sourceAttribute}`;
|
||
let cascObj = casc[cascName];
|
||
return cascObj;
|
||
};
|
||
|
||
const triggerFunctions = function(obj,attributes,sections){
|
||
if(obj.triggeredFuncs && obj.triggeredFuncs.length){
|
||
debug(`triggering functions for ${obj.name}`);
|
||
obj.triggeredFuncs && obj.triggeredFuncs.forEach(func=>funcs[func] ?
|
||
funcs[func]({trigger:obj,attributes,sections}) :
|
||
debug(`!!!Warning!!! no function named ${func} found. Triggered function not called for ${obj.name}`,true));
|
||
}
|
||
};
|
||
|
||
const initialFunction = function(obj,attributes,sections){
|
||
if(obj.initialFunc){
|
||
debug(`initial functions for ${obj.name}`);
|
||
funcs[obj.initialFunc] ?
|
||
funcs[obj.initialFunc]({trigger:obj,attributes,sections}) :
|
||
debug(`!!!Warning!!! no function named ${obj.initialFunc} found. Initial function not called for ${obj.name}`,true);
|
||
}
|
||
};
|
||
const processChange = function({event,trigger,attributes,sections,casc}){
|
||
debug({trigger});
|
||
if(event && !trigger){
|
||
debug('initial change detected. No trigger found');
|
||
return;
|
||
}
|
||
if(!attributes || !sections || !casc){
|
||
debug(`!!! Insufficient arguments || attributes > ${!!attributes} | sections > ${!!sections} | casc > ${!!casc} !!!`);
|
||
return;
|
||
}
|
||
//store the queue in attributes.
|
||
if(event){
|
||
debug('checking for initial functions');
|
||
initialFunction(trigger,attributes,sections);//functions that should only be run if the attribute was the thing changed by the user
|
||
}
|
||
if(trigger){
|
||
debug(`processing ${trigger.name}`);
|
||
triggerFunctions(trigger,attributes,sections);
|
||
if(!event && trigger.calculation){
|
||
attributes[trigger.name] = funcs[trigger.calculation]({trigger,attributes,sections});
|
||
}
|
||
if(Array.isArray(trigger.affects)){
|
||
attributes.queue.push(...trigger.affects);
|
||
}
|
||
}
|
||
attributes.set({attributes,sections,casc});
|
||
};
|
||
const attrTarget = {
|
||
updates:{},
|
||
attributes:{...attrs},
|
||
repOrders:{},
|
||
queue: [],
|
||
casc:{},
|
||
processChange,
|
||
triggerFunctions,
|
||
initialFunction,
|
||
getCascObj
|
||
};
|
||
const attrHandler = {
|
||
get:function(obj,prop){//gets the most value of the attribute.
|
||
//If it is a repeating order, returns the array, otherwise returns the update value or the original value
|
||
if(prop === 'set'){
|
||
return function(){
|
||
let {attributes,sections,casc,callback,vocal} = arguments[0] ? arguments[0] : {};
|
||
if(attributes && attributes.queue.length && sections && casc){
|
||
let triggerName = attributes.queue.shift();
|
||
let trigger = getCascObj({sourceAttribute:triggerName},casc);
|
||
attributes.processChange({trigger,attributes,sections,casc});
|
||
}else{
|
||
debug({updates:obj.updates});
|
||
let trueCallback = Object.keys(obj.repOrders).length ?
|
||
function(){
|
||
Object.entries(obj.repOrders).forEach(([section,order])=>{
|
||
_setSectionOrder(section,order,)
|
||
});
|
||
callback && callback();
|
||
}:
|
||
callback;
|
||
Object.keys(obj.updates).forEach((key)=>obj.attributes[key] = obj.updates[key]);
|
||
const update = obj.updates;
|
||
obj.updates = {};
|
||
set(update,vocal,trueCallback);
|
||
}
|
||
}
|
||
}else if(Object.keys(obj).some(key=>key===prop)){
|
||
return Reflect.get(...arguments)
|
||
}else{
|
||
let retValue;
|
||
switch(true){
|
||
case obj.repOrders.hasOwnProperty(prop):
|
||
retValue = obj.repOrders[prop];
|
||
break;
|
||
case obj.updates.hasOwnProperty(prop):
|
||
retValue = obj.updates[prop];
|
||
break;
|
||
default:
|
||
retValue = obj.attributes[prop];
|
||
break;
|
||
}
|
||
let cascRef = `attr_${prop.replace(/(repeating_[^_]+_)[^_]+/,'$1\$x')}`;
|
||
let numRetVal = +retValue;
|
||
if(!Number.isNaN(numRetVal) && retValue !== ''){
|
||
retValue = numRetVal;
|
||
}else if(cascades[cascRef] && typeof cascades[cascRef].defaultValue === 'number'){
|
||
retValue = cascades[cascRef].defaultValue;
|
||
}
|
||
return retValue;
|
||
}
|
||
},
|
||
set:function(obj,prop,value){
|
||
//Sets the value. Also verifies that the value is a valid attribute value
|
||
//e.g. not undefined, null, or NaN
|
||
if(value || value===0 || value===''){
|
||
if(/reporder|^repeating_[^_]+$/.test(prop)){
|
||
let section = prop.replace(/_reporder_/,'');
|
||
obj.repOrders[section] = value;
|
||
}else if(`${obj.attributes}` !== `${value}` ||
|
||
(obj.updates[prop] && `${obj.updates}` !== `${value}`)
|
||
){
|
||
obj.updates[prop] = value;
|
||
}
|
||
}else{
|
||
debug(`!!!Warning: Attempted to set ${prop} to an invalid value:${value}; value not stored!!!`);
|
||
}
|
||
return true;
|
||
},
|
||
deleteProperty(obj,prop){
|
||
//removes the property from the original attributes, updates, and the reporders
|
||
Object.keys(obj).forEach((key)=>{
|
||
delete obj[key][prop.toLowerCase()];
|
||
});
|
||
}
|
||
};
|
||
return new Proxy(attrTarget,attrHandler);
|
||
};
|
||
|
||
const funcs = new Proxy({},{
|
||
set:function(obj,prop,value){
|
||
if(obj[prop]){
|
||
debug(`!!! Duplicate function name for ${prop} !!!`);
|
||
return false;
|
||
}else{
|
||
obj[prop] = value;
|
||
return true;
|
||
}
|
||
},
|
||
get:function(obj,prop){
|
||
return function(){
|
||
debug(`running ${prop}`);
|
||
return obj[prop](...arguments);
|
||
};
|
||
}
|
||
});/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
//Sheet Updaters and styling functions
|
||
const updateHandlers = {};
|
||
const updateSheet = function(){
|
||
log('updating sheet');
|
||
getAllAttrs({props:['sheet_version','debug_mode','collapsed',...baseGet],callback:(attributes,sections,casc)=>{
|
||
debugMode = !!attributes.debug_mode;
|
||
if(!attributes.sheet_version){
|
||
initialSetup(attributes,sections);
|
||
}else{
|
||
Object.entries(updateHandlers).forEach(([ver,handler])=>{
|
||
if(attributes.version < +ver){
|
||
handler({attributes,sections,casc});
|
||
}
|
||
});
|
||
}
|
||
attributes.sheet_version = version;
|
||
log(`Sheet Update applied. Current Sheet Version ${version}`);
|
||
styleOnOpen(attributes,sections);
|
||
setActionCalls({attributes,sections});
|
||
attributes.set();
|
||
log('Sheet ready for use');
|
||
}});
|
||
};
|
||
|
||
const initialSetup = function(attributes,sections){
|
||
debug('Initial sheet setup');
|
||
};
|
||
|
||
//These functions access the sheet and iterate through all changes necessary before calling setAttrs
|
||
const accessSheet = function(event){
|
||
debug({event});
|
||
getAllAttrs({event,callback:(attributes,sections,casc)=>{
|
||
let trigger = attributes.getCascObj(event,casc);
|
||
attributes.processChange({event,trigger,attributes,sections,casc});
|
||
}});
|
||
};
|
||
funcs.accessSheet = accessSheet;/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
/*
|
||
Cascade Expansion functions
|
||
*/
|
||
//Expands the repeating section templates in cascades to reflect the rows actually available
|
||
const expandCascade = function(cascade,sections,attributes){
|
||
return _.keys(cascade).reduce((memo,key)=>{//iterate through cascades and replace references to repeating attributes with correct row ids.
|
||
if(/^(?:act|attr)_repeating_/.test(key)){//If the attribute is a repeating attribute, do special logic
|
||
expandRepeating(memo,key,cascade,sections,attributes);
|
||
}else if(key){//for non repeating attributes do this logic
|
||
expandNormal(memo,key,cascade,sections);
|
||
}
|
||
return memo;
|
||
},{});
|
||
};
|
||
|
||
const expandRepeating = function(memo,key,cascade,sections,attributes){
|
||
key.replace(/((?:attr|act)_)(repeating_[^_]+)_[^_]+?_(.+)/,(match,type,section,field)=>{
|
||
(sections[section]||[]).forEach((id)=>{
|
||
memo[`${type}${section}_${id}_${field}`]=_.clone(cascade[key]);//clone the details so that each row's attributes have correct ids
|
||
memo[`${type}${section}_${id}_${field}`].name = `${section}_${id}_${field}`;
|
||
if(key.startsWith('attr_')){
|
||
memo[`${type}${section}_${id}_${field}`].affects = memo[`${type}${section}_${id}_${field}`].affects.reduce((m,affected)=>{
|
||
if(section === affected){//otherwise if the affected attribute is in the same section, simply set the affected attribute to have the same row id.
|
||
m.push(applyID(affected,id));
|
||
}else if(/repeating/.test(affected)){//If the affected attribute isn't in the same repeating section but is still a repeating attribute, add all the rows of that section
|
||
addAllRows(affected,m,sections);
|
||
}else{//otherwise the affected attribute is a non repeating attribute. Simply add it to the computed affected array
|
||
m.push(affected);
|
||
}
|
||
return m;
|
||
},[]);
|
||
}
|
||
});
|
||
});
|
||
};
|
||
|
||
const applyID = function(affected,id){
|
||
return affected.replace(/(repeating_[^_]+_)[^_]+(.+)/,`$1${id}$2`);
|
||
};
|
||
|
||
const expandNormal = function(memo,key,cascade,sections){
|
||
memo[key] = _.clone(cascade[key]);
|
||
if(key.startsWith('attr_')){
|
||
memo[key].affects = memo[key].affects.reduce((m,a)=>{
|
||
if(/^repeating/.test(a)){
|
||
addAllRows(a,m,sections);
|
||
}else{
|
||
m.push(a);
|
||
}
|
||
return m;
|
||
},[]);
|
||
}
|
||
};
|
||
|
||
const addAllRows = function(affected,memo,sections){
|
||
affected.replace(/(repeating_[^_]+?)_[^_]+?_(.+)/,(match,section,field)=>{
|
||
sections[section].forEach(id=>memo.push(`${section}_${id}_${field}`));
|
||
});
|
||
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
/**
|
||
* Alias for [setSectionOrder()](https://wiki.roll20.net/Sheet_Worker_Scripts#setSectionOrder.28.3CRepeating_Section_Name.3E.2C_.3CSection_Array.3E.2C_.3CCallback.3E.29) that allows you to use the section name in either `repeating_section` or `section` formats.
|
||
* @param {string} section
|
||
* @param {string[]} order
|
||
* @returns {void}
|
||
*/
|
||
const _setSectionOrder = function(section,order){
|
||
let trueSection = section.replace(/repeating_/,'');
|
||
setSectionOrder(trueSection,order);
|
||
};
|
||
|
||
/**
|
||
* Alias for [removeRepeatingRow](https://wiki.roll20.net/Sheet_Worker_Scripts#removeRepeatingRow.28_RowID_.29) that also removes the row from the current object of attribute values and array of section IDs to ensure that erroneous updates are not issued.
|
||
* @param {string} row - The row id to be removed
|
||
* @param {attributesProxy} attributes - The attribute values currently in memory
|
||
* @param {object} sections - Object that contains arrays of all the IDs in sections on the sheet indexed by repeating name.
|
||
* @returns {void}
|
||
*/
|
||
const _removeRepeatingRow = function(row,attributes,sections){
|
||
debug(`removing ${row}`);
|
||
Object.keys(attributes.attributes).forEach((key)=>{
|
||
if(key.startsWith(row)){
|
||
delete attributes[key];
|
||
}
|
||
});
|
||
let [,section,rowID] = row.match(/(repeating_[^_]+)_(.+)/,'');
|
||
sections[section] = sections[section].filter((id)=>id!==rowID);
|
||
removeRepeatingRow(row);
|
||
};
|
||
|
||
/**
|
||
* Alias for [getAttrs()](https://wiki.roll20.net/Sheet_Worker_Scripts#getAttrs.28attributeNameArray.2C_callback.29) that converts the default object of attribute values into an {@link attributesProxy} and passes that back to the callback function.
|
||
* @param {Object} args
|
||
* @param {string[]} [args.props=baseGet] - Array of attribute names to get the value of. Defaults to {@link baseGet} if not passed.
|
||
* @param {function(attributesProxy)} args.callback - The function to call after the attribute values have been gotten. An {@link attributesProxy} is passed to the callback.
|
||
*/
|
||
const _getAttrs = function({props=baseGet,callback}){
|
||
getAttrs(props,(values)=>{
|
||
const attributes = createAttrProxy(values);
|
||
callback(attributes);
|
||
});
|
||
};
|
||
|
||
/**
|
||
* Alias for [getAttrs()](https://wiki.roll20.net/Sheet_Worker_Scripts#getAttrs.28attributeNameArray.2C_callback.29) and [getSectionIDs](https://wiki.roll20.net/Sheet_Worker_Scripts#getSectionIDs.28section_name.2Ccallback.29) that combines the actions of both sheetworker functions and converts the default object of attribute values into an {@link attributesProxy}. Also gets the details on how to handle all attributes from the master {@link cascades} object and.
|
||
* @param {Object} args
|
||
* @param {string[]} [args.props=baseGet] - Array of attribute names to get the value of. Defaults to {@link baseGet} if not passed.
|
||
* @param {repeatingSectionDetails} sectionDetails - Array of details about a section to get the IDs for and attributes that need to be gotten.
|
||
* @param {function(attributesProxy,sectionObj,expandedCascade):void} args.callback - The function to call after the attribute values have been gotten. An {@link attributesProxy} is passed to the callback along with a {@link sectionObj} and {@link expandedCascade}.
|
||
*/
|
||
const getAllAttrs = function({props=baseGet,sectionDetails=repeatingSectionDetails,callback}){
|
||
getSections(sectionDetails,(repeats,sections)=>{
|
||
getAttrs([...props,...repeats],(values)=>{
|
||
const attributes = createAttrProxy(values);
|
||
orderSections(attributes,sections);
|
||
const casc = expandCascade(cascades,sections,attributes);
|
||
callback(attributes,sections,casc);
|
||
})
|
||
});
|
||
};
|
||
|
||
/**
|
||
* Alias for [getSectionIDs()](https://wiki.roll20.net/Sheet_Worker_Scripts#getSectionIDs.28section_name.2Ccallback.29) that allows you to iterate through several functions at once. Also assembles an array of repeating attributes to get.
|
||
* @param {object[]} sectionDetails - Array of details about a section to get the IDs for and attributes that need to be gotten.
|
||
* @param {string} sectionDetails.section - The full name of the repeating section including the `repeating_` prefix.
|
||
* @param {string[]} sectionDetails.fields - Array of field names that need to be gotten from the repeating section
|
||
* @param {function(string[],sectionObj)} callback - The function to call once all IDs have been gotten and the array of repating attributes to get has been assembled. The callback is passed the array of repating attributes to get and a {@link sectionObj}.
|
||
* @returns {void}
|
||
*/
|
||
const getSections = function(sectionDetails,callback){
|
||
let queueClone = _.clone(sectionDetails);
|
||
const worker = (queue,repeatAttrs=[],sections={})=>{
|
||
let detail = queue.shift();
|
||
getSectionIDs(detail.section,(IDs)=>{
|
||
sections[detail.section] = IDs;
|
||
IDs.forEach((id)=>{
|
||
detail.fields.forEach((f)=>{
|
||
repeatAttrs.push(`${detail.section}_${id}_${f}`);
|
||
});
|
||
});
|
||
repeatAttrs.push(`_reporder_${detail.section}`);
|
||
if(queue.length){
|
||
worker(queue,repeatAttrs,sections);
|
||
}else{
|
||
callback(repeatAttrs,sections);
|
||
}
|
||
});
|
||
};
|
||
if(!queueClone[0]){
|
||
callback([],{});
|
||
}else{
|
||
worker(queueClone);
|
||
}
|
||
};
|
||
|
||
// Sets the attributes while always calling with {silent:true}
|
||
// Can be awaited to get the values returned from _setAttrs
|
||
/**
|
||
* Alias for [setAttrs()](https://wiki.roll20.net/Sheet_Worker_Scripts#setAttrs.28values.2Coptions.2Ccallback.29) that sets silently by default.
|
||
* @param {object} obj - The object containting attributes to set
|
||
* @param {boolean} [vocal=false] - Whether to set silently (default value) or not.
|
||
* @param {function()} [callback] - The callback function to invoke after the setting has been completed. No arguments are passed to the callback function.
|
||
* @returns {void}
|
||
*/
|
||
const set = function(obj,vocal=false,callback){
|
||
setAttrs(obj,{silent:!vocal},callback);
|
||
};
|
||
|
||
/**
|
||
* Alias for generateRowID that adds the new id to the {@link sectionObj}. Also allows for creation of custom IDs that conform to the section ID requirements.
|
||
* @param {string} section - The section name to create an ID for. The `repeating_` prefix is optional so both `repeating_equipment` and `equipment` are valid.
|
||
* @param {sectionObj} sections
|
||
* @param {string} [customText] - Custom text to start the ID with. This text should not be longer than the standard repeating section ID format.
|
||
* @returns {any}
|
||
*/
|
||
const _generateRowID = function(section,sections,customText){
|
||
let rowID = customText ?
|
||
generateCustomID(customText) :
|
||
generateRowID();
|
||
section = section.match(/^repeating_[^_]+$/) ?
|
||
section :
|
||
`repeating_${section}`;
|
||
sections[section] = sections[section] || [];
|
||
sections[section].push(rowID);
|
||
return `${section}_${rowID}`;
|
||
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
const styleOnOpen = function(attributes,sections){
|
||
navigateSheet({triggerName:`clicked:${attributes.sheet_state}`});
|
||
setupSystem({attributes,sections});
|
||
styleCharacterType({attributes});
|
||
retrieveHeaders(attributes);
|
||
};
|
||
|
||
const retrieveHeaders = function(attributes){
|
||
debug('entering retrieveHeaders');
|
||
let collapsed = attributes.collapsed.split(/\s*,\s*/).filter(c=>!/^\s*$/.test(c) && c !== 'completed deeds');
|
||
collapsed.forEach((c)=>{
|
||
$20(`.${c}.expandable-header`).addClass('collapse');
|
||
});
|
||
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
/*
|
||
Sheet Styling
|
||
*/
|
||
const navigateSheet = function(event){
|
||
debug('entering navigateSheet');
|
||
debug({event});
|
||
const navSwitch = {
|
||
settings:{show:['settings'],hide:['all','general','powers','antagonist','sheet','gm-screen','party-screen']},
|
||
all:{show:['all','sheet'],hide:['general','powers','settings','antagonist','gm-screen','party-screen']},
|
||
general:{show:['general','sheet'],hide:['all','powers','settings','antagonist','gm-screen','party-screen']},
|
||
powers:{show:['powers','sheet'],hide:['all','general','settings','antagonist','gm-screen','party-screen']},
|
||
antagonist:{show:['antagonist'],hide:['all','general','powers','settings','sheet','gm-screen','party-screen']},
|
||
gm_screen:{show:['gm-screen'],hide:['all','general','powers','settings','sheet','antagonist','party-screen']},
|
||
party_screen:{show:['party-screen'],hide:['all','general','powers','settings','sheet','antagonist','gm-screen']}
|
||
};
|
||
let target = event.triggerName.replace(/clicked:(?:nav-)?/,'');
|
||
let targArr = [];
|
||
let removeArr = [];
|
||
Object.entries(sectionDisplays).forEach(([prop,sections])=>{
|
||
if(target === prop){
|
||
removeArr = sections;
|
||
}else{
|
||
targArr = [...targArr,...sections];
|
||
}
|
||
});
|
||
toggleDisplay(navSwitch[target].show,navSwitch[target].hide);
|
||
toggleDisplay(targArr,removeArr,'inactive');
|
||
const setObj = {sheet_state:target};
|
||
set(setObj);
|
||
};
|
||
funcs.navigateSheet = navigateSheet;
|
||
|
||
const toggleDisplay = function(addTargets = [],removeTargets = [],toggleClass = 'active'){
|
||
debug({addTargets,removeTargets});
|
||
addTargets.forEach((addTarget)=>{
|
||
$20(`.${addTarget}`).addClass(toggleClass);
|
||
});
|
||
removeTargets.forEach((removeTarget)=>{
|
||
$20(`.${removeTarget}`).removeClass(toggleClass);
|
||
});
|
||
};
|
||
|
||
const setupSystem = function({attributes,sections}){
|
||
debug('entering setupSystem');
|
||
debug({attributes});
|
||
let system = attributes.system;
|
||
createSections(system,attributes,sections);
|
||
systems.forEach((sys)=>{
|
||
let action = sys === system ? 'addClass' : 'removeClass';
|
||
$20(`.subsystem-style`)[action](`system-${sys}`);
|
||
$20(`.${sys}${sys===system ? '' : `:not(.${system})`}`)[action]('active');
|
||
});
|
||
setupAttributes(system,attributes);
|
||
};
|
||
funcs.setupSystem = setupSystem;
|
||
|
||
const setupAttributes = function(system,attributes){
|
||
let attrArr = systemDefaults[system].attributes;
|
||
attrArr.forEach((attr)=>{
|
||
attributes[attr] = value(attributes[attr]) || 1;
|
||
});
|
||
};
|
||
|
||
const createSections = function(system,attributes,sections){
|
||
debug('entering createSections');
|
||
let details = systemDefaults[system];
|
||
Object.keys(sections).forEach((section)=>{
|
||
let sectionDetails = details[section];
|
||
if(sectionDetails){
|
||
checkSectionContents(sectionDetails,section,sections,attributes);
|
||
}else{
|
||
sections[section].forEach((id)=>{//clean up unneeded sections
|
||
sections[section].forEach((id)=>{
|
||
_removeRepeatingRow(`${section}_${id}`,attributes,sections);
|
||
});
|
||
});
|
||
}
|
||
});
|
||
};
|
||
|
||
const checkSectionContents = function(sectionDetails,section,sections,attributes){
|
||
debug(`Checking ${section} contents`);
|
||
const IDs = [...sections[section]];
|
||
if(sectionDetails.hasOwnProperty('number')){
|
||
let missing = Math.max(sectionDetails.number - sections[section].length,0);
|
||
debug({numMissing:missing,range:_.range(missing)});
|
||
_.range(missing).forEach(()=>{
|
||
let row = _generateRowID(section,sections);
|
||
attributes[`${row}_${sectionDetails.field || 'name'}`] = sectionDetails.values[0];
|
||
});
|
||
}else if(sectionDetails.values){
|
||
let missing = [];//Array to store missing values
|
||
let unusedIDs = {};//Object to store whether IDs are needed (true) or not (false).
|
||
sectionDetails.values.forEach((val)=>{
|
||
let found = IDs.some((id)=>{
|
||
if(attributes[`${section}_${id}_${sectionDetails.field}`].endsWith(val)){
|
||
unusedIDs[id] = true;
|
||
return true;
|
||
}else{
|
||
unusedIDs[id] = unusedIDs[id] || false;
|
||
return false;
|
||
}
|
||
},false);
|
||
if(!found){
|
||
missing.push(val);
|
||
}
|
||
return found;
|
||
});
|
||
debug({missing,unusedIDs});
|
||
if(missing.length){
|
||
const parentChild = {
|
||
parentID:null,
|
||
children:[]
|
||
};
|
||
missing.forEach((val)=>{
|
||
debug({section});
|
||
let newRow = _generateRowID(section,sections,val === 'add-detail' ? 'ADD' : '');
|
||
debug({newRow});
|
||
let newID = newRow.replace(/repeating_[^_]+_/,'');
|
||
debug({newID});
|
||
if(complexRepeatingSections.indexOf(section) >= 0){
|
||
if(val === 'master'){
|
||
parentChild.parentID = newID.toLowerCase();
|
||
}else{
|
||
parentChild.children.push(newID);
|
||
}
|
||
}
|
||
attributes[`${newRow}_${sectionDetails.field}`] = val;
|
||
if(sectionDetails.additionalFields){
|
||
sectionDetails.additionalFields
|
||
}
|
||
attributes[`${newRow}_display_state`] = val;
|
||
if(/calling/.test(section)){
|
||
attributes[`${newRow}_rating_max`] = 1;
|
||
}
|
||
});
|
||
if(parentChild.parentID){
|
||
parentChild.children.forEach((id)=>{
|
||
attributes[`${section}_${id}_master_id`] = parentChild.parentID;
|
||
});
|
||
debug({finalSection:section});
|
||
orderComplex({section,attributes,sections});
|
||
}
|
||
}
|
||
if(!sectionDetails.additional){
|
||
Object.keys(unusedIDs).forEach((id)=>{
|
||
if(!unusedIDs[id]){
|
||
_removeRepeatingRow(`${section}_${id}`,attributes,sections);
|
||
}
|
||
});
|
||
}
|
||
}
|
||
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
//Expands/collapses the sections
|
||
const expandHeader = function(event){
|
||
debug('entering expandHeader');
|
||
debug({event});
|
||
let [section,rowID,name] = parseClickTrigger(event.triggerName);
|
||
const target = `.${name}.expandable-header`;
|
||
getAllAttrs({props:['collapsed'],callback:(attributes,sections)=>{
|
||
let collapsed = attributes.collapsed.split(/\s*,\s*/);
|
||
debug({collapsed});
|
||
if(section){
|
||
name = 'completed deeds';
|
||
let hide = 0
|
||
if(collapsed.indexOf(name) < 0){
|
||
collapsed.push(name);
|
||
hide = 1;
|
||
}else{
|
||
collapsed = collapsed.filter(b => b!==name && !/^\s*$/.test(b) );
|
||
}
|
||
sections[section].forEach((id)=>{
|
||
attributes[`${section}_${id}_hide`] = attributes[`${section}_${id}_completed`] ? hide : 0;
|
||
});
|
||
}else{
|
||
if(collapsed.indexOf(name) < 0){
|
||
collapsed.push(name);
|
||
}else{
|
||
collapsed = collapsed.filter(b => b!==name && !/^\s*$/.test(b) );
|
||
}
|
||
$20(target).toggleClass('collapse');
|
||
}
|
||
attributes.collapsed = collapsed.join(',');
|
||
attributes.set();
|
||
}})
|
||
};
|
||
funcs.expandHeader = expandHeader;
|
||
|
||
//adds a subsection (e.g. a knack) to the over section (e.g. repeating_calling)
|
||
const addSubsection = async function(event){
|
||
debug('entering addSubsection');
|
||
let [section,rowID,button] = parseClickTrigger(event.triggerName);
|
||
let type = button.replace(/add-/,'');
|
||
let newID = generateRowID();
|
||
getAllAttrs({props:[],callback:(attributes,sections,casc)=>{
|
||
if(/birthright/.test(type)){
|
||
addBirthright(attributes,type,newID);
|
||
}else{
|
||
addChildSection(attributes,sections,section,rowID,type,newID)
|
||
}
|
||
}})
|
||
};
|
||
funcs.addSubsection = addSubsection;
|
||
|
||
const addChildSection = function(attributes,sections,section,rowID,type,newID){
|
||
attributes[`${section}_${newID}_type`]=type;
|
||
attributes[`${section}_${newID}_display_state`]=type;
|
||
attributes[`${section}_${newID}_master_id`]=attributes[`${section}_${rowID}_master_id`];
|
||
if(/path/.test(section)){
|
||
attributes[`${section}_${newID}_rating`] = 1;
|
||
}
|
||
let triggerPos = sections[section].indexOf(rowID);
|
||
sections[section].splice(triggerPos,0,newID);
|
||
attributes[section] = sections[section];
|
||
attributes.set();
|
||
};
|
||
|
||
const addBirthright = function(attributes,type,newID){
|
||
type = type.replace(/birthright-/,'');
|
||
attributes[`repeating_birthright_${newID}_type`]=type;
|
||
attributes[`repeating_birthright_${newID}_display_state`]=type;
|
||
attributes[`repeating_birthright_${newID}_rating`]=1;
|
||
attributes.set();
|
||
};
|
||
|
||
const sectionInteract = function(event){
|
||
debug('entering sectionInteract');
|
||
let [action,targetSection] = extractRepcontrolDetails(event.htmlAttributes.name);
|
||
const interactSwitch = {
|
||
add:addRow,
|
||
edit:editSection
|
||
};
|
||
interactSwitch[action](targetSection);
|
||
};
|
||
funcs.sectionInteract = sectionInteract;
|
||
|
||
const extractRepcontrolDetails = function(name){
|
||
debug('entering extractRepcontrolDetails');
|
||
let match = name ? name.match(/^act_(.+?)-(.+)/) : [null,null,null];
|
||
match.shift();
|
||
return match;
|
||
};
|
||
|
||
const editSection = function(section){
|
||
debug('entering editSection');
|
||
$20(`fieldset.repeating_${section} + .repcontainer`).toggleClass('editmode');
|
||
};
|
||
|
||
const addRow = function(section){
|
||
debug(`adding row for ${section}`);
|
||
getAllAttrs({callback:(attributes,sections)=>{
|
||
let IDs = sections[`repeating_${section}`];
|
||
system = attributes.system;
|
||
const defaults = systemDefaults[system][`repeating_${section}`];
|
||
if(!defaults) return;
|
||
let rowID;
|
||
let row;
|
||
const childParent = {
|
||
parent:'',
|
||
children:[]
|
||
}
|
||
if(!defaults.values){
|
||
row = _generateRowID(section,sections);
|
||
attributes[`${row}_${defaults.field}`]='';
|
||
}else if(section==='deed'){
|
||
addDeed(system,attributes,sections);
|
||
}else if(section === 'injury'){
|
||
addInjury(system,attributes,sections);
|
||
}else{
|
||
defaults.values.forEach((value)=>{
|
||
row = _generateRowID(section,sections,value === 'add-detail' ? 'ADD' : '');
|
||
rowID = row.replace(/repeating_[^_]+_/,'');
|
||
if(value === 'add-detail'){
|
||
childParent.children.push(rowID);
|
||
}else{
|
||
childParent.parent = rowID.toLowerCase();
|
||
}
|
||
attributes[`${row}_${defaults.field}`] = value;
|
||
attributes[`${row}_display_state`] = value;
|
||
if(/calling/.test(section)){
|
||
attributes[`${row}_rating_max`] = 1;
|
||
}
|
||
});
|
||
childParent.children.forEach((id)=>{
|
||
attributes[`repeating_${section}_${id}_master_id`] = childParent.parent;
|
||
});
|
||
debug({addUpdates:attributes.updates});
|
||
debug({preSections:sections});
|
||
orderComplex({section,attributes,sections});
|
||
}
|
||
attributes.set();
|
||
}});
|
||
};
|
||
|
||
funcs.testRoll = async function(event){
|
||
let roll = await startRoll('Success!');
|
||
finishRoll(roll.rollId);
|
||
};
|
||
|
||
const addInjury = function(system,attributes,sections){
|
||
const injuryTracks = {
|
||
'scion-origin':value(attributes.stamina) > 0 ? ['bruised','injured','maimed','taken out'] : ['bruised','maimed','taken out']
|
||
};
|
||
const injuryPositions = {
|
||
bruised:(attributes,sections)=>getBruiseIndex(attributes,sections),
|
||
injured:(attributes,sections)=>getInjuredIndex(attributes,sections),
|
||
maimed:(attributes,sections)=>getMaimedIndex(attributes,sections),
|
||
};
|
||
injuryTracks['scion-hero'] = injuryTracks['scion-origin'];
|
||
let newInjury = injuryTracks[system].find((injury)=>{
|
||
return sections.repeating_injury.every((id)=>{
|
||
debug(`checking "${injury}" against id:"${id}" | ${attributes[`repeating_injury_${id}_type`]}`);
|
||
return attributes[`repeating_injury_${id}_type`] !== injury
|
||
});
|
||
}) || 'bruised';
|
||
let newID = generateRowID();
|
||
let newRow = `repeating_injury_${newID}`;
|
||
attributes[`${newRow}_type`] = newInjury;
|
||
attributes[`${newRow}_display_state`] = `short-${newInjury}`;
|
||
attributes[`${newRow}_collapse`] = 1;
|
||
attributes[`${newRow}_name`] = ' ';
|
||
if(newInjury !== 'taken out'){
|
||
let index = injuryPositions[newInjury](attributes,sections);
|
||
sections.repeating_injury.splice(index,0,newID);
|
||
}else{
|
||
sections.repeating_injury.push(newID);
|
||
}
|
||
attributes.repeating_injury = sections.repeating_injury;
|
||
};
|
||
|
||
const getBruiseIndex = function(attributes,sections){
|
||
debug('getting bruise index');
|
||
return _.range(sections.repeating_injury.length).find((index)=>{
|
||
debug(`attributes[repeating_injury_${sections.repeating_injury[index]}_type] - ${attributes[`repeating_injury_${sections.repeating_injury[index]}_type`]} | comparison:${attributes[`repeating_injury_${sections.repeating_injury[index]}_type`]==='bruised'}`);
|
||
return attributes[`repeating_injury_${sections.repeating_injury[index]}_type`]==='bruised';
|
||
}) || 0;
|
||
};
|
||
|
||
const getInjuredIndex = function(attributes,sections){
|
||
return _.range(sections.repeating_injury.length).find((index)=>{
|
||
return /injured|maimed|taken out/.test(attributes[`repeating_injury_${sections.repeating_injury[index]}_type`]);
|
||
}) || sections.repeating_injury.length - 1;
|
||
};
|
||
|
||
const getMaimedIndex = function(attributes,sections){
|
||
return _.range(sections.repeating_injury.length).find((index)=>{
|
||
return /maimed|taken out/.test(attributes[`repeating_injury_${sections.repeating_injury[index]}_type`]);
|
||
}) || sections.repeating_injury.length - 1;
|
||
};
|
||
|
||
const addDeed = function(system,attributes,sections){
|
||
let needed = systemDefaults[system].repeating_deed.values.find((deed)=>{
|
||
debug(`checking for presence of uncompleted ${deed} deed`);
|
||
return sections.repeating_deed.every((id)=>{
|
||
return attributes[`repeating_deed_${id}_type`]!==deed || value(attributes[`repeating_deed_${id}_completed`])
|
||
});
|
||
}) || systemDefaults[system].repeating_deed.values[0];
|
||
let rowID = generateRowID();
|
||
let headIndex = sections.repeating_deed.indexOf('-completeheaderstyle');
|
||
headIndex = headIndex >= 0 ? headIndex : sections.repeating_deed.length;
|
||
sections.repeating_deed.splice(headIndex,0,rowID);
|
||
attributes.repeating_deed = sections.repeating_deed;
|
||
attributes[`repeating_deed_${rowID}_type`] = needed;
|
||
attributes[`repeating_deed_${rowID}_display_state`] = needed;
|
||
attributes.repeating_deed = sections.repeating_deed;
|
||
};
|
||
/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
// Triggered Functions
|
||
const setActionCalls = function({attributes,sections}){
|
||
debug('setting action calls');
|
||
actionAttributes.forEach((base)=>{
|
||
let [section,,field] = parseTriggerName(base);
|
||
let fieldAction = field.replace(/_/g,'-');
|
||
if(section){
|
||
sections[section].forEach((id)=>{
|
||
attributes[`${section}_${id}_${field}`] = `%{${attributes.character_name}|${section}_${id}_${fieldAction}}`;
|
||
});
|
||
}else{
|
||
attributes[`${field}`] = `%{${attributes.character_name}|${fieldAction}}`;
|
||
}
|
||
});
|
||
};
|
||
funcs.setActionCalls = setActionCalls;
|
||
|
||
const collapseSection = function({trigger,attributes,sections}){
|
||
debug('entering collapseSection');
|
||
const [section,rowID,field] = parseRepeatName(trigger.name);
|
||
if(attributes[`${section}_${rowID}_type`] === 'add-detail') return;
|
||
let collapse = attributes[trigger.name];
|
||
let rows;
|
||
if(/master/.test(attributes[`${section}_${rowID}_display_state`])){
|
||
debug('master detected');
|
||
rows = sections[section].filter((id)=>{
|
||
return attributes[`${section}_${id}_master_id`]===rowID && attributes[`${section}_${id}_display_state`] !== 'add-detail';
|
||
});
|
||
if(collapsibleMasters.indexOf(section)>=0){
|
||
debug('collapsible master detected');
|
||
rows.push(rowID);
|
||
}
|
||
}else{
|
||
rows = [rowID];
|
||
}
|
||
rows.forEach((id)=>{
|
||
if(collapse){
|
||
if(!attributes[`${section}_${id}_display_state`].startsWith('short-')){
|
||
attributes[`${section}_${id}_display_state`] = `short-${attributes[`${section}_${id}_display_state`]}`;
|
||
attributes[`${section}_${id}_collapse`] = 1;
|
||
}
|
||
}else{
|
||
attributes[`${section}_${id}_display_state`] = attributes[`${section}_${id}_display_state`].replace(/short-/,'');
|
||
attributes[`${section}_${id}_collapse`] = 0;
|
||
}
|
||
});
|
||
};
|
||
funcs.collapseSection = collapseSection;
|
||
|
||
const sumActiveCallings = function({trigger,attributes,sections}){
|
||
debug('entering sumActiveCallings');
|
||
const [section,rowID,field] = parseRepeatName(trigger.name);
|
||
const masterID = attributes[`${section}_${rowID}_master_id`] || rowID;
|
||
const knackCosts = {
|
||
mortal:1,
|
||
immortal:2
|
||
}
|
||
let knackIDs = sections[section].filter((id)=>attributes[`${section}_${id}_master_id`] === masterID);
|
||
let spent = knackIDs.reduce((m,id)=>{
|
||
return m+= attributes[`${section}_${id}_active`] * knackCosts[attributes[`${section}_${id}_level`]];
|
||
},0);
|
||
if(spent > attributes[`${section}_${masterID}_rating_max`]){
|
||
if(/active|level/.test(field)){
|
||
attributes[`${section}_${rowID}_active`] = 0;
|
||
}else{
|
||
//Clear all knacks if the calling's level has lowered below the currently used
|
||
knackIDs.forEach((id)=>{
|
||
attributes[`${section}_${id}_active`] = 0;
|
||
attributes[`${section}_${masterID}_rating`] = 0;
|
||
});
|
||
}
|
||
}else{
|
||
attributes[`${section}_${masterID}_rating`] = spent;
|
||
}
|
||
};
|
||
funcs.sumActiveCallings = sumActiveCallings;
|
||
|
||
const calculateMovement = function({trigger,attributes,sections}){
|
||
debug('calculating movement');
|
||
let [section,rowID,field] = parseTriggerName(trigger.name);
|
||
if(section && attributes[`${section}_${rowID}_name`] !== 'athletics') return;
|
||
let athleticsID = sections.repeating_skill.find(id=>attributes[`repeating_skill_${id}_name`]==='athletics');
|
||
attributes.movement_dice = Math.max(attributes.might,attributes.dexterity) + attributes[`repeating_skill_${athleticsID}_rating`];
|
||
};
|
||
funcs.calculateMovement = calculateMovement;
|
||
|
||
const orderDeeds = function({trigger,attributes,sections}){
|
||
debug('reordering deeds');
|
||
let [section,rowID,field] = parseTriggerName(trigger.name);
|
||
attributes.repeating_deed = sections.repeating_deed;
|
||
let completeID = '-completeheaderstyle'
|
||
if(attributes[trigger.name] && attributes.repeating_deed.indexOf('-completeheaderstyle') < 0){
|
||
completeID = '-COMPLETEHEADERSTYLE'
|
||
attributes.repeating_deed.push(completeID);
|
||
attributes['repeating_deed_-COMPLETEHEADERSTYLE_display_state'] = 'header';
|
||
}
|
||
let place = attributes.repeating_deed.indexOf(completeID) + attributes[trigger.name];
|
||
let origPlace = attributes.repeating_deed.indexOf(rowID);
|
||
attributes.repeating_deed.splice(origPlace,1);
|
||
attributes.repeating_deed.splice(place,0,rowID);
|
||
debug({repeating_deed:attributes.repeating_deed});
|
||
if(attributes.repeating_deed.every(id=>!attributes[`repeating_deed_${id}_completed`] || id.toLowerCase() ==='-completeheaderstyle')){
|
||
debug('removing complete header');
|
||
attributes.repeating_deed.splice(attributes.repeating_deed.length - 1,1);
|
||
_removeRepeatingRow('repeating_deed_-completeheaderstyle',attributes,sections);
|
||
}
|
||
};
|
||
funcs.orderDeeds = orderDeeds;
|
||
|
||
const clashBasis = function({trigger,attributes,sections}){
|
||
debug('determining basis for knack clash of wills')
|
||
let [section,rowID] = parseTriggerName(trigger.name);
|
||
let filterState = section ? (str)=>str===rowID : (str)=>str;
|
||
let queue = sections.repeating_calling.filter(id=>filterState(attributes[`repeating_calling_${id}_master_id`]) && /knack/.test(attributes[`repeating_calling_${id}_display_state`]));
|
||
queue.forEach((id)=>{
|
||
let masterID = attributes[`repeating_calling_${id}_master_id`];
|
||
if(attributes.system === 'scion-origin' || attributes[`repeating_calling_${masterID}_rating_max`] >= attributes.legend_max){
|
||
attributes[`repeating_calling_${id}_clash_stat_2`] = 'rating';
|
||
}else{
|
||
attributes[`repeating_calling_${id}_clash_stat_2`] = 'legend';
|
||
}
|
||
})
|
||
};
|
||
funcs.clashBasis = clashBasis;
|
||
|
||
const styleCharacterType = function({attributes}){
|
||
let type = attributes.sheet_type;
|
||
debug({type,displays:navDisplays[type]});
|
||
toggleDisplay(navDisplays[type].hide,navDisplays[type].show,'disable');
|
||
};
|
||
funcs.styleCharacterType = styleCharacterType;/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
/*
|
||
Calculation Functions
|
||
These functions must return a value to be applied to an attribute
|
||
*/
|
||
const defenseCalc = function({attributes}){
|
||
debug('calculating defense');
|
||
return 1 + Math.max(attributes.resolve,attributes.stamina,attributes.composure);
|
||
};
|
||
funcs.defenseCalc = defenseCalc;
|
||
|
||
const calcXP = function({attributes}){
|
||
debug('calculating xp');
|
||
return attributes.experience_earned - attributes.experience_used;
|
||
};
|
||
funcs.calcXP = calcXP;/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
/*
|
||
Rolls
|
||
*/
|
||
const singleAttributeRoll = function(event){
|
||
let [,,button] = parseClickTrigger(event.triggerName);
|
||
let field = button.replace(/-action$/,'').replace(/-/g,'_');
|
||
getAllAttrs({
|
||
props:[...baseGet,'difficulty_query','target_number'],sectionDetails:[],
|
||
callback:async (attributes)=>{
|
||
let pool = assemblePool(attributes[field],0);
|
||
let enhancements = 0;
|
||
if(attributes.enhancement_query === 'on'){
|
||
enhancements = await extractQueryResult(getTranslationByKey('Do you have any enhancements'));
|
||
enhancements = value(enhancements);
|
||
}else{
|
||
await pseudoQuery('');
|
||
}
|
||
let [message,reusableMessage] = await assembleMessage(attributes,pool,field.replace(/_/g,' '),null,null,enhancements);
|
||
debug({message});
|
||
let confirm;
|
||
if(attributes.enhancement_query === 'on' || attributes.difficulty_query === 'on'){
|
||
confirm = await confirmRoll(attributes,{skillName:`^{${field.replace(/_/g,' ')}}`,skillDice:attributes[field],enhancements});
|
||
}else{
|
||
confirm = await pseudoQuery(1);
|
||
}
|
||
if(value(confirm)){
|
||
executeRoll(attributes,reusableMessage,message);
|
||
}
|
||
}
|
||
});
|
||
};
|
||
funcs.singleAttributeRoll = singleAttributeRoll;
|
||
|
||
const rollTask = function(event){
|
||
debug('entering rollTask');
|
||
getAllAttrs({
|
||
props:[...baseGet,'difficulty_query','target_number'],
|
||
callback:async (attributes,sections)=>{
|
||
let [pool,skillName,attributeName,enhancements] = await queryPool(event.triggerName,attributes,sections);
|
||
if(!pool && !skillName && !attributeName){
|
||
return;
|
||
}
|
||
let [message,reusableMessage] = await assembleMessage(attributes,pool,skillName,attributeName,null,enhancements);
|
||
executeRoll(attributes,reusableMessage,message);
|
||
}
|
||
})
|
||
};
|
||
funcs.rollTask = rollTask;
|
||
|
||
const queryPool = async function(clicked,attributes,sections){
|
||
debug('Assembling Dice Pool');
|
||
let [section,rowID,field] = parseClickTrigger(clicked);
|
||
field = field.replace(/-action$/,'');
|
||
debug({section,rowID,field});
|
||
let query;
|
||
let queryOptions;
|
||
let queryPrompt;
|
||
let skillDice;
|
||
let attributeDice;
|
||
let attributeName;
|
||
let skillName;
|
||
if(section === 'repeating_skill'){
|
||
let systemDetails = systemDefaults[attributes.system];
|
||
queryOptions = systemDetails.attributes.reduce((m,attr)=>{
|
||
m.push(`${capitalize(getTranslationByKey(attr))},${attr}`);
|
||
return m;
|
||
},[]).join('|');
|
||
queryPrompt = getTranslationByKey('attribute query');
|
||
skillDice = attributes[`${section}_${rowID}_rating`];
|
||
skillName = `^{@{${section}_${rowID}_name}}`;
|
||
}else{
|
||
let fieldRef = section ? parseSectionRoll(section,rowID,attributes,sections) : field;
|
||
section = 'repeating_skill';
|
||
queryOptions = sections[section].reduce((m,id)=>{
|
||
m.push(`${capitalize(getTranslationByKey(attributes[`${section}_${id}_name`]))},${section}_${id}`);
|
||
return m;
|
||
},[]).join('|')
|
||
queryPrompt = getTranslationByKey('skill query');
|
||
attributeDice = attributes[fieldRef];
|
||
attributeName = `^{${field}}`;
|
||
}
|
||
query = `${queryPrompt}|${queryOptions}`;
|
||
debug({attributeDice});
|
||
let queryResult = await extractQueryResult(query);
|
||
if(!attributeDice){
|
||
attributeDice = attributes[queryResult];
|
||
attributeName = `^{${queryResult}}`;
|
||
}else{
|
||
skillDice = attributes[`${queryResult}_rating`];
|
||
skillName = `^{@{${queryResult}_name}}`;
|
||
}
|
||
let pool = assemblePool(skillDice,attributeDice)
|
||
let enhancements = 0;
|
||
if(attributes.enhancement_query === 'on'){
|
||
enhancements = await extractQueryResult(getTranslationByKey('Do you have any enhancements'));
|
||
enhancements = value(enhancements);
|
||
}else{
|
||
await pseudoQuery('');
|
||
}
|
||
let confirm = await confirmRoll(attributes,{skillName,skillDice,attributeName,attributeDice,enhancements});
|
||
if(value(confirm)){
|
||
return [pool,skillName,attributeName,enhancements];
|
||
}else{
|
||
return [];
|
||
}
|
||
};
|
||
|
||
const rollClash = async function(event){
|
||
debug('rolling a clash of wills');
|
||
const [attributes,,sections,casc] = await _getAllAttrs([...baseGet,'difficulty_query','target_number']);
|
||
getAllAttrs({
|
||
props:[...baseGet,'difficulty_query','target_number'],
|
||
callback:async (attributes,sections)=>{
|
||
let [section,rowID,] = parseClickTrigger(event.triggerName);
|
||
const masterID = attributes[`${section}_${rowID}_master_id`];
|
||
let skillRef;
|
||
let attributeRef;
|
||
if(attributes[`${section}_${rowID}_clash_stat_2`] === 'select'){
|
||
return;
|
||
}
|
||
switch(attributes[`${section}_${rowID}_clash_stat_1`]){
|
||
case 'query':
|
||
skillRef = await buildQuery('Which skill do you want to use','repeating_skill',attributes,sections)
|
||
break;
|
||
case 'select':
|
||
skillRef = sections.repeating_skill.find((id)=>attributes[`repeating_skill_${id}_name`] === 'integrity');
|
||
skillRef = `repeating_skill_${skillRef}_rating`;
|
||
break;
|
||
default:
|
||
skillRef = sections.repeating_skill.find((id)=>attributes[`repeating_skill_${id}_name`] === attributes[`${section}_${rowID}_clash_stat_1`]);
|
||
skillRef = `repeating_skill_${skillRef}_rating`;
|
||
break;
|
||
}
|
||
if(!skillRef){
|
||
return;
|
||
}
|
||
switch(attributes[`${section}_${rowID}_clash_stat_2`]){
|
||
case 'rating':
|
||
attributeRef = `${section}_${masterID}_rating`;
|
||
break;
|
||
case 'query':
|
||
attributeRef = await buildQuery('Which attribute do you want to use',systemDefaults[attributes.system].clashStats,attributes,sections);
|
||
break;
|
||
default:
|
||
attributeRef = attributes[`${section}_${rowID}_clash_stat_2`]
|
||
break;
|
||
}
|
||
if(!attributeRef){
|
||
return;
|
||
}
|
||
let skillName = `^{${attributes[skillRef.replace(/rating/,'name')]}}`;
|
||
let attributeName = attributeRef.startsWith('repeating') ? '^{rating}' : `^{${attributeRef}}`;
|
||
let skillPool = attributes[skillRef];
|
||
let attributePool = attributeRef === 'legend' ? attributes[`${attributeRef}_max`] : attributes[attributeRef];
|
||
let pool = assemblePool(skillPool,attributePool);
|
||
let enhancements = 0;
|
||
if(attributes.enhancement_query === 'on'){
|
||
enhancements = await extractQueryResult(getTranslationByKey('Do you have any enhancements'));
|
||
enhancements = value(enhancements);
|
||
}else{
|
||
await pseudoQuery('');
|
||
}
|
||
let [message,reusableMessage] = await assembleMessage(attributes,pool,skillName,attributeName,attributes[`${section}_${rowID}_name`],enhancements);
|
||
let confirm = await confirmRoll(attributes,{skillName,skillDice:skillPool,attributeName,attributeDice:attributePool,enhancements});
|
||
if(value(confirm)){
|
||
executeRoll(attributes,reusableMessage,message);
|
||
}
|
||
}
|
||
});
|
||
};
|
||
funcs.rollClash = rollClash;
|
||
|
||
const assembleMessage = async function(attributes,pool,skillName,attributeName,rollTitle,enhancements){
|
||
let reusableMessage = `{{successes=[[0['computed value']]]}} {{display_dice=true}} {{system=${attributes.system}}} {{finished=[[0]]}} {{enhancements=[[${enhancements}]]}}`;
|
||
if(attributes.difficulty_query === 'on'){
|
||
let difficulty = await extractQueryResult(`${getTranslationByKey('difficulty query')}|0`);
|
||
reusableMessage = `{{difficulty=[[0${difficulty}]]}} {{extra_successes=[[0[computed value]]]}} ${reusableMessage}`;
|
||
}else{
|
||
await pseudoQuery('');
|
||
}
|
||
return [`@{template_start} ${reusableMessage} ${rollTitle ? `{{title=${rollTitle}}}` : ''} {{skill=${skillName || ''}}} {{attribute=${attributeName || ''}}} ${pool} {{first=true}}`,reusableMessage];
|
||
};
|
||
|
||
const buildQuery = async function(prompt,options,attributes,sections){
|
||
debug({prompt,options});
|
||
if(typeof options === 'string'){
|
||
options = options.startsWith('repeating') ? sections[options].map(id=>`${capitalize(getTranslationByKey(attributes[`${options}_${id}_name`]))},${options}_${id}_rating`) : '';
|
||
}
|
||
let query = `${getTranslationByKey(prompt)}|${options.join('|')}`;
|
||
return await extractQueryResult(query);
|
||
};
|
||
|
||
const assemblePool = function(skillDice,attributeDice){
|
||
return _.range(value(skillDice)+value(attributeDice)).map((n)=>{
|
||
return `{{roll_${n+1}=[[1d10cs>@{target_number}cf<1cf>@{again}]]}}`;
|
||
}).join(' ').trim() || '{{roll_1=^{no dice available}}}';
|
||
};
|
||
|
||
const confirmRoll = function(attributes,{skillName,skillDice,attributeName,attributeDice,enhancements}){
|
||
let promptLookup = 'Roll {{skill}} and {{attribute}} with {{enhancement number}} enhancements?';
|
||
if(!skillName && !attributeName){
|
||
return pseudoQuery(1);
|
||
}else if(!skillName){
|
||
promptLookup = promptLookup.replace(/\{\{skill\}\} and /,'');
|
||
}else if(!attributeName){
|
||
promptLookup = promptLookup.replace(/ and \{\{attribute\}\}/,'');
|
||
}
|
||
if(!enhancements){
|
||
promptLookup = promptLookup.replace(/ with \{\{enhancement number\}\} enhancements/,'');
|
||
}
|
||
let prompt = getTranslationByKey(promptLookup);
|
||
debug({promptLookup,prompt});
|
||
const rollDetails = {[skillName]:skillDice,[attributeName]:attributeDice,enhancements};
|
||
Object.entries(rollDetails).forEach(([name,value],index)=>{
|
||
debug(`processing ${name}`);
|
||
name = /^\^\{/.test(name) ?
|
||
(
|
||
/^\^\{@{/.test(name) ?
|
||
getTranslationByKey(attributes[name.replace(/[\^@]{|}/g,'')]) :
|
||
getTranslationByKey(name.replace(/^\^{|}$/g,''))
|
||
) :
|
||
name;
|
||
let replaceText = name !== 'enhancements' ?
|
||
`${capitalize(name)} (${value})` :
|
||
value;
|
||
let replaceTarget = `\\{\\{${index}\\}\\}`;
|
||
debug({name,value,index,replaceTarget,replaceText});
|
||
|
||
prompt = prompt.replace(new RegExp(replaceTarget,'g'),replaceText);
|
||
});
|
||
return extractQueryResult(`${prompt}|${getTranslationByKey('Yes')},1|${getTranslationByKey('No')},0`);
|
||
};
|
||
|
||
const executeRoll = async function(attributes,reusableMessage,message,accumulator = {successes:0}){
|
||
const rollNums = [1,2,3,4,5,6,7,8,9,10];
|
||
let roll = await startRoll(message);
|
||
const computeObj = {};
|
||
const tn = attributes.target_number;
|
||
accumulator.successes = Object.keys(roll.results).reduce((total,key)=>{
|
||
return total += (/roll_/.test(key) && roll.results[key].result >= tn) ? 1 : 0;
|
||
},accumulator.successes);
|
||
if(rollNums.some((n)=>roll.results[`roll_${n}`] && roll.results[`roll_${n}`].result >= attributes.again)){
|
||
let pool = rollNums.reduce((m,n)=>{
|
||
if(roll.results[`roll_${n}`] && roll.results[`roll_${n}`].result >= Math.max(attributes.again,5)){
|
||
m+=`{{roll_${n}=[[1d10cs>@{target_number}cf<1cf>@{again}]]}}`;
|
||
}
|
||
return m;
|
||
},'');
|
||
let newMessage = `@{template_start} ${reusableMessage} ${pool} {{continuation=true}}`;
|
||
executeRoll(attributes,reusableMessage,newMessage,accumulator);
|
||
}else{
|
||
computeObj.finished = 1;
|
||
computeObj.successes = accumulator.successes;
|
||
if(accumulator.successes){
|
||
computeObj.successes += (roll.results.enhancements.result || 0);
|
||
}
|
||
if(roll.results.difficulty){
|
||
computeObj.extra_successes = Math.max(computeObj.successes - roll.results.difficulty.result,0);
|
||
}
|
||
}
|
||
finishRoll(roll.rollId,computeObj);
|
||
};
|
||
|
||
const parseSectionRoll = function(section,rowID,attributes){
|
||
let masterID = section === 'repeating_path' ? rowID : (attributes[`${section}_${rowID}_master_id`] || rowID);
|
||
return `${section}_${masterID}_rating`;
|
||
};
|
||
/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
const clearChildItems = function(event){
|
||
debug('entering clearChildItems');
|
||
debug({event});
|
||
const [section,masterID] = parseRepeatName(event.sourceAttribute);
|
||
debug({section,masterID});
|
||
getAllAttrs({
|
||
callback:(attributes,sections,)=>{
|
||
if(/master/.test(event.removedInfo[`${section}_${masterID}_display_state`])){
|
||
debug('clearing children');
|
||
sections[section].forEach((id)=>{
|
||
if(attributes[`${section}_${id}_master_id`]===masterID.toLowerCase()){
|
||
_removeRepeatingRow(`${section}_${id}`,attributes,sections);
|
||
}
|
||
});
|
||
}else if(/injury|calling|deed/.test(section)){
|
||
//cleanUpSection(attributes,sections,section,masterID);
|
||
}
|
||
//The below is a temporary fix for display issues associated with setSectionOrder
|
||
let clearID = attributes.attributes[`_reporder_${section}`].find(id=>Object.keys(attributes.attributes).some((attr)=>attr.startsWith(`${section}_${id}`)));
|
||
if(clearID){
|
||
debug({section,clearID});
|
||
attributes[`${section}_${clearID}_display_state`] = attributes[`${section}_${clearID}_display_state`];
|
||
attributes.set();
|
||
}
|
||
}
|
||
})
|
||
};
|
||
funcs.clearChildItems = clearChildItems;
|
||
|
||
const cleanUpSection = function(attributes,sections,section,masterID){
|
||
let trigger;
|
||
switch(section){
|
||
case 'repeating_injury':
|
||
//Health handling
|
||
break;
|
||
case 'repeating_calling':
|
||
trigger = {name:`${section}_${masterID}_rating_max`};
|
||
sumActiveCallings(trigger,attributes,sections);
|
||
break;
|
||
case 'repeating_deed':
|
||
//remove completed deeds header if no completed deeds
|
||
//orderDeeds(trigger,attributes,sections);
|
||
break;
|
||
}
|
||
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
const resetOrderStyling = function(attributes,reset=false){//Temporary fix for display issue with reordering section`s via setSectionOrder
|
||
const clearObj = {};
|
||
let updateKeys = Object.keys(attributes.updates);
|
||
let unusedSections = ['repeating_injury','repeating_path','repeating_calling'].filter((sec)=>updateKeys.every((attr)=>!attr.startsWith(sec)));
|
||
debug({unusedSections});
|
||
unusedSections.some((section)=>{
|
||
let id = attributes.attributes[`_reporder_${section}`] && attributes.attributes[`_reporder_${section}`].find(i=>Object.keys(attributes.attributes).some((attr)=>attr.startsWith(`${section}_${i}`)));
|
||
if(id){
|
||
attributes[`${section}_${id}_display_state`] = attributes[`${section}_${id}_display_state`];
|
||
clearObj[`${section}_${id}_display_state`] = 'loading';
|
||
return true;
|
||
}
|
||
});
|
||
set(clearObj,false,()=>{
|
||
let sections = Object.keys(attributes.repOrders);
|
||
sections.forEach((section)=>{
|
||
_setSectionOrder(section,attributes.repOrders[section]);
|
||
});
|
||
if(reset){
|
||
set(attributes.attributes);
|
||
}
|
||
});
|
||
};
|
||
|
||
const orderComplex = function({section,attributes,sections}){
|
||
section = section.startsWith('repeating_') ? section : `repeating_${section}`;
|
||
debug(`ordering ${section}`);
|
||
debug({sections});
|
||
const masterIDs = sections[section].filter((id)=>!attributes[`${section}_${id}_master_id`]);
|
||
debug({masterIDs});
|
||
sections[section] = sections[section].reduce((memo,id)=>{
|
||
if(attributes[`${section}_${id}_master_id`]){
|
||
debug({row:`${section}_${id}`});
|
||
const isDetail = attributes[`${section}_${id}_display_state`] === 'add-detail';
|
||
const lastChildIndex = getChildIndex(memo,section,id,attributes,isDetail);
|
||
if(lastChildIndex < 0){
|
||
_removeRepeatingRow(`${section}_${id}`,attributes,sections)
|
||
}else{
|
||
memo.splice(lastChildIndex,0,id);
|
||
}
|
||
}
|
||
return memo;
|
||
},masterIDs);
|
||
attributes[section] = sections[section];
|
||
};
|
||
|
||
const getChildIndex = function(memo,section,id,attributes,detailAdd){
|
||
debug({memo,detailAdd});
|
||
const lastChild = [...memo].reverse().find((fid)=>{
|
||
debug({fid,fidmaster:attributes[`${section}_${fid}_master_id`],idMaster:attributes[`${section}_${id}_master_id`],comparison:attributes[`${section}_${fid}_master_id`] === attributes[`${section}_${id}_master_id`]});
|
||
if(attributes[`${section}_${fid}_master_id`] === attributes[`${section}_${id}_master_id`]){
|
||
return detailAdd ?
|
||
true :
|
||
attributes[`${section}_${fid}_display_state`] !== 'add-detail';
|
||
}else{
|
||
return fid.toLowerCase() === attributes[`${section}_${id}_master_id`];
|
||
}
|
||
});
|
||
debug({lastChild,master_id:attributes[`${section}_${id}_master_id`]});
|
||
let lastIndex = memo.indexOf(lastChild);
|
||
debug({lastIndex});
|
||
return lastIndex >= 0 ? lastIndex + 1 : 0;
|
||
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
//Initiate a compendium lookup
|
||
/*Expansion IDs:
|
||
## SWPF ##
|
||
- main: 10864
|
||
- Bestiary: 12479
|
||
|
||
## Deadlands ##
|
||
- DLWW: 10215
|
||
- DLWWCompanion: 10712
|
||
- hahh: --
|
||
- Blood drive: --
|
||
|
||
## Rifts ##
|
||
- Savage Rifts Tomorrow Legion Player's Guide: 12396
|
||
- Savage Rifts Game Master’s Handbook: 12397
|
||
- Savage Rifts Savage Foes of North America: 12398
|
||
|
||
## SWADE ##
|
||
- Core: 8893
|
||
## Missing
|
||
*/
|
||
//These categories are the part after the data- in a bestiary entry. E.g. a monster has a data-Armors JSON, but the actual compendium category is "Armor". These are converted to the proper compendium category via the categoryLookup Proxy
|
||
const itemCategories = ['Callings','Equipment','Knacks','Paths','Qualities','Flairs'];
|
||
|
||
//Start of the actual compendium lookup functions
|
||
//Function to initiate the lookup. Parses the statblock to figure out what needs to be looked up in the compendium, and what attribute should be filtered for based on the category.
|
||
//ARGUMENTS
|
||
//statblock (object): base object dropped from the compendium
|
||
//callback (function): A function that will use the parsed compendium lookup data to finish the drag and drop of the item
|
||
//The callback function receives the parsed statblock as an argument
|
||
const compendiumLookup = function({queue, callback, origBlock, attributes, sections, casc, pass = 0}) {
|
||
pass++;
|
||
origBlock = origBlock || queue[0];
|
||
queue = queue || [origBlock];
|
||
let searchArray = [];
|
||
queue.forEach((statblock)=>{
|
||
searchArray = itemCategories.reduce((m, type) => {//Construct an array of items to search for.
|
||
if (statblock[`data-${type}`]){
|
||
let searchNames = statblock[`data-${type}`].map((obj) => obj.name || obj.display_name || '')
|
||
.join('|')
|
||
.replace(/\|{2,}/g,'')
|
||
.replace(/\|$/,'');
|
||
if(searchNames.length > 0){
|
||
let searchString = `Category:${type} display_name:${searchNames}`;
|
||
m.push(searchString);
|
||
}
|
||
}
|
||
return m;
|
||
}, searchArray);
|
||
debug({searchArray});
|
||
if(searchArray.length){
|
||
lookupBurndown(statblock, searchArray, callback, origBlock, attributes, sections, casc,pass);
|
||
}else{
|
||
callback(origBlock);
|
||
}
|
||
});
|
||
};
|
||
|
||
//Actually queries the compendium to get details on the items in each category using the searchArray assembled in compendiumLookup
|
||
//ARGUMENTS
|
||
//statblock (object): the original object dropped from the compendium
|
||
//callback (function): A function that will use the parsed compendium lookup data to finish the drag and drop of the item
|
||
//The callback function receives the parsed statblock as an argument
|
||
const lookupBurndown = function(statblock, searchArray, callback, origBlock, attributes, sections, casc,pass) {
|
||
getCompendiumQuery(searchArray, (dataArr) => {
|
||
debug({dataArr});
|
||
const expansionIDs = dataArr
|
||
.reduce( (arr,obj)=>{
|
||
arr.push(value(obj.data.Expansion));
|
||
return arr;
|
||
},[])
|
||
.sort((a,b) => b - a);
|
||
itemCategories.forEach((category) => {
|
||
if (statblock[`data-${category}`]) {
|
||
origBlock[`data-${category}`] = statblock[`data-${category}`].map((obj) => {
|
||
let fullItem = getItemDetails(obj, dataArr, expansionIDs);
|
||
return fullItem;
|
||
});
|
||
}
|
||
});
|
||
let queue = additionalLookups(statblock,origBlock);
|
||
if(queue.length /*&& pass < 2*/){
|
||
compendiumLookup({queue,callback,origBlock, attributes, sections, casc,pass});
|
||
}else{
|
||
callback(origBlock);
|
||
}
|
||
});
|
||
};
|
||
|
||
const additionalLookups = function(statblock,origBlock){
|
||
return Object.entries(statblock).reduce((memo,[prop,arr])=>{
|
||
if(prop.startsWith('data-') && Array.isArray(arr)){
|
||
let nestedData = arr.reduce((m,obj)=>{
|
||
Object.entries(obj).forEach(([nProp,nVal])=>{
|
||
/*commented code shouldn't be needed
|
||
if(
|
||
nProp.startsWith('data-') &&
|
||
typeof nVal === 'string' &&
|
||
nVal.startsWith('[{')
|
||
){
|
||
try{
|
||
let jArr = JSON.parse(nVal);
|
||
if(Array.isArray(jArr)){
|
||
jArr = jArr.map((o)=>{
|
||
o.datasource = obj['cs-name'] || obj.Category;
|
||
if(!o.datasource){
|
||
delete o.datasource;
|
||
}
|
||
return o;
|
||
});
|
||
origBlock[nProp] = origBlock[nProp] ?
|
||
[...origBlock[nProp],...jArr] :
|
||
[...jArr];
|
||
m.data[nProp] = jArr;
|
||
m.nested = true;
|
||
}
|
||
}catch(err){
|
||
//if the parse failed, do nothing
|
||
}
|
||
}else */if(nProp === 'data-features'){
|
||
try{
|
||
if(typeof nVal === 'string'){
|
||
debug('string data-feature detected');
|
||
nVal = JSON.parse(nVal);
|
||
}
|
||
nVal.forEach((feature)=>{
|
||
if(!origBlock[`data-${feature.category}`] || origBlock[`data-${feature.category}`].every((o)=>o.display_name.toLowerCase() !== feature.name.toLowerCase())){
|
||
m.nested = true;
|
||
m.data[`data-${feature.category}`] = m.data[`data-${feature.category}`] || [];
|
||
m.data[`data-${feature.category}`].push({display_name:feature.name});
|
||
}
|
||
});
|
||
}catch(err){
|
||
debug({[`Invalid data-feature on ${obj.display_name}`]:err,'data-feature':nVal},true);
|
||
}
|
||
}
|
||
});
|
||
return m;
|
||
},{data:{},nested:false});
|
||
if(nestedData && nestedData.nested){
|
||
memo.push(nestedData.data);
|
||
}
|
||
}
|
||
return memo;
|
||
},[]);
|
||
};
|
||
|
||
//Finds the compendium item that most precisely matches the needs of the compendium item based on expansion ID and name property.
|
||
//If nothing matches based on expansion ID, simply returns the first item with appropriate name property.
|
||
//ARGUMENTS
|
||
//itemObj (object): the data on the Item to return that is included in the base statblock
|
||
//dataArr (array): The compendium items that were returned from getCompendiumQuery
|
||
const getItemDetails = function(itemObj, dataArr, expansionIDs) {
|
||
let objName = itemObj.display_name || itemObj.name;
|
||
let compendiumObj;
|
||
expansionIDs.find((id) => {
|
||
compendiumObj = dataArr.find((dataObj) => value(dataObj.data.Expansion) === id &&
|
||
dataObj.data.display_name === objName);
|
||
if (compendiumObj) {
|
||
return true;
|
||
} else {
|
||
return false;
|
||
}
|
||
});
|
||
if (!compendiumObj) { //If we didn't find an object matching the expansion pathways and the object name, just find the first item with a matching name
|
||
compendiumObj = dataArr.find((dataObj) =>
|
||
dataObj.data.display_name === objName);
|
||
if (!compendiumObj) { //If there still isn't a matching compendium object, return the original Item
|
||
return itemObj;
|
||
}
|
||
}
|
||
Object.keys(compendiumObj.data).forEach((key) => {
|
||
itemObj[key] = itemObj[key] || compendiumObj.data[key];
|
||
});
|
||
return itemObj;
|
||
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
const handleCompendiumDrop = function(event){
|
||
getAllAttrs({
|
||
callback:(attributes,sections,casc)=>{
|
||
let validData = parseDropData(attributes,sections,casc);
|
||
if(!validData) return;
|
||
const data = attributes.drop_data;
|
||
if(attributes.drop_data.Category === 'Antagonists'){
|
||
clearSheet(attributes,sections,casc);
|
||
attributes.queue.push('sheet_type');
|
||
attributes.queue.push('character_name');
|
||
navigateSheet({triggerName:'antagonist'});
|
||
}else{
|
||
clearDropAttributes(attributes);
|
||
}
|
||
attributes.set({
|
||
callback:()=>{
|
||
compendiumLookup({
|
||
origBlock:data,
|
||
attributes,sections,casc,
|
||
callback:async (lookupObj)=>{
|
||
await processDropData({data:lookupObj,attributes,sections,casc});
|
||
debug('Drop processing complete');
|
||
attributes.set({attributes,sections,casc});
|
||
}
|
||
});
|
||
}
|
||
});
|
||
}
|
||
});
|
||
};
|
||
funcs.handleCompendiumDrop = handleCompendiumDrop;
|
||
|
||
const parseDropData = function(attributes){
|
||
try{
|
||
attributes.attributes.drop_data = JSON.parse(attributes.drop_data);
|
||
attributes.attributes.drop_data = Object.entries(attributes.drop_data)
|
||
.reduce((memo,[key,val])=>{
|
||
if(val){
|
||
if(typeof val === 'string' && val.startsWith('[{')){
|
||
val = JSON.parse(val);
|
||
}
|
||
memo[key] = val;
|
||
}
|
||
return memo;
|
||
},{});
|
||
if(attributes.drop_data.Category !== 'Antagonists'){
|
||
let category = attributes.drop_data.Category.replace(/\s.+/,'');
|
||
attributes.attributes.drop_data = {[`data-${category}`]:[attributes.drop_data]};
|
||
if(attributes.drop_data[`data-${category}`]['data-features']){
|
||
attributes.drop_data[category]['data-features'].forEach((feature)=>{
|
||
let cat = capitalize(feature.category);
|
||
attributes.drop_data[`data-${cat}`] = attributes.drop_data[`data-${cat}`] || [];
|
||
attributes.drop_data[`data-${cat}`].push({name:feature.name});
|
||
});
|
||
}
|
||
}
|
||
return true;
|
||
}catch(err){
|
||
debug({'Invalid Drop Data! Drop aborted. Error:':err,drop_data:attributes.drop_data},true);
|
||
return false;
|
||
}
|
||
};
|
||
|
||
const clearSheet = function(attributes,sections,casc){
|
||
Object.entries(sections).forEach(([section,idArray])=>{
|
||
idArray.forEach((id)=>{
|
||
_removeRepeatingRow(`${section}_${id}`,attributes,sections);
|
||
});
|
||
});
|
||
Object.keys(attributes.attributes).forEach((attr)=>{
|
||
if(casc[`attr_${attr}`]){
|
||
attributes[attr] = casc[`attr_${attr}`].hasOwnProperty('defaultValue') ?
|
||
casc[`attr_${attr}`].defaultValue :
|
||
'';
|
||
}
|
||
})
|
||
};
|
||
|
||
const clearDropAttributes = function(attributes){
|
||
['drop_name','drop_data'].forEach( key => attributes[key] = '');
|
||
};
|
||
|
||
const processDropData = function({data, attributes, sections, casc,section=''}){
|
||
const repeatProcessors = {
|
||
Paths:dropGenericSection,
|
||
Callings:dropGenericSection,
|
||
Knacks:dropChildItem,
|
||
Purviews:dropGenericSection,
|
||
Boons:dropChildItem,
|
||
Equipment:dropEquipment,
|
||
Flairs:dropGenericSection,
|
||
Qualities:dropGenericSection
|
||
}
|
||
section = section ? `${section}_` : '';
|
||
if(data.Category === 'Antagonists'){
|
||
attributes.sheet_type = 'antagonist';
|
||
}
|
||
const worker = async (queue) => {
|
||
let [key,val] = queue.shift();
|
||
try{
|
||
let setKey = key.replace(/^(?:data-)?cs(?:list)?-/,'');
|
||
if(typeof val === 'string' && val.startsWith('[{')){
|
||
val = JSON.parse(val);
|
||
}
|
||
if(!Array.isArray(val) && (key.startsWith('cs-') || key.startsWith('data-cs-'))){
|
||
await pseudoQuery();
|
||
attributes[`${section}${setKey}`] = val;
|
||
}else if(Array.isArray(val) && key.startsWith('data-')){
|
||
let lookupKey = key.replace(/data-(?:cs(?:list)?-)?/,'');
|
||
if(repeatProcessors[lookupKey]){
|
||
debug(`processing ${lookupKey}`);
|
||
await repeatProcessors[lookupKey](lookupKey,val,attributes,sections,casc);
|
||
}else if(key.startsWith('data-cslist-')){
|
||
await pseudoQuery();
|
||
attributes[`${section}${setKey}`] = val.map((o)=>o.name).join(', ');
|
||
}else if(key === 'data-content'){
|
||
await pseudoQuery();
|
||
attributes[`${section}description`] = val.reduce((textArr,content)=>{
|
||
if(content.heading){
|
||
textArr.push(content.heading);
|
||
}
|
||
if(content.content){
|
||
let text = /list/.test(content.type) ? `• ${content.content}` : content.content;
|
||
textArr.push(text);
|
||
}
|
||
return textArr;
|
||
},[]).join('\n')
|
||
.replace(/\n{2,}/,'\n')
|
||
.replace(/\n+$/,'');
|
||
}
|
||
}
|
||
}catch(err){
|
||
debug({[`Invalid JSON entered for ${key} on ${data.display_name}`]:err,JSON:val});
|
||
}
|
||
if(queue.length){
|
||
return worker(queue);
|
||
}else{
|
||
return true;
|
||
}
|
||
};
|
||
return worker(Object.entries(data));
|
||
};
|
||
|
||
const singular = {
|
||
Paths:'Path',
|
||
Callings:'Calling',
|
||
Knacks:'Knack',
|
||
Purviews:'Purview',
|
||
Boons:'Boon',
|
||
Equipment:'Equipment',
|
||
Flairs:'Flair',
|
||
Qualities:'Quality'
|
||
};
|
||
|
||
const sectionDisplayNames = {
|
||
path:'short-master',
|
||
calling:'master',
|
||
purview:'short-master',
|
||
knack:'short-knack',
|
||
contact:'short-contact',
|
||
group:'short-group',
|
||
access:'short-access',
|
||
obligation:'short-obligation',
|
||
boon:'short-boon',
|
||
creature:'short-creature',
|
||
follower:'short-follower',
|
||
guide:'short-guide',
|
||
relic:'short-relic',
|
||
flair:'short-flair',
|
||
quality:'short-quality',
|
||
};
|
||
|
||
const dropGenericSection = async function(lookupKey,arr,attributes,sections,casc){
|
||
await pseudoQuery();
|
||
debug(`processing ${lookupKey}`);
|
||
if(!Array.isArray(arr)){
|
||
debug({'Invalid section details passed. Exiting. Object passed was:':arr},true);
|
||
return;
|
||
}
|
||
let type = singular[lookupKey].toLowerCase();
|
||
debug({arr});
|
||
const worker = async (queue)=>{
|
||
let itemObj = queue.shift();
|
||
let section = _generateRowID(type,sections);
|
||
itemObj[`cs-display_state`] = sectionDisplayNames[type];
|
||
if(itemObj[`cs-display_state`].startsWith('short-')){
|
||
itemObj['cs-collapse'] = 1;
|
||
}
|
||
if(/master/.test(itemObj[`cs-display_state`])){
|
||
let controlSection = _generateRowID(type,sections,'ADD');
|
||
attributes[`${controlSection}_master_id`] = section.toLowerCase().replace(/repeating_[^_]+_/,'');
|
||
attributes[`${controlSection}_display_state`] = 'add-detail';
|
||
}
|
||
itemObj[`cs-rating_max`] = 1;
|
||
orderComplex({section:type,sections,attributes});
|
||
if(itemObj['data-cs-condition']){
|
||
itemObj['data-cs-condition'] = ['data-cs-condition','data-cs-condition_effect','data-cs-condition_momentum']
|
||
.map((attr)=>{
|
||
let c = itemObj[attr];
|
||
delete itemObj[attr];
|
||
return c;
|
||
})
|
||
.filter( c => c)
|
||
.join('\n');
|
||
}
|
||
await processDropData({data:itemObj,attributes,sections,casc,section});
|
||
if(queue.length){
|
||
return worker(queue);
|
||
}else{
|
||
return true;
|
||
}
|
||
};
|
||
return worker([...arr]);
|
||
};
|
||
|
||
const dropChildItem = async function(lookupKey,arr,attributes,sections,casc){
|
||
await pseudoQuery();
|
||
if(!Array.isArray(arr)){
|
||
debug({'Invalid section details passed. Exiting. Object passed was:':arr},true);
|
||
return;
|
||
}
|
||
const parentSections = {
|
||
Knacks:'calling',
|
||
Boons:'purview'
|
||
};
|
||
let type = singular[lookupKey].toLowerCase();
|
||
let section = `repeating_${parentSections[lookupKey]}`;
|
||
let queryText = `${getTranslationByKey(`${lookupKey} drop query`)}|`;
|
||
let queryOptions = sections[section]
|
||
.filter((id)=>attributes[`${section}_${id}_display_state`].endsWith('master'))
|
||
.map((id)=>`${attributes[`${section}_${id}_name`]
|
||
|| getTranslationByKey('unnamed')},${id}`);
|
||
let target = queryOptions.length > 1 ? undefined : queryOptions[0].replace(/^.+,([^_]+)$/,'$1');
|
||
let query = target ? undefined : `${queryText}|${queryOptions.join('|')}`;
|
||
const worker = async (queue,t) =>{
|
||
let itemObj = queue.shift();
|
||
target = await (target ? pseudoQuery(target) : extractQueryResult(query));
|
||
let row = _generateRowID(parentSections[lookupKey],sections);
|
||
itemObj['cs-master_id'] = target;
|
||
itemObj['cs-collapse'] = 1;
|
||
itemObj[`cs-display_state`] = `short-${type}`;
|
||
await processDropData({data:itemObj,attributes,sections,casc,section:row});
|
||
orderComplex({section,sections,attributes});
|
||
if(queue.length){
|
||
return worker(queue);
|
||
}else{
|
||
return true;
|
||
}
|
||
};
|
||
await worker([...arr],target);
|
||
};
|
||
|
||
const dropEquipment = async function(lookupKey,arr,attributes,sections,casc){
|
||
await pseudoQuery();
|
||
if(!Array.isArray(arr)){
|
||
debug({'Invalid section details passed. Exiting. Object passed was:':arr},true);
|
||
return;
|
||
}
|
||
const worker = async (queue) =>{
|
||
let itemObj = queue.shift();
|
||
let type = /weapon|armor/i.test(itemObj['data-cs-type']) ?
|
||
'equipment' :
|
||
'birthright';
|
||
itemObj['cs-collapse'] = 1;
|
||
itemObj[`cs-display_state`] = `short-${type}`;
|
||
let section = `repeating_${type}_${generateRowID()}`;
|
||
await processDropData({data:itemObj,attributes,sections,casc,section});
|
||
if(queue.length){
|
||
return worker(queue);
|
||
}else{
|
||
return true;
|
||
}
|
||
};
|
||
return await worker([...arr]);
|
||
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
//Update functions. These functions should be added to the updateHandlers object for iteration through by the updateSheet function./*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
||
/*jshint -W014,-W084,-W030,-W033*/
|
||
const registerEventHandlers = function(){
|
||
on('sheet:opened',updateSheet);
|
||
debug({funcs:Object.keys(funcs)});
|
||
//Roll20 change and click listeners
|
||
Object.entries(listeners).forEach(([event,funcName])=>{
|
||
if(funcs[funcName]){
|
||
on(event,funcs[funcName]);
|
||
}else{
|
||
debug(`!!!Warning!!! no function named ${funcName} found. No listener created for ${event}`,true);
|
||
}
|
||
});
|
||
};
|
||
registerEventHandlers();
|
||
log(`Sheet Loaded`);
|
||
</script> |