Skills below Skills categories + skills rollable

This commit is contained in:
LeRatierBretonnien 2024-08-02 17:07:02 +02:00
parent e25c51a570
commit 1f2558b680
19 changed files with 114 additions and 37 deletions

View File

@ -47,3 +47,7 @@
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;
}

View File

@ -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);
}

View File

@ -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: {

View File

@ -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) {

View File

@ -1 +1 @@
MANIFEST-000036
MANIFEST-000056

View File

@ -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)

View File

@ -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)

Binary file not shown.

View File

@ -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);
}

23
rmss.js
View File

@ -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);

View File

@ -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"

View File

@ -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": {

View File

@ -15,7 +15,10 @@
<button type="button" class="import-skillcats" title="Import" acotr_id="">{{ localize "rmss.pc_sheet.import_skillcat" }}</button>
</div>
</div>
</div>
{{#each skillcat as |skill_category id|}}
<div class="skillcat-grid-container">
<div>{{skill_category.name}}</div>
<div>{{skill_category.system.applicable_stats}}</div>
<div>{{skill_category.system.development_cost}}</div>
@ -39,5 +42,12 @@
<a class="item-delete item" title="Delete Category" data-item-id="{{skill_category._id}}"><i class="fas fa-trash"></i></a>
<a class="item-roll" title="Roll Check" data-item-id="{{skill_category._id}}"><i class="fas fa-dice"></i></a>
</div>
{{/each}}
</div>
{{#if (count skill_category.skills)}}
<div class="skill-box">
{{> "systems/fvtt-rolemaster-frp/templates/sheets/actors/parts/actor-skills.html" }}
</div>
{{/if}}
{{/each}}

View File

@ -10,9 +10,12 @@
<div class="skills-grid-heading">{{ localize "rmss.pc_sheet_skills.special_bonus" }}</div>
<div class="skills-grid-heading">{{ localize "rmss.pc_sheet_skills.total_bonus" }}</div>
<div class="skills-grid-heading">
<!--<a class="item-create" title="Create Skill" data-type="skill"><i class="fas fa-plus"></i>{{ localize "rmss.pc_sheet_skills.add_skill" }}</a>-->
<a class="item-create" title="Create Skill" data-type="skill"><i class="fas fa-plus"></i>{{ localize "rmss.pc_sheet_skills.add_skill" }}</a>
</div>
{{#each playerskill as |skill id|}}
</div>
{{#each skills as |skill id|}}
<div class="skills-grid-container">
{{#if skill.system.favorite}}
<div><a class="skill-favorite" data-item-id="{{skill._id}}"><i class="fa-regular fa-square-check"></i></a></div>
{{else}}
@ -38,6 +41,8 @@
<div >
<a class="item-edit" title="Edit Skill" data-item-id="{{skill._id}}"><i class="fas fa-edit"></i></a>
<a class="item-delete" title="Delete Skill" data-item-id="{{skill._id}}"><i class="fas fa-trash"></i></a>
<a class="item-roll" title="Roll Check" data-item-id="{{skill._id}}"><i class="fas fa-dice"></i></a>
</div>
</div>
{{/each}}
</div>

View File

@ -71,7 +71,6 @@
{{!-- Default tab is specified in actor-sheet.mjs --}}
<a class="item" data-tab="Record">{{ localize "rmss.pc_sheet_tabs.record" }}</a>
<a class="item" data-tab="SkillCategory">{{ localize "rmss.pc_sheet_tabs.skill_categories" }}</a>
<a class="item" data-tab="Skills">{{ localize "rmss.pc_sheet_tabs.skills" }}</a>
<a class="item" data-tab="Equipment">{{ localize "rmss.pc_sheet_tabs.equipment" }}</a>
<a class="item" data-tab="Spells">{{ localize "rmss.pc_sheet_tabs.spells" }}</a>
<a class="item" data-tab="Background">{{ localize "rmss.pc_sheet_tabs.background" }}</a>
@ -114,10 +113,6 @@
{{> "systems/fvtt-rolemaster-frp/templates/sheets/actors/parts/actor-skill-categories.html" }}
</div>
<div class="tab skills" data-group="primary" data-tab="Skills">
{{> "systems/fvtt-rolemaster-frp/templates/sheets/actors/parts/actor-skills.html" }}
</div>
<div class="tab equipment" data-group="primary" data-tab="Equipment">
<div class="container">
<div class="equipment-container">

View File

@ -4,6 +4,11 @@
<h1><input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'Name' }}"/></h1>
</header>
<div class="sheet-content">
<div>Rank Bonus Progression
<select name="system.bonus_progression" value="{{system.bonus_progression}}" itemid="{{ item._id }}">
{{selectOptions config.rankBonusProgressionList selected=system.bonus_progression valueAttr="key" labelAttr="label"}}
</select>
</div>
<div class="applicable-stats-grid-container">
<div>
Applicable Stat 1

View File

@ -4,6 +4,11 @@
<h1><input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'Name' }}"/></h1>
</header>
<div class="sheet-content">
<div>Rank Bonus Progression
<select name="system.bonus_progression" value="{{system.bonus_progression}}" itemid="{{ item._id }}">
{{selectOptions config.rankBonusProgressionList selected=system.bonus_progression valueAttr="key" labelAttr="label"}}
</select>
</div>
<div>
Skill Category
<select name="system.category" class="app-stat-selector" value="{{system.category}}" itemid="{{ item._id }}">