diff --git a/css/mosh.css b/css/mosh.css index 93e3c0d..834c7c0 100644 --- a/css/mosh.css +++ b/css/mosh.css @@ -1,4 +1,5 @@ @import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap"); +@import url('https://fonts.googleapis.com/css2?family=Hind:wght@300;400;500;600;700&display=swap'); @include-when-export url(https://fonts.loli.net/css?family=PT+Serif:400,400italic,700,700italic&subset=latin,cyrillic-ext,cyrillic,latin-ext); @@ -83,7 +84,7 @@ grid-column: span 2 / span 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; - margin: 10px 0; + /* margin: 10px 0; */ padding: 0; } .grid-1col { @@ -92,8 +93,7 @@ } .widegap { - gap: 30px; - padding: 6px; + gap: 16px; } .grid-3col { @@ -190,6 +190,14 @@ justify-content: space-between; } +.flex { + display: flex; + justify-content:space-evenly; + align-items: center; + flex: auto; +} + + /* Styles limited to mosh sheets */ .mosh .item-form { font-family: "Roboto", sans-serif; @@ -234,12 +242,11 @@ display: grid; grid-template-areas: 'header header header' - 'abilities centercol saves ' - 'abilities b saves'; + 'abilities centercol saves '; grid-gap: 10px; /* background-color: rgb(226, 226, 226); */ padding: 2px; - grid-template-columns: 256px auto 82px; + grid-template-columns: 238px auto 82px; } .mosh .abilities {grid-area: abilities;} @@ -247,7 +254,7 @@ .mosh .stress {grid-area: stress;} .mosh .health {grid-area: centercol;} -.mosh .healthspread {width:100px;} +.mosh .healthspread {width:96%;} .mosh .char-header h1.charname { height: auto; @@ -282,6 +289,13 @@ height: 100%; } +.sheet nav.sheet-tabs { + /* border-top: 2px solid black; + border-bottom: 2px solid black; */ + background: black; + color: white; +} + .mosh .tox .tox-editor-container { background: #fff; } @@ -290,10 +304,38 @@ padding: 0 8px; } +.mosh .origin { + width: 0; + height: 0; +} + +.mosh .seperatorLine{ + border-bottom: 2px solid #111; + height: 0; + width: 100%; +} + +.mosh .skill_training_frame{ + height: 47px; + background: rgb(230,230,230); + border-radius: 9px; + font-family: "Roboto", sans-serif; + font-size: 11pt; + font-weight: 400; + padding: 8px; +} +.mosh .skill_training_text{ + font-family: "Roboto", sans-serif; + font-size: 11pt; + font-weight: 500; + color: grey; +} + .mosh .resource-label { font-weight: bold; text-transform: uppercase; margin-bottom: 3px; + text-align: center; } .mosh .faded-label { @@ -400,6 +442,7 @@ padding-left: 8px; border-radius: 21px; text-align: center; + white-space: nowrap; } .mosh .items-list .item-controls { @@ -413,7 +456,7 @@ font-size: medium; font-weight: bold; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; - color: #111; + color: white; text-align: center; } @@ -441,37 +484,40 @@ } .mosh .mainstatmod-input { - margin-top: 13px; height: 26px; - width: 44px; - padding: 0; - border: 2px solid rgb(129, 129, 129); - border-radius: 0.1em 1em 0.11em; - font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; + width: 28px; + /* padding: 0; */ + border: 0; + border-radius: 7.7em; + color: rgb(151, 100, 100); font-size: 0.85rem; font-weight: bold; text-align: center; margin-left: -22px; z-index: 5; + background: white; + top: 7px; + left: 13px; + position: relative; + background: lightgrey; } .mosh .mainstatmod-title { position: relative; - font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; - font-size: 0.7rem; - color: rgb(77, 77, 77); + color: lightgrey; + font-size: 1rem; line-height: 1; - text-align: center; - font-weight: bold; text-transform: uppercase; - margin-left: -35px; + margin-left: -38px; pointer-events: none; + top: 13px; + left: 12px; } .mosh .maxhealth-input { margin: auto; border: 0px solid #111; - font-size: 1.8rem; + font-size: 1.5rem; font-weight: bold; text-align: center; background: transparent; @@ -485,50 +531,63 @@ color: rgb(56, 56, 56); } -.mosh .sizelarge{ - font-size: 1.1rem; +.mosh .whiteText{ + color: white; } -.mosh .minmaxwrapper{ - grid-column: 1/-1; - display: grid; - grid-template-columns: 1fr 1px 1fr; - align-items: start; - width: 145px; - height: 50px; - padding: 0; - border: 4px solid #111; - border-radius: 1.5em; - background: 0; +.mosh .sizelarge{ + font-size: 1.1rem; } .mosh .valuewrapper{ grid-column: 1/-1; display: grid; - width: 145px; - height: 50px; + align-items: start; + height: 40px; padding: 0; - border: 4px solid #111; + border: 2px solid #111; border-radius: 1.5em; background: 0; - margin-top: -15px; } +.mosh .armorWrapper{ + grid-column: 1/-1; + display: grid; + align-items: start; + height: 40px; + padding: 0; + border: 2px solid #111; + border-radius: 0.3em; + background: black; + width: 100%; +} + + .mosh .minmaxtopstat{ - width: 8.5rem; grid-template-columns: 1fr 1fr; + grid-template-rows: 0.3fr 1.1fr 0.4fr; justify-self: center; display: grid; justify-items: center; - gap: 3px; - margin-bottom: 7px; +} + +.mosh .minmaxwrapper{ + grid-column: 1/-1; + display: grid; + grid-template-columns: 1fr 1px 1fr; + align-items: start; + height: 40px; + padding: 0; + border: 2px solid #111; + border-radius: 1.5em; + background: 0; } .mosh .minmaxtext{ text-align: left; grid-column: 1/-1; /* font-family: "Montserrat", "Arial Black", sans-serif; */ - font-size: 1.15rem; + font-size: 1rem; font-weight: bold; line-height: 1; text-align: center; @@ -542,11 +601,9 @@ } .mosh .healthmaxtext{ - text-align: left; grid-column: span 1; - font-size: 0.8rem; - /* font-family: "Montserrat", "Arial Black", sans-serif; */ - font-weight: bold; + font-size: 0.7rem; + font-weight: 500; line-height: 1; text-align: center; } @@ -560,6 +617,7 @@ .mosh .mainstatwrapper { display: flex; + width: 95%; } .mosh .mainstat { @@ -568,7 +626,7 @@ grid-template-columns: 1fr 5em; align-items: center; gap: 0; - width: 100%; + width: 98%; } .mosh .creature-mainstat { @@ -583,15 +641,18 @@ border-top-left-radius: 2em; border-bottom-left-radius: 2em; background: #111; - padding: 2px 0.5rem; + padding: 5px 0.5rem; + left: 5px; + position: relative; + height: 35px; } .mosh .mainstattext { width: 100%; padding: 0.5rem; color: white; - font-family: "Montserrat", "Arial Black", sans-serif; - font-size: 1.1rem; + /* font-family: "Montserrat", "Arial Black", sans-serif; */ + font-size: 1.3rem; font-weight: bold; text-align: left; text-transform: uppercase; @@ -602,31 +663,46 @@ height: 50px; width: 50px; padding: 0; - border: 4px solid #111; + border: 2px solid #111; border-radius: 3em; font-size: 1.5rem; font-weight: bold; text-align: center; + background: white; + z-index: 5; } .mosh .textarea-input { - font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; + font-family: "Roboto", sans-serif; margin: -0.15em; - padding: 9px; - padding-top: 2px; + /* padding: 9px; */ border: 2px solid #111; border-radius: 0.8em; - font-size: 0.8rem; - /* font-weight: bold; */ - background: white; + font-size: 11pt; + color: white; + font-weight: 500; + background: black; resize: none; + min-height: 0; + overflow: hidden; } +.mosh .textarea-input-grey { + font-family: "Roboto", sans-serif; + border: 0; + border-radius: 0.8em; + font-size: 11pt; + font-weight: 500; + resize: none; + min-height: 0; + overflow: hidden; + text-align: center; +} .mosh .square-input { margin: -0.15em; - height: 45px; + height: 42px; width: 45px; padding: 0; border: 4px solid #111; @@ -638,9 +714,9 @@ } .mosh .armor-mod { - margin: -8px; + margin: 3px; height: 24px; - width: 35px; + width: 28px; /* padding: 0; */ border: 3px solid #111; background-color: #111; @@ -650,7 +726,7 @@ text-align: center; position: relative; color: white; - top: 8px; + top: -2px; right: -19px; } @@ -667,13 +743,11 @@ } .mosh .savebackground { - border-radius: 1em; + border-radius: 0.3em; background: #111; - padding: 0 0.5rem; padding-bottom: 0.3rem; - padding-top: 0.5rem; - width: 80px; - margin-top: -1px; + padding-top: 0.4rem; + height: 225px; } .mosh .header { @@ -733,9 +807,9 @@ .mosh .ship-stats-grid{ display: grid; - grid-template-columns: 17em 1fr 15em; + grid-template-columns: 17em 1fr 18em; } - + .mosh .whiteline { border-top: 2px solid white; @@ -851,6 +925,25 @@ display: inline-flex; } +.mosh .circle{ + color: rgb(22, 22, 22); + background: white; + border-radius: 10px; + /* border: 2px solid black; */ + width: 15px; + height: 15px; +} + +.mosh .circle-f{ /*Filled circle*/ + color: rgb(22, 22, 22); + background: rgb(100, 100, 100); + border-radius: 10px; + /* border: 2px solid black; */ + width: 15px; + height: 15px; +} + + .mosh .profile { width: 140px; height: auto; diff --git a/lang/en.json b/lang/en.json index e69de29..1133088 100644 --- a/lang/en.json +++ b/lang/en.json @@ -0,0 +1,5 @@ +{ + "Mosh.ActorName" : "Name", + "Mosh.ActorBackground" : "Background", + "Mosh.ActorPronouns" : "Pronouns" +} diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index 39aa499..81bd371 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -9,7 +9,7 @@ export class MothershipActorSheet extends ActorSheet { return mergeObject(super.defaultOptions, { classes: ["mosh", "sheet", "actor", "character"], template: "systems/mosh/templates/actor/actor-sheet.html", - width: 742, + width: 700, height: 800, tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }] }); @@ -22,7 +22,9 @@ export class MothershipActorSheet extends ActorSheet { const data = super.getData(); data.dtypes = ["String", "Number", "Boolean"]; - + + const superData = data.data.data; + for (let attr of Object.values(data.data.data.attributes)) { attr.isCheckbox = attr.dtype === "Boolean"; } @@ -38,8 +40,40 @@ export class MothershipActorSheet extends ActorSheet { } data.data.data.settings.useCalm = game.settings.get("mosh", "useCalm"); data.data.data.settings.hideWeight = game.settings.get("mosh", "hideWeight"); + data.data.data.settings.firstEdition = game.settings.get("mosh", "firstEdition"); + //SKILL XP BUTTONS + superData.xp.html = ''; + if(superData.xp.html == ''){ + for(let i = 1; i <= 15; i ++){ + if(i > superData.xp.value){ + if(i % 5){ + superData.xp.html += '
'; + } + else { //If a special one + let trainLevel = 'Trained'; + if(i == 10) trainLevel = 'Expert'; + else if(i == 15) trainLevel = 'Master'; + superData.xp.html += '
'+trainLevel+'
'; + } + } + else{ + if(i % 5){ + superData.xp.html += '
'; + } + else { //If a special one + let trainLevel = 'Trained'; + if(i == 10) trainLevel = 'Expert'; + else if(i == 15) trainLevel = 'Master'; + superData.xp.html += '
'+trainLevel+'
'; + } + + } + } + } + //END SKILL XP + return data.data; } @@ -57,6 +91,7 @@ export class MothershipActorSheet extends ActorSheet { const skills = []; const weapons = []; const armors = []; + const conditions = []; let curWeight = 0; // Iterate through items, allocating to containers @@ -74,6 +109,27 @@ export class MothershipActorSheet extends ActorSheet { armors.push(i); } else if (i.type === 'weapon') { weapons.push(i); + } else if (i.type === 'condition') { + // We'll handle the pip html here. + if (item.treatment == null) { + item.treatment = { + "value": 0, + "html": "" + }; + } + let pipHtml = ""; + for (let i = 0; i < 3; i++) { + if (i < item.treatment.value){ + pipHtml += ''; + } + else{ + pipHtml += ''; + } + } + + item.treatment.html = pipHtml; + + conditions.push(i); } } @@ -98,6 +154,7 @@ export class MothershipActorSheet extends ActorSheet { actorData.skills = skills; actorData.armors = armors; actorData.weapons = weapons; + actorData.conditions = conditions; } @@ -108,6 +165,57 @@ export class MothershipActorSheet extends ActorSheet { // Everything below here is only needed if the sheet is editable if (!this.options.editable) return; + html.on('mousedown', '.char-pip-button', ev => { + const data = super.getData(); + + const div = $(ev.currentTarget); + const targetName = div.data("key"); + const attribute = data.data.data[targetName]; + + let amount = attribute.value; + let max = div.data("max"); + let min = div.data("min"); + + if (event.button == 0) { + if (amount < max) { + attribute.value = Number(amount) + 1; + } + } else if (event.button == 2) { + if (amount > min) { + attribute.value = Number(amount) - 1; + } + } + + let updated = { + html: '', + value: attribute.value + } + + const updateString = "data."+targetName; + + this.actor.update({[updateString] : updated}); + }); + + html.on('mousedown', '.treatment-button', ev => { + const li = ev.currentTarget.closest(".item"); + const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId)) + + let amount = item.data.treatment.value; + + if (event.button == 0) { + if (amount < 3) { + item.data.treatment.value = Number(amount) + 1; + } + } else if (event.button == 2) { + if (amount > 0) { + item.data.treatment.value = Number(amount) - 1; + } + } + + this.actor.updateEmbeddedDocuments('Item', [item]); + }); + + // Update Inventory Item html.find('.item-equip').click(ev => { const li = ev.currentTarget.closest(".item"); diff --git a/module/actor/actor.js b/module/actor/actor.js index 0447949..4ccfdbf 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -325,15 +325,18 @@ export class MothershipActor extends Actor { t.render(true); } - rollAttribute(attribute, advantage, item = "", rollOver = false) { + async rollAttribute(attribute, advantage, item = "", rollOver = false) { let attributeName = attribute.label?.charAt(0).toUpperCase() + attribute.label?.toLowerCase().slice(1); if (!attribute.label && isNaN(attributeName)) attributeName = attribute.charAt(0)?.toUpperCase() + attribute.toLowerCase().slice(1); let isStress = (attribute.label == "Stress" ? true : false); // Roll - let diceformular = (isStress ? "2d10" : "1d100"); - + let firstEdition = game.settings.get("mosh", "firstEdition"); + + let diceformular = (isStress ? (firstEdition ? "1d20" : "2d10") : "1d100"); + + // if (advantage != undefined && advantage != NaN && advantage != 0) { // diceformular = diceformular + "+" + advantage + "d6kh"; // } @@ -376,6 +379,24 @@ export class MothershipActor extends Actor { if (r._total == 0 && !isStress || rSplit[0] == rSplit[1] && !isStress) critical = true; + + let panic = false; + let panicText = ''; + if(isStress && r._total < attribute.value && firstEdition){ + await(async () => { + // const contents = await game.packs.get("Tables").getContent(); + // const table= contents.find(i => i.name === `Panic`); + let tableLocation = game.settings.get("mosh", "panicTable"); + const documentIndex = game.packs.get(tableLocation).index.getName("Panic"); + const doc = await game.packs.get(tableLocation).getDocument(documentIndex._id); + panic = true; + panicText = doc.getResultsForRoll(r._total)[0].data.text; + + //then just put your normal table rolling command using `table` + })() + + } + //Here's where we handle the result text. let resultText = ""; @@ -408,7 +429,9 @@ export class MothershipActor extends Actor { }, isCreature: { value: this.data.type == "creature" ? true : false - } + }, + panic: panic, + panicText : panicText }, target: attribute.value, mod: mod, diff --git a/module/settings.js b/module/settings.js index ea21955..751e280 100644 --- a/module/settings.js +++ b/module/settings.js @@ -1,7 +1,7 @@ export const registerSettings = function () { - game.settings.register('mosh', 'newArmor', { - name: "1e Armor System", - hint: "[COMING SOON] Use the 1st edition Armor system.", + game.settings.register('mosh', 'firstEdition', { + name: "1e Rules", + hint: "Use the 1st edition rules and character sheet.", default: true, scope: 'world', type: Boolean, @@ -10,28 +10,52 @@ export const registerSettings = function () { console.log("newArmorandCombat set to " + value) } }); - game.settings.register('mosh', 'newStress', { - name: "1e Stress System", - hint: "[COMING SOON] Use the 1st edition stress system with the roll under d20 and stress table.", - default: true, + + game.settings.register('mosh', 'panicTable', { + name: "Panic Table", + hint: "Where is our panic table located?", + default: "mosh.tables", scope: 'world', - type: Boolean, + type: String, config: true, onChange: value => { // A callback function which triggers when the setting is changed - console.log("newStress set to " + value) - } - }); - game.settings.register('mosh', 'newWounds', { - name: "1e Wound System", - hint: "[COMING SOON] Instead of the 0e health system, use the 1e wounds and health system.", - default: true, - scope: 'world', - type: Boolean, - config: true, - onChange: value => { // A callback function which triggers when the setting is changed - console.log("newWounds set to " + value) + console.log("panicTable set to " + value) } }); + + // game.settings.register('mosh', 'newArmor', { + // name: "1e Armor System", + // hint: "Use the 1st edition Armor system.", + // default: true, + // scope: 'world', + // type: Boolean, + // config: true, + // onChange: value => { // A callback function which triggers when the setting is changed + // console.log("newArmorandCombat set to " + value) + // } + // }); + // game.settings.register('mosh', 'newStress', { + // name: "1e Stress System", + // hint: "Use the 1st edition stress system with the roll under d20 and stress table.", + // default: true, + // scope: 'world', + // type: Boolean, + // config: true, + // onChange: value => { // A callback function which triggers when the setting is changed + // console.log("newStress set to " + value) + // } + // }); + // game.settings.register('mosh', 'newWounds', { + // name: "1e Wound System", + // hint: "[Instead of the 0e health system, use the 1e wounds and health system.", + // default: true, + // scope: 'world', + // type: Boolean, + // config: true, + // onChange: value => { // A callback function which triggers when the setting is changed + // console.log("newWounds set to " + value) + // } + // }); game.settings.register('mosh', 'hideWeight', { name: "Hide Weight", hint: "Hide weight in the items list for players and ships?", @@ -54,5 +78,4 @@ export const registerSettings = function () { console.log("useCalm set to " + value) } }); - }; diff --git a/packs/tables.db b/packs/tables.db new file mode 100644 index 0000000..26c108f --- /dev/null +++ b/packs/tables.db @@ -0,0 +1 @@ +{"name":"Panic","img":"icons/svg/terror.svg","description":"Stress, Damage, and emotional wear and tear will\neventually bring you to your breaking point. When\nthat happens, there’s a chance you’ll Panic. You\ndetermine this by making a Panic Check.","results":[{"_id":"walsykkkVw8O6g8h","type":0,"text":"LASER FOCUS. [+] on all rolls for the next 2d10 minutes.","weight":1,"range":[1,1],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":1,"rangeH":1},{"_id":"9AwRCIdUzsLQSz0R","type":0,"text":"ANXIOUS. Gain 1 Stress.","weight":1,"range":[2,2],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":2,"rangeH":2},{"_id":"jxBoCa2HpCFz8BOf","type":0,"text":"JUMPY. Gain 1 Stress. All Nearby crewmembers gain 2 Stress.","weight":1,"range":[3,3],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":3,"rangeH":3},{"_id":"8uAAq3NXpymcXXla","type":0,"text":"OVERWHELMED. All actions at [-] for 1d10 minutes. Permanently raise your Minimum Stress by 1.","weight":1,"range":[4,4],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":4,"rangeH":4},{"_id":"Dxrs6kprpkL8LMKV","type":0,"text":"COWARD. Gain a new Condition: You must make a Fear Save to engage in violence or flee.","weight":1,"range":[5,5],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":5,"rangeH":5},{"_id":"oRKd8KxwdgtVZboQ","type":0,"text":"FRIGHTENED. Gain a new Condition: Phobia: When encountering this Phobia make a Fear[-] Save or gain 1d5 Stress.","weight":1,"range":[6,6],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":6,"rangeH":6},{"_id":"8TXWnk9AXGbuFLzq","type":0,"text":"NIGHTMARES. Gain a new Condition: Sleep is difficult, gain [-] on all Comfort Saves.","weight":1,"range":[7,7],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":7,"rangeH":7},{"_id":"rXOLEzry0nZQOwh4","type":0,"text":"LOSS OF CONFIDENCE. Gain a new Condition: Choose one of your Skills and lose that Skill’s bonus.","weight":1,"range":[8,8],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":8,"rangeH":8},{"_id":"Js7vZQJkUpNk3NYZ","type":0,"text":"DEFLATED. Gain a new Condition: Whenever a Nearby crewmember fails a Save, gain 1 Stress.","weight":1,"range":[9,9],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":9,"rangeH":9},{"_id":"nXr4kJ9xU5vfJrtj","type":0,"text":"DOOMED. Gain a new Condition: You feel cursed and unlucky. All Critical Successes are instead Critical Failures.","weight":1,"range":[10,10],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":10,"rangeH":10},{"_id":"MBDFWjb9pfvtoOcV","type":0,"text":"PARANOID. For the next week, whenever someone joins your group (even if they only left for a short period of time) make a Fear Save or gain 1 Stress.","weight":1,"range":[11,11],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":11,"rangeH":11},{"_id":"7iNxxLn4Flty631Z","type":0,"text":"HAUNTED. Gain a new Condition: Something starts visiting you at night. In your dreams. Out of the corner of your eye. And soon it will start making demands.","weight":1,"range":[12,12],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":12,"rangeH":12},{"_id":"4SGDnizOkWYz6aR8","type":0,"text":"DEATH WISH. For the next 24 hours, whenever you encounter a stranger or known enemy, you must make a Sanity Save or immediately attack them.","weight":1,"range":[13,13],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":13,"rangeH":13},{"_id":"Pfy0wJO0qEOwB7mI","type":0,"text":"PROPHETIC VISION. You immediately experience an intense hallucination or vision of an impending terror or horrific event. Gain 1 Stress.","weight":1,"range":[14,14],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":14,"rangeH":14},{"_id":"fvgahu70gGqneZKQ","type":0,"text":"CATATONIC. Become unresponsive and unmoving for 2d10 minutes. Reduce Stress by 1d10.","weight":1,"range":[15,15],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":15,"rangeH":15},{"_id":"guci1cldpF3G7pbE","type":0,"text":"RAGE. Immediately attack the closest crewmember until you inflict at least 2d10 DMG. If there is no crewmember Nearby you attack your surrounding environment.","weight":1,"range":[16,16],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":16,"rangeH":16},{"_id":"YnM0EB2Ft0jErGZR","type":0,"text":"SPIRALING. Gain a new Condition: You make Panic Checks with Disadvantage.","weight":1,"range":[17,17],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":17,"rangeH":17},{"_id":"jVzb4aYqfXVR31os","type":0,"text":"COMPOUNDING PROBLEMS. Roll twice on this table. Permanently raise your Minimum Stress by 1.","weight":1,"range":[18,18],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":18,"rangeH":18},{"_id":"q0i7DdSf7aL34hV0","type":0,"text":"HEART ATTACK / SHORT CIRCUIT (ANDROIDS). Permanently lose 1 Wound. Gain [-] on all rolls for 1d10 hours. Permanently raise your Minimum Stress by 1.","weight":1,"range":[19,19],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":19,"rangeH":19},{"_id":"t9LsgwXro6SsnPks","type":0,"text":"COLLAPSE. You no longer control this character. Hand your sheet to the Warden and roll up a new character to play.","weight":1,"range":[20,20],"drawn":false,"flags":{},"img":"icons/svg/d20-black.svg","rangeL":20,"rangeH":20}],"formula":"1d20","replacement":true,"displayRoll":true,"folder":null,"sort":0,"permission":{"default":0,"kRrcXIQG9UdChdqJ":3},"flags":{"core":{"sourceId":"RollTable.K1Z31lcBIScsVwyg"}},"_id":"ppqsMcDXZCCJZCM5"} diff --git a/system.json b/system.json index b5e094b..ba6e576 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "mosh", "title": "MoSh - Unofficial Mothership", "description": "The unofficial Mothership system for FoundryVTT.", - "version": "0.1.7b", + "version": "0.2.0", "minimumCoreVersion": "0.8.6", "compatibleCoreVersion": "V9", "templateVersion": 2, @@ -10,7 +10,15 @@ "esmodules": ["module/mosh.js"], "styles": ["css/mosh.css"], "scripts": [], - "packs": [], + "packs": [ + { + "name": "tables", + "label": "Tables", + "system": "mosh", + "path": "packs/tables.db", + "entity": "RollTable" + } + ], "languages": [ { "lang": "en", diff --git a/template.json b/template.json index 2595c9f..f33f41e 100644 --- a/template.json +++ b/template.json @@ -37,6 +37,9 @@ "rank": { "value": "" }, + "pronouns": { + "value": "" + }, "credits": { "value": "" }, @@ -44,7 +47,9 @@ "value": "" }, "xp": { - "value": 0 + "value": 0, + "html" : 0, + "selectedSkill" : "" }, "attributes": { "level": { @@ -103,7 +108,8 @@ "biography": "", "description": "This is a description", "xp": { - "value": 1 + "value": 1, + "html": "" }, "stats": { "combat": { @@ -197,7 +203,8 @@ "weapon", "armor", "ability", - "module" + "module", + "condition" ], "templates": { "base": { @@ -246,6 +253,15 @@ ], "bonus": 10 }, + "condition": { + "templates": [ + "base" + ], + "treatment" : { + "value" : 0, + "html" : "" + } + }, "ability": { "templates": [ "base" diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index 46e3544..bfd1b67 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -44,16 +44,25 @@ value="{{data.rank.value}}" placeholder="" /> + {{#if data.settings.firstEdition}} + +
+
Pronouns
+
+
+ {{else}}
XP
+ {{/if}}
-
LEVEL
+
{{#if data.settings.firstEdition}}High Score{{else}}LEVEL{{/if}}
@@ -61,8 +70,7 @@ -
-
+
@@ -81,7 +89,13 @@
- +
{{/if}} + {{#if data.settings.firstEdition}} + {{else}}
@@ -138,16 +154,40 @@ data-dtype="Number" />
+ {{/if}} -
+ {{#if data.settings.firstEdition}} + +
+ - -
-
STRESS & PANIC
- -
+
+
{{data.stats.armor.mod}}
+
+
+ {{/if}} + +
+ {{#if data.settings.firstEdition}} +
TRAUMA RESPONSE
+ {{else}} +
STRESS RESPONSE
+ {{/if}} + {{#if data.settings.firstEdition}} + + {{else}} + + {{/if}} +
+ + +
@@ -172,7 +212,12 @@
--> + {{#if data.settings.firstEdition}}
+ {{else}} +
+ {{/if}} +
@@ -185,7 +230,7 @@
-
mod
+
+
@@ -200,7 +245,7 @@
-
mod
+
+
@@ -215,7 +260,7 @@
-
mod
+
+
@@ -230,12 +275,16 @@ -
mod
+
+
+ {{#if data.settings.firstEdition}}
+ {{else}} +
+ {{/if}}
+ + {{#unless data.settings.firstEdition}}
{{data.stats.armor.total}}
+ {{/unless}} +
+ + + {{!-- Sheet Tab Navigation --}}