diff --git a/rmss/LICENSE.txt b/rmss/LICENSE.txt new file mode 100644 index 0000000..e69de29 diff --git a/rmss/README.md b/rmss/README.md new file mode 100644 index 0000000..2e536ec --- /dev/null +++ b/rmss/README.md @@ -0,0 +1,9 @@ +This tutorial is based on the video tutorials by Cédric Hauteville you can watch them here: https://www.youtube.com/playlist?list=PLFV9z59nkHDccUbRXVt623UdloPTclIrz parts of it were also lifted from the Foundry VTT Boilerplate system by XXX. + +Icons have been sourced from https://game-icons.net + +This system uses less for CSS you can see a good installation guide for VSCode at https://code.visualstudio.com/docs/languages/css#_transpiling-sass-and-less-into-css + +User Notes + +Skill Categories and Skills cannot be renamed if they are owned and you cannot drag a duplicate named skill to the sheet \ No newline at end of file diff --git a/rmss/TODO b/rmss/TODO new file mode 100644 index 0000000..9be0601 --- /dev/null +++ b/rmss/TODO @@ -0,0 +1,22 @@ +Small + +1. Add Relationship between skills and skill categories +2. Remove Tables and replace with CSS Grid +3. Fix unaligned CSS +4. Prevent Duplication on Drag and Drop for Skills and Skill Categories, possibly spells too. + DONE - Overriden _onDropItem on Player Sheet + DONE - Skill Categories cannot be renamed if they are owned. + +Medium + +4. Inventory sorted by types + i. Drag and drop should add an item if it already exists. + ii. Equipables + iii. Favorites +5. Creature Sheet + +Large + +6. Dice Roller +7. Initiative System + \ No newline at end of file diff --git a/rmss/module/config.js b/rmss/module/config.js index 813cfec..94623b3 100644 --- a/rmss/module/config.js +++ b/rmss/module/config.js @@ -50,6 +50,4 @@ rmss.stats = { fullname: "Strength", shortname: "St" } - - } diff --git a/rmss/module/documents/actor.js b/rmss/module/documents/actor.js index e078a54..d06c16f 100644 --- a/rmss/module/documents/actor.js +++ b/rmss/module/documents/actor.js @@ -1,5 +1,5 @@ export class RMSSActor extends Actor { - + /** @override */ prepareData() { // Prepare data for the actor. Calling the super version of this executes @@ -8,87 +8,92 @@ export class RMSSActor extends Actor { // prepareDerivedData(). super.prepareData(); } - + prepareDerivedData() { - const actorData = this.data; - const data = actorData.data; + const actorData = this; + const systemData = actorData.system; const flags = actorData.flags.rmss || {}; - + // Make separate methods for each Actor type (character, npc, etc.) to keep // things organized. this._prepareCharacterData(actorData); this._prepareNpcData(actorData); } - + /** - * Prepare Character type specific data - */ + * Prepare Character type specific data + */ _prepareCharacterData(actorData) { if (actorData.type !== 'character') return; - - // Calculate Stat Bonuses in Actor - this.prepareStatBonuses(actorData) - - // Calculate Resistance Rolls in Actor + + // Calculate Stat Bonuses for the Actor + this.prepareStatBonuses(actorData); + + // Calculate Resistance Rolls for the Actor this.prepareResistanceRolls(actorData); - + // Iterate through and apply Stat bonuses for Skill Category Items - this.prepareSkillCatStatBonuses(); + this.prepareSkillCategoryStatBonuses(); + } - + /** - * Prepare NPC type specific data. - */ + * Prepare NPC type specific data. + */ _prepareNpcData(actorData) { if (actorData.type !== 'npc') return; - + // Make modifications to data here. For example: const data = actorData.data; data.xp = (data.cr * data.cr) * 100; } - + + // Tally each stat bonus and populate the total field. prepareStatBonuses(actorData) { - - const data = actorData.data; - - actorData.data.stats.agility.stat_bonus = Number(data.stats.agility.racial_bonus)+Number(data.stats.agility.special_bonus)+Number(data.stats.agility.basic_bonus); - actorData.data.stats.constitution.stat_bonus = Number(data.stats.constitution.racial_bonus)+Number(data.stats.constitution.special_bonus)+Number(data.stats.constitution.basic_bonus); - actorData.data.stats.memory.stat_bonus = Number(data.stats.memory.racial_bonus)+Number(data.stats.memory.special_bonus)+Number(data.stats.memory.basic_bonus); - actorData.data.stats.reasoning.stat_bonus = Number(data.stats.reasoning.racial_bonus)+Number(data.stats.reasoning.special_bonus)+Number(data.stats.reasoning.basic_bonus); - actorData.data.stats.self_discipline.stat_bonus = Number(data.stats.self_discipline.racial_bonus)+Number(data.stats.self_discipline.special_bonus)+Number(data.stats.self_discipline.basic_bonus); - actorData.data.stats.empathy.stat_bonus = Number(data.stats.empathy.racial_bonus)+Number(data.stats.empathy.special_bonus)+Number(data.stats.empathy.basic_bonus); - actorData.data.stats.intuition.stat_bonus = Number(data.stats.intuition.racial_bonus)+Number(data.stats.intuition.special_bonus)+Number(data.stats.intuition.basic_bonus); - actorData.data.stats.presence.stat_bonus = Number(data.stats.presence.racial_bonus)+Number(data.stats.presence.special_bonus)+Number(data.stats.presence.basic_bonus); - actorData.data.stats.quickness.stat_bonus = Number(data.stats.quickness.racial_bonus)+Number(data.stats.quickness.special_bonus)+Number(data.stats.quickness.basic_bonus); - actorData.data.stats.strength.stat_bonus = Number(data.stats.strength.racial_bonus)+Number(data.stats.strength.special_bonus)+Number(data.stats.strength.basic_bonus); - + const systemData = actorData.system; + actorData.system.stats.agility.stat_bonus = Number(systemData.stats.agility.racial_bonus)+Number(systemData.stats.agility.special_bonus)+Number(systemData.stats.agility.basic_bonus); + actorData.system.stats.constitution.stat_bonus = Number(systemData.stats.constitution.racial_bonus)+Number(systemData.stats.constitution.special_bonus)+Number(systemData.stats.constitution.basic_bonus); + actorData.system.stats.memory.stat_bonus = Number(systemData.stats.memory.racial_bonus)+Number(systemData.stats.memory.special_bonus)+Number(systemData.stats.memory.basic_bonus); + actorData.system.stats.reasoning.stat_bonus = Number(systemData.stats.reasoning.racial_bonus)+Number(systemData.stats.reasoning.special_bonus)+Number(systemData.stats.reasoning.basic_bonus); + actorData.system.stats.self_discipline.stat_bonus = Number(systemData.stats.self_discipline.racial_bonus)+Number(systemData.stats.self_discipline.special_bonus)+Number(systemData.stats.self_discipline.basic_bonus); + actorData.system.stats.empathy.stat_bonus = Number(systemData.stats.empathy.racial_bonus)+Number(systemData.stats.empathy.special_bonus)+Number(systemData.stats.empathy.basic_bonus); + actorData.system.stats.intuition.stat_bonus = Number(systemData.stats.intuition.racial_bonus)+Number(systemData.stats.intuition.special_bonus)+Number(systemData.stats.intuition.basic_bonus); + actorData.system.stats.presence.stat_bonus = Number(systemData.stats.presence.racial_bonus)+Number(systemData.stats.presence.special_bonus)+Number(systemData.stats.presence.basic_bonus); + actorData.system.stats.quickness.stat_bonus = Number(systemData.stats.quickness.racial_bonus)+Number(systemData.stats.quickness.special_bonus)+Number(systemData.stats.quickness.basic_bonus); + actorData.system.stats.strength.stat_bonus = Number(systemData.stats.strength.racial_bonus)+Number(systemData.stats.strength.special_bonus)+Number(systemData.stats.strength.basic_bonus); } - prepareResistanceRolls(actorData) { - - const data = actorData.data; - - actorData.data.resistance_rolls.essence = Number(actorData.data.stats.empathy.stat_bonus * 3) - actorData.data.resistance_rolls.channeling = Number(actorData.data.stats.intuition.stat_bonus * 3) - actorData.data.resistance_rolls.mentalism = Number(actorData.data.stats.presence.stat_bonus * 3) - actorData.data.resistance_rolls.fear = Number(actorData.data.stats.self_discipline.stat_bonus * 3) - actorData.data.resistance_rolls.poison_disease = Number(actorData.data.stats.constitution.stat_bonus * 3) - actorData.data.resistance_rolls.chann_ess = Number(actorData.data.stats.intuition.stat_bonus) + Number(actorData.data.stats.empathy.stat_bonus) - actorData.data.resistance_rolls.chann_ment = Number(actorData.data.stats.intuition.stat_bonus) + Number(actorData.data.stats.presence.stat_bonus) - actorData.data.resistance_rolls.ess_ment = Number(actorData.data.stats.empathy.stat_bonus) + Number(actorData.data.stats.presence.stat_bonus) - actorData.data.resistance_rolls.arcane = Number(actorData.data.stats.empathy.stat_bonus) + Number(actorData.data.stats.intuition.stat_bonus) + Number(actorData.data.stats.presence.stat_bonus) + // Calculate each Resistance Roll with the formula on the character sheet. + prepareResistanceRolls(actorData) { // TODO: Add Racial modifiers to resistance + const systemData = actorData.system; + actorData.system.resistance_rolls.essence = Number(systemData.stats.empathy.stat_bonus * 3); + actorData.system.resistance_rolls.channeling = Number(systemData.stats.intuition.stat_bonus * 3); + actorData.system.resistance_rolls.mentalism = Number(systemData.stats.presence.stat_bonus * 3); + actorData.system.resistance_rolls.fear = Number(systemData.stats.self_discipline.stat_bonus * 3); + actorData.system.resistance_rolls.poison_disease = Number(systemData.stats.constitution.stat_bonus * 3); + actorData.system.resistance_rolls.chann_ess = Number(systemData.stats.intuition.stat_bonus) + Number(systemData.stats.empathy.stat_bonus); + actorData.system.resistance_rolls.chann_ment = Number(systemData.stats.intuition.stat_bonus) + Number(systemData.stats.presence.stat_bonus); + actorData.system.resistance_rolls.ess_ment = Number(systemData.stats.empathy.stat_bonus) + Number(systemData.stats.presence.stat_bonus); + actorData.system.resistance_rolls.arcane = Number(systemData.stats.empathy.stat_bonus) + Number(systemData.stats.intuition.stat_bonus) + Number(systemData.stats.presence.stat_bonus); } - prepareSkillCatStatBonuses() { - console.log("Getting Items"); + /*prepareSkillCategoryBonuses() { + for (const item of this.items) { + if (item.type === "skill") { + + } + } + }*/ + + // Tallys the bonus for each Stat that is applicable to the Skill Category and then updates the total + prepareSkillCategoryStatBonuses() { for (const item of this.items) { if (item.type === "skill_category") { - + // Get all the applicable stats for this skill category - var app_stat_1 = item.data.data.app_stat_1; - var app_stat_2 = item.data.data.app_stat_2; - var app_stat_3 = item.data.data.app_stat_3; - console.log(item.name + " " + app_stat_1 + " " + app_stat_2 + " " + app_stat_3); + var app_stat_1 = item.system.app_stat_1; + var app_stat_2 = item.system.app_stat_2; + var app_stat_3 = item.system.app_stat_3; // If the first one is None we don't need to do anything further if (app_stat_1 === "None") { @@ -97,7 +102,7 @@ export class RMSSActor extends Actor { else { var applicable_stat_bonus = 0; - + var app_stat_1_found = false; var app_stat_2_found = false; var app_stat_3_found = false; @@ -106,39 +111,42 @@ export class RMSSActor extends Actor { for (const stat in CONFIG.rmss.stats) { // If the configured App Stat matches the one of the stats in config if (app_stat_1 === CONFIG.rmss.stats[stat].shortname) { - console.log("Found first stat: " + stat); app_stat_1_found = true; // Get the Stat Bonus - console.log(this.data.data.stats[stat].stat_bonus); - applicable_stat_bonus = applicable_stat_bonus + this.data.data.stats[stat].stat_bonus - //console.log("New Applicable Stat Bonus: " + applicable_stat_bonus) + applicable_stat_bonus = applicable_stat_bonus + this.system.stats[stat].stat_bonus; } if (app_stat_2 === CONFIG.rmss.stats[stat].shortname) { - console.log("Found second stat: " + stat); app_stat_2_found = true; - console.log(this.data.data.stats[stat].stat_bonus); - applicable_stat_bonus = applicable_stat_bonus + this.data.data.stats[stat].stat_bonus - //console.log("New Applicable Stat Bonus: " + applicable_stat_bonus) + applicable_stat_bonus = applicable_stat_bonus + this.system.stats[stat].stat_bonus; } if (app_stat_3 === CONFIG.rmss.stats[stat].shortname) { - console.log("Found third stat: " + stat); app_stat_3_found = true; - console.log(this.data.data.stats[stat].stat_bonus); - applicable_stat_bonus = applicable_stat_bonus + this.data.data.stats[stat].stat_bonus - //console.log("New Applicable Stat Bonus: " + applicable_stat_bonus) + applicable_stat_bonus = applicable_stat_bonus + this.system.stats[stat].stat_bonus; } } - console.log("Applicable Stat Bonus: " + applicable_stat_bonus) + //console.log("Applicable Stat Bonus: " + applicable_stat_bonus) if (app_stat_1_found === true && app_stat_2_found === true && app_stat_3_found === true) { // Apply the update if we found stat bonuses for every applicable stat - item.data.data.stat_bonus = applicable_stat_bonus; + item.system.stat_bonus = applicable_stat_bonus; // Update the total in the Item - item.calculateSkillCatTotalBonus(item.data); + item.calculateSkillCategoryTotalBonus(item); } } } } } + // For each skill category return an object in this format. + // {{ _id: "skill category name"}} + // This is the format that the select helper on the skill sheet needs + getOwnedSkillCategories() { + var ownedSkillCategories = {None: "None"}; + for (const item of this.items) { + if (item.type === "skill_category") { + ownedSkillCategories[item._id] = item.name; + } + } + return(ownedSkillCategories); + } } \ No newline at end of file diff --git a/rmss/module/documents/item.js b/rmss/module/documents/item.js index 37679cf..0f79e3e 100644 --- a/rmss/module/documents/item.js +++ b/rmss/module/documents/item.js @@ -9,45 +9,47 @@ export class RMSSItem extends Item { super.prepareData(); } - // Set the images for newly created images (need to fix for copied images). + // Set the icon images for newly created images. async _preCreate(data, options, userId) { await super._preCreate(data, options, userId); - if (!data.img) { - if (this.data.type == "armor") { - await this.data.update({img: "systems/rmss/assets/default/armor.svg"}); + + // Do not set on copied items if they have a custom Icon. + if (!data.name.includes("(Copy)")) + { + if (this.type == "armor") { + await this.updateSource({img: "systems/rmss/assets/default/armor.svg"}); } - else if (this.data.type == "weapon") { - await this.data.update({img: "systems/rmss/assets/default/weapon.svg"}); + else if (this.type == "weapon") { + await this.updateSource({img: "systems/rmss/assets/default/weapon.svg"}); } - else if (this.data.type == "skill") { - await this.data.update({img: "systems/rmss/assets/default/skill.svg"}); + else if (this.type == "skill") { + await this.updateSource({img: "systems/rmss/assets/default/skill.svg"}); } - else if (this.data.type == "skill_category") { - await this.data.update({img: "systems/rmss/assets/default/skill_category.svg"}); + else if (this.type == "skill_category") { + await this.updateSource({img: "systems/rmss/assets/default/skill_category.svg"}); } - else if (this.data.type == "spell") { - await this.data.update({img: "systems/rmss/assets/default/spell.svg"}); + else if (this.type == "spell") { + await this.updateSource({img: "systems/rmss/assets/default/spell.svg"}); } - else if (this.data.type == "herb_or_poison") { - await this.data.update({img: "systems/rmss/assets/default/herb_or_poison.svg"}); + else if (this.type == "herb_or_poison") { + await this.updateSource({img: "systems/rmss/assets/default/herb_or_poison.svg"}); } - else if (this.data.type == "transport") { - await this.data.update({img: "systems/rmss/assets/default/transport.svg"}); + else if (this.type == "transport") { + await this.updateSource({img: "systems/rmss/assets/default/transport.svg"}); } } } - - calculateSkillCatTotalBonus(itemData) { - // Calculate Stat Bonuses - - const data = itemData.data; - itemData.data.total_bonus = Number(data.rank_bonus)+Number(data.stat_bonus)+Number(data.prof_bonus)+Number(data.special_bonus_1)+Number(data.special_bonus_2); + calculateSkillCategoryTotalBonus(itemData) { + if (this.type === "skill_category") { + const systemData = itemData.system; + itemData.system.total_bonus = Number(systemData.rank_bonus)+Number(systemData.stat_bonus)+Number(systemData.prof_bonus)+Number(systemData.special_bonus_1)+Number(systemData.special_bonus_2); + } } prepareDerivedData() { - const itemData = this.data; - const data = itemData.data; + const itemData = this; + const systemData = itemData.system; const flags = itemData.flags.rmss || {}; // Make separate methods for each item type to keep things organized. @@ -62,16 +64,16 @@ export class RMSSItem extends Item { //const data = itemData.data; // Calculate Stat Bonuses - this.calculateSkillCatTotalBonus(itemData); + this.calculateSkillCategoryTotalBonus(itemData); } _prepareSkillData(itemData) { if (itemData.type !== 'skill') return; // Make modifications to data here. For example: - const data = itemData.data; + const systemData = itemData.system; // Calculate Stat Bonuses - itemData.data.total_bonus = Number(data.rank_bonus)+Number(data.category_bonus)+Number(data.item_bonus)+Number(data.special_bonus_1)+Number(data.special_bonus_2); + itemData.system.total_bonus = Number(systemData.rank_bonus)+Number(systemData.category_bonus)+Number(systemData.item_bonus)+Number(systemData.special_bonus_1)+Number(systemData.special_bonus_2); } } diff --git a/rmss/module/sheets/actors/rmss_player_sheet.js b/rmss/module/sheets/actors/rmss_player_sheet.js index 2d75eeb..d8d1727 100644 --- a/rmss/module/sheets/actors/rmss_player_sheet.js +++ b/rmss/module/sheets/actors/rmss_player_sheet.js @@ -14,10 +14,10 @@ export default class RMSSPlayerSheet extends ActorSheet { const context = super.getData(); // Use a safe clone of the actor data for further operations. - const actorData = this.actor.data.toObject(false); + const actorData = this.actor.toObject(false); // Add the actor's data to context.data for easier access, as well as flags. - context.data = actorData.data; + context.system = actorData.system; context.flags = actorData.flags; // Prepare character data and items. @@ -29,11 +29,38 @@ export default class RMSSPlayerSheet extends ActorSheet { // Prepare NPC data and items. if (actorData.type == 'npc') { this._prepareItems(context); - } - + } return context; } + //Override this method to check for duplicates when things are dragged to the sheet + // We don't want duplicate skills and skill categories. + async _onDropItem(event, data) { + + // Reconstruct the item from the event + const newitem = await Item.implementation.fromDropData(data); + const itemData = newitem.toObject(); + + if (itemData.type === "skill_category" || itemData.type === "skill"){ + + // Get the already owned Items from the actor and push into an array + const owneditems = this.object.getOwnedSkillCategories(); + + console.log(owneditems); + + var owneditemslist = Object.values(owneditems); + + // Check if the dragged item is not in the array and not owned + if (!owneditemslist.includes(itemData.name)) { + console.log("Not Owned!"); + super._onDropItem(event, data); + } + } + else { + super._onDropItem(event, data); + } + } + _prepareCharacterData(context) { } @@ -96,7 +123,7 @@ export default class RMSSPlayerSheet extends ActorSheet { // Render the item sheet for viewing/editing prior to the editable check. html.find('.item-edit').click(ev => { const item = this.actor.items.get(ev.currentTarget.getAttribute("data-item-id")); - console.log(this); + //console.log(this); item.sheet.render(true); }); @@ -110,7 +137,7 @@ export default class RMSSPlayerSheet extends ActorSheet { // Delete Item html.find('.item-delete').click(ev => { const item = this.actor.items.get(ev.currentTarget.getAttribute("data-item-id")); - console.log(ev.currentTarget.getAttribute("data-item-id")); + //console.log(ev.currentTarget.getAttribute("data-item-id")); item.delete(); }); } @@ -131,8 +158,8 @@ export default class RMSSPlayerSheet extends ActorSheet { data: data }; // Remove the type from the dataset since it's in the itemData.type prop. - delete itemData.data["type"]; - + //delete itemData.data["type"]; + delete itemData.data.type; // Finally, create the item! return await Item.create(itemData, {parent: this.actor}); } diff --git a/rmss/module/sheets/items/rmss_armor_sheet.js b/rmss/module/sheets/items/rmss_armor_sheet.js index d7b5d06..1968871 100644 --- a/rmss/module/sheets/items/rmss_armor_sheet.js +++ b/rmss/module/sheets/items/rmss_armor_sheet.js @@ -17,15 +17,18 @@ export default class RMSSArmorSheet extends ItemSheet { } // Make the data available to the sheet template - getData() { - const baseData = super.getData(); + async getData() { + const baseData = await super.getData(); + + var enrichedDescription = await TextEditor.enrichHTML(this.item.system.description, {async: true}); let sheetData = { owner: this.item.isOwner, editable :this.isEditable, item: baseData.item, - data: baseData.item.data.data, - config: CONFIG.rmss + system: baseData.item.system, + config: CONFIG.rmss, + enrichedDescription: enrichedDescription }; return sheetData; diff --git a/rmss/module/sheets/items/rmss_herb_or_poison_sheet.js b/rmss/module/sheets/items/rmss_herb_or_poison_sheet.js index 52b90f5..2f2b4fb 100644 --- a/rmss/module/sheets/items/rmss_herb_or_poison_sheet.js +++ b/rmss/module/sheets/items/rmss_herb_or_poison_sheet.js @@ -17,15 +17,18 @@ export default class RMSSHerbAndPoisonSheet extends ItemSheet { } // Make the data available to the sheet template - getData() { - const baseData = super.getData(); + async getData() { + const baseData = await super.getData(); + + var enrichedDescription = await TextEditor.enrichHTML(this.item.system.description, {async: true}); let sheetData = { owner: this.item.isOwner, editable :this.isEditable, item: baseData.item, - data: baseData.item.data.data, - config: CONFIG.rmss + system: baseData.item.system, + config: CONFIG.rmss, + enrichedDescription: enrichedDescription }; return sheetData; diff --git a/rmss/module/sheets/items/rmss_item_sheet.js b/rmss/module/sheets/items/rmss_item_sheet.js index 047f4e7..7bcc34a 100644 --- a/rmss/module/sheets/items/rmss_item_sheet.js +++ b/rmss/module/sheets/items/rmss_item_sheet.js @@ -17,15 +17,18 @@ export default class RMSSItemSheet extends ItemSheet { } // Make the data available to the sheet template - getData() { - const baseData = super.getData(); + async getData() { + const baseData = await super.getData(); + + var enrichedDescription = await TextEditor.enrichHTML(this.item.system.description, {async: true}); let sheetData = { owner: this.item.isOwner, editable :this.isEditable, item: baseData.item, - data: baseData.item.data.data, - config: CONFIG.rmss + system: baseData.item.system, + config: CONFIG.rmss, + enrichedDescription: enrichedDescription }; return sheetData; diff --git a/rmss/module/sheets/items/rmss_transport_sheet.js b/rmss/module/sheets/items/rmss_transport_sheet.js index dc438d8..afa0493 100644 --- a/rmss/module/sheets/items/rmss_transport_sheet.js +++ b/rmss/module/sheets/items/rmss_transport_sheet.js @@ -17,15 +17,18 @@ export default class RMSSTransportSheet extends ItemSheet { } // Make the data available to the sheet template - getData() { - const baseData = super.getData(); + async getData() { + const baseData = await super.getData(); + + var enrichedDescription = await TextEditor.enrichHTML(this.item.system.description, {async: true}); let sheetData = { owner: this.item.isOwner, editable :this.isEditable, item: baseData.item, - data: baseData.item.data.data, - config: CONFIG.rmss + system: baseData.item.system, + config: CONFIG.rmss, + enrichedDescription: enrichedDescription }; return sheetData; diff --git a/rmss/module/sheets/items/rmss_weapon_sheet.js b/rmss/module/sheets/items/rmss_weapon_sheet.js index 076eebe..4aa2e2d 100644 --- a/rmss/module/sheets/items/rmss_weapon_sheet.js +++ b/rmss/module/sheets/items/rmss_weapon_sheet.js @@ -17,15 +17,18 @@ export default class RMSSWeaponSheet extends ItemSheet { } // Make the data available to the sheet template - getData() { - const baseData = super.getData(); + async getData() { + const baseData = await super.getData(); + + var enrichedDescription = await TextEditor.enrichHTML(this.item.system.description, {async: true}); let sheetData = { owner: this.item.isOwner, editable :this.isEditable, item: baseData.item, - data: baseData.item.data.data, - config: CONFIG.rmss + system: baseData.item.system, + config: CONFIG.rmss, + enrichedDescription: enrichedDescription }; return sheetData; diff --git a/rmss/module/sheets/skills/rmss_skill_category_sheet.js b/rmss/module/sheets/skills/rmss_skill_category_sheet.js index bc811a8..01bcc02 100644 --- a/rmss/module/sheets/skills/rmss_skill_category_sheet.js +++ b/rmss/module/sheets/skills/rmss_skill_category_sheet.js @@ -17,36 +17,36 @@ export default class RMSSSkillCategorySheet extends ItemSheet { } // Make the data available to the sheet template - getData() { - const baseData = super.getData(); + async getData() { + const context = await super.getData(); // Get a list of stats that can be used as applicable stats var applicable_stat_list = this.prepareApplicableStatValues(CONFIG); - + //Get the currently selected value for all three applicable stats var applicable_stat_1_selected = this.prepareApplicableSelectedStat("app_stat_1"); var applicable_stat_2_selected = this.prepareApplicableSelectedStat("app_stat_2"); var applicable_stat_3_selected = this.prepareApplicableSelectedStat("app_stat_3"); - // Build the string for Applicable Stats - var applicable_stat_text = this.buildApplicableStatsText(applicable_stat_1_selected, applicable_stat_2_selected, applicable_stat_3_selected) - baseData.item.data.data['applicable_stats'] = applicable_stat_text + // Build and apply the display string for Applicable Stats + var applicable_stat_text = this.buildApplicableStatsText(applicable_stat_1_selected, applicable_stat_2_selected, applicable_stat_3_selected); + //context.item.system['applicable_stats'] = applicable_stat_text; + context.item.system.applicable_stats = applicable_stat_text; + var enrichedDescription = await TextEditor.enrichHTML(this.item.system.description, {async: true}); let sheetData = { owner: this.item.isOwner, editable :this.isEditable, - item: baseData.item, - data: baseData.item.data.data, + item: context.item, + system: context.item.system, config: CONFIG.rmss, applicable_stat_list: applicable_stat_list, applicable_stat_1_selected: applicable_stat_1_selected, applicable_stat_2_selected: applicable_stat_2_selected, - applicable_stat_3_selected: applicable_stat_3_selected + applicable_stat_3_selected: applicable_stat_3_selected, + enrichedDescription: enrichedDescription }; - - console.log(this.item) - return sheetData; } @@ -60,19 +60,19 @@ export default class RMSSSkillCategorySheet extends ItemSheet { } prepareApplicableStatValues(CONFIG) { - var applicable_stat_1_list = {None: "None"} + var applicable_stat_list = {None: "None"}; // Get a list of stat shortnames from the config for (const item in CONFIG.rmss.stats) { - applicable_stat_1_list[CONFIG.rmss.stats[item]['shortname']] = CONFIG.rmss.stats[item]['shortname']; + applicable_stat_list[CONFIG.rmss.stats[item].shortname] = CONFIG.rmss.stats[item].shortname; } - return applicable_stat_1_list; + return applicable_stat_list; } // Determine which Stat is selected for applicable stats prepareApplicableSelectedStat(app_stat) { var applicable_stat_selected = ""; - applicable_stat_selected = this.item.data.data[app_stat]; + applicable_stat_selected = this.item.system[app_stat]; return applicable_stat_selected; } @@ -80,19 +80,19 @@ export default class RMSSSkillCategorySheet extends ItemSheet { buildApplicableStatsText(app_stat_1, app_stat_2, app_stat_3) { if (app_stat_1 === "None") { - return("None") + return("None"); } else if (app_stat_1 !== "None" && app_stat_2 === "None") { - return(app_stat_1) + return(app_stat_1); } else if (app_stat_1 !== "None" && app_stat_2 !== "None" && app_stat_3 === "None" ) { - return(app_stat_1 + "/" + app_stat_2 ) + return(app_stat_1 + "/" + app_stat_2 ); } else if (app_stat_1 !== "None" && app_stat_2 !== "None" && app_stat_3 !== "None" ) { - return(app_stat_1 + "/" + app_stat_2 + "/" + app_stat_3 ) + return(app_stat_1 + "/" + app_stat_2 + "/" + app_stat_3 ); } else { - return("None") + return("None"); } } diff --git a/rmss/module/sheets/skills/rmss_skill_sheet.js b/rmss/module/sheets/skills/rmss_skill_sheet.js index f722862..bb9c364 100644 --- a/rmss/module/sheets/skills/rmss_skill_sheet.js +++ b/rmss/module/sheets/skills/rmss_skill_sheet.js @@ -17,17 +17,74 @@ export default class RMSSSkillSheet extends ItemSheet { } // Make the data available to the sheet template - getData() { - const baseData = super.getData(); + async getData() { + const baseData = await super.getData(); + + var enrichedDescription = await TextEditor.enrichHTML(this.item.system.description, {async: true}); + + // Get a list of the parent item's skill categories for the dropdown + var owned_skillcats = this.prepareSkillCategoryValues(); + + // Figure out if a valid Skill Category is already selected + var selected_skillcat = this.prepareSelectedSkillCategory(owned_skillcats, this.object.system.category); + + this.prepareSelectedSkillCategoryBonus(selected_skillcat); let sheetData = { owner: this.item.isOwner, editable :this.isEditable, item: baseData.item, - data: baseData.item.data.data, - config: CONFIG.rmss + system: baseData.item.system, + config: CONFIG.rmss, + owned_skillcats: owned_skillcats, + enrichedDescription: enrichedDescription, + selected_skillcat: selected_skillcat }; return sheetData; } + + prepareSkillCategoryValues() { + // If there is no player owning this Skill then we cannot assign a category. + var skillcat_list = {None: "Skill Has No Owner", }; + + if (this.item.isEmbedded === null) { + return(skillcat_list); + } + else + { + const skillcats = this.item.parent.getOwnedSkillCategories(); + return(skillcats); + } + } + + // Determine which Stat is selected and test that it is in the current list of categories. + prepareSelectedSkillCategory(ownedskillcats, selected_category) { + + // Start By setting the owned category to None, if nothing happens this will be the default + var default_selected_category = "None"; + + // Get a list of keys from the currently owned skill categories and compare to the current value + if (Object.keys(ownedskillcats).includes(selected_category)) { + return(selected_category); + } else { + return(default_selected_category); + } + } + + prepareSelectedSkillCategoryBonus(selected_skillcat) { + if (this.item.isEmbedded === null) { + console.log("Skill has no owner"); + } + else + { + const items = this.object.parent.items; + + for (const item of items) { + if (item.type === "skill_category" && item._id === selected_skillcat) { + this.object.system.category_bonus = item.system.total_bonus; + } + } + } + } } \ No newline at end of file diff --git a/rmss/module/sheets/spells/rmss_spell_sheet.js b/rmss/module/sheets/spells/rmss_spell_sheet.js index 55018ec..bbb36d1 100644 --- a/rmss/module/sheets/spells/rmss_spell_sheet.js +++ b/rmss/module/sheets/spells/rmss_spell_sheet.js @@ -16,15 +16,18 @@ export default class RMSSSpellSheet extends ItemSheet { } // Make the data available to the sheet template - getData() { - const baseData = super.getData(); + async getData() { + const baseData = await super.getData(); + + var enrichedDescription = await TextEditor.enrichHTML(this.item.system.description, {async: true}); let sheetData = { owner: this.item.isOwner, editable :this.isEditable, item: baseData.item, - data: baseData.item.data.data, - config: CONFIG.rmss + system: baseData.item.system, + config: CONFIG.rmss, + enrichedDescription: enrichedDescription }; return sheetData; diff --git a/rmss/packs/skill_categories.db b/rmss/packs/skill_categories.db index 11cb5bc..e69de29 100644 --- a/rmss/packs/skill_categories.db +++ b/rmss/packs/skill_categories.db @@ -1,55 +0,0 @@ -{"_id":"0d3EfynJXdtM5Dzm","name":"Armor • Light","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Ag/St/Ag","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"0w6sahjMDlHYSN8V","name":"Lore • Obscure","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Me/Re/Me","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"1G2k2fwahmEzCOFU","name":"Technical/Trade • Vocational","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Me/In/Re","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"4BM6WowdqAcmqKqQ","name":"Lore • Technical","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Me/Re/Me","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"4rr30P65Yc43Ncjh","name":"Science/Analytic • Specialized","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Re/Me/Re","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"name":"Body Development","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Co/SD/Co","development_cost":"","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.HfkzoDVADnq2dYJ7"}},"_id":"5QRIgoZ6jew76BgE"} -{"_id":"8TZWjsbDPWi4xLNt","name":"Weapon • Thrown","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Ag/St/Ag","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"91zRgmv9jirmpA3u","name":"Subterfuge • Attack","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Ag/SD/In","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"name":"Influence","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Pr/Em/In","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.elWpmeBUSeX7AdrX"}},"_id":"96thkRaRd0KvdiIY"} -{"name":"Self Control","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"SD/Pr/SD","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.rbe2UnhjpflyUZSE"}},"_id":"B1dbjqpZq0srb9tg"} -{"_id":"CegELmkfwbiBjnRk","name":"Athletic • Gymanstics","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Ag/Qu/Ag","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"name":"Power Awareness","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Em/In/Pr","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.MddRxrypkR5XmFaA"}},"_id":"DowJf31x9cOtxFHF"} -{"_id":"FFdtMkQ6yupVjPeS","name":"Spells • Arcane Open Lists","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"Fcj10XbsHSUR5phg","name":"Subterfuge • Mechanics","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"In/Ag/Re","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"G6EOQxjgxzXF178q","name":"Spells • Own Realm Other Base Lists","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"name":"Special Defenses","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"none","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.jCqolNb9eySmsuMB"}},"_id":"GLunI5fshwER51fi"} -{"_id":"Gtr6mVQnCpNtHViI","name":"Weapon • Missile","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Ag/St/Ag","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"HMWeRbDDZtl0tXEh","name":"Spells • Other Realm Base Lists","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"HpgMGMSEQ8Ts7YbG","name":"Armor • Medium","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"St/Ag/St","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"IXcTjepLPq31vxVT","name":"Artistic • Active","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Em/In/Pr","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"Ip7mrF0VZ1ExBksX","name":"Outdoor • Animal","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Em/Ag/Em","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"Jnd5pdtnTal5h06A","name":"Science/Analytic • Basic","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Re/Me/Re","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"KnUkHQavTshrTjkg","name":"Awareness • Perceptions","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"In/Sd/In","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"N42RNwyuUGHRjodJ","name":"Spells • Own Realm Closed Lists","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"OyH3yI187GiJcIc4","name":"Lore • Magical","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Me/Re/Me","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"Q4i7dMnuPsVqZHYw","name":"Artistic • Passive","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Em/In/Pr","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"QTDmhJB09fDe8iQv","name":"Martial Arts • Striking","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"St/Ag/St","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"name":"Power Point Development","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.2C7f9nvf1kuK8rXY"}},"_id":"QtaTRdx4XPibLhdr"} -{"_id":"Rl6sVmW7tYsp7AwE","name":"Weapon • Pole Arms","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"St/Ag/St","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"name":"Power Manipulation","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Em/In/Pr","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.qDbLIKRv8Q2Ciw74"}},"_id":"TW4y2IyruLOgQakC"} -{"_id":"Ta85zeG0pUbHtNBr","name":"Spells • Other Realm Open Lists","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"name":"Communications","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Re/Me/Em","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.2JoQYKw8w0Hlpq4A"}},"_id":"UCh0IobVLOUEK6av"} -{"_id":"V8KDQbEuZHFyAVmr","name":"Awareness • Searching","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"In/Re/SD","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"Vr9W9tfAwSitbMET","name":"Outdoor • Environmental","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"SD/In/Me","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"YEEf2L6g7ZMzTcbF","name":"Technical/Trade • General","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Re/Me/SD","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"YmhpyPfe6QnhPvQt","name":"Armor • Heavy","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"St/Ag/St","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"Yv6KAUTUixKBs2Wg","name":"Weapon • Missile Artillery","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"In/Ag/Re","development_cost":"","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"aJG4v8JkqUiXORVC","name":"Athletic • Endurance","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Co/Ag/St","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"aMAh2dm9dNpXc594","name":"Technical/Trade • Professional","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Re/Me/In","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"apah6xF0sZmT2wbe","name":"Spells • Own Realm Open Lists","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"bBFVMX3i9ytyGBjc","name":"Combat Maneuvers","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Ag/Qu/SD","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.tnvG5xaEcQocDS0w"}}} -{"_id":"bWXkqTxusDg3LD3p","name":"Lore • General","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Me/Re/Me","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"name":"Urban","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"In/Pr/Re","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.1ctWjqn6zIq1Ecah"}},"_id":"eGjI9piHe9tafzBC"} -{"_id":"eJ8HV5AYy1zzYrEL","name":"Weapon • 1-H Concussion","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"St/Ag/St","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"fiTen0GICCayYkzd","name":"Athletic • Brawn","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"St/Co/Ag","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"jOlyQllB1OMurWft","name":"Martial Arts • Sweeps","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Ag/St/Ag","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"name":"Special Attacks","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"St/Ag/St","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.DGkoTXdfa07tJWMt"}},"_id":"k5ybPxU5ZKdege0Q"} -{"_id":"m8dtArvtmCzVC1mA","name":"Subterfuge • Stealth","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Ag/SD/In","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"name":"Directed Spells","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Ag/SD/Ag","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.OY1iAvwGdsBA3oi9"}},"_id":"pwCwq6GP5Kra9zKv"} -{"_id":"r9z7zKuzfWlORaes","name":"Spells • Own Realm Own Base Lists","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"th7zQOOVjKY0B1j1","name":"Weapon • 2-Handed","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"St/Ag/St","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"name":"Crafts","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"Ag/Me/SD","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{"core":{"sourceId":"Item.EtAtBWxG9aujAxKn"}},"_id":"vcDgHmO9EhyzmTRj"} -{"_id":"wK30vs0JNMznlzWU","name":"Spells • Other Realm Closed List","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"y0bshWPNyGl1THYy","name":"Awareness • Senses","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"In/SD/In","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} -{"_id":"zyMFRGhlL3fuRjab","name":"Weapon • 1-H Edged","type":"skill_category","img":"systems/rmss/assets/default/skill_category.svg","data":{"description":"Description here.","applicable_stats":"St/Ag/St","development_cost":"0","ranks":0,"new_ranks":0,"rank_bonus":0,"stat_bonus":0,"prof_bonus":0,"special_bonus_1":0,"special_bonus_2":0,"total_bonus":0,"favorite":false},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"jFAyH93PxEe1ncxK":3},"flags":{}} diff --git a/rmss/rmss.js b/rmss/rmss.js index 7a150c4..6f61877 100644 --- a/rmss/rmss.js +++ b/rmss/rmss.js @@ -15,8 +15,8 @@ import RMSSTransportSheet from "./module/sheets/items/rmss_transport_sheet.js"; import RMSSWeaponSheet from "./module/sheets/items/rmss_weapon_sheet.js"; import RMSSHerbOrPoisonSheet from "./module/sheets/items/rmss_herb_or_poison_sheet.js"; import RMSSSpellSheet from "./module/sheets/spells/rmss_spell_sheet.js"; -import RMSSSkillCategorySheet from "./module/sheets/skills/rmss_skill_category_sheet.js" -import RMSSSkillSheet from "./module/sheets/skills/rmss_skill_sheet.js" +import RMSSSkillCategorySheet from "./module/sheets/skills/rmss_skill_category_sheet.js"; +import RMSSSkillSheet from "./module/sheets/skills/rmss_skill_sheet.js"; import RMSSPlayerSheet from "./module/sheets/actors/rmss_player_sheet.js"; @@ -37,7 +37,7 @@ async function preloadHandlebarsTemplates() { "systems/rmss/templates/sheets/actors/parts/actor-money.html", "systems/rmss/templates/sheets/actors/parts/actor-skill-categories-grid.html", "systems/rmss/templates/sheets/actors/parts/actor-skills-grid.html" - ] + ]; return loadTemplates(templatePaths); } diff --git a/rmss/templates/sheets/actors/parts/actor-armor-info.html b/rmss/templates/sheets/actors/parts/actor-armor-info.html index a2dd2f5..9f64dc2 100644 --- a/rmss/templates/sheets/actors/parts/actor-armor-info.html +++ b/rmss/templates/sheets/actors/parts/actor-armor-info.html @@ -3,60 +3,60 @@ {{ localize "rmss.pc_sheet_armor_info.armor_type" }}
{{localize "rmss.skill.total_bonus"}} | - + | - + | - + | - + | - + | - + | - + | - + | - + |
---|