diff --git a/less/actor-sheet/actor-sheet-skillcat.less b/less/actor-sheet/actor-sheet-skillcat.less index da74fd4..71f0870 100644 --- a/less/actor-sheet/actor-sheet-skillcat.less +++ b/less/actor-sheet/actor-sheet-skillcat.less @@ -46,4 +46,8 @@ font-weight: bold; border-bottom: 1px solid; background-image: linear-gradient(rgba(0, 0, 0, 0.1) 0 0); +} +.skill-box { + margin-left: 1.2rem; + background-color: lightgrey; } \ No newline at end of file diff --git a/less/actor-sheet/actor-sheet-skills.less b/less/actor-sheet/actor-sheet-skills.less index 090627f..edc02cd 100644 --- a/less/actor-sheet/actor-sheet-skills.less +++ b/less/actor-sheet/actor-sheet-skills.less @@ -12,7 +12,7 @@ padding-bottom: 3px; display: flex; justify-content: flex-end; - flex-direction: column; + //flex-direction: column; justify-content: center; } @@ -36,7 +36,7 @@ padding-bottom: 3px; display: flex; justify-content: flex-end; - flex-direction: column; + //flex-direction: column; justify-content: center; background-image: linear-gradient(rgba(0, 0, 0, 0.1) 0 0); } diff --git a/module/config.js b/module/config.js index 3dc2502..166288b 100644 --- a/module/config.js +++ b/module/config.js @@ -27,6 +27,12 @@ rmss.combatSituations = [ {key: "missile", label:"Under missile fire (-10)", modifier: -10}, ]; +rmss.rankBonusProgressionList = [ + {key: "standard", label:"Standard"}, + {key: "limited", label:"Limited"}, + {key: "combined", label:"Combined"}, +] + rmss.lightOrDarknessModifiers = [ {key: "none", label:"None", modifierLight: 0, modifierDark: 0}, {key: "noshadows", label:"No shadows", modifierLight: 10, modifierDark: -30}, @@ -44,7 +50,17 @@ rmss.hitsPerRound = [ {key: "three", label:"Three", modifier: -20}, {key: "four", label:"Four", modifier: -25}, {key: "five", label:"Five", modifier: -30}, -] + {key: "six", label:"Six", modifier: -35}, + {key: "seven", label:"Seven", modifier: -40}, + {key: "eight", label:"Eight", modifier: -45}, + {key: "nine", label:"Nine", modifier: -50}, + {key: "ten", label:"Ten", modifier: -55}, + {key: "eleven", label:"Eleven", modifier: -60}, + {key: "twelve", label:"Twelve", modifier: -65}, + {key: "thirteen", label:"Thirteen", modifier: -70}, + {key: "fourteen", label:"Fourteen", modifier: -75}, + {key: "fifteen", label:"Fifteen", modifier: -80} +]; rmss.stats = { agility: { diff --git a/module/sheets/actors/rmss_player_sheet.js b/module/sheets/actors/rmss_player_sheet.js index a44d4d4..0037f3e 100644 --- a/module/sheets/actors/rmss_player_sheet.js +++ b/module/sheets/actors/rmss_player_sheet.js @@ -167,7 +167,15 @@ export default class RMSSPlayerSheet extends ActorSheet { spells.push(i); } } - + // Parse skill categories and re+levant skills + for (let s of skillcat) { + s.skills = []; + for (let sk of playerskill) { + if (sk.system.category === s._id) { + s.skills.push(sk); + } + } + } // Sort Skill/Skillcat Arrays skillcat.sort(function(a, b) { @@ -198,6 +206,10 @@ export default class RMSSPlayerSheet extends ActorSheet { context.armor = armor; context.herbs = herbs; context.spells = spells; + + // Dump context to console + console.log(context); + } async renderCharacterSettings(data) { diff --git a/packs/skill_categories/000038.log b/packs/skill_categories/000058.log similarity index 100% rename from packs/skill_categories/000038.log rename to packs/skill_categories/000058.log diff --git a/packs/skill_categories/CURRENT b/packs/skill_categories/CURRENT index ecb0b4b..80d9de0 100644 --- a/packs/skill_categories/CURRENT +++ b/packs/skill_categories/CURRENT @@ -1 +1 @@ -MANIFEST-000036 +MANIFEST-000056 diff --git a/packs/skill_categories/LOG b/packs/skill_categories/LOG index ca8f14f..6fbc724 100644 --- a/packs/skill_categories/LOG +++ b/packs/skill_categories/LOG @@ -1,8 +1,8 @@ -2024/07/28-21:56:25.081245 7f61a16006c0 Recovering log #34 -2024/07/28-21:56:25.092625 7f61a16006c0 Delete type=3 #32 -2024/07/28-21:56:25.092815 7f61a16006c0 Delete type=0 #34 -2024/07/28-21:58:38.763455 7f619e8006c0 Level-0 table #39: started -2024/07/28-21:58:38.763505 7f619e8006c0 Level-0 table #39: 0 bytes OK -2024/07/28-21:58:38.770667 7f619e8006c0 Delete type=0 #37 -2024/07/28-21:58:38.788630 7f619e8006c0 Manual compaction at level-0 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) -2024/07/28-21:58:38.788705 7f619e8006c0 Manual compaction at level-1 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) +2024/08/02-16:48:51.596152 7f2b120006c0 Recovering log #54 +2024/08/02-16:48:51.607028 7f2b120006c0 Delete type=3 #52 +2024/08/02-16:48:51.607119 7f2b120006c0 Delete type=0 #54 +2024/08/02-17:06:25.130824 7f2b110006c0 Level-0 table #59: started +2024/08/02-17:06:25.130880 7f2b110006c0 Level-0 table #59: 0 bytes OK +2024/08/02-17:06:25.137382 7f2b110006c0 Delete type=0 #57 +2024/08/02-17:06:25.160338 7f2b110006c0 Manual compaction at level-0 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) +2024/08/02-17:06:25.160385 7f2b110006c0 Manual compaction at level-1 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) diff --git a/packs/skill_categories/LOG.old b/packs/skill_categories/LOG.old index d4d63f0..4ebb3a5 100644 --- a/packs/skill_categories/LOG.old +++ b/packs/skill_categories/LOG.old @@ -1,8 +1,8 @@ -2024/07/28-20:52:49.342374 7f61a0c006c0 Recovering log #30 -2024/07/28-20:52:49.352664 7f61a0c006c0 Delete type=3 #28 -2024/07/28-20:52:49.352840 7f61a0c006c0 Delete type=0 #30 -2024/07/28-21:24:37.661095 7f619e8006c0 Level-0 table #35: started -2024/07/28-21:24:37.661145 7f619e8006c0 Level-0 table #35: 0 bytes OK -2024/07/28-21:24:37.667298 7f619e8006c0 Delete type=0 #33 -2024/07/28-21:24:37.684364 7f619e8006c0 Manual compaction at level-0 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) -2024/07/28-21:24:37.684461 7f619e8006c0 Manual compaction at level-1 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) +2024/08/02-16:41:04.243624 7f2b134006c0 Recovering log #50 +2024/08/02-16:41:04.298794 7f2b134006c0 Delete type=3 #48 +2024/08/02-16:41:04.298940 7f2b134006c0 Delete type=0 #50 +2024/08/02-16:47:53.296999 7f2b110006c0 Level-0 table #55: started +2024/08/02-16:47:53.297027 7f2b110006c0 Level-0 table #55: 0 bytes OK +2024/08/02-16:47:53.302866 7f2b110006c0 Delete type=0 #53 +2024/08/02-16:47:53.310260 7f2b110006c0 Manual compaction at level-0 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) +2024/08/02-16:47:53.310311 7f2b110006c0 Manual compaction at level-1 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end) diff --git a/packs/skill_categories/MANIFEST-000036 b/packs/skill_categories/MANIFEST-000036 deleted file mode 100644 index 7c24353..0000000 Binary files a/packs/skill_categories/MANIFEST-000036 and /dev/null differ diff --git a/packs/skill_categories/MANIFEST-000056 b/packs/skill_categories/MANIFEST-000056 new file mode 100644 index 0000000..5251636 Binary files /dev/null and b/packs/skill_categories/MANIFEST-000056 differ diff --git a/rmss.css b/rmss.css index a22b818..ac7b6ac 100644 --- a/rmss.css +++ b/rmss.css @@ -41,6 +41,10 @@ border-bottom: 1px solid; background-image: linear-gradient(rgba(0, 0, 0, 0.1) 0 0); } +.skill-box { + margin-left: 1.2rem; + background-color: lightgrey; +} .container { display: flex; } @@ -199,7 +203,6 @@ padding-bottom: 3px; display: flex; justify-content: flex-end; - flex-direction: column; justify-content: center; } .skills-grid-container > div:nth-child(22n+1), @@ -221,7 +224,6 @@ padding-bottom: 3px; display: flex; justify-content: flex-end; - flex-direction: column; justify-content: center; background-image: linear-gradient(rgba(0, 0, 0, 0.1) 0 0); } diff --git a/rmss.js b/rmss.js index dd43a8f..6fc2770 100644 --- a/rmss.js +++ b/rmss.js @@ -112,11 +112,32 @@ Hooks.once("init", function () { preloadHandlebarsTemplates(); // Handlebars Helpers + Handlebars.registerHelper('count', function (list) { + return list.length; + }) + Handlebars.registerHelper('includes', function (array, val) { + return array.includes(val); + }) + Handlebars.registerHelper('upper', function (text) { + return text.toUpperCase(); + }) + Handlebars.registerHelper('lower', function (text) { + return text.toLowerCase() + }) + Handlebars.registerHelper('upperFirst', function (text) { + if (typeof text !== 'string') return text + return text.charAt(0).toUpperCase() + text.slice(1) + }) + Handlebars.registerHelper('notEmpty', function (list) { + return list.length > 0; + }) + Handlebars.registerHelper('mul', function (a, b) { + return parseInt(a) * parseInt(b); + }) Handlebars.registerHelper("switch", function (value, options) { this.switch_value = value; return options.fn(this); }); - Handlebars.registerHelper("case", function (value, options) { if (value === this.switch_value) { return options.fn(this); diff --git a/system.json b/system.json index 8444a5a..8c7f08e 100644 --- a/system.json +++ b/system.json @@ -3,7 +3,7 @@ "title": "Rolemaster FRP System", "description": "The Rolemaster FRP system for FoundryVTT.", "manifest": "https://www.uberwald.me/gitea/public/fvtt-rolemaster-frp/raw/branch/develop/system.json", - "download": "https://www.uberwald.me/gitea/public/fvtt-rolemaster-frp/archive/v12.0.3.zip", + "download": "https://www.uberwald.me/gitea/public/fvtt-rolemaster-frp/archive/v12.0.5.zip", "authors": [ { "name": "Cynicide", @@ -14,7 +14,7 @@ "email": "" } ], - "version": "12.0.3", + "version": "12.0.5", "compatibility": { "minimum": "12", "verified": "12" diff --git a/template.json b/template.json index d01ab79..9f3b13b 100644 --- a/template.json +++ b/template.json @@ -326,6 +326,7 @@ "special_bonus_2": 0, "total_bonus": 0, "favorite": false, + "bonus_progression": "standard", "designation": "None" }, "skill_category": { @@ -347,6 +348,7 @@ "special_bonus_1": 0, "special_bonus_2": 0, "total_bonus": 0, + "bonus_progression": "standard", "favorite": false }, "spell": { diff --git a/templates/sheets/actors/parts/actor-skill-categories.html b/templates/sheets/actors/parts/actor-skill-categories.html index f971ad1..508bf90 100644 --- a/templates/sheets/actors/parts/actor-skill-categories.html +++ b/templates/sheets/actors/parts/actor-skill-categories.html @@ -15,7 +15,10 @@ + {{#each skillcat as |skill_category id|}} +