From da9a69b916e56c915828c97502e1b4f7fa406a71 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Mon, 3 Mar 2025 23:35:22 +0100 Subject: [PATCH] Fix char sheet iteration --- css/fvtt-ftl-nomad.css | 26 +- fvtt-ftl-nomad.mjs | 2 +- lang/en.json | 765 +++++++++--------- .../applications/sheets/character-sheet.mjs | 94 +-- module/config/system.mjs | 2 +- styles/character.less | 12 +- templates/character-biography.hbs | 57 +- templates/character-equipment.hbs | 61 +- templates/character-main.hbs | 179 ++-- templates/character-skills.hbs | 25 - templates/character-status.hbs | 95 --- 11 files changed, 493 insertions(+), 825 deletions(-) delete mode 100644 templates/character-skills.hbs delete mode 100644 templates/character-status.hbs diff --git a/css/fvtt-ftl-nomad.css b/css/fvtt-ftl-nomad.css index 7c73686..c17a149 100644 --- a/css/fvtt-ftl-nomad.css +++ b/css/fvtt-ftl-nomad.css @@ -323,46 +323,46 @@ i.fvtt-ftl-nomad { .fvtt-ftl-nomad .character-main .character-pc-edit { min-width: 650px; } -.fvtt-ftl-nomad .character-main .character-characteristics { +.fvtt-ftl-nomad .character-main .character-skills { background-color: var(--color-light-1); display: flex; flex-direction: column; gap: 5px; flex: 1; } -.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic { +.fvtt-ftl-nomad .character-main .character-skills .character-skill { display: flex; align-items: center; } -.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .rollable:hover, -.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .rollable:focus { +.fvtt-ftl-nomad .character-main .character-skills .character-skill .rollable:hover, +.fvtt-ftl-nomad .character-main .character-skills .character-skill .rollable:focus { text-shadow: 0 0 8px var(--color-shadow-primary); cursor: pointer; } -.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .rollable { - min-width: 3rem; - max-width: 3rem; +.fvtt-ftl-nomad .character-main .character-skills .character-skill .rollable { + min-width: 4.5rem; + max-width: 4.5rem; } -.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .char-text { +.fvtt-ftl-nomad .character-main .character-skills .character-skill .char-text { margin-left: 0.5rem; } -.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .d100 { +.fvtt-ftl-nomad .character-main .character-skills .character-skill .d100 { flex: 0; max-width: 0.6rem; } -.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .form-group { +.fvtt-ftl-nomad .character-main .character-skills .character-skill .form-group { flex: 0; padding-left: 5px; } -.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .form-group .form-fields { +.fvtt-ftl-nomad .character-main .character-skills .character-skill .form-group .form-fields { font-size: 1.1rem; flex: none; width: 40px; } -.fvtt-ftl-nomad .character-main .character-characteristic-play { +.fvtt-ftl-nomad .character-main .character-skill-play { min-width: 225px; } -.fvtt-ftl-nomad .character-main .character-characteristic-edit { +.fvtt-ftl-nomad .character-main .character-skill-edit { min-width: 400px; } .fvtt-ftl-nomad .character-biography { diff --git a/fvtt-ftl-nomad.mjs b/fvtt-ftl-nomad.mjs index d44808b..4915999 100644 --- a/fvtt-ftl-nomad.mjs +++ b/fvtt-ftl-nomad.mjs @@ -32,7 +32,7 @@ Hooks.once("init", function () { CONFIG.Actor.documentClass = documents.FTLNomadActor CONFIG.Actor.dataModels = { - protagonist: models.FTLNomadCharacter, + character: models.FTLNomadCharacter, vehicle: models.FTLNomadVehicle, creature: models.FTLNomadCreature, starship: models.FTLNomadStarship diff --git a/lang/en.json b/lang/en.json index 8d65e2d..91bb11b 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1,323 +1,168 @@ { - "TYPES": { - "Actor": { - "character": "Character", - "vehicle": "Vehicle", - "creature": "Creature", - "starship": "Starship" - }, - "Item": { - "weapon": "Weapon", - "armor": "Armor", - "equipment": "Equipment", - "psionic": "Psionic", - "talent": "Talent", - "creature-trait": "Creature Trait", - "creature-ability": "Creature Ability", - "implant": "Implant", - "language": "Language" - } - }, "FTLNOMAD": { - "TechAge": { - "NoTech": "No Tech", - "EarlyPrimitive": "Early Primitive", - "LatePrimitive": "Late Primitive", - "EarlyMechanical": "Early Mechanical", - "LateMechanical": "Late Mechanical", - "EarlyAtomic": "Early Atomic", - "LateAtomic": "Late Atomic", - "EarlySpace" : "Early Space", - "LateSpace" : "Late Space", - "EarlyInterstellar" : "Early Interstellar", - "LateInterstellar" : "Late Interstellar", - "EarlyGalactic" : "Early Galactic", - "LateGalactic" : "Late Galactic", - "Cosmic" : "Cosmic" - }, - "Character": { - "FIELDS": { - "concept": { - "label": "Concept" - }, - "age": { - "label": "Age" - }, - "gender": { - "label": "Gender" - }, - "hair": { - "label": "Hair" - }, - "eyes": { - "label": "Eyes" - }, - "height": { - "label": "Height" - }, - "home": { - "label": "Home" - }, - "birthplace": { - "label": "Birthplace" - }, - "skills:": { - "str": { - "label": "Strength" - }, - "dex": { - "label": "Dexterity" - }, - "int": { - "label": "Intelligence" - }, - "pow": { - "label": "Power" - }, - "con": { - "label": "Constitution" - }, - "char": { - "label": "Charisma" - } - } - } - }, - "Creature": { - "FIELDS": { - "damageBonus": { - "label": "Dmg.Bonus" - }, - "resources": { - "permanentRating": { - "label": "Permanent Rating" - }, - "hand": { - "label": "Hand" - }, - "stowed": { - "label": "Stowed" - }, - "storage": { - "label": "Storage" - } - }, - "biodata": { - "feature": { - "label": "Feature" - }, - "adaptedToViolence": { - "label": "Adapted to violence" - }, - "adaptedToHelplessness": { - "label": "Adapted to helplessness" - }, - "harshness": { - "label": "Harshness" - }, - "age": { - "label": "Age" - }, - "gender": { - "label": "Gender" - }, - "hair": { - "label": "Hair" - }, - "eyes": { - "label": "Eyes" - }, - "height": { - "label": "Height" - }, - "home": { - "label": "Home" - }, - "birthplace": { - "label": "Birthplace" - }, - "label": "Biodata" - }, - "characteristics:": { - "str": { - "label": "Strength" - }, - "dex": { - "label": "Dexterity" - }, - "int": { - "label": "Intelligence" - }, - "pow": { - "label": "Power" - }, - "con": { - "label": "Constitution" - }, - "char": { - "label": "Charisma" - } - } - } - }, - "Skill": { - "Unnatural": "Unnatural", - "Melee": "Melee Weapons", - "Firearms": "Firearms", - "Athletics": "Athletics", - "UnarmedCombat": "Unarmed Combat", - "RangedWeapons": "Ranged Weapons", - "FirearmsBeams": "Firearms / Beam Weapons", - "FIELDS": { - "isAdversary": { - "label": "Adversary" - }, - "settings": { - "label": "Settings era" - }, - "diceEvolved": { - "label": "Can increase on failure" - }, - "bonus" :{ - "label": "Bonus" - }, - "base": { - "label": "Base" - }, - "rollFailed": { - "label": "Roll Failed" - }, - "description": { - "label": "Description" - } - } - }, - "Equipment": { - "FIELDS": { - "techAge": { - "label": "Tech Age" - }, - "description": { - "label": "Description" - }, - "enc": { - "label": "Enc" - }, - "cost": { - "label": "Cost" - } - } - }, - "Psionic": { - "FIELDS": { - "description": { - "label": "Description" - }, - "isAdvantage" :{ - "label": "Provide advantage" - } - } - }, - "Weapon": { - "Types": { - "Melee": "Melee", - "Projectile": "Projectile", - "Energy": "Energy", - "Heavy": "Heavy", - "Grenade": "Grenade/Explosive", - "Vehicle": "Vehicle" - }, - "Range": { - "Melee": "Melee", - "Handgun": "Handgun", - "Rifle": "Rifle", - "LongRange": "Long Range" - }, - "FIELDS": { - "techAge": { - "label": "Tech Age" - }, - "rangeType": { - "label": "Range" - }, - "weaponType": { - "label": "Type" - }, - "damage": { - "label": "Damage" - }, - "enc": { - "label": "Enc" - }, - "cost": { - "label": "Cost" - }, - "description": { - "label": "Description" - } - } - }, "Armor": { "FIELDS": { - "techAge": { - "label": "Tech Age" + "cost": { + "label": "Cost" + }, + "description": { + "label": "Description" + }, + "enc": { + "label": "Enc" }, "protection": { "label": "Protection" }, - "description": { - "label": "Description" - }, - "enc": { - "label": "Enc" - }, - "cost": { - "label": "Cost" + "techAge": { + "label": "Tech Age" } } }, - "Language": { + "Character": { "FIELDS": { - "description": { - "label": "Description" + "age": { + "label": "Age" + }, + "birthplace": { + "label": "Birthplace" + }, + "concept": { + "label": "Concept" + }, + "species": { + "label": "Species" + }, + "archetype": { + "label": "Archetype" + }, + "eyes": { + "label": "Eyes" + }, + "gender": { + "label": "Gender" + }, + "hair": { + "label": "Hair" + }, + "height": { + "label": "Height" + }, + "home": { + "label": "Home" + }, + "health": { + "staminaValue": { + "label": "Current" + }, + "staminaMax": { + "label": "Max" + }, + "wounds": { + "label": "Wounds" + }, + "label": "Stamina" + }, + "skills:": { + "combat": { + "label": "Combat" + }, + "knowledge": { + "label": "Knowledge" + }, + "physical": { + "label": "Physical" + }, + "social": { + "label": "Social" + }, + "stealth": { + "label": "Stealth" + }, + "technology": { + "label": "Technology" + }, + "vehicles": { + "label": "Vehicles" + } } } }, - "Vehicle": { + "Chat": {}, + "Creature": { "FIELDS": { - "description": { - "label": "Description" + "biodata": { + "adaptedToHelplessness": { + "label": "Adapted to helplessness" + }, + "adaptedToViolence": { + "label": "Adapted to violence" + }, + "age": { + "label": "Age" + }, + "birthplace": { + "label": "Birthplace" + }, + "eyes": { + "label": "Eyes" + }, + "feature": { + "label": "Feature" + }, + "gender": { + "label": "Gender" + }, + "hair": { + "label": "Hair" + }, + "harshness": { + "label": "Harshness" + }, + "height": { + "label": "Height" + }, + "home": { + "label": "Home" + }, + "label": "Biodata" }, - "notes": { - "label": "Notes" + "characteristics:": { + "char": { + "label": "Charisma" + }, + "con": { + "label": "Constitution" + }, + "dex": { + "label": "Dexterity" + }, + "int": { + "label": "Intelligence" + }, + "pow": { + "label": "Power" + }, + "str": { + "label": "Strength" + } }, - "surfaceSpeed": { - "label": "Surface Speed" + "damageBonus": { + "label": "Dmg.Bonus" }, - "airSpeed": { - "label": "Air Speed" - }, - "armor": { - "label": "Armor" - }, - "settings": { - "label": "Settings era" - }, - "crew": { - "label": "Crew" - }, - "state": { - "label": "State" - } - } - }, - "CreatureTrait": { - "FIELDS": { - "description": { - "label": "Description" - }, - "isAdvantage": { - "label": "Provide advantage" + "resources": { + "hand": { + "label": "Hand" + }, + "permanentRating": { + "label": "Permanent Rating" + }, + "storage": { + "label": "Storage" + }, + "stowed": { + "label": "Stowed" + } } } }, @@ -331,10 +176,23 @@ } } }, - "Implant": { + "CreatureTrait": { "FIELDS": { - "techAge": { - "label": "Tech Age" + "description": { + "label": "Description" + }, + "isAdvantage": { + "label": "Provide advantage" + } + } + }, + "Delete": "Delete", + "Dialog": {}, + "Edit": "Edit", + "Equipment": { + "FIELDS": { + "cost": { + "label": "Cost" }, "description": { "label": "Description" @@ -342,91 +200,260 @@ "enc": { "label": "Enc" }, - "cost": { - "label": "Cost" + "techAge": { + "label": "Tech Age" } } }, - "Starship": { + "Implant": { "FIELDS": { - "value": { - "label": "Value" + "cost": { + "label": "Cost" }, "description": { "label": "Description" + }, + "enc": { + "label": "Enc" + }, + "techAge": { + "label": "Tech Age" + } + } + }, + "Label": { + "combat": "Combat", + "physical": "Physical", + "social": "Social", + "stealth": "Stealth", + "technology": "Technology", + "vehicles": "Vehicles", + "knowledge": "Knowledge", + "Stamina": "Stamina", + "equipments": "Equipment", + "Rank": "Rank", + "HP": "HP", + "Unarmed": "Unarmed", + "Vehicle": "Vehicle", + "armor": "Armor", + "armors": "Armors", + "biodata": "Biodata", + "biography": "Biography", + "character": "Character", + "creature": "Creature", + "criticalFailure": "Critical Failure", + "criticalSuccess": "Critical Success", + "current": "Current", + "damage": "Damage", + "damageShort": "Dmg", + "description": "Description", + "equipment": "Equipment", + "experience": "Experience", + "failure": "Failure", + "finalScore": "Final Score", + "languages": "Languages", + "malus": "Malus", + "max": "Max", + "maximum": "Maximum", + "modifier": "Modifier", + "multiplier": "Multiplier", + "newArmor": "New Armor", + "newWeapon": "New Weapon", + "notes": "Notes", + "psionics": "Psionics", + "rollView": "Roll View", + "skill": "Skill", + "skillRoll": "Skill Roll", + "skills": "Skills", + "status": "Status", + "success": "Success", + "talents": "Talents", + "targetScore": "Target Score", + "titleSkill": "Skill Roll", + "titleWeapon": "Weapon Roll", + "total": "Total", + "totalScore": "Total Score", + "weapons": "Weapons" + }, + "Language": { + "FIELDS": { + "description": { + "label": "Description" + } + } + }, + "Notifications": {}, + "Psionic": { + "FIELDS": { + "description": { + "label": "Description" + }, + "isAdvantage": { + "label": "Provide advantage" + } + } + }, + "Roll": { + "cancel": "Cancel", + "roll": "Roll", + "skill": "Skill" + }, + "Skill": { + "Athletics": "Athletics", + "FIELDS": { + "base": { + "label": "Base" + }, + "bonus": { + "label": "Bonus" + }, + "description": { + "label": "Description" + }, + "diceEvolved": { + "label": "Can increase on failure" + }, + "isAdversary": { + "label": "Adversary" + }, + "rollFailed": { + "label": "Roll Failed" + }, + "settings": { + "label": "Settings era" + } + }, + "Firearms": "Firearms", + "FirearmsBeams": "Firearms / Beam Weapons", + "Melee": "Melee Weapons", + "RangedWeapons": "Ranged Weapons", + "UnarmedCombat": "Unarmed Combat", + "Unnatural": "Unnatural" + }, + "Starship": { + "FIELDS": { + "description": { + "label": "Description" + }, + "value": { + "label": "Value" } } }, "Talent": { "FIELDS": { - "isAdvantage": { - "label": "Provide advantage" - }, "description": { "label": "Description" + }, + "isAdvantage": { + "label": "Provide advantage" } } }, - "Label": { - "creature": "Creature", - "Unarmed": "Unarmed", - "multiplier": "Multiplier", - "Vehicle": "Vehicle", - "titleSkill": "Skill Roll", - "titleWeapon": "Weapon Roll", - "biodata": "Biodata", - "skill": "Skill", - "modifier": "Modifier", - "rollView": "Roll View", - "character": "Character", - "description": "Description", - "total": "Total", - "skills": "Skills", - "damage": "Damage", - "armor": "Armor", - "malus": "Malus", - "experience": "Experience", - "maximum": "Maximum", - "equipment": "Equipment", - "biography": "Biography", - "notes": "Notes", - "weapons": "Weapons", - "HP": "HP", - "current": "Current", - "max": "Max", - "totalScore": "Total Score", - "skillRoll": "Skill Roll", - "finalScore": "Final Score", - "failure": "Failure", - "success": "Success", - "criticalSuccess": "Critical Success", - "criticalFailure": "Critical Failure", - "targetScore": "Target Score", - "armors": "Armors", - "psionics": "Psionics", - "talents": "Talents", - "languages": "Languages", - "damageShort": "Dmg", - "status": "Status", - "newWeapon": "New Weapon", - "newArmor": "New Armor" + "TechAge": { + "Cosmic": "Cosmic", + "EarlyAtomic": "Early Atomic", + "EarlyGalactic": "Early Galactic", + "EarlyInterstellar": "Early Interstellar", + "EarlyMechanical": "Early Mechanical", + "EarlyPrimitive": "Early Primitive", + "EarlySpace": "Early Space", + "LateAtomic": "Late Atomic", + "LateGalactic": "Late Galactic", + "LateInterstellar": "Late Interstellar", + "LateMechanical": "Late Mechanical", + "LatePrimitive": "Late Primitive", + "LateSpace": "Late Space", + "NoTech": "No Tech" }, - "Edit": "Edit", - "Delete": "Delete", "ToggleSheet": "Toggle Sheet", - "Warning": { }, - "Dialog": { + "Tooltip": {}, + "Vehicle": { + "FIELDS": { + "airSpeed": { + "label": "Air Speed" + }, + "armor": { + "label": "Armor" + }, + "crew": { + "label": "Crew" + }, + "description": { + "label": "Description" + }, + "notes": { + "label": "Notes" + }, + "settings": { + "label": "Settings era" + }, + "state": { + "label": "State" + }, + "surfaceSpeed": { + "label": "Surface Speed" + } + } }, - "Roll": { - "skill": "Skill", - "roll": "Roll", - "cancel": "Cancel" + "Warning": {}, + "Weapon": { + "FIELDS": { + "cost": { + "label": "Cost" + }, + "damage": { + "label": "Damage" + }, + "description": { + "label": "Description" + }, + "enc": { + "label": "Enc" + }, + "rangeType": { + "label": "Range" + }, + "techAge": { + "label": "Tech Age" + }, + "weaponType": { + "label": "Type" + } + }, + "Range": { + "Handgun": "Handgun", + "LongRange": "Long Range", + "Melee": "Melee", + "Rifle": "Rifle" + }, + "Types": { + "Energy": "Energy", + "Grenade": "Grenade/Explosive", + "Heavy": "Heavy", + "Melee": "Melee", + "Projectile": "Projectile", + "Vehicle": "Vehicle" + } + } + }, + "TYPES": { + "Actor": { + "character": "Character", + "creature": "Creature", + "starship": "Starship", + "vehicle": "Vehicle" }, - "Tooltip": { - }, - "Chat": { - }, - "Notifications": { + "Item": { + "armor": "Armor", + "creature-ability": "Creature Ability", + "creature-trait": "Creature Trait", + "equipment": "Equipment", + "implant": "Implant", + "language": "Language", + "psionic": "Psionic", + "talent": "Talent", + "weapon": "Weapon" } } -} +} \ No newline at end of file diff --git a/module/applications/sheets/character-sheet.mjs b/module/applications/sheets/character-sheet.mjs index 29dbf56..e53bb21 100644 --- a/module/applications/sheets/character-sheet.mjs +++ b/module/applications/sheets/character-sheet.mjs @@ -12,45 +12,31 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet { contentClasses: ["character-content"], }, actions: { - setBP: FTLNomadCharacterSheet.#onSetBP, createGear: FTLNomadCharacterSheet.#onCreateGear, createArmor: FTLNomadCharacterSheet.#onCreateArmor, - createWeapon: FTLNomadCharacterSheet.#onCreateWeapon, - createBond: FTLNomadCharacterSheet.#onCreateBond, - createInjury: FTLNomadCharacterSheet.#onCreateInjury, - createMentalDisorder: FTLNomadCharacterSheet.#onCreateMentalDisorder, - createMotivation: FTLNomadCharacterSheet.#onCreateMotivation, - createSkill: FTLNomadCharacterSheet.#onCreateSkill, - createRitual: FTLNomadCharacterSheet.#onCreateRitual, - createTome: FTLNomadCharacterSheet.#onCreateTome, + createWeapon: FTLNomadCharacterSheet.#onCreateWeapon }, } /** @override */ static PARTS = { main: { - template: "systems/fvtt-ftl-nomad/templates/protagonist-main.hbs", + template: "systems/fvtt-ftl-nomad/templates/character-main.hbs", }, tabs: { template: "templates/generic/tab-navigation.hbs", }, - skills: { - template: "systems/fvtt-ftl-nomad/templates/protagonist-skills.hbs", - }, - status: { - template: "systems/fvtt-ftl-nomad/templates/protagonist-status.hbs", - }, equipment: { - template: "systems/fvtt-ftl-nomad/templates/protagonist-equipment.hbs", + template: "systems/fvtt-ftl-nomad/templates/character-equipment.hbs", }, biography: { - template: "systems/fvtt-ftl-nomad/templates/protagonist-biography.hbs", + template: "systems/fvtt-ftl-nomad/templates/character-biography.hbs", }, } /** @override */ tabGroups = { - sheet: "skills", + sheet: "main", } /** @@ -59,8 +45,6 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet { */ #getTabs() { const tabs = { - skills: { id: "skills", group: "sheet", icon: "fa-solid fa-shapes", label: "FTLNOMAD.Label.skills" }, - status: { id: "status", group: "sheet", icon: "fa-solid fa-file-waveform", label: "FTLNOMAD.Label.status" }, equipment: { id: "equipment", group: "sheet", icon: "fa-solid fa-shapes", label: "FTLNOMAD.Label.equipment" }, biography: { id: "biography", group: "sheet", icon: "fa-solid fa-book", label: "FTLNOMAD.Label.biography" }, } @@ -79,15 +63,6 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet { context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true }) context.enrichedNotes = await TextEditor.enrichHTML(this.document.system.notes, { async: true }) - context.tooltipsCharacteristic = { - str: game.i18n.localize("FTLNOMAD.Characteristic.Str"), - dex: game.i18n.localize("FTLNOMAD.Characteristic.Dex"), - con: game.i18n.localize("FTLNOMAD.Characteristic.Con"), - int: game.i18n.localize("FTLNOMAD.Characteristic.Int"), - pow: game.i18n.localize("FTLNOMAD.Characteristic.Pow"), - cha: game.i18n.localize("FTLNOMAD.Characteristic.Cha") - } - return context } @@ -97,34 +72,14 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet { switch (partId) { case "main": break - case "skills": - context.tab = context.tabs.skills - context.skills = doc.itemTypes.skill - context.skills.sort((a, b) => a.name.localeCompare(b.name)) - break case "equipment": context.tab = context.tabs.equipment context.weapons = doc.itemTypes.weapon context.weapons.sort((a, b) => a.name.localeCompare(b.name)) context.armors = doc.itemTypes.armor context.armors.sort((a, b) => a.name.localeCompare(b.name)) - context.gears = doc.itemTypes.gear - context.gears.sort((a, b) => a.name.localeCompare(b.name)) - context.rituals = doc.itemTypes.ritual - context.rituals.sort((a, b) => a.name.localeCompare(b.name)) - context.tomes = doc.itemTypes.tome - context.tomes.sort((a, b) => a.name.localeCompare(b.name)) - break - case "status": - context.tab = context.tabs.status - context.injuries = doc.itemTypes.injury - context.injuries.sort((a, b) => a.name.localeCompare(b.name)) - context.mentaldisorders = doc.itemTypes.mentaldisorder - context.mentaldisorders.sort((a, b) => a.name.localeCompare(b.name)) - context.motivations = doc.itemTypes.motivation - context.motivations.sort((a, b) => a.name.localeCompare(b.name)) - context.bonds = doc.itemTypes.bond - context.bonds.sort((a, b) => a.name.localeCompare(b.name)) + context.equipments = doc.itemTypes.equipment + context.equipments.sort((a, b) => a.name.localeCompare(b.name)) break case "biography": context.tab = context.tabs.biography @@ -135,14 +90,6 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet { return context } - /** - * Creates a new attack item directly from the sheet and embeds it into the document. - * @param {Event} event The initiating click event. - * @param {HTMLElement} target The current target of the event listener. - */ - static #onSetBP(event, target) { - this.document.system.setBP() - } static #onCreateGear(event, target) { this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newGear"), type: "gear" }]) @@ -156,33 +103,6 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet { this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newArmor"), type: "armor" }]) } - static #onCreateBond(event, target) { - this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newBond"), type: "bond" }]) - } - - static #onCreateInjury(event, target) { - this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newInjury"), type: "injury" }]) - } - - static #onCreateMentalDisorder(event, target) { - this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newMentalDisorder"), type: "mentaldisorder" }]) - } - - static #onCreateMotivation(event, target) { - this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newMotivation"), type: "motivation" }]) - } - - static #onCreateSkill(event, target) { - this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newSkill"), type: "skill" }]) - } - - static #onCreateRitual(event, target) { - this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newRitual"), type: "ritual" }]) - } - - static #onCreateTome(event, target) { - this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newTome"), type: "tome" }]) - } /** * Handles the roll action triggered by user interaction. diff --git a/module/config/system.mjs b/module/config/system.mjs index 72bc07b..e1005fc 100644 --- a/module/config/system.mjs +++ b/module/config/system.mjs @@ -20,7 +20,7 @@ export const SKILLS = { "social": { id: "social", label: "FTLNOMAD.Skill.Social" }, "physical": { id: "physical", label: "FTLNOMAD.Skill.Physical" }, "stealth": { id: "stealth", label: "FTLNOMAD.Skill.Stealth" }, - "vehicles": { id: "vehicle", label: "FTLNOMAD.Skill.Vehicles" }, + "vehicles": { id: "vehicles", label: "FTLNOMAD.Skill.Vehicles" }, "technology": { id: "technology", label: "FTLNOMAD.Skill.Technology" } } diff --git a/styles/character.less b/styles/character.less index 31a904c..f74ae14 100644 --- a/styles/character.less +++ b/styles/character.less @@ -180,14 +180,14 @@ min-width: 650px; } - .character-characteristics { + .character-skills { background-color: var(--color-light-1); display: flex; flex-direction: column; gap: 5px; flex: 1; - .character-characteristic { + .character-skill { display: flex; align-items: center; .rollable:hover, @@ -196,8 +196,8 @@ cursor: pointer; } .rollable { - min-width: 3rem; - max-width: 3rem; + min-width: 4.5rem; + max-width: 4.5rem; } .char-text { margin-left: 0.5rem; @@ -218,11 +218,11 @@ } } - .character-characteristic-play { + .character-skill-play { min-width: 225px; } - .character-characteristic-edit { + .character-skill-edit { min-width: 400px; } } diff --git a/templates/character-biography.hbs b/templates/character-biography.hbs index 5b07cdc..68ac23e 100644 --- a/templates/character-biography.hbs +++ b/templates/character-biography.hbs @@ -1,72 +1,19 @@ -
+
{{localize "FTLNOMAD.Label.resources"}}
- {{formField systemFields.resources.fields.permanentRating value=system.resources.permanentRating name="system.resources.permanentRating" localize=true}} -
- {{localize "FTLNOMAD.Label.resourceChecks"}} - {{#each system.resources.checks as |check idx|}} - - {{/each}} -
- - {{formField systemFields.resources.fields.hand value=system.resources.hand name="system.resources.hand" localize=true disabled=true}} - {{formField systemFields.resources.fields.stowed value=system.resources.stowed name="system.resources.stowed" localize=true disabled=true}} - {{formField systemFields.resources.fields.storage value=system.resources.storage name="system.resources.storage" localize=true disabled=true}} -
+
{{localize "FTLNOMAD.Label.biodata"}}
- {{formField systemFields.biodata.fields.adaptedToViolence value=system.biodata.adaptedToViolence name="system.biodata.adaptedToViolence" localize=true}} - {{formField systemFields.biodata.fields.adaptedToHelplessness value=system.biodata.adaptedToHelplessness name="system.biodata.adaptedToHelplessness" localize=true}}
- {{formField systemFields.biodata.fields.harshness value=system.biodata.harshness name="system.biodata.harshness" localize=true}} - {{formField systemFields.biodata.fields.age value=system.biodata.age name="system.biodata.age" localize=true classes="field-label"}} - {{formField systemFields.biodata.fields.gender value=system.biodata.gender name="system.biodata.gender" localize=true classes="field-label"}} - {{formField systemFields.biodata.fields.height value=system.biodata.height name="system.biodata.height" localize=true classes="field-label"}} - {{formField systemFields.biodata.fields.eyes value=system.biodata.eyes name="system.biodata.eyes" localize=true classes="field-label"}} - {{formField systemFields.biodata.fields.hair value=system.biodata.hair name="system.biodata.hair" localize=true classes="field-label"}} - {{formField systemFields.biodata.fields.home value=system.biodata.home name="system.biodata.home" localize=true classes="field-label"}} - {{formField systemFields.biodata.fields.birthplace value=system.biodata.birthplace name="system.biodata.birthplace" localize=true classes="field-label"}}
-
- {{localize "FTLNOMAD.Label.distinguishingFeatures"}} -
-
- - {{formInput systemFields.characteristics.fields.str.fields.feature value=system.characteristics.str.feature localize=true}} -
-
- - {{formInput systemFields.characteristics.fields.dex.fields.feature value=system.characteristics.dex.feature localize=true}} -
-
- - {{formInput systemFields.characteristics.fields.con.fields.feature value=system.characteristics.con.feature localize=true}} -
-
- - {{formInput systemFields.characteristics.fields.int.fields.feature value=system.characteristics.int.feature localize=true}} -
-
- - {{formInput systemFields.characteristics.fields.pow.fields.feature value=system.characteristics.pow.feature localize=true}} -
-
- - {{formInput systemFields.characteristics.fields.cha.fields.feature value=system.characteristics.cha.feature localize=true}} -
-
-
- -
{{localize "FTLNOMAD.Label.description"}} {{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}} diff --git a/templates/character-equipment.hbs b/templates/character-equipment.hbs index 727e001..70e3a0c 100644 --- a/templates/character-equipment.hbs +++ b/templates/character-equipment.hbs @@ -1,4 +1,4 @@ -
+
{{localize "FTLNOMAD.Label.weapons"}}{{#if isEditMode}} @@ -58,14 +58,14 @@
- {{localize "FTLNOMAD.Label.gears"}}{{#if isEditMode}} + {{localize "FTLNOMAD.Label.equipments"}}{{#if isEditMode}} {{/if}} -
- {{#each gears as |item|}} +
+ {{#each equipments as |item|}} {{!log 'armor' this}} -
+
{{item.name}} @@ -81,55 +81,4 @@
- {{#if (count tomes)}} -
- {{localize "FTLNOMAD.Label.Tomes"}}{{#if isEditMode}} - {{/if}} - -
- {{#each tomes as |item|}} -
- -
- {{item.name}} -
-
- - -
-
- {{/each}} -
-
- {{/if}} - - {{#if (count rituals)}} -
- {{localize "FTLNOMAD.Label.Rituals"}}{{#if isEditMode}} - {{/if}} - -
- {{#each rituals as |item|}} -
- -
- {{item.name}} -
-
- - -
-
- {{/each}} -
-
- {{/if}} - -
\ No newline at end of file diff --git a/templates/character-main.hbs b/templates/character-main.hbs index 9a4a3ee..79052da 100644 --- a/templates/character-main.hbs +++ b/templates/character-main.hbs @@ -1,155 +1,100 @@ -
- {{!log "protagonist-main" this}} - +
+ {{!log "character-main" this}}
- {{localize "FTLNOMAD.Label.protagonist"}} -
-
-
- {{localize "FTLNOMAD.Label.character"}} +
+
+
+
-
- {{localize "FTLNOMAD.Label.HP"}} +
+ {{localize "FTLNOMAD.Label.Stamina"}}
- {{formField systemFields.hp.fields.value value=system.hp.value}} + {{formField systemFields.health.fields.staminaValue value=health.staminaValue}} / - {{formField systemFields.hp.fields.max value=system.hp.max rootId=partId disabled=true}} + {{formField systemFields.health.fields.staminaMax value=system.health.staminaMax rootId=partId + disabled=true}}
- {{formField systemFields.damageBonus value=system.damageBonus classes="damage-bonus"}} + {{formField systemFields.health.fields.wounds value=system.health.wounds }}
-
-
+
+
{{formInput fields.name value=source.name rootId=partId disabled=isPlayMode}} - +
- -
- {{localize "FTLNOMAD.Label.SAN"}} -
- - - {{formInput systemFields.san.fields.value value=system.san.value}} - - {{localize "FTLNOMAD.Label.recovery"}} - {{formInput systemFields.san.fields.recovery value=system.san.recovery disabled=true}} - - {{localize - "FTLNOMAD.Label.sanBPShort"}} - {{formInput systemFields.san.fields.breakingPoint value=system.san.breakingPoint disabled=true}} - -
- -
- -
- {{localize "FTLNOMAD.Label.max"}} - {{formInput systemFields.san.fields.max value=system.san.max rootId=partId disabled=true}} -
- - - {{localize "FTLNOMAD.Label.tempInsanity"}} - - {{formInput systemFields.san.fields.insanity value=system.san.insanity localize=true}} - - {{#if (not isPlayMode)}} - - {{/if}} - -
-
- - {{localize "FTLNOMAD.Label.violence"}} - {{#each system.san.violence as |violence idx|}} - - {{/each}} - - {{localize "FTLNOMAD.Label.helplessness"}} - {{#each system.san.helplessness as |helplessness idx|}} - - {{/each}} - -
- +
+ {{formField systemFields.concept value=system.concept rootId=partId disabled=isPlayMode}} + {{formField systemFields.species value=system.species rootId=partId disabled=isPlayMode}} + {{formField systemFields.archetype value=system.archetype rootId=partId disabled=isPlayMode}}
-
- {{localize "FTLNOMAD.Label.willpower"}} -
- - {{formInput systemFields.wp.fields.value value=system.wp.value}} - - {{formInput systemFields.wp.fields.max value=system.wp.max rootId=partId disabled=true}} - - {{formInput systemFields.wp.fields.exhausted value=system.wp.exhausted classes="checkbox"}} -
-
-
- {{localize "FTLNOMAD.Label.characteristics"}} -
- - - {{formField systemFields.characteristics.fields.str.fields.value value=system.characteristics.str.value + +
+ {{localize "FTLNOMAD.Label.skills"}} +
+ + + {{formField systemFields.skills.fields.combat.fields.value value=system.skills.combat.value rootId=partId disabled=isPlayMode }} -
-
- - - {{formField systemFields.characteristics.fields.dex.fields.value value=system.characteristics.dex.value +
+ + + {{formField systemFields.skills.fields.knowledge.fields.value value=system.skills.knowledge.value rootId=partId disabled=isPlayMode }} -
-
- - - {{formField systemFields.characteristics.fields.con.fields.value value=system.characteristics.con.value +
+ + + {{formField systemFields.skills.fields.social.fields.value value=system.skills.social.value rootId=partId disabled=isPlayMode }} -
-
- - - {{formField systemFields.characteristics.fields.int.fields.value value=system.characteristics.int.value +
+ + + {{formField systemFields.skills.fields.physical.fields.value value=system.skills.physical.value rootId=partId disabled=isPlayMode }} -
-
- - - {{formField systemFields.characteristics.fields.pow.fields.value value=system.characteristics.pow.value +
+ + + {{formField systemFields.skills.fields.stealth.fields.value value=system.skills.stealth.value rootId=partId disabled=isPlayMode }} -
-
- - - {{formField systemFields.characteristics.fields.cha.fields.value value=system.characteristics.cha.value +
+ + + {{formField systemFields.skills.fields.vehicles.fields.value value=system.skills.vehicles.value + rootId=partId disabled=isPlayMode }} +
+
+ + + {{formField systemFields.skills.fields.technology.fields.value value=system.skills.technology.value rootId=partId disabled=isPlayMode }} -
+ +
\ No newline at end of file diff --git a/templates/character-skills.hbs b/templates/character-skills.hbs deleted file mode 100644 index 3fe498d..0000000 --- a/templates/character-skills.hbs +++ /dev/null @@ -1,25 +0,0 @@ -
- {{log this}} -
- {{localize "FTLNOMAD.Label.skills"}} -
- {{#each skills as |item|}} -
- - -
{{item.name}} -
-
- {{item.system.skillTotal}} -
-
- - -
-
- {{/each}} -
-
- - -
\ No newline at end of file diff --git a/templates/character-status.hbs b/templates/character-status.hbs deleted file mode 100644 index 88e4eb9..0000000 --- a/templates/character-status.hbs +++ /dev/null @@ -1,95 +0,0 @@ -
- -
- {{localize "FTLNOMAD.Label.bonds"}}{{#if isEditMode}} - {{/if}} -
- {{#each bonds as |item|}} - {{!log 'weapon' this}} -
- -
- {{item.name}} -
-
- {{upperFirst item.system.bondType}} -
-
- {{item.system.value}} -
-
- - -
-
- {{/each}} -
-
- -
- {{localize "FTLNOMAD.Label.injuries"}}{{#if isEditMode}} - {{/if}} -
- {{#each injuries as |item|}} -
- -
- {{item.name}} -
-
- - -
-
- {{/each}} -
-
- -
- {{localize "FTLNOMAD.Label.mentaldisorders"}}{{#if isEditMode}} - {{/if}} -
- {{#each mentaldisorders as |item|}} - {{!log 'armor' this}} -
- -
- {{item.name}} -
-
- {{#if item.system.cured}} - {{localize 'FTLNOMAD.Label.Cured'}} - {{else}} - {{localize 'FTLNOMAD.Label.Uncured'}} - {{/if}} -
-
- - -
-
- {{/each}} -
-
- -
- {{localize "FTLNOMAD.Label.motivations"}}{{#if isEditMode}} - {{/if}} -
- {{#each motivations as |item|}} - {{!log 'armor' this}} -
- -
- {{item.name}} -
-
- - -
-
- {{/each}} -
-
- -
\ No newline at end of file