diff --git a/RolemasterUnified_Official/rolemasterunified.html b/RolemasterUnified_Official/rolemasterunified.html
index 4d5eee00ad..03d1a74c32 100644
--- a/RolemasterUnified_Official/rolemasterunified.html
+++ b/RolemasterUnified_Official/rolemasterunified.html
@@ -1109,7 +1109,7 @@ Lists Selected / 6
-
+
@@ -1995,11 +1995,17 @@ Lists Selected / 6
+
-
Traing Packages
+ Training Packages
+
+
+
+
+
@@ -6031,7 +6037,7 @@ Sheet Version:
-Revision adc0f7a47c63e5e07a2a90bbc4594e3aca1c54bb
+Revision 5a0f6652879e0afe5c618f1dfcae5b706a1e5279
@@ -10645,7 +10651,6 @@ function levelUpReview() {
pendingInfo();
console.log("LevelUpReview", cmdata);
- console.log("LevelupReview: Summary", levelup);
getAttrsPending(["level"], (ev) => {
const level = parseIntDefault(ev.level, 0);
@@ -10653,25 +10658,139 @@ function levelUpReview() {
levelstr = `Level ${newlevel}`;
const levelup = getLevelUpSummary(cmdata, level);
+ console.log("Levelup", levelup)
+ for (const statgain in levelup.statgains) {
+ addRepeatingSection('levelupreviewstatgains', 'levelupreviewlistitem', (id) => {
+ const str = `${sg} (x${sgcount[sg].count})`;
+ setCharmancerText({[`${id} .text`]: str});
+ });
+
+ }
+ for (const skill in levelup.skills) {
+ const deved = levelup.skills[skill]
+ let transskill = getTranslationByKey(skill)
+ // deved is an array of each specialisation
+ for (const obj of deved) {
+ addRepeatingSection('levelupreviewskills', 'levelupreviewlistitem', (id) => {
+ const skillmsg = obj.specialisation ?
+ `${transskill}: ${obj.specialisation} → +${obj.ranks} Ranks` :
+ `${transskill} → +${obj.ranks} Ranks`
+ setCharmancerText({[`${id} .text`]: skillmsg });
+ });
+ }
+ }
});
-/**/
+
+
+ return;
+/*
+ addPendingFunction("LevelupReview: Talents", () => {
+ const values = cmdata.levelup.values;
+ for (const purchase in values) {
+ if (!purchase.endsWith("_talent")) {
+ // Skip non-talents
+ continue;
+ }
+ addRepeatingSection('levelupreviewtalents', 'levelupreviewlistitem', (id) => {
+ const prefix = purchase.match(/^(.*)_talent/)[1];
+
+ const fullname = values[purchase];
+ const splitname = fullname.match(/^Talent:([^?]*)?/)
+ const talentname = splitname[1];
+
+ const tierstr = values[`${prefix}_tier`] || "Tier 1";
+ const tier = tierstr.match(/^Tier (\d\d*)/)[1]
+
+ const cost = '?'
+
+ const str = `${talentname} - Tier ${tier} - ${cost} DP`;
+ setCharmancerText({[`${id} .text`]: str});
+ });
+ }
+ });
+
+}-}*/
checkPending();
}
+
+
+
/**/
function getLevelUpSummary(cmdata) {
const result = {}
-
+ result.skills = {}
+ result.spelllists = {}
+ result.talents = {}
result.statgains = countStatGains(cmdata);
+ const values = cmdata.levelup.values;
+ for (const purchase in values) {
+ // Name of a specialisation - ignore
+ if (purchase.endsWith("_specname") ||
+ purchase.endsWith("_skillrankscombo") ||
+ purchase.endsWith("_sheetprefix")) {
+ continue;
+ }
+ if (purchase.includes("_talent_")) {
+ console.log("Talent pruchase")
+ } else if (purchase.includes("spelllist")) {
+ console.log("Spell purchase");
+ } else {
+ const value = values[purchase];
+ if (typeof(value) != "string") {
+ continue;
+ }
+ const [ranks, cost] = optionDecodeIntPair(values[purchase]);
+ if (!ranks || ranks < 1) {
+ continue;
+ }
+ // So we have repeating or non-repeating: handle non -repeating first
+ if (purchase.startsWith("repeating")) {
+ // What is the name
+ const namekey = purchase.replace(/_cmskillranks$/, "_specname");
+ const name = values[namekey];
+ // Prefix on the sheet
+ const prefixkey = purchase.replace(/_cmskillranks$/, "_sheetprefix");
+ let prefix = values[prefixkey];
+ let skillname = purchase.match(/_cmskill_([^_]*)/)[1];
+ if (!prefix) {
+ // New skill, generate the prefix
+ let rowid = generateRowID();
+ prefix = `repeating_specialization${skillname}_${rowid}`
+ }
+ // Saved as array of object: { specialisation: X, ranks: N, prefix: gIbErIsH ]
+ if (!result.skills[skillname]) {
+ result.skills[skillname] = [];
+ }
+ result.skills[skillname].push({ specialisation: name,
+ prefix: prefix, ranks: ranks})
+ } else {
+ // Skill is encoded as 'cmskillranks'
+ console.log("Saving: ", purchase);
+ const skill = purchase.match(/^cmskill(.*)ranks$/)[1];
+ result.skills[skill] = []
+ result.skills[skill].push({ ranks: ranks} );
+ }
+
+ }
+
+ }
+
+
return result
}
+onCheck("clicked:dump_summary", () => {
+ console.log("Level Up Summary", getLevelUpSummary(getCharmancerData()));
+});
+
+
diff --git a/RolemasterUnified_Official/sheet.json b/RolemasterUnified_Official/sheet.json
index 8c982e58c2..abbcc8f270 100644
--- a/RolemasterUnified_Official/sheet.json
+++ b/RolemasterUnified_Official/sheet.json
@@ -19,5 +19,5 @@
"descriptiontranslationkey": "DefaultCurrency"
}
],
- "version": "1750048151"
+ "version": "1750777443"
}
diff --git a/RolemasterUnified_Official/updates.md b/RolemasterUnified_Official/updates.md
index 2bf8312448..ea9740c240 100644
--- a/RolemasterUnified_Official/updates.md
+++ b/RolemasterUnified_Official/updates.md
@@ -1,3 +1,9 @@
+# 2025-6-24
+
+- Fix Training Packages title
+- Make training package tab actually clickable
+- Generate correct list of levelup skills for levelup summary.
+
# 2025-6-17
- Fix a bug with Critscaling sometimes corrupting the critical