Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
8b37e16915 | |||
46d991fb65 | |||
5ca0362773 | |||
f777131374 | |||
c11f7d23a8 | |||
98e6b70b1b | |||
6597334682 | |||
534fcb04fb | |||
8be95c20bd |
@ -27,4 +27,7 @@
|
||||
font-family: Signika, sans-serif;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
.select-fixed-width {
|
||||
width: 100px;
|
||||
}
|
@ -21,6 +21,12 @@ rmss.difficulties = {
|
||||
absurd: {key: "absurd", label:"Absurd (-70)", value: -70},
|
||||
};
|
||||
|
||||
rmss.gameSystems = [
|
||||
{key: "common", label:"Common"},
|
||||
{key: "merp", label:"Middle Earth Role Playing (MERP)"},
|
||||
{key: "rmfrp", label:"Rolemaster Fantasy Role Playing (RMFRP)"},
|
||||
];
|
||||
|
||||
rmss.combatSituations = [
|
||||
{key: "none", label:"None (0)", modifier: 0},
|
||||
{key: "melee", label:"Melee environment (-20)", modifier: -20},
|
||||
@ -31,6 +37,7 @@ rmss.rankBonusProgressionList = [
|
||||
{key: "standard", label:"Standard"},
|
||||
{key: "limited", label:"Limited"},
|
||||
{key: "combined", label:"Combined"},
|
||||
{key: "race", label:"Linked to Race"},
|
||||
]
|
||||
|
||||
rmss.lightOrDarknessModifiers = [
|
||||
|
@ -8,8 +8,14 @@ export class RFRPUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async ready() {
|
||||
this.registerSettings();
|
||||
|
||||
this.gameSystem = game.settings.get("fvtt-rolemaster-frp", "game_system");
|
||||
|
||||
const skillCategories = await RFRPUtility.loadCompendium("fvtt-rolemaster-frp.skill_categories")
|
||||
this.skillCategories = skillCategories.map(i => i.toObject())
|
||||
this.skillCategories = skillCategories.map(i => i.toObject()).filter( i => i.system.game_system == "common" || i.system.game_system == this.gameSystem);
|
||||
// Sort skill categories by name
|
||||
this.skillCategories.sort((a, b) => a.name.localeCompare(b.name));
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -17,6 +23,23 @@ export class RFRPUtility {
|
||||
return this.skillCategories
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static registerSettings() {
|
||||
game.settings.register("fvtt-rolemaster-frp", "game_system", {
|
||||
name: "Game System",
|
||||
hint: "List of Game Systems",
|
||||
scope: "world",
|
||||
default: "rmfrp",
|
||||
requiresReload: true,
|
||||
type: String,
|
||||
config: true,
|
||||
choices: {
|
||||
rmfrp: "Rolemaster Fantasy Role Playing (RMFRP)",
|
||||
merp: "Middle Earth Role Playing (MERP)"
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static async loadCompendiumData(compendium) {
|
||||
const pack = game.packs.get(compendium);
|
||||
|
@ -208,7 +208,7 @@ export default class RMSSPlayerSheet extends ActorSheet {
|
||||
context.spells = spells;
|
||||
|
||||
// Dump context to console
|
||||
console.log(context);
|
||||
console.log("ACTOR CONTEXT", context);
|
||||
|
||||
}
|
||||
|
||||
@ -251,7 +251,9 @@ export default class RMSSPlayerSheet extends ActorSheet {
|
||||
|
||||
let selectOptions = {};
|
||||
for (const pack of game.packs) {
|
||||
selectOptions[pack.metadata.id] = pack.metadata.label;
|
||||
if (pack.metadata.type === "Item") {
|
||||
selectOptions[pack.metadata.id] = pack.metadata.label;
|
||||
}
|
||||
}
|
||||
new game.rmss.applications.RMSSToolsSCImporter(selectOptions, this.actor).render(true);
|
||||
});
|
||||
|
@ -27,23 +27,27 @@ export default class RMSSToolsSCImporter extends FormApplication {
|
||||
}
|
||||
|
||||
async _updateObject(event, formData) {
|
||||
console.log("Deleting Old Skill Categories.");
|
||||
//console.log("Update ", event, formData);
|
||||
let itemType = event.submitter.value;
|
||||
let toDelete = [];
|
||||
for (const item of this.character.items) {
|
||||
if (item.type === "skill_category") {
|
||||
item.delete();
|
||||
if (item.type === itemType) {
|
||||
toDelete.push(item.id);
|
||||
}
|
||||
}
|
||||
this.character.deleteEmbeddedDocuments("Item", toDelete);
|
||||
|
||||
const pack = game.packs.get(formData.selectOptions);
|
||||
let comp = (itemType == "skill") ? formData.selectOptionsSkills : formData.selectOptionsCategories;
|
||||
const pack = game.packs.get(comp);
|
||||
const skillCategoryData = await pack.getIndex();
|
||||
|
||||
console.log("Importing New Skill Categories.");
|
||||
console.log("Importing New Skills/Skill Categories.");
|
||||
|
||||
for (const sc of skillCategoryData) {
|
||||
const newitem = await pack.getDocument(sc._id);
|
||||
|
||||
let newDocuments = [];
|
||||
if (newitem.type === "skill_category") {
|
||||
if (newitem.type === itemType) {
|
||||
console.log(newitem);
|
||||
newDocuments.push(newitem);
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ export default class RMSSSkillSheet extends ItemSheet {
|
||||
if (this.item.isEmbedded) {
|
||||
skillCategories = this.item.parent.items.filter(it => it.type == "skill_category");
|
||||
}
|
||||
console.log("CATEG", skillCategories);
|
||||
//console.log("CATEG", skillCategories);
|
||||
return (skillCategories);
|
||||
}
|
||||
|
||||
|
Binary file not shown.
BIN
packs/skill_categories/000080.ldb
Normal file
BIN
packs/skill_categories/000080.ldb
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
MANIFEST-000060
|
||||
MANIFEST-000101
|
||||
|
@ -1,8 +1,3 @@
|
||||
2024/08/03-16:17:28.988843 7f2b120006c0 Recovering log #58
|
||||
2024/08/03-16:17:29.000009 7f2b120006c0 Delete type=3 #56
|
||||
2024/08/03-16:17:29.000149 7f2b120006c0 Delete type=0 #58
|
||||
2024/08/03-16:40:12.660059 7f2b110006c0 Level-0 table #63: started
|
||||
2024/08/03-16:40:12.660133 7f2b110006c0 Level-0 table #63: 0 bytes OK
|
||||
2024/08/03-16:40:12.666773 7f2b110006c0 Delete type=0 #61
|
||||
2024/08/03-16:40:12.677428 7f2b110006c0 Manual compaction at level-0 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end)
|
||||
2024/08/03-16:40:12.689036 7f2b110006c0 Manual compaction at level-1 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end)
|
||||
2024/08/09-23:57:39.252249 7f92874006c0 Recovering log #99
|
||||
2024/08/09-23:57:39.263715 7f92874006c0 Delete type=3 #97
|
||||
2024/08/09-23:57:39.263837 7f92874006c0 Delete type=0 #99
|
||||
|
@ -1,8 +1,8 @@
|
||||
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)
|
||||
2024/08/09-23:54:12.263425 7f92874006c0 Recovering log #95
|
||||
2024/08/09-23:54:12.272735 7f92874006c0 Delete type=3 #93
|
||||
2024/08/09-23:54:12.272785 7f92874006c0 Delete type=0 #95
|
||||
2024/08/09-23:56:47.698844 7f9285a006c0 Level-0 table #100: started
|
||||
2024/08/09-23:56:47.698916 7f9285a006c0 Level-0 table #100: 0 bytes OK
|
||||
2024/08/09-23:56:47.705094 7f9285a006c0 Delete type=0 #98
|
||||
2024/08/09-23:56:47.744132 7f9285a006c0 Manual compaction at level-0 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end)
|
||||
2024/08/09-23:56:47.760291 7f9285a006c0 Manual compaction at level-1 from '!items!1HevhbCbvMonyQXe' @ 72057594037927935 : 1 .. '!items!yRIFroc5VC9Oj3qY' @ 0 : 0; will stop at (end)
|
||||
|
Binary file not shown.
BIN
packs/skill_categories/MANIFEST-000101
Normal file
BIN
packs/skill_categories/MANIFEST-000101
Normal file
Binary file not shown.
BIN
packs/skills/000010.ldb
Normal file
BIN
packs/skills/000010.ldb
Normal file
Binary file not shown.
0
packs/skills/000020.log
Normal file
0
packs/skills/000020.log
Normal file
1
packs/skills/CURRENT
Normal file
1
packs/skills/CURRENT
Normal file
@ -0,0 +1 @@
|
||||
MANIFEST-000019
|
0
packs/skills/LOCK
Normal file
0
packs/skills/LOCK
Normal file
3
packs/skills/LOG
Normal file
3
packs/skills/LOG
Normal file
@ -0,0 +1,3 @@
|
||||
2024/08/09-23:57:39.267134 7f9287e006c0 Recovering log #17
|
||||
2024/08/09-23:57:39.276489 7f9287e006c0 Delete type=3 #15
|
||||
2024/08/09-23:57:39.276571 7f9287e006c0 Delete type=0 #17
|
8
packs/skills/LOG.old
Normal file
8
packs/skills/LOG.old
Normal file
@ -0,0 +1,8 @@
|
||||
2024/08/09-23:54:12.275641 7f928cc006c0 Recovering log #13
|
||||
2024/08/09-23:54:12.285878 7f928cc006c0 Delete type=3 #11
|
||||
2024/08/09-23:54:12.285936 7f928cc006c0 Delete type=0 #13
|
||||
2024/08/09-23:56:47.736686 7f9285a006c0 Level-0 table #18: started
|
||||
2024/08/09-23:56:47.736717 7f9285a006c0 Level-0 table #18: 0 bytes OK
|
||||
2024/08/09-23:56:47.743954 7f9285a006c0 Delete type=0 #16
|
||||
2024/08/09-23:56:47.760260 7f9285a006c0 Manual compaction at level-0 from '!folders!Lr9SCthdWWHecwEI' @ 72057594037927935 : 1 .. '!items!zvdsAxlRZnL6gqms' @ 0 : 0; will stop at (end)
|
||||
2024/08/09-23:56:47.760325 7f9285a006c0 Manual compaction at level-1 from '!folders!Lr9SCthdWWHecwEI' @ 72057594037927935 : 1 .. '!items!zvdsAxlRZnL6gqms' @ 0 : 0; will stop at (end)
|
BIN
packs/skills/MANIFEST-000019
Normal file
BIN
packs/skills/MANIFEST-000019
Normal file
Binary file not shown.
3
rmss.css
3
rmss.css
@ -494,6 +494,9 @@
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
.select-fixed-width {
|
||||
width: 100px;
|
||||
}
|
||||
.applicable-stats-grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: [app-stat-1] 33% [app-stat-2] 33% [app-stat-3] 33%;
|
||||
|
13
system.json
13
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.6.zip",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-rolemaster-frp/archive/v12.0.12.zip",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Cynicide",
|
||||
@ -14,7 +14,7 @@
|
||||
"email": ""
|
||||
}
|
||||
],
|
||||
"version": "12.0.6",
|
||||
"version": "12.0.12",
|
||||
"compatibility": {
|
||||
"minimum": "12",
|
||||
"verified": "12"
|
||||
@ -27,7 +27,14 @@
|
||||
"name": "skill_categories",
|
||||
"label": "Skill Categories",
|
||||
"system": "fvtt-rolemaster-frp",
|
||||
"path": "./packs/skill_categories.db",
|
||||
"path": "./packs/skill_categories",
|
||||
"type": "Item"
|
||||
},
|
||||
{
|
||||
"name": "skill",
|
||||
"label": "Skills",
|
||||
"system": "fvtt-rolemaster-frp",
|
||||
"path": "./packs/skills",
|
||||
"type": "Item"
|
||||
}
|
||||
],
|
||||
|
@ -313,6 +313,7 @@
|
||||
"skill": {
|
||||
"templates": ["base"],
|
||||
"category" : "",
|
||||
"game_system": "common",
|
||||
"ranks": 0,
|
||||
"new_ranks": {
|
||||
"value": 0,
|
||||
@ -332,6 +333,7 @@
|
||||
"skill_category": {
|
||||
"templates": ["base"],
|
||||
"applicable_stats": "None",
|
||||
"game_system": "common",
|
||||
"app_stat_1": "None",
|
||||
"app_stat_2": "None",
|
||||
"app_stat_3": "None",
|
||||
|
@ -1,17 +1,25 @@
|
||||
<form>
|
||||
<div>
|
||||
<h3>Import Skill Categories</h3>
|
||||
|
||||
<h3>Import Skill Categories/Skills</h3>
|
||||
<div>
|
||||
WARNING: This will erase your existing Skill Categories and import all Skill Categories from the selected Compendium.
|
||||
WARNING: This will erase your existing Skill Categories or Skills and import all Skill Categories/Skills from the selected Compendium.
|
||||
</div>
|
||||
<div>
|
||||
Select Compendium:
|
||||
<select name="selectOptions" class="compendium-selector" value="None" itemid="blah">
|
||||
<div class="flexrow">
|
||||
<span >Select Skill Categories Compendium:</span>
|
||||
<select name="selectOptionsCategories" class="compendium-selector" value="None" itemid="blah">
|
||||
{{selectOptions selectOptions}}
|
||||
</select></div>
|
||||
<div>
|
||||
<button class="import-skillcats" title="Import">Import</button>
|
||||
</select>
|
||||
<button class="import-skillcats" value="skill_category" name="skill_category" title="Import">Import Skill Categories</button>
|
||||
</div>
|
||||
|
||||
<div class="flexrow">
|
||||
<span>Select Skills Compendium:</span>
|
||||
<select name="selectOptionsSkills" class="compendium-selector" value="None" itemid="blah">
|
||||
{{selectOptions selectOptions}}
|
||||
</select>
|
||||
<button class="import-skills" value="skill" name="skill" title="Import">Import Skills</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
@ -4,12 +4,19 @@
|
||||
<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 class="flexrow">
|
||||
<div>Rank Bonus Progression
|
||||
<select class="select-fixed-width" 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>Game system
|
||||
<select class="select-fixed-width" name="system.game_system" value="{{system.game_system}}" itemid="{{ item._id }}">
|
||||
{{selectOptions config.gameSystems selected=system.game_system valueAttr="key" labelAttr="label"}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="applicable-stats-grid-container">
|
||||
<div class="applicable-stats-grid-container">
|
||||
<div>
|
||||
Applicable Stat 1
|
||||
<select name="system.app_stat_1" class="app-stat-selector" value="{{system.app_stat_1}}" itemid="{{ item._id }}">
|
||||
|
@ -4,12 +4,19 @@
|
||||
<h1><input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'Name' }}"/></h1>
|
||||
</header>
|
||||
<div class="sheet-content">
|
||||
<div class="flexrow">
|
||||
<div>Rank Bonus Progression
|
||||
<select name="system.bonus_progression" value="{{system.bonus_progression}}" itemid="{{ item._id }}">
|
||||
<select class="select-fixed-width" 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>
|
||||
<div>Game system
|
||||
<select class="select-fixed-width" name="system.game_system" value="{{system.game_system}}" itemid="{{ item._id }}">
|
||||
{{selectOptions config.gameSystems selected=system.game_system valueAttr="key" labelAttr="label"}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
Skill Category
|
||||
<select name="system.category" class="app-stat-selector" value="{{system.category}}">
|
||||
{{selectOptions owned_skillcats selected=selected_skillcat nameAttr="name" valueAttr="name" labelAttr="name"}}
|
||||
|
Reference in New Issue
Block a user