diff --git a/Demon Gate/DemonGate.css b/Demon Gate/DemonGate.css
index 0830030305..4e35eeb0eb 100644
--- a/Demon Gate/DemonGate.css
+++ b/Demon Gate/DemonGate.css
@@ -106,7 +106,7 @@ input.sheet-tab5:checked~div.sheet-section-mystic,
input.sheet-tab6:checked~div.sheet-section-abilities,
input.sheet-tab7:checked~div.sheet-section-reputation,
input.sheet-tab8:checked~div.sheet-section-notes,
-input.sheet-tab9:checked~div.sheet-section-old-sheet {
+input.sheet-tab9:checked~div.sheet-section-old-skills {
display: block;
}
diff --git a/Demon Gate/DemonGate.html b/Demon Gate/DemonGate.html
index fa1b20d674..399561a423 100644
--- a/Demon Gate/DemonGate.html
+++ b/Demon Gate/DemonGate.html
@@ -3549,6 +3549,245 @@
return { level: 13, nextLevel: '-', glory: 99, goodTitle: 'Demigod', badTitle: 'Demigod' };
}
+ on("change:physmod change:menmod", function() {
+ UpdateNonCombatSkills();
+ });
+
+ on("change:repeating_NonCombatSkills:skillattribute change:repeating_NonCombatSkills:skillrating change:repeating_NonCombatSkills:skillbonus", function() {
+ var repeatingRowId = '';
+
+ UpdateAdditionalNonCombatSkill(repeatingRowId);
+
+ UpdateAllAdditionalNonCombatSkills();
+ });
+
+ on("change:Skill1Attribute change:Skill1Rating change:Skill1Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(1);
+ });
+
+ on("change:Skill2Attribute change:Skill2Rating change:Skill2Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(2);
+ });
+
+ on("change:Skill3Attribute change:Skill3Rating change:Skill3Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(3);
+ });
+
+ on("change:Skill4Attribute change:Skill4Rating change:Skill4Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(4);
+ });
+
+ on("change:Skill5Attribute change:Skill5Rating change:Skill5Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(5);
+ });
+
+ on("change:Skill6Attribute change:Skill6Rating change:Skill6Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(6);
+ });
+
+ on("change:Skill7Attribute change:Skill7Rating change:Skill7Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(7);
+ });
+
+ on("change:Skill8Attribute change:Skill8Rating change:Skill8Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(8);
+ });
+
+ on("change:Skill9Attribute change:Skill9Rating change:Skill9Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(9);
+ });
+
+ on("change:Skill10Attribute change:Skill10Rating change:Skill10Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(10);
+ });
+
+ on("change:Skill11Attribute change:Skill11Rating change:Skill11Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(11);
+ });
+
+ on("change:Skill12Attribute change:Skill12Rating change:Skill12Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(12);
+ });
+
+ on("change:Skill13Attribute change:Skill13Rating change:Skill13Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(13);
+ });
+
+ on("change:Skill14Attribute change:Skill14Rating change:Skill14Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(14);
+ });
+
+ on("change:Skill15Attribute change:Skill15Rating change:Skill15Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(15);
+ });
+
+ on("change:Skill16Attribute change:Skill16Rating change:Skill16Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(16);
+ });
+
+ on("change:Skill17Attribute change:Skill17Rating change:Skill17Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(17);
+ });
+
+ on("change:Skill18Attribute change:Skill18Rating change:Skill18Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(18);
+ });
+
+ on("change:Skill19Attribute change:Skill19Rating change:Skill19Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(19);
+ });
+
+ on("change:Skill20Attribute change:Skill20Rating change:Skill20Bonus", function()
+ {
+ UpdateFixedNonCombatSkill(20);
+ });
+
+ function UpdateAllFixedNonCombatSkills() {
+ console.log('Updating fixed non-combat skills');
+
+ // Keep this in sync with the number of fixed skill rows on the sheet
+ const fixedSkillSlots = 20;
+
+ for(let row = 1; row <= fixedSkillSlots; row++) {
+ UpdateFixedNonCombatSkill(row);
+ }
+ }
+
+ function UpdateFixedNonCombatSkill(row) {
+ let skillNameName = `Skill${row}Name`;
+ let skillAttributeName = `Skill${row}Attribute`;
+ let skillRatingName = `Skill${row}Rating`;
+ let skillBonusName = `Skill${row}Bonus`;
+ let skillTotalName = `Skill${row}Total`;
+ let skillDiceName = `Skill${row}Dice`;
+ let skillConditionModName = `Skill${row}ConditionMod`;
+
+ UpdateSkill(skillNameName, skillAttributeName, skillRatingName, skillBonusName, skillTotalName, skillDiceName, skillConditionModName);
+ }
+
+ function UpdateAllAdditionalNonCombatSkills() {
+ console.log('Updating all additional skills');
+
+ getSectionIDs("NonCombatSkills", function(ids) {
+ var details = '';
+
+ for(var i=0; i < ids.length; i++) {
+ var rowId = ids[i];
+
+ UpdateAdditionalNonCombatSkill(rowId);
+
+ var skillsRowName = `repeating_NonCombatSkills_${rowId}_`;
+ if(details !== '') {
+ details += ', \r\n';
+ }
+ details += skillsRowName;
+ }
+
+ setAttrs({RepeatedSkillFieldIds: details});
+ });
+ }
+
+ function UpdateAdditionalNonCombatSkill(repeatingRowId) {
+ var skillsRowName = `repeating_NonCombatSkills_${repeatingRowId}`;
+ if(repeatingRowId !== '') {
+ skillsRowName = skillsRowName + '_';
+ }
+
+ var skillNameName = `${skillsRowName}SkillName`;
+ var skillAttributeName = `${skillsRowName}SkillAttribute`;
+ var skillRatingName = `${skillsRowName}SkillRating`;
+ var skillBonusName = `${skillsRowName}SkillBonus`;
+ let skillTotalName = `${skillsRowName}SkillTotal`;
+ let skillDiceName = `${skillsRowName}SkillDice`;
+ let skillConditionModName = `${skillsRowName}SkillConditionMod`;
+
+ UpdateSkill(skillNameName, skillAttributeName, skillRatingName, skillBonusName, skillTotalName, skillDiceName, skillConditionModName);
+ }
+
+ function UpdateSkill(skillNameName, skillAttributeName, skillRatingName, skillBonusName, skillTotalName, skillDiceName, skillConditionModName) {
+ getAttrs(
+ ['StrRank',
+ 'DexRank',
+ 'BdyRank',
+ 'PrcRank',
+ 'IntRank',
+ 'WilRank',
+ 'ChrRank',
+ 'AllureRank',
+ 'PhysMod',
+ 'MenMod',
+ skillNameName,
+ skillAttributeName,
+ skillRatingName,
+ skillBonusName],
+ function(values) {
+
+ var skillName = values[skillNameName];
+ var skillAttribute = values[skillAttributeName];
+ var skillRating = Number(values[skillRatingName]);
+ var skillBonus = Number(values[skillBonusName]);
+
+ console.log(`Updating skill: ${skillName}`);
+
+ var calculatedAttributes = {};
+
+ // If no attribute is set, we can't calculate anything. It's probably a blank row anyway.
+ if(skillAttribute == '-') {
+ calculatedAttributes[skillTotalName] = '-';
+ calculatedAttributes[skillDiceName] = '';
+ calculatedAttributes[skillConditionModName] = 0;
+
+ setAttrs(calculatedAttributes);
+ return;
+ }
+
+ var attributeBonus = GetAttributeBonus(
+ skillAttribute,
+ values.StrRank,
+ values.DexRank,
+ values.BdyRank,
+ values.PrcRank,
+ values.IntRank,
+ values.WilRank,
+ values.ChrRank,
+ values.AllureRank
+ );
+
+ var conditionMod = GetConditionModifier(skillAttribute, values.PhysMod, values.MenMod);
+
+ var total = "-";
+ if(skillRating > 0)
+ {
+ total = attributeBonus + skillRating + skillBonus;
+ }
+
+ calculatedAttributes[skillTotalName] = total;
+ calculatedAttributes[skillDiceName] = GetDice(total);
+ calculatedAttributes[skillConditionModName] = conditionMod;
+
+ setAttrs(calculatedAttributes);
+ });
+ }
+
on("sheet:opened", function()
{
const converted = "converted";
@@ -3629,8 +3868,8 @@
Reputation
Notes
-
- Old Sheet
+
+ Skills (Old)
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+ |
+
-
-
-
-
+
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+ |
+
-
+
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+ |
+
-
+
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+ |
+
-
+
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+ |
+
-
+
@@ -8557,7 +6833,7 @@
- | Total Armor Rating |
+ Total Armor Value |
|
@@ -11700,943 +9976,3031 @@
-
-
-
Old Sheet - Please Do Not Use
+
+
Old Full List of Skills - Please Do Not Use
-
Users of the old sheet - please copy your character details out of this tab and into the main sheet. This tab will be removed soon.
+
This full list of skills is being removed
+
GMs and players found it hard to see which skills a character actually had ranks in
+
+
Please copy your skills out of this tab and into the main skills tab
+
This tab will be removed soon
-
Player Information
-
-
-
-
-
-
-
-
-
-
Actions and Attacks
-
-
-
-
-
-
Defense
-
-
-
-
-
Attributes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Character Description
-
-
-
-
-
Combat Skills
-
-
-
-
-
Weapon Proficiencies
-
-
-
-
-
Specializations
-
-
-
-
-
Character Skills
-
-
-
-
-
-
Fluent Languages
-
-
-
-
-
Weapons
-
-
-
-
-
Armor and Clothing
-
-
-
-
-
-
Resistances
-
-
-
-
-
Equipent(belt)
-
-
-
-
-
Racial Abilities
-
-
-
-
-
Class Abilities
-
-
-
-
-
Character Traits
-
-
-
-
-
Talents
-
-
-
-
-
Backpack or Stash
-
-
-
-
-
Loot
-
-
-
-
-
-
Misc Treasure
-
-
-
-
-
Hideouts
-
-
-
-
-
Total Hideouts
-
-
-
-
-
Religious Beliefs
-
-
-
-
-
-
-
Astrological Sign
-
-
-
-
-
Reputation
-
-
-
-
-
Reputation Log
-
-
-
-
-
Reputation Locations
-
-
-
-
-
Character Background
-
-
-
-
-
Vessel and Transport
-
-
-
-
-
Creature Transport
-
-
-
-
-
Characters Known
-
-
-
-
-
-
Physical Condition Gauge
-
-
-
-
-
Mental Condition Gauge
-
-
-
-
-
Spell Book
-
-
-
-
-
Alchemical Formulas
-
-
-
-
-
Chi Abilities
-
-
+
+
+
+
+
Character Skills
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Character Skills
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-