From 5071ed024b4e986feaf59b9fe2afb2dcee2c8537 Mon Sep 17 00:00:00 2001
From: Brett Nash
Date: Mon, 28 Oct 2024 22:34:26 -0700
Subject: [PATCH] RolemasterUnified Official: Skill and other improvements
- Finally update skills to show specilisations,
- Fix translation issue identified by Jon_joe.
- Seems French has 2 strings translated. And one exposed a bug
- Add tests for case
- improve code flow. My JS has improved.
- Add injury string to direcly rolled cripts
- New combat has moved; now in creatures too
- Improve favourite skills buttons and layout
- Remove some spurious nil class descriptions
- RRs can now click on number or die
---
.../rolemasterunified.css | 9 +
.../rolemasterunified.html | 1108 +++++++++--------
RolemasterUnified_Official/sheet.json | 2 +-
RolemasterUnified_Official/updates.md | 15 +-
4 files changed, 629 insertions(+), 505 deletions(-)
diff --git a/RolemasterUnified_Official/rolemasterunified.css b/RolemasterUnified_Official/rolemasterunified.css
index c65e44e065..054827b7a3 100644
--- a/RolemasterUnified_Official/rolemasterunified.css
+++ b/RolemasterUnified_Official/rolemasterunified.css
@@ -295,6 +295,15 @@ input:not(:checked).toggle + .toggler { display: none; }
background: #dee;
}
+/* A text entry meant to blend in as text */
+.cminputinline {
+ border: none;
+ display: inline;
+ font-family: inherit;
+ font-size: inherit;
+ padding: 0px;
+ width: 20em;
+}
.skill_specialization {
font-style: italic;
diff --git a/RolemasterUnified_Official/rolemasterunified.html b/RolemasterUnified_Official/rolemasterunified.html
index c47a96cef5..4a5a3a5088 100644
--- a/RolemasterUnified_Official/rolemasterunified.html
+++ b/RolemasterUnified_Official/rolemasterunified.html
@@ -1101,11 +1101,11 @@ in the game in "Superior".
?
-
+
-
+
@@ -1117,11 +1117,11 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1133,27 +1133,27 @@ in the game in "Superior".
?
-
+
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1165,23 +1165,23 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
@@ -1193,15 +1193,15 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1213,27 +1213,27 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1245,7 +1245,7 @@ in the game in "Superior".
?
-
+
?
@@ -1281,7 +1281,7 @@ in the game in "Superior".
(Current ranks -, bonus -)
-
+
?
@@ -1305,12 +1305,12 @@ in the game in "Superior".
(Current ranks -, bonus -)
-
+
?
(Current ranks -, bonus -)
-
+
?
@@ -1362,15 +1362,15 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1382,31 +1382,31 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1418,11 +1418,11 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1434,15 +1434,15 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
-
+
@@ -1509,15 +1509,15 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1529,7 +1529,7 @@ in the game in "Superior".
?
-
+
@@ -1548,15 +1548,15 @@ in the game in "Superior".
(Current ranks -, bonus -)
-
+
-
+
-
+
@@ -1583,19 +1583,19 @@ in the game in "Superior".
(Current ranks -, bonus -)
-
+
-
+
-
+
-
+
(Current ranks -, bonus -)
@@ -1607,15 +1607,15 @@ in the game in "Superior".
?
-
+
-
+
-
+
(Current ranks -, bonus -)
@@ -1627,15 +1627,15 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1647,15 +1647,15 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1667,19 +1667,19 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1691,15 +1691,15 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
-
+
(Current ranks -, bonus -)
@@ -1711,11 +1711,11 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
@@ -1730,11 +1730,11 @@ in the game in "Superior".
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1746,19 +1746,19 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1770,7 +1770,7 @@ in the game in "Superior".
?
-
+
@@ -1785,15 +1785,15 @@ in the game in "Superior".
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1805,7 +1805,7 @@ in the game in "Superior".
?
-
+
?
@@ -1849,7 +1849,7 @@ in the game in "Superior".
?
-
+
@@ -1872,15 +1872,15 @@ in the game in "Superior".
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1892,11 +1892,11 @@ in the game in "Superior".
?
-
+
(Current ranks -, bonus -)
-
+
@@ -1907,7 +1907,7 @@ in the game in "Superior".
(Current ranks -, bonus -)
-
+
(Current ranks -, bonus -)
@@ -1919,7 +1919,7 @@ in the game in "Superior".
?
-
+
@@ -1946,7 +1946,7 @@ in the game in "Superior".
(Current ranks -, bonus -)
-
+
@@ -1993,7 +1993,7 @@ in the game in "Superior".
(Current ranks -, bonus -)
-
+
@@ -2120,8 +2120,7 @@ in the game in "Superior".
- Current ranks -
- bonus -
+
@@ -3154,29 +3153,29 @@ Name
y0
- channelingin0
+ channelingin
-
+
y0
- essenceem0
+ essenceem
-
+
y0
- mentalismpr0
+ mentalismpr
-
+
y0
- physicalco0
+ physicalco
-
+
y0
- fearsd0
+ fearsd
-
+
@@ -3191,15 +3190,17 @@ Name
y
@@ -3254,14 +3255,14 @@ Name
-j
+j
@@ -3275,15 +3276,15 @@ Name
Perception •sd
-
-j
+
+j
yTracking •sd
-
-j
+
+j
@@ -3297,50 +3298,50 @@ Name
-j
+j
yManeuvering in Armor •
-
-j
+
+j
yMounted Combat •
-
-j
+
+j
yProtect •
-
-j
+
+j
yRestricted Quarters •
-
-j
+
+j
ySubduing •
-
-j
+
+j
@@ -3353,43 +3354,43 @@ Name
Adrenal Defense •ag
-
-j
+
+j
yAdrenal Focus •sd
-
-j
+
+j
yAdrenal Speed •qu
-
-j
+
+j
yAdrenal Strength •st
-
-j
+
+j
yDiscipline Styles •&
-j
+j
@@ -3403,22 +3404,22 @@ Name
Body Development •co
-
-j
+
+j
yFortitude •sd
-
-j
+
+j
yWeight-training •st
-
-j
+
+j
@@ -3431,51 +3432,51 @@ Name
Blind Fighting •
-
-j
+
+j
yCombat Styles •&
-j
+j
yDisarm •
-
-j
+
+j
yFootwork •
-
-j
+
+j
yMultiple Attacks •
-
-j
+
+j
yReverse Strike •
-
-j
+
+j
@@ -3487,188 +3488,188 @@ Name
yMelee Weapons •st
-
+
yBlade
-
-
j
+
+
j
yChain
-
-
j
+
+
j
yHafted
-
-
j
+
+
j
yGreater Blade
-
-
j
+
+
j
yGreater Chain
-
-
j
+
+
j
yGreater Hafted
-
-
j
+
+
j
yPole Arm
-
-
j
+
+
j
yExotic
-
-
j
+
+
j
yRanged Weapons •ag
-
+
yBow
-
-
j
+
+
j
yCrossbow
-
-
j
+
+
j
ySling
-
-
j
+
+
j
yThrown
-
-
j
+
+
j
yExotic
-
-
j
+
+
j
yShield •st
-
-j
+
+j
yUnarmed •
-
+
yStrikesst
-
-
j
+
+
j
ySweeps & Throwsag
-
-
j
+
+
j
yWrestlingag
-
-
j
+
+
j
yBeakst
-
-
j
+
+
j
yBitest
-
-
j
+
+
j
yClawst
-
-
j
+
+
j
yHornst
-
-
j
+
+
j
yRamst
-
-
j
+
+
j
yStingerag
-
-
j
+
+
j
yTramplest
-
-
j
+
+
j
@@ -3681,22 +3682,22 @@ Name
Illusion Crafting •pr
-
-j
+
+j
yMusical Composition •pr
-
-j
+
+j
yWriting •re
-
-j
+
+j
@@ -3709,50 +3710,50 @@ Name
Culinary •sd
-
-j
+
+j
yDrawing/Painting •in
-
-j
+
+j
yFabric Craft •sd
-
-j
+
+j
yLeathercraft •sd
-
-j
+
+j
yMetalcraft •st
-
-j
+
+j
yStonecraft •st
-
-j
+
+j
yWoodcraft •sd
-
-j
+
+j
@@ -3765,15 +3766,15 @@ Name
Attunement •pr
-
-j
+
+j
yRunes •pr
-
-j
+
+j
@@ -3786,127 +3787,127 @@ Name
Navigation •re
-
-j
+
+j
yPiloting •ag&
-j
+j
ySurvival •re
-
+
yAlpine (A)
-
-
j
+
+
j
yOceans (O)
-
-
j
+
+
j
yUnderground (U)
-
-
j
+
+
j
yIce Caps (I)
-
-
j
+
+
j
yTundra (T)
-
-
j
+
+
j
yBoreal Forest (B)
-
-
j
+
+
j
yDesert Shrublands (X)
-
-
j
+
+
j
yPrairies & Steppes (P)
-
-
j
+
+
j
yTemperate Forests (F)
-
-
j
+
+
j
yHot Deserts (D)
-
-
j
+
+
j
ySavannas (S)
-
-
j
+
+
j
yTropical Forest (J)
-
-
j
+
+
j
yUrban
-
-
j
+
+
j
yXeno
-
-
j
+
+
j
@@ -3919,22 +3920,22 @@ Name
Acrobatics •st
-
-j
+
+j
yContortions •sd
-
-j
+
+j
yJumping •st
-
-j
+
+j
@@ -3946,50 +3947,50 @@ Name
yCreature Lore •re
-
+
yDemon
-
-
j
+
+
j
yDragon
-
-
j
+
+
j
yFaerie
-
-
j
+
+
j
yUndead
-
-
j
+
+
j
yHistoric Lore •re&
-j
+j
y
@@ -3997,77 +3998,77 @@ Name
-j
+j
yMaterials Lore •re
-
+
yBone/Horn
-
-
j
+
+
j
yFabrics
-
-
j
+
+
j
yLeather
-
-
j
+
+
j
yMetal
-
-
j
+
+
j
yStone
-
-
j
+
+
j
yWood
-
-
j
+
+
j
yRacial Lore •re&
-j
+j
y
@@ -4075,14 +4076,14 @@ Name
-j
+j
y
@@ -4090,22 +4091,22 @@ Name
-j
+j
ySpell Lore •in
-
-j
+
+j
@@ -4119,14 +4120,14 @@ Name
-j
+j
y
@@ -4134,22 +4135,22 @@ Name
-j
+j
yTranscendence •
-
-j
+
+j
@@ -4162,22 +4163,22 @@ Name
Herbalism •re
-
-j
+
+j
yMedicine •re
-
-j
+
+j
yPoison Mastery •re
-
-j
+
+j
@@ -4190,22 +4191,22 @@ Name
Control Lycanthropy •sd
-
-j
+
+j
yMeditation •sd
-
-j
+
+j
yMental Focus •sd
-
-j
+
+j
@@ -4218,29 +4219,29 @@ Name
Climbing •co
-
-j
+
+j
yFlying •co
-
-j
+
+j
yRunning •co
-
-j
+
+j
ySwimming •co
-
-j
+
+j
@@ -4253,30 +4254,30 @@ Name
Acting •me
-
-j
+
+j
yMusic •me&
-j
+j
yStage Magic •ag
-
-j
+
+j
@@ -4289,49 +4290,49 @@ Name
Channeling •sd
-
-j
+
+j
yDirected Spell •ag
-
+
yElemental Bolts
-
-
j
+
+
j
yIllusionary Attacks
-
-
j
+
+
j
yHurling
-
-
j
+
+
j
yPower Development •co
-
-j
+
+j
yPower Projection •sd
-
-j
+
+j
@@ -4344,29 +4345,29 @@ Name
Architecture •re
-
-j
+
+j
yAstronomy •re
-
-j
+
+j
yEngineering •re
-
-j
+
+j
yMathematics •re
-
-j
+
+j
@@ -4378,50 +4379,50 @@ Name
yInfluence •pr
-
+
yCharm
-
-
j
+
+
j
yDuping
-
-
j
+
+
j
yIntimidation
-
-
j
+
+
j
yLeadership •pr
-
-j
+
+j
ySocial Awareness •em
-
-j
+
+j
yTrading •pr
-
-j
+
+j
@@ -4433,64 +4434,64 @@ Name
yMagical Ritual •me
-
+
yAlteration
-
-
j
+
+
j
yCreation
-
-
j
+
+
j
yDefensive
-
-
j
+
+
j
yDestruction
-
-
j
+
+
j
yElemental
-
-
j
+
+
j
yHealing
-
-
j
+
+
j
yInformational
-
-
j
+
+
j
ySummoning & Transportation
-
-
j
+
+
j
@@ -4502,64 +4503,64 @@ Name
yAmbush •in
-
+
yDirected Spells
-
-
j
+
+
j
yMelee
-
-
j
+
+
j
yRanged
-
-
j
+
+
j
yShield
-
-
j
+
+
j
yUnarmed
-
-
j
+
+
j
yConcealment •in
-
-j
+
+j
yStalking •in
-
-j
+
+j
yTrickery •in
-
-j
+
+j
@@ -4572,35 +4573,35 @@ Name
Locks •ag
-
-j
+
+j
yMechanics •me
-
+
yOperation
-
-
j
+
+
j
yRepair & Construction
-
-
j
+
+
j
yTraps •ag
-
-j
+
+j
@@ -4612,258 +4613,258 @@ Name
yAdministration •re
-
+
yBookkeeper
-
-
j
+
+
j
yLibrarian
-
-
j
+
+
j
yOfficer
-
-
j
+
+
j
yManager
-
-
j
+
+
j
yQuartermaster
-
-
j
+
+
j
ySeneschal
-
-
j
+
+
j
yService •pr
-
+
yBodyguard
-
-
j
+
+
j
yBonesetter
-
-
j
+
+
j
yCasino Dealer/Croupier
-
-
j
+
+
j
yGuardsman
-
-
j
+
+
j
yGuide
-
-
j
+
+
j
yInnkeeper
-
-
j
+
+
j
yPurser
-
-
j
+
+
j
yResearcher
-
-
j
+
+
j
yShaman
-
-
j
+
+
j
yTeacher
-
-
j
+
+
j
yValet
-
-
j
+
+
j
yTrade •re
-
+
yBlacksmith
-
-
j
+
+
j
yCarpenter
-
-
j
+
+
j
yFarmer
-
-
j
+
+
j
yFence
-
-
j
+
+
j
yGambler
-
-
j
+
+
j
yHerdsman
-
-
j
+
+
j
yHunter
-
-
j
+
+
j
yMerchant
-
-
j
+
+
j
yMiner
-
-
j
+
+
j
yPirate
-
-
j
+
+
j
ySailor
-
-
j
+
+
j
yScribe
-
-
j
+
+
j
ySoldier
-
-
j
+
+
j
yThief
-
-
j
+
+
j
yTinker
-
-
j
+
+
j
yTrapper
-
-
j
+
+
j
yWeaver
-
-
j
+
+
j
@@ -5645,7 +5646,7 @@ Sheet Version:
-Revision b29e6a3f1b8c2c2f18a89550163ac8a31028b97d
+Revision 07d35031ffbeec6d473383fdf4a251188de88db7
@@ -7186,7 +7187,18 @@ let RMUSkills = {};
}
RMUSkills.getCatByDisplayName = getCatByDisplayName;
-
+ let getCatByDisplayNameCacheNoTrans_ = false;
+ function getCatByDisplayNameNoTrans(skillname) {
+ if (!getCatByDisplayNameCacheNoTrans_) {
+ let cache = {};
+ for (const c of categories) {
+ cache[c.display] = c
+ }
+ getCatByDisplayNameCacheNoTrans_ = cache;
+ }
+ return getCatByDisplayNameCacheNoTrans_[skillname]
+ }
+ RMUSkills.getCatByDisplayNameNoTrans = getCatByDisplayNameNoTrans;
const rankbonustable = [
/* 0 */ -25,
@@ -9070,6 +9082,7 @@ onCheck("clicked:specialization_add", (ev) => {
const catname = ev.htmlAttributes["data-cat"];
const specname = ev.htmlAttributes["data-specname"];
const data = getCharmancerData();
+ console.log(data, data?.profession, data?.profession?.values, data?.profession?.values?.profession);
const profession = cleanCompendiumName(data.profession.values.profession);
const costs = getCostsFromData(profession);
const costarray = generateCostArray(costs[catname]);
@@ -9222,6 +9235,43 @@ onCheck("clicked:repeating_statgain", removeExtraStatGain);
onCheck("page:levelup", levelUpStart);
+/**
+ * For all specialised skills, get the name and ranks of the skills.
+ *
+ * Stored in results; each specialised skill is a list of the skill name and ranks
+ *
+ * results = { "riding": [prefix:'sss', category:animal, aname: 'riding', name:"Horse",ranks:7,bonus:44] .. };
+ */
+function getSpecialisedSkillRanks(results) {
+ categories.forEach((cat) => {
+ cat.skills.forEach((skill) => {
+ if (!skill.dynamicspecializations) return;
+ let prefix = `repeating_specialization${skill.aname}`
+ getSectionIDsPending(prefix, (ids) => {
+ if (ids.length == 0) return;
+ let specskill = [];
+ results[skill.aname] = specskill;
+ ids.forEach(id => {
+ let toget = [];
+ toget.push(prefix + '_' + id + "_name");
+ toget.push(prefix + '_' + id + "_ranks");
+ toget.push(prefix + '_' + id + "_bonus");
+ getAttrsPending(toget, data => {
+ specskill.push({
+ category: cat.aname,
+ id:id,
+ prefix:prefix + '_' + id,
+ aname:skill.aname,
+ name:data[prefix + '_' + id + "_name"],
+ bonus:data[prefix + '_' + id + "_bonus"],
+ ranks:data[prefix + '_' + id+ "_ranks"]});
+ });
+ });
+ });
+ });
+ });
+}
+
function levelUpStart(_) {
console.log("********** Level up start **********");
pendingInfo();
@@ -9277,15 +9327,13 @@ function levelUpStart(_) {
});
// Global scope; as the other is a pending funtion.
+ let savedskills = [];
let savedspelllists = [];
let savedtalents = [];
let savedstatgains = [];
addPendingFunction("Level Up Start body", () => {
// So we need to get the profession & Costs
-
-
-
dpspent = 0;
let catupdates = {}
@@ -9309,13 +9357,17 @@ function levelUpStart(_) {
}
cmPopulateListOptions('cmskill' + skill.aname + 'ranks', costarray);
});
+ });
+ const specialisedranks = {}
+ addPendingFunction('Levelup: Get specialised skill ranks', () => {
+ getSpecialisedSkillRanks(specialisedranks);
+ });
+ addPendingFunction("Levelup: Get previous purchases", () => {
// On load I should check the list of repeating sections and add
// them
if (data?.levelup?.repeating) {
- const profession = data.profession.values.profession;
- const costs = getCostsFromData(profession);
for (const index in data.levelup.repeating) {
// Need to extract the skillname so I can call addRepeating again
const prefix = data.levelup.repeating[index];
@@ -9332,28 +9384,73 @@ function levelUpStart(_) {
savedstatgains.push(prefix);
continue;
}
+ if (prefix.endsWith("_specializations")) {
+ savedskills.push(prefix);
+ continue;
+ }
const match = prefix.match(/cmskill_(.*)_specializations/)
- if (!match || match.length < 2) {
- rmuerror("Coulnd't match regex against ", prefix, index);
- continue;
- }
+ if (!match || match.length < 2) {
+ rmuerror("Coulnd't match regex against ", prefix, index);
+ continue;
+ }
+ // what match regex
const origname = match[0];
+ // the capture - the id
const skillname = match[1];
+ console.log(match, 'wholething', match[0], 'cmskill', match[1]);
+
+ // See if these match the name of any of the skills on the sheet
+ // (match by user visible name)
+ const sname = `${sectionname}_specname`;
+
+ // Get the appropriate specialisation (if any)
+ const thisspecskills = specialisedranks[skillname];
+ for (skill in thisspecskills) {
+
+ }
+/*
const skill = RMUSkills.getSkillByName(skillname)
const costarray = generateCostArray(costs[skill.category]);
addRepeatingSection(`cmskill${skillname}`, 'specialization', origname,
(sectionname) => {
console.log("recreate section", sectionname);
- const sname = `${sectionname}_specname`;
const rname = `${sectionname}_cmskillranks`;
cmPopulateListOptions(rname, costarray, data.levelup.values[rname])
setAttrsPending({[sname]: data.levelup.values[sname]});
}
- );
+ );*/
}
}
});
+
+ addPendingFunction('Levelup: Create specialisations from ranks', () => {
+ console.log('specranks', specialisedranks);
+ for (const skillname in specialisedranks) {
+ const specials = specialisedranks[skillname];
+ console.log(skillname, specials);
+ specials.forEach(skill => {
+ console.log('add repeatin', `cmskill${skill.aname}`, 'specialization', skill.aname);
+ addRepeatingSection(`cmskill${skill.aname}`, 'specialization', `cmskill_${skill.aname}_specializations`,
+ (sectionname) => {
+ const costarray = generateCostArray(costs[skill.category]);
+ console.log( skill.category, costs[skill.category]);
+ console.log("recreate section", sectionname);
+ const longname = `${sectionname}_skillrankscombo`;
+ const sname = `${sectionname}_specname`;
+ const rname = `${sectionname}_cmskillranks`;
+ const bonus = `${sectionname}_cmskillbonus`;
+
+ cmPopulateListOptions(rname, costarray, 0)
+ setAttrsPending({[sname]: skill.name,
+ [longname]: `Current ranks ${skill.ranks} Bonus: ${skill.bonus}`
+ });
+ });
+ });
+ }
+ });
+
+
addPendingFunction('Talents add', () => {
const data = getCharmancerData();
console.log("data.level.values.current_level");
@@ -9368,6 +9465,7 @@ function levelUpStart(_) {
}
});
+
// FIXME: THis is duplicated below. I hsould make it function
const listRanks = {};
{
@@ -9523,6 +9621,9 @@ onCheck("mancerfinish:levelup", (ev) => {
if (purchase.includes("_talent_")) {
continue;
}
+ if (purchase.endsWith("_skillrankscombo")) {
+ continue;
+ }
if (purchase.includes("spelllist")) {
// Spell list, skip it - get cmranks & listname at once.
@@ -10412,11 +10513,11 @@ onCheck("clicked:rollstats", function(ev) {
const powerlevel = data.powerlevel.values.powerlevel;
let reroll = 11;
switch (powerlevel) {
- case 'Average': reroll = 0; break;
- case 'Superior': reroll = 11; break;
- case 'Heroic': reroll = 21; break;
- case 'Legendary': reroll = 31; break;
- case 'Epic': reroll = 41; break;
+ case 'Average': reroll = 0; break;
+ case 'Superior': reroll = 11; break;
+ case 'Heroic': reroll = 21; break;
+ case 'Legendary': reroll = 31; break;
+ case 'Epic': reroll = 41; break;
}
systemRollStats(reroll, powerlevel);
});
@@ -10810,7 +10911,8 @@ function saveCostData(pdata, kdata) {
{
const scosts = pdata['data-skillCost'];
for (const [group, cost] of Object.entries(scosts)) {
- updates[RMUSkills.getCatByDisplayName(group)?.aname + "_cost"] = cost;
+ // Costs from compendium are not localised.
+ updates[RMUSkills.getCatByDisplayNameNoTrans(group)?.aname + "_cost"] = cost;
}
}
{
diff --git a/RolemasterUnified_Official/sheet.json b/RolemasterUnified_Official/sheet.json
index 2dc97b6a17..f53a18f875 100644
--- a/RolemasterUnified_Official/sheet.json
+++ b/RolemasterUnified_Official/sheet.json
@@ -8,5 +8,5 @@
"legacy": false,
"printable": true,
"compendium": "RMU",
- "version": "1729631096"
+ "version": "1730180043"
}
diff --git a/RolemasterUnified_Official/updates.md b/RolemasterUnified_Official/updates.md
index 20f1f4370e..806dc1c451 100644
--- a/RolemasterUnified_Official/updates.md
+++ b/RolemasterUnified_Official/updates.md
@@ -1,4 +1,17 @@
-# Next
+# 2024-10-29
+
+- Finally update skills to show specilisations,
+- Fix translation issue identified by Jon_joe.
+ - Seems French has 2 strings translated. And one exposed a bug
+ - Add tests for case
+ - improve code flow. My JS has improved.
+- Add injury string to direcly rolled cripts
+- New combat has moved; now in creatures too
+- Improve favourite skills buttons and layout
+- Remove some spurious nil class descriptions
+- RRs can now click on number or die
+
+# 2024-10-22
- Spells: Fix a nbs[ instead of a space
- Less message spew during creation.