diff --git a/rmss/TODO b/rmss/TODO index abd2071..7d64476 100644 --- a/rmss/TODO +++ b/rmss/TODO @@ -9,18 +9,30 @@ Small DONE - Skills and Skill Categories are now seperate checks for Drag and Drop as some share names Spells ? 5. Fix New Ranks Clickboxes - https://discord.com/channels/170995199584108546/670336275496042502/1018530650980102195 -6. Fix Favorites Clickboxes on Actor Page + https://github.com/megastruktur/foundryvtt-blades-in-the-dark/blob/master/templates/actor-sheet.html#L97 + https://github.com/megastruktur/foundryvtt-blades-in-the-dark/blob/00bed1cb1d222eab3ece62960941c54f3c272aac/module/blades.js#L69 +6. DONE - Fix Favorites Clickboxes on Actor Page + DONE - Better Icon + DONE - Make Clickable +7. Create Default Values for Character sheet Medium -4. Inventory sorted by types +1. Inventory sorted by types i. Drag and drop should increment an item if it already exists. ii. Equipables iii. Favorites -5. Creature Sheet -6. Finish Character Sheet +2. Creature Sheet +3. Finish Character Sheet + Inventory + Spells + Status Record (Possibly large) + XP +4. Button to add all Skill Categories +5. Revisit Skill and Skill Category Progression (Pg 33) +6. DONE - Add occupational, everyman, and restricted skill categories Large -6. Dice Roller -7. Initiative System +1. Dice Roller +2. Initiative System diff --git a/rmss/module/config.js b/rmss/module/config.js index 94623b3..6f88887 100644 --- a/rmss/module/config.js +++ b/rmss/module/config.js @@ -50,4 +50,11 @@ rmss.stats = { fullname: "Strength", shortname: "St" } -} +}; + +rmss.skill_designations = { + none: "None", + occupational: "Occupational", + everyman: "Everyman", + restricted: "Restricted" +}; diff --git a/rmss/module/sheets/actors/rmss_player_sheet.js b/rmss/module/sheets/actors/rmss_player_sheet.js index cbc4abc..fcb0421 100644 --- a/rmss/module/sheets/actors/rmss_player_sheet.js +++ b/rmss/module/sheets/actors/rmss_player_sheet.js @@ -49,10 +49,10 @@ export default class RMSSPlayerSheet extends ActorSheet { console.log(owneditems); - var owneditemslist = Object.values(owneditems); + var ownedskillcatlist = Object.values(owneditems); // Check if the dragged item is not in the array and not owned - if (!owneditemslist.includes(itemData.name)) { + if (!ownedskillcatlist.includes(itemData.name)) { console.log("Not Owned!"); super._onDropItem(event, data); } @@ -62,10 +62,10 @@ export default class RMSSPlayerSheet extends ActorSheet { console.log(owneditems); - var owneditemslist = Object.values(owneditems); + var ownedskilllist = Object.values(owneditems); // Check if the dragged item is not in the array and not owned - if (!owneditemslist.includes(itemData.name)) { + if (!ownedskilllist.includes(itemData.name)) { console.log("Not Owned!"); super._onDropItem(event, data); } @@ -155,6 +155,21 @@ export default class RMSSPlayerSheet extends ActorSheet { //console.log(ev.currentTarget.getAttribute("data-item-id")); item.delete(); }); + + // Check/Uncheck Favorite + html.find('.skill-favorite').click(ev => { + const item = this.actor.items.get(ev.currentTarget.getAttribute("data-item-id")); + console.log(item); + console.log("Before change: " + item.system.favorite); + if (item.system.favorite === true) { + console.log("Setting False"); + item.update({system: {"favorite": false}}); + } else { + console.log("Setting True"); + item.update({system: {"favorite": true}}); + } + console.log("After change: " + item.system.favorite); + }); } async _onItemCreate(event) { diff --git a/rmss/module/sheets/skills/rmss_skill_sheet.js b/rmss/module/sheets/skills/rmss_skill_sheet.js index 8c5e8fd..71cdf09 100644 --- a/rmss/module/sheets/skills/rmss_skill_sheet.js +++ b/rmss/module/sheets/skills/rmss_skill_sheet.js @@ -21,7 +21,10 @@ export default class RMSSSkillSheet extends ItemSheet { const baseData = await super.getData(); var enrichedDescription = await TextEditor.enrichHTML(this.item.system.description, {async: true}); - + + // Get a list of stats that can be used as applicable stats + var designations = this.getSkillDesignations(CONFIG); + // Get a list of the parent item's skill categories for the dropdown var owned_skillcats = this.prepareSkillCategoryValues(); @@ -38,7 +41,8 @@ export default class RMSSSkillSheet extends ItemSheet { config: CONFIG.rmss, owned_skillcats: owned_skillcats, enrichedDescription: enrichedDescription, - selected_skillcat: selected_skillcat + selected_skillcat: selected_skillcat, + designations: designations }; return sheetData; @@ -58,6 +62,16 @@ export default class RMSSSkillSheet extends ItemSheet { } } + getSkillDesignations(CONFIG) { + var designations = {}; + + // Get a list of designations from the config + for (const item in CONFIG.rmss.skill_designations) { + designations[CONFIG.rmss.skill_designations[item]] = CONFIG.rmss.skill_designations[item]; + } + return designations; + } + // Determine which Stat is selected and test that it is in the current list of categories. prepareSelectedSkillCategory(ownedskillcats, selected_category) { diff --git a/rmss/rmss.js b/rmss/rmss.js index 6f61877..775ee3d 100644 --- a/rmss/rmss.js +++ b/rmss/rmss.js @@ -35,8 +35,8 @@ async function preloadHandlebarsTemplates() { "systems/rmss/templates/sheets/actors/parts/actor-fav-skills.html", "systems/rmss/templates/sheets/actors/parts/actor-items.html", "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" + "systems/rmss/templates/sheets/actors/parts/actor-skill-categories.html", + "systems/rmss/templates/sheets/actors/parts/actor-skills.html" ]; return loadTemplates(templatePaths); } diff --git a/rmss/template.json b/rmss/template.json index 33f71c5..97029bb 100644 --- a/rmss/template.json +++ b/rmss/template.json @@ -81,92 +81,92 @@ "stats": { "agility": { "shortname": "Ag", - "temp": 1, - "potential": 2, - "basic_bonus": 3, - "racial_bonus": 4, - "special_bonus": 5, + "temp": 0, + "potential": 0, + "basic_bonus": 0, + "racial_bonus": 0, + "special_bonus": 0, "stat_bonus": 0 }, "constitution": { "shortname": "Co", - "temp": 6, - "potential": 7, - "basic_bonus": 8, - "racial_bonus": 9, - "special_bonus": 10, + "temp": 0, + "potential": 0, + "basic_bonus": 0, + "racial_bonus": 0, + "special_bonus": 0, "stat_bonus": 0 }, "memory": { "shortname": "Me", - "temp": 11, - "potential": 12, - "basic_bonus": 13, - "racial_bonus": 14, - "special_bonus": 15, + "temp": 0, + "potential": 0, + "basic_bonus": 0, + "racial_bonus": 0, + "special_bonus": 0, "stat_bonus": 0 }, "reasoning": { "shortname": "Re", - "temp": 16, - "potential": 17, - "basic_bonus": 18, - "racial_bonus": 19, - "special_bonus": 20, + "temp": 0, + "potential": 0, + "basic_bonus": 0, + "racial_bonus": 0, + "special_bonus": 0, "stat_bonus": 0 }, "self_discipline": { "shortname": "SD", - "temp": 21, - "potential": 22, - "basic_bonus": 23, - "racial_bonus": 24, - "special_bonus": 25, + "temp": 0, + "potential": 0, + "basic_bonus": 0, + "racial_bonus": 0, + "special_bonus": 0, "stat_bonus": 0 }, "empathy": { "shortname": "Em", - "temp": 26, - "potential": 27, - "basic_bonus": 28, - "racial_bonus": 29, - "special_bonus": 30, + "temp": 0, + "potential": 0, + "basic_bonus": 0, + "racial_bonus": 0, + "special_bonus": 0, "stat_bonus": 0 }, "intuition": { "shortname": "In", - "temp": 31, - "potential": 32, - "basic_bonus": 33, - "racial_bonus": 34, - "special_bonus": 35, + "temp": 0, + "potential": 0, + "basic_bonus": 0, + "racial_bonus": 0, + "special_bonus": 0, "stat_bonus": 0 }, "presence": { "shortname": "Pr", - "temp": 36, - "potential": 37, - "basic_bonus": 38, - "racial_bonus": 39, - "special_bonus": 40, + "temp": 0, + "potential": 0, + "basic_bonus": 0, + "racial_bonus": 0, + "special_bonus": 0, "stat_bonus": 0 }, "quickness": { "shortname": "Qu", - "temp": 41, - "potential": 42, - "basic_bonus": 43, - "racial_bonus": 44, - "special_bonus": 45, + "temp": 0, + "potential": 0, + "basic_bonus": 0, + "racial_bonus": 0, + "special_bonus": 0, "stat_bonus": 0 }, "strength": { "shortname": "St", - "temp": 46, - "potential": 47, - "basic_bonus": 48, - "racial_bonus": 49, - "special_bonus": 50, + "temp": 0, + "potential": 0, + "basic_bonus": 0, + "racial_bonus": 0, + "special_bonus": 0, "stat_bonus": 0 } } @@ -266,24 +266,25 @@ "category" : "", "ranks": 0, "new_ranks": 0, - "rank_bonus": 0, + "rank_bonus": -15, "category_bonus": 0, "item_bonus": 0, "special_bonus_1": 0, "special_bonus_2": 0, "total_bonus": 0, - "favorite": false + "favorite": false, + "designation": "None" }, "skill_category": { "templates": ["base"], - "applicable_stats": "St/Ag/St", + "applicable_stats": "None", "app_stat_1": "None", "app_stat_2": "None", "app_stat_3": "None", "development_cost": "0", "ranks": 0, "new_ranks": 0, - "rank_bonus": 0, + "rank_bonus": -15, "stat_bonus": 0, "prof_bonus": 0, "special_bonus_1": 0, diff --git a/rmss/templates/sheets/actors/parts/actor-skill-categories.html b/rmss/templates/sheets/actors/parts/actor-skill-categories.html index c10754a..28c4b3b 100644 --- a/rmss/templates/sheets/actors/parts/actor-skill-categories.html +++ b/rmss/templates/sheets/actors/parts/actor-skill-categories.html @@ -1,35 +1,33 @@ -
{{ localize "rmss.pc_sheet_skill_categories.skillcat_name" }} |
- {{ localize "rmss.pc_sheet_skill_categories.applicable_stats" }} |
- {{ localize "rmss.pc_sheet_skill_categories.dev_cost" }} |
- {{ localize "rmss.pc_sheet_skill_categories.ranks" }} |
- {{ localize "rmss.pc_sheet_skill_categories.new_ranks" }} |
- {{ localize "rmss.pc_sheet_skill_categories.rank_bonus" }} |
- {{ localize "rmss.pc_sheet_skill_categories.stat_bonus" }} |
- {{ localize "rmss.pc_sheet_skill_categories.prof_bonus" }} |
- {{ localize "rmss.pc_sheet_skill_categories.special_bonus" }} |
- {{ localize "rmss.pc_sheet_skill_categories.special_bonus" }} |
- {{ localize "rmss.pc_sheet_skill_categories.total_bonus" }} |
- + |
---|---|---|---|---|---|---|---|---|---|---|---|
{{skill_category.name}} |
- {{skill_category.system.applicable_stats}} |
- {{skill_category.system.development_cost}} |
- {{skill_category.system.ranks}} |
- {{skill_category.system.new_ranks}} |
- {{skill_category.system.rank_bonus}} |
- {{skill_category.system.stat_bonus}} |
- {{skill_category.system.prof_bonus}} |
- {{skill_category.system.special_bonus_1}} |
- {{skill_category.system.special_bonus_2}} |
- {{skill_category.system.total_bonus}} |
- - |
{{ localize "rmss.pc_sheet_skills.favorite" }} |
- {{ localize "rmss.pc_sheet_skills.skill_name" }} |
- {{ localize "rmss.pc_sheet_skills.ranks" }} |
- {{ localize "rmss.pc_sheet_skills.new_ranks" }} |
- {{ localize "rmss.pc_sheet_skills.rank_bonus" }} |
- {{ localize "rmss.pc_sheet_skills.category_bonus" }} |
- {{ localize "rmss.pc_sheet_skills.item_bonus" }} |
- {{ localize "rmss.pc_sheet_skills.special_bonus" }} |
- {{ localize "rmss.pc_sheet_skills.special_bonus" }} |
- {{ localize "rmss.pc_sheet_skills.total_bonus" }} |
- + |
---|---|---|---|---|---|---|---|---|---|---|
- |
- {{skill.name}}- |
- {{skill.system.ranks}} |
- {{skill.system.new_ranks}} |
- {{skill.system.rank_bonus}} |
- {{skill.system.category_bonus}} |
- {{skill.system.item_bonus}} |
- {{skill.system.special_bonus_1}} |
- {{skill.system.special_bonus_2}} |
- {{skill.system.total_bonus}} |
- - |