From d9998ae1d9e6d1a2c3373d3691af10262150fabf Mon Sep 17 00:00:00 2001 From: LilLiteralist <104447108+LilLiteralist@users.noreply.github.com> Date: Tue, 19 Sep 2023 23:36:12 +0300 Subject: [PATCH] Add option to not be queried for other modifiers to most rolls. --- .../StarWarsSagaEdition.html | 125 +++++++++++++++--- 1 file changed, 105 insertions(+), 20 deletions(-) diff --git a/Star Wars Saga Edition/StarWarsSagaEdition.html b/Star Wars Saga Edition/StarWarsSagaEdition.html index 23475536f166..57660cea055e 100644 --- a/Star Wars Saga Edition/StarWarsSagaEdition.html +++ b/Star Wars Saga Edition/StarWarsSagaEdition.html @@ -5,7 +5,7 @@
-
+
Characters
@@ -18,12 +18,13 @@  Skill Focus as 1/2 level house rule
+  No "Other Modifiers" prompt for skills
+  No "Other Modifiers" prompt for attacks (nonfunctional)
 Speed notes
 Damage Reduction
 Shield Rating
 Immunities
-  Ask for Other Modifiers before rolling skill checks
-   +
@@ -69,15 +70,17 @@  Treat Injury
 Use Computer
 Use the Force
-  Custom skills
+  Custom skills
-
-
Vehicle Sheet
+
+
Vehicles
+  No "Other Modifiers" prompt for attacks
+  No "Other Modifiers" prompt for skills
 Constitution score (for Yuuzhan Vong vehicles)
 Grapple modifier increases beyond Colossal size
@@ -2097,7 +2100,7 @@ CON
Constitution
- + INT
Intelligence
@@ -3890,7 +3893,11 @@ - + + + + + @@ -3950,6 +3957,7 @@
Weapons
+
@@ -3971,9 +3979,11 @@ - - + @@ -4005,6 +4015,7 @@
Crew Assignment and Skills
+
 =  @@ -4054,7 +4071,10 @@
Deception
Deceptive Appearance
- + + + +  =  @@ -4063,7 +4083,10 @@
Initiative - + + + +  =  @@ -4072,7 +4095,10 @@
Mechanics - + + + +  =  @@ -4081,7 +4107,10 @@
Perception - + + + +  =  @@ -4090,7 +4119,10 @@
Pilot - + + + +  =  @@ -4100,7 +4132,10 @@
Stealth - + + + +  =  @@ -4109,7 +4144,10 @@
Use Computer - + + + +  =  @@ -4211,7 +4249,7 @@
For help, please see the wiki page.
-Last updated: 31 August 2023 +Last updated: 19 September 2023
@@ -5229,6 +5267,21 @@ setAttrs({"Status": status}); }); }); + +on('change:QueryAttackModifier', () => { + const section = 'attack'; + repeatingSectionIds(`repeating_${section}`, idarray => { + const fieldnames = idarray.reduce((rows,id) => [...rows, `repeating_${section}_${id}_vehicle-AttackModifierCheckbox`], ''); + getAttrs(['vehicle-AttackModifierCheckbox', ...fieldnames], v => { + const output = {}; + idarray.forEach(id => { + output[`repeating_${section}_${id}_vehicle-AttackModifierCheckbox`] = v['vehicle-AttackModifierPrompt']; + }); + setAttrs(output); + }); + }); +}); + on("change:FocusHouseRule", function() { getAttrs(["FocusHouseRule","AcrobaticsFormula","AthleticsFormula","ClimbFormula","DeceptionFormula","EnduranceFormula","GatherInformationFormula","InitiativeFormula","JumpFormula","Knowledge-BureaucracyFormula","Knowledge-GalacticLoreFormula","Knowledge-LifeSciencesFormula","Knowledge-PhysicalScienceFormula","Knowledge-SocialScienceFormula","Knowledge-TacticsFormula","Knowledge-TechnologyFormula","MechanicsFormula","PerceptionFormula","PersuasionFormula","PilotFormula","RideFormula","StealthFormula","SurvivalFormula","SwimFormula","TreatInjuryFormula","UseComputerFormula","UsetheForceFormula"], function(values) { let FHR = values.FocusHouseRule||0; @@ -5560,6 +5613,38 @@ setAttrs({"repeating_attack_vehicle-WeaponPosition":weaponposition}); }); }); +/* THIS SECTION IS NO LONGER NEEDED, BUT SOMETHING LIKE IT WILL BE NECESSARY FOR replace IN THE REPEATING ATTACKS +on("change:vehicle-AttackModifierPrompt", function(v) { + getAttrs(["vehicle-AttackModifierPrompt"], function(v) { + let VehicleAttackModPrompt = v["vehicle-AttackModifierPrompt"]; + console.log("Checkbox: " + VehicleAttackModPrompt); + getSectionIDs("repeating_attack", function(IDArray) { + var fieldNames = []; + var output = []; + for (var i=0; i < IDArray.length; i++) { + fieldNames.push("repeating_attack_" + IDArray[i] + "_vehicle-AttackModifierCheckbox"); + output.push("repeating_attack_" + IDArray[i] + "_vehicle-AttackModifierCheckbox" + ":" + VehicleAttackModPrompt); + } + console.log(output); + setAttrs({output}); + }); + }); +}); + +on('change:vehicle-AttackModifierPrompt', () => { + const section = 'attack'; + repeatingSectionIds(`repeating_${section}`, idarray => { + const fieldnames = idarray.reduce((rows,id) => [...rows, `repeating_${section}_${id}_vehicle-AttackModifierCheckbox`], ''); + getAttrs(['vehicle-AttackModifierCheckbox', ...fieldnames], v => { + const output = {}; + idarray.forEach(id => { + output[`repeating_${section}_${id}_vehicle-AttackModifierCheckbox`] = v['vehicle-AttackModifierPrompt']; + }); + setAttrs(output); + }); + }); +}); +*/ // ====== Functions ====== \\ var ArmorPerception = function() {
 +  + + +