diff --git a/Demon Gate/DemonGate.css b/Demon Gate/DemonGate.css index 2c8c6af344f3..27d155d57bde 100644 --- a/Demon Gate/DemonGate.css +++ b/Demon Gate/DemonGate.css @@ -105,8 +105,7 @@ input.sheet-tab4:checked~div.sheet-section-gear, 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-skills { +input.sheet-tab8:checked~div.sheet-section-notes { display: block; } @@ -966,10 +965,12 @@ tr.sheet-spell-spacer-row td { .sheet-rolltemplate-percentile .sheet-template-success { color: darkgreen; + font-size: 20px; } .sheet-rolltemplate-percentile .sheet-template-failure { color: maroon; + font-size: 20px; } .sheet-rolltemplate-simple .sheet-template-text-prominent, @@ -1022,7 +1023,7 @@ tr.sheet-spell-spacer-row td { .sheet-rolltemplate-darkmode.sheet-rolltemplate-spell-effect .sheet-template-subtitle, .sheet-rolltemplate-darkmode.sheet-rolltemplate-simple .sheet-template-subtitle, .sheet-rolltemplate-darkmode.sheet-rolltemplate-two-part .sheet-template-subtitle { - color: #FF8888; + color: #ddd9c3; background-color: #590902; } @@ -1067,7 +1068,7 @@ tr.sheet-spell-spacer-row td { .sheet-rolltemplate-darkmode.sheet-rolltemplate-spell-effect .inlinerollresult.fullfail, .sheet-rolltemplate-darkmode.sheet-rolltemplate-simple .inlinerollresult.fullfail, .sheet-rolltemplate-darkmode.sheet-rolltemplate-two-part .inlinerollresult.fullfail { - border-color: #970303; + border-color: #b30000; } .sheet-rolltemplate-darkmode.sheet-rolltemplate-text .inlinerollresult.fullcrit, @@ -1082,4 +1083,12 @@ tr.sheet-spell-spacer-row td { .sheet-rolltemplate-darkmode.sheet-rolltemplate-simple .inlinerollresult.fullcrit, .sheet-rolltemplate-darkmode.sheet-rolltemplate-two-part .inlinerollresult.fullcrit { border-color: #028502; +} + +.sheet-rolltemplate-darkmode.sheet-rolltemplate-percentile .sheet-template-success { + color: #05AD05; +} + +.sheet-rolltemplate-darkmode.sheet-rolltemplate-percentile .sheet-template-failure { + color: #f80303; } \ No newline at end of file diff --git a/Demon Gate/DemonGate.html b/Demon Gate/DemonGate.html index 337faebcfc47..34a606b570d6 100644 --- a/Demon Gate/DemonGate.html +++ b/Demon Gate/DemonGate.html @@ -553,7 +553,7 @@ setAttrs({StrDice: GetDice(rank)}); UpdateDmgMod(); setAttrs({WtAllow: GetWtAllow(total)}); - UpdateStrSkills(); + updateAllSkills(); }); } @@ -580,7 +580,7 @@ UpdateDefMod(); UpdateInitMod(); UpdateMvmt(); - UpdateDexSkills(); + updateAllSkills(); }); } @@ -625,7 +625,7 @@ setAttrs({BdyDice: String(GetDice(rank))}); setAttrs({BdySave: GetBodySave(total)}); UpdateToughness(); - UpdateBdySkills(); + updateAllSkills(); var prevHPAdj = values.HPAdj; var newHPAdj = GetHPAdj(total); @@ -681,7 +681,7 @@ setAttrs({PrcDice: String(GetDice(rank))}); UpdateShotDmgMod(); UpdateRange(); - UpdatePrcSkills(); + updateAllSkills(); }); } @@ -719,7 +719,7 @@ setAttrs({SpellTime: GetSpellTime(total)}); setAttrs({SpText: GetSpellTimeText(total)}); setAttrs({Langs: GetLangs(total)}); - UpdateIntSkills(); + updateAllSkills(); }); } @@ -744,7 +744,7 @@ setAttrs({WilDice: String(GetDice(rank))}); UpdateMenDefMod(); UpdateFortitude(); - UpdateWilSkills(); + updateAllSkills(); var prevManaAdj = values.ManaAdj; var newManaAdj = GetHPAdj(total); @@ -785,7 +785,7 @@ setAttrs({ChrDice: String(GetDice(rank))}); UpdateSocialPool(); setAttrs({RepBonus: GetRepBonus(total)}); - UpdateChrSkills(); + updateAllSkills(); }); } @@ -807,154 +807,7 @@ setAttrs({BtyTotal: Number(total)}); }); } - - function UpdateStrSkills() - { - updateAllSkills(); - - UpdateLifting(); - } - - function UpdateBdySkills() - { - updateAllSkills(); - - UpdateDrinking(); - UpdateDrugTolerance(); - UpdateEndurance(); - } - - function UpdateDexSkills() - { - updateAllSkills(); - - UpdateAcrobatics(); - UpdateClimbing(); - UpdateDancing(); - UpdateEscapeArtistry(); - UpdateFlying(); - UpdateJuggling(); - UpdateJumping(); - UpdateLockPicking(); - UpdateRiding(); - UpdateRunning(); - UpdateStealing(); - UpdateStealth(); - UpdateSwimming(); - UpdateTeamster(); - } - - function UpdatePrcSkills() - { - updateAllSkills(); - - UpdateArt(); - UpdateAstronomy(); - UpdateConcealment(); - UpdateCooking(); - UpdateDetectLies(); - UpdateDisguise(); - UpdateFishing(); - UpdateForaging(); - UpdateForgery(); - UpdateGambling(); - UpdateGemCutting(); - UpdateGlassBlowing(); - UpdateHunting(); - UpdateLipReading(); - UpdateListening(); - UpdateLooting(); - UpdateMapping(); - UpdateMusic(); - UpdateNavigation(); - UpdateObservation(); - UpdatePottery(); - UpdateSewing(); - UpdateTracking(); - UpdateTrailing(); - UpdateTraps(); - UpdateWeatherSense(); - UpdateWeaving(); - } - - function UpdateIntSkills() - { - updateAllSkills(); - - UpdateAlchemy(); - UpdateAppraisal(); - UpdateArmorer(); - UpdateAstrology(); - UpdateBlacksmith(); - UpdateBowyer(); - UpdateBrewing(); - UpdateCarpentry(); - UpdateCircleMagic(); - UpdateCreatureLore(); - UpdateCrystalLore(); - UpdateDecipher(); - UpdateDemonLore(); - UpdateFarming(); - UpdateHealing(); - UpdateHeraldry(); - UpdateHistory(); - UpdateLaw(); - UpdateLeatherWorking(); - UpdateLiguistics(); - UpdateLocksmith(); - UpdateMasonry(); - UpdateMedicine(); - UpdateMining(); - UpdatePlantLore(); - UpdatePoisons(); - UpdateReadWrite(); - UpdateResearch(); - UpdateSeafaring(); - UpdateSiegeCraft(); - UpdateSkyfaring(); - UpdateSpellCraft(); - UpdateStreetSurvival(); - UpdateTeaching(); - UpdateThaumaturgy(); - UpdateTheology(); - UpdateTinker(); - UpdateWeaponsmith(); - UpdateWildSurvival(); - UpdateLangSkills(); - } - - function UpdateWilSkills() - { - updateAllSkills(); - - UpdateBattleChant(); - UpdateBloodMagic(); - UpdateConjuring(); - UpdateExorcism(); - UpdateMeditation(); - UpdateNecromancy(); - } - - function UpdateChrSkills() - { - updateAllSkills(); - - UpdateActing(); - UpdateAnimalKinship(); - UpdateBarter(); - UpdateBegging(); - UpdateDeception(); - UpdateImpersonation(); - UpdateInterrogation(); - UpdateLeadership(); - UpdatePhilosophy(); - UpdateSeduction(); - UpdateSinging(); - UpdateSpeech(); - UpdateStoryTelling(); - UpdateStreetwise(); - } - + function UpdateLevel() { getAttrs(["MaxSaga"], function(values) @@ -993,3265 +846,1996 @@ }); } - function UpdateAcrobatics() - { - getAttrs(["DexRank", "AcrobatRating", "AcrobatBonus"], function(values) - { - var total = "-"; - if(Number(values.AcrobatRating) > 0) - { - total = Number(values.DexRank) + Number(values.AcrobatRating) + Number(values.AcrobatBonus); - } - setAttrs({AcrobatTotal: total}); - setAttrs({AcrobatDice: GetDice(total)}); - }); + function updateAllSkills() { + updateAllFixedNonCombatSkills(); + updateAllAdditionalSkills(); } - function UpdateActing() - { - getAttrs(["ChrRank", "ActRating", "ActBonus"], function(values) - { - var total = "-"; - if(Number(values.ActRating) > 0) - { - total = Number(values.ChrRank) + Number(values.ActRating) + Number(values.ActBonus); + function updateAllAdditionalSkills() { + console.log('Updating all additional skills'); + + getSectionIDs("skills", function(ids) { + var details = ''; + + for(var i=0; i < ids.length; i++) { + var rowId = ids[i]; + + UpdateAdditionalSkill(rowId); + + var skillsRowName = `repeating_skills_${rowId}_`; + if(details !== '') { + details += ', \r\n'; + } + details += skillsRowName; } - setAttrs({ActTotal: total}); - setAttrs({ActDice: GetDice(total)}); + + setAttrs({RepeatedSkillFieldIds: details}); }); } - function UpdateAlchemy() - { - getAttrs(["IntRank", "AlchRating", "AlchBonus"], function(values) - { + function UpdateAdditionalSkill(repeatingRowId) { + var skillsRowName = `repeating_skills_${repeatingRowId}`; + if(repeatingRowId !== '') { + skillsRowName = skillsRowName + '_'; + } + + var skillNameName = `${skillsRowName}SkillName`; + var skillAttributeName = `${skillsRowName}SkillAttribute`; + var skillRatingName = `${skillsRowName}SkillRating`; + var skillBonusName = `${skillsRowName}SkillBonus`; + + getAttrs( + ['StrRank', + 'DexRank', + 'BdyRank', + 'PrcRank', + 'IntRank', + 'WilRank', + 'ChrRank', + '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]); + + var attributeBonus = GetAttributeBonus( + skillAttribute, + values.StrRank, + values.DexRank, + values.BdyRank, + values.PrcRank, + values.IntRank, + values.WilRank, + values.ChrRank + ); + + var conditionMod = GetConditionModifier(skillAttribute, values.PhysMod, values.MenMod); + var total = "-"; - if(Number(values.AlchRating) > 0) + if(skillRating > 0) { - total = Number(values.IntRank) + Number(values.AlchRating) + Number(values.AlchBonus); + total = attributeBonus + skillRating + skillBonus; } - setAttrs({AlchTotal: total}); - setAttrs({AlchDice: GetDice(total)}); + + var calculatedAttributes = {}; + calculatedAttributes[`${skillsRowName}SkillTotal`] = total; + calculatedAttributes[`${skillsRowName}SkillDice`] = GetDice(total); + calculatedAttributes[`${skillsRowName}SkillConditionMod`] = conditionMod; + + setAttrs(calculatedAttributes); }); } - function UpdateAnimalKinship() + function UpdateLangSkills() { - getAttrs(["ChrRank", "AnimalRating", "AnimalBonus"], function(values) + getAttrs(["IntRank", "Lang1Rating", "Lang1Bonus", "Lang2Rating", "Lang2Bonus", "Lang3Rating", "Lang3Bonus"], function(values) { var total = "-"; - if(Number(values.AnimalRating) > 0) + if(Number(values.Lang1Rating) > 0) { - total = Number(values.ChrRank) + Number(values.AnimalRating) + Number(values.AnimalBonus); + total = Number(values.IntRank) + Number(values.Lang1Rating) + Number(values.Lang1Bonus); } - setAttrs({AnimalTotal: total}); - setAttrs({AnimalDice: GetDice(total)}); - }); - } + setAttrs({Lang1Total: total}); + setAttrs({Lang1Dice: GetDice(total)}); - function UpdateAppraisal() - { - getAttrs(["IntRank", "AppraisalRating", "AppraisalBonus"], function(values) - { - var total = "-"; - if(Number(values.AppraisalRating) > 0) + total = 0; + if(Number(values.Lang2Rating) > 0) { - total = Number(values.IntRank) + Number(values.AppraisalRating) + Number(values.AppraisalBonus); + total = Number(values.IntRank) + Number(values.Lang2Rating) + Number(values.Lang2Bonus); } - setAttrs({AppraisalTotal: total}); - setAttrs({AppraisalDice: GetDice(total)}); - }); - } + setAttrs({Lang2Total: total}); + setAttrs({Lang2Dice: GetDice(total)}); - function UpdateArmorer() - { - getAttrs(["IntRank", "ArmorerRating", "ArmorerBonus"], function(values) - { - var total = "-"; - if(Number(values.ArmorerRating) > 0) + total = 0; + if(Number(values.Lang3Rating) > 0) { - total = Number(values.IntRank) + Number(values.ArmorerRating) + Number(values.ArmorerBonus); + total = Number(values.IntRank) + Number(values.Lang3Rating) + Number(values.Lang3Bonus); } - setAttrs({ArmorerTotal: total}); - setAttrs({ArmorerDice: GetDice(total)}); + setAttrs({Lang3Total: total}); + setAttrs({Lang3Dice: GetDice(total)}); }); } - function UpdateArt() + function UpdateWeaponDmgMods() { - getAttrs(["PrcRank", "ArtRating", "ArtBonus"], function(values) - { - var total = "-"; - if(Number(values.ArtRating) > 0) - { - total = Number(values.PrcRank) + Number(values.ArtRating) + Number(values.ArtBonus); - } - setAttrs({ArtTotal: total}); - setAttrs({ArtDice: GetDice(total)}); - }); + UpdateW1DmgMod(); + UpdateW2DmgMod(); + UpdateW3DmgMod(); + UpdateW4DmgMod(); + UpdateW5DmgMod(); + UpdateW6DmgMod(); } - function UpdateAstrology() + function UpdateW1DmgMod() { - getAttrs(["IntRank", "AstroRating", "AstroBonus"], function(values) + getAttrs(["W1Type", "DmgModTotal", "ShotDmgModTotal"], function(values) { - var total = "-"; - if(Number(values.AstroRating) > 0) + var x = 0; + if(values.W1Type == "m") { - total = Number(values.IntRank) + Number(values.AstroRating) + Number(values.AstroBonus); + x = values.DmgModTotal; } - setAttrs({AstroTotal: total}); - setAttrs({AstroDice: GetDice(total)}); - }); - } - - function UpdateAstronomy() - { - getAttrs(["PrcRank", "AstronomyRating", "AstronomyBonus"], function(values) - { - var total = "-"; - if(Number(values.AstronomyRating) > 0) + else if(values.W1Type == "r") { - total = Number(values.PrcRank) + Number(values.AstronomyRating) + Number(values.AstronomyBonus); + x = values.ShotDmgModTotal; } - setAttrs({AstronomyTotal: total}); - setAttrs({AstronomyDice: GetDice(total)}); + setAttrs({W1DmgMod: x}); }); } - function UpdateBarter() + function UpdateW2DmgMod() { - getAttrs(["ChrRank", "BarterRating", "BarterBonus"], function(values) + getAttrs(["W2Type", "DmgModTotal", "ShotDmgModTotal"], function(values) { - var total = "-"; - if(Number(values.BarterRating) > 0) + var x = 0; + if(values.W2Type == "m") { - total = Number(values.ChrRank) + Number(values.BarterRating) + Number(values.BarterBonus); + x = values.DmgModTotal; } - setAttrs({BarterTotal: total}); - setAttrs({BarterDice: GetDice(total)}); - }); - } - - function UpdateBattleChant() - { - getAttrs(["WilRank", "ChantRating", "ChantBonus"], function(values) - { - var total = "-"; - if(Number(values.ChantRating) > 0) + else if(values.W2Type == "r") { - total = Number(values.WilRank) + Number(values.ChantRating) + Number(values.ChantBonus); + x = values.ShotDmgModTotal; } - setAttrs({ChantTotal: total}); - setAttrs({ChantDice: GetDice(total)}); + setAttrs({W2DmgMod: x}); }); } - function UpdateBegging() + function UpdateW3DmgMod() { - getAttrs(["ChrRank", "BegRating", "BegBonus"], function(values) + getAttrs(["W3Type", "DmgModTotal", "ShotDmgModTotal"], function(values) { - var total = "-"; - if(Number(values.BegRating) > 0) + var x = 0; + if(values.W3Type == "m") { - total = Number(values.ChrRank) + Number(values.BegRating) + Number(values.BegBonus); + x = values.DmgModTotal; } - setAttrs({BegTotal: total}); - setAttrs({BegDice: GetDice(total)}); - }); - } - - function UpdateBlacksmith() - { - getAttrs(["IntRank", "BlackRating", "BlackBonus"], function(values) - { - var total = "-"; - if(Number(values.BlackRating) > 0) + else if(values.W3Type == "r") { - total = Number(values.IntRank) + Number(values.BlackRating) + Number(values.BlackBonus); + x = values.ShotDmgModTotal; } - setAttrs({BlackTotal: total}); - setAttrs({BlackDice: GetDice(total)}); + setAttrs({W3DmgMod: x}); }); } - function UpdateBloodMagic() + function UpdateW4DmgMod() { - getAttrs(["WilRank", "BloodRating", "BloodBonus"], function(values) + getAttrs(["W4Type", "DmgModTotal", "ShotDmgModTotal"], function(values) { - var total = "-"; - if(Number(values.BloodRating) > 0) + var x = 0; + if(values.W4Type == "m") { - total = Number(values.WilRank) + Number(values.BloodRating) + Number(values.BloodBonus); + x = values.DmgModTotal; } - setAttrs({BloodTotal: total}); - setAttrs({BloodDice: GetDice(total)}); - }); - } - - function UpdateBowyer() - { - getAttrs(["IntRank", "BowyerRating", "BowyerBonus"], function(values) - { - var total = "-"; - if(Number(values.BowyerRating) > 0) + else if(values.W4Type == "r") { - total = Number(values.IntRank) + Number(values.BowyerRating) + Number(values.BowyerBonus); + x = values.ShotDmgModTotal; } - setAttrs({BowyerTotal: total}); - setAttrs({BowyerDice: GetDice(total)}); + setAttrs({W4DmgMod: x}); }); } - function UpdateBrewing() + function UpdateW5DmgMod() { - getAttrs(["IntRank", "BrewRating", "BrewBonus"], function(values) + getAttrs(["W5Type", "DmgModTotal", "ShotDmgModTotal"], function(values) { - var total = "-"; - if(Number(values.BrewRating) > 0) + var x = 0; + if(values.W5Type == "m") { - total = Number(values.IntRank) + Number(values.BrewRating) + Number(values.BrewBonus); + x = values.DmgModTotal; } - setAttrs({BrewTotal: total}); - setAttrs({BrewDice: GetDice(total)}); - }); - } - - function UpdateCarpentry() - { - getAttrs(["IntRank", "CarpRating", "CarpBonus"], function(values) - { - var total = "-"; - if(Number(values.CarpRating) > 0) + else if(values.W5Type == "r") { - total = Number(values.IntRank) + Number(values.CarpRating) + Number(values.CarpBonus); + x = values.ShotDmgModTotal; } - setAttrs({CarpTotal: total}); - setAttrs({CarpDice: GetDice(total)}); + setAttrs({W5DmgMod: x}); }); } - function UpdateCircleMagic() + function UpdateW6DmgMod() { - getAttrs(["IntRank", "CircleRating", "CircleBonus"], function(values) + getAttrs(["W6Type", "DmgModTotal", "ShotDmgModTotal"], function(values) { - var total = "-"; - if(Number(values.CircleRating) > 0) + var x = 0; + if(values.W6Type == "m") { - total = Number(values.IntRank) + Number(values.CircleRating) + Number(values.CircleBonus); + x = values.DmgModTotal; } - setAttrs({CircleTotal: total}); - setAttrs({CircleDice: GetDice(total)}); - }); - } - - function UpdateClimbing() - { - getAttrs(["DexRank", "ClimbRating", "ClimbBonus"], function(values) - { - var total = "-"; - if(Number(values.ClimbRating) > 0) + else if(values.W6Type == "r") { - total = Number(values.DexRank) + Number(values.ClimbRating) + Number(values.ClimbBonus); + x = values.ShotDmgModTotal; } - setAttrs({ClimbTotal: total}); - setAttrs({ClimbDice: GetDice(total)}); + setAttrs({W6DmgMod: x}); }); } - function UpdateConcealment() + on("change:strbase change:strbonus", function() { - getAttrs(["PrcRank", "ConcRating", "ConcBonus"], function(values) - { - var total = "-"; - if(Number(values.ConcRating) > 0) - { - total = Number(values.PrcRank) + Number(values.ConcRating) + Number(values.ConcBonus); - } - setAttrs({ConcTotal: total}); - setAttrs({ConcDice: GetDice(total)}); - }); - } + UpdateStrength(); + }); - function UpdateConjuring() + on("change:dmgmodbonus", function() { - getAttrs(["WilRank", "ConjRating", "ConjBonus"], function(values) - { - var total = "-"; - if(Number(values.ConjRating) > 0) - { - total = Number(values.WilRank) + Number(values.ConjRating) + Number(values.ConjBonus); - } - setAttrs({ConjTotal: total}); - setAttrs({ConjDice: GetDice(total)}); - }); - } + UpdateDmgMod(); + }); - function UpdateCooking() + on("change:dexbase change:dexbonus", function() { - getAttrs(["PrcRank", "CookRating", "CookBonus"], function(values) - { - var total = "-"; - if(Number(values.CookRating) > 0) - { - total = Number(values.PrcRank) + Number(values.CookRating) + Number(values.CookBonus); - } - setAttrs({CookTotal: total}); - setAttrs({CookDice: GetDice(total)}); - }); - } + UpdateDexterity(); + }); - function UpdateCreatureLore() + on("change:defmodbonus", function() { - getAttrs(["IntRank", "CreatureRating", "CreatureBonus"], function(values) - { - var total = "-"; - if(Number(values.CreatureRating) > 0) - { - total = Number(values.IntRank) + Number(values.CreatureRating) + Number(values.CreatureBonus); - } - setAttrs({CreatureTotal: total}); - setAttrs({CreatureDice: GetDice(total)}); - }); - } + UpdateDefMod(); + }); - function UpdateCrystalLore() + on("change:initmodbonus", function() { - getAttrs(["IntRank", "CrystalRating", "CrystalBonus"], function(values) - { - var total = "-"; - if(Number(values.CrystalRating) > 0) - { - total = Number(values.IntRank) + Number(values.CrystalRating) + Number(values.CrystalBonus); - } - setAttrs({CrystalTotal: total}); - setAttrs({CrystalDice: GetDice(total)}); - }); - } + UpdateInitMod(); + }); - function UpdateDancing() + on("change:mvmtbonus", function() { - getAttrs(["DexRank", "DanceRating", "DanceBonus"], function(values) - { - var total = "-"; - if(Number(values.DanceRating) > 0) - { - total = Number(values.DexRank) + Number(values.DanceRating) + Number(values.DanceBonus); - } - setAttrs({DanceTotal: total}); - setAttrs({DanceDice: GetDice(total)}); - }); - } + UpdateMvmt(); + }); - function UpdateDeception() + on("change:bdybase change:bdybonus", function() { - getAttrs(["ChrRank", "DeceptRating", "DeceptBonus"], function(values) - { - var total = "-"; - if(Number(values.DeceptRating) > 0) - { - total = Number(values.ChrRank) + Number(values.DeceptRating) + Number(values.DeceptBonus); - } - setAttrs({DeceptTotal: total}); - setAttrs({DeceptDice: GetDice(total)}); - }); - } + UpdateBody(); + }); - function UpdateDecipher() + on("change:toughbonus", function() { - getAttrs(["IntRank", "DecipherRating", "DecipherBonus"], function(values) - { - var total = "-"; - if(Number(values.DecipherRating) > 0) - { - total = Number(values.IntRank) + Number(values.DecipherRating) + Number(values.DecipherBonus); - } - setAttrs({DecipherTotal: total}); - setAttrs({DecipherDice: GetDice(total)}); - }); - } + UpdateToughness(); + }); - function UpdateDemonLore() + on("change:prcbase change:prcbonus", function() { - getAttrs(["IntRank", "DemonRating", "DemonBonus"], function(values) - { - var total = "-"; - if(Number(values.DemonRating) > 0) - { - total = Number(values.IntRank) + Number(values.DemonRating) + Number(values.DemonBonus); - } - setAttrs({DemonTotal: total}); - setAttrs({DemonDice: GetDice(total)}); - }); - } + UpdatePerception(); + }); - function UpdateDetectLies() + on("change:shotdmgmodbonus", function() { - getAttrs(["PrcRank", "LiesRating", "LiesBonus"], function(values) - { - var total = "-"; - if(Number(values.LiesRating) > 0) - { - total = Number(values.PrcRank) + Number(values.LiesRating) + Number(values.LiesBonus); - } - setAttrs({LiesTotal: total}); - setAttrs({LiesDice: GetDice(total)}); - }); - } + UpdateShotDmgMod(); + }); - function UpdateDisguise() + on("change:rgbonus", function() { - getAttrs(["PrcRank", "DisgRating", "DisgBonus"], function(values) - { - var total = "-"; - if(Number(values.DisgRating) > 0) - { - total = Number(values.PrcRank) + Number(values.DisgRating) + Number(values.DisgBonus); - } - setAttrs({DisgTotal: total}); - setAttrs({DisgDice: GetDice(total)}); - }); - } + UpdateRange(); + }); - function UpdateDrinking() + on("change:intbase change:intbonus", function() { - getAttrs(["BdyRank", "DrinkRating", "DrinkBonus"], function(values) - { - var total = "-"; - if(Number(values.DrinkRating) > 0) - { - total = Number(values.BdyRank) + Number(values.DrinkRating) + Number(values.DrinkBonus); - } - setAttrs({DrinkTotal: total}); - setAttrs({DrinkDice: GetDice(total)}); - }); - } + UpdateIntelligence(); + }); - function UpdateDrugTolerance() + on("change:speffbonus", function() { - getAttrs(["BdyRank", "DrugRating", "DrugBonus"], function(values) - { - var total = "-"; - if(Number(values.DrugRating) > 0) - { - total = Number(values.BdyRank) + Number(values.DrugRating) + Number(values.DrugBonus); - } - setAttrs({DrugTotal: total}); - setAttrs({DrugDice: GetDice(total)}); - }); - } + UpdateSpellEffect(); + }); - function UpdateEndurance() + on("change:wilbase change:wilbonus", function() { - getAttrs(["BdyRank", "EndurRating", "EndurBonus"], function(values) - { - var total = "-"; - if(Number(values.EndurRating) > 0) - { - total = Number(values.BdyRank) + Number(values.EndurRating) + Number(values.EndurBonus); - } - setAttrs({EndurTotal: total}); - setAttrs({EndurDice: GetDice(total)}); - }); - } + UpdateWillpower(); + }); - function UpdateEscapeArtistry() + on("change:mendefbonus", function() { - getAttrs(["DexRank", "EscapeRating", "EscapeBonus"], function(values) - { - var total = "-"; - if(Number(values.EscapeRating) > 0) - { - total = Number(values.DexRank) + Number(values.EscapeRating) + Number(values.EscapeBonus); - } - setAttrs({EscapeTotal: total}); - setAttrs({EscapeDice: GetDice(total)}); - }); - } + UpdateMenDefMod(); + }); - function UpdateExorcism() + on("change:fortbonus", function() { - getAttrs(["WilRank", "ExorcismRating", "ExorcismBonus"], function(values) - { - var total = "-"; - if(Number(values.ExorcismRating) > 0) - { - total = Number(values.WilRank) + Number(values.ExorcismRating) + Number(values.ExorcismBonus); - } - setAttrs({ExorcismTotal: total}); - setAttrs({ExorcismDice: GetDice(total)}); - }); - } + UpdateFortitude(); + }); - function UpdateFarming() + on("change:chrbase change:chrbonus", function() { - getAttrs(["IntRank", "FarmRating", "FarmBonus"], function(values) - { - var total = "-"; - if(Number(values.FarmRating) > 0) - { - total = Number(values.IntRank) + Number(values.FarmRating) + Number(values.FarmBonus); - } - setAttrs({FarmTotal: total}); - setAttrs({FarmDice: GetDice(total)}); - }); - } + UpdateCharisma(); + }); - function UpdateFishing() + on("change:socialbonus", function() { - getAttrs(["PrcRank", "FishRating", "FishBonus"], function(values) - { - var total = "-"; - if(Number(values.FishRating) > 0) - { - total = Number(values.PrcRank) + Number(values.FishRating) + Number(values.FishBonus); - } - setAttrs({FishTotal: total}); - setAttrs({FishDice: GetDice(total)}); - }); - } + UpdateSocialPool(); + }); - function UpdateForaging() + on("change:btybase change:btybonus", function() { - getAttrs(["PrcRank", "ForageRating", "ForageBonus"], function(values) - { - var total = "-"; - if(Number(values.ForageRating) > 0) - { - total = Number(values.PrcRank) + Number(values.ForageRating) + Number(values.ForageBonus); - } - setAttrs({ForageTotal: total}); - setAttrs({ForageDice: GetDice(total)}); - }); - } + UpdateBeauty(); + }); - function UpdateForgery() + on("change:maxsaga", function() { - getAttrs(["PrcRank", "ForgeryRating", "ForgeryBonus"], function(values) - { - var total = "-"; - if(Number(values.ForgeryRating) > 0) - { - total = Number(values.PrcRank) + Number(values.ForgeryRating) + Number(values.ForgeryBonus); - } - setAttrs({ForgeryTotal: total}); - setAttrs({ForgeryDice: GetDice(total)}); - }); - } + UpdateLevel(); + }); - function UpdateFlying() + on("change:class", function() { - getAttrs(["DexRank", "FlyRating", "FlyBonus"], function(values) + getAttrs(["Class", "ClassSI", "SpiritInf"], function(values) { - var total = "-"; - if(Number(values.FlyRating) > 0) + var si = 2; + switch(values.Class) { - total = Number(values.DexRank) + Number(values.FlyRating) + Number(values.FlyBonus); + case "chaplain": + case "monk": + case "priest": + case "shaman": + case "templar": + case "zealot": + si = 10; + break; } - setAttrs({FlyTotal: total}); - setAttrs({FlyDice: GetDice(total)}); - }); - } - function UpdateGambling() - { - getAttrs(["PrcRank", "GambleRating", "GambleBonus"], function(values) - { - var total = "-"; - if(Number(values.GambleRating) > 0) - { - total = Number(values.PrcRank) + Number(values.GambleRating) + Number(values.GambleBonus); - } - setAttrs({GambleTotal: total}); - setAttrs({GambleDice: GetDice(total)}); + var bonus = Number(values.SpiritInf) - Number(values.ClassSI); + setAttrs({ClassSI: si}); + setAttrs({SpiritInf: Number(si) + Number(bonus)}); }); - } + }); - function UpdateGemCutting() + on("change:race", function() { - getAttrs(["PrcRank", "GemRating", "GemBonus"], function(values) + getAttrs(["Race"], function(values) { - var total = "-"; - if(Number(values.GemRating) > 0) + var mv = 3; + var un = 3; + var str = 0; + var dex = 0; + var bdy = 0; + var prc = 0; + var int = 0; + var wil = 0; + var chr = 0; + var bty = 0; + var vis = ""; + var soul = 10; + + switch(values.Race) { - total = Number(values.PrcRank) + Number(values.GemRating) + Number(values.GemBonus); + case "ogre": + str = 4; dex = -2; bdy = 1; int = -2; chr = -1; mv = 2; un = 6; vis = "Twilight"; + break; + case "troll": + str = 4; dex = -2; bdy = 1; int = -2; chr = -1; mv = 2; un = 6; vis = "Dark Sight"; + break; + case "highelf": + str = -2; dex = 1; bdy = -2; prc = 1; int = 1; wil = 1; bty = 2; vis = "Twilight"; + break; + case "halfelf": + str = -1; bdy = -1; prc = 1; int = 1; bty = 1; vis = "Twilight"; + break; + case "shadow": + str = -2; dex = 1; bdy = -2; prc = 1; int = 1; wil = 1; bty = 2; vis = "Dark Sight"; + break; + case "dungoblin": + str = -1; dex = 1; prc = 1; chr = -1; mv = 4; vis = "Twilight"; + break; + case "knocker": + str = -2; dex = 2; prc = 1; chr = -1; mv = 4; vis = "Dark Sight"; + break; + case "mungreel": + str = -2; dex = 2; prc = 1; chr = -1; mv = 4; vis = "Dark Sight"; + break; + case "dark": + str = -1; dex = 1; bdy = -1; prc = 1; int = 1; wil = 1; chr = -2; bty = 2; vis = "Dark Sight"; + break; + case "halfdark": + bdy = -1; prc = 1; int = 1; wil = 1; chr = -2; bty = 1; vis = "Twilight"; + break; + case "kuthalan": + bdy = 2; prc = 2; wil = -1; chr = -3; vis = "Infravision"; + break; + case "mhentep": + str = -1; dex = 2; bdy = -1; prc = 2; wil = -2; mv = 4; vis = "Twilight"; + break; + case "minotaur": + str = 3; dex = -1; bdy = 2; prc = -2; int = -2; un = 5; vis = "Twilight"; + break; + case "highdwarf": + str = 2; dex = -1; bdy = 1; chr = -2; mv = 2; vis = "Dark Sight"; + break; + case "paledwarf": + str = 2; dex = -1; bdy = 1; chr = -2; mv = 2; vis = "Dark Sight"; + break; + case "stonedwarf": + str = 2; dex = -1; bdy = 1; chr = -2; mv = 2; vis = "Dark Sight"; + break; + case "nephilim": + str = 1; prc = 1; wil = -2; vis = "Chromatic / Astral Sight"; + break; + case "darkorc": + str = 2; bdy = 1; int = -1; chr = -2; un = 5; vis = "Dark Sight"; + break; + case "halforc": + str = 2; chr = -1; un = 4; vis = "Twilight"; + break; + case "orc": + str = 1; bdy = 1; int = -1; chr = -1; un = 4; vis = "Dark Sight"; + break; + case "sharpheen": + str = 2; bdy = 1; int = -1; chr = -2; un = 4; vis = "Infravision"; + break; + case "mulpheen": + str = 2; bdy = 1; int = -1; chr = -2; un = 4; vis = "Infravision"; + break; + case "skog": + str = 2; bdy = 1; prc = 2; int = -1; wil = -2; chr = -2; un = 4; vis = "Twilight"; + break; + case "halfskog": + str = 1; bdy = 1; int = -1; chr = -1; un = 4; vis = "Chromatic"; + break; + case "tarkanys": + str = -2; dex = 2; prc = 2; chr = -2; mv = 4; vis = "Dark Sight"; + break; + case "bloodtark": + str = 2; dex = -2; prc = 2; chr = -2; un = 5; vis = "Dark Sight"; + break; + case "human": + vis = "Chromatic"; soul = 12; + break; + case "mutant": + un = 4; vis = "Dark Sight"; soul = 8; + break; } - setAttrs({GemTotal: total}); - setAttrs({GemDice: GetDice(total)}); + setAttrs({RaceMvmt: mv}); + setAttrs({Vision: vis}); + setAttrs({SoulPoints: soul}); + + setAttrs({RaceUnarmedRank: un}); + UpdateUnarmed(); + + setAttrs({StrRace: str}); + UpdateStrength(); + + setAttrs({DexRace: dex}); + UpdateDexterity(); + + setAttrs({BdyRace: bdy}); + UpdateBody(); + + setAttrs({PrcRace: prc}); + UpdatePerception(); + + setAttrs({IntRace: int}); + UpdateIntelligence(); + + setAttrs({WilRace: wil}); + UpdateWillpower(); + + setAttrs({ChrRace: chr}); + UpdateCharisma(); + + setAttrs({BtyRace: bty}); + UpdateBeauty(); }); - } + }); - function UpdateGlassBlowing() + on("change:unarmed", function() { - getAttrs(["PrcRank", "GlassRating", "GlassBonus"], function(values) - { - var total = "-"; - if(Number(values.GlassRating) > 0) - { - total = Number(values.PrcRank) + Number(values.GlassRating) + Number(values.GlassBonus); - } - setAttrs({GlassTotal: total}); - setAttrs({GlassDice: GetDice(total)}); - }); - } + UpdateUnarmed(); + }); - function UpdateHealing() + on("change:alchrating change:alchbonus", function() { - getAttrs(["IntRank", "HealRating", "HealBonus"], function(values) - { - var total = "-"; - if(Number(values.HealRating) > 0) - { - total = Number(values.IntRank) + Number(values.HealRating) + Number(values.HealBonus); - } - setAttrs({HealTotal: total}); - setAttrs({HealDice: GetDice(total)}); - }); - } + UpdateAlchemy(); + }); - function UpdateHeraldry() + on("change:acrobatrating change:acrobatbonus", function() { - getAttrs(["IntRank", "HeraldRating", "HeraldBonus"], function(values) - { - var total = "-"; - if(Number(values.HeraldRating) > 0) - { - total = Number(values.IntRank) + Number(values.HeraldRating) + Number(values.HeraldBonus); - } - setAttrs({HeraldTotal: total}); - setAttrs({HeraldDice: GetDice(total)}); - }); - } + UpdateAcrobatics(); + }); - function UpdateHistory() + on("change:actrating change:actbonus", function() { - getAttrs(["IntRank", "HistoryRating", "HistoryBonus"], function(values) - { - var total = "-"; - if(Number(values.HistoryRating) > 0) - { - total = Number(values.IntRank) + Number(values.HistoryRating) + Number(values.HistoryBonus); - } - setAttrs({HistoryTotal: total}); - setAttrs({HistoryDice: GetDice(total)}); - }); - } + UpdateActing(); + }); - function UpdateHunting() + on("change:animalrating change:animalbonus", function() { - getAttrs(["PrcRank", "HuntRating", "HuntBonus"], function(values) - { - var total = "-"; - if(Number(values.HuntRating) > 0) - { - total = Number(values.PrcRank) + Number(values.HuntRating) + Number(values.HuntBonus); - } - setAttrs({HuntTotal: total}); - setAttrs({HuntDice: GetDice(total)}); - }); - } + UpdateAnimalKinship(); + }); - function UpdateImpersonation() + on("change:appraisalrating change:appraisalbonus", function() { - getAttrs(["ChrRank", "ImpersonRating", "ImpersonBonus"], function(values) - { - var total = "-"; - if(Number(values.ImpersonRating) > 0) - { - total = Number(values.ChrRank) + Number(values.ImpersonRating) + Number(values.ImpersonBonus); - } - setAttrs({ImpersonTotal: total}); - setAttrs({ImpersonDice: GetDice(total)}); - }); - } + UpdateAppraisal(); + }); - function UpdateInterrogation() + on("change:armorerrating change:armorerbonus", function() { - getAttrs(["ChrRank", "IntrgRating", "IntrgBonus"], function(values) - { - var total = "-"; - if(Number(values.IntrgRating) > 0) - { - total = Number(values.ChrRank) + Number(values.IntrgRating) + Number(values.IntrgBonus); - } - setAttrs({IntrgTotal: total}); - setAttrs({IntrgDice: GetDice(total)}); - }); - } + UpdateArmorer(); + }); - function UpdateJuggling() + on("change:artrating change:artbonus", function() { - getAttrs(["DexRank", "JuggleRating", "JuggleBonus"], function(values) - { - var total = "-"; - if(Number(values.JuggleRating) > 0) - { - total = Number(values.DexRank) + Number(values.JuggleRating) + Number(values.JuggleBonus); - } - setAttrs({JuggleTotal: total}); - setAttrs({JuggleDice: GetDice(total)}); - }); - } + UpdateArt(); + }); - function UpdateJumping() + on("change:astrorating change:astrobonus", function() { - getAttrs(["DexRank", "JumpRating", "JumpBonus"], function(values) - { - var total = "-"; - if(Number(values.JumpRating) > 0) - { - total = Number(values.DexRank) + Number(values.JumpRating) + Number(values.JumpBonus); - } - setAttrs({JumpTotal: total}); - setAttrs({JumpDice: GetDice(total)}); - }); - } + UpdateAstrology(); + }); - function UpdateLaw() + on("change:astronomyrating change:astronomybonus", function() { - getAttrs(["IntRank", "LawRating", "LawBonus"], function(values) - { - var total = "-"; - if(Number(values.LawRating) > 0) - { - total = Number(values.IntRank) + Number(values.LawRating) + Number(values.LawBonus); - } - setAttrs({LawTotal: total}); - setAttrs({LawDice: GetDice(total)}); - }); - } + UpdateAstronomy(); + }); - function UpdateLeadership() + on("change:barterrating change:barterbonus", function() { - getAttrs(["ChrRank", "LeadRating", "LeadBonus"], function(values) - { - var total = "-"; - if(Number(values.LeadRating) > 0) - { - total = Number(values.ChrRank) + Number(values.LeadRating) + Number(values.LeadBonus); - } - setAttrs({LeadTotal: total}); - setAttrs({LeadDice: GetDice(total)}); - }); - } + UpdateBarter(); + }); - function UpdateLeatherWorking() + on("change:begrating change:begbonus", function() { - getAttrs(["IntRank", "LWorkRating", "LWorkBonus"], function(values) - { - var total = "-"; - if(Number(values.LWorkRating) > 0) - { - total = Number(values.IntRank) + Number(values.LWorkRating) + Number(values.LWorkBonus); - } - setAttrs({LWorkTotal: total}); - setAttrs({LWorkDice: GetDice(total)}); - }); - } + UpdateBegging(); + }); - function UpdateLifting() + on("change:blackrating change:blackbonus", function() { - getAttrs(["StrRank", "LiftRating", "LiftBonus"], function(values) - { - var total = "-"; - if(Number(values.LiftRating) > 0) - { - total = Number(values.StrRank) + Number(values.LiftRating) + Number(values.LiftBonus); - } - setAttrs({LiftTotal: total}); - setAttrs({LiftDice: GetDice(total)}); - }); - } + UpdateBlacksmith(); + }); - function UpdateLiguistics() + on("change:bowyerrating change:bowyerbonus", function() { - getAttrs(["IntRank", "LingRating", "LingBonus"], function(values) - { - var total = "-"; - if(Number(values.LingRating) > 0) - { - total = Number(values.IntRank) + Number(values.LingRating) + Number(values.LingBonus); - } - setAttrs({LingTotal: total}); - setAttrs({LingDice: GetDice(total)}); - }); - } + UpdateBowyer(); + }); - function UpdateLipReading() + on("change:brewrating change:brewbonus", function() { - getAttrs(["PrcRank", "LipRating", "LipBonus"], function(values) - { - var total = "-"; - if(Number(values.LipRating) > 0) - { - total = Number(values.PrcRank) + Number(values.LipRating) + Number(values.LipBonus); - } - setAttrs({LipTotal: total}); - setAttrs({LipDice: GetDice(total)}); - }); - } + UpdateBrewing(); + }); - function UpdateListening() + on("change:carprating change:carpbonus", function() { - getAttrs(["PrcRank", "ListenRating", "ListenBonus"], function(values) - { - var total = "-"; - if(Number(values.ListenRating) > 0) - { - total = Number(values.PrcRank) + Number(values.ListenRating) + Number(values.ListenBonus); - } - setAttrs({ListenTotal: total}); - setAttrs({ListenDice: GetDice(total)}); - }); - } + UpdateCarpentry(); + }); - function UpdateLockPicking() + on("change:chantrating change:chantbonus", function() { - getAttrs(["DexRank", "LockRating", "LockBonus"], function(values) - { - var total = "-"; - if(Number(values.LockRating) > 0) - { - total = Number(values.DexRank) + Number(values.LockRating) + Number(values.LockBonus); - } - setAttrs({LockTotal: total}); - setAttrs({LockDice: GetDice(total)}); - }); - } + UpdateBattleChant(); + }); - function UpdateLocksmith() + on("change:bloodrating change:bloodbonus", function() { - getAttrs(["IntRank", "LocksmithRating", "LocksmithBonus"], function(values) - { - var total = "-"; - if(Number(values.LocksmithRating) > 0) - { - total = Number(values.IntRank) + Number(values.LocksmithRating) + Number(values.LocksmithBonus); - } - setAttrs({LocksmithTotal: total}); - setAttrs({LocksmithDice: GetDice(total)}); - }); - } + UpdateBloodMagic(); + }); - function UpdateLooting() + on("change:circlerating change:circlebonus", function() { - getAttrs(["PrcRank", "LootRating", "LootBonus"], function(values) - { - var total = "-"; - if(Number(values.LootRating) > 0) - { - total = Number(values.PrcRank) + Number(values.LootRating) + Number(values.LootBonus); - } - setAttrs({LootTotal: total}); - setAttrs({LootDice: GetDice(total)}); - }); - } + UpdateCircleMagic(); + }); - function UpdateMapping() + on("change:climbrating change:climbbonus", function() { - getAttrs(["PrcRank", "MapRating", "MapBonus"], function(values) - { - var total = "-"; - if(Number(values.MapRating) > 0) - { - total = Number(values.PrcRank) + Number(values.MapRating) + Number(values.MapBonus); - } - setAttrs({MapTotal: total}); - setAttrs({MapDice: GetDice(total)}); - }); - } + UpdateClimbing(); + }); - function UpdateMasonry() + on("change:concrating change:concbonus", function() { - getAttrs(["IntRank", "MasonRating", "MasonBonus"], function(values) - { - var total = "-"; - if(Number(values.MasonRating) > 0) - { - total = Number(values.IntRank) + Number(values.MasonRating) + Number(values.MasonBonus); - } - setAttrs({MasonTotal: total}); - setAttrs({MasonDice: GetDice(total)}); - }); - } + UpdateConcealment(); + }); - function UpdateMedicine() + on("change:conjrating change:conjbonus", function() { - getAttrs(["IntRank", "MedicRating", "MedicBonus"], function(values) - { - var total = "-"; - if(Number(values.MedicRating) > 0) - { - total = Number(values.IntRank) + Number(values.MedicRating) + Number(values.MedicBonus); - } - setAttrs({MedicTotal: total}); - setAttrs({MedicDice: GetDice(total)}); - }); - } + UpdateConjuring(); + }); - function UpdateMeditation() + on("change:cookrating change:cookbonus", function() { - getAttrs(["WilRank", "MeditationRating", "MeditationBonus"], function(values) - { - var total = "-"; - if(Number(values.MeditationRating) > 0) - { - total = Number(values.WilRank) + Number(values.MeditationRating) + Number(values.MeditationBonus); - } - setAttrs({MeditationTotal: total}); - setAttrs({MeditationDice: GetDice(total)}); - }); - } + UpdateCooking(); + }); - function UpdateMining() + on("change:creaturerating change:creaturebonus", function() { - getAttrs(["IntRank", "MiningRating", "MiningBonus"], function(values) - { - var total = "-"; - if(Number(values.MiningRating) > 0) - { - total = Number(values.IntRank) + Number(values.MiningRating) + Number(values.MiningBonus); - } - setAttrs({MiningTotal: total}); - setAttrs({MiningDice: GetDice(total)}); - }); - } + UpdateCreatureLore(); + }); - function UpdateMusic() + on("change:crystalrating change:crystalbonus", function() { - getAttrs(["PrcRank", "MusicRating", "MusicBonus"], function(values) - { - var total = "-"; - if(Number(values.MusicRating) > 0) - { - total = Number(values.PrcRank) + Number(values.MusicRating) + Number(values.MusicBonus); - } - setAttrs({MusicTotal: total}); - setAttrs({MusicDice: GetDice(total)}); - }); - } + UpdateCrystalLore(); + }); - function UpdateNavigation() + on("change:dancerating change:dancebonus", function() { - getAttrs(["PrcRank", "NavRating", "NavBonus"], function(values) - { - var total = "-"; - if(Number(values.NavRating) > 0) - { - total = Number(values.PrcRank) + Number(values.NavRating) + Number(values.NavBonus); - } - setAttrs({NavTotal: total}); - setAttrs({NavDice: GetDice(total)}); - }); - } + UpdateDancing(); + }); - function UpdateNecromancy() + on("change:deceptrating change:deceptbonus", function() { - getAttrs(["WilRank", "NecroRating", "NecroBonus"], function(values) - { - var total = "-"; - if(Number(values.NecroRating) > 0) - { - total = Number(values.WilRank) + Number(values.NecroRating) + Number(values.NecroBonus); - } - setAttrs({NecroTotal: total}); - setAttrs({NecroDice: GetDice(total)}); - }); - } + UpdateDeception(); + }); - function UpdateObservation() + on("change:decipherrating change:decipherbonus", function() { - getAttrs(["PrcRank", "ObservRating", "ObservBonus"], function(values) - { - var total = "-"; - if(Number(values.ObservRating) > 0) - { - total = Number(values.PrcRank) + Number(values.ObservRating) + Number(values.ObservBonus); - } - setAttrs({ObservTotal: total}); - setAttrs({ObservDice: GetDice(total)}); - }); - } + UpdateDecipher(); + }); - function UpdatePhilosophy() + on("change:demonrating change:demonbonus", function() { - getAttrs(["ChrRank", "PhilRating", "PhilBonus"], function(values) - { - var total = "-"; - if(Number(values.PhilRating) > 0) - { - total = Number(values.ChrRank) + Number(values.PhilRating) + Number(values.PhilBonus); - } - setAttrs({PhilTotal: total}); - setAttrs({PhilDice: GetDice(total)}); - }); - } + UpdateDemonLore(); + }); - function UpdatePlantLore() + on("change:disgrating change:disgbonus", function() { - getAttrs(["IntRank", "PlantRating", "PlantBonus"], function(values) - { - var total = "-"; - if(Number(values.PlantRating) > 0) - { - total = Number(values.IntRank) + Number(values.PlantRating) + Number(values.PlantBonus); - } - setAttrs({PlantTotal: total}); - setAttrs({PlantDice: GetDice(total)}); - }); - } + UpdateDisguise(); + }); - function UpdatePoisons() + on("change:drinkrating change:drinkbonus", function() { - getAttrs(["IntRank", "PoisRating", "PoisBonus"], function(values) - { - var total = "-"; - if(Number(values.PoisRating) > 0) - { - total = Number(values.IntRank) + Number(values.PoisRating) + Number(values.PoisBonus); - } - setAttrs({PoisTotal: total}); - setAttrs({PoisDice: GetDice(total)}); - }); - } + UpdateDrinking(); + }); - function UpdatePottery() + on("change:drugrating change:drugbonus", function() { - getAttrs(["PrcRank", "PotteryRating", "PotteryBonus"], function(values) - { - var total = "-"; - if(Number(values.PotteryRating) > 0) - { - total = Number(values.PrcRank) + Number(values.PotteryRating) + Number(values.PotteryBonus); - } - setAttrs({PotteryTotal: total}); - setAttrs({PotteryDice: GetDice(total)}); - }); - } + UpdateDrugTolerance(); + }); - function UpdateReadWrite() + on("change:liesrating change:liesbonus", function() { - getAttrs(["IntRank", "ReadRating", "ReadBonus"], function(values) - { - var total = "-"; - if(Number(values.ReadRating) > 0) - { - total = Number(values.IntRank) + Number(values.ReadRating) + Number(values.ReadBonus); - } - setAttrs({ReadTotal: total}); - setAttrs({ReadDice: GetDice(total)}); - }); - } + UpdateDetectLies(); + }); - function UpdateResearch() + on("change:endurrating change:endurbonus", function() { - getAttrs(["IntRank", "ResearchRating", "ResearchBonus"], function(values) - { - var total = "-"; - if(Number(values.ResearchRating) > 0) - { - total = Number(values.IntRank) + Number(values.ResearchRating) + Number(values.ResearchBonus); - } - setAttrs({ResearchTotal: total}); - setAttrs({ResearchDice: GetDice(total)}); - }); - } + UpdateEndurance(); + }); - function UpdateRiding() + on("change:escaperating change:escapebonus", function() { - getAttrs(["DexRank", "RidingRating", "RidingBonus"], function(values) - { - var total = "-"; - if(Number(values.RidingRating) > 0) - { - total = Number(values.DexRank) + Number(values.RidingRating) + Number(values.RidingBonus); - } - setAttrs({RidingTotal: total}); - setAttrs({RidingDice: GetDice(total)}); - }); - } + UpdateEscapeArtistry(); + }); - function UpdateRunning() + on("change:exorcismrating change:exorcismbonus", function() { - getAttrs(["DexRank", "RunRating", "RunBonus"], function(values) - { - var total = "-"; - if(Number(values.RunRating) > 0) - { - total = Number(values.DexRank) + Number(values.RunRating) + Number(values.RunBonus); - } - setAttrs({RunTotal: total}); - setAttrs({RunDice: GetDice(total)}); - }); - } + UpdateExorcism(); + }); - function UpdateSeafaring() + on("change:farmrating change:farmbonus", function() { - getAttrs(["IntRank", "SeaRating", "SeaBonus"], function(values) - { - var total = "-"; - if(Number(values.SeaRating) > 0) - { - total = Number(values.IntRank) + Number(values.SeaRating) + Number(values.SeaBonus); - } - setAttrs({SeaTotal: total}); - setAttrs({SeaDice: GetDice(total)}); - }); - } + UpdateFarming(); + }); - function UpdateSeduction() + on("change:fishrating change:fishbonus", function() { - getAttrs(["ChrRank", "SeducRating", "SeducBonus"], function(values) - { - var total = "-"; - if(Number(values.SeducRating) > 0) - { - total = Number(values.ChrRank) + Number(values.SeducRating) + Number(values.SeducBonus); - } - setAttrs({SeducTotal: total}); - setAttrs({SeducDice: GetDice(total)}); - }); - } + UpdateFishing(); + }); - function UpdateSewing() + on("change:flyrating change:flybonus", function() { - getAttrs(["PrcRank", "SewRating", "SewBonus"], function(values) - { - var total = "-"; - if(Number(values.SewRating) > 0) - { - total = Number(values.PrcRank) + Number(values.SewRating) + Number(values.SewBonus); - } - setAttrs({SewTotal: total}); - setAttrs({SewDice: GetDice(total)}); - }); - } + UpdateFlying(); + }); - function UpdateSiegeCraft() + on("change:foragerating change:foragebonus", function() { - getAttrs(["IntRank", "SiegeRating", "SiegeBonus"], function(values) - { - var total = "-"; - if(Number(values.SiegeRating) > 0) - { - total = Number(values.IntRank) + Number(values.SiegeRating) + Number(values.SiegeBonus); - } - setAttrs({SiegeTotal: total}); - setAttrs({SiegeDice: GetDice(total)}); - }); - } + UpdateForaging(); + }); - function UpdateSinging() + on("change:forgeryrating change:forgerybonus", function() { - getAttrs(["ChrRank", "SingRating", "SingBonus"], function(values) - { - var total = "-"; - if(Number(values.SingRating) > 0) - { - total = Number(values.ChrRank) + Number(values.SingRating) + Number(values.SingBonus); - } - setAttrs({SingTotal: total}); - setAttrs({SingDice: GetDice(total)}); - }); - } + UpdateForgery(); + }); - function UpdateSkyfaring() + on("change:gamblerating change:gamblebonus", function() { - getAttrs(["IntRank", "SkyRating", "SkyBonus"], function(values) - { - var total = "-"; - if(Number(values.SkyRating) > 0) - { - total = Number(values.IntRank) + Number(values.SkyRating) + Number(values.SkyBonus); - } - setAttrs({SkyTotal: total}); - setAttrs({SkyDice: GetDice(total)}); - }); - } + UpdateGambling(); + }); - function UpdateSpeech() + on("change:gemrating change:gembonus", function() { - getAttrs(["ChrRank", "SpeechRating", "SpeechBonus"], function(values) - { - var total = "-"; - if(Number(values.SpeechRating) > 0) - { - total = Number(values.ChrRank) + Number(values.SpeechRating) + Number(values.SpeechBonus); - } - setAttrs({SpeechTotal: total}); - setAttrs({SpeechDice: GetDice(total)}); - }); - } + UpdateGemCutting(); + }); - function UpdateSpellCraft() + on("change:glassrating change:glassbonus", function() { - getAttrs(["IntRank", "SpCraftRating", "SpCraftBonus"], function(values) - { - var total = "-"; - if(Number(values.SpCraftRating) > 0) - { - total = Number(values.IntRank) + Number(values.SpCraftRating) + Number(values.SpCraftBonus); - } - setAttrs({SpCraftTotal: total}); - setAttrs({SpCraftDice: GetDice(total)}); - }); - } + UpdateGlassBlowing(); + }); - function UpdateStealing() + on("change:healrating change:healbonus", function() { - getAttrs(["DexRank", "StealRating", "StealBonus"], function(values) - { - var total = "-"; - if(Number(values.StealRating) > 0) - { - total = Number(values.DexRank) + Number(values.StealRating) + Number(values.StealBonus); - } - setAttrs({StealTotal: total}); - setAttrs({StealDice: GetDice(total)}); - }); - } + UpdateHealing(); + }); - function UpdateStealth() + on("change:heraldrating change:heraldbonus", function() { - getAttrs(["DexRank", "StealthRating", "StealthBonus"], function(values) - { - var total = "-"; - if(Number(values.StealthRating) > 0) - { - total = Number(values.DexRank) + Number(values.StealthRating) + Number(values.StealthBonus); - } - setAttrs({StealthTotal: total}); - setAttrs({StealthDice: GetDice(total)}); - }); - } + UpdateHeraldry(); + }); - function UpdateStoryTelling() + on("change:historyrating change:historybonus", function() { - getAttrs(["ChrRank", "StoryRating", "StoryBonus"], function(values) - { - var total = "-"; - if(Number(values.StoryRating) > 0) - { - total = Number(values.ChrRank) + Number(values.StoryRating) + Number(values.StoryBonus); - } - setAttrs({StoryTotal: total}); - setAttrs({StoryDice: GetDice(total)}); - }); - } + UpdateHistory(); + }); - function UpdateStreetSurvival() + on("change:huntrating change:huntbonus", function() { - getAttrs(["IntRank", "StSurvRating", "StSurvBonus"], function(values) - { - var total = "-"; - if(Number(values.StSurvRating) > 0) - { - total = Number(values.IntRank) + Number(values.StSurvRating) + Number(values.StSurvBonus); - } - setAttrs({StSurvTotal: total}); - setAttrs({StSurvDice: GetDice(total)}); - }); - } + UpdateHunting(); + }); - function UpdateStreetwise() + on("change:impersonrating change:impersonbonus", function() { - getAttrs(["ChrRank", "StreetRating", "StreetBonus"], function(values) - { - var total = "-"; - if(Number(values.StreetRating) > 0) - { - total = Number(values.ChrRank) + Number(values.StreetRating) + Number(values.StreetBonus); - } - setAttrs({StreetTotal: total}); - setAttrs({StreetDice: GetDice(total)}); - }); - } + UpdateImpersonation(); + }); - function UpdateSwimming() + on("change:intrgrating change:intrgbonus", function() { - getAttrs(["DexRank", "SwimRating", "SwimBonus"], function(values) - { - var total = "-"; - if(Number(values.SwimRating) > 0) - { - total = Number(values.DexRank) + Number(values.SwimRating) + Number(values.SwimBonus); - } - setAttrs({SwimTotal: total}); - setAttrs({SwimDice: GetDice(total)}); - }); - } + UpdateInterrogation(); + }); - function UpdateTeaching() + on("change:jugglerating change:jugglebonus", function() { - getAttrs(["IntRank", "TeachRating", "TeachBonus"], function(values) - { - var total = "-"; - if(Number(values.TeachRating) > 0) - { - total = Number(values.IntRank) + Number(values.TeachRating) + Number(values.TeachBonus); - } - setAttrs({TeachTotal: total}); - setAttrs({TeachDice: GetDice(total)}); - }); - } + UpdateJuggling(); + }); - function UpdateTeamster() + on("change:jumprating change:jumpbonus", function() { - getAttrs(["DexRank", "TeamRating", "TeamBonus"], function(values) - { - var total = "-"; - if(Number(values.TeamRating) > 0) - { - total = Number(values.DexRank) + Number(values.TeamRating) + Number(values.TeamBonus); - } - setAttrs({TeamTotal: total}); - setAttrs({TeamDice: GetDice(total)}); - }); - } + UpdateJumping(); + }); - function UpdateThaumaturgy() + on("change:lawrating change:lawbonus", function() { - getAttrs(["IntRank", "ThaumRating", "ThaumBonus"], function(values) - { - var total = "-"; - if(Number(values.ThaumRating) > 0) - { - total = Number(values.IntRank) + Number(values.ThaumRating) + Number(values.ThaumBonus); - } - setAttrs({ThaumTotal: total}); - setAttrs({ThaumDice: GetDice(total)}); - }); - } + UpdateLaw(); + }); - function UpdateTheology() + on("change:leadrating change:leadbonus", function() { - getAttrs(["IntRank", "TheoRating", "TheoBonus"], function(values) - { - var total = "-"; - if(Number(values.TheoRating) > 0) - { - total = Number(values.IntRank) + Number(values.TheoRating) + Number(values.TheoBonus); - } - setAttrs({TheoTotal: total}); - setAttrs({TheoDice: GetDice(total)}); - }); - } + UpdateLeadership(); + }); - function UpdateTinker() + on("change:lworkrating change:lworkbonus", function() { - getAttrs(["IntRank", "TinkerRating", "TinkerBonus"], function(values) - { - var total = "-"; - if(Number(values.TinkerRating) > 0) - { - total = Number(values.IntRank) + Number(values.TinkerRating) + Number(values.TinkerBonus); - } - setAttrs({TinkerTotal: total}); - setAttrs({TinkerDice: GetDice(total)}); - }); - } + UpdateLeatherWorking(); + }); - function UpdateTracking() + on("change:liftrating change:liftbonus", function() { - getAttrs(["PrcRank", "TrackRating", "TrackBonus"], function(values) - { - var total = "-"; - if(Number(values.TrackRating) > 0) - { - total = Number(values.PrcRank) + Number(values.TrackRating) + Number(values.TrackBonus); - } - setAttrs({TrackTotal: total}); - setAttrs({TrackDice: GetDice(total)}); - }); - } + UpdateLifting(); + }); - function UpdateTrailing() + on("change:lingrating change:lingbonus", function() { - getAttrs(["PrcRank", "TrailRating", "TrailBonus"], function(values) - { - var total = "-"; - if(Number(values.TrailRating) > 0) - { - total = Number(values.PrcRank) + Number(values.TrailRating) + Number(values.TrailBonus); - } - setAttrs({TrailTotal: total}); - setAttrs({TrailDice: GetDice(total)}); - }); - } + UpdateLiguistics(); + }); - function UpdateTraps() + on("change:liprating change:lipbonus", function() { - getAttrs(["PrcRank", "TrapRating", "TrapBonus"], function(values) - { - var total = "-"; - if(Number(values.TrapRating) > 0) - { - total = Number(values.PrcRank) + Number(values.TrapRating) + Number(values.TrapBonus); - } - setAttrs({TrapTotal: total}); - setAttrs({TrapDice: GetDice(total)}); - }); - } + UpdateLipReading(); + }); - function UpdateWeaponsmith() + on("change:listenrating change:listenbonus", function() { - getAttrs(["IntRank", "WpnSmRating", "WpnSmBonus"], function(values) - { - var total = "-"; - if(Number(values.WpnSmRating) > 0) - { - total = Number(values.IntRank) + Number(values.WpnSmRating) + Number(values.WpnSmBonus); - } - setAttrs({WpnSmTotal: total}); - setAttrs({WpnSmDice: GetDice(total)}); - }); - } + UpdateListening(); + }); - function UpdateWeatherSense() + on("change:lockrating change:lockbonus", function() { - getAttrs(["PrcRank", "WeatherRating", "WeatherBonus"], function(values) - { - var total = "-"; - if(Number(values.WeatherRating) > 0) - { - total = Number(values.PrcRank) + Number(values.WeatherRating) + Number(values.WeatherBonus); - } - setAttrs({WeatherTotal: total}); - setAttrs({WeatherDice: GetDice(total)}); - }); - } + UpdateLockPicking(); + }); - function UpdateWeaving() + on("change:locksmithrating change:locksmithbonus", function() { - getAttrs(["PrcRank", "WeaveRating", "WeaveBonus"], function(values) - { - var total = "-"; - if(Number(values.WeaveRating) > 0) - { - total = Number(values.PrcRank) + Number(values.WeaveRating) + Number(values.WeaveBonus); - } - setAttrs({WeaveTotal: total}); - setAttrs({WeaveDice: GetDice(total)}); - }); - } + UpdateLocksmith(); + }); - function UpdateWildSurvival() + on("change:lootrating change:lootbonus", function() { - getAttrs(["IntRank", "WildRating", "WildBonus"], function(values) - { - var total = "-"; - if(Number(values.WildRating) > 0) - { - total = Number(values.IntRank) + Number(values.WildRating) + Number(values.WildBonus); - } - setAttrs({WildTotal: total}); - setAttrs({WildDice: GetDice(total)}); - }); - } - - // Does not update the "Skills (old) tab" - function updateAllSkills() { - updateAllFixedNonCombatSkills(); - updateAllAdditionalSkills(); - } + UpdateLooting(); + }); - function updateAllAdditionalSkills() { - console.log('Updating all additional skills'); + on("change:maprating change:mapbonus", function() + { + UpdateMapping(); + }); - getSectionIDs("skills", function(ids) { - var details = ''; + on("change:masonrating change:masonbonus", function() + { + UpdateMasonry(); + }); - for(var i=0; i < ids.length; i++) { - var rowId = ids[i]; - - UpdateAdditionalSkill(rowId); + on("change:medicrating change:medicbonus", function() + { + UpdateMedicine(); + }); - var skillsRowName = `repeating_skills_${rowId}_`; - if(details !== '') { - details += ', \r\n'; - } - details += skillsRowName; - } - - setAttrs({RepeatedSkillFieldIds: details}); - }); - } - - function UpdateAdditionalSkill(repeatingRowId) { - var skillsRowName = `repeating_skills_${repeatingRowId}`; - if(repeatingRowId !== '') { - skillsRowName = skillsRowName + '_'; - } - - var skillNameName = `${skillsRowName}SkillName`; - var skillAttributeName = `${skillsRowName}SkillAttribute`; - var skillRatingName = `${skillsRowName}SkillRating`; - var skillBonusName = `${skillsRowName}SkillBonus`; - - getAttrs( - ['StrRank', - 'DexRank', - 'BdyRank', - 'PrcRank', - 'IntRank', - 'WilRank', - 'ChrRank', - '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]); - - var attributeBonus = GetAttributeBonus( - skillAttribute, - values.StrRank, - values.DexRank, - values.BdyRank, - values.PrcRank, - values.IntRank, - values.WilRank, - values.ChrRank - ); - - var conditionMod = GetConditionModifier(skillAttribute, values.PhysMod, values.MenMod); - - var total = "-"; - if(skillRating > 0) - { - total = attributeBonus + skillRating + skillBonus; - } - - var calculatedAttributes = {}; - calculatedAttributes[`${skillsRowName}SkillTotal`] = total; - calculatedAttributes[`${skillsRowName}SkillDice`] = GetDice(total); - calculatedAttributes[`${skillsRowName}SkillConditionMod`] = conditionMod; - - setAttrs(calculatedAttributes); - }); - } - - function UpdateLangSkills() + on("change:meditationrating change:meditationbonus", function() { - getAttrs(["IntRank", "Lang1Rating", "Lang1Bonus", "Lang2Rating", "Lang2Bonus", "Lang3Rating", "Lang3Bonus"], function(values) - { - var total = "-"; - if(Number(values.Lang1Rating) > 0) - { - total = Number(values.IntRank) + Number(values.Lang1Rating) + Number(values.Lang1Bonus); - } - setAttrs({Lang1Total: total}); - setAttrs({Lang1Dice: GetDice(total)}); - - total = 0; - if(Number(values.Lang2Rating) > 0) - { - total = Number(values.IntRank) + Number(values.Lang2Rating) + Number(values.Lang2Bonus); - } - setAttrs({Lang2Total: total}); - setAttrs({Lang2Dice: GetDice(total)}); - - total = 0; - if(Number(values.Lang3Rating) > 0) - { - total = Number(values.IntRank) + Number(values.Lang3Rating) + Number(values.Lang3Bonus); - } - setAttrs({Lang3Total: total}); - setAttrs({Lang3Dice: GetDice(total)}); - }); - } + UpdateMeditation(); + }); - function UpdateWeaponDmgMods() + on("change:miningrating change:miningbonus", function() { - UpdateW1DmgMod(); - UpdateW2DmgMod(); - UpdateW3DmgMod(); - UpdateW4DmgMod(); - UpdateW5DmgMod(); - UpdateW6DmgMod(); - } + UpdateMining(); + }); - function UpdateW1DmgMod() + on("change:musicrating change:musicbonus", function() { - getAttrs(["W1Type", "DmgModTotal", "ShotDmgModTotal"], function(values) - { - var x = 0; - if(values.W1Type == "m") - { - x = values.DmgModTotal; - } - else if(values.W1Type == "r") - { - x = values.ShotDmgModTotal; - } - setAttrs({W1DmgMod: x}); - }); - } + UpdateMusic(); + }); - function UpdateW2DmgMod() + on("change:navrating change:navbonus", function() { - getAttrs(["W2Type", "DmgModTotal", "ShotDmgModTotal"], function(values) - { - var x = 0; - if(values.W2Type == "m") - { - x = values.DmgModTotal; - } - else if(values.W2Type == "r") - { - x = values.ShotDmgModTotal; - } - setAttrs({W2DmgMod: x}); - }); - } + UpdateNavigation(); + }); - function UpdateW3DmgMod() + on("change:necrorating change:necrobonus", function() { - getAttrs(["W3Type", "DmgModTotal", "ShotDmgModTotal"], function(values) - { - var x = 0; - if(values.W3Type == "m") - { - x = values.DmgModTotal; - } - else if(values.W3Type == "r") - { - x = values.ShotDmgModTotal; - } - setAttrs({W3DmgMod: x}); - }); - } + UpdateNecromancy(); + }); - function UpdateW4DmgMod() + on("change:observrating change:observbonus", function() { - getAttrs(["W4Type", "DmgModTotal", "ShotDmgModTotal"], function(values) - { - var x = 0; - if(values.W4Type == "m") - { - x = values.DmgModTotal; - } - else if(values.W4Type == "r") - { - x = values.ShotDmgModTotal; - } - setAttrs({W4DmgMod: x}); - }); - } + UpdateObservation(); + }); - function UpdateW5DmgMod() + on("change:philrating change:philbonus", function() { - getAttrs(["W5Type", "DmgModTotal", "ShotDmgModTotal"], function(values) - { - var x = 0; - if(values.W5Type == "m") - { - x = values.DmgModTotal; - } - else if(values.W5Type == "r") - { - x = values.ShotDmgModTotal; - } - setAttrs({W5DmgMod: x}); - }); - } + UpdatePhilosophy(); + }); - function UpdateW6DmgMod() + on("change:plantrating change:plantbonus", function() { - getAttrs(["W6Type", "DmgModTotal", "ShotDmgModTotal"], function(values) - { - var x = 0; - if(values.W6Type == "m") - { - x = values.DmgModTotal; - } - else if(values.W6Type == "r") - { - x = values.ShotDmgModTotal; - } - setAttrs({W6DmgMod: x}); - }); - } + UpdatePlantLore(); + }); - on("change:strbase change:strbonus", function() + on("change:poisrating change:poisbonus", function() { - UpdateStrength(); + UpdatePoisons(); }); - on("change:dmgmodbonus", function() + on("change:potteryrating change:potterybonus", function() { - UpdateDmgMod(); + UpdatePottery(); }); - on("change:dexbase change:dexbonus", function() + on("change:readrating change:readbonus", function() { - UpdateDexterity(); + UpdateReadWrite(); }); - on("change:defmodbonus", function() + on("change:researchrating change:researchbonus", function() { - UpdateDefMod(); + UpdateResearch(); }); - on("change:initmodbonus", function() + on("change:ridingrating change:ridingbonus", function() { - UpdateInitMod(); + UpdateRiding(); }); - on("change:mvmtbonus", function() + on("change:runrating change:runbonus", function() { - UpdateMvmt(); + UpdateRunning(); }); - on("change:bdybase change:bdybonus", function() + on("change:searating change:seabonus", function() { - UpdateBody(); + UpdateSeafaring(); }); - on("change:toughbonus", function() + on("change:seducrating change:seducbonus", function() { - UpdateToughness(); + UpdateSeduction(); }); - on("change:prcbase change:prcbonus", function() + on("change:sewrating change:sewbonus", function() { - UpdatePerception(); + UpdateSewing(); }); - on("change:shotdmgmodbonus", function() + on("change:siegerating change:siegebonus", function() { - UpdateShotDmgMod(); + UpdateSiegeCraft(); }); - on("change:rgbonus", function() + on("change:singrating change:singbonus", function() { - UpdateRange(); + UpdateSinging(); }); - on("change:intbase change:intbonus", function() + on("change:skyrating change:skybonus", function() { - UpdateIntelligence(); + UpdateSkyfaring(); }); - on("change:speffbonus", function() + on("change:speechrating change:speechbonus", function() { - UpdateSpellEffect(); + UpdateSpeech(); }); - on("change:wilbase change:wilbonus", function() + on("change:spcraftrating change:spcraftbonus", function() { - UpdateWillpower(); + UpdateSpellCraft(); }); - on("change:mendefbonus", function() + on("change:stealrating change:stealbonus", function() { - UpdateMenDefMod(); + UpdateStealing(); }); - on("change:fortbonus", function() + on("change:stealthrating change:stealthbonus", function() { - UpdateFortitude(); + UpdateStealth(); }); - on("change:chrbase change:chrbonus", function() + on("change:storyrating change:storybonus", function() { - UpdateCharisma(); + UpdateStoryTelling(); }); - on("change:socialbonus", function() + on("change:stsurvrating change:stsurvbonus", function() { - UpdateSocialPool(); + UpdateStreetSurvival(); }); - on("change:btybase change:btybonus", function() + on("change:streetrating change:streetbonus", function() { - UpdateBeauty(); + UpdateStreetwise(); }); - on("change:maxsaga", function() + on("change:swimrating change:swimbonus", function() { - UpdateLevel(); + UpdateSwimming(); }); - on("change:class", function() + on("change:teachrating change:teachbonus", function() { - getAttrs(["Class", "ClassSI", "SpiritInf"], function(values) - { - var si = 2; - switch(values.Class) - { - case "chaplain": - case "monk": - case "priest": - case "shaman": - case "templar": - case "zealot": - si = 10; - break; - } - - var bonus = Number(values.SpiritInf) - Number(values.ClassSI); - setAttrs({ClassSI: si}); - setAttrs({SpiritInf: Number(si) + Number(bonus)}); - }); + UpdateTeaching(); }); - on("change:race", function() + on("change:teamrating change:teambonus", function() { - getAttrs(["Race"], function(values) - { - var mv = 3; - var un = 3; - var str = 0; - var dex = 0; - var bdy = 0; - var prc = 0; - var int = 0; - var wil = 0; - var chr = 0; - var bty = 0; - var vis = ""; - var soul = 10; - - switch(values.Race) - { - case "ogre": - str = 4; dex = -2; bdy = 1; int = -2; chr = -1; mv = 2; un = 6; vis = "Twilight"; - break; - case "troll": - str = 4; dex = -2; bdy = 1; int = -2; chr = -1; mv = 2; un = 6; vis = "Dark Sight"; - break; - case "highelf": - str = -2; dex = 1; bdy = -2; prc = 1; int = 1; wil = 1; bty = 2; vis = "Twilight"; - break; - case "halfelf": - str = -1; bdy = -1; prc = 1; int = 1; bty = 1; vis = "Twilight"; - break; - case "shadow": - str = -2; dex = 1; bdy = -2; prc = 1; int = 1; wil = 1; bty = 2; vis = "Dark Sight"; - break; - case "dungoblin": - str = -1; dex = 1; prc = 1; chr = -1; mv = 4; vis = "Twilight"; - break; - case "knocker": - str = -2; dex = 2; prc = 1; chr = -1; mv = 4; vis = "Dark Sight"; - break; - case "mungreel": - str = -2; dex = 2; prc = 1; chr = -1; mv = 4; vis = "Dark Sight"; - break; - case "dark": - str = -1; dex = 1; bdy = -1; prc = 1; int = 1; wil = 1; chr = -2; bty = 2; vis = "Dark Sight"; - break; - case "halfdark": - bdy = -1; prc = 1; int = 1; wil = 1; chr = -2; bty = 1; vis = "Twilight"; - break; - case "kuthalan": - bdy = 2; prc = 2; wil = -1; chr = -3; vis = "Infravision"; - break; - case "mhentep": - str = -1; dex = 2; bdy = -1; prc = 2; wil = -2; mv = 4; vis = "Twilight"; - break; - case "minotaur": - str = 3; dex = -1; bdy = 2; prc = -2; int = -2; un = 5; vis = "Twilight"; - break; - case "highdwarf": - str = 2; dex = -1; bdy = 1; chr = -2; mv = 2; vis = "Dark Sight"; - break; - case "paledwarf": - str = 2; dex = -1; bdy = 1; chr = -2; mv = 2; vis = "Dark Sight"; - break; - case "stonedwarf": - str = 2; dex = -1; bdy = 1; chr = -2; mv = 2; vis = "Dark Sight"; - break; - case "nephilim": - str = 1; prc = 1; wil = -2; vis = "Chromatic / Astral Sight"; - break; - case "darkorc": - str = 2; bdy = 1; int = -1; chr = -2; un = 5; vis = "Dark Sight"; - break; - case "halforc": - str = 2; chr = -1; un = 4; vis = "Twilight"; - break; - case "orc": - str = 1; bdy = 1; int = -1; chr = -1; un = 4; vis = "Dark Sight"; - break; - case "sharpheen": - str = 2; bdy = 1; int = -1; chr = -2; un = 4; vis = "Infravision"; - break; - case "mulpheen": - str = 2; bdy = 1; int = -1; chr = -2; un = 4; vis = "Infravision"; - break; - case "skog": - str = 2; bdy = 1; prc = 2; int = -1; wil = -2; chr = -2; un = 4; vis = "Twilight"; - break; - case "halfskog": - str = 1; bdy = 1; int = -1; chr = -1; un = 4; vis = "Chromatic"; - break; - case "tarkanys": - str = -2; dex = 2; prc = 2; chr = -2; mv = 4; vis = "Dark Sight"; - break; - case "bloodtark": - str = 2; dex = -2; prc = 2; chr = -2; un = 5; vis = "Dark Sight"; - break; - case "human": - vis = "Chromatic"; soul = 12; - break; - case "mutant": - un = 4; vis = "Dark Sight"; soul = 8; - break; - } - setAttrs({RaceMvmt: mv}); - setAttrs({Vision: vis}); - setAttrs({SoulPoints: soul}); - - setAttrs({RaceUnarmedRank: un}); - UpdateUnarmed(); - - setAttrs({StrRace: str}); - UpdateStrength(); - - setAttrs({DexRace: dex}); - UpdateDexterity(); - - setAttrs({BdyRace: bdy}); - UpdateBody(); - - setAttrs({PrcRace: prc}); - UpdatePerception(); - - setAttrs({IntRace: int}); - UpdateIntelligence(); - - setAttrs({WilRace: wil}); - UpdateWillpower(); - - setAttrs({ChrRace: chr}); - UpdateCharisma(); - - setAttrs({BtyRace: bty}); - UpdateBeauty(); - }); + UpdateTeamster(); }); - on("change:unarmed", function() + on("change:thaumrating change:thaumbonus", function() { - UpdateUnarmed(); + UpdateThaumaturgy(); }); - on("change:alchrating change:alchbonus", function() + on("change:theorating change:theobonus", function() { - UpdateAlchemy(); + UpdateTheology(); }); - on("change:acrobatrating change:acrobatbonus", function() + on("change:tinkerrating change:tinkerbonus", function() { - UpdateAcrobatics(); + UpdateTinker(); }); - on("change:actrating change:actbonus", function() + on("change:trackrating change:trackbonus", function() { - UpdateActing(); + UpdateTracking(); }); - on("change:animalrating change:animalbonus", function() + on("change:trailrating change:trailbonus", function() { - UpdateAnimalKinship(); + UpdateTrailing(); }); - on("change:appraisalrating change:appraisalbonus", function() + on("change:traprating change:trapbonus", function() { - UpdateAppraisal(); + UpdateTraps(); }); - on("change:armorerrating change:armorerbonus", function() + on("change:wpnsmrating change:wpnsmbonus", function() { - UpdateArmorer(); + UpdateWeaponsmith(); }); - on("change:artrating change:artbonus", function() + on("change:weatherrating change:weatherbonus", function() { - UpdateArt(); + UpdateWeatherSense(); }); - on("change:astrorating change:astrobonus", function() + on("change:weaverating change:weavebonus", function() { - UpdateAstrology(); + UpdateWeaving(); }); - on("change:astronomyrating change:astronomybonus", function() + on("change:wildrating change:wildbonus", function() { - UpdateAstronomy(); + UpdateWildSurvival(); }); - on("change:barterrating change:barterbonus", function() - { - UpdateBarter(); + on("change:physmod change:menmod", function() { + updateAllAdditionalSkills(); }); - on("change:begrating change:begbonus", function() - { - UpdateBegging(); + on("change:repeating_skills:skillattribute change:repeating_skills:skillrating change:repeating_skills:skillbonus", function() { + var repeatingRowId = ''; + + UpdateAdditionalSkill(repeatingRowId); }); - on("change:blackrating change:blackbonus", function() + on("change:lang1rating change:lang1bonus change:lang2rating change:lang2bonus change:lang3rating change:lang3bonus", function() { - UpdateBlacksmith(); + UpdateLangSkills(); }); - on("change:bowyerrating change:bowyerbonus", function() + on("change:helmetar change:amuletar change:cloakar change:pauldronsar change:clothingar change:torsoar change:bracersar change:glovesar change:beltar change:greavesar change:bootsar change:ringar change:ring2ar change:otherar change:other2ar", function() { - UpdateBowyer(); + UpdateAR(); }); - on("change:brewrating change:brewbonus", function() + on("change:w1type", function() { - UpdateBrewing(); + UpdateW1DmgMod(); }); - on("change:carprating change:carpbonus", function() + on("change:w2type", function() { - UpdateCarpentry(); + UpdateW2DmgMod(); }); - on("change:chantrating change:chantbonus", function() + on("change:w3type", function() { - UpdateBattleChant(); + UpdateW3DmgMod(); }); - on("change:bloodrating change:bloodbonus", function() + on("change:w4type", function() { - UpdateBloodMagic(); + UpdateW4DmgMod(); }); - on("change:circlerating change:circlebonus", function() + on("change:w5type", function() { - UpdateCircleMagic(); + UpdateW5DmgMod(); }); - on("change:climbrating change:climbbonus", function() + on("change:w6type", function() { - UpdateClimbing(); + UpdateW6DmgMod(); }); - on("change:concrating change:concbonus", function() + on("change:honorrep change:corruptrep", function() { - UpdateConcealment(); - }); + getAttrs(["HonorRep", "CorruptRep"], function(values) + { + var goodRepDetails = GetReputationDetails(values.HonorRep); - on("change:conjrating change:conjbonus", function() - { - UpdateConjuring(); - }); + var badRepDetails = GetReputationDetails(values.CorruptRep); - on("change:cookrating change:cookbonus", function() - { - UpdateCooking(); - }); + var totalReputation = Number.parseInt(values.HonorRep) + Number.parseInt(values.CorruptRep); + var totalRepDetails = GetReputationDetails(totalReputation); + var talents = totalRepDetails.level - 1; + var totalReputationString = totalReputation.toLocaleString(); - on("change:creaturerating change:creaturebonus", function() - { - UpdateCreatureLore(); + setAttrs({ + TotalReputation: totalReputationString, + TotalReputationForNextLevel: totalRepDetails.nextLevel, + ReputationTalents: talents, + Glory: totalRepDetails.glory, + HonorTitle: goodRepDetails.goodTitle, + CorruptionTitle: badRepDetails.badTitle + }); + }); }); - - on("change:crystalrating change:crystalbonus", function() + + function GetReputationDetails(reputation) { - UpdateCrystalLore(); + if(reputation < 100) return { level: 1, nextLevel: '100', glory: 0, goodTitle: 'Unknown', badTitle: 'Unknown' }; + if(reputation < 250) return { level: 2, nextLevel: '250', glory: 10, goodTitle: 'Known', badTitle: 'Wanted' }; + if(reputation < 600) return { level: 3, nextLevel: '600', glory: 20, goodTitle: 'Respected', badTitle: 'Hunted' }; + if(reputation < 1000) return { level: 4, nextLevel: '1,000', glory: 30, goodTitle: 'Highly Respected', badTitle: 'Feared' }; + if(reputation < 1450) return { level: 5, nextLevel: '1,450', glory: 40, goodTitle: 'Local Hero', badTitle: 'Villain' }; + if(reputation < 2000) return { level: 6, nextLevel: '2,000', glory: 50, goodTitle: 'Great Hero', badTitle: 'Infamous Villain' }; + if(reputation < 3000) return { level: 7, nextLevel: '3,000', glory: 55, goodTitle: 'Immortal Hero', badTitle: 'Immortal Villain' }; + if(reputation < 5000) return { level: 8, nextLevel: '5,000', glory: 60, goodTitle: 'Epic Hero', badTitle: 'Arch-villain' }; + if(reputation < 8000) return { level: 9, nextLevel: '8,000', glory: 65, goodTitle: 'Revered Hero', badTitle: 'Nemesis' }; + if(reputation < 12000) return { level: 10, nextLevel: '12,000', glory: 70, goodTitle: 'Legendary Hero', badTitle: 'Arch-nemesis' }; + if(reputation < 50000) return { level: 11, nextLevel: '50,000', glory: 80, goodTitle: 'Great Legendary Hero', badTitle: 'Legendary Arch-nemesis' }; + if(reputation < 100000) return { level: 12, nextLevel: '100,000', glory: 90, goodTitle: 'Exalted Legendary Hero', badTitle: 'Unhallowed Scourge' }; + 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 = ''; - on("change:dancerating change:dancebonus", function() - { - UpdateDancing(); + UpdateAdditionalNonCombatSkill(repeatingRowId); + + UpdateAllAdditionalNonCombatSkills(); }); - - on("change:deceptrating change:deceptbonus", function() + + on("change:Skill1Attribute change:Skill1Rating change:Skill1Bonus", function() { - UpdateDeception(); + UpdateFixedNonCombatSkill(1); }); - - on("change:decipherrating change:decipherbonus", function() + + on("change:Skill2Attribute change:Skill2Rating change:Skill2Bonus", function() { - UpdateDecipher(); + UpdateFixedNonCombatSkill(2); }); - - on("change:demonrating change:demonbonus", function() + + on("change:Skill3Attribute change:Skill3Rating change:Skill3Bonus", function() { - UpdateDemonLore(); + UpdateFixedNonCombatSkill(3); }); - - on("change:disgrating change:disgbonus", function() + + on("change:Skill4Attribute change:Skill4Rating change:Skill4Bonus", function() { - UpdateDisguise(); + UpdateFixedNonCombatSkill(4); }); - - on("change:drinkrating change:drinkbonus", function() + + on("change:Skill5Attribute change:Skill5Rating change:Skill5Bonus", function() { - UpdateDrinking(); + UpdateFixedNonCombatSkill(5); }); - - on("change:drugrating change:drugbonus", function() + + on("change:Skill6Attribute change:Skill6Rating change:Skill6Bonus", function() { - UpdateDrugTolerance(); + UpdateFixedNonCombatSkill(6); }); - - on("change:liesrating change:liesbonus", function() + + on("change:Skill7Attribute change:Skill7Rating change:Skill7Bonus", function() { - UpdateDetectLies(); + UpdateFixedNonCombatSkill(7); }); - - on("change:endurrating change:endurbonus", function() + + on("change:Skill8Attribute change:Skill8Rating change:Skill8Bonus", function() { - UpdateEndurance(); + UpdateFixedNonCombatSkill(8); }); - - on("change:escaperating change:escapebonus", function() + + on("change:Skill9Attribute change:Skill9Rating change:Skill9Bonus", function() { - UpdateEscapeArtistry(); + UpdateFixedNonCombatSkill(9); }); - - on("change:exorcismrating change:exorcismbonus", function() + + on("change:Skill10Attribute change:Skill10Rating change:Skill10Bonus", function() { - UpdateExorcism(); + UpdateFixedNonCombatSkill(10); }); - on("change:farmrating change:farmbonus", function() + on("change:Skill11Attribute change:Skill11Rating change:Skill11Bonus", function() { - UpdateFarming(); + UpdateFixedNonCombatSkill(11); }); - - on("change:fishrating change:fishbonus", function() + + on("change:Skill12Attribute change:Skill12Rating change:Skill12Bonus", function() { - UpdateFishing(); + UpdateFixedNonCombatSkill(12); }); - - on("change:flyrating change:flybonus", function() + + on("change:Skill13Attribute change:Skill13Rating change:Skill13Bonus", function() { - UpdateFlying(); + UpdateFixedNonCombatSkill(13); }); - - on("change:foragerating change:foragebonus", function() + + on("change:Skill14Attribute change:Skill14Rating change:Skill14Bonus", function() { - UpdateForaging(); + UpdateFixedNonCombatSkill(14); }); - - on("change:forgeryrating change:forgerybonus", function() + + on("change:Skill15Attribute change:Skill15Rating change:Skill15Bonus", function() { - UpdateForgery(); + UpdateFixedNonCombatSkill(15); }); - - on("change:gamblerating change:gamblebonus", function() + + on("change:Skill16Attribute change:Skill16Rating change:Skill16Bonus", function() { - UpdateGambling(); + UpdateFixedNonCombatSkill(16); }); - - on("change:gemrating change:gembonus", function() + + on("change:Skill17Attribute change:Skill17Rating change:Skill17Bonus", function() { - UpdateGemCutting(); + UpdateFixedNonCombatSkill(17); }); - - on("change:glassrating change:glassbonus", function() + + on("change:Skill18Attribute change:Skill18Rating change:Skill18Bonus", function() { - UpdateGlassBlowing(); + UpdateFixedNonCombatSkill(18); }); - - on("change:healrating change:healbonus", function() + + on("change:Skill19Attribute change:Skill19Rating change:Skill19Bonus", function() { - UpdateHealing(); + UpdateFixedNonCombatSkill(19); }); - - on("change:heraldrating change:heraldbonus", function() + + on("change:Skill20Attribute change:Skill20Rating change:Skill20Bonus", function() { - UpdateHeraldry(); + UpdateFixedNonCombatSkill(20); }); - on("change:historyrating change:historybonus", function() - { - UpdateHistory(); - }); + 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'); - on("change:huntrating change:huntbonus", function() - { - UpdateHunting(); - }); + getSectionIDs("NonCombatSkills", function(ids) { + var details = ''; - on("change:impersonrating change:impersonbonus", function() - { - UpdateImpersonation(); - }); + for(var i=0; i < ids.length; i++) { + var rowId = ids[i]; + + UpdateAdditionalNonCombatSkill(rowId); - on("change:intrgrating change:intrgbonus", function() - { - UpdateInterrogation(); - }); - - on("change:jugglerating change:jugglebonus", function() - { - UpdateJuggling(); - }); - - on("change:jumprating change:jumpbonus", function() - { - UpdateJumping(); - }); - - on("change:lawrating change:lawbonus", function() - { - UpdateLaw(); - }); - - on("change:leadrating change:leadbonus", function() - { - UpdateLeadership(); - }); - - on("change:lworkrating change:lworkbonus", function() - { - UpdateLeatherWorking(); - }); - - on("change:liftrating change:liftbonus", function() - { - UpdateLifting(); - }); - - on("change:lingrating change:lingbonus", function() - { - UpdateLiguistics(); - }); - - on("change:liprating change:lipbonus", function() - { - UpdateLipReading(); - }); - - on("change:listenrating change:listenbonus", function() - { - UpdateListening(); - }); - - on("change:lockrating change:lockbonus", function() - { - UpdateLockPicking(); - }); - - on("change:locksmithrating change:locksmithbonus", function() - { - UpdateLocksmith(); - }); - - on("change:lootrating change:lootbonus", function() - { - UpdateLooting(); - }); - - on("change:maprating change:mapbonus", function() - { - UpdateMapping(); - }); - - on("change:masonrating change:masonbonus", function() - { - UpdateMasonry(); - }); - - on("change:medicrating change:medicbonus", function() - { - UpdateMedicine(); - }); - - on("change:meditationrating change:meditationbonus", function() - { - UpdateMeditation(); - }); - - on("change:miningrating change:miningbonus", function() - { - UpdateMining(); - }); - - on("change:musicrating change:musicbonus", function() - { - UpdateMusic(); - }); - - on("change:navrating change:navbonus", function() - { - UpdateNavigation(); - }); - - on("change:necrorating change:necrobonus", function() - { - UpdateNecromancy(); - }); - - on("change:observrating change:observbonus", function() - { - UpdateObservation(); - }); - - on("change:philrating change:philbonus", function() - { - UpdatePhilosophy(); - }); - - on("change:plantrating change:plantbonus", function() - { - UpdatePlantLore(); - }); + var skillsRowName = `repeating_NonCombatSkills_${rowId}_`; + if(details !== '') { + details += ', \r\n'; + } + details += skillsRowName; + } - on("change:poisrating change:poisbonus", function() - { - UpdatePoisons(); - }); + setAttrs({RepeatedSkillFieldIds: details}); + }); + } - on("change:potteryrating change:potterybonus", function() - { - UpdatePottery(); - }); + function UpdateAdditionalNonCombatSkill(repeatingRowId) { + var skillsRowName = `repeating_NonCombatSkills_${repeatingRowId}`; + if(repeatingRowId !== '') { + skillsRowName = skillsRowName + '_'; + } - on("change:readrating change:readbonus", function() - { - UpdateReadWrite(); - }); + 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]); - on("change:researchrating change:researchbonus", function() - { - UpdateResearch(); - }); + 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 + ); - on("change:ridingrating change:ridingbonus", function() - { - UpdateRiding(); - }); + var conditionMod = GetConditionModifier(skillAttribute, values.PhysMod, values.MenMod); + + var total = "-"; + if(skillRating > 0) + { + total = attributeBonus + skillRating + skillBonus; + } - on("change:runrating change:runbonus", function() - { - UpdateRunning(); - }); + calculatedAttributes[skillTotalName] = total; + calculatedAttributes[skillDiceName] = GetDice(total); + calculatedAttributes[skillConditionModName] = conditionMod; - on("change:searating change:seabonus", function() + setAttrs(calculatedAttributes); + }); + } + + on("sheet:opened", function() { - UpdateSeafaring(); + updateAllSkills(); + convertOldAttributes(); }); + + // We can probably get rid of this + function convertOldAttributes() { + const converted = "converted"; + const conversionNotNeeded = "conversion not needed"; + + getAttrs(["HpConverted", "CurHP", "CurHP_max", "MaxHP", "MaxHP_max", "CurMana", "CurMana_max", "MaxMana", "MaxMana_max", "CurChi", "CurChi_max", "MaxChi", "MaxChi_max", + "hit_points", "hit_points_max", "intelligence_mana", "intelligence_mana_max", "body_chi", "body_chi_max"], + function(values) + { + // If we're already converted, we don't need to do anything + var hpConverted = values.HpConverted; + if (hpConverted === converted || hpConverted === conversionNotNeeded) { + return; + } + + // If HP isn't set, this is a new sheet and doesn't need converting + if(values.CurHP <= 1 && values.MaxChi <= 1 && values.hit_points <= 1 && values.hit_points_max <= 1) { + setAttrs({ + HpConverted: conversionNotNeeded + }); + + console.log('Did not need to convert HP, mana and chi'); + return; + } - on("change:seducrating change:seducbonus", function() - { - UpdateSeduction(); - }); - - on("change:sewrating change:sewbonus", function() - { - UpdateSewing(); - }); - - on("change:siegerating change:siegebonus", function() - { - UpdateSiegeCraft(); - }); - - on("change:singrating change:singbonus", function() - { - UpdateSinging(); - }); - - on("change:skyrating change:skybonus", function() - { - UpdateSkyfaring(); - }); - - on("change:speechrating change:speechbonus", function() - { - UpdateSpeech(); - }); - - on("change:spcraftrating change:spcraftbonus", function() - { - UpdateSpellCraft(); - }); - - on("change:stealrating change:stealbonus", function() - { - UpdateStealing(); - }); - - on("change:stealthrating change:stealthbonus", function() - { - UpdateStealth(); - }); - - on("change:storyrating change:storybonus", function() - { - UpdateStoryTelling(); - }); - - on("change:stsurvrating change:stsurvbonus", function() - { - UpdateStreetSurvival(); - }); - - on("change:streetrating change:streetbonus", function() - { - UpdateStreetwise(); - }); - - on("change:swimrating change:swimbonus", function() - { - UpdateSwimming(); - }); - - on("change:teachrating change:teachbonus", function() - { - UpdateTeaching(); - }); - - on("change:teamrating change:teambonus", function() - { - UpdateTeamster(); - }); - - on("change:thaumrating change:thaumbonus", function() - { - UpdateThaumaturgy(); - }); - - on("change:theorating change:theobonus", function() - { - UpdateTheology(); - }); - - on("change:tinkerrating change:tinkerbonus", function() - { - UpdateTinker(); - }); - - on("change:trackrating change:trackbonus", function() - { - UpdateTracking(); - }); - - on("change:trailrating change:trailbonus", function() - { - UpdateTrailing(); - }); - - on("change:traprating change:trapbonus", function() - { - UpdateTraps(); - }); - - on("change:wpnsmrating change:wpnsmbonus", function() - { - UpdateWeaponsmith(); - }); - - on("change:weatherrating change:weatherbonus", function() - { - UpdateWeatherSense(); - }); - - on("change:weaverating change:weavebonus", function() - { - UpdateWeaving(); - }); - - on("change:wildrating change:wildbonus", function() - { - UpdateWildSurvival(); - }); - - on("change:physmod change:menmod", function() { - updateAllAdditionalSkills(); - }); - - on("change:repeating_skills:skillattribute change:repeating_skills:skillrating change:repeating_skills:skillbonus", function() { - var repeatingRowId = ''; - - UpdateAdditionalSkill(repeatingRowId); - }); - - on("change:lang1rating change:lang1bonus change:lang2rating change:lang2bonus change:lang3rating change:lang3bonus", function() - { - UpdateLangSkills(); - }); - - on("change:helmetar change:amuletar change:cloakar change:pauldronsar change:clothingar change:torsoar change:bracersar change:glovesar change:beltar change:greavesar change:bootsar change:ringar change:ring2ar change:otherar change:other2ar", function() - { - UpdateAR(); - }); - - on("change:w1type", function() - { - UpdateW1DmgMod(); - }); - - on("change:w2type", function() - { - UpdateW2DmgMod(); - }); - - on("change:w3type", function() - { - UpdateW3DmgMod(); - }); - - on("change:w4type", function() - { - UpdateW4DmgMod(); - }); - - on("change:w5type", function() - { - UpdateW5DmgMod(); - }); - - on("change:w6type", function() - { - UpdateW6DmgMod(); - }); - - on("change:honorrep change:corruptrep", function() - { - getAttrs(["HonorRep", "CorruptRep"], function(values) - { - var goodRepDetails = GetReputationDetails(values.HonorRep); - - var badRepDetails = GetReputationDetails(values.CorruptRep); - - var totalReputation = Number.parseInt(values.HonorRep) + Number.parseInt(values.CorruptRep); - var totalRepDetails = GetReputationDetails(totalReputation); - var talents = totalRepDetails.level - 1; - var totalReputationString = totalReputation.toLocaleString(); - + // Work out whether to use the current or max values of each "max" attribute + var curHP = Math.max(numberOrZero(values.CurHP), numberOrZero(values.hit_points)); + var maxHP = Math.max(numberOrZero(values.MaxHP), numberOrZero(values.MaxHP_max), numberOrZero(values.CurHP_max), numberOrZero(values.hit_points_max)); + var curMana = Math.max(numberOrZero(values.CurMana), numberOrZero(values.intelligence_mana)); + var maxMana = Math.max(numberOrZero(values.CurMana_max), numberOrZero(values.MaxMana), numberOrZero(values.MaxMana_max), numberOrZero(values.intelligence_mana_max)); + var curChi = Math.max(numberOrZero(values.CurChi), numberOrZero(values.body_chi)); + var maxChi = Math.max(numberOrZero(values.CurChi_max), numberOrZero(values.MaxChi), numberOrZero(values.MaxChi_max), numberOrZero(values.body_chi_max)); + setAttrs({ - TotalReputation: totalReputationString, - TotalReputationForNextLevel: totalRepDetails.nextLevel, - ReputationTalents: talents, - Glory: totalRepDetails.glory, - HonorTitle: goodRepDetails.goodTitle, - CorruptionTitle: badRepDetails.badTitle + HP: curHP, + HP_max: maxHP, + Mana: curMana, + Mana_max: maxMana, + Chi: curChi, + Chi_max: maxChi, + HpConverted: converted }); + + console.log('Converted HP, mana and chi'); }); - }); + } - function GetReputationDetails(reputation) - { - if(reputation < 100) return { level: 1, nextLevel: '100', glory: 0, goodTitle: 'Unknown', badTitle: 'Unknown' }; - if(reputation < 250) return { level: 2, nextLevel: '250', glory: 10, goodTitle: 'Known', badTitle: 'Wanted' }; - if(reputation < 600) return { level: 3, nextLevel: '600', glory: 20, goodTitle: 'Respected', badTitle: 'Hunted' }; - if(reputation < 1000) return { level: 4, nextLevel: '1,000', glory: 30, goodTitle: 'Highly Respected', badTitle: 'Feared' }; - if(reputation < 1450) return { level: 5, nextLevel: '1,450', glory: 40, goodTitle: 'Local Hero', badTitle: 'Villain' }; - if(reputation < 2000) return { level: 6, nextLevel: '2,000', glory: 50, goodTitle: 'Great Hero', badTitle: 'Infamous Villain' }; - if(reputation < 3000) return { level: 7, nextLevel: '3,000', glory: 55, goodTitle: 'Immortal Hero', badTitle: 'Immortal Villain' }; - if(reputation < 5000) return { level: 8, nextLevel: '5,000', glory: 60, goodTitle: 'Epic Hero', badTitle: 'Arch-villain' }; - if(reputation < 8000) return { level: 9, nextLevel: '8,000', glory: 65, goodTitle: 'Revered Hero', badTitle: 'Nemesis' }; - if(reputation < 12000) return { level: 10, nextLevel: '12,000', glory: 70, goodTitle: 'Legendary Hero', badTitle: 'Arch-nemesis' }; - if(reputation < 50000) return { level: 11, nextLevel: '50,000', glory: 80, goodTitle: 'Great Legendary Hero', badTitle: 'Legendary Arch-nemesis' }; - if(reputation < 100000) return { level: 12, nextLevel: '100,000', glory: 90, goodTitle: 'Exalted Legendary Hero', badTitle: 'Unhallowed Scourge' }; - return { level: 13, nextLevel: '-', glory: 99, goodTitle: 'Demigod', badTitle: 'Demigod' }; + function numberOrZero(input) { + return isNaN(input) ? 0 : Number(input); } - 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); - }); + + Attributes + + Skills + + Combat + + Gear + + Mystic + + Abilities + + Reputation + + Notes - 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); - }); +
+ + + + + + + + + + + + + +
Character Name: + +
Title or Alias: + +
Player Name: + +
+
- on("change:Skill15Attribute change:Skill15Rating change:Skill15Bonus", function() - { - UpdateFixedNonCombatSkill(15); - }); +
+ + + + + + + + + + + + + + + +
Class: + +
+ +
Race: + +
+ +
+
- on("change:Skill16Attribute change:Skill16Rating change:Skill16Bonus", function() - { - UpdateFixedNonCombatSkill(16); - }); +
+ + + + + + + + + + + + + + + + + +
Saved Saga Points: + +
Total Saga Points: + +
Level: + +
Saga Points for Next Level: + +
+
+
- 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); - }); + + + + + + + + + + + +
+

Hit Points

+
+ + +
Max + + +
+
- on("change:Skill20Attribute change:Skill20Rating change:Skill20Bonus", function() - { - UpdateFixedNonCombatSkill(20); - }); - - function updateAllFixedNonCombatSkills() { - console.log('Updating fixed non-combat skills'); +
+ + + + + + + + + + + +
+

Mana Pool

+
+ + +
Max + + +
+
- // Keep this in sync with the number of fixed skill rows on the sheet - const fixedSkillSlots = 20; +
+ + + + + + + + + + + +
+

Chi Pool

+
+ + +
Max + + +
+
- for(let row = 1; row <= fixedSkillSlots; row++) { - UpdateFixedNonCombatSkill(row); - } - } +
+ + + + + + + +
+

Frenzy

+
+ +
+
+
- 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`; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Physical Condition

+
+ + + + + + + + + + + + + +
0%-10%-25%-50%-75%-90%-100%
RestedTiredWearyFatiguedExhaustedOver-ExhaustedCritical
No ModNo Mod-1 rolls-2 rolls-3 rolls-4 rolls-5 rolls
- UpdateSkill(skillNameName, skillAttributeName, skillRatingName, skillBonusName, skillTotalName, skillDiceName, skillConditionModName); - } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Mental Condition

+
+ + + + + + + + + + + + + +
0%-10%-25%-50%-75%-90%-100%
ContentAgitatedDistraughtIrrationalUnstableManiacalSenseless
No ModNo Mod-1 rolls-2 rolls-3 rolls-4 rolls-5 rolls
+
- 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) { +
+

Attributes

- 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() - { - updateAllSkills(); - convertOldAttributes(); - }); - - // We can probably get rid of this - function convertOldAttributes() { - const converted = "converted"; - const conversionNotNeeded = "conversion not needed"; - - getAttrs(["HpConverted", "CurHP", "CurHP_max", "MaxHP", "MaxHP_max", "CurMana", "CurMana_max", "MaxMana", "MaxMana_max", "CurChi", "CurChi_max", "MaxChi", "MaxChi_max", - "hit_points", "hit_points_max", "intelligence_mana", "intelligence_mana_max", "body_chi", "body_chi_max"], - function(values) - { - // If we're already converted, we don't need to do anything - var hpConverted = values.HpConverted; - if (hpConverted === converted || hpConverted === conversionNotNeeded) { - return; - } - - // If HP isn't set, this is a new sheet and doesn't need converting - if(values.CurHP <= 1 && values.MaxChi <= 1 && values.hit_points <= 1 && values.hit_points_max <= 1) { - setAttrs({ - HpConverted: conversionNotNeeded - }); - - console.log('Did not need to convert HP, mana and chi'); - return; - } - - // Work out whether to use the current or max values of each "max" attribute - var curHP = Math.max(numberOrZero(values.CurHP), numberOrZero(values.hit_points)); - var maxHP = Math.max(numberOrZero(values.MaxHP), numberOrZero(values.MaxHP_max), numberOrZero(values.CurHP_max), numberOrZero(values.hit_points_max)); - var curMana = Math.max(numberOrZero(values.CurMana), numberOrZero(values.intelligence_mana)); - var maxMana = Math.max(numberOrZero(values.CurMana_max), numberOrZero(values.MaxMana), numberOrZero(values.MaxMana_max), numberOrZero(values.intelligence_mana_max)); - var curChi = Math.max(numberOrZero(values.CurChi), numberOrZero(values.body_chi)); - var maxChi = Math.max(numberOrZero(values.CurChi_max), numberOrZero(values.MaxChi), numberOrZero(values.MaxChi_max), numberOrZero(values.body_chi_max)); - - setAttrs({ - HP: curHP, - HP_max: maxHP, - Mana: curMana, - Mana_max: maxMana, - Chi: curChi, - Chi_max: maxChi, - HpConverted: converted - }); - - console.log('Converted HP, mana and chi'); - }); - } - - function numberOrZero(input) { - return isNaN(input) ? 0 : Number(input); - } - - - - - - - -
- -
-
- -
- - - Attributes - - Skills - - Combat - - Gear - - Mystic - - Abilities - - Reputation - - Notes - - Skills (Old) - - - -
-
-
- -
- -
- + +
- - + + + + + + + + + + + + + + + - - + + + + - - + + +
Character Name: - + AttributeBaseBonusTotalRankDice
+

Strength

+
+ + + + + + + +
Title or Alias: - + Damage Modifier: + + + + +
Player Name: - + Weight Allowance: +
-
-
- + +
- - + + + + + + + - + + + - - - - - - + -
Class: - - AttributeBaseBonusTotalRankDice
- + +

Dexterity

+
+ +
Race: - + +
- + + +
-
- -
- - + + + + - + + - - - - + - + + + +
Saved Saga Points: Defense Modifier: + + - + + +
Total Saga Points: Initiative Modifier: + + - +
Level: - + +
Saga Points for Next Level: Movement: + + - + + + / +
-
-
- -
-
- -
-
- - - - - - - - - - - - - - -
-

Hit Points

-
- - -
Max - - -
-
- -
- - - - - - - - - - - -
-

Mana Pool

-
- - -
Max - - -
-
- -
- - - - - - - - - - - -
-

Chi Pool

-
- - -
Max - - -
-
- -
- - - - - - - -
-

Frenzy

-
- -
-
-
- + +
- + + + + + + + - + + + - - - - + + + - - + - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - -
-

Physical Condition

-
AttributeBaseBonusTotalRankDice
- + +

Body

+
+ + - + + - + + - + + - +
Toughness: + - + + - + +
0%-10%-25%-50%-75%-90%-100%Body Save: + + + + +
RestedTiredWearyFatiguedExhaustedOver-ExhaustedCritical
No ModNo Mod-1 rolls-2 rolls-3 rolls-4 rolls-5 rolls
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Mental Condition

-
- - - - - - - - - - - - - -
0%-10%-25%-50%-75%-90%-100%
ContentAgitatedDistraughtIrrationalUnstableManiacalSenseless
No ModNo Mod-1 rolls-2 rolls-3 rolls-4 rolls-5 rolls
-
- - - - - - -
-

Attributes

- - - +
+ + + @@ -4263,49 +2847,54 @@

Attributes

- - + + - + - - + + +
Attribute Base
-

Strength

+

Perception

- - + + - + - + + value="&{template:roll} {{character=@{character_name}}} {{name=Perception Check}} {{roll=[[@{PrcDice}@{PhysMod}+?{Modifier|0}]]}}">
Damage Modifier:Shot Damage Modifier: - + - + - +
Weight Allowance:Range Modifier: + + - + + +
- + @@ -4318,68 +2907,60 @@

Strength

- - + + - + - + + - - - - + +
Attribute
-

Dexterity

+

Intelligence

- - + + - + - + + value="&{template:roll} {{character=@{character_name}}} {{name=Intelligence Check}} {{roll=[[@{IntDice}@{MenMod}+?{Modifier|0}]]}}">
Defense Modifier:Spell Effect: - + - + - +
Initiative Modifier:Spell Time: - - - + - +
Movement: - - Languages: - - - / - +
- + @@ -4392,55 +2973,55 @@

Dexterity

- - + + - + - - + - - + +
Attribute
-

Body

+

Willpower

- - + + - + - + + value="&{template:roll} {{character=@{character_name}}} {{name=Willpower Check}} {{roll=[[@{WilDice}@{MenMod}+?{Modifier|0}]]}}">
Toughness:Mental Defense: - + + - + - +
Body Save:Fortitude: - - + - + + + +
- + @@ -4453,236 +3034,49 @@

Body

- - + + - + - - - + +
Attribute
-

Perception

+

Charisma

- - + + - + - + + value="&{template:roll} {{character=@{character_name}}} {{name=Charisma Check}} {{roll=[[@{ChrDice}@{MenMod}+?{Modifier|0}]]}}">
Shot Damage Modifier:Social Pool: - + - + - +
Range Modifier: - - - - Reputation Bonus: - +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeBaseBonusTotalRankDice
-

Intelligence

-
- - - - - - - - -
Spell Effect: - - - - - -
Spell Time: - - - -
Languages: - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeBaseBonusTotalRankDice
-

Willpower

-
- - - - - - - - -
Mental Defense: - - - - - - -
Fortitude: - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeBaseBonusTotalRankDice
-

Charisma

-
- - - - - - - - -
Social Pool: - - - - - -
Reputation Bonus: - -
- - + @@ -8129,7 +6523,7 @@

Spiritual Influence

@@ -9727,3294 +8121,268 @@

Talents

- - - -
- - - - -
-

Class Abilities

- -
-
-
-
- -
-
- -
-
-
- - -
-
Attribute
- - - - - - - - -
Rating - - Max. Rating - - Power - -
- -
-
- -
- -
-

Notes

-
-
-
- -
-
- - - -
-
-
-
-
-
- - - -
-

Old Full List of Skills - Please Do Not Use

- -

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

- -
- -
-
-
-

Non-Fluent Languages

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameCostAttrRatingBonusTotalDiceRoll
- - 1Int - - - - - - - - - -
- - 1Int - - - - - - - - - -
- - 1Int - - - - - - - - - -
-
-
-
- -

Character Skills

- -
-

Creative

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameCostAttrRatingBonusTotalTierDiceRoll
Acting1Chr - - - - - - - - -
Art1Per - - - - - - - - -
Gem Cutting1Per - - - - - - - - -
Glass Blowing1Per - - - - - - - - -
Impersonation1Chr - - - - - - - - -
Mapping1Per - - - - - - - - -
Music1Per - - - - - - - - -
Pottery1Per - - - - - - - - -
Sewing1Per - - - - - - - - -
Singing1Chr - - - - - - - - -
Story Telling1Chr - - - - - - - - -
Weaving1Per - - - - - - - - -
-
-
-
- -
-

Diplomatic

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameCostAttrRatingBonusTotalTierDiceRoll
Animal Kinship1Chr - - - - - - - - -
Bartering1Chr - - - - - - - - -
Deception1Chr - - - - - - - - -
Detect Lies1Per - - - - - - - - -
Interrogation1Chr - - - - - - - - -
Leadership1Chr - - - - - - - - -
Seduction1Chr - - - - - - - - -
Speech1Chr - - - - - - - - -
Streetwise1Chr - - - - - - - - -
-
-
-
- -
-

Magical

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameCostAttrRatingBonusTotalTierDiceRoll
Alchemy2Int - - - - - - - - -
Astrology1Int - - - - - - - - -
Battle Chant1Wil - - - - - - - - -
Blood Magic1Wil - - - - - - - - -
Circle Magic1Int - - - - - - - - -
Conjuring2Wil - - - - - - - - -
Crystal Lore1Int - - - - - - - - -
Exorcism1Wil - - - - - - - - -
Meditation1Wil - - - - - - - - -
Necromancy1Wil - - - - - - - - -
Spell Craft3Int - - - - - - - - -
Thaumaturgy1Int - - - - - - - - -
-
-
-
- -
-

Medical

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameCostAttrRatingBonusTotalTierDiceRoll
Healing1Int - - - - - - - - -
Medicine1Int - - - - - - - - -
Plant Lore1Int - - - - - - - - -
Poisons1Int - - - - - - - - -
-
-
-
- -
-

Physical

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameCostAttrRatingBonusTotalTierDiceRoll
Acrobatics1Dex - - - - - - - - -
Climbing1Dex - - - - - - - - -
Dancing1Dex - - - - - - - - -
Drinking1Bod - - - - - - - - -
Drug Tolerance1Bod - - - - - - - - -
Endurance1Bod - - - - - - - - -
Flying1Dex - - - - - - - - -
Juggling1Dex - - - - - - - - -
Jumping1Dex - - - - - - - - -
Lifting1Str - - - - - - - - -
Lip Reading1Per - - - - - - - - -
Listening1Per - - - - - - - - -
Observation1Per - - - - - - - - -
Running1Dex - - - - - - - - -
Swimming1Dex - - - - - - - - -
-
-
-
-
- -
-

Character Skills

- -
-

Roguish

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameCostAttrRatingBonusTotalTierDiceRoll
Appraisal1Int - - - - - - - - -
Begging1Chr - - - - - - - - -
Concealment1Per - - - - - - - - -
Disguise1Per - - - - - - - - -
Escape Artistry1Dex - - - - - - - - -
Forgery1Per - - - - - - - - -
Gambling1Per - - - - - - - - -
Lock Picking1Dex - - - - - - - - -
Looting1Per - - - - - - - - -
Stealing1Dex - - - - - - - - -
Stealth1Dex - - - - - - - - -
Trailing1Per - - - - - - - - -
-
-
-
- -
-

Scholarly

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameCostAttrRatingBonusTotalTierDiceRoll
Astronomy1Per - - - - - - - - -
Creature Lore1Int - - - - - - - - -
Decipher1Int - - - - - - - - -
Demon Lore1Int - - - - - - - - -
Heraldry1Int - - - - - - - - -
History1Int - - - - - - - - -
Law1Int - - - - - - - - -
Linguistics1Int - - - - - - - - -
Philosophy1Chr - - - - - - - - -
Read & Write1Int - - - - - - - - -
Research1Int - - - - - - - - -
Teaching1Int - - - - - - - - -
Theology1Int - - - - - - - - -
-
-
-
- -
-

Survival

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameCostAttrRatingBonusTotalTierDiceRoll
Cooking1Per - - - - - - - - -
Fishing1Per - - - - - - - - -
Foraging1Per - - - - - - - - -
Hunting1Per - - - - - - - - -
Street Survival1Int - - - - - - - - -
Tracking1Per - - - - - - - - -
Traps1Per - - - - - - - - -
Weather Sense1Per - - - - - - - - -
Wilderness Survival1Int - - - - - - - - -
-
-
-
- -
-

Trade

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameCostAttrRatingBonusTotalTierDiceRoll
Armorer1Int - - - - - - - - -
Blacksmith1Int - - - - - - - - -
Bowyer & Fletcher1Int - - - - - - - - -
Brewing1Int - - - - - - - - -
Carpentry1Int - - - - - - - - -
Farming1Int - - - - - - - - -
Leather Working1Int - - - - - - - - -
Locksmith1Int - - - - - - - - -
Masonry1Int - - - - - - - - -
Mining1Int - - - - - - - - -
Siege Craft1Int - - - - - - - - -
Tinker1Int - - - - - - - - -
Weaponsmith1Int - - - - - - - - -
-
-
-
- -
-

Travel

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameCostAttrRatingBonusTotalTierDiceRoll
Navigation1Per - - - - - - - - -
Riding1Dex - - - - - - - - -
Seafaring1Int - - - - - - - - -
Skyfaring1Int - - - - - - - - -
Teamster1Dex - - - - - - - - -
+ + +
-
+ +
-
-

Additional Skills

-
- - -
+
+

Class Abilities

-
- - - - - - - - - - - - +
+
+
+
+ +
+
+ +
+
+
+ + +
+
NameCostAttrRatingBonusTotalTierDiceRoll
- - - + + + - - -
- - - - - - Rating - + Max. Rating - + Power - - - - - - - - +
-
+ +
+
+ +
+ +
+

Notes

+
+
+
+ +
+
+ + + +
+
+
+
+