Gurps 2.3.7 (#6719)

* GURPS

Issue #183 Updates to combat and spell tables.

* gurps

Issue #183 updated to V7 of combat skill linking

* gurps

Issue #131 Add level column to repeating traits
This commit is contained in:
Ken
2020-06-08 11:18:53 -05:00
committed by GitHub
parent 66fd35f444
commit d00ba42098
3 changed files with 474 additions and 119 deletions
+59 -13
View File
@@ -804,6 +804,29 @@ input.sheet-tab0 + span {
height: 100%;
}
/* show/hide Row ID: based on drop-down selection */
.sheet-melee-notebox input[name="attr_melee_row_type"][value="ST"] ~ .sheet-show-hide-row-id,
.sheet-melee-notebox input[name="attr_melee_row_type"][value="STRIKING"] ~ .sheet-show-hide-row-id,
.sheet-melee-notebox input[name="attr_melee_row_type"][value="DX"] ~ .sheet-show-hide-row-id,
.sheet-melee-notebox input[name="attr_melee_row_type"][value="IQ"] ~ .sheet-show-hide-row-id,
.sheet-melee-notebox input[name="attr_melee_row_type"][value="HT"] ~ .sheet-show-hide-row-id,
.sheet-melee-notebox input[name="attr_melee_row_type"][value="10"] ~ .sheet-show-hide-row-id {
display: none;
}
.sheet-melee-notebox .sheet-margin-right {
margin-right: 5px;
}
.sheet-ranged-notebox input[name="attr_ranged_row_type"][value="ST"] ~ .sheet-show-hide-row-id,
.sheet-ranged-notebox input[name="attr_ranged_row_type"][value="STRIKING"] ~ .sheet-show-hide-row-id,
.sheet-ranged-notebox input[name="attr_ranged_row_type"][value="DX"] ~ .sheet-show-hide-row-id,
.sheet-ranged-notebox input[name="attr_ranged_row_type"][value="IQ"] ~ .sheet-show-hide-row-id,
.sheet-ranged-notebox input[name="attr_ranged_row_type"][value="HT"] ~ .sheet-show-hide-row-id,
.sheet-ranged-notebox input[name="attr_ranged_row_type"][value="10"] ~ .sheet-show-hide-row-id {
display: none;
}
/*
.sheet-box .sheet-row-details2:hover,
.sheet-box .sheet-row:hover + .sheet-row-details2 { display: block !important; }
@@ -1688,13 +1711,25 @@ input[type="checkbox"][name="attr_toggle_turn_deceleration"]:not(:checked) ~ div
background: var(--header-bg);
}
.sheet-traits .sheet-col0 { width: calc(100% - 137px); }
.sheet-traits .sheet-col0 { width: calc(100% - 169px); }
.sheet-traits .sheet-col0 input { text-align:left; }
.sheet-traits .sheet-col1 { width: 25px; }
.sheet-traits .sheet-col1 { width: 28px; }
.sheet-traits .sheet-col2 { width: 22px; }
.sheet-traits .sheet-col3 { width: 30px; }
.sheet-traits .sheet-col4 { width: 60px; }
.sheet-traits .sheet-row-stats .sheet-col0 { margin-left: 20px; width: calc(100% - 157px); }
.sheet-traits .sheet-row-stats .sheet-col0 {
margin-left: 20px;
width: calc(100% - 191px);
}
.sheet-traits.sheet-perks-disadvantages .sheet-col0 {
width: calc(100% - 140px);
}
.sheet-traits.sheet-perks-disadvantages .sheet-row-stats .sheet-col0 {
width: calc(100% - 161px);
}
/* -- show/hide die for FOA roll -- */
.sheet-row-stats button[name="roll_vsAFOA"] {
@@ -1740,13 +1775,13 @@ input[type="checkbox"][name="attr_toggle_turn_deceleration"]:not(:checked) ~ div
background: var(--header-bg);
}
.sheet-disadvantages .sheet-col0 { width: calc(100% - 137px); }
.sheet-disadvantages .sheet-col0 { width: calc(100% - 168px); }
.sheet-disadvantages .sheet-col0 input { text-align:left; }
.sheet-disadvantages .sheet-col1 { width: 25px; }
.sheet-disadvantages .sheet-col1 { width: 28px; }
.sheet-disadvantages .sheet-col2 { width: 22px; }
.sheet-disadvantages .sheet-col3 { width: 30px; }
.sheet-disadvantages .sheet-col4 { width: 60px; }
.sheet-disadvantages .sheet-row-stats .sheet-col0 { margin-left: 20px; width: calc(100% - 157px); }
.sheet-disadvantages .sheet-row-stats .sheet-col0 { margin-left: 20px; width: calc(100% - 189px); }
/* -- show/hide die for Control roll -- */
.sheet-row-stats button[name="roll_vsDSCR"] {
@@ -1798,14 +1833,14 @@ input[type="checkbox"][name="attr_toggle_turn_deceleration"]:not(:checked) ~ div
background: var(--header-bg);
}
.sheet-racial .sheet-col0 { width: calc(100% - 137px); }
.sheet-racial .sheet-col0 { width: calc(100% - 168px); }
.sheet-racial .sheet-col0 input {
text-align:left;
}
.sheet-racial .sheet-col-race {
width: calc(100% - 157px);
width: calc(100% - 188px);
margin-left: 20px;
}
@@ -1815,11 +1850,13 @@ input[type="checkbox"][name="attr_toggle_turn_deceleration"]:not(:checked) ~ div
}
.sheet-racial .sheet-col1 { width: 25px; }
.sheet-racial .sheet-col1 { width: 28px; }
.sheet-racial .sheet-col2 { width: 22px; }
.sheet-racial .sheet-col3 { width: 30px; }
.sheet-racial .sheet-col4 { width: 60px; }
.sheet-racial .sheet-row-stats .sheet-col0 { margin-left: 20px; width: calc(100% - 157px); }
.sheet-racial .sheet-row-stats .sheet-col0 {
margin-left: 20px;
width: calc(100% - 188px); }
/* -- if edit mode, hide toggle notes -- */
.sheet-racial .repcontainer.ui-sortable.editmode .sheet-checkbox,
@@ -2279,6 +2316,15 @@ input.sheet-box-techniques-new[value="0"] + div.sheet-techniques-revised {
background: #B7FFAA;
}
/* show/hide row id */
.sheet-technique-notebox input[name="attr_technique_row_type"][value="ST"] ~ .sheet-show-hide-row-id,
.sheet-technique-notebox input[name="attr_technique_row_type"][value="STRIKING"] ~ .sheet-show-hide-row-id,
.sheet-technique-notebox input[name="attr_technique_row_type"][value="DX"] ~ .sheet-show-hide-row-id,
.sheet-technique-notebox input[name="attr_technique_row_type"][value="IQ"] ~ .sheet-show-hide-row-id,
.sheet-technique-notebox input[name="attr_technique_row_type"][value="HT"] ~ .sheet-show-hide-row-id,
.sheet-technique-notebox input[name="attr_technique_row_type"][value="10"] ~ .sheet-show-hide-row-id {
display: none;
}
/* -- COMBAT -- */
.sheet-active-defense { width: calc(100% - 140px - 0.8em); }
@@ -3163,7 +3209,7 @@ input[name="attr_inventory_item_carried"][value="1"] ~ span.sheet-item-weight-to
.sheet-rolltemplate-skillRoll .sheet-container table.sheet-result td.sheet-subhead {
padding: 4px;
border-bottom: 1px solid black;
background-color: var(--box-bg);
background: var(--box-bg);
font-size: 12px;
font-weight: bold;
}
@@ -3194,11 +3240,11 @@ input[name="attr_inventory_item_carried"][value="1"] ~ span.sheet-item-weight-to
}
.sheet-rolltemplate-skillRoll .sheet-container table.sheet-result tr:nth-child(odd) {
background-color: var(--odd-row-bg);
background: var(--odd-row-bg);
}
.sheet-rolltemplate-skillRoll .sheet-container table.sheet-result tr:nth-child(even) {
background-color: var(--row-bg);
background: var(--row-bg);
}
.sheet-rolltemplate-skillRoll .sheet-container table.sheet-result span.sheet-success .inlinerollresult {
+411 -103
View File
@@ -79,6 +79,7 @@
<input type="hidden" name="attr_spells_points" value="0" />
<input type="hidden" name="attr_announcements_hide" value="0" />
<input type="hidden" name="attr_inventory_fixed_digits" value="0" />
<input type="hidden" name="attr_base_attribute_level" value="10" />
<!-- /HIDDEN FIELDS -->
<div class="heading-character-name">
@@ -97,12 +98,9 @@
<input type="text" name="attr_announcement_version" readonly="readonly" value="0" title="GURPS Character Sheet Version" />
</h4>
<ul>
<li>Rolltemplate results now match the selected sheet style, contributed by TamedFlame.</li>
<li>Text areas size can be resized in the browser but this caused overlapping issues. Reported by eVie fixed by TamedFlame.</li>
<li>Skills Tab. Expanded notes area. Added new text box to enter Skill Modifier notes normally found in the description of the skill. Added highlight row checbox.</li>
<li>Grimoire Tab. Changes College(s) to two text boxes; Primary College and Secondary College. Widened the text box for <b>Reason for Mod (Modifier)</b>.</li>
<li>Rolltemplate Ranged Attack Notes to help clarify rules. If failed by 10 or more, a note will show that critical miss doesn't apply to ranged attacks.</li>
<li>Inventory table. Add a location column.</li>
<li>Rolltemplate, Fabric sheet. Fixed display issue, reported by Ian.</li>
<li>Repeating Techniques, melee attacks, and ranged attacks can be linked to ST, Striking ST, DX, IQ, HT, or 10.</li>
<li>Traits Tab. Added a level column for repeating advantages, disadvantages, and racial traits.</li>
</ul>
<label class="check"><input type="checkbox" name="attr_announcements_hide" value="1">&nbsp;<b><span data-i18n="hide-until-next-update">Hide until next update</span></b></label>
<button type="action" name="act_view_updates_tab" class="reset"><span data-i18n="view-all-updates">View All Updates</span></button>
@@ -2721,6 +2719,14 @@ normal TL.
<div class="cell col0">
<span data-i18n="advantages-label">Advantages</span>
</div>
<div class="cell col1">
<div class="popup">
<span data-i18n="abbreviation-level-label">LVL</span>
</div>
<span class="tooltip">
<span data-i18n="trait-level-tooltip">Level of the trait.</span>
</span>
</div>
<div class="cell col1">
<div class="popup">
<span data-i18n="abbreviation-frequency-of-appearance-label">FOA</span>
@@ -2765,6 +2771,9 @@ PU2:126 = Power-Ups 2. Page 126<br />
<div class="cell col0">
<input type="text" name="attr_name" title="Macro table name: repeating_traits. Field name: name" />
</div>
<div class="cell col1">
<input type="number" name="attr_trait_level" min="0" step="1" title="Macro table name: repeating_traits. field name: trait_level" />
</div>
<div class="cell col1">
<input type="number" name="attr_foa" min="3" max="18" step="1" title="Macro table name: repeating_traits. Field name: foa" />
</div>
@@ -2968,6 +2977,14 @@ PU2:126 = Power-Ups 2. Page 126<br />
<div class="cell col0">
<span data-i18n="disadvantages-label">Disadvantages</span>
</div>
<div class="cell col1">
<div class="popup">
<span data-i18n="abbreviation-level-label">LVL</span>
</div>
<span class="tooltip">
<span data-i18n="trait-level-tooltip">Level of the trait.</span>
</span>
</div>
<div class="cell col1">
<div class="popup">
<span data-i18n="abbreviation-self-control-number-label">SCN</span>
@@ -3014,7 +3031,10 @@ PU2:126 = Power-Ups 2. Page 126<br />
<input type="text" name="attr_name" title="Macro table name: repeating_disadvantages. Field name: name" />
</div>
<div class="cell col1">
<input type="number" name="attr_control_rating" title="Macro table name: repeating_disadvantages. Field name: control_rating" />
<input type="number" min="0" step="1" name="attr_trait_level" title="Macro table name: repeating_disadvantages. Field name: trait_level" />
</div>
<div class="cell col1">
<input type="number" min="0" step="1" name="attr_control_rating" title="Macro table name: repeating_disadvantages. Field name: control_rating" />
</div>
<div class="cell col2">
<button type="roll" value="@{roll}&{template:skillRoll} {{sheetStyle=@{sheetstyle}}} {{type=Self-control Check}} {{activeDefense=[[0]]}} {{showSuccessLabel=[[1]]}} {{characterName=@{character_name}}} {{skillName=@{name}}} {{rollResult=[[3d6]]}} {{effectiveSkill=[[@{control_rating} + @{modifier}]]}} {{notes=@{notes}}} {{showNotes=[[@{show_notes}]]}} {{bookReference=@{ref}}} {{useCriticalPlusTen=[[@{use_critical_plus_10}]]}}" name="roll_vsDSCR" />
@@ -3049,6 +3069,14 @@ PU2:126 = Power-Ups 2. Page 126<br />
<div class="cell col0">
<span data-i18n="racial-traits-label">Racial Traits</span>
</div>
<div class="cell col1">
<div class="popup">
<span data-i18n="abbreviation-level-label">LVL</span>
</div>
<span class="tooltip">
<span data-i18n="trait-level-tooltip">Level of the trait.</span>
</span>
</div>
<div class="cell col1">
<div class="popup">
<span data-i18n="abbreviation-self-control-number-label">SCN</span>
@@ -3091,6 +3119,7 @@ PU2:126 = Power-Ups 2. Page 126<br />
<b><span data-i18n="race-label">Race</span>:</b> <input type="text" name="attr_race" title="Macro name: race" />
</div>
<div class="cell col1"></div>
<div class="cell col1"></div>
<div class="cell col2"></div>
<div class="cell col3">
<input type="text" name="attr_trait_racial_points" disabled="disabled" value="@{racial_points}" title="Macro name: trait_racial_points" />
@@ -3108,7 +3137,10 @@ PU2:126 = Power-Ups 2. Page 126<br />
<input type="text" name="attr_name" title="Macro table name: repeating_racial. Field name: name" />
</div>
<div class="cell col1">
<input type="number" name="attr_control_rating" title="Macro table name: repeating_racial. Field name: control_rating" />
<input type="number" min="1" step="1" name="attr_trait_level" title="Macro table name: repeating_racial. Field name: trait_level" />
</div>
<div class="cell col1">
<input type="number" min="1" step="1" name="attr_control_rating" title="Macro table name: repeating_racial. Field name: control_rating" />
</div>
<div class="cell col2">
<button type="roll" value="@{roll}&{template:skillRoll} {{sheetStyle=@{sheetstyle}}} {{type=Self-control Check}} {{activeDefense=[[0]]}} {{showSuccessLabel=[[1]]}} {{characterName=@{character_name}}} {{skillName=@{name}}} {{rollResult=[[3d6]]}} {{effectiveSkill=[[@{control_rating} + @{modifier}]]}} {{notes=@{notes}}} {{showNotes=[[@{show_notes}]]}} {{bookReference=@{ref}}} {{useCriticalPlusTen=[[@{use_critical_plus_10}]]}}" name="roll_vsRSCR" />
@@ -3972,7 +4004,7 @@ This example would represent the skill level on that row.
</div>
</div> <!-- .row -->
<div class="row">
<div class="row technique-notebox">
<div class="cell label">
<div class="popup">
<span data-i18n="link-label">Link:</span>
@@ -3981,14 +4013,21 @@ This example would represent the skill level on that row.
<span data-i18n="link-to-row-id-tooltip">Link this row to another row item.</span>
</span>
</div>
<div class="cell">
<input type="hidden" name="attr_technique_row_type" value="Skill" />
<div class="cell">
<select name="attr_technique_row_type">
<option value="Skill"><span data-i18n="option-skill">Skill</span></option>
<option value="Spell"><span data-i18n="option-spell">Spell</span></option>
<option value="Technique"><span data-i18n="option-technique">Technique</span></option>
<option value="ST"><span data-i18n="abreviation-strength">ST</span></option>
<option value="STRIKING"><span data-i18n="attribute-striking">Striking</span> <span data-i18n="abreviation-strength">ST</span></option>
<option value="DX"><span data-i18n="abreviation-dexterity">DX</span></option>
<option value="IQ"><span data-i18n="abreviation-intelligence">IQ</span></option>
<option value="HT"><span data-i18n="abreviation-health">HT</span></option>
<option value="10"><span data-i18n="abreviation-health">10</span></option>
</select>
</div>
<div class="cell col-row-id label">
<div class="cell col-row-id label show-hide-row-id">
<div class="popup">
<span data-i18n="row-id-label">Row ID:</span>
</div>
@@ -3996,11 +4035,13 @@ This example would represent the skill level on that row.
<span data-i18n="copy-paste-row-id-tooltip">
Copy/paste the Skill or Spell Row ID to link that skill to this technique.<br />
When the skill/spell is updated, the technique's parent name and base skill level<br />
will be updated.
will be updated.<br />
Once entered, this will change the Skill/Spell for this particular attack to match<br />
the skill/spell level of the Base Skill. Do not change this skill Level number manually.
</span>
</span>
</div>
<div class="cell col-input-medium">
<div class="cell col-input-medium show-hide-row-id">
<input type="hidden" name="attr_technique_skill_row_id_toggle" value="0" />
<input type="text" name="attr_technique_skill_row_id" title="Macro table name: repeating_techniquesrevised. Field name: technique_skill_row_id" />
</div>
@@ -4425,6 +4466,12 @@ parry if you've already attacked with it this turn<br />
<option value="Skill"><span data-i18n="option-skill">Skill</span></option>
<option value="Technique"><span data-i18n="option-technique">Technique</span></option>
<option value="Spell"><span data-i18n="option-spell">Spell</span></option>
<option value="ST"><span data-i18n="abreviation-strength">ST</span></option>
<option value="STRIKING"><span data-i18n="attribute-striking">Striking</span> <span data-i18n="abreviation-strength">ST</span></option>
<option value="DX"><span data-i18n="abreviation-dexterity">DX</span></option>
<option value="IQ"><span data-i18n="abreviation-intelligence">IQ</span></option>
<option value="HT"><span data-i18n="abreviation-health">HT</span></option>
<option value="10"><span data-i18n="abreviation-health">10</span></option>
</select>
</div>
<div class="cell col-row-id label">
@@ -4435,7 +4482,9 @@ parry if you've already attacked with it this turn<br />
<span data-i18n="copy-paste-row-id-tooltip">
Copy/paste the Skill or Spell Row ID to link that skill to this technique.<br />
When the skill/spell is updated, the technique's parent name and base skill level<br />
will be updated.
will be updated.<br />
Once entered, this will change the Skill/Spell for this particular attack to match<br />
the skill/spell level of the Base Skill. Do not change this skill Level number manually.
</span>
</span>
</div>
@@ -4628,6 +4677,12 @@ Optional Rules for Retreat can be found in MA123.
<option value="Skill"><span data-i18n="option-skill">Skill</span></option>
<option value="Technique"><span data-i18n="option-technique">Technique</span></option>
<option value="Spell"><span data-i18n="option-spell">Spell</span></option>
<option value="ST"><span data-i18n="abreviation-strength">ST</span></option>
<option value="STRIKING"><span data-i18n="attribute-striking">Striking</span> <span data-i18n="abreviation-strength">ST</span></option>
<option value="DX"><span data-i18n="abreviation-dexterity">DX</span></option>
<option value="IQ"><span data-i18n="abreviation-intelligence">IQ</span></option>
<option value="HT"><span data-i18n="abreviation-health">HT</span></option>
<option value="10"><span data-i18n="abreviation-health">10</span></option>
</select>
</div>
<div class="cell col-row-id label">
@@ -4638,7 +4693,9 @@ Optional Rules for Retreat can be found in MA123.
<span data-i18n="copy-paste-row-id-tooltip">
Copy/paste the Skill or Spell Row ID to link that skill to this technique.<br />
When the skill/spell is updated, the technique's parent name and base skill level<br />
will be updated.
will be updated.<br />
Once entered, this will change the Skill/Spell for this particular attack to match<br />
the skill/spell level of the Base Skill. Do not change this skill Level number manually.
</span>
</span>
</div>
@@ -4829,6 +4886,12 @@ It is similar to a Dodge and Retreat, but only effective against <strong>Ranged
<option value="Skill"><span data-i18n="option-skill">Skill</span></option>
<option value="Technique"><span data-i18n="option-technique">Technique</span></option>
<option value="Spell"><span data-i18n="option-spell">Spell</span></option>
<option value="ST"><span data-i18n="abreviation-strength">ST</span></option>
<option value="STRIKING"><span data-i18n="attribute-striking">Striking</span> <span data-i18n="abreviation-strength">ST</span></option>
<option value="DX"><span data-i18n="abreviation-dexterity">DX</span></option>
<option value="IQ"><span data-i18n="abreviation-intelligence">IQ</span></option>
<option value="HT"><span data-i18n="abreviation-health">HT</span></option>
<option value="10"><span data-i18n="abreviation-health">10</span></option>
</select>
</div>
<div class="cell col-row-id label">
@@ -4839,7 +4902,9 @@ It is similar to a Dodge and Retreat, but only effective against <strong>Ranged
<span data-i18n="copy-paste-row-id-tooltip">
Copy/paste the Skill or Spell Row ID to link that skill to this technique.<br />
When the skill/spell is updated, the technique's parent name and base skill level<br />
will be updated.
will be updated.<br />
Once entered, this will change the Skill/Spell for this particular attack to match<br />
the skill/spell level of the Base Skill. Do not change this skill Level number manually.
</span>
</span>
</div>
@@ -5019,6 +5084,12 @@ visualize what it will look like in chat.
<option value="Skill"><span data-i18n="option-skill">Skill</span></option>
<option value="Technique"><span data-i18n="option-technique">Technique</span></option>
<option value="Spell"><span data-i18n="option-spell">Spell</span></option>
<option value="ST"><span data-i18n="abreviation-strength">ST</span></option>
<option value="STRIKING"><span data-i18n="attribute-striking">Striking</span> <span data-i18n="abreviation-strength">ST</span></option>
<option value="DX"><span data-i18n="abreviation-dexterity">DX</span></option>
<option value="IQ"><span data-i18n="abreviation-intelligence">IQ</span></option>
<option value="HT"><span data-i18n="abreviation-health">HT</span></option>
<option value="10"><span data-i18n="abreviation-health">10</span></option>
</select>
</div>
<div class="cell col-row-id label">
@@ -5029,7 +5100,9 @@ visualize what it will look like in chat.
<span data-i18n="copy-paste-row-id-tooltip">
Copy/paste the Skill or Spell Row ID to link that skill to this technique.<br />
When the skill/spell is updated, the technique's parent name and base skill level<br />
will be updated.
will be updated.<br />
Once entered, this will change the Skill/Spell for this particular attack to match<br />
the skill/spell level of the Base Skill. Do not change this skill Level number manually.
</span>
</span>
</div>
@@ -5324,14 +5397,22 @@ maneuver to switch between different reaches.
</div> <!-- .row -->
<div class="melee-notebox">
<div class="row">
<div class="cell">
<!-- hidden input is used to show/hide Row ID: based on selection -->
<input type="hidden" name="attr_melee_row_type" value="Skill" />
<div class="cell margin-right">
<select name="attr_melee_row_type">
<option value="Skill"><span data-i18n="option-skill">Skill</span></option>
<option value="Spell"><span data-i18n="option-spell">Spell</span></option>
<option value="Technique"><span data-i18n="option-technique">Technique</span></option>
<option value="Technique"><span data-i18n="option-technique">Technique</span></option>
<option value="ST"><span data-i18n="abreviation-strength">ST</span></option>
<option value="STRIKING"><span data-i18n="attribute-striking">Striking</span> <span data-i18n="abreviation-strength">ST</span></option>
<option value="DX"><span data-i18n="abreviation-dexterity">DX</span></option>
<option value="IQ"><span data-i18n="abreviation-intelligence">IQ</span></option>
<option value="HT"><span data-i18n="abreviation-health">HT</span></option>
<option value="10"><span data-i18n="abreviation-health">10</span></option>
</select>
</div>
<div class="cell col-row-id label">
<div class="cell col-row-id label show-hide-row-id">
<div class="popup">
<span data-i18n="row-id-label">Row ID:</span>
</div>
@@ -5339,11 +5420,13 @@ maneuver to switch between different reaches.
<span data-i18n="copy-paste-row-id-tooltip">
Copy/paste the Skill or Spell Row ID to link that skill to this technique.<br />
When the skill/spell is updated, the technique's parent name and base skill level<br />
will be updated.
will be updated.<br />
Once entered, this will change the Skill/Spell for this particular attack to match<br />
the skill/spell level of the Base Skill. Do not change this skill Level number manually.
</span>
</span>
</div>
<div class="cell col-input-medium">
<div class="cell col-input-medium show-hide-row-id">
<input type="hidden" name="attr_melee_skill_row_id_toggle" value="0" />
<input type="text" name="attr_melee_skill_row_id" title="Macro table name: repeating_melee. Field name: melee_skill_row_id" />
</div>
@@ -5354,11 +5437,12 @@ will be updated.
</div>
<div class="tooltip tooltip-skills-ref">
<span data-i18n="modifier-tooltip">
Modifier applied to skill level.<br />
Enter the net value of all modifiers combined.<br />
Can be a positive or a negative number.<br />
Examples include a bonus from a Talent,<br />
default from another Skill or Technique,<br />
a piece of equipment, or a Perk.
Example: Enter 2 for Weapon’s Bond (+1) plus Magic (Accuracy: +1).<br />
Once entered, this will change the Skill/Spell Level for this <b>particular</b><br />
weapon to match the Base Skill/Spell level plus this MOD (Modifier).<br />
Do not change this level number manually.
</span>
</div>
</div>
@@ -5635,14 +5719,21 @@ to total shots fired. See page 373.
<div class="ranged-notebox">
<div class="row">
<div class="cell">
<input type="hidden" name="attr_ranged_row_type" value="Skill" />
<div class="cell">
<select name="attr_ranged_row_type">
<option value="Skill"><span data-i18n="option-skill">Skill</span></option>
<option value="Spell"><span data-i18n="option-spell">Spell</span></option>
<option value="Technique"><span data-i18n="option-technique">Technique</span></option>
<option value="ST"><span data-i18n="abreviation-strength">ST</span></option>
<option value="STRIKING"><span data-i18n="attribute-striking">Striking</span> <span data-i18n="abreviation-strength">ST</span></option>
<option value="DX"><span data-i18n="abreviation-dexterity">DX</span></option>
<option value="IQ"><span data-i18n="abreviation-intelligence">IQ</span></option>
<option value="HT"><span data-i18n="abreviation-health">HT</span></option>
<option value="10"><span data-i18n="abreviation-health">10</span></option>
</select>
</div>
<div class="cell col-row-id label">
<div class="cell col-row-id label show-hide-row-id">
<div class="popup">
<span data-i18n="row-id-label">Row ID:</span>
</div>
@@ -5650,11 +5741,13 @@ to total shots fired. See page 373.
<span data-i18n="copy-paste-row-id-tooltip">
Copy/paste the Skill or Spell Row ID to link that skill to this technique.<br />
When the skill/spell is updated, the technique's parent name and base skill level<br />
will be updated.
will be updated.<br />
Once entered, this will change the Skill/Spell for this particular attack to match<br />
the skill/spell level of the Base Skill. Do not change this skill Level number manually.
</span>
</span>
</div>
<div class="cell col-input-medium">
<div class="cell col-input-medium show-hide-row-id">
<input type="hidden" name="attr_ranged_skill_row_id_toggle" value="0" />
<input type="text" name="attr_ranged_skill_row_id" title="Macro table name: repeating_ranged. Field name: ranged_skill_row_id" />
</div>
@@ -5664,11 +5757,12 @@ will be updated.
</div>
<div class="tooltip tooltip-skills-ref">
<span data-i18n="modifier-tooltip">
Modifier applied to skill level.<br />
Enter the net value of all modifiers combined.<br />
Can be a positive or a negative number.<br />
Examples include a bonus from a Talent,<br />
default from another Skill or Technique,<br />
a piece of equipment, or a Perk.
Example: Enter 2 for Weapon’s Bond (+1) plus Magic (Accuracy: +1).<br />
Once entered, this will change the Skill/Spell Level for this <b>particular</b><br />
weapon to match the Base Skill/Spell level plus this MOD (Modifier).<br />
Do not change this level number manually.
</span>
</div>
</div>
@@ -6821,7 +6915,7 @@ For more information, see B409.
<span name="attr_costtotal" value="0.00" title="Macro table name: repeating_item. Field name: costtotal" />
</div>
<div class="cell col8" style="text-align: right;background-color: #c9c9c9;border-bottom: 1px solid white;border-right: 1px solid white;">
<input type="hidden" name="attr_inventory_item_carried" />
<input type="hidden" name="attr_inventory_item_carried" value="1" />
<span name="attr_weighttotal" value="0.000" class="item-weight-total" title="Macro table name: repeating_item. Field name: weighttotal" />
</div>
</div> <!-- .row -->
@@ -7322,6 +7416,16 @@ For more information, see B409.
<p>Pull Request: <span name="attr_latest_changes"></span></p>
<ul>
<li>Rolltemplate, Fabric sheet. Fixed display issue, reported by Ian.</li>
<li>Repeating Techniques, melee attacks, and ranged attacks can be linked to ST, Striking ST, DX, IQ, HT, or 10.</li>
<li>Traits Tab. Added a level column for repeating advantages, disadvantages, and racial traits.</li>
</ul>
<h4>Version: 2.3.6</h4>
<p>Pull Request: 06/02/2020</p>
<ul>
<li>Rolltemplate results now match the selected sheet style, contributed by TamedFlame.</li>
<li>Text areas size can be resized in the browser but this caused overlapping issues. Reported by eVie fixed by TamedFlame.</li>
@@ -9301,14 +9405,14 @@ See notes for weapon.</textarea>
</div>
<script type="text/worker">
// text/worker
// application/javascript
// type="text/worker"
// type="application/javascript"
var noop = function () {}; // do nothing callback function.
var version = "2.3.6";
var version = "2.3.7";
var latestChangesDate = "06/02/2020";
var latestChangesDate = "06/09/2020";
var modCascade = true;
@@ -14224,6 +14328,31 @@ See notes for weapon.</textarea>
}
});
// if an attribute is updated, update linked items
on("change:strength_display change:striking_st change:dexterity change:intelligence change:health", event => {
// if the weapon rowId is being used by an attribute, update the toggles
weapons = getMatchingWeaponsByAttributes();
// through could be more than one weapon tied to a skill
if (weapons.length) {
var updateFields = {};
weapons.forEach( function(weaponRow) {
var toggleFieldName = `${weaponRow.sectionName}_${weaponRow.rowId}_${weaponRow.prefix}_skill_row_id_toggle`;
updateFields[toggleFieldName] = 1;
});
setAttrs(updateFields);
}
});
/**
* Searches for matching weapon row data based on skill row id
@@ -14239,7 +14368,7 @@ See notes for weapon.</textarea>
*/
function getMatchinWeaponsFromSkillId(rowId) {
var matchingWeapons = [];
let matchingWeapons = [];
// loop through each cached weapon data
weaponRowIds.forEach( function(weaponRow) {
@@ -14255,6 +14384,46 @@ See notes for weapon.</textarea>
return matchingWeapons;
}
/**
* Searches for matching weapon row data based on attributes
* returns array of matching weapon objects: {skillRowId, sectionName, rowId, prefix}
* skillRowId = Skill Row OR attribute that weapon is linked to.
* sectionName = The name of the repeating section; repeating_melee or repeating_ranged
* rowId = Row id for the weapon in the repeating section
* prefix is used for labeling fields in a section to avoid the rule of re-using attr names
*
* @param string rowId Row ID of skill that might be linked to a weapon
*
* @return array
*/
function getMatchingWeaponsByAttributes()
{
let matchingWeapons = [];
const attributes = [
"ST",
"STRIKING",
"DX",
"IQ",
"HT"
];
// loop through each cached weapon data
weaponRowIds.forEach( function(weaponRow) {
// NOTE: skillRowId can also store the attribute type; ST | STRIKING | DX | IQ | HT | 10
if (attributes.includes(weaponRow.skillRowId)) {
matchingWeapons.push(weaponRow);
}
});
return matchingWeapons;
}
function getRowIdFromEventInfo(event, sectionName) {
@@ -14279,7 +14448,7 @@ See notes for weapon.</textarea>
}
// if linked melee data changes update the linked weapon skill
// if linked ranged data changes update the linked weapon skill
on('change:repeating_ranged:ranged_row_type change:repeating_ranged:ranged_skill_row_id change:repeating_ranged:ranged_skill_row_id_modifier change:repeating_ranged:ranged_skill_row_id_toggle', function(event){
getAttrs(["repeating_ranged_ranged_row_type"], function(values) {
@@ -14340,10 +14509,37 @@ See notes for weapon.</textarea>
var repeatingTableToUse = "";
// can be repeating | attribute
var updateMethod = "repeating";
switch (rowType) {
case "ST":
updateMethod = "attribute";
break;
case "STRIKING":
updateMethod = "attribute";
break;
case "DX":
updateMethod = "attribute";
break;
case "IQ":
updateMethod = "attribute";
break;
case "HT":
updateMethod = "attribute";
break;
case "10":
updateMethod = "attribute";
break;
case "Technique":
repeatingTableToUse = "repeating_techniquesrevised";
repeatingTableToUse = "repeating_techniquesrevised";
break;
case "Spell":
@@ -14355,100 +14551,63 @@ See notes for weapon.</textarea>
repeatingTableToUse = "repeating_skills";
break;
}
}
let skillRowIdFieldName = `${sectionName}_${prefix}_skill_row_id`;
var skillRowIdFieldName = `${sectionName}_${prefix}_skill_row_id`;
let skillRowModFieldName = `${sectionName}_${prefix}_skill_row_id_modifier`;
var skillRowModFieldName = `${sectionName}_${prefix}_skill_row_id_modifier`;
let skillMessageFieldName = `${sectionName}_${prefix}_skill_row_id_message`;
var skillMessageFieldName = `${sectionName}_${prefix}_skill_row_id_message`;
var skillMessageFieldLevel = `${sectionName}_${prefix}_skill_row_id_level`;
let skillMessageFieldLevel = `${sectionName}_${prefix}_skill_row_id_level`;
// for updating technique values
var parentFieldName = `${sectionName}_parent`;
let parentFieldName = `${sectionName}_parent`;
// for updating technique values
var baseSkillFieldName = `${sectionName}_base_level`;
let baseSkillFieldName = `${sectionName}_base_level`;
var weaponSkillFieldName = `${sectionName}_skill`;
let weaponSkillFieldName = `${sectionName}_skill`;
// if this gets changed, then the update linked weapon skill gets triggered
var skillRowIdToggleFieldName = `${sectionName}_${prefix}_skill_row_id_toggle`;
let skillRowIdToggleFieldName = `${sectionName}_${prefix}_skill_row_id_toggle`;
getAttrs([skillRowIdFieldName,
skillRowModFieldName
], function(values) {
var skillRowId = values[skillRowIdFieldName];
let skillRowId = values[skillRowIdFieldName];
var skillMod = +values[skillRowModFieldName];
let skillMod = +values[skillRowModFieldName];
// exit if there's no value
if (skillRowId.length === 0) {
// if updating using a repeating field make sure there's a row id to search for
if (updateMethod != "attribute" && skillRowId.length === 0 ) {
// clear the field
var updateFields = {};
let updateFields = {};
updateFields[skillMessageFieldName] = ``;
updateFields[skillMessageFieldLevel] = "";
setAttrs(updateFields);
setAttrs(updateFields, {silent: false}, callback);
} else if ( validSkillRowId(skillRowId) ) {
// if it's a good row id, let's update stuff
var skillFieldName = `${repeatingTableToUse}_${skillRowId}_level_mirror`;
var skillFieldNameOfSkill = `${repeatingTableToUse}_${skillRowId}_name`;
// if we're getting values from the techniques table, don't use level_mirror
if (repeatingTableToUse == "repeating_techniquesrevised") {
} else if (updateMethod == "attribute") {
skillFieldName = `${repeatingTableToUse}_${skillRowId}_level`;
}
// update the skill level for weapon.
getAttrs([skillFieldName, skillFieldNameOfSkill], function(skillValues) {
var skillLevel = +skillValues[skillFieldName];
var skillLevelFinal = skillLevel + skillMod;
var updateFields = {};
updateFields[weaponSkillFieldName] = skillLevelFinal;
updateFields[skillMessageFieldName] = skillValues[skillFieldNameOfSkill];
updateFields[skillMessageFieldLevel] = skillLevel;
// reset toggle to zero
updateFields[skillRowIdToggleFieldName] = 0;
// if repeating_techniquesrevised, also update the Parent skill name and base skill level
if (sectionName == "repeating_techniquesrevised") {
updateFields[parentFieldName] = skillValues[skillFieldNameOfSkill];
updateFields[baseSkillFieldName] = skillLevel;
}
setAttrs(updateFields, '', callback());
});
updateLinkWeaponSkillByAttribute(sectionName, skillRowIdFieldName, weaponSkillFieldName, skillMessageFieldName, skillMessageFieldLevel, skillRowIdToggleFieldName, parentFieldName, baseSkillFieldName, rowType, skillMod, callback);
} else if ( validSkillRowId(skillRowId) ) {
updateLinkedWeaponSkillByRepeatingRow(sectionName, weaponSkillFieldName, skillMessageFieldName, skillMessageFieldLevel, skillRowIdToggleFieldName, parentFieldName, baseSkillFieldName, repeatingTableToUse, skillRowId, skillMod, callback);
} else {
// show an error message
var updateFields = {};
let updateFields = {};
updateFields[skillMessageFieldName] = `Could not find ${rowType}.`;
setAttrs(updateFields);
setAttrs(updateFields, {silent: false}, callback);
}
@@ -14456,6 +14615,72 @@ See notes for weapon.</textarea>
}
/**
* Update the selected weapon skill by linking to another skill, technique, or spell
*
* @param string sectionName Name of section that is getting udpated
* @param string weaponSkillFieldName For Weapon that is getting updated
* @param string skillMessageFieldName For Weapon that is getting updated
* @param string skillMessageFieldLevel For Weapon that is getting updated
* @param string skillRowIdToggleFieldName For Weapon that is getting updated
* @param string parentFieldName For Weapon that is getting updated
* @param string baseSkillFieldName For Weapon that is getting updated
* @param string repeatingTableToUse Which table to get the skill level from
* @param string skillRowId Row Id that will get updated
* @param int skillMod Modifier to skill level
* @param function callback Callback function
*/
function updateLinkedWeaponSkillByRepeatingRow(sectionName, weaponSkillFieldName, skillMessageFieldName, skillMessageFieldLevel, skillRowIdToggleFieldName, parentFieldName, baseSkillFieldName, repeatingTableToUse, skillRowId, skillMod, callback)
{
// if it's a good row id, let's update stuff
let skillFieldName = `${repeatingTableToUse}_${skillRowId}_level_mirror`;
let skillFieldNameOfSkill = `${repeatingTableToUse}_${skillRowId}_name`;
// if we're getting values from the techniques table, don't use level_mirror
if (repeatingTableToUse == "repeating_techniquesrevised") {
skillFieldName = `${repeatingTableToUse}_${skillRowId}_level`;
}
// update the skill level for weapon.
getAttrs([skillFieldName, skillFieldNameOfSkill], function(skillValues) {
let skillLevel = +skillValues[skillFieldName];
let skillLevelFinal = skillLevel + skillMod;
let updateFields = {};
updateFields[weaponSkillFieldName] = skillLevelFinal;
updateFields[skillMessageFieldName] = skillValues[skillFieldNameOfSkill];
updateFields[skillMessageFieldLevel] = skillLevel;
// reset toggle to zero
updateFields[skillRowIdToggleFieldName] = 0;
// if repeating_techniquesrevised, also update the Parent skill name and base skill level
if (sectionName == "repeating_techniquesrevised") {
updateFields[parentFieldName] = skillValues[skillFieldNameOfSkill];
updateFields[baseSkillFieldName] = skillLevel;
}
setAttrs(updateFields, {silent: false}, callback);
});
}
/**
* Determines if the row id was cached in
* skillRowsIds | spellRowIds | techniqueRowIds
*/
function validSkillRowId( rowIdToFind ) {
var blnValid = skillRowIds.includes(rowIdToFind) || spellRowIds.includes(rowIdToFind) || techniqueRowIds.includes(rowIdToFind);
@@ -14463,6 +14688,89 @@ See notes for weapon.</textarea>
return blnValid;
}
/**
* Update the linked weapon skill by using an attribute stat
*
* @param string sectionName Name of section that is getting udpated
* @param string skillRowIdFieldName Copy the attribute used to this field.
* @param string weaponSkillFieldName For Weapon that is getting updated
* @param string skillMessageFieldName For Weapon that is getting updated
* @param string skillMessageFieldLevel For Weapon that is getting updated
* @param string skillRowIdToggleFieldName For Weapon that is getting updated
* @param string parentFieldName For Weapon that is getting updated
* @param string baseSkillFieldName For Weapon that is getting updated
* @param string rowType The attribute to use for setting weapon skill level
* @param int skillMod Modifier to skill level
* @param function callback Callback function
*/
function updateLinkWeaponSkillByAttribute(sectionName, skillRowIdFieldName, weaponSkillFieldName, skillMessageFieldName, skillMessageFieldLevel, skillRowIdToggleFieldName, parentFieldName, baseSkillFieldName, rowType, skillMod, callback)
{
let fieldName;
switch (rowType) {
case "ST":
fieldName = "strength_display";
break;
case "STRIKING":
fieldName = "striking_st";
break;
case "DX":
fieldName = "dexterity";
break;
case "IQ":
fieldName = "intelligence";
break;
case "HT":
fieldName = "health";
break;
case "10":
default:
fieldName = "base_attribute_level";
break;
}
// update the skill level for weapon.
getAttrs([fieldName], function(skillValues) {
console.log("skillValues: ", skillValues);
let skillLevel = +skillValues[fieldName];
let skillLevelFinal = skillLevel + skillMod;
let updateFields = {};
updateFields[skillRowIdFieldName] = rowType;
updateFields[weaponSkillFieldName] = skillLevelFinal;
updateFields[skillMessageFieldName] = rowType;
updateFields[skillMessageFieldLevel] = skillLevel;
// reset toggle to zero
updateFields[skillRowIdToggleFieldName] = 0;
// if repeating_techniquesrevised, also update the Parent skill name and base skill level
if (sectionName == "repeating_techniquesrevised") {
updateFields[parentFieldName] = rowType;
updateFields[baseSkillFieldName] = skillLevel;
}
setAttrs(updateFields, {silent: false}, callback);
});
}
/**
* This function is used to make sure the repeating
+4 -3
View File
@@ -47,7 +47,7 @@
"tab-grimoire": "Grimoire",
"tab-updates": "Updates",
"attributes-label": "Attributes",
"abbreviation-modifier-label": "Mod",
"abbreviation-modifier-label": "MOD",
"attributes-modifier-tooltip": "\nA modifier that will be applied to your <br>\nattribute. All derived attributes draw their<br>\nbase from your unmodified attributes.<br>\nTherefore this MOD will generally only<br> \naffect direct attribute rolls and skill rolls.\n\t\t\t\t\t\t\t",
"abbreviation-character-points-label": "Pts",
"abreviation-strength": "ST",
@@ -339,7 +339,7 @@
"row-id-repeating-tooltip": "\nThe row id can be used with macros.<br>\nExample field name: repeating_techniquesrevised_[the row id]_level<br>\nThis example would represent the skill level on that row.\n\t\t\t\t\t\t\t\t\t",
"link-label": "Link:",
"link-to-row-id-tooltip": "Link this row to another row item.",
"copy-paste-row-id-tooltip": "\nCopy/paste the Skill or Spell Row ID to link that skill to this technique.<br>\nWhen the skill/spell is updated, the technique's parent name and base skill level<br>\nwill be updated.\n\t\t\t\t\t\t\t\t\t",
"copy-paste-row-id-tooltip": "\nCopy/paste the Skill or Spell Row ID to link that skill to this technique.<br>\nWhen the skill/spell is updated, the technique's parent name and base skill level<br>\nwill be updated.<br />\nOnce entered, this will change the Skill/Spell for this particular attack to match<br />\nthe skill/spell level of the Base Skill. Do not change this skill Level number manually.",
"name-label": "Name:",
"hit-location-label": "Hit Location",
"hit-location-tooltip": "\nBasic Table B552.<br>\n<strong>Optinal:</strong> Rules<br> \nNew Hit Locations<br>\nLT100-103, MA137\n\t\t\t\t\t\t\t",
@@ -377,7 +377,7 @@
"damage-type-tooltip": "\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<th>Abbr</th>\n\t\t\t<th>Name</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t<tr><td>aff</td> <td>Affliction</td></tr>\n\t\t<tr><td>burn</td><td>Burning</td></tr>\n\t\t<tr><td>cor</td> <td>Corrosion</td></tr>\n\t\t<tr><td>cr</td> <td>Crushing</td></tr>\n\t\t<tr><td>cut</td> <td>Cutting</td></tr>\n\t\t<tr><td>fat</td> <td>Fatigue</td></tr>\n\t\t<tr><td>imp</td> <td>Impaling</td></tr>\n\t\t<tr><td>pi-</td> <td>Small Piercing</td></tr>\n\t\t<tr><td>pi</td> <td>Piercing</td></tr>\n\t\t<tr><td>pi+</td> <td>Large Piercing</td></tr>\n\t\t<tr><td>pi++</td><td>Huge Piercing</td></tr>\n\t\t<tr><td>spec</td><td>Special</td></tr>\n\t\t<tr><td>tox</td> <td>Toxic</td></tr>\n\t</tbody> \n</table>\n\t\t\t\t\t\t\t",
"reach-label": "Reach",
"melee-reach-tooltip": "\nThe distance in yards that the weapon can reach.<br>\n<strong>C</strong>: this weapon can be used in close combat.<br>\n<strong>*</strong>: the weapon is awkward, and requires a Ready<br>\nmaneuver to switch between different reaches.\n\t\t\t\t\t\t\t",
"modifier-tooltip": "\nModifier applied to skill level.<br>\nCan be a positive or a negative number.<br>\nExamples include a bonus from a Talent,<br>\ndefault from another Skill or Technique,<br>\na piece of equipment, or a Perk.\n\t\t\t\t\t\t\t\t\t",
"modifier-tooltip": "Enter the net value of all modifiers combined.<br />\nCan be a positive or a negative number.<br />\nExample: Enter 2 for Weapon’s Bond (+1) plus Magic (Accuracy: +1).<br />\nOnce entered, this will change the Skill/Spell Level for this <b>particular</b><br />\nweapon to match the Base Skill/Spell level plus this MOD (Modifier).<br />\nDo not change this level number manually.",
"weapon-notes-label": "Weapon Notes",
"melee-weapon-notes-tooltip": "\n<strong>Hint:</strong> Enter inline rolls for additional results. To show the selected arrow.<br>\nExample: Select Location: ?{Location|Head|Torso}\n\t\t\t\t\t\t\t\t\t",
"damage-notes-label": "Damage Notes",
@@ -488,6 +488,7 @@
"spell-label": "Spell",
"spell-tooltip": "\n\t\t\t\t\t\t\t\tName of spell\n\t\t\t\t\t\t\t",
"abbreviation-level-label": "LVL",
"trait-level-tooltip": "Level of the trait.",
"spell-skill-level-tooltip": "\n\t\t\t\t\t\t\t\tSkill level with spell\n\t\t\t\t\t\t\t",
"spell-difficulty-tooltip": "Difficulty",
"spell-skill-level-modifier-tooltip": "\n\t\t\t\t\t\t\t\tModifier applied to skill level.<br>\n\t\t\t\t\t\t\t\tCan be a positive or a negative number.<br>\n\t\t\t\t\t\t\t\tExamples include a bonus from a Talent,<br>\n\t\t\t\t\t\t\t\tdefault from another Skill or Technique,<br>\n\t\t\t\t\t\t\t\ta piece of equipment, or a Perk.\n\t\t\t\t\t\t\t",