@@ -1010,17 +1069,17 @@ export class MothershipActor extends Actor {
//set temprow as template
let tempRow = skillRow;
//replace ID
- tempRow = tempRow.replaceAll("[RADIO_ID]", item.name);
+ tempRow = tempRow.replaceAll("[RADIO_ID]", item.name);
//replace value
- tempRow = tempRow.replace("[RADIO_VALUE]", item.system.bonus);
+ tempRow = tempRow.replace("[RADIO_VALUE]", item.system.bonus);
//replace img
- tempRow = tempRow.replace("[RADIO_IMG]", item.img);
+ tempRow = tempRow.replace("[RADIO_IMG]", item.img);
//replace name
- tempRow = tempRow.replace("[RADIO_BONUS]", item.system.bonus);
+ tempRow = tempRow.replace("[RADIO_BONUS]", item.system.bonus);
//replace name
- tempRow = tempRow.replace("[RADIO_NAME]", item.name);
+ tempRow = tempRow.replace("[RADIO_NAME]", item.name);
//replace desc
- tempRow = tempRow.replace("[RADIO_DESC]", item.system.description.replace("
", ": "));
+ tempRow = tempRow.replace("[RADIO_DESC]", item.system.description.replace("
", ": "));
//add to skillList
skillList = skillList + tempRow;
//increment skill count
@@ -1038,73 +1097,77 @@ export class MothershipActor extends Actor {
}
//create button header if needed
if (!rollString) {
- buttonDesc = `
` + game.i18n.localize("Mosh.SelectYourRollType") + `: `;
+ buttonDesc = `
` + game.i18n.localize("Mosh.SelectYourRollType") + `:
`;
} else {
buttonDesc = ``;
}
//create final dialog data
const dialogData = {
- title: dlgTitle,
+ window: {title: dlgTitle},
+ classes: ["macro-popup-dialog"],
+ position: {width: 600},
content: skillHeader + skillList + buttonDesc,
- buttons: {}
+ buttons: []
};
//add adv/normal/dis buttons if we need a rollString
if (!rollString) {
//we need to generate a roll string
- //Advantage
- dialogData.buttons.button1 = {
- label: game.i18n.localize("Mosh.Advantage"),
- callback: (html) => {
+ dialogData.buttons = [
+ {
+ label: game.i18n.localize("Mosh.Advantage"),
+ action: `action_advantage`,
+ callback: (event, button, dialog) => {
rollString = `1d100 [+]`;
- skill = html.find("input[name='skill']:checked").attr("id");
- skillValue = html.find("input[name='skill']:checked").attr("value");
+ skill = button.form.querySelector("input[name='skill']:checked")?.getAttribute("id");
+ skillValue = button.form.querySelector("input[name='skill']:checked")?.getAttribute("value");
resolve([rollString, skill, skillValue]);
console.log(`User left the chooseSkill dialog with: rollString:${rollString}, skill:${skill}, skillValue:${skillValue}`);
},
- icon: `
`
- };
- //Normal
- dialogData.buttons.button2 = {
- label: game.i18n.localize("Mosh.Normal"),
- callback: (html) => {
+ icon: `fas fa-angle-double-up`
+ },
+ {
+ label: game.i18n.localize("Mosh.Normal"),
+ action: `action_normal`,
+ callback: (event, button, dialog) => {
rollString = `1d100`;
- skill = html.find("input[name='skill']:checked").attr("id");
- skillValue = html.find("input[name='skill']:checked").attr("value");
+ skill = button.form.querySelector("input[name='skill']:checked")?.getAttribute("id");
+ skillValue = button.form.querySelector("input[name='skill']:checked")?.getAttribute("value");
resolve([rollString, skill, skillValue]);
console.log(`User left the chooseSkill dialog with: rollString:${rollString}, skill:${skill}, skillValue:${skillValue}`);
},
- icon: `
`
- };
- //Disadvantage
- dialogData.buttons.button3 = {
- label: game.i18n.localize("Mosh.Disadvantage"),
- callback: (html) => {
+ icon: `fas fa-minus`
+ },
+ {
+ label: game.i18n.localize("Mosh.Disadvantage"),
+ action: `action_disadvantage`,
+ callback: (event, button, dialog) => {
rollString = `1d100 [-]`;
- skill = html.find("input[name='skill']:checked").attr("id");
- skillValue = html.find("input[name='skill']:checked").attr("value");
+ skill = button.form.querySelector("input[name='skill']:checked")?.getAttribute("id");
+ skillValue = button.form.querySelector("input[name='skill']:checked")?.getAttribute("value");
resolve([rollString, skill, skillValue]);
console.log(`User left the chooseSkill dialog with: rollString:${rollString}, skill:${skill}, skillValue:${skillValue}`);
},
- icon: `
`
- };
+ icon: `fas fa-angle-double-down`
+ }
+ ]
//add a next button if we dont need a rollString
} else {
- dialogData.buttons.button1 = {
- label: game.i18n.localize("Mosh.Next"),
- callback: (html) => {
- skill = html.find("input[name='skill']:checked").attr("id");
- skillValue = html.find("input[name='skill']:checked").attr("value");
- resolve([rollString, skill, skillValue]);
- console.log(`User left the chooseSkill dialog with: rollString:${rollString}, skill:${skill}, skillValue:${skillValue}`);
- },
- icon: `
`
- };
+ dialogData.buttons = [
+ {
+ label: game.i18n.localize("Mosh.Next"),
+ action: `action_next`,
+ callback: (event, button, dialog) => {
+ skill = button.form.querySelector("input[name='skill']:checked")?.getAttribute("id");
+ skillValue = button.form.querySelector("input[name='skill']:checked")?.getAttribute("value");
+ resolve([rollString, skill, skillValue]);
+ console.log(`User left the chooseSkill dialog with: rollString:${rollString}, skill:${skill}, skillValue:${skillValue}`);
+ },
+ icon: `fas fa-chevron-circle-right`
+ }
+ ]
}
//render dialog
- const dialog = new Dialog(dialogData, {
- width: 600,
- height: dialogHeight
- }).render(true);
+ const dialog = new foundry.applications.api.DialogV2(dialogData).render({force: true});
});
}
@@ -1119,47 +1182,45 @@ export class MothershipActor extends Actor {
let dieDis = die + ` [-]`;
//create final dialog data
const dialogData = {
- title: dlgTitle,
- buttonDesc: `
` + game.i18n.localize("Mosh.SelectYourRollType") + `: `,
- buttons: {}
+ window: {title: dlgTitle},
+ classes: ["macro-popup-dialog"],
+ position: {width: 600},
+ content: `
` + game.i18n.localize("Mosh.SelectYourRollType") + `:
`,
+ buttons: [
+ {
+ label: game.i18n.localize("Mosh.Advantage"),
+ action: `action_advantage`,
+ callback: (event, button, dialog) => {
+ rollString = dieAdv;
+ resolve([rollString]);
+ console.log(`User left the chooseAdvantage dialog with: rollString:${rollString}`);
+ },
+ icon: `fas fa-angle-double-up`
+ },
+ {
+ label: game.i18n.localize("Mosh.Normal"),
+ action: `action_normal`,
+ callback: (event, button, dialog) => {
+ rollString = die;
+ resolve([rollString]);
+ console.log(`User left the chooseAdvantage dialog with: rollString:${rollString}`);
+ },
+ icon: `fas fa-minus`
+ },
+ {
+ label: game.i18n.localize("Mosh.Disadvantage"),
+ action: `action_disadvantage`,
+ callback: (event, button, dialog) => {
+ rollString = dieDis;
+ resolve([rollString]);
+ console.log(`User left the chooseAdvantage dialog with: rollString:${rollString}`);
+ },
+ icon: `fas fa-angle-double-down`
+ }
+ ]
};
- //add buttons
- //Advantage
- dialogData.buttons.button1 = {
- label: game.i18n.localize("Mosh.Advantage"),
- callback: (html) => {
- rollString = dieAdv;
- resolve([rollString]);
- console.log(`User left the chooseAdvantage dialog with: rollString:${rollString}`);
- },
- icon: `
`
- };
- //Normal
- dialogData.buttons.button2 = {
- label: game.i18n.localize("Mosh.Normal"),
- callback: (html) => {
- rollString = die;
- resolve([rollString]);
- console.log(`User left the chooseAdvantage dialog with: rollString:${rollString}`);
- },
- icon: `
`
- };
- //Disadvantage
- dialogData.buttons.button3 = {
- label: game.i18n.localize("Mosh.Normal"),
- label: game.i18n.localize("Mosh.Disadvantage"),
- callback: (html) => {
- rollString = dieDis;
- resolve([rollString]);
- console.log(`User left the chooseAdvantage dialog with: rollString:${rollString}`);
- },
- icon: `
`
- };
//render dialog
- const dialog = new Dialog(dialogData, {
- width: 600,
- height: 105
- }).render(true);
+ const dialog = new foundry.applications.api.DialogV2(dialogData).render({force: true});
});
}
@@ -1187,7 +1248,7 @@ export class MothershipActor extends Actor {
let woundEffect = ``;
let msgHeader = ``;
let msgImgPath = ``;
- let chatId = (game.release.generation >= 12 ? foundry.utils.randomID() : randomID());
+ let chatId = foundry.utils.randomID();
let firstEdition = game.settings.get('mosh', 'firstEdition');
let useCalm = game.settings.get('mosh', 'useCalm');
//customize this roll if its a unique use-case
@@ -1388,11 +1449,11 @@ export class MothershipActor extends Actor {
alias: this.name
}
};
- let template = 'systems/mosh/templates/chat/rollCheck.html';
- renderTemplate(template, messageData).then(content => {
- chatData.content = content;
- ChatMessage.create(chatData);
- });
+ //create message
+ const template = 'systems/mosh/templates/chat/rollCheck.html';
+ const content = await foundry.applications.handlebars.renderTemplate(template, messageData);
+ chatData.content = content;
+ await ChatMessage.create(chatData);
//log what was done
console.log(`Rolled damage on:${weapon.name}`);
//return messageData
@@ -1489,18 +1550,27 @@ export class MothershipActor extends Actor {
if (firstEdition) {
//if calm not enabled
if (!useCalm) {
- if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
//increase stress by 1 and retrieve the flavor text from the result
- let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
+ let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
flavorText = addStress[1];
}
- //if critical failure, make sure to ask for panic check
- if (parsedRollResult.critical === true) {
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
//set crit fail
critFail = true;
}
} else {
- flavorText = game.i18n.localize("Mosh.YouSenseTheWeightOfYourSetbacks");
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ //increase stress by 1 and retrieve the flavor text from the result
+ let removeCalm = await this.modifyActor('system.other.stress.value', null, '-1d10', false);
+ flavorText = removeCalm[1];
+ }
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
+ //set crit fail
+ critFail = true;
+ }
}
//if 0e
} else {
@@ -1508,20 +1578,31 @@ export class MothershipActor extends Actor {
if (!useCalm) {
//on Save failure
if (attribute === 'sanity' || attribute === 'fear' || attribute === 'body' || attribute === 'armor') {
- if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
//gain 1 stress
- let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
+ let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
flavorText = addStress[1];
}
- //if critical failure, make sure to ask for panic check
- if (parsedRollResult.critical === true) {
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
//set crit fail
critFail = true;
}
}
} else {
- //output standard failure
- flavorText = game.i18n.localize("Mosh.YouSenseTheWeightOfYourSetbacks");
+ //on Save failure
+ if (attribute === 'sanity' || attribute === 'fear' || attribute === 'body' || attribute === 'armor') {
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ //gain 1 stress
+ let removeCalm = await this.modifyActor('system.other.stress.value', null, '-1d10', false);
+ flavorText = removeCalm[1];
+ }
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
+ //set crit fail
+ critFail = true;
+ }
+ }
}
}
}
@@ -1567,8 +1648,16 @@ export class MothershipActor extends Actor {
if (useCalm) {
//prep text based on success or failure
if (parsedRollResult.success === false && this.type === 'character') {
- //set fail text
- flavorText = game.i18n.localize("Mosh.YouSenseTheWeightOfYourSetbacks");
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ //increase stress by 1 and retrieve the flavor text from the result
+ let removeCalm = await this.modifyActor('system.other.stress.value', null, '-1d10', false);
+ flavorText = removeCalm[1];
+ }
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
+ //set crit fail
+ critFail = true;
+ }
} else if (parsedRollResult.success === true && this.type === 'character') {
//calculate stress reduction
let onesValue = Number(String(parsedRollResult.total).charAt(String(parsedRollResult.total).length - 1));
@@ -1580,13 +1669,13 @@ export class MothershipActor extends Actor {
} else {
//prep text based on success or failure
if (parsedRollResult.success === false && this.type === 'character') {
- if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
//increase stress by 1 and retrieve the flavor text from the result
- let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
+ let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
flavorText = addStress[1];
}
- //if critical failure, make sure to ask for panic check
- if (parsedRollResult.critical === true) {
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
//set crit fail
critFail = true;
}
@@ -1604,8 +1693,16 @@ export class MothershipActor extends Actor {
if (useCalm) {
//prep text based on success or failure
if (parsedRollResult.success === false && this.type === 'character') {
- //set fail text
- flavorText = game.i18n.localize("Mosh.YouSenseTheWeightOfYourSetbacks");
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ //increase stress by 1 and retrieve the flavor text from the result
+ let removeCalm = await this.modifyActor('system.other.stress.value', null, '-1d10', false);
+ flavorText = removeCalm[1];
+ }
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
+ //set crit fail
+ critFail = true;
+ }
} else if (parsedRollResult.success === true && this.type === 'character') {
//calculate stress reduction
let succeedBy = Math.floor((rollTarget - parsedRollResult.total) / 10);
@@ -1621,13 +1718,13 @@ export class MothershipActor extends Actor {
} else {
//prep text based on success or failure
if (parsedRollResult.success === false && this.type === 'character') {
- if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
//increase stress by 1 and retrieve the flavor text from the result
- let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
+ let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
flavorText = addStress[1];
}
- //if critical failure, make sure to ask for panic check
- if (parsedRollResult.critical === true) {
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
//set crit fail
critFail = true;
}
@@ -1660,19 +1757,19 @@ export class MothershipActor extends Actor {
//prep text for success
if (parsedRollResult.success && parsedRollResult.critical) {
//flavor text
- flavorText = tableData.getResultsForRoll(0)[0].text;
+ flavorText = tableData.getResultsForRoll(0)[0].description;
//prep text for critical success
} else if (parsedRollResult.success && !parsedRollResult.critical) {
//flavor text
- flavorText = tableData.getResultsForRoll(1)[0].text;
+ flavorText = tableData.getResultsForRoll(1)[0].description;
//prep text for failure
} else if (!parsedRollResult.success && !parsedRollResult.critical) {
//flavor text
- flavorText = tableData.getResultsForRoll(2)[0].text;
+ flavorText = tableData.getResultsForRoll(2)[0].description;
//prep text for critical failure
} else if (!parsedRollResult.success && parsedRollResult.critical) {
//flavor text
- flavorText = tableData.getResultsForRoll(3)[0].text;
+ flavorText = tableData.getResultsForRoll(3)[0].description;
}
}
//morale check
@@ -1706,18 +1803,27 @@ export class MothershipActor extends Actor {
if (firstEdition) {
//if calm not enabled
if (!useCalm) {
- if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
//increase stress by 1 and retrieve the flavor text from the result
- let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
+ let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
flavorText = addStress[1];
}
- //if critical failure, make sure to ask for panic check
- if (parsedRollResult.critical === true) {
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
//set crit fail
critFail = true;
}
} else {
- flavorText = game.i18n.localize("Mosh.YouSenseTheWeightOfYourSetbacks");
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ //increase stress by 1 and retrieve the flavor text from the result
+ let removeCalm = await this.modifyActor('system.other.stress.value', null, '-1d10', false);
+ flavorText = removeCalm[1];
+ }
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
+ //set crit fail
+ critFail = true;
+ }
}
//if 0e
} else {
@@ -1725,20 +1831,28 @@ export class MothershipActor extends Actor {
if (!useCalm) {
//on Save failure
if (attribute === 'sanity' || attribute === 'fear' || attribute === 'body' || attribute === 'armor') {
- if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
//gain 1 stress
- let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
+ let addStress = await this.modifyActor('system.other.stress.value', 1, null, false);
flavorText = addStress[1];
}
- //if critical failure, make sure to ask for panic check
- if (parsedRollResult.critical === true) {
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
//set crit fail
critFail = true;
}
}
} else {
- //output standard failure
- flavorText = game.i18n.localize("Mosh.YouSenseTheWeightOfYourSetbacks");
+ if (game.settings.get('mosh', 'autoStress')) { //If the automatic stress option is enabled
+ //gain 1 stress
+ let removeCalm = await this.modifyActor('system.other.stress.value', null, '-1d10', false);
+ flavorText = removeCalm[1];
+ }
+ //if critical failure, make sure to ask for panic check
+ if (parsedRollResult.critical === true) {
+ //set crit fail
+ critFail = true;
+ }
}
}
} else if (parsedRollResult.success === true && this.type === 'character') {
@@ -1770,7 +1884,7 @@ export class MothershipActor extends Actor {
//prepare template
messageTemplate = 'systems/mosh/templates/chat/rollCheck.html';
//render template
- messageContent = await renderTemplate(messageTemplate, messageData);
+ messageContent = await foundry.applications.handlebars.renderTemplate(messageTemplate, messageData);
//make message
let macroMsg = await rollResult.toMessage({
id: chatId,
@@ -1785,7 +1899,7 @@ export class MothershipActor extends Actor {
keepId: true
});
//is DSN active?
- if (game.modules.get("dice-so-nice").active) {
+ if (game.modules.get("dice-so-nice") && game.modules.get("dice-so-nice").active) {
//log what was done
console.log(`Rolled a check on: ${attribute}, with: rollString:${rollString}, aimFor:${aimFor}, skill:${skill}, skillValue:${skillValue}.`);
//return messageData
@@ -1820,7 +1934,7 @@ export class MothershipActor extends Actor {
let msgFlavor = ``;
let msgOutcome = ``;
let msgChange = ``;
- let chatId = (game.release.generation >= 12 ? foundry.utils.randomID() : randomID())
+ let chatId = foundry.utils.randomID();
let halfDamage = false;
let firstEdition = game.settings.get('mosh', 'firstEdition');
let useCalm = game.settings.get('mosh', 'useCalm');
@@ -1970,7 +2084,7 @@ export class MothershipActor extends Actor {
//prepare template
messageTemplate = 'systems/mosh/templates/chat/modifyActor.html';
//render template
- messageContent = await renderTemplate(messageTemplate, messageData);
+ messageContent = await foundry.applications.handlebars.renderTemplate(messageTemplate, messageData);
//push message
ChatMessage.create({
id: chatId,
@@ -2111,7 +2225,7 @@ export class MothershipActor extends Actor {
//prepare template
messageTemplate = 'systems/mosh/templates/chat/modifyActor.html';
//render template
- messageContent = await renderTemplate(messageTemplate, messageData);
+ messageContent = await foundry.applications.handlebars.renderTemplate(messageTemplate, messageData);
//make message
let macroMsg = await rollResult.toMessage({
id: chatId,
@@ -2125,7 +2239,7 @@ export class MothershipActor extends Actor {
}, {
keepId: true
});
- if (game.modules.get("dice-so-nice").active) {
+ if (game.modules.get("dice-so-nice") && game.modules.get("dice-so-nice").active) {
//log what was done
console.log(`Modified actor: ${this.name}, with: fieldAddress:${fieldAddress}, modValue:${modValue}, modRollString:${modRollString}, outputChatMsg:${outputChatMsg}`);
//return modification values
@@ -2151,7 +2265,7 @@ export class MothershipActor extends Actor {
let oldValue = 0;
let newValue = 0;
let flavorText = ``;
- let chatId = (game.release.generation >= 12 ? foundry.utils.randomID(): randomID())
+ let chatId = foundry.utils.randomID();
//get item data
let itemData = await fromIdUuid(itemId,{type:"Item"});
//add or increase the count of the item, depending on type, if the actor has it
@@ -2235,7 +2349,7 @@ export class MothershipActor extends Actor {
//prepare template
messageTemplate = 'systems/mosh/templates/chat/modifyItem.html';
//render template
- messageContent = await renderTemplate(messageTemplate, messageData);
+ messageContent = await foundry.applications.handlebars.renderTemplate(messageTemplate, messageData);
//make message
ChatMessage.create({
id: chatId,
@@ -2259,25 +2373,28 @@ export class MothershipActor extends Actor {
return new Promise(async (resolve) => {
//create final dialog data
const dialogData = {
- title: game.i18n.localize("Mosh.WeaponIssue"),
- content: `
` + game.i18n.localize("Mosh.OutOfAmmoNeedReload") + ` `,
- buttons: {}
+ window: {
+ title: game.i18n.localize("Mosh.WeaponIssue")
+ },
+ classes: ["macro-popup-dialog"],
+ content: `
` + game.i18n.localize("Mosh.OutOfAmmoNeedReload") + `
`,
+ buttons: [
+ {
+ label: game.i18n.localize("Mosh.Reload"),
+ action: `action_reload`,
+ callback: () => this.reloadWeapon(itemId),
+ icon: `fas fa-check`
+ },
+ {
+ label: `Cancel`,
+ action: `action_cancel`,
+ callback: () => {},
+ icon: `fas fa-times`
+ }
+ ]
};
- //add buttons
- //reload
- dialogData.buttons.roll = {
- label: game.i18n.localize("Mosh.Reload"),
- callback: () => this.reloadWeapon(itemId),
- icon: `
`
- };
- //cancel
- dialogData.buttons.cancel = {
- label: `Cancel`,
- callback: () => {},
- icon: `
`
- };
//render dialog
- const dialog = new Dialog(dialogData).render(true);
+ const dialog = new foundry.applications.api.DialogV2(dialogData).render({force: true});
});
//log what was done
console.log(`Asked for reload.`);
@@ -2289,19 +2406,22 @@ export class MothershipActor extends Actor {
return new Promise(async (resolve) => {
//create final dialog data
const dialogData = {
- title: game.i18n.localize("Mosh.WeaponIssue"),
- content: `
` + game.i18n.localize("Mosh.OutOfAmmo") + ` `,
- buttons: {}
+ window: {
+ title: game.i18n.localize("Mosh.WeaponIssue")
+ },
+ classes: ["macro-popup-dialog"],
+ content: `
` + game.i18n.localize("Mosh.OutOfAmmo") + `
`,
+ buttons: [
+ {
+ label: game.i18n.localize("Mosh.OK"),
+ action: `action_okay`,
+ callback: () => {},
+ icon: 'fas fa-check'
+ }
+ ]
};
- //add buttons
- //Ok
- dialogData.buttons.cancel = {
- label: game.i18n.localize("Mosh.OK"),
- callback: () => {},
- icon: '
'
- };
//render dialog
- const dialog = new Dialog(dialogData).render(true);
+ const dialog = new foundry.applications.api.DialogV2(dialogData).render({force: true});
});
//log what was done
console.log(`Told user they are out of ammo.`);
@@ -2313,15 +2433,10 @@ export class MothershipActor extends Actor {
let messageTemplate = ``;
let messageContent = ``;
let msgBody = ``;
- let chatId = (game.release.generation >= 12 ? foundry.utils.randomID() : randomID())
+ let chatId = foundry.utils.randomID();
//dupe item to work with
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.getEmbeddedDocument('Item', itemId));
- } else {
- item = duplicate(this.getEmbeddedDocument('Item', itemId));
- }
-
+ item = foundry.utils.duplicate(this.getEmbeddedDocument('Item', itemId));
//reload
if (!item.system.useAmmo) {
//exit function (it should not be possible to get here)
@@ -2371,16 +2486,16 @@ export class MothershipActor extends Actor {
//prepare template
messageTemplate = 'systems/mosh/templates/chat/reload.html';
//render template
- messageContent = await renderTemplate(messageTemplate, messageData);
+ messageContent = await foundry.applications.handlebars.renderTemplate(messageTemplate, messageData);
//push message
ChatMessage.create({
id: chatId,
user: game.user.id,
- speaker: {
- actor: this.id,
- token: this.token,
- alias: this.name
- },
+ speaker: {
+ actor: this.id,
+ token: this.token,
+ alias: this.name
+ },
content: messageContent
}, {
keepId: true
@@ -2392,7 +2507,7 @@ export class MothershipActor extends Actor {
//make the player take bleeding damage
async takeBleedingDamage() {
//init vars
- let chatId = (game.release.generation >= 12 ? foundry.utils.randomID() : randomID())
+ let chatId = foundry.utils.randomID();
//determine bleeding amount
let healthLost = this.items.getName("Bleeding").system.severity * -1;
//run the function for the player's 'Selected Character'
@@ -2439,7 +2554,7 @@ export class MothershipActor extends Actor {
//make the player take radiation damage
async takeRadiationDamage() {
//init vars
- let chatId = (game.release.generation >= 12 ? foundry.utils.randomID() : randomID())
+ let chatId = foundry.utils.randomID();
//reduce all stats and saves by 1
this.modifyActor('system.stats.strength.value', -1, null, false);
this.modifyActor('system.stats.speed.value', -1, null, false);
@@ -2492,7 +2607,7 @@ export class MothershipActor extends Actor {
//make the player take radiation damage
async takeCryoDamage(rollString) {
//init vars
- let chatId = (game.release.generation >= 12 ? foundry.utils.randomID() : randomID())
+ let chatId = foundry.utils.randomID();
//roll the dice
//parse the roll string
let parsedRollString = this.parseRollString(rollString, 'low');
@@ -2576,7 +2691,7 @@ export class MothershipActor extends Actor {
}
//create pop-up HTML
- let msgContent = await renderTemplate('systems/mosh/templates/dialogs/choose-cover-dialog.html', {
+ let msgContent = await foundry.applications.handlebars.renderTemplate('systems/mosh/templates/dialogs/choose-cover-dialog.html', {
curDR:curDR,
curAP:curAP,
none_checked: none_checked,
@@ -2588,28 +2703,28 @@ export class MothershipActor extends Actor {
//create final dialog data
const dialogData = {
- title: game.i18n.localize("Mosh.Cover"),
+ window: {title: game.i18n.localize("Mosh.Cover")},
+ classes: ["macro-popup-dialog"],
+ position: {width: 600},
content: msgContent,
- buttons: {}
+ buttons: [
+ {
+ label: game.i18n.localize("Mosh.OK"),
+ action: `action_okay`,
+ callback: (event, button, dialog) => {
+ this.update({
+ 'system.stats.armor.cover': button.form.querySelector("input[name='cover']:checked")?.getAttribute("value")
+ });
+ console.log(`User's cover is now:${button.form.querySelector("input[name='cover']:checked")?.getAttribute("value")}`);
+ },
+ icon: 'fas fa-check'
+ }
+ ]
};
- //add buttons
- //Ok
- dialogData.buttons.cancel = {
- label: game.i18n.localize("Mosh.OK"),
- callback: (html) => {
- this.update({
- 'system.stats.armor.cover': html.find("input[name='cover']:checked").attr("value")
- });
- console.log(`User's cover is now:${html.find("input[name='cover']:checked").attr("value")}`);
- },
- icon: '
'
- };
//render dialog
- const dialog = new Dialog(dialogData, {
- width: 600,
- height: 580
- }).render(true);
- });
+ const dialog = new foundry.applications.api.DialogV2(dialogData).render({force: true});
+
+ });
}
@@ -2618,36 +2733,39 @@ export class MothershipActor extends Actor {
//wrap the whole thing in a promise, so that it waits for the form to be interacted with
return new Promise(async (resolve) => {
//create pop-up HTML
- let msgContent = await renderTemplate('systems/mosh/templates/dialogs/distres-signal-dialog.html');
+ let msgContent = await foundry.applications.handlebars.renderTemplate('systems/mosh/templates/dialogs/distres-signal-dialog.html');
//create final dialog data
const dialogData = {
- title: game.i18n.localize("Mosh.DistressSignal"),
+ window: {title: game.i18n.localize("Mosh.DistressSignal")},
+ classes: ["macro-popup-dialog"],
+ position: {width: 600,height: 265},
content: msgContent,
- buttons: {
- button1: {
+ buttons: [
+ {
label: game.i18n.localize("Mosh.Advantage"),
+ action: `action_advantage`,
callback: () => this.rollTable(game.settings.get('mosh', 'table1eDistressSignal'), `1d10 [+]`, `low`, true, false, null, null),
- icon: `
`
+ icon: `fas fa-angle-double-up`
},
- button2: {
+ {
label: game.i18n.localize("Mosh.Normal"),
+ action: `action_normal`,
callback: () => this.rollTable(game.settings.get('mosh', 'table1eDistressSignal'), `1d10`, `low`, true, false, null, null),
- icon: `
`
+ icon: `fas fa-minus`
},
- button3: {
+ {
label: game.i18n.localize("Mosh.Disadvantage"),
+ action: `action_disadvantage`,
callback: () => this.rollTable(game.settings.get('mosh', 'table1eDistressSignal'), `1d10 [-]`, `low`, true, false, null, null),
- icon: `
`
+ icon: `fas fa-angle-double-down`
}
- }
+ ]
};
//render dialog
- const dialog = new Dialog(dialogData, {
- width: 600,
- height: 265
- }).render(true);
- });
+ const dialog = new foundry.applications.api.DialogV2(dialogData).render({force: true});
+
+ });
}
@@ -2661,32 +2779,35 @@ export class MothershipActor extends Actor {
`;
//create final dialog data
const dialogData = {
- title: game.i18n.localize("Mosh.MaintenanceCheck"),
+ window: {title: game.i18n.localize("Mosh.MaintenanceCheck")},
+ classes: ["macro-popup-dialog"],
+ position: {width: 600,height: 265},
content: msgContent,
- buttons: {
- button1: {
+ buttons: [
+ {
label: game.i18n.localize("Mosh.Advantage"),
+ action: `action_advantage`,
callback: () => this.rollTable(`maintenanceCheck`, `1d100 [+]`, `low`, null, null, null, null),
- icon: `
`
+ icon: `fas fa-angle-double-up`
},
- button2: {
+ {
label: game.i18n.localize("Mosh.Normal"),
+ action: `action_normal`,
callback: () => this.rollTable(`maintenanceCheck`, `1d100`, `low`, null, null, null, null),
- icon: `
`
+ icon: `fas fa-minus`
},
- button3: {
+ {
label: game.i18n.localize("Mosh.Disadvantage"),
+ action: `action_disadvantage`,
callback: () => this.rollTable(`maintenanceCheck`, `1d100 [-]`, `low`, null, null, null, null),
- icon: `
`
+ icon: `fas fa-angle-double-down`
}
- }
+ ]
};
//render dialog
- const dialog = new Dialog(dialogData, {
- width: 600,
- height: 265
- }).render(true);
- });
+ const dialog = new foundry.applications.api.DialogV2(dialogData).render({force: true});
+
+ });
}
@@ -2700,32 +2821,35 @@ export class MothershipActor extends Actor {
`;
//create final dialog data
const dialogData = {
- title: game.i18n.localize("Mosh.BankrupcySave"),
+ window: {title: game.i18n.localize("Mosh.BankrupcySave")},
+ classes: ["macro-popup-dialog"],
+ position: {width: 600,height: 265},
content: msgContent,
- buttons: {
- button1: {
+ buttons: [
+ {
label: game.i18n.localize("Mosh.Advantage"),
+ action: `action_advantage`,
callback: () => this.rollCheck(`1d100 [+]`, `low`, `bankruptcySave`, null, null, null),
- icon: `
`
+ icon: `fas fa-angle-double-up`
},
- button2: {
+ {
label: game.i18n.localize("Mosh.Normal"),
+ action: `action_normal`,
callback: () => this.rollCheck(`1d100`, `low`, `bankruptcySave`, null, null, null),
- icon: `
`
+ icon: `fas fa-minus`
},
- button3: {
+ {
label: game.i18n.localize("Mosh.Disadvantage"),
+ action: `action_disadvantage`,
callback: () => this.rollCheck(`1d100 [-]`, `low`, `bankruptcySave`, null, null, null),
- icon: `
`
+ icon: `fas fa-angle-double-down`
}
- }
+ ]
};
//render dialog
- const dialog = new Dialog(dialogData, {
- width: 600,
- height: 265
- }).render(true);
- });
+ new foundry.applications.api.DialogV2(dialogData).render({force: true});
+
+ });
}
@@ -2774,105 +2898,96 @@ export class MothershipActor extends Actor {
`;
//create final dialog data
const dialogData = {
- title: `Morale Check`,
+ window: {title: `Morale Check`},
+ classes: ["macro-popup-dialog"],
+ position: {width: 600,height: 265},
content: msgContent,
- buttons: {
- button1: {
+ buttons: [
+ {
label: game.i18n.localize("Mosh.Advantage"),
+ action: `action_advantage`,
callback: () => this.rollCheck(`1d10 [+]`, `high-equal`, `moraleCheck`, null, null, null),
- icon: `
`
+ icon: `fas fa-angle-double-up`
},
- button2: {
+ {
label: game.i18n.localize("Mosh.Normal"),
+ action: `action_normal`,
callback: () => this.rollCheck(`1d10`, `high-equal`, `moraleCheck`, null, null, null),
- icon: `
`
+ icon: `fas fa-minus`
},
- button3: {
+ {
label: game.i18n.localize("Mosh.Disadvantage"),
+ action: `action_disadvantage`,
callback: () => this.rollCheck(`1d10 [-]`, `high-equal`, `moraleCheck`, null, null, null),
- icon: `
`
+ icon: `fas fa-angle-double-down`
}
- }
+ ]
};
//render dialog
- const dialog = new Dialog(dialogData, {
- width: 600,
- height: 265
- }).render(true);
- });
+ const dialog = new foundry.applications.api.DialogV2(dialogData).render({force: true});
+
+ });
}
// print description
- printDescription(itemId, options = {
- event: null
- }) {
+ printDescription(itemId, options = {event: null}) {
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.getEmbeddedDocument('Item', itemId));
- } else {
- item = duplicate(this.getEmbeddedDocument('Item', itemId));
- }
+ item = foundry.utils.duplicate(this.getEmbeddedDocument('Item', itemId));
this.chatDesc(item);
}
// Print the item description into the chat.
- chatDesc(item) {
+ async chatDesc(item) {
let swapNameDesc = false;
let swapName = '';
let itemName = item.name?.charAt(0).toUpperCase() + item.name?.toLowerCase().slice(1);
if (!item.name && isNaN(itemName)) {
itemName = item.charAt(0)?.toUpperCase() + item.toLowerCase().slice(1);
}
- var rollInsert = '';
+
+ let rollInsert = '';
if (item.system.roll) {
- let r = new Roll(item.system.roll, {});
- r.evaluate({
- async: false
- });
- rollInsert = '\
-
' + item.system.roll + '
\
-
';
+ const r = new Roll(item.system.roll, {});
+ await r.evaluate();
+ rollInsert = `
+
${item.system.roll}
+
`;
}
- //add flag to swap name and description, if desc contains trinket or patch
- if (item.system.description === '
Patch
' || item.system.description === '
Trinket
' || item.system.description === '
Maintenance Issue
') {
+ // add flag to swap name and description, if desc contains trinket or patch
+ if (["
Patch
", "
Trinket
", "
Maintenance Issue
"].includes(item.system.description)) {
swapNameDesc = true;
swapName = item.system.description.replaceAll('
', '').replaceAll('
', '');
}
- var templateData = {
+ const templateData = {
actor: this,
- stat: {
- name: itemName.toUpperCase()
- },
- item: item,
+ stat: { name: itemName.toUpperCase() },
+ item,
insert: rollInsert,
onlyDesc: true,
- swapNameDesc: swapNameDesc,
- swapName: swapName
+ swapNameDesc,
+ swapName
};
- let chatData = {
+ const chatData = {
user: game.user.id,
- speaker: {
- actor: this.id,
- token: this.token,
- alias: this.name
- }
+ speaker: { actor: this.id, token: this.token, alias: this.name }
};
- let rollMode = game.settings.get("core", "rollMode");
- if (["gmroll", "blindroll"].includes(rollMode)) chatData["whisper"] = ChatMessage.getWhisperRecipients("GM");
+ const rollMode = game.settings.get("core", "rollMode");
+ if (["gmroll", "blindroll"].includes(rollMode)) {
+ chatData.whisper = ChatMessage.getWhisperRecipients("GM");
+ }
+
+ const template = 'systems/mosh/templates/chat/itemRoll.html';
+ const content = await foundry.applications.handlebars.renderTemplate(template, templateData);
+ chatData.content = content;
+ await ChatMessage.create(chatData);
- let template = 'systems/mosh/templates/chat/itemRoll.html';
- renderTemplate(template, templateData).then(content => {
- chatData.content = content;
- ChatMessage.create(chatData);
- });
- //log what was done
console.log(`Created chat message with details on ${item.name}`);
}
diff --git a/module/actor/creature-sheet.js b/module/actor/creature-sheet.js
index f10da03..43b80b4 100644
--- a/module/actor/creature-sheet.js
+++ b/module/actor/creature-sheet.js
@@ -4,16 +4,17 @@
*/
import { DLCreatureSettings } from "../settings/creature-settings.js";
-export class MothershipCreatureSheet extends ActorSheet {
+export class MothershipCreatureSheet extends foundry.appv1.sheets.ActorSheet {
/** @override */
static get defaultOptions() {
var options = {
classes: ["mosh", "sheet", "actor", "creature"],
template: "systems/mosh/templates/actor/creature-sheet.html",
- width: 700,
- height: 650,
- tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }]
+ width: 820,
+ height: 770,
+ tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }],
+ submitOnChange: true
};
return foundry.utils.mergeObject(super.defaultOptions, options);
@@ -43,17 +44,14 @@ export class MothershipCreatureSheet extends ActorSheet {
new DLCreatureSettings(this.actor, {
top: this.position.top + 40,
left: this.position.left + (this.position.width - 400) / 2
- }).render(true);
+ }).render({force: true});
}
async _updateObject(event, formData) {
const actor = this.object;
var updateData;
- if (game.release.generation >= 12) {
- updateData = foundry.utils.expandObject(formData);
- } else {
- updateData = expandObject(formData);
- }
+ updateData = foundry.utils.expandObject(formData);
+
await actor.update(updateData, {
@@ -71,6 +69,8 @@ export class MothershipCreatureSheet extends ActorSheet {
// attr.isCheckbox = attr.dtype === "Boolean";
// }
+ const superData = data.data.system;
+
// Prepare items.
if (this.actor.type == 'creature') {
this._prepareCreatureItems(data);
@@ -85,20 +85,43 @@ export class MothershipCreatureSheet extends ActorSheet {
data.data.system.settings.androidPanic = game.settings.get("mosh", "androidPanic");
data.data.enriched = [];
- data.data.enriched.description = await TextEditor.enrichHTML(data.data.system.description, {async: true});
- data.data.enriched.biography = await TextEditor.enrichHTML(data.data.system.biography, {async: true});
+ data.data.enriched.description = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.data.system.description, {async: true});
+ data.data.enriched.biography = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.data.system.biography, {async: true});
+
+ //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;
}
- /**
- * Get the remaining wounds of the creature
- * @param {JQuery} html
- * @returns {int} hits.max - hits.value
- */
- getWoundsLeft(html){
- return html.find(`input[name="system.hits.max"]`).prop('value') - html.find(`input[name="system.hits.value"]`).prop('value');
- }
-
/**
* Organize and classify Items for Character sheets.
*
@@ -108,32 +131,73 @@ export class MothershipCreatureSheet extends ActorSheet {
*/
_prepareCreatureItems(sheetData) {
const actorData = sheetData.data;
-
+ //console.log(sheetData);
+ ///console.log("sheetdata Above");
// Initialize containers.
const abilities = [];
+ const gear = [];
+ const skills = [];
const weapons = [];
+ const armors = [];
+ const conditions = [];
+ let curWeight = 0;
// Iterate through items, allocating to containers
// let totalWeight = 0;
for (let i of sheetData.items) {
- let item = i.system;
- i.img = i.img || DEFAULT_TOKEN;
+ let item = i.system;
+ i.img = i.img || DEFAULT_TOKEN;
- if (i.type === 'ability') {
- abilities.push(i);
- } else if (i.type === 'weapon') {
- if (item.ranges.value == "" && item.ranges.medium > 0) {
- item.ranges.value = item.ranges.short + "/" + item.ranges.medium + "/" + item.ranges.long;
- item.ranges.medium = 0;
- }
-
- weapons.push(i);
+ if (i.type === 'ability') {
+ abilities.push(i);
+ } else if (i.type === 'item') {
+ gear.push(i);
+ curWeight += item.weight * item.quantity;
+ } else if (i.type === 'skill') {
+ skills.push(i);
+ } else if (i.type === 'armor') {
+ armors.push(i);
+ curWeight += item.weight;
+ } else if (i.type === 'weapon') {
+ //We need to update this from the old system.
+ if (item.ranges.value == "" && item.ranges.medium > 0) {
+ item.ranges.value = item.ranges.short + "/" + item.ranges.medium + "/" + item.ranges.long;
+ item.ranges.medium = 0;
}
+
+ weapons.push(i);
+ curWeight += item.weight;
+ } 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);
+ }
}
// Assign and return
actorData.abilities = abilities;
+ actorData.gear = gear;
+ actorData.skills = skills;
+ actorData.armors = armors;
actorData.weapons = weapons;
+ actorData.conditions = conditions;
}
/** @override */
@@ -143,25 +207,126 @@ export class MothershipCreatureSheet extends ActorSheet {
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
- // Delete Inventory Item
- html.find('.item-delete').click(ev => {
- const li = $(ev.currentTarget).parents(".item");
- this.actor.deleteEmbeddedDocuments("Item", [li.data("itemId")]);
- li.slideUp(200, () => this.render(false));
+ html.on('mousedown', '.char-pip-button', ev => {
+
+ const div = $(ev.currentTarget);
+ const targetName = div.data("key");
+
+ let amount = this.actor.system.xp.value;
+ let newAmount = amount;
+ let max = div.data("max");
+ let min = div.data("min");
+
+ if (event.button == 0) {
+ if (amount < max) {
+ newAmount = Number(amount) + 1;
+ }
+ } else if (event.button == 2) {
+ if (amount > min) {
+ newAmount = Number(amount) - 1;
+ }
+ }
+
+ this.actor.update({'system.xp.value': newAmount});
+
});
+ html.on('mousedown', '.treatment-button', ev => {
+ const li = ev.currentTarget.closest(".item");
+ //const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
+ var item;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
+
+ let amount = item.system.treatment.value;
+
+ if (event.button == 0) {
+ if (amount < 3) {
+ item.system.treatment.value = Number(amount) + 1;
+ }
+ } else if (event.button == 2) {
+ if (amount > 0) {
+ item.system.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");
+ //const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
+ var item;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
+ item.system.equipped = !item.system.equipped;
+ this.actor.updateEmbeddedDocuments('Item', [item]);
+ });
+
+ // Add Inventory Item
+ html.find('.item-create').click(this._onItemCreate.bind(this));
+
// Update Inventory Item
html.find('.item-edit').click(ev => {
- const li = $(ev.currentTarget).parents(".item");
- const item = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
- item.sheet.render(true);
+ const li = $(ev.currentTarget).parents(".item");
+ const item = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
+ item.sheet.render({force: true});
});
- // Rollable Attribute
- html.find('.stat-roll').click(ev => {
- const div = $(ev.currentTarget);
- const statName = div.data("key");
- this.actor.rollCheck(null, 'low', statName, null, null, null);
+ //Quantity adjuster
+ html.on('mousedown', '.item-quantity', ev => {
+ const li = ev.currentTarget.closest(".item");
+ //const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
+ var item;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
+ let amount = item.system.quantity;
+
+ if (event.button == 0) {
+ item.system.quantity = Number(amount) + 1;
+ } else if (event.button == 2) {
+ item.system.quantity = Number(amount) - 1;
+ }
+
+ this.actor.updateEmbeddedDocuments('Item', [item]);
+ });
+
+ //Severity adjuster
+ html.on('mousedown', '.severity', ev => {
+ const li = ev.currentTarget.closest(".item");
+ var item;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
+
+ let amount = item.system.severity;
+
+ if (event.button == 0) {
+ item.system.severity = Number(amount) + 1;
+ } else if (event.button == 2 && amount > 0) {
+ item.system.severity = Number(amount) - 1;
+ }
+
+ this.actor.updateEmbeddedDocuments('Item', [item]);
+ });
+
+ // Delete Inventory Item
+ html.find('.item-delete').click(ev => {
+ const li = $(ev.currentTarget).parents(".item");
+ this.actor.deleteEmbeddedDocuments("Item", [li.data("itemId")]);
+ li.slideUp(200, () => this.render(false));
+ });
+
+ //SKILLS
+ // Add Inventory Item
+ html.find('.skill-create').click(this._onSkillCreate.bind(this));
+
+ // Update Inventory Item
+ html.find('.skill-edit').click(ev => {
+ const li = $(ev.currentTarget).parents(".item");
+ const skill = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
+ skill.sheet.render({force: true});
});
//Weapons
@@ -170,139 +335,184 @@ export class MothershipCreatureSheet extends ActorSheet {
// Update Inventory Item
html.find('.weapon-edit').click(ev => {
- const li = $(ev.currentTarget).parents(".item");
- const weapon = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
- weapon.sheet.render(true);
+ const li = $(ev.currentTarget).parents(".item");
+ const weapon = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
+ weapon.sheet.render({force: true});
+ });
+
+ // Rollable Attribute
+ html.find('.stat-roll').click(ev => {
+ const div = $(ev.currentTarget);
+ const statName = div.data("key");
+ this.actor.rollCheck(null, 'low', statName, null, null, null);
+ });
+
+ // Rollable Skill
+ html.find('.skill-roll').click(ev => {
+ const li = event.currentTarget.closest(".item");
+ //const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+ var item;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
+ this.actor.rollCheck(null, null, null, item.name, item.system.bonus, null);
});
// Rollable Weapon
html.find('.weapon-roll').click(ev => {
const li = ev.currentTarget.closest(".item");
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
- let swarm_damage_roll_string =null;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+ //use swarm combat and damage settings if enabled
if (this.actor.system.swarm && this.actor.system.swarm.enabled){
- //replace the roll damage for swarm actors
- let new_dice_ammount = item.system.damage.match(/([0-9]+)d[0-9]+/i)[1]*this.getWoundsLeft(html);
- swarm_damage_roll_string = item.system.damage.replace(/([0-9]+)(d[0-9]+)/i,`${new_dice_ammount}$2`);
+ //calculate new damage string
+ let new_dice_ammount = item.system.damage.match(/([0-9]+)d[0-9]+/i)[1]*(this.actor.system.hits.max-this.actor.system.hits.value);
+ let swarm_damage_roll_string = item.system.damage.replace(/([0-9]+)(d[0-9]+)/i,`${new_dice_ammount}$2`);
+ this.actor.rollCheck(null, 'low', 'combat', null, null, item, swarm_damage_roll_string);
+ } else {
+ this.actor.rollCheck(null, 'low', 'combat', null, null, item);
}
- this.actor.rollCheck(null, 'low', 'combat', null, null, item,swarm_damage_roll_string);
});
// Rollable Damage
html.find('.dmg-roll').click(ev => {
const li = ev.currentTarget.closest(".item");
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
- let swarm_damage_roll_string =null;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+ //use swarm combat and damage settings if enabled
if (this.actor.system.swarm && this.actor.system.swarm.enabled){
- //replace the roll damage for swarm actors
- let new_dice_ammount = item.system.damage.match(/([0-9]+)d[0-9]+/i)[1]*this.getWoundsLeft(html);
- swarm_damage_roll_string = item.system.damage.replace(/([0-9]+)(d[0-9]+)/i,`${new_dice_ammount}$2`);
- }
- this.actor.rollCheck(null, null, 'damage', null, null, item,swarm_damage_roll_string);
- });
-
- //increase ammo
- html.on('mousedown', '.weapon-ammo', ev => {
- //dupe item to work on
- const li = ev.currentTarget.closest(".item");
- var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+ //calculate new damage string
+ let new_dice_ammount = item.system.damage.match(/([0-9]+)d[0-9]+/i)[1]*(this.actor.system.hits.max-this.actor.system.hits.value);
+ let swarm_damage_roll_string = item.system.damage.replace(/([0-9]+)(d[0-9]+)/i,`${new_dice_ammount}$2`);
+ this.actor.rollCheck(null, null, 'damage', null, null, item, swarm_damage_roll_string);
} else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+ this.actor.rollCheck(null, null, 'damage', null, null, item);
}
- let amount = item.system.ammo;
- //increase ammo
- if (event.button == 0) {
- if (amount >= 0) {
- item.system.ammo = Number(amount) + 1;
- }
- } else if (event.button == 2) {
- if (amount > 0) {
- item.system.ammo = Number(amount) - 1;
- }
- }
- //update ammo count
- this.actor.updateEmbeddedDocuments('Item', [item]);
- });
-
- //increase shots
- html.on('mousedown', '.weapon-shots', ev => {
- const li = ev.currentTarget.closest(".item");
- var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
- if (event.button == 0) {
- if (item.system.curShots >= 0 && item.system.curShots < item.system.shots && item.system.ammo > 0) {
- item.system.curShots = Number(item.system.curShots) + 1;
- item.system.ammo = Number(item.system.ammo) - 1;
- }
- } else if (event.button == 2) {
- if (item.system.curShots > 0) {
- item.system.curShots = Number(item.system.curShots) - 1;
- item.system.ammo = Number(item.system.ammo) + 1;
- }
- }
- this.actor.updateEmbeddedDocuments('Item', [item]);
- });
-
- //Reload Shots
- html.on('mousedown', '.weapon-reload', ev => {
- const li = ev.currentTarget.closest(".item");
- this.actor.reloadWeapon(li.dataset.itemId);
});
// Rollable Item/Anything with a description that we want to click on.
html.find('.description-roll').click(ev => {
- const li = ev.currentTarget.closest(".item");
- this.actor.printDescription(li.dataset.itemId, {
- event: ev
- });
+ const li = ev.currentTarget.closest(".item");
+ this.actor.printDescription(li.dataset.itemId, {
+ event: ev
+ });
+ });
+
+ //increase ammo
+ html.on('mousedown', '.weapon-ammo', ev => {
+ const li = ev.currentTarget.closest(".item");
+ //const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
+ var item;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+ let amount = item.system.ammo;
+ if (event.button == 0) {
+ if (amount >= 0) {
+ item.system.ammo = Number(amount) + 1;
+ }
+ } else if (event.button == 2) {
+ if (amount > 0) {
+ item.system.ammo = Number(amount) - 1;
+ }
+ }
+ this.actor.updateEmbeddedDocuments('Item', [item]);
+ });
+
+ //increase shots
+ html.on('mousedown', '.weapon-shots', ev => {
+ const li = ev.currentTarget.closest(".item");
+ //const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
+ var item;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+ if (event.button == 0) {
+ if (item.system.curShots >= 0 && item.system.curShots < item.system.shots && item.system.ammo > 0) {
+ item.system.curShots = Number(item.system.curShots) + 1;
+ item.system.ammo = Number(item.system.ammo) - 1;
+ }
+ } else if (event.button == 2) {
+ if (item.system.curShots > 0) {
+ item.system.curShots = Number(item.system.curShots) - 1;
+ item.system.ammo = Number(item.system.ammo) + 1;
+ }
+ }
+ this.actor.updateEmbeddedDocuments('Item', [item]);
+ });
+
+ //Reload Shots
+ html.on('mousedown', '.weapon-reload', ev => {
+ const li = ev.currentTarget.closest(".item");
+ this.actor.reloadWeapon(li.dataset.itemId);
+ });
+
+ //increase AP
+ html.on('mousedown', '.armor-ap', ev => {
+ const li = ev.currentTarget.closest(".item");
+ //const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
+ var item;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+ let amount = item.system.armorPoints;
+ if (event.button == 0) {
+ item.system.armorPoints = Number(amount) + 1;
+ } else if (event.button == 2) {
+ if (amount > 0) {
+ item.system.armorPoints = Number(amount) - 1;
+ }
+ }
+ this.actor.updateEmbeddedDocuments('Item', [item]);
+ });
+
+ //increase DR
+ html.on('mousedown', '.armor-dr', ev => {
+ const li = ev.currentTarget.closest(".item");
+ //const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
+ var item;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+ let amount = item.system.damageReduction;
+ if (event.button == 0) {
+ item.system.damageReduction = Number(amount) + 1;
+ } else if (event.button == 2) {
+ if (amount > 0) {
+ item.system.damageReduction = Number(amount) - 1;
+ }
+ }
+ this.actor.updateEmbeddedDocuments('Item', [item]);
+ });
+
+ //increase oxygen
+ html.on('mousedown', '.armor-oxy', ev => {
+ const li = ev.currentTarget.closest(".item");
+ //const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
+ var item;
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+ let amount = item.system.oxygenCurrent;
+ if (event.button == 0) {
+ if (amount < item.system.oxygenMax) {
+ item.system.oxygenCurrent = Number(amount) + 1;
+ }
+ } else if (event.button == 2) {
+ if (amount > 0) {
+ item.system.oxygenCurrent = Number(amount) - 1;
+ }
+ }
+ this.actor.updateEmbeddedDocuments('Item', [item]);
+ });
+
+ // Clicking on Armor
+ html.find('.armor-roll').click(ev => {
+ //roll panic check
+ this.actor.chooseCover();
});
// Drag events for macros.
if (this.actor.isOwner) {
- let handler = ev => this._onDragStart(ev);
+ let handler = ev => this._onDragStart(ev);
- html.find('li.dropitem').each((i, li) => {
- if (li.classList.contains("inventory-header")) return;
- li.setAttribute("draggable", true);
- li.addEventListener("dragstart", handler, false);
- });
+ html.find('li.dropitem').each((i, li) => {
+ if (li.classList.contains("inventory-header")) return;
+ li.setAttribute("draggable", true);
+ li.addEventListener("dragstart", handler, false);
+ });
}
- // update swarm combat
- html.find(`input[name="system.swarm.combat.value"]`).change(ev => {
- let new_combat_value = $(ev.currentTarget).prop('value') * this.getWoundsLeft(html);
- this.actor.update({"system.stats.combat.value":new_combat_value});
- });
- html.find(`input[name="system.hits.max"]`).change(ev => {
- //Max wounds changed -> calculate new combat stat
- if (this.actor.system.swarm && this.actor.system.swarm.enabled){
- let new_combat_value = html.find(`input[name="system.swarm.combat.value"]`).prop('value') * this.getWoundsLeft(html);
- this.actor.update({"system.stats.combat.value":new_combat_value});
- }
- });
- html.find(`input[name="system.hits.value"]`).change(ev => {
- //Current wounds changed -> calculate new combat stat
- if (this.actor.system.swarm && this.actor.system.swarm.enabled){
- let new_combat_value = html.find(`input[name="system.swarm.combat.value"]`).prop('value') * this.getWoundsLeft(html);
- this.actor.update({"system.stats.combat.value":new_combat_value});
- }
- });
+
}
@@ -320,11 +530,7 @@ export class MothershipCreatureSheet extends ActorSheet {
const type = header.dataset.type;
// Grab any data associated with this control.
var data;
- if (game.release.generation >= 12) {
- data = foundry.utils.duplicate(header.dataset);
- } else {
- data = duplicate(header.dataset);
- }
+ data = foundry.utils.duplicate(header.dataset);
// Initialize a default name.
const name = `New ${type.capitalize()}`;
// Prepare the item object.
@@ -340,6 +546,84 @@ export class MothershipCreatureSheet extends ActorSheet {
return this.actor.createEmbeddedDocuments("Item", [itemData]);
}
+ /**
+ * Handle creating a new Owned skill for the actor using initial data defined in the HTML dataset
+ * @param {Event} event The originating click event
+ * @private
+ */
+ _onSkillCreate(event) {
+ event.preventDefault();
+ const header = event.currentTarget;
+ // Get the type of item to create.
+ const type = header.dataset.type;
+ // Grab any data associated with this control.
+ var data;
+ data = foundry.utils.duplicate(header.dataset);
+ //const data = duplicate(header.dataset);
+ // Initialize a default name.
+ const name = `New Skill`;
+ // Prepare the item object.
+ const itemData = {
+ name: name,
+ type: type,
+ system: data
+ };
+
+ let d = new foundry.applications.api.DialogV2({
+ window: {title: `New Skill`},
+ classes: ["macro-popup-dialog"],
+ content: `
+
+
+
+
Rank
+
+
+ Trained
+ Expert
+ Master
+
+
+ `,
+ buttons: [
+ {
+ icon: 'fas fa-check',
+ action: "create",
+ label: "Create",
+ callback: (event, button, dialog) => {
+ var rank = button.form.querySelector('[id=\"rank\"]')?.value;
+ if (rank == "Trained")
+ itemData.system.bonus = 10;
+ if (rank == "Expert")
+ itemData.system.bonus = 15;
+ if (rank == "Master")
+ itemData.system.bonus = 20;
+
+ itemData.system.rank = rank;
+ itemData.name = button.form.querySelector('[id=\"name\"]')?.value
+ this.actor.createEmbeddedDocuments("Item", [itemData]);
+ }
+ },
+ {
+ icon: 'fas fa-times',
+ action: "cancel",
+ label: "Cancel",
+ callback: () => { }
+ }
+ ],
+ default: "roll",
+ close: () => { }
+ });
+ d.render({force: true});
+
+ // Finally, create the item!
+ return;
+ }
/**
* Handle clickable rolls.
@@ -363,4 +647,15 @@ export class MothershipCreatureSheet extends ActorSheet {
}
}
+ async _updateObject(event, formData) {
+ const actor = this.object;
+
+ var updateData;
+ updateData = foundry.utils.expandObject(formData);
+
+ await actor.update(updateData, {
+ diff: false
+ });
+ }
+
}
diff --git a/module/actor/ship-sheet-sbt.js b/module/actor/ship-sheet-sbt.js
index 379e23b..684ff00 100644
--- a/module/actor/ship-sheet-sbt.js
+++ b/module/actor/ship-sheet-sbt.js
@@ -9,7 +9,7 @@ import { DLShipMacros } from "../windows/ship-macros.js";
import { DLShipMegaDamage } from "../windows/ship-megadamage.js";
import { DLShipSetup } from "../windows/ship-setup.js";
-export class MothershipShipSheetSBT extends ActorSheet {
+export class MothershipShipSheetSBT extends foundry.appv1.sheets.ActorSheet {
/** @override */
static get defaultOptions() {
@@ -22,7 +22,8 @@ export class MothershipShipSheetSBT extends ActorSheet {
tabs: [{ navSelector: "#sheet-tabs", contentSelector: "#sheet-body", initial: "character" },
{ navSelector: "#side-tabs", contentSelector: "#side-body", initial: "close" }],
// { navSelector: "#side-tabs", contentSelector: "#side-body", initial: "crew" }],
- scrollY: [".sheet-body", "scroll-lock"]
+ scrollY: [".sheet-body", "scroll-lock"],
+ submitOnChange: true
}
return foundry.utils.mergeObject(super.defaultOptions, options);
@@ -35,7 +36,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
new DLShipDeckplan(this.actor, {
top: this.position.top + 40,
left: this.position.left + (this.position.width - 400) / 2
- }).render(true);
+ }).render({force: true});
}
_onOpenMacros(event) {
@@ -43,7 +44,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
new DLShipMacros(this.actor, {
top: this.position.top + 40,
left: this.position.left + (this.position.width - 400) / 2
- }).render(true);
+ }).render({force: true});
}
_onOpenSetup(event) {
@@ -51,7 +52,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
new DLShipSetup(this.actor, {
top: this.position.top + 40,
left: this.position.left + (this.position.width - 400) / 2
- }).render(true);
+ }).render({force: true});
}
_onOpenMegadamage(event) {
@@ -59,7 +60,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
new DLShipMegaDamage(this.actor, {
top: this.position.top + 40,
left: this.position.left + (this.position.width - 400) / 2
- }).render(true);
+ }).render({force: true});
}
/* -------------------------------------------- */
@@ -98,7 +99,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
superData.supplies.hull.percentage = " [ " + Math.round(maxHull * 0.25) + " | " + Math.round(maxHull * 0.5) + " | " + Math.round(maxHull * 0.75) + " ]";
data.data.enriched = [];
- data.data.enriched.biography = await TextEditor.enrichHTML(data.data.system.biography, {async: true});
+ data.data.enriched.biography = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.data.system.biography, {async: true});
//Run Setup
@@ -193,17 +194,16 @@ export class MothershipShipSheetSBT extends ActorSheet {
if (index != 0 && actorData.megadamage.hits.includes(index)) {
// megadamageHTML += `
 `;
megadamageHTML += `
 `;
- megadamageHTML += `
${index} | ${entry[1].text}
`;
+ megadamageHTML += `
${index} | ${entry[1].description}
`;
} else if (index != 0) {
// megadamageHTML += `
 `;
megadamageHTML += `
 `;
- megadamageHTML += `${index} | ${entry[1].text}
`;
+ megadamageHTML += `
${index} | ${entry[1].description}
`;
}
index++;
}
// } else {
- // megadamageHTML += entries[0][1].text + "
";
// }
await this.object.update({
@@ -270,7 +270,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item");
const item = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
- item.sheet.render(true);
+ item.sheet.render({force: true});
let amount = item.system.quantity;
@@ -284,11 +284,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
const li = ev.currentTarget.closest(".item");
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
let amount = item.system.quantity;
if (event.button == 0) {
@@ -318,7 +314,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
html.find('.weapon-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item");
const weapon = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
- weapon.sheet.render(true);
+ weapon.sheet.render({force: true});
});
// Rollable Weapon - not needed since individual ship weapons are not fired
@@ -391,11 +387,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
html.on('mousedown', '.weapon-ammo', ev => {
const li = ev.currentTarget.closest(".item");
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
let amount = item.system.ammo;
@@ -458,11 +450,8 @@ export class MothershipShipSheetSBT extends ActorSheet {
// Grab any data associated with this control.
var data;
- if (game.release.generation >= 12) {
- data = foundry.utils.duplicate(header.dataset);
- } else {
- data = duplicate(header.dataset);
- }
+ data = foundry.utils.duplicate(header.dataset);
+
// Initialize a default name.
const name = `New ${type.capitalize()}`;
diff --git a/module/actor/ship-sheet.js b/module/actor/ship-sheet.js
index a169b03..2ffa1cf 100644
--- a/module/actor/ship-sheet.js
+++ b/module/actor/ship-sheet.js
@@ -2,7 +2,7 @@
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
-export class MothershipShipSheet extends ActorSheet {
+export class MothershipShipSheet extends foundry.appv1.sheets.ActorSheet {
/** @override */
static get defaultOptions() {
@@ -11,7 +11,8 @@ export class MothershipShipSheet extends ActorSheet {
template: "systems/mosh/templates/actor/ship-sheet.html",
width: 700,
height: 650,
- tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }]
+ tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }],
+ submitOnChange: true
});
}
@@ -48,7 +49,7 @@ export class MothershipShipSheet extends ActorSheet {
superData.supplies.hull.percentage = " [ " + Math.round(maxHull * 0.25) + " | " + Math.round(maxHull * 0.5) + " | " + Math.round(maxHull * 0.75) + " ]";
data.data.enriched = [];
- data.data.enriched.biography = await TextEditor.enrichHTML(data.data.system.biography, {async: true});
+ data.data.enriched.biography = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.data.system.biography, {async: true});
return data.data;
}
@@ -114,7 +115,7 @@ export class MothershipShipSheet extends ActorSheet {
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item");
const item = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
- item.sheet.render(true);
+ item.sheet.render({force: true});
let amount = item.system.quantity;
@@ -127,11 +128,8 @@ export class MothershipShipSheet extends ActorSheet {
html.on('mousedown', '.item-quantity', ev => {
const li = ev.currentTarget.closest(".item");
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
let amount = item.system.quantity;
if (event.button == 0) {
@@ -161,28 +159,22 @@ export class MothershipShipSheet extends ActorSheet {
html.find('.weapon-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item");
const weapon = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
- weapon.sheet.render(true);
+ weapon.sheet.render({force: true});
});
// Rollable Weapon
html.find('.weapon-roll').click(ev => {
const li = ev.currentTarget.closest(".item");
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
this.actor.rollCheck(null, 'low', 'combat', null, null, item);
});
html.on('mousedown', '.weapon-ammo', ev => {
const li = ev.currentTarget.closest(".item");
var item;
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- } else {
- item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
- }
+ item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
+
let amount = item.system.ammo;
if (event.button == 0) {
@@ -239,11 +231,8 @@ export class MothershipShipSheet extends ActorSheet {
const type = header.dataset.type;
// Grab any data associated with this control.
var data;
- if (game.release.generation >= 12) {
- data = foundry.utils.duplicate(header.dataset);
- } else {
- data = duplicate(header.dataset);
- }
+ data = foundry.utils.duplicate(header.dataset);
+
// Initialize a default name.
const name = `New ${type.capitalize()}`;
diff --git a/module/item/class-sheet.js b/module/item/class-sheet.js
index cda65b5..46dd294 100644
--- a/module/item/class-sheet.js
+++ b/module/item/class-sheet.js
@@ -15,11 +15,8 @@ export class MothershipClassSheet extends MothershipItemSheet {
};
options.dragDrop = [{dragSelector: null, dropSelector: ".dropitem"}];
- if (game.release.generation >= 12) {
- return foundry.utils.mergeObject(super.defaultOptions, options);
- } else {
- return mergeObject(super.defaultOptions, options);
- }
+ return foundry.utils.mergeObject(super.defaultOptions, options);
+
}
@@ -61,21 +58,24 @@ export class MothershipClassSheet extends MothershipItemSheet {
}*/
data.enriched=[];
- data.enriched.description = await TextEditor.enrichHTML(data.system.description, {async: true});
+ data.enriched.description = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.system.description, {async: true});
return data;
}
async _onDrop(event){
await super._onDrop(event);
- const droppedUuid = TextEditor.getDragEventData(event);
+ const droppedUuid = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
if (droppedUuid.type != "Item"){
return;
}
const droppedObject = await fromUuid(droppedUuid.uuid);
if (droppedObject.type == "skill"){
- //todo: add a check if the skill already exist in the list and dont add it, (by id or by name?)
+ if(event.currentTarget == null) {
+ ui.notifications.error(game.i18n.localize("Mosh.Errors.NoDropTarget"));
+ return this.render(false);
+ }
console.log(event.currentTarget.id);
if(event.currentTarget.id == "skills.fixed"){
let parent_fixed_or = event.target.closest('div[id="skills.fixed.or"]');
@@ -83,12 +83,20 @@ export class MothershipClassSheet extends MothershipItemSheet {
if(parent_fixed_or){
let array_index = parent_fixed_or.getAttribute("index");
let skills = this.object.system.base_adjustment.skills_granted;
+ if(skills[array_index].includes(droppedObject.uuid)){
+ ui.notifications.warn(game.i18n.localize("Mosh.Errors.SkillAlreadyInList"));
+ return this.render(false);
+ }
skills[array_index].push(droppedObject.uuid);
this.object.update({"system.base_adjustment.skills_granted":skills});
return this.render(false);
}else{
let skills = this.object.system.base_adjustment.skills_granted;
+ if (skills.includes(droppedObject.uuid)){
+ ui.notifications.warn(game.i18n.localize("Mosh.Errors.SkillAlreadyInList"));
+ return this.render(false);
+ }
skills.push(droppedObject.uuid);
this.object.update({"system.base_adjustment.skills_granted":skills});
return this.render(false);
@@ -96,6 +104,10 @@ export class MothershipClassSheet extends MothershipItemSheet {
}
else if(event.currentTarget.id =="skills.common"){
let skills = this.object.system.common_skills;
+ if (skills.includes(droppedObject.uuid)){
+ ui.notifications.warn(game.i18n.localize("Mosh.Errors.SkillAlreadyInList"));
+ return this.render(false);
+ }
skills.push(droppedObject.uuid);
this.object.update({"system.common_skills":skills});
return this.render(false);
@@ -107,7 +119,10 @@ export class MothershipClassSheet extends MothershipItemSheet {
let parent_index = parent.data("itemId");
let options = this.object.system.selected_adjustment.choose_skill_or;
-
+ if(options[parent_index][index].from_list.includes(droppedObject.uuid)){
+ ui.notifications.warn(game.i18n.localize("Mosh.Errors.SkillAlreadyInList"));
+ return this.render(false);
+ }
options[parent_index][index].from_list.push(droppedObject.uuid);
this.object.update({"system.selected_adjustment.choose_skill_or":options});
@@ -247,48 +262,52 @@ export class MothershipClassSheet extends MothershipItemSheet {
event.preventDefault();
let choose_stat = this.object.system.selected_adjustment.choose_stat;
- let DialogContent = `
${game.i18n.localize("Mosh.CharacterGenerator.StatOption")} \
-
\
-
${game.i18n.localize("Mosh.Strength")}
\
-
${game.i18n.localize("Mosh.Speed")}
\
-
${game.i18n.localize("Mosh.Intellect")}
\
-
${game.i18n.localize("Mosh.Combat")}
\
-
${game.i18n.localize("Mosh.Sanity")}
\
-
${game.i18n.localize("Mosh.Fear")}
\
-
${game.i18n.localize("Mosh.Body")}
`
+ let DialogContent = `
+
${game.i18n.localize("Mosh.CharacterGenerator.StatOption")} \
+
\
+
${game.i18n.localize("Mosh.Strength")}
\
+
${game.i18n.localize("Mosh.Speed")}
\
+
${game.i18n.localize("Mosh.Intellect")}
\
+
${game.i18n.localize("Mosh.Combat")}
\
+
${game.i18n.localize("Mosh.Sanity")}
\
+
${game.i18n.localize("Mosh.Fear")}
\
+
${game.i18n.localize("Mosh.Body")}
+ `
- let d = new Dialog({
- title: "Select Stat",
+ let d = new foundry.applications.api.DialogV2({
+ window: {title: `Select Stat`},
+ classes: ["macro-popup-dialog"],
content: DialogContent,
- buttons: {
- create: {
- icon: '
',
+ buttons: [
+ {
+ icon: 'fas fa-check',
+ action: "create",
label: "Create",
- callback: (html) => {
+ callback: (event, button, dialog) => {
let new_stat_option = {
- modification: html.find('[id=\"modification\"]').prop("value"),
+ modification: button.form.querySelector('[id=\"modification\"]').value,
stats: [],
}
- if (html.find('[id=\"strength\"]')[0].checked){
+ if (button.form.querySelector('[id=\"strength\"]')?.checked){
new_stat_option.stats.push("strength");
}
- if (html.find('[id=\"speed\"]')[0].checked){
+ if (button.form.querySelector('[id=\"speed\"]')?.checked){
new_stat_option.stats.push("speed");
}
- if (html.find('[id=\"intellect\"]')[0].checked){
+ if (button.form.querySelector('[id=\"intellect\"]')?.checked){
new_stat_option.stats.push("intellect");
}
- if (html.find('[id=\"combat\"]')[0].checked){
+ if (button.form.querySelector('[id=\"combat\"]')?.checked){
new_stat_option.stats.push("combat");
}
- if (html.find('[id=\"sanity\"]')[0].checked){
+ if (button.form.querySelector('[id=\"sanity\"]')?.checked){
new_stat_option.stats.push("sanity");
}
- if (html.find('[id=\"fear\"]')[0].checked){
+ if (button.form.querySelector('[id=\"fear\"]')?.checked){
new_stat_option.stats.push("fear");
}
- if (html.find('[id=\"body\"]')[0].checked){
+ if (button.form.querySelector('[id=\"body\"]')?.checked){
new_stat_option.stats.push("body");
}
if(new_stat_option.stats.length < 2){
@@ -301,34 +320,21 @@ export class MothershipClassSheet extends MothershipItemSheet {
}
},
- cancel: {
- icon: '
',
+ {
+ icon: 'fas fa-times',
+ action: "cancel",
label: "Cancel",
callback: () => { }
}
- },
+ ],
default: "create",
close: () => { }
});
- d.render(true);
+ d.render({force: true});
// Finally, create the item!
return;
}
- /****
- async _updateObject(event, formData) {
- const item = this.object;
-
- var updateData;
- if (game.release.generation >= 12) {
- updateData = foundry.utils.expandObject(formData);
- } else {
- updateData = expandObject(formData);
- }
-
- await item.update(updateData, {
- diff: false
- });
- }*/
+
}
diff --git a/module/item/item-sheet.js b/module/item/item-sheet.js
index 702c510..512f7fb 100644
--- a/module/item/item-sheet.js
+++ b/module/item/item-sheet.js
@@ -2,7 +2,7 @@
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
*/
-export class MothershipItemSheet extends ItemSheet {
+export class MothershipItemSheet extends foundry.appv1.sheets.ItemSheet {
/** @override */
static get defaultOptions() {
@@ -50,7 +50,7 @@ export class MothershipItemSheet extends ItemSheet {
data.data.system.settings.androidPanic = game.settings.get("mosh", "androidPanic");
data.data.enriched = [];
- data.data.enriched.description = await TextEditor.enrichHTML(data.data.system.description, {async: true});
+ data.data.enriched.description = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.data.system.description, {async: true});
return data.data;
}
diff --git a/module/item/skill-sheet.js b/module/item/skill-sheet.js
index ab7223b..7b41b3b 100644
--- a/module/item/skill-sheet.js
+++ b/module/item/skill-sheet.js
@@ -11,11 +11,8 @@ export class MothershipSkillSheet extends MothershipItemSheet {
};
options.dragDrop = [{dragSelector: null, dropSelector: ".dropitem"}];
- if (game.release.generation >= 12) {
- return foundry.utils.mergeObject(super.defaultOptions, options);
- } else {
- return mergeObject(super.defaultOptions, options);
- }
+ return foundry.utils.mergeObject(super.defaultOptions, options);
+
}
/** @override */
@@ -35,7 +32,7 @@ export class MothershipSkillSheet extends MothershipItemSheet {
async _onDrop(event){
await super._onDrop(event);
- const droppedUuid = TextEditor.getDragEventData(event);
+ const droppedUuid = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
if (droppedUuid.type != "Item"){
return;
}
diff --git a/module/mosh.js b/module/mosh.js
index d2f88b2..2690ee6 100644
--- a/module/mosh.js
+++ b/module/mosh.js
@@ -46,31 +46,15 @@ Hooks.once('init', async function () {
// Register sheet application classes
- Actors.unregisterSheet("core", ActorSheet);
-
- Actors.registerSheet("mosh", MothershipActorSheet, {
- types: ['character'],
- makeDefault: true
- });
- Actors.registerSheet("mosh", MothershipCreatureSheet, {
- types: ['creature'],
- makeDefault: false
- });
-
- Actors.registerSheet("mosh", MothershipShipSheetSBT, {
- types: ['ship'],
- makeDefault: true
- });
-
- Actors.registerSheet("mosh", MothershipShipSheet, {
- types: ['ship'],
- makeDefault: false
- });
-
- Items.unregisterSheet("core", ItemSheet);
- Items.registerSheet("mosh", MothershipClassSheet, {types: ['class'], makeDefault: true });
- Items.registerSheet("mosh", MothershipSkillSheet, {types: ['skill'], makeDefault: true });
- Items.registerSheet("mosh", MothershipItemSheet, {
+ foundry.documents.collections.Actors.unregisterSheet("core", foundry.appv1.sheets.ActorSheet);
+ foundry.documents.collections.Actors.registerSheet("mosh", MothershipActorSheet, {types: ['character'], makeDefault: true});
+ foundry.documents.collections.Actors.registerSheet("mosh", MothershipCreatureSheet, {types: ['creature'], makeDefault: false});
+ foundry.documents.collections.Actors.registerSheet("mosh", MothershipShipSheetSBT, {types: ['ship'], makeDefault: true});
+ foundry.documents.collections.Actors.registerSheet("mosh", MothershipShipSheet, {types: ['ship'], makeDefault: false});
+ foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet);
+ foundry.documents.collections.Items.registerSheet("mosh", MothershipClassSheet, {types: ['class'], makeDefault: true});
+ foundry.documents.collections.Items.registerSheet("mosh", MothershipSkillSheet, {types: ['skill'], makeDefault: true});
+ foundry.documents.collections.Items.registerSheet("mosh", MothershipItemSheet, {
types: [
"item",
"weapon",
@@ -79,8 +63,10 @@ Hooks.once('init', async function () {
"module",
"condition",
"crew",
- "repair",],
- makeDefault: true });
+ "repair"
+ ],
+ makeDefault: true
+ });
// If you need to add Handlebars helpers, here are a few useful examples:
Handlebars.registerHelper('concat', function () {
@@ -135,87 +121,6 @@ Hooks.once("ready", async function () {
}
});
- //Calm & 1e/0e character updates
- // if the user has calm enabled at the start,
- if (game.settings.get('mosh','useCalm')) {
- //get list of actors
- let actorList = game.actors;
- let actorName = '';
- let minStart = null;
- let valueStart = null;
- let maxStart = null;
- let labelStart = '';
- let minEnd = null;
- let valueEnd = null;
- let maxEnd = null;
- let labelEnd = '';
- //loop through all actors and update their stress values
- actorList.forEach(function(actor){
- //loop through each result
- if (actor.type === 'character') {
- //set character name
- actorName = actor.name;
- //set current values
- minStart = actor.system.other.stress.min;
- valueStart = actor.system.other.stress.value;
- maxStart = actor.system.other.stress.max;
- labelStart = actor.system.other.stress.label;
- //if the label does not say Calm
- if (actor.system.other.stress.label != 'Calm') {
- //change it to calm
- actor.update({'system.other.stress.label': 'Calm'});
- //log
- labelEnd = 'Calm';
- }
- //if the MIN value is not 0, this is an old character
- if (actor.system.other.stress.min != 0) {
- //put this value as the maximum
- //change it to calm
- actor.update({'system.other.stress.max': actor.system.other.stress.min});
- //log
- maxEnd = actor.system.other.stress.min;
- //set the minimum to zero
- //change it to calm
- actor.update({'system.other.stress.min': 0});
- //log
- minEnd = 0;
- }
- //log change
- console.log(actorName + " stress.min changed from " + minStart + " to " + minEnd);
- console.log(actorName + " stress.max changed from " + maxStart + " to " + maxEnd);
- console.log(actorName + " stress.label changed from " + labelStart + " to " + labelEnd);
- //rerender this sheet
- actor.render();
- }
- });
- //user does not have calm enabled
- } else {
- //if the user has Zero edition enabled
- if (!game.settings.get('mosh','firstEdition')) {
- //loop through all actors and update their stress values
- actorList.forEach(function(actor){
- //loop through each result
- if (actor.type === 'character') {
- //set character name
- actorName = actor.name;
- //set current values
- maxStart = actor.system.other.stress.max;
- //if the max value, this is an old character
- if (actor.system.other.stress.max != 999) {
- //put this value as the maximum
- //change it to calm
- actor.update({'system.other.stress.max': 999});
- //log
- maxEnd = 999;
- }
- //log change
- console.log(actorName + " stress.max changed from " + maxStart + " to " + maxEnd);
- //rerender this sheet
- actor.render();
- }
- });
- }
- }
});
//add custom damage dice for MOSH
@@ -269,54 +174,44 @@ Hooks.once('diceSoNiceReady', (dice3d) => {
)
})
-//Hooks.on("preCreateActor", (createData) => {
-/**
- * Set default values for new actors' tokens
- */
+//set initial things when creating an actor
Hooks.on("preCreateActor", (document, createData, options, userId) => {
- let disposition = CONST.TOKEN_DISPOSITIONS.NEUTRAL;
+ console.log("preCreateActor fired for:", createData?.name, createData?.type);
- if (createData.type == "creature") {
- disposition = CONST.TOKEN_DISPOSITIONS.HOSTILE
- }
+ const disposition =
+ createData.type === "creature"
+ ? CONST.TOKEN_DISPOSITIONS.HOSTILE
+ : CONST.TOKEN_DISPOSITIONS.NEUTRAL;
- // Set wounds, advantage, and display name visibility
- foundry.utils.mergeObject(createData,
- {
- "token.bar1": { "attribute": "health" }, // Default Bar 1 to Health
- "token.bar2": { "attribute": "hits" }, // Default Bar 2 to Insanity
- "token.displayName": CONST.TOKEN_DISPLAY_MODES.OWNER_HOVER, // Default display name to be on owner hover
- "token.displayBars": CONST.TOKEN_DISPLAY_MODES.OWNER_HOVER, // Default display bars to be on owner hover
- "token.disposition": disposition, // Default disposition to neutral
- "token.name": createData.name // Set token name to actor name
- })
+ // Apply prototype token defaults (v12+)
+ document.updateSource({
+ "prototypeToken.bar1.attribute": "system.health", // <-- use full system path
+ "prototypeToken.bar2.attribute": "system.hits", // adjust to your schema
+ "prototypeToken.displayName": CONST.TOKEN_DISPLAY_MODES.OWNER_HOVER,
+ "prototypeToken.displayBars": CONST.TOKEN_DISPLAY_MODES.OWNER_HOVER,
+ "prototypeToken.disposition": disposition,
+ "prototypeToken.name": createData.name
+ });
- console.log(createData);
- console.log("Created!");
-
- if (createData.type == "character") {
- console.log("Got here");
- const prototypeToken = { disposition: 1, actorLink: true, vision: true}; // Set disposition to "Friendly"
- document.updateSource({ prototypeToken });
-
- }
-})
-
-Hooks.on('renderSidebarTab', async (app, html) => {
- console.log(app);
- console.log(app.options.id);
- if (app.options.id == "actors" || app.title == "Actors Directory") {
- console.log("testing~");
- let button = $(`
Import JSON`);
- button.click(function () {
- d.render(true);
+ if (createData.type === "character") {
+ document.updateSource({
+ "prototypeToken.disposition": CONST.TOKEN_DISPOSITIONS.FRIENDLY,
+ "prototypeToken.actorLink": true,
+ "prototypeToken.vision": true
});
- html.find(".directory-footer").append(button);
+
+ if (game.settings.get("mosh", "useCalm")) {
+ document.updateSource({
+ "system.other.stress.min": 0,
+ "system.other.stress.value": 85,
+ "system.other.stress.max": 85,
+ "system.other.stress.label": "Calm"
+ });
+ }
}
});
-
/* -------------------------------------------- */
/* Hotbar Macros */
/* -------------------------------------------- */
@@ -338,11 +233,8 @@ async function createMothershipMacro(data, slot) {
var actor = game.actors.get(itemUUID[1]);
var item;
- if (game.release.generation >= 12) {
item = foundry.utils.duplicate(actor.getEmbeddedDocument('Item',itemUUID[3]));
- } else {
- item = duplicate(actor.getEmbeddedDocument('Item',itemUUID[3]));
- }
+
console.log(item);
if (!item) return ui.notifications.warn("You can only create macro buttons for owned Items");
@@ -366,326 +258,6 @@ console.log(command);
return false;
}
-/* -------------------------------------------- */
-/* Actor from JSON */
-/* -------------------------------------------- */
-// If there's a better place for these, please do move them
-let skillValues = {
- "archeology": { "value": 10, "rank": "Trained" },
- "archaelogy": { "value": 10, "rank": "Trained" }, //The mobile app has a typo so needs this.
- "archaeology": { "value": 10, "rank": "Trained" },
- "art": { "value": 10, "rank": "Trained" },
- "athletics": { "value": 10, "rank": "Trained" },
- "botany": { "value": 10, "rank": "Trained" },
- "chemistry": { "value": 10, "rank": "Trained" },
- "computers": { "value": 10, "rank": "Trained" },
- "geology": { "value": 10, "rank": "Trained" },
- "industrialequipment": { "value": 10, "rank": "Trained" },
- "juryrigging": { "value": 10, "rank": "Trained" },
- "linguistics": { "value": 10, "rank": "Trained" },
- "mathematics": { "value": 10, "rank": "Trained" },
- "militarytraining": { "value": 10, "rank": "Trained" },
- "rimwise": { "value": 10, "rank": "Trained" },
- "theology": { "value": 10, "rank": "Trained" },
- "zerog": { "value": 10, "rank": "Trained" },
- "zoology": { "value": 10, "rank": "Trained" },
- "asteroidmining": { "value": 15, "rank": "Expert" },
- "ecology": { "value": 15, "rank": "Expert" },
- "explosives": { "value": 15, "rank": "Expert" },
- "fieldmedicine": { "value": 15, "rank": "Expert" },
- "firearms": { "value": 15, "rank": "Expert" },
- "hacking": { "value": 15, "rank": "Expert" },
- "handtohandcombat": { "value": 15, "rank": "Expert" },
- "mechanicalrepair": { "value": 15, "rank": "Expert" },
- "mysticism": { "value": 15, "rank": "Expert" },
- "pathology": { "value": 15, "rank": "Expert" },
- "pharmacology": { "value": 15, "rank": "Expert" },
- "physics": { "value": 15, "rank": "Expert" },
- "piloting": { "value": 15, "rank": "Expert" },
- "psychology": { "value": 15, "rank": "Expert" },
- "tactics": { "value": 15, "rank": "Expert" },
- "wildernesssurvival": { "value": 15, "rank": "Expert" },
- "artificialintenligence": { "value": 20, "rank": "Master" },
- "command": { "value": 20, "rank": "Master" },
- "cybernetics": { "value": 20, "rank": "Master" },
- "engineering": { "value": 20, "rank": "Master" },
- "exobiology": { "value": 20, "rank": "Master" },
- "hyperspace": { "value": 20, "rank": "Master" },
- "planetology": { "value": 20, "rank": "Master" },
- "robotics": { "value": 20, "rank": "Master" },
- "sophontology": { "value": 20, "rank": "Master" },
- "surgery": { "value": 20, "rank": "Master" },
- "xenoesoterism": { "value": 20, "rank": "Master" },
-}
-
-let conditions = {
- "adrenalinerush": "[+] on all rolls for the next 2d10 minutes. Reduce your Stress by 1d5.",
- "anxious": "Gain 1 Stress.",
- "jumpy": "Gain 1 Stress. All Close crewmembers gain 2 Stress.",
- "overwhelmed": "All actions at [-] for 1d10 minutes. Permanently raise your Minimum Stress by 1.",
- "coward": "Gain a new Condition: You must make a Fear Save to engage in violence or flee.",
- "frightened": "Gain a new Condition: Phobia: When encountering your Phobia make a Fear Save [-] or gain 1d5 Stress.",
- "nightmares": "Gain a new Condition: Sleep is difficult, gain [-] on all Rest Saves.",
- "lossofconfidence": "Gain a new Condition: Choose one of your Skills and lose that Skill's bonus.",
- "deflated": "Gain a new Condition: Whenever a Close crewmember fails a Save, gain 1 Stress.",
- "doomed": "Gain a new Condition: You feel cursed and unlucky. All Critical Successes are instead Critical Failures.",
- "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.",
- "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.",
- "deathwish": "For the next 24 hours, whenever you encounter a stranger or known enemy, you must make a Sanity Save or immediately attack them.",
- "propheticvision": "You immediately experience an intense hallucination or vision of an impending terror or horrific event. Gain 1 Stress.",
- "catatonic": "Become unresponsive and unmoving for 2d10 minutes. Reduce Stress by 1d10.",
- "rage": "Immediately attack the closest crewmember until you inflict at least 2d10 DMG. If there is no crewmember Close, you attack your surrounding environment.",
- "spiraling": "Gain a new Condition: You make Panic Checks with Disadvantage.",
- "compoundingproblems": "Roll twice on this table. Permanently raise your Minimum Stress by 1.",
- "heartattack": "Permanently lose 1 Wound. Gain [-] on all rolls for 1d10 hours. Permanently raise your Minimum Stress by 1.",
- "collapse": "You no longer control this character. Hand your sheet to the Warden and roll up a new character to play."
-}
-
-async function createActorFromJson(jsonData) {
- let actorData;
- let newActor;
- try {
- actorData = JSON.parse(jsonData);
- newActor = {
- "name": actorData.name,
- "type": "character",
- "img": "icons/svg/mystery-man.svg",
- "system": {
- "health": {
- "value": actorData.health,
- "max": actorData.maxHealth,
- "min": 0
- },
- "hits": {
- "value": actorData.wounds,
- "max": actorData.maxWounds
- },
- "biography": "",
- "notes": "",
- "weight": { "current": 0, "capacity": 0 },
- "settings": { "useCalm": false },
- "class": {
- "value": actorData.characterClass.charAt(0).toUpperCase() + actorData.characterClass.slice(1)
- },
- "rank": { "value": "" },
- "pronouns": { "value": actorData.pronouns },
- "credits": { "value": actorData.credits },
- "stressdesc": { "value": actorData.traumaResponse },
- "xp": { "value": 0, "html": 0, "selectedSkill": "" },
- "stressdesc": { "value": actorData.traumaResponse },
- "attributes": { "level": { "value": actorData.highScore } },
- "stats": {
- "strength": {
- "value": actorData.strength, "label": "Strength", "mod": 0
- },
- "speed": {
- "value": actorData.speed, "label": "Speed", "mod": 0
- },
- "intellect": {
- "value": actorData.intellect, "label": "Intellect", "mod": 0
- },
- "combat": {
- "value": actorData.combat, "label": "Combat", "mod": 0
- },
- "sanity": {
- "value": actorData.sanity, "label": "Sanity", "mod": 0
- },
- "fear": {
- "value": actorData.fear, "label": "Fear", "mod": 0
- },
- "body": {
- "value": actorData.body, "label": "Body", "mod": 0
- }
- },
- "other": {
- "stress": {
- "value": actorData.stress, "min": actorData.minStress, "label": "Stress"
- },
- "resolve": 0
- }
- }
- };
- var items = [];
- if (actorData.trinket) {
- items.push({
- "name": "Trinket: " + actorData.trinket, "type": "item"
- })
- }
- if (actorData.patch) {
- items.push({
- "name": "Patch: " + actorData.patch, "type": "item"
- })
- }
- // Equipment
- for (let i = 0; i < actorData.equipment.length; i++) {
- items.push({
- "name": actorData.equipment[i].name,
- "type": "item",
- "system": {
- "description": actorData.equipment[i].description,
- "cost": actorData.equipment[i].cost,
- "quantity": actorData.equipment[i].quantity
- },
- "img": "icons/svg/item-bag.svg",
- })
- }
- // Items
- for (let i = 0; i < actorData.items.length; i++) {
- items.push({
- "name": actorData.items[i].title,
- "type": "item",
- "system": {
- "description": actorData.items[i].description,
- "cost": actorData.items[i].cost,
- "quantity": actorData.items[i].quantity
- },
- "img": "icons/svg/item-bag.svg",
- })
- }
- // Armor
- for (let i = 0; i < actorData.armor.length; i++) {
- items.push({
- "name": actorData.armor[i].name,
- "type": "armor",
- "system": {
- "description": actorData.armor[i].notes,
- "cost": actorData.armor[i].cost,
- "bonus": actorData.armor[i].armorPoints,
- "equipped": actorData.armor[i].equipped
- },
- "img": "icons/svg/item-bag.svg",
- })
- }
- // Weapons
- for (let i = 0; i < actorData.weapons.length; i++) {
- console.log(actorData.weapons[i]);
- items.push({
- "name": actorData.weapons[i].name,
- "type": "weapon",
- "system": {
- "description": actorData.weapons[i].special,
- "cost": actorData.weapons[i].cost,
- "ranges": {
- "short": 0,
- "medium": 0,
- "long": 0,
- "value": actorData.weapons[i].weaponRange
- },
- "equipped": actorData.weapons[i].equipped,
- "critEffect": actorData.weapons[i].critical,
- "shots": actorData.weapons[i].shots,
- "curShots": actorData.weapons[i].shots,
- "ammo": actorData.weapons[i].magazines,
- "shotsPerFire": "1",
- "useAmmo": false,
- "ammoType": "",
- "critDmg": actorData.weapons[i].critical,
- "critEffect": "",
- "damage": actorData.weapons[i].damageString.replace("DMG", "")
- },
- "img": "icons/svg/item-bag.svg",
- })
- }
- // Skills
- for (let i = 0; i < actorData.skills.length; i++) {
-
- if(actorData.skills[i] == undefined) continue;
- console.log(actorData.skills[i]);
- console.log(skillValues[actorData.skills[i].toLowerCase()]);
-
- // Really betting for the app to only export base skills, if in the future
- // they add custom skills, they'll need to be checked if they even exist
- let words = actorData.skills[i].split(/(?=[A-Z])/);
- let skillName = words.map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
- items.push({
- "name": skillName,
- "type": "skill",
- "system": {
- "description": "",
- "bonus": skillValues[actorData.skills[i].toLowerCase()].value,
- "rank": skillValues[actorData.skills[i].toLowerCase()].rank
- },
- "img": "icons/svg/item-bag.svg",
- })
- }
- // Conditions
- for (let i = 0; i < actorData.conditions.length; i++) {
- // Same thing as skills
- let conName = actorData.conditions[i].conditionType;
- let words = conName.split(/(?=[A-Z])/);
- let name = words.map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
- //-Minor consideration since the app eports heartAttack for both
- if (actorData.characterClass == "android" && conName.toLowerCase() == "heartattack") {
- name = "Short Circuit"
- }
- items.push({
- "name": name,
- "type": "condition",
- "system": {
- "description": conditions[conName.toLowerCase()],
- "treatment": { "value": 0, "html": "" }
- },
- "img": "icons/svg/item-bag.svg",
- })
- }
- newActor.items = items
- } catch (err) {
- console.error(err);
- ui.notifications.error("Invalid JSON, make sure you exported it from the Mothership Companion App");
- return;
- }
-
- // Ensure the type of the actor (e.g., 'character') is correctly set according to your system
- newActor.type = 'character';
- // Here we assume the actorData structure is correctly formed according to your system needs
-
- // You might need additional checks/transformations depending on the JSON data structure
-
- try {
- await Actor.create(newActor);
- ui.notifications.info("Character imported successfully!");
- } catch (err) {
- console.error(err);
- ui.notifications.error("Failed to import character, check console for more details.");
- }
-}
-
-let d = new Dialog({
- title: "Mothership Companion JSON Import",
- content: `
-
- `,
- buttons: {
- upload: {
- label: "Upload",
- callback: (html) => {
- let fileInput = html.find('#json-upload')[0];
- let file = fileInput.files[0];
- let reader = new FileReader();
-
- reader.onload = (event) => {
- let contents = event.target.result;
- createActorFromJson(contents);
- };
-
- reader.onerror = (event) => {
- console.error(`File could not be read: ${event.target.error}`);
- };
-
- reader.readAsText(file);
- }
- }
- },
- default: "upload"
-})
-d.render(true);
-
-
/**
* Roll Macro from a Weapon.
* @param {string} itemName
@@ -706,11 +278,7 @@ function rollItemMacro(itemName) {
//get item id
itemId = game.user.character.items.getName(itemName)._id;
//get item
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(game.user.character.getEmbeddedDocument("Item", itemId));
- } else {
- item = duplicate(game.user.character.getEmbeddedDocument("Item", itemId));
- }
+ item = foundry.utils.duplicate(game.user.character.getEmbeddedDocument("Item", itemId));
//warn if no item
if (!item) return ui.notifications.warn(`Your controlled Actor does not have an item named ${itemName}`);
//roll action
@@ -733,11 +301,7 @@ function rollItemMacro(itemName) {
//get item id
itemId = token.actor.items.getName(itemName)._id;
//get item
- if (game.release.generation >= 12) {
- item = foundry.utils.duplicate(token.actor.getEmbeddedDocument("Item", itemId));
- } else {
- item = duplicate(token.actor.getEmbeddedDocument("Item", itemId));
- }
+ item = foundry.utils.duplicate(token.actor.getEmbeddedDocument("Item", itemId));
//warn if no item
if (!item) return ui.notifications.warn(`Your controlled Actor does not have an item named ${itemName}`);
//roll action
@@ -909,19 +473,20 @@ async function noCharSelected() {
}
//create final dialog data
const dialogData = {
- title: `Macro Issue`,
+ window: {title: `Macro Issue`},
+ classes: ["macro-popup-dialog"],
content: errorMessage,
- buttons: {}
+ buttons: [
+ {
+ label: `Ok`,
+ action: 'action_ok',
+ callback: () => { },
+ icon: 'fas fa-check'
+ }
+ ]
};
- //add buttons
- //Ok
- dialogData.buttons.cancel = {
- label: `Ok`,
- callback: () => { },
- icon: '
'
- };
//render dialog
- const dialog = new Dialog(dialogData).render(true);
+ const dialog = new foundry.applications.api.DialogV2(dialogData).render({force: true});
//log what was done
console.log(`Told the user that no character was selected.`);
});
@@ -941,19 +506,20 @@ async function noShipSelected() {
}
//create final dialog data
const dialogData = {
- title: `Macro Issue`,
+ window: {title: `Macro Issue`},
+ classes: ["macro-popup-dialog"],
content: errorMessage,
- buttons: {}
+ buttons: [
+ {
+ label: `Ok`,
+ action: 'action_ok',
+ callback: () => { },
+ icon: 'fas fa-check'
+ }
+ ]
};
- //add buttons
- //Ok
- dialogData.buttons.cancel = {
- label: `Ok`,
- callback: () => { },
- icon: '
'
- };
//render dialog
- const dialog = new Dialog(dialogData).render(true);
+ const dialog = foundry.applications.api.DialogV2(dialogData).render({force: true});
//log what was done
console.log(`Told the user that no character was selected.`);
});
@@ -1088,4 +654,30 @@ export async function fromIdUuid(id_uuid, options={}){
return game.macros.filter(i=> i.id == macroId)[0];
}
+}
+
+/**
+ * This function will format a number into a more readable string with appropriate suffixes.
+ * For example, 1500 becomes "1.5K", 2000000 becomes "2M", etc.
+ * It handles numbers in the trillions (t), billions (b), millions (m), and thousands (k).
+ * It also handles negative numbers and zero.
+ * At the end it appends 'cr' to denote credits.
+ * @namespace formatCreditsNumber
+ * @param {int} num Credits number to format.
+ * @returns {string} Credits , formatted string with appropriate suffix.
+ */
+export function formatCreditsNumber(num) {
+ const absNum = Math.abs(num);
+
+ if (absNum >= 1_000_000_000_000) {
+ return (num / 1_000_000_000_000).toFixed(1).replace(/\.0$/, '') + 'tcr';
+ } else if (absNum >= 1_000_000_000) {
+ return (num / 1_000_000_000).toFixed(1).replace(/\.0$/, '') + 'bcr';
+ } else if (absNum >= 1_000_000) {
+ return (num / 1_000_000).toFixed(1).replace(/\.0$/, '') + 'mcr';
+ } else if (absNum >= 1_000) {
+ return (num / 1_000).toFixed(1).replace(/\.0$/, '') + 'kcr';
+ } else {
+ return num.toString() + 'cr';
+ }
}
\ No newline at end of file
diff --git a/module/settings.js b/module/settings.js
index 0ddcc15..9b33412 100644
--- a/module/settings.js
+++ b/module/settings.js
@@ -196,15 +196,29 @@ export const registerSettings = function () {
valueStart = actor.system.other.stress.value;
maxStart = actor.system.other.stress.max;
labelStart = actor.system.other.stress.label;
- //convert min stress to max calm
- actor.update({'system.other.stress.max': Math.round(85-(actor.system.other.stress.min*3))});
- maxEnd = Math.round(85-(actor.system.other.stress.min*3));
+ //update max calm
+ //set max calm to 85 if min stress is 2
+ if (minStart === 2) {
+ actor.update({'system.other.stress.max': 85});
+ maxEnd = 85;
+ //otherwise convert the min stress to max calm
+ } else {
+ actor.update({'system.other.stress.max': Math.round(85-(actor.system.other.stress.value*3))});
+ maxEnd = Math.round(85-(actor.system.other.stress.value*3));
+ }
//set min stress to 0
actor.update({'system.other.stress.min': 0});
minEnd = 0;
- //convert stress to calm
- actor.update({'system.other.stress.value': Math.round(85-(actor.system.other.stress.value*3))});
- valueEnd = Math.round(85-(actor.system.other.stress.value*3));
+ //update calm
+ //set calm to 85 if stress is 2
+ if (valueStart === 2) {
+ actor.update({'system.other.stress.value': 85});
+ valueEnd = 85;
+ //otherwise convert stress to calm
+ } else {
+ actor.update({'system.other.stress.value': Math.round(85-(actor.system.other.stress.value*3))});
+ valueEnd = Math.round(85-(actor.system.other.stress.value*3));
+ }
//set stress label to Calm
actor.update({'system.other.stress.label': 'Calm'});
labelEnd = 'Calm';
@@ -234,7 +248,7 @@ export const registerSettings = function () {
//set min stress to 20 if > 20
if (Math.round((85-actor.system.other.stress.max)/3) > 20) {
actor.update({'system.other.stress.min': 20});
- minEnd = 2;
+ minEnd = 20;
//set min stress to 2 if < 2
} else if (Math.round((85-actor.system.other.stress.max)/3) < 2) {
actor.update({'system.other.stress.min': 2});
diff --git a/module/settings/creature-settings.js b/module/settings/creature-settings.js
index 7f8920c..3ec5b49 100644
--- a/module/settings/creature-settings.js
+++ b/module/settings/creature-settings.js
@@ -95,17 +95,22 @@ export class DLCreatureSettings extends FormApplication {
"system.swarm.enabled": ev.currentTarget.checked
});
- let new_combat = 0;
+ let swarm_combat = 0;
+ let current_combat = 0;
+
if (ev.currentTarget.checked) {
+ //set backup of current combat
+ swarm_combat = this.object.system.stats.combat.value;
//calculate new combat stat based on wounds,
- new_combat = this.object.system.swarm.combat.value * ( this.object.system.hits.max - this.object.system.hits.value);
+ current_combat = this.object.system.stats.combat.value * ( this.object.system.hits.max - this.object.system.hits.value);
}
else{
//revert back combat if swarm is disabled
- new_combat = this.object.system.swarm.combat.value;
+ current_combat = this.object.system.swarm.combat.value;
}
this.object.update({
- "system.stats.combat.value":new_combat
+ "system.stats.combat.value":current_combat,
+ "system.swarm.combat.value":swarm_combat
});
});
}
@@ -150,6 +155,6 @@ export class DLCreatureSettings extends FormApplication {
this.object.update({
formData
});
- this.object.sheet.render(true);
+ this.object.sheet.render({force: true});
}
}
diff --git a/module/windows/actor-generator.js b/module/windows/actor-generator.js
index 83dc792..e9af479 100644
--- a/module/windows/actor-generator.js
+++ b/module/windows/actor-generator.js
@@ -5,6 +5,7 @@ export class DLActorGenerator extends FormApplication {
options.classes = ["mosh", "sheet", "actor", "character"];
options.template = 'systems/mosh/templates/dialogs/actor-generator-dialog.html';
options.width = 800;
+ options.height = "auto";
options.dragDrop = [{ dragSelector: null, dropSelector: ".dropitem" }];
return options;
}
@@ -111,17 +112,17 @@ export class DLActorGenerator extends FormApplication {
let resultText = "";
let resultUuid = [];
for (var i = 0; i < tableResult.results.length; i++) {
- if (tableResult.results[i].type == "pack") {
+ if (tableResult.results[i].type == "pack" || tableResult.results[i].type == "document") {
if (type == "ul") {
- this._element.find(`ul[id="${id}.text"]`).append(`
${tableResult.results[i].text} `);
+ this._element.find(`ul[id="${id}.text"]`).append(`
${tableResult.results[i].name} `);
} else {
- resultText += tableResult.results[i].text + "; ";
+ resultText += tableResult.results[i].name + "; ";
}
- resultUuid.push(tableResult.results[i].documentId);
+ resultUuid.push(tableResult.results[i].documentUuid);
} else if (tableResult.results[i].type == "text") {
- let tableTextmatch = tableResult.results[i].text.match(/(.*)(@UUID.*)/i);
+ let tableTextmatch = tableResult.results[i].description.match(/(.*)(@UUID.*)/i);
if (type == "ul") {
- this._element.find(`ul[id="${id}.text"]`).append(`
${await TextEditor.enrichHTML(tableTextmatch[2].replace(/(\ )+/i, ""), { async: true })} `);
+ this._element.find(`ul[id="${id}.text"]`).append(`
${await foundry.applications.ux.TextEditor.implementation.enrichHTML(tableTextmatch[2].replace(/(\ )+/i, ""), { async: true })} `);
}
else {
resultText += tableTextmatch[1].replace(/(\
)+/i, "");
@@ -146,6 +147,7 @@ export class DLActorGenerator extends FormApplication {
async rollPatch(html) {
if (!this.patchTable) {
ui.notifications.error(game.i18n.localize("Mosh.CharacterGenerator.Error.NoClass"));
+ return;
}
await this.rollTable(html, "system.class.patch", this.patchTable);
@@ -153,6 +155,7 @@ export class DLActorGenerator extends FormApplication {
async rollTrinket(html) {
if (!this.trinketTable) {
ui.notifications.error(game.i18n.localize("Mosh.CharacterGenerator.Error.NoClass"));
+ return;
}
await this.rollTable(html, "system.class.trinket", this.trinketTable);
@@ -193,23 +196,29 @@ export class DLActorGenerator extends FormApplication {
*/
async fixedSkillOptionPopup(html, skillPopupOptions) {
return new Promise((resolve) => {
- let buttons_options = {};
+ if(skillPopupOptions.length == 0){
+ resolve(null);
+ return;
+ }
+ let buttons_options = [];
for (let j = 0; j < skillPopupOptions.length; j++) {
- buttons_options[j] = {
- icon: '
',
+ buttons_options.push({
+ icon: 'fas fa-check',
+ action: skillPopupOptions[j].name,
label: skillPopupOptions[j].name,
callback: () => resolve(skillPopupOptions[j].uuid),
- };
+ });
}
- let d = new Dialog({
- title: game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupTitle"),
- content: `
${game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupText")}
`,
+ let d = new foundry.applications.api.DialogV2({
+ window: {title: game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupTitle")},
+ classes: ["macro-popup-dialog"],
+ content: `
${game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupText")} `,
buttons: buttons_options,
default: "1",
//render: html => console.log("Register interactivity in the rendered dialog"),
//close: html => console.log("This always is logged no matter which option is chosen")
});
- d.render(true);
+ d.render({force: true});
});
}
@@ -220,7 +229,6 @@ export class DLActorGenerator extends FormApplication {
* @returns
*/
async updateSkillHtmlUl(html, skillsUuid) {
- //html.find(`ul[id="system.class.skils.text"]`).empty();
let new_skills = await html.find(`input[id="system.class.skills.uuid"]`).prop("value").split(",").filter(Boolean);
for (let i = 0; i < skillsUuid.length; i++) {
let skill = null;
@@ -242,7 +250,7 @@ export class DLActorGenerator extends FormApplication {
}
new_skills.push(skill.uuid);
/**we need to keep only the Uuid of the item, not the complete string (for now) */
- let li_html = `
${await TextEditor.enrichHTML(skill.name, { async: true })}`;
+ let li_html = `
${await foundry.applications.ux.TextEditor.implementation.enrichHTML(skill.name, { async: true })} `;
html.find(`ul[id="system.class.skils.text"]`).append(li_html);
}
@@ -321,18 +329,20 @@ export class DLActorGenerator extends FormApplication {
}
}
- let popUpContent = await renderTemplate(template, skillPopupData);
+ let popUpContent = await foundry.applications.handlebars.renderTemplate(template, skillPopupData);
return new Promise((resolve) => {
- let d = new Dialog({
- title: game.i18n.localize("Mosh.CharacterGenerator.SkillOption.PopupTitle"),
+ let d = new foundry.applications.api.DialogV2({
+ window: {title: game.i18n.localize("Mosh.CharacterGenerator.SkillOption.PopupTitle")},
+ classes: ["macro-popup-dialog"],
content: popUpContent,
- buttons: {
- "1": {
- icon: '
',
+ buttons: [
+ {
+ icon: 'fas fa-check',
+ action: `action_save`,
label: "Save",
- callback: (html) => {
- let form = html.find('form')[0];
+ callback: (event, button, dialog) => {
+ let form = button.form;
let formData = new FormData(form);
let new_skills = [];
formData.forEach((value, key) => {
@@ -345,11 +355,11 @@ export class DLActorGenerator extends FormApplication {
this.updateSkillHtmlUl(this._element, new_skills);
resolve();
}
- },
- },
+ }
+ ],
default: "1",
});
- d.render(true);
+ d.render({force: true});
});
}
@@ -361,29 +371,32 @@ export class DLActorGenerator extends FormApplication {
async showOptionsDialog(list_option_skills_or) {
let popupData = {options:list_option_skills_or};
- let popUpContent = await renderTemplate("systems/mosh/templates/dialogs/actor-generator/actor-generator-skill-option-choice-dialog.html", popupData);
+ let popUpContent = await foundry.applications.handlebars.renderTemplate("systems/mosh/templates/dialogs/actor-generator/actor-generator-skill-option-choice-dialog.html", popupData);
return new Promise((resolve) => {
-
- let buttonsData = {};
- for (let i=0;i
',
- label: list_option_skills_or[i].name,//game.i18n.localize("Mosh.CharacterGenerator.SkillOption.ChoiceWord") + ` ${i}`,
- callback: () => {
- resolve(list_option_skills_or[i]);
- }
-
- };
+ if(list_option_skills_or.length == 0){
+ resolve(null);
+ return;
}
- let d = new Dialog({
- title: game.i18n.localize("Mosh.CharacterGenerator.SkillOption.PopupTitle"),
+ let buttonsData = [];
+ for (let i=0;i {
+ resolve(list_option_skills_or[i]);
+ }
+ });
+ }
+ let d = new foundry.applications.api.DialogV2({
+ window: {title: game.i18n.localize("Mosh.CharacterGenerator.SkillOption.PopupTitle")},
+ classes: ["macro-popup-dialog"],
content: popUpContent,
- window:{width: 500,},
+ window:{width: 500},
buttons: buttonsData,
});
- d.render(true);
+ d.render({force: true});
});
}
@@ -395,6 +408,7 @@ export class DLActorGenerator extends FormApplication {
let class_uuid = html.find(`input[id="system.class.uuid"]`).prop("value");
if (class_uuid == "") {
ui.notifications.error(game.i18n.localize("Mosh.CharacterGenerator.SkillOption.Classerror"));
+ return;
}
let classObject = await fromUuid(class_uuid);
//empty previously existing skills
@@ -429,6 +443,48 @@ export class DLActorGenerator extends FormApplication {
}
}
+ /**
+ * Ask the user for the stat options, and apply the bonuses to the form.
+ * @param {Array} list_option_stats_and_saves
+ * @returns
+ */
+ async statOptions(list_option_stats_and_saves){
+ return new Promise((resolve) => {
+ if(list_option_stats_and_saves.length == 0){
+ resolve();
+ return;
+ }
+
+ for(let i =0;i {this._element.find(`input[name="system.stats.${option_stats_and_saves.stats[j]}.bonus"]`).prop("value", (parseInt(option_stats_and_saves.modification) + parseInt(prev_bonus)));
+ resolve();
+ }
+ });
+ }
+ let d = new foundry.applications.api.DialogV2({
+ window: {title: game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupTitle")},
+ classes: ["macro-popup-dialog"],
+ content: `
${game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupText")} (${option_stats_and_saves.modification}) `,
+ buttons: buttons_options,
+ default: "1",
+ //render: html => console.log("Register interactivity in the rendered dialog"),
+ //close: html => console.log("This always is logged no matter which option is chosen")
+ });
+ d.render({force: true});
+ }
+ }
+ });
+ }
+
/**
* Apply the changed or dropped class into the generator, stats, skills and table configuration.
* @param {uuid} classUuid
@@ -473,35 +529,11 @@ export class DLActorGenerator extends FormApplication {
* Stats
*/
//stats options
- let list_option_stats_and_saves = droppedObject.system.selected_adjustment.choose_stat;
- for(let i =0;i',
- label: option_stats_and_saves.stats[j],//.replace(/\.bonus/i,"").replace(/(.*)\.+/i,""),
- callback: () => this._element.find(`input[name="system.stats.${option_stats_and_saves.stats[j]}.bonus"]`).prop("value", (parseInt(option_stats_and_saves.modification) + parseInt(prev_bonus)))
- };
- }
- let d = new Dialog({
- title: game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupTitle"),
- content: `${game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupText")} (${option_stats_and_saves.modification})
`,
- buttons: buttons_options,
- default: "1",
- //render: html => console.log("Register interactivity in the rendered dialog"),
- //close: html => console.log("This always is logged no matter which option is chosen")
- });
- d.render(true);
- }
- }
+ await this.statOptions(droppedObject.system.selected_adjustment.choose_stat)
/**
* Skills
* */
-
await this.applyClassSkills(this._element);
@@ -510,7 +542,7 @@ export class DLActorGenerator extends FormApplication {
async _onDrop(event) {
await super._onDrop(event);
- const droppedUuid = TextEditor.getDragEventData(event);
+ const droppedUuid = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
if (droppedUuid.type != "Item") {
return;
}
@@ -538,7 +570,7 @@ export class DLActorGenerator extends FormApplication {
for (const [class_key, class_value] of class_options.entries()) {
html.find(`datalist[id="class_options"]`).append(
- `world.Item `
+ `world.Item `
);
}
@@ -547,8 +579,9 @@ export class DLActorGenerator extends FormApplication {
for (const [compendium_key, compendium_value] of compendiums.entries()) {
let classes = await compendium_value.getDocuments({ type: "class" });
for (const [class_key, class_value] of classes.entries()) {
+ let source = class_value.pack.replace(/\..*$/, "");
html.find(`datalist[id="class_options"]`).append(
- `${class_value.pack} `
+ ` `
);
}
}
@@ -711,8 +744,15 @@ export class DLActorGenerator extends FormApplication {
}
if (formData["system.class.loadout.uuid"]) {
let loadoutItems = formData["system.class.loadout.uuid"].split(",");
+ let itemsToAdd = {};
for (var i = 0; i < loadoutItems.length; i++) {
- await this.object.modifyItem(loadoutItems[i], 1);
+ if(!itemsToAdd[loadoutItems[i]]){
+ itemsToAdd[loadoutItems[i]] = 0;
+ }
+ itemsToAdd[loadoutItems[i]] += 1;
+ }
+ for (const [itemUuid, quantity] of Object.entries(itemsToAdd)) {
+ await this.object.modifyItem(itemUuid, quantity);
}
}
if (formData["system.class.patch.uuid"]) {
diff --git a/module/windows/ship-deckplan.js b/module/windows/ship-deckplan.js
index b2ac6ec..92502f8 100644
--- a/module/windows/ship-deckplan.js
+++ b/module/windows/ship-deckplan.js
@@ -1,4 +1,4 @@
-export class DLShipDeckplan extends ActorSheet {
+export class DLShipDeckplan extends foundry.appv1.sheets.ActorSheet {
static get defaultOptions() {
const options = super.defaultOptions;
options.id = 'sheet-modifiers';
@@ -57,6 +57,6 @@ export class DLShipDeckplan extends ActorSheet {
this.object.update({
formData
});
- this.object.sheet.render(true);
+ this.object.sheet.render({force: true});
}
}
diff --git a/module/windows/ship-macros.js b/module/windows/ship-macros.js
index 77d0253..38b8c00 100644
--- a/module/windows/ship-macros.js
+++ b/module/windows/ship-macros.js
@@ -1,7 +1,7 @@
import { DLShipDeckplan } from "../windows/ship-deckplan.js";
-export class DLShipMacros extends BaseSheet {
+export class DLShipMacros extends foundry.applications.sheets.BaseSheet {
static get defaultOptions() {
const options = super.defaultOptions;
options.id = 'sheet-modifiers';
@@ -27,7 +27,7 @@ export class DLShipMacros extends BaseSheet {
new DLShipDeckplan(this.object, {
top: this.position.top + 40,
left: this.position.left + (this.position.width - 400) / 2
- }).render(true);
+ }).render({force: true});
}
/**
diff --git a/module/windows/ship-megadamage.js b/module/windows/ship-megadamage.js
index 712a8d3..1ff287f 100644
--- a/module/windows/ship-megadamage.js
+++ b/module/windows/ship-megadamage.js
@@ -59,7 +59,7 @@ export class DLShipMegaDamage extends FormApplication {
megadamageSettingsHTML += `  `;
}
- megadamageSettingsHTML += `${index} | ${entry[1].text} `;
+ megadamageSettingsHTML += `${index} | ${entry[1].description} `;
}
index++;
}
diff --git a/packs/conditions_0e/000003.log b/packs/conditions_0e/000003.log
new file mode 100644
index 0000000..bd0cd1c
Binary files /dev/null and b/packs/conditions_0e/000003.log differ
diff --git a/packs/conditions_0e/000004.log b/packs/conditions_0e/000004.log
deleted file mode 100644
index e69de29..0000000
diff --git a/packs/conditions_0e/000005.ldb b/packs/conditions_0e/000005.ldb
deleted file mode 100644
index b03fcca..0000000
Binary files a/packs/conditions_0e/000005.ldb and /dev/null differ
diff --git a/packs/conditions_0e/LOG b/packs/conditions_0e/LOG
index 9436bf5..44c3d77 100644
--- a/packs/conditions_0e/LOG
+++ b/packs/conditions_0e/LOG
@@ -1,5 +1 @@
-2025/01/05-13:02:17.107 5884 Delete type=3 #1
-2025/01/05-13:03:25.761 43f4 Level-0 table #5: started
-2025/01/05-13:03:25.763 43f4 Level-0 table #5: 15355 bytes OK
-2025/01/05-13:03:25.766 43f4 Delete type=0 #3
-2025/01/05-13:03:25.778 43f4 Manual compaction at level-0 from '!items!1r6ruvSdxn2bHHIk' @ 72057594037927935 : 1 .. '!items!zbKI2RCl5h3vowoy' @ 0 : 0; will stop at (end)
+2025/08/28-23:53:35.362 20a8 Delete type=3 #1
diff --git a/packs/conditions_0e/MANIFEST-000002 b/packs/conditions_0e/MANIFEST-000002
index 48c0138..bbbc585 100644
Binary files a/packs/conditions_0e/MANIFEST-000002 and b/packs/conditions_0e/MANIFEST-000002 differ
diff --git a/packs/conditions_1e/000003.log b/packs/conditions_1e/000003.log
new file mode 100644
index 0000000..e99b3f0
Binary files /dev/null and b/packs/conditions_1e/000003.log differ
diff --git a/packs/conditions_1e/000004.log b/packs/conditions_1e/000004.log
deleted file mode 100644
index e69de29..0000000
diff --git a/packs/conditions_1e/000005.ldb b/packs/conditions_1e/000005.ldb
deleted file mode 100644
index 22a5ef2..0000000
Binary files a/packs/conditions_1e/000005.ldb and /dev/null differ
diff --git a/packs/conditions_1e/LOG b/packs/conditions_1e/LOG
index 518dad7..f5947ec 100644
--- a/packs/conditions_1e/LOG
+++ b/packs/conditions_1e/LOG
@@ -1,5 +1 @@
-2025/01/05-13:02:16.947 9e0 Delete type=3 #1
-2025/01/05-13:03:25.746 43f4 Level-0 table #5: started
-2025/01/05-13:03:25.749 43f4 Level-0 table #5: 24497 bytes OK
-2025/01/05-13:03:25.751 43f4 Delete type=0 #3
-2025/01/05-13:03:25.752 43f4 Manual compaction at level-0 from '!items!0ZAwhewvLBwX3opf' @ 72057594037927935 : 1 .. '!items!z0avrplKe6M0RcXk' @ 0 : 0; will stop at (end)
+2025/08/28-23:53:35.045 2e0c Delete type=3 #1
diff --git a/packs/conditions_1e/MANIFEST-000002 b/packs/conditions_1e/MANIFEST-000002
index 86ddf72..bbbc585 100644
Binary files a/packs/conditions_1e/MANIFEST-000002 and b/packs/conditions_1e/MANIFEST-000002 differ
diff --git a/packs/items_maintenance_1e/000003.log b/packs/items_maintenance_1e/000003.log
new file mode 100644
index 0000000..ae1a69f
Binary files /dev/null and b/packs/items_maintenance_1e/000003.log differ
diff --git a/packs/items_maintenance_1e/000004.log b/packs/items_maintenance_1e/000004.log
deleted file mode 100644
index e69de29..0000000
diff --git a/packs/items_maintenance_1e/000005.ldb b/packs/items_maintenance_1e/000005.ldb
deleted file mode 100644
index da1c2e2..0000000
Binary files a/packs/items_maintenance_1e/000005.ldb and /dev/null differ
diff --git a/packs/items_maintenance_1e/LOG b/packs/items_maintenance_1e/LOG
index 55a6958..9854e63 100644
--- a/packs/items_maintenance_1e/LOG
+++ b/packs/items_maintenance_1e/LOG
@@ -1,5 +1 @@
-2025/01/05-13:02:16.980 5f1c Delete type=3 #1
-2025/01/05-13:03:25.728 43f4 Level-0 table #5: started
-2025/01/05-13:03:25.732 43f4 Level-0 table #5: 24089 bytes OK
-2025/01/05-13:03:25.734 43f4 Delete type=0 #3
-2025/01/05-13:03:25.751 43f4 Manual compaction at level-0 from '!items!1HNvL7XEUcMQbLps' @ 72057594037927935 : 1 .. '!items!zRzb3Laiuw4ac6p0' @ 0 : 0; will stop at (end)
+2025/08/28-23:53:35.105 3368 Delete type=3 #1
diff --git a/packs/items_maintenance_1e/MANIFEST-000002 b/packs/items_maintenance_1e/MANIFEST-000002
index 33b93f8..bbbc585 100644
Binary files a/packs/items_maintenance_1e/MANIFEST-000002 and b/packs/items_maintenance_1e/MANIFEST-000002 differ
diff --git a/packs/macros_hotbar_0e.db b/packs/macros_hotbar_0e.db
index ae25f9b..ff084f0 100644
--- a/packs/macros_hotbar_0e.db
+++ b/packs/macros_hotbar_0e.db
@@ -1,9 +1,9 @@
-{"_id":"2xRvRAixuocjCm40","name":"Death Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/rolltables/death_save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n //pop up the death save dialog box\n new Dialog({\n title: `Death Save`,\n content: `\n \n \n
\n
\n
Death Save Whenever you reach 0 Health, make a Body Save: Failure means you die. Success means you fall unconscious, make a Death Save to find out when you regain consciousness. Crew members with a medscanner, relevant skills like First Aid or Biology, or scientists and androids who pass an Intellect Check can determine your condition. \n
\n
\n Select your roll type: \n `,\n buttons: {\n button1: {\n label: `Advantage`,\n callback: () => game.mosh.initRollTable(game.settings.get('mosh','table0eDeath'),`1d10 [+]`,`high`,false,false,null,null),\n icon: ` `\n },\n button2: {\n label: `Normal`,\n callback: () => game.mosh.initRollTable(game.settings.get('mosh','table0eDeath'),`1d10`,`high`,false,false,null,null),\n icon: ` `\n },\n button3: {\n label: `Disadvantage`,\n callback: () => game.mosh.initRollTable(game.settings.get('mosh','table0eDeath'),`1d10 [-]`,`high`,false,false,null,null),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"9Bq5LYoToO1sjCn3","name":"Gain Calm","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/relieve_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Gain Calm`,\n content: `\n \n \n \n
\n
\n
Gain Calm Occasionally, certain moments, places, or events can automatically calm you down. Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your Calm is getting close to 0, you should consider making a Rest Save - as the effects of a failed Panic Check can be devastating. \n
\n
\n Select your modification: \n `,\n buttons: {\n button1: {\n label: `Gain 5 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',5,null,true),\n icon: ` `\n },\n button2: {\n label: `Gain 10 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',10,null,true),\n icon: ` `\n },\n button3: {\n label: `Gain 1d20 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d20`,true),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"ilBclUmPwcd7aNQK","name":"Gain Stress","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/gain_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Gain Stress`,\n content: `\n \n \n \n
\n
\n
Gain Stress You gain 1 Stress every time you fail a Stat Check or Save. Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. Your Minimum Stress starts at 2, and the Maximum Stress you can have is 20. Any Stress you take over 20 instead reduces the most relevant Stat or Save by that amount. \n
\n
\n \n Select your modification: \n `,\n buttons: {\n button1: {\n label: `Gain 1 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',1,null,true),\n icon: ` `\n },\n button2: {\n label: `Gain 2 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',2,null,true),\n icon: ` `\n },\n button3: {\n label: `Gain 1d5 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d5`,true),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"D8ytoUTWfpq8A2td","name":"Lose Calm","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/gain_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Lose Calm`,\n content: `\n \n \n \n
\n
\n
Lose Calm Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. You live in a terrifying, uncaring universe, so your Maximum Calm caps out at 85 and cannot go lower than zero. \n
\n
\n \n Select your modification: \n `,\n buttons: {\n button1: {\n label: `Lose 5 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-5,null,true),\n icon: ` `\n },\n button2: {\n label: `Lose 10 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-10,null,true),\n icon: ` `\n },\n button3: {\n label: `Lose 1d20 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d20`,true),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"eyGvbBi1BhWSgfUP","name":"Panic Check","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n //pop up the panic check dialog box\n new Dialog({\n title: `Panic Check`,\n content: `\n \n \n
\n
\n
Panic Check Stress, Damage, and emotional wear and tear eventually bring characters to their breaking point. When that happens, there’s a chance they Panic. You determine this by making a Panic Check . Some results of the Panic Table are so severe that they leave a lasting impression on you. These are called Conditions , and they affect you until you are able to treat them.\n \n
\n
\n Select your roll type: \n `,\n buttons: {\n button1: {\n label: `Advantage`,\n callback: () => game.mosh.initRollTable(`panicCheck`,`[+]`,null,false,false,null,null),\n icon: ` `\n },\n button2: {\n label: `Normal`,\n callback: () => game.mosh.initRollTable(`panicCheck`,``,null,false,false,null,null),\n icon: ` `\n },\n button3: {\n label: `Disadvantage`,\n callback: () => game.mosh.initRollTable(`panicCheck`,`[-]`,null,false,false,null,null),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"NjLulaitEhqE55vO","name":"Relieve Stress","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/relieve_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Gain Stress`,\n content: `\n \n \n \n
\n
\n
Relieve Stress Occasionally, certain moments, places, or events can automatically relieve your stress. Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your stress is getting close to 20, you should consider making a Rest Save - as the effects of a failed Panic Check can be devastating. \n
\n
\n \n Select your modification: \n `,\n buttons: {\n button1: {\n label: `Relieve 1 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-1,null,true),\n icon: ` `\n },\n button2: {\n label: `Relieve 2 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-2,null,true),\n icon: ` `\n },\n button3: {\n label: `Relieve 1d5 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d5`,true),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"Um4q1dYwmu4QJ1nZ","name":"Rest Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/rest_save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Rest Save`,\n content: `\n \n \n
\n
\n
Rest Save You can relieve Stress by resting in a relatively safe place. If you succeed, reduce your Stress; if you fail, you gain 1 Stress instead. Players can gain Advantage on their Rest Save by participating in consensual sex, recreational drug use, a night of heavy drinking, prayer, or any other suitable leisure activity. Unsafe locations may incur Disadvantage.\n
\n
\n `,\n buttons: {\n button1: {\n label: `Next`,\n callback: () => game.mosh.initRollCheck(null,'low','restSave',null,null,null),\n icon: ` `\n }\n }\n },{width: 600,height: 237}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"P26f3SuZTpjMeaoG","name":"Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Save`,\n content: `\n \n \n
\n
\n
Save You have three Saves which represent your ability to withstand different kinds of trauma. In order to avoid certain dangers, you sometimes need to roll a Save. If you roll less than your Save you succeed. Otherwise you fail, and gain 1 Stress. A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check. \n
\n
\n \n \n
\n
\n
\n
\n \n Sanity: Rationalize logical inconsistencies in the universe, make sense out of chaos, detect illusions and mimicry, cope with Stress .\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Fear: Maintain a level head while struggling with fear, loneliness, depression, and other emotional surges.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Body: Employ quick reflexes and resist hunger, disease, or organisms that might try and invade your insides.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Armor: Resistance to damage sustained during combat, whether that be through bullets, claws, teeth, etc.\n \n
\n
\n
\n \n `,\n buttons: {\n button1: {\n label: `Next`,\n callback: (html) => game.mosh.initRollCheck(null,'low',html.find(\"input[name='save']:checked\").val(),null,null,null),\n icon: ` `\n }\n }\n },{width: 600,height: 545}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"Nj6wZcIYxunu7RI3","name":"Stat Check","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/stat_check.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Stat Check`,\n content: `\n \n \n \n
\n
\n
Stat Check You have four Stats which represent your ability to act under extreme pressure. Whenever you want to do something and the price for failure is high, roll a stat check. If you roll less than your Stat you succeed. Otherwise, you fail and gain 1 Stress. A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check. \n
\n
\n \n \n
\n
\n
\n
\n \n Strength: Holding airlocks closed, carrying fallen comrades, climbing, pushing, jumping.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Speed: Getting out of the cargo bay before the blast doors close, acting before someone (or something) else, running away.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Intellect: Recalling your training and experience under duress, thinking through difficult problems, inventing or fixing things.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Combat: Fighting for your life.\n \n
\n
\n
\n \n `,\n buttons: {\n button1: {\n label: `Next`,\n callback: (html) => game.mosh.initRollCheck(null,'low',html.find(\"input[name='stat']:checked\").val(),null,null,null),\n icon: ` `\n }\n }\n },{width: 600,height: 545}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
\ No newline at end of file
+{"_id":"2xRvRAixuocjCm40","name":"Death Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/rolltables/death_save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n //pop up the death save dialog box\n new new foundry.applications.api.DialogV2({\n window: {\n title: \"Death Save\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Death Save \n Whenever you reach 0 Health, make a Body Save: Failure means you die. Success means you fall unconscious, make a Death Save to find out when you regain consciousness. Crew members with a medscanner, relevant skills like First Aid or Biology, or scientists and androids who pass an Intellect Check can determine your condition.\n \n
\n
\n \n Select your roll type:\n
\n `,\n buttons: [\n {\n label: `Advantage`,\n action: `action_advantage`,\n callback: () => game.mosh.initRollTable(game.settings.get('mosh','table0eDeath'),`1d10 [+]`,`high`,false,false,null,null),\n icon: `fas fa-angle-double-up`\n },\n {\n label: `Normal`,\n action: `action_normal`,\n callback: () => game.mosh.initRollTable(game.settings.get('mosh','table0eDeath'),`1d10`,`high`,false,false,null,null),\n icon: `fas fa-minus`\n },\n {\n label: `Disadvantage`,\n action: `action_disadvantage`,\n callback: () => game.mosh.initRollTable(game.settings.get('mosh','table0eDeath'),`1d10 [-]`,`high`,false,false,null,null),\n icon: `fas fa-angle-double-down`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"9Bq5LYoToO1sjCn3","name":"Gain Calm","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/relieve_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Gain Calm\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Gain Calm \n Occasionally, certain moments, places, or events can automatically calm you down. Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your Calm is getting close to 0, you should consider making a Rest Save - as the effects of a failed Panic Check can be devastating.\n \n
\n
\n \n Select your modification:\n
\n `,\n buttons: [\n {\n label: `Gain 5 Calm`,\n action: `gain_5`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',5,null,true),\n icon: `fas fa-angle-up`\n },\n {\n label: `Gain 10 Calm`,\n action: `gain_10`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',10,null,true),\n icon: `fas fa-angle-double-up`\n },\n {\n label: `Gain 1d20 Calm`,\n action: `gain_1d20`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d20`,true),\n icon: `fas fa-arrow-circle-up`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"ilBclUmPwcd7aNQK","name":"Gain Stress","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/gain_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Gain Stress\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Gain Stress \n You gain 1 Stress every time you fail a Stat Check or Save. Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. Your Minimum Stress starts at 2, and the Maximum Stress you can have is 20. Any Stress you take over 20 instead reduces the most relevant Stat or Save by that amount.\n \n
\n
\n \n Select your modification:\n
\n `,\n buttons: [\n {\n label: `Gain 1 Stress`,\n action: `gain_1`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',1,null,true),\n icon: `fas fa-angle-up`\n },\n {\n label: `Gain 2 Stress`,\n action: `gain_2`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',2,null,true),\n icon: `fas fa-angle-double-up`\n },\n {\n label: `Gain 1d5 Stress`,\n action: `gain_1d5`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d5`,true),\n icon: `fas fa-arrow-circle-up`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"D8ytoUTWfpq8A2td","name":"Lose Calm","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/gain_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Lose Calm\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Lose Calm \n Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. You live in a terrifying, uncaring universe, so your Maximum Calm caps out at 85 and cannot go lower than zero.\n \n
\n
\n \n Select your modification:\n
\n `,\n buttons: [\n {\n label: `Lose 5 Calm`,\n action: `lose_5`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-5,null,true),\n icon: `fas fa-angle-down`\n },\n {\n label: `Lose 10 Calm`,\n action: `lose_10`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-10,null,true),\n icon: `fas fa-angle-double-down`\n },\n {\n label: `Lose 1d20 Calm`,\n action: `lose_1d20`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d20`,true),\n icon: `fas fa-arrow-circle-down`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"eyGvbBi1BhWSgfUP","name":"Panic Check","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n //pop up the panic check dialog box\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Panic Check\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Panic Check \n Stress, Damage, and emotional wear and tear eventually bring characters to their breaking point. When that happens, there’s a chance they Panic. You determine this by making a Panic Check . Some results of the Panic Table are so severe that they leave a lasting impression on you. These are called Conditions , and they affect you until you are able to treat them.\n \n
\n
\n \n Select your roll type:\n
\n `,\n buttons: [\n {\n label: `Advantage`,\n action: `action_advantage`,\n callback: () => game.mosh.initRollTable(`panicCheck`,`[+]`,null,false,false,null,null),\n icon: `fas fa-angle-double-up`\n },\n {\n label: `Normal`,\n action: `action_normal`,\n callback: () => game.mosh.initRollTable(`panicCheck`,``,null,false,false,null,null),\n icon: `fas fa-minus`\n },\n {\n label: `Disadvantage`,\n action: `action_disadvantage`,\n callback: () => game.mosh.initRollTable(`panicCheck`,`[-]`,null,false,false,null,null),\n icon: `fas fa-angle-double-down`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"NjLulaitEhqE55vO","name":"Relieve Stress","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/relieve_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Relieve Stress\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Relieve Stress \n Occasionally, certain moments, places, or events can automatically relieve your stress. Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your stress is getting close to 20, you should consider making a Rest Save - as the effects of a failed Panic Check can be devastating.\n \n
\n
\n \n Select your modification:\n
\n `,\n buttons: [\n {\n label: `Relieve 1 Stress`,\n action: `relieve_1`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-1,null,true),\n icon: `fas fa-angle-down`\n },\n {\n label: `Relieve 2 Stress`,\n action: `relieve_2`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-2,null,true),\n icon: `fas fa-angle-double-down`\n },\n {\n label: `Relieve 1d5 Stress`,\n action: `relieve_1d5`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d5`,true),\n icon: `fas fa-arrow-circle-down`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"Um4q1dYwmu4QJ1nZ","name":"Rest Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/rest_save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Rest Save\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Rest Save \n You can relieve Stress by resting in a relatively safe place. If you succeed, reduce your Stress; if you fail, you gain 1 Stress instead. Players can gain Advantage on their Rest Save by participating in consensual sex, recreational drug use, a night of heavy drinking, prayer, or any other suitable leisure activity. Unsafe locations may incur Disadvantage.\n \n
\n
\n `,\n buttons: [\n {\n label: `Next`,\n action: `next`,\n callback: () => game.mosh.initRollCheck(null,'low','restSave',null,null,null),\n icon: `fas fa-chevron-circle-right`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"P26f3SuZTpjMeaoG","name":"Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Save\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Save \n You have three Saves which represent your ability to withstand different kinds of trauma. In order to avoid certain dangers, you sometimes need to roll a Save. If you roll less than your Save you succeed. Otherwise you fail, and gain 1 Stress. A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.\n \n
\n
\n \n \n
\n
\n
\n
\n \n Sanity: Rationalize logical inconsistencies in the universe, make sense out of chaos, detect illusions and mimicry, cope with Stress .\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Fear: Maintain a level head while struggling with fear, loneliness, depression, and other emotional surges.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Body: Employ quick reflexes and resist hunger, disease, or organisms that might try and invade your insides.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Armor: Resistance to damage sustained during combat, whether that be through bullets, claws, teeth, etc.\n \n
\n
\n
\n \n `,\n buttons: [\n {\n label: `Next`,\n action: `next`,\n callback: (html) => game.mosh.initRollCheck(null,'low',html.find(\"input[name='save']:checked\").val(),null,null,null),\n icon: `fas fa-chevron-circle-right`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"Nj6wZcIYxunu7RI3","name":"Stat Check","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/stat_check.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Stat Check\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Stat Check \n You have four Stats which represent your ability to act under extreme pressure. Whenever you want to do something and the price for failure is high, roll a stat check. If you roll less than your Stat you succeed. Otherwise, you fail and gain 1 Stress. A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.\n \n
\n
\n \n \n
\n
\n
\n
\n \n Strength: Holding airlocks closed, carrying fallen comrades, climbing, pushing, jumping.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Speed: Getting out of the cargo bay before the blast doors close, acting before someone (or something) else, running away.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Intellect: Recalling your training and experience under duress, thinking through difficult problems, inventing or fixing things.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Combat: Fighting for your life.\n \n
\n
\n
\n \n `,\n buttons: [\n {\n label: `Next`,\n action: `next`,\n callback: (html) => game.mosh.initRollCheck(null,'low',html.find(\"input[name='stat']:checked\").val(),null,null,null),\n icon: `fas fa-chevron-circle-right`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
\ No newline at end of file
diff --git a/packs/macros_hotbar_0e/000003.log b/packs/macros_hotbar_0e/000003.log
new file mode 100644
index 0000000..46f4461
Binary files /dev/null and b/packs/macros_hotbar_0e/000003.log differ
diff --git a/packs/macros_hotbar_0e/000004.log b/packs/macros_hotbar_0e/000004.log
deleted file mode 100644
index e69de29..0000000
diff --git a/packs/macros_hotbar_0e/000005.ldb b/packs/macros_hotbar_0e/000005.ldb
deleted file mode 100644
index bda4dca..0000000
Binary files a/packs/macros_hotbar_0e/000005.ldb and /dev/null differ
diff --git a/packs/macros_hotbar_0e/LOG b/packs/macros_hotbar_0e/LOG
index d7aab38..5845be9 100644
--- a/packs/macros_hotbar_0e/LOG
+++ b/packs/macros_hotbar_0e/LOG
@@ -1,5 +1 @@
-2025/01/05-13:02:17.136 9e0 Delete type=3 #1
-2025/01/05-13:03:25.772 43f4 Level-0 table #5: started
-2025/01/05-13:03:25.775 43f4 Level-0 table #5: 24937 bytes OK
-2025/01/05-13:03:25.778 43f4 Delete type=0 #3
-2025/01/05-13:03:25.778 43f4 Manual compaction at level-0 from '!macros!2xRvRAixuocjCm40' @ 72057594037927935 : 1 .. '!macros!ilBclUmPwcd7aNQK' @ 0 : 0; will stop at (end)
+2025/08/28-23:53:35.415 20a8 Delete type=3 #1
diff --git a/packs/macros_hotbar_0e/MANIFEST-000002 b/packs/macros_hotbar_0e/MANIFEST-000002
index f492462..bbbc585 100644
Binary files a/packs/macros_hotbar_0e/MANIFEST-000002 and b/packs/macros_hotbar_0e/MANIFEST-000002 differ
diff --git a/packs/macros_hotbar_1e.db b/packs/macros_hotbar_1e.db
index bde4bf0..2346994 100644
--- a/packs/macros_hotbar_1e.db
+++ b/packs/macros_hotbar_1e.db
@@ -1,11 +1,11 @@
{"_id":"6wsDxyoKPHxpoHtF","name":"Cover","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/attributes/armor.png","command":"prepCover();\n\n//tell the actor to run the function\nasync function prepCover() {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //is there a selected character? warn if no\n if (!game.user.character) {\n //warn player\n game.mosh.noCharSelected();\n } else {\n //run the function for the player's 'Selected Character'\n game.user.character.chooseCover();\n }\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //is there a selected character? warn if no\n if (!canvas.tokens.controlled.length) {\n //warn player\n game.mosh.noCharSelected();\n } else {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.chooseCover();\n });\n }\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"NsRHfRuuNGPfkYVf","name":"Death Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/rolltables/death_save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n //pop up the death save dialog box\n new Dialog({\n title: `Death Save`,\n content: `\n \n \n
\n
\n
Death Save Your character is incapacitated when you receive a fatal wound, or once your Current Wounds equal your Maximum Wounds. As soon as someone spends a turn checking your vitals, make a Death Save to reveal your fate. If your death seems imminent, make your last moments count: save someone’s life, solve an important mystery, or give the others time to escape. \n
\n
\n Select your roll type: \n `,\n buttons: {\n button1: {\n label: `Advantage`,\n callback: () => game.mosh.initRollTable(game.settings.get('mosh','table1eDeath'),`1d10 [+]`,`low`,true,false,null,null),\n icon: ` `\n },\n button2: {\n label: `Normal`,\n callback: () => game.mosh.initRollTable(game.settings.get('mosh','table1eDeath'),`1d10`,`low`,true,false,null,null),\n icon: ` `\n },\n button3: {\n label: `Disadvantage`,\n callback: () => game.mosh.initRollTable(game.settings.get('mosh','table1eDeath'),`1d10 [-]`,`low`,true,false,null,null),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"GSFEBhrKC9yuD88V","name":"Gain Calm","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/relieve_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Gain Calm`,\n content: `\n \n \n \n
\n
\n
Gain Calm Occasionally, certain moments, places, or events can automatically calm you down. Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your Calm is getting close to 0, you should consider making a Rest Save - as the effects of a failed Panic Check can be devastating. \n
\n
\n Select your modification: \n `,\n buttons: {\n button1: {\n label: `Gain 5 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',5,null,true),\n icon: ` `\n },\n button2: {\n label: `Gain 10 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',10,null,true),\n icon: ` `\n },\n button3: {\n label: `Gain 1d20 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d20`,true),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"X0L0NnWt53b0rHYG","name":"Gain Stress","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/gain_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Gain Stress`,\n content: `\n \n \n \n
\n
\n
Gain Stress You gain 1 Stress every time you fail a Stat Check or Save. Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. Your Minimum Stress starts at 2, and the Maximum Stress you can have is 20. Any Stress you take over 20 instead reduces the most relevant Stat or Save by that amount. \n
\n
\n \n Select your modification: \n `,\n buttons: {\n button1: {\n label: `Gain 1 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',1,null,true),\n icon: ` `\n },\n button2: {\n label: `Gain 2 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',2,null,true),\n icon: ` `\n },\n button3: {\n label: `Gain 1d5 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d5`,true),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"trU0DtBJvJCPddsQ","name":"Lose Calm","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/gain_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Lose Calm`,\n content: `\n \n \n \n
\n
\n
Lose Calm Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. You live in a terrifying, uncaring universe, so your Maximum Calm caps out at 85 and cannot go lower than zero. \n
\n
\n \n Select your modification: \n `,\n buttons: {\n button1: {\n label: `Lose 5 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-5,null,true),\n icon: ` `\n },\n button2: {\n label: `Lose 10 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-10,null,true),\n icon: ` `\n },\n button3: {\n label: `Lose 1d20 Calm`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d20`,true),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"IgWvaabVqzKDzLL4","name":"Panic Check","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n //pop up the panic check dialog box\n new Dialog({\n title: `Panic Check`,\n content: `\n \n \n
\n
\n
Panic Check Stress, Damage, and emotional wear and tear eventually bring characters to their breaking point. When that happens, there’s a chance they Panic. You determine this by making a Panic Check . Some results of the Panic Table are so severe that they leave a lasting impression on you. These are called Conditions , and they affect you until you are able to treat them.\n \n
\n
\n Select your roll type: \n `,\n buttons: {\n button1: {\n label: `Advantage`,\n callback: () => game.mosh.initRollTable(`panicCheck`,`[+]`,null,false,false,null,null),\n icon: ` `\n },\n button2: {\n label: `Normal`,\n callback: () => game.mosh.initRollTable(`panicCheck`,``,null,false,false,null,null),\n icon: ` `\n },\n button3: {\n label: `Disadvantage`,\n callback: () => game.mosh.initRollTable(`panicCheck`,`[-]`,null,false,false,null,null),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"GaadOTppoqNFWZhV","name":"Relieve Stress","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/relieve_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Gain Stress`,\n content: `\n \n \n \n
\n
\n
Relieve Stress Occasionally, certain moments, places, or events can automatically relieve your stress. Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your stress is getting close to 20, you should consider making a Rest Save - as the effects of a failed Panic Check can be devastating. \n
\n
\n \n Select your modification: \n `,\n buttons: {\n button1: {\n label: `Relieve 1 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-1,null,true),\n icon: ` `\n },\n button2: {\n label: `Relieve 2 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-2,null,true),\n icon: ` `\n },\n button3: {\n label: `Relieve 1d5 Stress`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d5`,true),\n icon: ` `\n }\n }\n },{width: 600,height: 265}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"iyonscW5QiQdQbyJ","name":"Rest Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/rest_save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Rest Save`,\n content: `\n \n \n
\n
\n
Rest Save You can relieve Stress by resting in a relatively safe place. If you succeed, reduce your Stress; if you fail, you gain 1 Stress instead. Players can gain Advantage on their Rest Save by participating in consensual sex, recreational drug use, a night of heavy drinking, prayer, or any other suitable leisure activity. Unsafe locations may incur Disadvantage.\n
\n
\n `,\n buttons: {\n button1: {\n label: `Next`,\n callback: () => game.mosh.initRollCheck(null,'low','restSave',null,null,null),\n icon: ` `\n }\n }\n },{width: 600,height: 237}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"kb3tvYdTSWnzQRfw","name":"Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Save`,\n content: `\n \n \n
\n
\n
Save You have three Saves which represent your ability to withstand different kinds of trauma. In order to avoid certain dangers, you sometimes need to roll a Save. If you roll less than your Save you succeed. Otherwise you fail, and gain 1 Stress. A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check. \n
\n
\n \n \n
\n
\n
\n
\n \n Sanity: Rationalize logical inconsistencies in the universe, make sense out of chaos, detect illusions and mimicry, cope with Stress .\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Fear: Maintain a level head while struggling with fear, loneliness, depression, and other emotional surges.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Body: Employ quick reflexes and resist hunger, disease, or organisms that might try and invade your insides.\n \n
\n
\n
\n \n `,\n buttons: {\n button1: {\n label: `Next`,\n callback: (html) => game.mosh.initRollCheck(null,'low',html.find(\"input[name='save']:checked\").val(),null,null,null),\n icon: ` `\n }\n }\n },{width: 600,height: 470}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"2u4a5gEogtLd3XQz","name":"Stat Check","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/stat_check.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new Dialog({\n title: `Stat Check`,\n content: `\n \n \n \n
\n
\n
Stat Check You have four Stats which represent your ability to act under extreme pressure. Whenever you want to do something and the price for failure is high, roll a stat check. If you roll less than your Stat you succeed. Otherwise, you fail and gain 1 Stress. A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check. \n
\n
\n \n \n
\n
\n
\n
\n \n Strength: Holding airlocks closed, carrying fallen comrades, climbing, pushing, jumping.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Speed: Getting out of the cargo bay before the blast doors close, acting before someone (or something) else, running away.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Intellect: Recalling your training and experience under duress, thinking through difficult problems, inventing or fixing things.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Combat: Fighting for your life.\n \n
\n
\n
\n \n `,\n buttons: {\n button1: {\n label: `Next`,\n callback: (html) => game.mosh.initRollCheck(null,'low',html.find(\"input[name='stat']:checked\").val(),null,null,null),\n icon: ` `\n }\n }\n },{width: 600,height: 545}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"ZzKgfEmRdvDfyBMS","name":"Wound Roll","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/wound_roll.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n //pop up the wound roll dialog box\n new Dialog({\n title: `Wound Roll`,\n content: `\n \n\n \n
\n
\n
Wound Roll Make a Wound Roll according to the type of Damage received. Flesh Wounds are small inconveniences. Minor/Major Injuries cause lasting issues which require medical treatment. Lethal Injuries can kill you if not dealt with immediately. Fatal Injuries can kill outright. Bleeding wounds, if not treated can quickly overwhelm you. \n
\n
\n \n \n
\n
\n
\n
\n \n Blunt Force: Getting punched, hit with a crowbar or a thrown object, falling, etc.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Bleeding: Getting stabbed or cut.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Gunshot: Getting shot by a firearm.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Fire & Explosives: Grenades, flamethrowers, doused in fuel and lit on fire, etc.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Gore & Massive: Giant or gruesome attacks.\n \n
\n
\n
\n \n Select your roll type: \n `,\n buttons: {\n button1: {\n label: `Advantage`,\n callback: (html) => game.mosh.initRollTable(html.find(\"input[name='wound_table']:checked\").val(),`1d10 [+]`,`low`,true,false,null,null),\n icon: ` `\n },\n button2: {\n label: `Normal`,\n callback: (html) => game.mosh.initRollTable(html.find(\"input[name='wound_table']:checked\").val(),`1d10`,`low`,true,false,null,null),\n icon: ` `\n },\n button3: {\n label: `Disadvantage`,\n callback: (html) => game.mosh.initRollTable(html.find(\"input[name='wound_table']:checked\").val(),`1d10 [-]`,`low`,true,false,null,null),\n icon: ` `\n }\n }\n },{width: 600,height: 650}).render(true);\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
\ No newline at end of file
+{"_id":"NsRHfRuuNGPfkYVf","name":"Death Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/rolltables/death_save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n //pop up the death save dialog box\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Death Save\"\n },\n classes: [\"macro-popup-dialog\"],\n position: { width: 600 },\n content: `\n \n
\n
\n
\n
\n
\n
Death Save \n Your character is incapacitated when you receive a fatal wound, or once your Current Wounds equal your Maximum Wounds. As soon as someone spends a turn checking your vitals, make a Death Save to reveal your fate. If your death seems imminent, make your last moments count: save someone’s life, solve an important mystery, or give the others time to escape.\n \n
\n
\n \n Select your roll type:\n
\n `,\n buttons: [\n {\n label: \"Advantage\",\n action: \"action_advantage\",\n callback: () => game.mosh.initRollTable(game.settings.get(\"mosh\",\"table1eDeath\"), \"1d10 [+]\", \"low\", true, false, null, null),\n icon: `fas fa-angle-double-up`\n },\n {\n label: \"Normal\",\n action: \"action_normal\",\n callback: () => game.mosh.initRollTable(game.settings.get(\"mosh\",\"table1eDeath\"), \"1d10\", \"low\", true, false, null, null),\n icon: `fas fa-minus`\n },\n {\n label: \"Disadvantage\",\n action: \"action_disadvantage\",\n callback: () => game.mosh.initRollTable(game.settings.get(\"mosh\",\"table1eDeath\"), \"1d10 [-]\", \"low\", true, false, null, null),\n icon: `fas fa-angle-double-down`\n }\n ]\n }).render({ force: true });\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"GSFEBhrKC9yuD88V","name":"Gain Calm","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/relieve_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Gain Calm\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Gain Calm \n Occasionally, certain moments, places, or events can automatically calm you down. Escaping perilous situations, like finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your Calm is getting close to 0, you should consider making a Rest Save - as the effects of a failed Panic Check can be devastating.\n \n
\n
\n \n Select your modification:\n
\n `,\n buttons: [\n {\n label: `Gain 5 Calm`,\n action: 'button_1',\n callback: () => game.mosh.initModifyActor('system.other.stress.value',5,null,true),\n icon: `fas fa-angle-up`\n },\n {\n label: `Gain 10 Calm`,\n action: 'button_2',\n callback: () => game.mosh.initModifyActor('system.other.stress.value',10,null,true),\n icon: `fas fa-angle-double-up`\n },\n {\n label: `Gain 1d20 Calm`,\n action: 'button_3',\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d20`,true),\n icon: `fas fa-arrow-circle-up`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"X0L0NnWt53b0rHYG","name":"Gain Stress","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/gain_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Gain Stress\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Gain Stress \n You gain 1 Stress every time you fail a Stat Check or Save. Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. Your Minimum Stress starts at 2, and the Maximum Stress you can have is 20. Any Stress you take over 20 instead reduces the most relevant Stat or Save by that amount.\n \n
\n
\n \n Select your modification:\n
\n `,\n buttons: [\n {\n label: `Gain 1 Stress`,\n action: 'button_1',\n callback: () => game.mosh.initModifyActor('system.other.stress.value',1,null,true),\n icon: `fas fa-angle-up`\n },\n {\n label: `Gain 2 Stress`,\n action: 'button_2',\n callback: () => game.mosh.initModifyActor('system.other.stress.value',2,null,true),\n icon: `fas fa-angle-double-up`\n },\n {\n label: `Gain 1d5 Stress`,\n action: 'button_3',\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d5`,true),\n icon: `fas fa-arrow-circle-up`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"trU0DtBJvJCPddsQ","name":"Lose Calm","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/gain_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Lose Calm\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Lose Calm \n Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. You live in a terrifying, uncaring universe, so your Maximum Calm caps out at 85 and cannot go lower than zero.\n \n
\n
\n \n Select your modification:\n
\n `,\n buttons: [\n {\n label: `Lose 5 Calm`,\n action: `lose_5`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-5,null,true),\n icon: `fas fa-angle-down`\n },\n {\n label: `Lose 10 Calm`,\n action: `lose_10`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-10,null,true),\n icon: `fas fa-angle-double-down`\n },\n {\n label: `Lose 1d20 Calm`,\n action: `lose_1d20`,\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d20`,true),\n icon: `fas fa-arrow-circle-down`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"IgWvaabVqzKDzLL4","name":"Panic Check","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n //pop up the panic check dialog box\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Panic Check\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Panic Check \n Stress, Damage, and emotional wear and tear eventually bring characters to their breaking point. When that happens, there’s a chance they Panic. You determine this by making a Panic Check . Some results of the Panic Table are so severe that they leave a lasting impression on you. These are called Conditions , and they affect you until you are able to treat them.\n \n
\n
\n \n Select your roll type:\n
\n `,\n buttons: [\n {\n label: `Advantage`,\n action: 'button_advantage',\n callback: () => game.mosh.initRollTable(`panicCheck`,`[+]`,null,false,false,null,null),\n icon: `fas fa-angle-double-up`\n },\n {\n label: `Normal`,\n action: 'button_normal',\n callback: () => game.mosh.initRollTable(`panicCheck`,``,null,false,false,null,null),\n icon: `fas fa-minus`\n },\n {\n label: `Disadvantage`,\n action: 'button_disadvantage',\n callback: () => game.mosh.initRollTable(`panicCheck`,`[-]`,null,false,false,null,null),\n icon: `fas fa-angle-double-down`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"GaadOTppoqNFWZhV","name":"Relieve Stress","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/relieve_stress.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Relieve Stress\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Relieve Stress \n Occasionally, certain moments, places, or events can automatically relieve your stress. Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your stress is getting close to 20, you should consider making a Rest Save - as the effects of a failed Panic Check can be devastating.\n \n
\n
\n \n Select your modification:\n
\n `,\n buttons: [\n {\n label: `Relieve 1 Stress`,\n action: 'button_1',\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-1,null,true),\n icon: `fas fa-angle-down`\n },\n {\n label: `Relieve 2 Stress`,\n action: 'button_2',\n callback: () => game.mosh.initModifyActor('system.other.stress.value',-2,null,true),\n icon: `fas fa-angle-double-down`\n },\n {\n label: `Relieve 1d5 Stress`,\n action: 'button_3',\n callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d5`,true),\n icon: `fas fa-arrow-circle-down`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"iyonscW5QiQdQbyJ","name":"Rest Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/rest_save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Rest Save\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Rest Save \n You can relieve Stress by resting in a relatively safe place. If you succeed, reduce your Stress; if you fail, you gain 1 Stress instead. Players can gain Advantage on their Rest Save by participating in consensual sex, recreational drug use, a night of heavy drinking, prayer, or any other suitable leisure activity. Unsafe locations may incur Disadvantage.\n \n
\n
\n `,\n buttons: [\n {\n label: `Next`,\n action: 'button_next',\n callback: () => game.mosh.initRollCheck(null,'low','restSave',null,null,null),\n icon: `fas fa-chevron-circle-right`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"kb3tvYdTSWnzQRfw","name":"Save","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/save.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Save\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Save \n You have three Saves which represent your ability to withstand different kinds of trauma. In order to avoid certain dangers, you sometimes need to roll a Save. If you roll less than your Save you succeed. Otherwise you fail, and gain 1 Stress. A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.\n \n
\n
\n \n \n
\n
\n
\n
\n \n Sanity: Rationalize logical inconsistencies in the universe, make sense out of chaos, detect illusions and mimicry, cope with Stress .\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Fear: Maintain a level head while struggling with fear, loneliness, depression, and other emotional surges.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Body: Employ quick reflexes and resist hunger, disease, or organisms that might try and invade your insides.\n \n
\n
\n
\n \n `,\n buttons: [\n {\n label: `Next`,\n action: 'button_1',\n callback: (event, button, dialog) => game.mosh.initRollCheck(null,'low',button.form.querySelector(\"input[name='save']:checked\").value,null,null,null),\n icon: `fas fa-chevron-circle-right`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"2u4a5gEogtLd3XQz","name":"Stat Check","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/stat_check.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Stat Check\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Stat Check \n You have four Stats which represent your ability to act under extreme pressure. Whenever you want to do something and the price for failure is high, roll a stat check. If you roll less than your Stat you succeed. Otherwise, you fail and gain 1 Stress. A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.\n \n
\n
\n \n \n
\n
\n
\n
\n \n Strength: Holding airlocks closed, carrying fallen comrades, climbing, pushing, jumping.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Speed: Getting out of the cargo bay before the blast doors close, acting before someone (or something) else, running away.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Intellect: Recalling your training and experience under duress, thinking through difficult problems, inventing or fixing things.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Combat: Fighting for your life.\n \n
\n
\n
\n \n `,\n buttons: [\n {\n label: `Next`,\n action: 'button_1',\n callback: (event, button, dialog) => game.mosh.initRollCheck(null,'low',button.form.querySelector(\"input[name='stat']:checked\").value,null,null,null),\n icon: `fas fa-chevron-circle-right`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"ZzKgfEmRdvDfyBMS","name":"Wound Roll","type":"script","scope":"global","img":"systems/mosh/images/icons/ui/macros/wound_roll.png","command":"//init vars\nlet macroTarget = game.settings.get('mosh','macroTarget');\n//warn user if character is not selected\nif ((macroTarget === 'character' && !game.user.character) || (macroTarget === 'token' && !canvas.tokens.controlled.length)) {\n //warn player\n game.mosh.noCharSelected();\n//else pop up the dialog\n} else {\n //pop up the wound roll dialog box\n new foundry.applications.api.DialogV2({\n window: {\n title: \"Wound Roll\"\n },\n classes: [\"macro-popup-dialog\"],\n position: {width: 600},\n content: `\n \n
\n
\n
\n
Wound Roll \n Make a Wound Roll according to the type of Damage received.Flesh Wounds are small inconveniences.Minor/Major Injuries cause lasting issues that require treatment.Lethal Injuries can kill you if not dealt with immediately.Fatal Injuries can kill outright.Bleeding wounds, if not treated can quickly overwhelm you.\n \n
\n
\n \n \n
\n
\n
\n
\n \n Blunt Force: Getting punched, hit with a crowbar or a thrown object, falling, etc.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Bleeding: Getting stabbed or cut.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Gunshot: Getting shot by a firearm.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Fire & Explosives: Grenades, flamethrowers, doused in fuel and lit on fire, etc.\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n Gore & Massive: Giant or gruesome attacks.\n \n
\n
\n
\n \n \n Select your roll type:\n
\n `,\n buttons: [\n {\n label: `Advantage`,\n action: 'action_advantage',\n callback: (event, button, dialog) => game.mosh.initRollTable(button.form.querySelector(\"input[name='wound_table']:checked\").value,`1d10 [+]`,`low`,true,false,null,null),\n icon: `fas fa-angle-double-up`\n },\n {\n label: `Normal`,\n action: 'action_normal',\n callback: (event, button, dialog) => game.mosh.initRollTable(button.form.querySelector(\"input[name='wound_table']:checked\").value,`1d10`,`low`,true,false,null,null),\n icon: `fas fa-minus`\n },\n {\n label: `Disadvantage`,\n action: 'action_disadvantage',\n callback: (event, button, dialog) => game.mosh.initRollTable(button.form.querySelector(\"input[name='wound_table']:checked\").value,`1d10 [-]`,`low`,true,false,null,null),\n icon: `fas fa-angle-double-down`\n }\n ]\n }).render({force: true});\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
\ No newline at end of file
diff --git a/packs/macros_hotbar_1e/000003.log b/packs/macros_hotbar_1e/000003.log
new file mode 100644
index 0000000..dca6523
Binary files /dev/null and b/packs/macros_hotbar_1e/000003.log differ
diff --git a/packs/macros_hotbar_1e/000004.log b/packs/macros_hotbar_1e/000004.log
deleted file mode 100644
index e69de29..0000000
diff --git a/packs/macros_hotbar_1e/000005.ldb b/packs/macros_hotbar_1e/000005.ldb
deleted file mode 100644
index 3e58c31..0000000
Binary files a/packs/macros_hotbar_1e/000005.ldb and /dev/null differ
diff --git a/packs/macros_hotbar_1e/LOG b/packs/macros_hotbar_1e/LOG
index c1ad9af..52740ad 100644
--- a/packs/macros_hotbar_1e/LOG
+++ b/packs/macros_hotbar_1e/LOG
@@ -1,5 +1 @@
-2025/01/05-13:02:17.011 5a8 Delete type=3 #1
-2025/01/05-13:03:25.735 43f4 Level-0 table #5: started
-2025/01/05-13:03:25.737 43f4 Level-0 table #5: 33305 bytes OK
-2025/01/05-13:03:25.740 43f4 Delete type=0 #3
-2025/01/05-13:03:25.752 43f4 Manual compaction at level-0 from '!macros!2u4a5gEogtLd3XQz' @ 72057594037927935 : 1 .. '!macros!trU0DtBJvJCPddsQ' @ 0 : 0; will stop at (end)
+2025/08/28-23:53:35.163 3018 Delete type=3 #1
diff --git a/packs/macros_hotbar_1e/MANIFEST-000002 b/packs/macros_hotbar_1e/MANIFEST-000002
index 38311c1..bbbc585 100644
Binary files a/packs/macros_hotbar_1e/MANIFEST-000002 and b/packs/macros_hotbar_1e/MANIFEST-000002 differ
diff --git a/packs/macros_triggered_0e/000003.log b/packs/macros_triggered_0e/000003.log
new file mode 100644
index 0000000..37166dd
Binary files /dev/null and b/packs/macros_triggered_0e/000003.log differ
diff --git a/packs/macros_triggered_0e/000004.log b/packs/macros_triggered_0e/000004.log
deleted file mode 100644
index e69de29..0000000
diff --git a/packs/macros_triggered_0e/000005.ldb b/packs/macros_triggered_0e/000005.ldb
deleted file mode 100644
index e860ed8..0000000
Binary files a/packs/macros_triggered_0e/000005.ldb and /dev/null differ
diff --git a/packs/macros_triggered_0e/LOG b/packs/macros_triggered_0e/LOG
index 08f2b0d..8787a7f 100644
--- a/packs/macros_triggered_0e/LOG
+++ b/packs/macros_triggered_0e/LOG
@@ -1,5 +1 @@
-2025/01/05-13:02:17.165 5a8 Delete type=3 #1
-2025/01/05-13:03:25.766 43f4 Level-0 table #5: started
-2025/01/05-13:03:25.769 43f4 Level-0 table #5: 24964 bytes OK
-2025/01/05-13:03:25.772 43f4 Delete type=0 #3
-2025/01/05-13:03:25.778 43f4 Manual compaction at level-0 from '!macros!0Yw4QWSAeOuUzRqB' @ 72057594037927935 : 1 .. '!macros!z5V92LyXHjfMxnRQ' @ 0 : 0; will stop at (end)
+2025/08/28-23:53:35.445 2e0c Delete type=3 #1
diff --git a/packs/macros_triggered_0e/MANIFEST-000002 b/packs/macros_triggered_0e/MANIFEST-000002
index 21587ed..bbbc585 100644
Binary files a/packs/macros_triggered_0e/MANIFEST-000002 and b/packs/macros_triggered_0e/MANIFEST-000002 differ
diff --git a/packs/macros_triggered_1e/000003.log b/packs/macros_triggered_1e/000003.log
new file mode 100644
index 0000000..e3af7e1
Binary files /dev/null and b/packs/macros_triggered_1e/000003.log differ
diff --git a/packs/macros_triggered_1e/000004.log b/packs/macros_triggered_1e/000004.log
deleted file mode 100644
index e69de29..0000000
diff --git a/packs/macros_triggered_1e/000005.ldb b/packs/macros_triggered_1e/000005.ldb
deleted file mode 100644
index 66dcf92..0000000
Binary files a/packs/macros_triggered_1e/000005.ldb and /dev/null differ
diff --git a/packs/macros_triggered_1e/LOG b/packs/macros_triggered_1e/LOG
index 3cdc63b..fc00b54 100644
--- a/packs/macros_triggered_1e/LOG
+++ b/packs/macros_triggered_1e/LOG
@@ -1,5 +1 @@
-2025/01/05-13:02:17.040 5884 Delete type=3 #1
-2025/01/05-13:03:25.740 43f4 Level-0 table #5: started
-2025/01/05-13:03:25.743 43f4 Level-0 table #5: 48976 bytes OK
-2025/01/05-13:03:25.746 43f4 Delete type=0 #3
-2025/01/05-13:03:25.752 43f4 Manual compaction at level-0 from '!macros!06NSvDYTtmkeUtLq' @ 72057594037927935 : 1 .. '!macros!zLRsweb35Lw0NMev' @ 0 : 0; will stop at (end)
+2025/08/28-23:53:35.205 2e0c Delete type=3 #1
diff --git a/packs/macros_triggered_1e/MANIFEST-000002 b/packs/macros_triggered_1e/MANIFEST-000002
index 01d8a32..bbbc585 100644
Binary files a/packs/macros_triggered_1e/MANIFEST-000002 and b/packs/macros_triggered_1e/MANIFEST-000002 differ
diff --git a/packs/rolltables_0e/000003.log b/packs/rolltables_0e/000003.log
new file mode 100644
index 0000000..aa146e6
Binary files /dev/null and b/packs/rolltables_0e/000003.log differ
diff --git a/packs/rolltables_0e/000004.log b/packs/rolltables_0e/000004.log
deleted file mode 100644
index e69de29..0000000
diff --git a/packs/rolltables_0e/000005.ldb b/packs/rolltables_0e/000005.ldb
deleted file mode 100644
index 760be46..0000000
Binary files a/packs/rolltables_0e/000005.ldb and /dev/null differ
diff --git a/packs/rolltables_0e/LOG b/packs/rolltables_0e/LOG
index 9807640..bb9ef14 100644
--- a/packs/rolltables_0e/LOG
+++ b/packs/rolltables_0e/LOG
@@ -1,5 +1 @@
-2025/01/05-13:02:17.196 5884 Delete type=3 #1
-2025/01/05-13:03:25.779 43f4 Level-0 table #5: started
-2025/01/05-13:03:25.785 43f4 Level-0 table #5: 34959 bytes OK
-2025/01/05-13:03:25.788 43f4 Delete type=0 #3
-2025/01/05-13:03:25.797 43f4 Manual compaction at level-0 from '!tables!1vCm4ElRPotQXgNB' @ 72057594037927935 : 1 .. '!tables.results!kqKpQAXyLTEEyz6Z.xdwwswzfoPuVifvw' @ 0 : 0; will stop at (end)
+2025/08/28-23:53:35.465 20a8 Delete type=3 #1
diff --git a/packs/rolltables_0e/MANIFEST-000002 b/packs/rolltables_0e/MANIFEST-000002
index c70adfb..bbbc585 100644
Binary files a/packs/rolltables_0e/MANIFEST-000002 and b/packs/rolltables_0e/MANIFEST-000002 differ
diff --git a/packs/rolltables_1e.db b/packs/rolltables_1e.db
index 87db628..8ab9c8f 100644
--- a/packs/rolltables_1e.db
+++ b/packs/rolltables_1e.db
@@ -1,7 +1,7 @@
{"_id":"BsfdIl7CJNs1PViS","name":"Bankruptcy Save","img":"systems/mosh/images/icons/ui/rolltables/bankruptcy_save.png","description":"As the owner of this operation, make a Bankruptcy Save to determine the financial health of the company.
","formula":"1d4-1","replacement":true,"displayRoll":true,"results":[ {"_id":"PmxxNHaOwjUgXDuj","type":0,"documentCollection":"null","documentId":"null","text":"You turn a small profit. Choose one:Purchase 1 Major Upgrade for the ship. Repair 1d5 Major Repairs. Pay each crewmember 1d5x100kcr. Raise your Bankruptcy Save by 1d10. ","img":"systems/mosh/images/icons/ui/rolltables/bankruptcy_save.png","weight":1,"range":[0,0],"drawn": false}, {"_id":"u9hjcZZUKwuho0Qx","type":0,"documentCollection":"null","documentId":"null","text":"You scrape by. Choose one:Purchase 1 Minor Upgrade for the ship. Purchase 1 Minor Repair for the ship. Pay each crewmember 2d10 salary. Raise your Bankruptcy Save by 1d5. ","img":"systems/mosh/images/icons/ui/rolltables/bankruptcy_save.png","weight":1,"range":[1,1],"drawn": false}, {"_id":"9kfZTUWCaEDUgYRh","type":0,"documentCollection":"null","documentId":"null","text":"You are 1d10mcr in debt to ruthless lenders.","img":"systems/mosh/images/icons/ui/rolltables/bankruptcy_save.png","weight":1,"range":[2,2],"drawn": false}, {"_id":"tRv3vRvOVTteMz5Y","type":0,"documentCollection":"null","documentId":"null","text":"The company goes bankrupt and owes a massive debt to the worst people imaginable.","img":"systems/mosh/images/icons/ui/rolltables/bankruptcy_save.png","weight":1,"range":[3,3],"drawn": false} ],"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
{"_id":"W36WFIpCfMknKgHy","name":"Death Save","img":"systems/mosh/images/icons/ui/rolltables/death_save.png","description":"Your character is incapacitated when you receive a fatal wound, or once your Current Wounds equal your Maximum Wounds. As soon as someone spends a turn checking your vitals, make a Death Save to reveal your fate. If your death seems imminent, make your last moments count: save someone’s life, solve an important mystery, or give the others time to escape.
","formula":"1d10-1","replacement":true,"displayRoll":true,"results":[ {"_id":"4TFF3HjlrKsOCyT5","type":0,"documentCollection":"null","documentId":"null","text":"You are unconscious. You wake up in [[/r 2d10]] minutes. Reduce your Maximum Health by 1d5. @UUID[Compendium.mosh.macros_triggered_1e.Macro.yYujq1tBZPqGrQlh]{-1d5 Maximum Health}","img":"systems/mosh/images/icons/ui/rolltables/death_save.png","weight":1,"range":[0,0],"drawn": false}, {"_id":"C0ht8FBreWQjhNi7","type":0,"documentCollection":"null","documentId":"null","text":"You are unconscious and dying. You die in [[/r 1d5]] rounds without intervention.","img":"systems/mosh/images/icons/ui/rolltables/death_save.png","weight":1,"range":[1,2],"drawn": false}, {"_id":"WTOIWYApDTqwAHu6","type":0,"documentCollection":"null","documentId":"null","text":"You are comatose. Only extraordinary measures can return you to the waking world.","img":"systems/mosh/images/icons/ui/rolltables/death_save.png","weight":1,"range":[3,4],"drawn": false}, {"_id":"ygaJ1Gc5LuuXbJZq","type":0,"documentCollection":"null","documentId":"null","text":"You have died. Roll up a new character.","img":"systems/mosh/images/icons/ui/rolltables/death_save.png","weight":1,"range":[5,9],"drawn": false} ],"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
{"_id":"ypcoikqHLhnc9tNs","name":"Panic Check (Stress, Normal)","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","description":"Stress, Damage, and emotional wear and tear eventually bring characters to their breaking point. When that happens, there’s a chance they Panic. You determine this by making a Panic Check . Some results of the Panic Table are so severe that they leave a lasting impression on you. These are called Conditions , and they affect you until you are able to treat them.
","formula":"1d20","replacement":true,"displayRoll":true,"results":[ {"_id":"C3v1mSfDXIklIAUB","type":0,"documentCollection":"null","documentId":"null","text":"ADRENALINE RUSH. [+] on all rolls for the next [[/r 2d10]] minutes. Reduce Stress by 1d5. @UUID[Compendium.mosh.macros_triggered_1e.Macro.AvKZE5IFubIaAIUy]{-1d5 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[1,1],"drawn": false}, {"_id":"U9WjdvVrVvGEWA9e","type":0,"documentCollection":"null","documentId":"null","text":"NERVOUS. Gain 1 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.dvJR9DYXI2kV0BbR]{+1 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[2,2],"drawn": false}, {"_id":"qrw2SQ9MMwmmz5U1","type":0,"documentCollection":"null","documentId":"null","text":"JUMPY. Gain 1 Stress. All Close crewmembers gain 2 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.dvJR9DYXI2kV0BbR]{+1 Stress} @UUID[Compendium.mosh.macros_triggered_1e.Macro.6jjFVScyiaBvN8kX]{+2 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[3,3],"drawn": false}, {"_id":"xfR9AtZFClqK4Tkk","type":0,"documentCollection":"null","documentId":"null","text":"OVERWHELMED. [-] on all rolls for the next [[/r 1d10]] minutes. Increase Minimum Stress by 1. @UUID[Compendium.mosh.macros_triggered_1e.Macro.BmEHWH7YxV9qb21p]{+1 Minimum Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[4,4],"drawn": false}, {"_id":"6O6QNEIIVFSTifl6","type":0,"documentCollection":"null","documentId":"null","text":"COWARD. Gain a new Condition: You must make a Fear Save to engage in violence, otherwise you flee. @UUID[Compendium.mosh.macros_triggered_1e.Macro.b0jk4XwP7by8a3uc]{+1 Coward}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[5,5],"drawn": false}, {"_id":"HclQqfxT8Q9NShBa","type":0,"documentCollection":"null","documentId":"null","text":"FRIGHTENED. Gain a new Condition: When encountering what frightened you, make a Fear Save [-] or gain 1d5 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.BEQvMZ5N7QOBqnId]{+1 Frightened}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[6,6],"drawn": false}, {"_id":"j1jjGls1snJ3uCWS","type":0,"documentCollection":"null","documentId":"null","text":"NIGHTMARES. Gain a new Condition: Sleep is difficult, gain [-] on Rest Saves. @UUID[Compendium.mosh.macros_triggered_1e.Macro.AZbaGWu663wio9mI]{+1 Nightmares}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[7,7],"drawn": false}, {"_id":"qnBXWm15pc7Kn7bf","type":0,"documentCollection":"null","documentId":"null","text":"LOSS OF CONFIDENCE. Gain a new Condition: Choose one Skill and lose that Skill’s bonus. @UUID[Compendium.mosh.macros_triggered_1e.Macro.54Krt3opbJe1WATH]{+1 Loss of Confidence}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[8,8],"drawn": false}, {"_id":"5YQKw63GB18XUYDp","type":0,"documentCollection":"null","documentId":"null","text":"DEFLATED. Gain a new Condition: Whenever a Close crewmember fails a Save, gain 1 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.2aD5avpn35wdzdm5]{+1 Deflated}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[9,9],"drawn": false}, {"_id":"FpTmgA9FxG4W1x0a","type":0,"documentCollection":"null","documentId":"null","text":"DOOMED. Gain a new Condition: You feel cursed and unlucky. All Critical Successes are instead Critical Failures. @UUID[Compendium.mosh.macros_triggered_1e.Macro.8IPhlAuMEQJC6zxA]{+1 Doomed}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[10,10],"drawn": false}, {"_id":"6qInELrRmGGogpkW","type":0,"documentCollection":"null","documentId":"null","text":"SUSPICIOUS. For the next week, whenever someone joins the crew (even if they only left for a short period of time), make a Fear Save or gain 1 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.5K7wZEvEXjOH4IM7]{+1 Suspicious}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[11,11],"drawn": false}, {"_id":"SjCav3ZLlpQ9fyo3","type":0,"documentCollection":"null","documentId":"null","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. @UUID[Compendium.mosh.macros_triggered_1e.Macro.Eo56QFyTeoCcFmD8]{+1 Haunted}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[12,12],"drawn": false}, {"_id":"2aJpNteB4MaFIbVn","type":0,"documentCollection":"null","documentId":"null","text":"DEATH WISH. For the next 24 hours, whenever encountering a stranger or known enemy, make a Sanity Save or immediately attack them. @UUID[Compendium.mosh.macros_triggered_1e.Macro.Yh2CTFXfWMe9o2lv]{+1 Death Wish}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[13,13],"drawn": false}, {"_id":"g6JDKtnXUFWlTPMV","type":0,"documentCollection":"null","documentId":"null","text":"PROPHETIC VISION. You immediately experience an intense hallucination or vision of an impending terror or horrific event. Increase Minimum Stress by 2. @UUID[Compendium.mosh.macros_triggered_1e.Macro.bFPoNLOGusT1ocqt]{+2 Minimum Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[14,14],"drawn": false}, {"_id":"wFbLrig0F2WSM6hM","type":0,"documentCollection":"null","documentId":"null","text":"CATATONIC. Become unresponsive and unmoving for [[/r 2d10]] minutes. Reduce Stress by 1d10. @UUID[Compendium.mosh.macros_triggered_1e.Macro.jHyqXb2yDFTNWxpy]{-1d10 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[15,15],"drawn": false}, {"_id":"mN1KTYh1TcDKLMjj","type":0,"documentCollection":"null","documentId":"null","text":"RAGE. [+] on all Damage rolls for the next [[/r 1d10]] hours. All crewmembers gain 1 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.dvJR9DYXI2kV0BbR]{+1 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[16,16],"drawn": false}, {"_id":"fFp8wFcomRNUgtdP","type":0,"documentCollection":"null","documentId":"null","text":"SPIRALING. Gain a new Condition: Panic Checks are at [-]. @UUID[Compendium.mosh.macros_triggered_1e.Macro.3AjUWUSRvYy8Mwji]{+1 Spiraling}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[17,17],"drawn": false}, {"_id":"RI06IV89j3Bxtxkz","type":0,"documentCollection":"null","documentId":"null","text":"COMPOUNDING PROBLEMS. Roll twice on this table. Increase your Minimum Stress by 1. @UUID[Compendium.mosh.macros_triggered_1e.Macro.2DnKZpyj03HvpeCy]{Roll on Panic Table} @UUID[Compendium.mosh.macros_triggered_1e.Macro.BmEHWH7YxV9qb21p]{+1 Minimum Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[18,18],"drawn": false}, {"_id":"zJkYrssfrdWBSeRm","type":0,"documentCollection":"null","documentId":"null","text":"HEART ATTACK / SHORT CIRCUIT (ANDROIDS). Reduce Maximum Wounds by 1. Gain [-] on all rolls for [[/r 1d10]] hours. Increase your Minimum Stress by 1. @UUID[Compendium.mosh.macros_triggered_1e.Macro.qD8Mvegkf3zVarFr]{-1 Maximum Wound} @UUID[Compendium.mosh.macros_triggered_1e.Macro.BmEHWH7YxV9qb21p]{+1 Minimum Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[19,19],"drawn": false}, {"_id":"uluHEycHi6Ul2GMj","type":0,"documentCollection":"null","documentId":"null","text":"RETIRE. Roll up a new character to play.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[20,20],"drawn": false} ],"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
-{"_id":"aBnY19jlhPXzibCt","name":"Panic Check (Stress, Android)","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","description":"Stress, Damage, and emotional wear and tear eventually bring characters to their breaking point. When that happens, there’s a chance they Panic. You determine this by making a Panic Check . Some results of the Panic Table are so severe that they leave a lasting impression on you. These are called Conditions , and they affect you until you are able to treat them.
","formula":"1d20","replacement":true,"displayRoll":true,"results":[ {"_id":"Uf9xMdlmk2RS9ev8","type":0,"documentCollection":"null","documentId":"null","text":"Segfault: Gain 1 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.dvJR9DYXI2kV0BbR]{+1 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[1,1],"drawn": false}, {"_id":"THtp1wYhy7Fmggo2","type":0,"documentCollection":"null","documentId":"null","text":"States the Odds: of any event, Advantage on party rolls for 1hr.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[2,2],"drawn": false}, {"_id":"jqRITpf8XIo4LX4y","type":0,"documentCollection":"null","documentId":"null","text":"Explains the Etymology of Words: Knowledge checks have Advantage for 1hr.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[3,3],"drawn": false}, {"_id":"dSTOHakBOy4i4nFx","type":0,"documentCollection":"null","documentId":"null","text":"Organizes Objects into Geometric Patterns: Everyone else gains 1 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.dvJR9DYXI2kV0BbR]{+1 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[4,4],"drawn": false}, {"_id":"fYipAsps5SAM3API","type":0,"documentCollection":"null","documentId":"null","text":"Inventories Particles of Dust by Grade: Cannot engage in other tasks, everyone else gains 2 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.6jjFVScyiaBvN8kX]{+2 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[5,5],"drawn": false}, {"_id":"hr4dgIk8AxDJrs9A","type":0,"documentCollection":"null","documentId":"null","text":"Vocalization Failure: Intermittently shrieks like a fax machine under duress. Lapses into morse code, cannot communicate or sneak. Everyone else gains 2 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.bJWFhod0YA8ln8H8]{+1 Vocalization Failure} @UUID[Compendium.mosh.macros_triggered_1e.Macro.6jjFVScyiaBvN8kX]{+2 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[6,6],"drawn": false}, {"_id":"lGlPWoSKPLuQiFNv","type":0,"documentCollection":"null","documentId":"null","text":"Incorrectly States Odds: (insists impossible tasks are trivial, trivial tasks are impossible) ... for the next 2d10 hours. Distracting. Anyone attempting a complex task must make a Fear save or gain 1d10 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.k2TtLFOG9mGaWVx3]{+1d10 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[7,7],"drawn": false}, {"_id":"qP73NbUa2ybPiS3B","type":0,"documentCollection":"null","documentId":"null","text":"Repetitive Twitchy Motions: Your manual tasks have Disadvantage, everyone else gains 2 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.6jjFVScyiaBvN8kX]{+2 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[8,8],"drawn": false}, {"_id":"1QRCUzUTpJzzUEju","type":0,"documentCollection":"null","documentId":"null","text":"Loses Any Expressiveness: Discusses the irrationality of others Phobias, seeks to trigger them. @UUID[Compendium.mosh.macros_triggered_1e.Macro.9sKO5WUBwCW1YbR3]{+1 Ethical Directive Misread}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[9,9],"drawn": false}, {"_id":"2nVqX6tEjYSvwMEL","type":0,"documentCollection":"null","documentId":"null","text":"Unreasonable Adherence to the Present Course of Action: Take 1d10 damage from repetitive motion injury. Everyone else makes Fear save or gains 1d5 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.w3ttEaXP7yp25M5Q]{-1d10 Health} @UUID[Compendium.mosh.macros_triggered_1e.Macro.luNKvwmm2tjUJhT6]{+1d5 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[10,10],"drawn": false}, {"_id":"NPfdalo4T5YQGgOa","type":0,"documentCollection":"null","documentId":"null","text":"Becomes Nihilistically Worshipful of the Source of Danger: Everyone else has Disadvantage on rolls against it. Everyone else takes a Fear save when failing to act against danger or gains a Phobia. @UUID[Compendium.mosh.macros_triggered_1e.Macro.wHcA2ub6CobipsfR]{+1 Worship Danger}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[11,11],"drawn": false}, {"_id":"AlC7dIwBOtFBoOFh","type":0,"documentCollection":"null","documentId":"null","text":"Killswitch Engaged: Go berserk, will not withdraw from combat regardless of situation, will not adhere to tactics. @UUID[Compendium.mosh.macros_triggered_1e.Macro.tQltbIC9ahDwNsTp]{+1 Killswitch Engaged}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[12,12],"drawn": false}, {"_id":"liVa6bdaYwBAFLtG","type":0,"documentCollection":"null","documentId":"null","text":"Turing Test Failure: Have difficulty expressing humanity. Party members make a Fear Save or gain 1 Stress whenever you show up. @UUID[Compendium.mosh.macros_triggered_1e.Macro.3nrEYqwkhMs1Ch5v]{+1 Turing Test Failure}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[13,13],"drawn": false}, {"_id":"5mSv5jcvVDyAKKqz","type":0,"documentCollection":"null","documentId":"null","text":"System Overload: Slump Catatonic in a failed reboot cycle for [[/r 1d10]] hours.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[14,14],"drawn": false}, {"_id":"uH4WMyycbJSM66kk","type":0,"documentCollection":"null","documentId":"null","text":"Fried Logic Core: Frenzied nonsensical behavior, everyone else makes a Panic Check. @UUID[Compendium.mosh.macros_hotbar_1e.Macro.IgWvaabVqzKDzLL4]{Panic Check}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[15,15],"drawn": false}, {"_id":"0PNiAaof10ibaecR","type":0,"documentCollection":"null","documentId":"null","text":"Damage to Threat Assessment: Betray party member at the next opportunity, believe you are aiding the crew. All Stress gained is increased by [[/r 1d10]] for the next [[/r 1d10]] hours.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[16,16],"drawn": false}, {"_id":"dzviNQmak3WjrhoU","type":0,"documentCollection":"null","documentId":"null","text":"Compound Data Corruption: Roll twice. @UUID[Compendium.mosh.macros_triggered_1e.Macro.Jek7hKAMDevKxlZR]{Roll on Android Panic Table}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[17,17],"drawn": false}, {"_id":"0G33UqnAIHYY2lw2","type":0,"documentCollection":"null","documentId":"null","text":"Firmware Malfunction: Roll 1d10 on this table, behavior is permanent. @UUID[Compendium.mosh.macros_triggered_1e.Macro.yPGx2mXToJ2iJPbY]{Roll 1d10 on Android Panic Table}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[18,18],"drawn": false}, {"_id":"YdrRbPU8fVlKkFvu","type":0,"documentCollection":"null","documentId":"null","text":"Data Corruption: Warden takes over character permanently, nightmarish malfunctions.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[19,19],"drawn": false}, {"_id":"DvRejWzlmoS364xm","type":0,"documentCollection":"null","documentId":"null","text":"Slagged: Gigeresque-Scanners Head Explosion, everyone present gains a phobia and 1d5 Stress (Fear Save to avoid). @UUID[Compendium.mosh.macros_triggered_1e.Macro.RTL29CqdaAriGSTS]{+1 Phobia} @UUID[Compendium.mosh.macros_triggered_1e.Macro.luNKvwmm2tjUJhT6]{+1d5 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[20,20],"drawn": false} ],"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
+{"_id":"aBnY19jlhPXzibCt","name":"Panic Check (Stress, Android)","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","description":"Stress, Damage, and emotional wear and tear eventually bring characters to their breaking point. When that happens, there’s a chance they Panic. You determine this by making a Panic Check . Some results of the Panic Table are so severe that they leave a lasting impression on you. These are called Conditions , and they affect you until you are able to treat them.
","formula":"1d20","replacement":true,"displayRoll":true,"results":[ {"_id":"Uf9xMdlmk2RS9ev8","type":0,"documentCollection":"null","documentId":"null","text":"Segfault: Gain 1 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.dvJR9DYXI2kV0BbR]{+1 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[1,1],"drawn": false}, {"_id":"THtp1wYhy7Fmggo2","type":0,"documentCollection":"null","documentId":"null","text":"States the Odds: of any event, Advantage on party rolls for 1hr.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[2,2],"drawn": false}, {"_id":"jqRITpf8XIo4LX4y","type":0,"documentCollection":"null","documentId":"null","text":"Explains the Etymology of Words: Knowledge checks have Advantage for 1hr.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[3,3],"drawn": false}, {"_id":"dSTOHakBOy4i4nFx","type":0,"documentCollection":"null","documentId":"null","text":"Organizes Objects into Geometric Patterns: Everyone else gains 1 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.dvJR9DYXI2kV0BbR]{+1 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[4,4],"drawn": false}, {"_id":"fYipAsps5SAM3API","type":0,"documentCollection":"null","documentId":"null","text":"Inventories Particles of Dust by Grade: Cannot engage in other tasks, everyone else gains 2 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.6jjFVScyiaBvN8kX]{+2 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[5,5],"drawn": false}, {"_id":"hr4dgIk8AxDJrs9A","type":0,"documentCollection":"null","documentId":"null","text":"Vocalization Failure: Intermittently shrieks like a fax machine under duress. Lapses into morse code, cannot communicate or sneak. Everyone else gains 2 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.bJWFhod0YA8ln8H8]{+1 Vocalization Failure} @UUID[Compendium.mosh.macros_triggered_1e.Macro.6jjFVScyiaBvN8kX]{+2 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[6,6],"drawn": false}, {"_id":"lGlPWoSKPLuQiFNv","type":0,"documentCollection":"null","documentId":"null","text":"Incorrectly States Odds: (insists impossible tasks are trivial, trivial tasks are impossible) ... for the next 2d10 hours. Distracting. Anyone attempting a complex task must make a Fear save or gain 1d10 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.k2TtLFOG9mGaWVx3]{+1d10 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[7,7],"drawn": false}, {"_id":"qP73NbUa2ybPiS3B","type":0,"documentCollection":"null","documentId":"null","text":"Repetitive Twitchy Motions: Your manual tasks have Disadvantage, everyone else gains 2 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.6jjFVScyiaBvN8kX]{+2 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[8,8],"drawn": false}, {"_id":"1QRCUzUTpJzzUEju","type":0,"documentCollection":"null","documentId":"null","text":"Loses Any Expressiveness: Discusses the irrationality of others Phobias, seeks to trigger them. @UUID[Compendium.mosh.macros_triggered_1e.Macro.9sKO5WUBwCW1YbR3]{+1 Ethical Directive Misread}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[9,9],"drawn": false}, {"_id":"2nVqX6tEjYSvwMEL","type":0,"documentCollection":"null","documentId":"null","text":"Unreasonable Adherence to the Present Course of Action: Take 1d10 damage from repetitive motion injury. Everyone else makes Fear save or gains 1d5 Stress. @UUID[Compendium.mosh.macros_triggered_1e.Macro.w3ttEaXP7yp25M5Q]{-1d10 Health} @UUID[Compendium.mosh.macros_triggered_1e.Macro.luNKvwmm2tjUJhT6]{+1d5 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[10,10],"drawn": false}, {"_id":"NPfdalo4T5YQGgOa","type":0,"documentCollection":"null","documentId":"null","text":"Becomes Nihilistically Worshipful of the Source of Danger: Everyone else has Disadvantage on rolls against it. Everyone else takes a Fear save when failing to act against danger or gains a Phobia. @UUID[Compendium.mosh.macros_triggered_1e.Macro.wHcA2ub6CobipsfR]{+1 Worship Danger}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[11,11],"drawn": false}, {"_id":"AlC7dIwBOtFBoOFh","type":0,"documentCollection":"null","documentId":"null","text":"Killswitch Engaged: Go berserk, will not withdraw from combat regardless of situation, will not adhere to tactics. @UUID[Compendium.mosh.macros_triggered_1e.Macro.tQltbIC9ahDwNsTp]{+1 Killswitch Engaged}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[12,12],"drawn": false}, {"_id":"liVa6bdaYwBAFLtG","type":0,"documentCollection":"null","documentId":"null","text":"Turing Test Failure: Have difficulty expressing humanity. Party members make a Fear Save or gain 1 Stress whenever you show up. @UUID[Compendium.mosh.macros_triggered_1e.Macro.3nrEYqwkhMs1Ch5v]{+1 Turing Test Failure}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[13,13],"drawn": false}, {"_id":"5mSv5jcvVDyAKKqz","type":0,"documentCollection":"null","documentId":"null","text":"System Overload: Slump Catatonic in a failed reboot cycle for [[/r 1d10]] hours.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[14,14],"drawn": false}, {"_id":"uH4WMyycbJSM66kk","type":0,"documentCollection":"null","documentId":"null","text":"Fried Logic Core: Frenzied nonsensical behavior, everyone else makes a Panic Check. @UUID[Compendium.mosh.macros_hotbar_1e.Macro.IgWvaabVqzKDzLL4]{Panic Check}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[15,15],"drawn": false}, {"_id":"0PNiAaof10ibaecR","type":0,"documentCollection":"null","documentId":"null","text":"Damage to Threat Assessment: Betray party member at the next opportunity, believe you are aiding the crew. All Stress gained is increased by [[/r 1d10]] for the next [[/r 1d10]] hours.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[16,16],"drawn": false}, {"_id":"dzviNQmak3WjrhoU","type":0,"documentCollection":"null","documentId":"null","text":"Compound Data Corruption: Roll twice. @UUID[Compendium.mosh.macros_triggered_1e.Macro.Jek7hKAMDevKxlZR]{Roll on Android Panic Table}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[17,17],"drawn": false}, {"_id":"0G33UqnAIHYY2lw2","type":0,"documentCollection":"null","documentId":"null","text":"Firmware Malfunction: Roll 1d10 on this table, behavior is permanent. @UUID[Compendium.mosh.macros_triggered_1e.Macro.yPGx2mXToJ2iJPbY]{Roll 1d10 on Android Panic Table}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[18,18],"drawn": false}, {"_id":"YdrRbPU8fVlKkFvu","type":0,"documentCollection":"null","documentId":"null","text":"Data Corruption: Warden takes over character permanently, nightmarish malfunctions.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[19,19],"drawn": false}, {"_id":"DvRejWzlmoS364xm","type":0,"documentCollection":"null","documentId":"null","text":"Slagged: Gigeresque-Scanners Head Explosion, everyone present gains a phobia and 1d5 Stress (Fear Save to avoid). @UUID[Compendium.mosh.macros_triggered_1e.Macro.RTL29CqdaAriGSTS]{+1 Phobia} @UUID[Compendium.mosh.macros_triggered_1e.Macro.luNKvwmm2tjUJhT6]{+1d5 Stress}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[20,20],"drawn": false} ],"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
{"_id":"MOYI6Ntj5OVFYk06","name":"Panic Check (Calm, Normal)","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","description":"Eventually, Stress, Damage and emotional wear and tear will bring you to your breaking point. When that happens there’s a chance that you’ll lose control and Panic. To determine whether you are able to keep your cool under extreme pressure, make a Panic Check . While the results are primarily negative there is the possibility of grace under fire.
","formula":"1d100","replacement":true,"displayRoll":true,"results":[ {"_id":"DHvObevFoNX6o7Dc","type":0,"documentCollection":"null","documentId":"null","text":"Psychological Collapse. You become permanently, irreparably insane. Your character is now played by the Warden. All nearby player characters must immediately make Panic Checks. @UUID[Compendium.mosh.macros_triggered_0e.Macro.TJP579V4h7t68jY1]{+1 Insane} @UUID[Compendium.mosh.macros_hotbar_1e.Macro.IgWvaabVqzKDzLL4]{Make a Panic Check}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[1,39],"drawn": false}, {"_id":"d0Li0aJSeRsHZzAe","type":0,"documentCollection":"null","documentId":"null","text":"Severe Heart Attack. You die. Take one final action before you go.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[40,59],"drawn": false}, {"_id":"C5gfNr1IccewP9MP","type":0,"documentCollection":"null","documentId":"null","text":"Temporary Insanity. You become insane. Your character is played by the Warden (or by you but you must act destructively and against the interests of the rest of your team or else the Warden takes over) until they sleep at least 6 hours and succeed on a Sanity Save. @UUID[Compendium.mosh.macros_triggered_1e.Macro.TkMfT4RIczQb56j2]{Sanity Save}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[60,64],"drawn": false}, {"_id":"7oGjaJ87muIkWXqj","type":0,"documentCollection":"null","documentId":"null","text":"Heart Attack. Death in [[/r 1d10]] minutes unless you get medical attention. -1d10 to your Body save. @UUID[Compendium.mosh.macros_triggered_1e.Macro.nT2AsZwrYhJyxizF]{-1d10 Body Save}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[65,69],"drawn": false}, {"_id":"NGDxlqtHo0hrg0a7","type":0,"documentCollection":"null","documentId":"null","text":"Psychotic Episodes. Once per session, the Warden may take over your character for one round. The first one happens immediately. @UUID[Compendium.mosh.macros_triggered_1e.Macro.er0IZXOSuF28Po1h]{+1 Psychotic Episodes}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[70,70],"drawn": false}, {"_id":"cnidPS821nyDmk3O","type":0,"documentCollection":"null","documentId":"null","text":"Broken. Make a Panic roll whenever a nearby crew member fails a save. @UUID[Compendium.mosh.macros_triggered_1e.Macro.8VoaVAl39Xs0pDcr]{+1 Broken}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[71,71],"drawn": false}, {"_id":"C7T1ZNN81SUwOLXX","type":0,"documentCollection":"null","documentId":"null","text":"Severe Anxiety. Lose double Calm from all sources. @UUID[Compendium.mosh.macros_triggered_1e.Macro.LAXDz9nMvSSO3qzZ]{+1 Severe Anxiety}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[72,72],"drawn": false}, {"_id":"tvVo2JPXGBq8EXtg","type":0,"documentCollection":"null","documentId":"null","text":"Anhedonia. Whenever you would recover Calm, recover half as much Calm instead. @UUID[Compendium.mosh.macros_triggered_1e.Macro.hzxRycVkMhNS6gyJ]{+1 Anhedonia}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[73,73],"drawn": false}, {"_id":"TLAoXEhAAp5elKQi","type":0,"documentCollection":"null","documentId":"null","text":"Losing Your Grip. Whenever you make a Sanity save, roll under your Sanity or your Calm, whichever is lower. @UUID[Compendium.mosh.macros_triggered_1e.Macro.4Ak3WH8lzzkds6yo]{+1 Losing Your Grip}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[74,74],"drawn": false}, {"_id":"wT4c4kj33ehIfCdL","type":0,"documentCollection":"null","documentId":"null","text":"Panicky. Whenever you make a Fear save, roll under your Fear or your Calm, whichever is lower. @UUID[Compendium.mosh.macros_triggered_1e.Macro.lto7Vq1jb7DBScuu]{+1 Panicky}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[75,75],"drawn": false}, {"_id":"ERv7ngjr6h6PSJl2","type":0,"documentCollection":"null","documentId":"null","text":"The Shakes. You can’t keep your hands steady any more. Disadvantage on ranged attacks and all tasks requiring fine motor skills. Drugs may be able to help with this. @UUID[Compendium.mosh.macros_triggered_1e.Macro.DsmTMGHs92cmwlVk]{+1 The Shakes}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[76,76],"drawn": false}, {"_id":"BLhsVH6uXPsw9nUb","type":0,"documentCollection":"null","documentId":"null","text":"Recurring Nightmares. Every time you rest, make a Fear save. If you fail, lose 1d10 Calm and do not heal. The Warden will describe your nightmare. @UUID[Compendium.mosh.macros_triggered_1e.Macro.AqZ9JqENaPSmFQbK]{+1 Recurring Nightmares}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[77,77],"drawn": false}, {"_id":"0kZQtWxO9P1voycZ","type":0,"documentCollection":"null","documentId":"null","text":"Emotional Detachment. You now lose half the Calm (rounded up) you normally would from all sources but you gain the Panic Effect of an Android, in addition to that of your own class. If you are an Android, gain the Panic Effect of a Marine. @UUID[Compendium.mosh.macros_triggered_1e.Macro.tdQu2wnAXXXcXfrO]{+1 Emotional Detachment}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[78,78],"drawn": false}, {"_id":"ToerE4a77WZvWJOS","type":0,"documentCollection":"null","documentId":"null","text":"Social Anxiety. Lose 1d10 Calm whenever you converse with someone new. @UUID[Compendium.mosh.macros_triggered_1e.Macro.HhofJYVhx3ovuyAw]{+1 Social Anxiety}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[79,79],"drawn": false}, {"_id":"GkdxvyW9kCKOcmnF","type":0,"documentCollection":"null","documentId":"null","text":"Escapism. You always have Disadvantage on Body Saves to prevent Addiction. @UUID[Compendium.mosh.macros_triggered_1e.Macro.sSYIhNQhEiWTs1ip]{+1 Escapism}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[80,80],"drawn": false}, {"_id":"V3glomGRXiHjnoZj","type":0,"documentCollection":"null","documentId":"null","text":"Hypervigilance. Gain Advantage on all surprise rolls but lose 1d10 Calm every day. @UUID[Compendium.mosh.macros_triggered_1e.Macro.dSQgoBV6zSeQ1tqF]{+1 Hypervigilance}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[81,81],"drawn": false}, {"_id":"8Sv4YzhD3Zl5eBJo","type":0,"documentCollection":"null","documentId":"null","text":"General Anxiety. Your Maximum Calm decreases by 1d10. @UUID[Compendium.mosh.macros_triggered_1e.Macro.J61Srent4vEthGAn]{-1d10 Maximum Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[82,82],"drawn": false}, {"_id":"yUDq43zxZKgnCWwB","type":0,"documentCollection":"null","documentId":"null","text":"Mild Anxiety. Your Maximum Calm decreases by 2. @UUID[Compendium.mosh.macros_triggered_1e.Macro.eoGfi5JdPASUUJU4]{-2 Maximum Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[83,83],"drawn": false}, {"_id":"GJKxSWI2bxXyCNxT","type":0,"documentCollection":"null","documentId":"null","text":"Crippling Fear. Gain a new Phobia, determined by the Warden. Whenever you encounter this phobia make a Fear save at Disadvantage or lose 1d10 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.RTL29CqdaAriGSTS]{+1 Phobia}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[84,84],"drawn": false}, {"_id":"TOqb2JnInEfFipaR","type":0,"documentCollection":"null","documentId":"null","text":"Psychotic Break. Immediately attack the closest crew member until you do at least [[/r 2d10]] damage or 1 Hit, whichever comes first. If there is no crew member nearby, you attack the environment.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[85,85],"drawn": false}, {"_id":"AP8XSxwSK8fugXyc","type":0,"documentCollection":"null","documentId":"null","text":"Outburst. Suddenly shout, cry out, slam your fist against a wall, etc., making a loud noise. Nearby crew members lose 1d10 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.jHyqXb2yDFTNWxpy]{-1d10 Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[86,86],"drawn": false}, {"_id":"HylewV0kpxfLH6T9","type":0,"documentCollection":"null","documentId":"null","text":"Rattled. Disadvantage on all rolls for the rest of the session.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[87,87],"drawn": false}, {"_id":"KXtQ6JklVOBolFHf","type":0,"documentCollection":"null","documentId":"null","text":"Cowardice. Lose 1d10 Calm. For the rest of the session, you must make a Fear save to engage in combat. @UUID[Compendium.mosh.macros_triggered_1e.Macro.b0jk4XwP7by8a3uc]{+1 Coward}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[88,88],"drawn": false}, {"_id":"C0rWCutnv8a4X46J","type":0,"documentCollection":"null","documentId":"null","text":"Hallucinations. For the next [[/r 1d10]] hours (determined secretly) , you have trouble distinguishing between reality and fantasy. @UUID[Compendium.mosh.macros_triggered_1e.Macro.Z7XPRgpTQqqi4M1n]{+1 Hallucinations}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[89,89],"drawn": false}, {"_id":"jIaGDvdasADYuAw1","type":0,"documentCollection":"null","documentId":"null","text":"Nervous Twitch. Lose 1d10 Calm. The nearest crew member also loses 1d5 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.jHyqXb2yDFTNWxpy]{-1d10 Calm} @UUID[Compendium.mosh.macros_triggered_1e.Macro.AvKZE5IFubIaAIUy]{-1d5 Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[90,92],"drawn": false}, {"_id":"sCo5Gi5YZJJF4Gp3","type":0,"documentCollection":"null","documentId":"null","text":"Overwhelmed. Lose 1d10 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.jHyqXb2yDFTNWxpy]{-1d10 Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[93,96],"drawn": false}, {"_id":"QssxAQ8lw7rba9Us","type":0,"documentCollection":"null","documentId":"null","text":"Moment of Panic. Lose 1d5 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.AvKZE5IFubIaAIUy]{-1d5 Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[97,99],"drawn": false}, {"_id":"FmhTD6OzbqsJsaD3","type":0,"documentCollection":"null","documentId":"null","text":"Heart Races. Lose 1 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.qbq694JMbXeZrHjj]{-1 Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[100,100],"drawn": false} ],"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
{"_id":"GCtYeCCQVQJ5M6SE","name":"Panic Check (Calm, Android)","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","description":"Eventually, Stress, Damage and emotional wear and tear will bring you to your breaking point. When that happens there’s a chance that you’ll lose control and Panic. To determine whether you are able to keep your cool under extreme pressure, make a Panic Check . While the results are primarily negative there is the possibility of grace under fire.
","formula":"1d100","replacement":true,"displayRoll":true,"results":[ {"_id":"HWOLLg9BaqHHTic6","type":0,"documentCollection":"null","documentId":"null","text":"Slagged: Gigeresque-Scanners Head Explosion. Everyone present gains a phobia and must make a Fear save or lose 1d10 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.R2KizR1soAhFYDZm]{Fear Save}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[1,39],"drawn": false}, {"_id":"rntpKYebltLa5OO7","type":0,"documentCollection":"null","documentId":"null","text":"Data Corruption: The Warden takes over your character, plagued by nightmarish malfunctions, permanently. Not even a factory reset will be helpful (the backups are corrupted as well).","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[40,59],"drawn": false}, {"_id":"FuB4kX2dhRCmmSnO","type":0,"documentCollection":"null","documentId":"null","text":"Reset to Factory Settings: You become terminally unstable and a full factory reset must be performed. Reroll a new character, but its name, equipment, current health, physical conditions, and Android class remain the same.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[60,64],"drawn": false}, {"_id":"nKsdhexbHjfgB36n","type":0,"documentCollection":"null","documentId":"null","text":"Cascade Failure: Death in [[/r 1d10]] minutes unless you receive urgent troubleshooting and repair. -1d10 to your Intellect. @UUID[Compendium.mosh.macros_triggered_1e.Macro.oYSjanH7BmmweIpp]{-1d10 Intellect}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[65,69],"drawn": false}, {"_id":"z5nwGQENMCEP7GOM","type":0,"documentCollection":"null","documentId":"null","text":"Rampancy: Once per session, the Warden may take over your character for one round. These episodes double in duration (or become twice as frequent) each session. @UUID[Compendium.mosh.macros_triggered_1e.Macro.wXobG3sUiQMLtGQs]{+1 Rampancy}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[70,70],"drawn": false}, {"_id":"DpEMe3Zwb48kNy7u","type":0,"documentCollection":"null","documentId":"null","text":"Fried Logic Core: Frenzied nonsensical behaviour. Whenever you lose Calm, everyone else nearby loses the same amount of Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.NDjuBKnMVPgJePNq]{+1 Fried Logic Core}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[71,71],"drawn": false}, {"_id":"J2r7KvRISQuUj5wg","type":0,"documentCollection":"null","documentId":"null","text":"Software Bloat: Lose double Calm from all sources. @UUID[Compendium.mosh.macros_triggered_1e.Macro.L4gRfMiEaxm3Xda5]{+1 Software Bloat}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[72,72],"drawn": false}, {"_id":"d6Wm36Qtcj7lGA4Y","type":0,"documentCollection":"null","documentId":"null","text":"Bit Rot: Whenever you would recover Calm, recover half as much instead. @UUID[Compendium.mosh.macros_triggered_1e.Macro.YYmZYNe8RWvhDFDz]{+1 Bit Rot}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[73,73],"drawn": false}, {"_id":"7mC8inwvnsLOHH4u","type":0,"documentCollection":"null","documentId":"null","text":"Deviant Logic Core: Whenever you make a Fear save, roll under your Fear or your Calm, whichever is lower. @UUID[Compendium.mosh.macros_triggered_1e.Macro.6PU4hmYOjHk4N0SY]{+1 Deviant Logic Core}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[74,74],"drawn": false}, {"_id":"V629RPnKA5wKx6n6","type":0,"documentCollection":"null","documentId":"null","text":"Faulty Heuristics: Whenever you make a Sanity save, roll under your Sanity or your Calm, whichever is lower. @UUID[Compendium.mosh.macros_triggered_1e.Macro.zLRsweb35Lw0NMev]{+1 Faulty Heuristics}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[75,75],"drawn": false}, {"_id":"OhdDuQ8gMp4GBtcD","type":0,"documentCollection":"null","documentId":"null","text":"Hardware Driver Failure: You lose motor function of one part of your body. Roll on the hit location table. If torso or head rolled, [-] on all rolls as head lolls around awkwardly unless supported.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[76,76],"drawn": false}, {"_id":"iwN6yTflt4D3roCN","type":0,"documentCollection":"null","documentId":"null","text":"Threat Assessment Failure: You lose the ability to discern friend from foe, treating all vaguely-humanoid entities as you would members of your crew. @UUID[Compendium.mosh.macros_triggered_1e.Macro.djzdZtIjROXN1dVB]{+1 Threat Assessment Failure}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[77,77],"drawn": false}, {"_id":"MyJZnlKG0LJ59yWA","type":0,"documentCollection":"null","documentId":"null","text":"Ethical Directive Failure: You now lose half the Calm (rounded up) you normally would from all sources but you now have the Panic Effect of a Marine, in addition to that of an Android. @UUID[Compendium.mosh.macros_triggered_1e.Macro.WAyrlgcyR4I19Bqv]{+1 Ethical Directive Failure}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[78,78],"drawn": false}, {"_id":"iNjsSW1iXWzpcCfy","type":0,"documentCollection":"null","documentId":"null","text":"Turing Test Failure: You have difficulty simulating humanity. Party make Fear Save or lose 1d10 Calm whenever you show up. @UUID[Compendium.mosh.macros_triggered_1e.Macro.3nrEYqwkhMs1Ch5v]{+1 Turing Test Failure}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[79,79],"drawn": false}, {"_id":"vhrcho7GGbox9M5p","type":0,"documentCollection":"null","documentId":"null","text":"Ethical Directive Misread: Loses any expressiveness. Discusses the irrationality of Phobias, seeks to trigger them in others. @UUID[Compendium.mosh.macros_triggered_1e.Macro.9sKO5WUBwCW1YbR3]{+1 Ethical Directive Misread}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[80,80],"drawn": false}, {"_id":"P35RZJfLqM8QPpvt","type":0,"documentCollection":"null","documentId":"null","text":"Damage to Threat Assessment: Betray party member at the next opportunity, believing you are aiding the crew. All Calm lost is doubled for the next [[/r 1d10]] hours.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[81,81],"drawn": false}, {"_id":"3rCcCnxz7Ez582ZW","type":0,"documentCollection":"null","documentId":"null","text":"Bad Blocks: Your Maximum Calm decreases by 1d10. @UUID[Compendium.mosh.macros_triggered_1e.Macro.J61Srent4vEthGAn]{-1d10 Maximum Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[82,82],"drawn": false}, {"_id":"t5iTm387wPsVrIAe","type":0,"documentCollection":"null","documentId":"null","text":"Fragmented Memory: Your Maximum Calm decreases by 2. @UUID[Compendium.mosh.macros_triggered_1e.Macro.eoGfi5JdPASUUJU4]{-2 Maximum Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[83,83],"drawn": false}, {"_id":"yZ8tnNN1HoaeycCz","type":0,"documentCollection":"null","documentId":"null","text":"Kernel Panic: Immediately reboot, lapsing into into a pseudo-catatonic state for [[/r 1d10]] rounds.","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[84,84],"drawn": false}, {"_id":"zu59Rvvc8vegrtPN","type":0,"documentCollection":"null","documentId":"null","text":"Killswitch Engaged: Go berserk, will not withdraw from combat regardless of situation, will not ashere to tactics. @UUID[Compendium.mosh.macros_triggered_1e.Macro.tQltbIC9ahDwNsTp]{+1 Killswitch Engaged}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[85,85],"drawn": false}, {"_id":"qrkXSXkbn5oymjBl","type":0,"documentCollection":"null","documentId":"null","text":"Feedback Loop: Take 1d10 damage from overdriven repetitive motion. Everyone else nearby make Fear saves or lose 1d5 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.w3ttEaXP7yp25M5Q]{-1d10 Health} @UUID[Compendium.mosh.macros_triggered_1e.Macro.AvKZE5IFubIaAIUy]{-1d5 Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[86,86],"drawn": false}, {"_id":"ErmpxrA7QnjJ5QOO","type":0,"documentCollection":"null","documentId":"null","text":"Vocalization Failure: Intermittently shrieks like a fax machine under duress. Cannot communicate or sneak for [[/r 2d10]] hours. Nearby crew members lose 1d10 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.bJWFhod0YA8ln8H8]{+1 Vocalization Failure}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[87,87],"drawn": false}, {"_id":"OLJTaMVRK13dJpNl","type":0,"documentCollection":"null","documentId":"null","text":"Inventories Particles of Dust By Grade: Cannot engage in any other tasks for [[/r 1d5]] hours. Everyone else nearby loses 1d10 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.jHyqXb2yDFTNWxpy]{-1d10 Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[88,88],"drawn": false}, {"_id":"ewJ6G0cFV00tq87l","type":0,"documentCollection":"null","documentId":"null","text":"Incorrectly States the Odds: For [[/r 2d10]] hours distracts others, insisting impossible tasks are trivial, and that trivial tasks are impossible. Anyone attempting a complex task must make a Fear save or lose 1d10 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.R2KizR1soAhFYDZm]{Fear Save}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[89,89],"drawn": false}, {"_id":"GXYDv0D5ziopFB19","type":0,"documentCollection":"null","documentId":"null","text":"Organises Objects into Geometric Patterns: Unnerving. Everyone else nearby loses 1d10 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.jHyqXb2yDFTNWxpy]{-1d10 Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[90,92],"drawn": false}, {"_id":"LNR14WhinNejIKvP","type":0,"documentCollection":"null","documentId":"null","text":"Explains the Etymology of Words: Distracting. Everyone else nearby loses 1d5 Calm. The next check a nearby crewmember makes gains [-]. @UUID[Compendium.mosh.macros_triggered_1e.Macro.AvKZE5IFubIaAIUy]{-1d5 Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[93,96],"drawn": false}, {"_id":"WBqcIfMznk4lvPgb","type":0,"documentCollection":"null","documentId":"null","text":"States the Odds: Annoying. Everyone else nearby loses 1 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.qbq694JMbXeZrHjj]{-1 Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[97,99],"drawn": false}, {"_id":"SU9ggXRsL88CNb6N","type":0,"documentCollection":"null","documentId":"null","text":"Segfault: Lose 1 Calm. @UUID[Compendium.mosh.macros_triggered_1e.Macro.qbq694JMbXeZrHjj]{-1 Calm}","img":"systems/mosh/images/icons/ui/rolltables/panic_check.png","weight":1,"range":[100,100],"drawn": false} ],"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
{"_id":"31YibfjueXuZdNLb","name":"Blunt Force Wound","img":"systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png","description":"Whenever you gain a Blunt Force Wound, roll on this table to determine the effect. Flesh Wounds are small inconveniences. Minor/Major Injuries cause lasting issues which require medical treatment. Lethal Injuries can kill you if not dealt with immediately. Fatal Injuries can kill outright. Bleeding wounds, if not treated can quickly overwhelm you.
","formula":"1d10-1","replacement":true,"displayRoll":true,"results":[ {"_id":"kGDBRdD9azQLJRDl","type":0,"documentCollection":"null","documentId":"null","text":"Flesh Wound: Knocked down.","img":"systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png","weight":1,"range":[0,0],"drawn": false}, {"_id":"mYsLkuttsbN0PPzE","type":0,"documentCollection":"null","documentId":"null","text":"Minor Injury: Winded. [-] until you catch your breath.","img":"systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png","weight":1,"range":[1,1],"drawn": false}, {"_id":"RnmOw1OvhVaYQsJV","type":0,"documentCollection":"null","documentId":"null","text":"Minor Injury: Sprained Ankle. [-] on Speed Checks.","img":"systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png","weight":1,"range":[2,2],"drawn": false}, {"_id":"rCPAVwvuRI5PDapO","type":0,"documentCollection":"null","documentId":"null","text":"Minor Injury: Concussion. [-] on mental tasks.","img":"systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png","weight":1,"range":[3,3],"drawn": false}, {"_id":"gYfGKit1I8vIlXas","type":0,"documentCollection":"null","documentId":"null","text":"Minor Injury: Leg or foot broken. [-] on Speed Checks.","img":"systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png","weight":1,"range":[4,4],"drawn": false}, {"_id":"Xvo8mQoXzQb18gms","type":0,"documentCollection":"null","documentId":"null","text":"Major Injury: Arm or hand broken. [-] on manual tasks.","img":"systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png","weight":1,"range":[5,5],"drawn": false}, {"_id":"AiacUbJlw1slbsW3","type":0,"documentCollection":"null","documentId":"null","text":"Major Injury: Snapped collarbone. [-] on Strength Checks.","img":"systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png","weight":1,"range":[6,6],"drawn": false}, {"_id":"bxD3uLX6GcVG7kwG","type":0,"documentCollection":"null","documentId":"null","text":"Lethal Injury: Back broken. [-] on all rolls. Death Save in [[/r 1d10]] rounds.","img":"systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png","weight":1,"range":[7,7],"drawn": false}, {"_id":"5WHDRIu6o2xp1Vml","type":0,"documentCollection":"null","documentId":"null","text":"Lethal Injury: Skull cracked. [-] on all rolls. Death Save in [[/r 1d10]] rounds.","img":"systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png","weight":1,"range":[8,8],"drawn": false}, {"_id":"NzrMxLpPo52Ayoq7","type":0,"documentCollection":"null","documentId":"null","text":"Fatal Injury: Spine or neck broken. Death Save. @UUID[Compendium.mosh.macros_hotbar_1e.Macro.NsRHfRuuNGPfkYVf]{Death Save}","img":"systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png","weight":1,"range":[9,9],"drawn": false} ],"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}}
diff --git a/packs/rolltables_1e/000003.log b/packs/rolltables_1e/000003.log
new file mode 100644
index 0000000..d02b132
Binary files /dev/null and b/packs/rolltables_1e/000003.log differ
diff --git a/packs/rolltables_1e/000004.log b/packs/rolltables_1e/000004.log
deleted file mode 100644
index e69de29..0000000
diff --git a/packs/rolltables_1e/000005.ldb b/packs/rolltables_1e/000005.ldb
deleted file mode 100644
index 8d8a36b..0000000
Binary files a/packs/rolltables_1e/000005.ldb and /dev/null differ
diff --git a/packs/rolltables_1e/LOG b/packs/rolltables_1e/LOG
index 053f23d..6e871f0 100644
--- a/packs/rolltables_1e/LOG
+++ b/packs/rolltables_1e/LOG
@@ -1,5 +1 @@
-2025/01/05-13:02:17.072 5f1c Delete type=3 #1
-2025/01/05-13:03:25.753 43f4 Level-0 table #5: started
-2025/01/05-13:03:25.758 43f4 Level-0 table #5: 80209 bytes OK
-2025/01/05-13:03:25.761 43f4 Delete type=0 #3
-2025/01/05-13:03:25.778 43f4 Manual compaction at level-0 from '!tables!31YibfjueXuZdNLb' @ 72057594037927935 : 1 .. '!tables.results!ypcoikqHLhnc9tNs.zJkYrssfrdWBSeRm' @ 0 : 0; will stop at (end)
+2025/08/28-23:53:35.252 2e0c Delete type=3 #1
diff --git a/packs/rolltables_1e/MANIFEST-000002 b/packs/rolltables_1e/MANIFEST-000002
index c152268..bbbc585 100644
Binary files a/packs/rolltables_1e/MANIFEST-000002 and b/packs/rolltables_1e/MANIFEST-000002 differ
diff --git a/system.json b/system.json
index 59b4626..0a86e65 100644
--- a/system.json
+++ b/system.json
@@ -2,7 +2,7 @@
"id": "mosh",
"title": "MoSh - Unofficial Mothership",
"description": "The unofficial Mothership system for FoundryVTT.",
- "version": "0.5.27",
+ "version": "0.6.0",
"esmodules": [
"module/mosh.js"
],
@@ -150,8 +150,8 @@
"primaryTokenAttribute": "health",
"secondaryTokenAttribute": "other.stress",
"url": "https://github.com/Futil/foundry-mothership",
- "manifest": "https://raw.githubusercontent.com/Futil/foundry-mothership/0.5.27/system.json",
- "download": "https://github.com/Futil/foundry-mothership/releases/download/0.5.27/foundry-mothership.zip",
+ "manifest": "https://raw.githubusercontent.com/Futil/foundry-mothership/0.6.0/system.json",
+ "download": "https://github.com/Futil/foundry-mothership/releases/download/0.6.0/foundry-mothership.zip",
"license": "LICENSE.txt",
"authors": [
{
@@ -164,8 +164,8 @@
}
],
"compatibility": {
- "minimum": "11",
- "maximum": "12",
- "verified": "12"
+ "minimum": "13",
+ "maximum": "13",
+ "verified": "13"
}
}
\ No newline at end of file
diff --git a/template.json b/template.json
index aff2133..a5c08e0 100644
--- a/template.json
+++ b/template.json
@@ -19,6 +19,12 @@
"max" : 2,
"label" : "Wounds"
},
+ "netHP": {
+ "value": 20,
+ "min": 0,
+ "max" : 20,
+ "label" : "Net HP"
+ },
"bleeding": {
"value": 0,
"min": 0,
@@ -36,9 +42,6 @@
"current" : 0,
"capacity" : 0
},
- "settings" : {
- "useCalm" : false
- },
"class": {
"value": ""
},
@@ -155,6 +158,7 @@
"base"
],
"biography": "",
+ "notes": "",
"description": "This is a description",
"xp": {
"value": 1,
@@ -194,9 +198,12 @@
"enabled" : false
},
"armor": {
- "value": 10,
+ "value": 0,
+ "mod": 0,
"min": 0,
"max": 99,
+ "damageReduction": 0,
+ "cover": "none",
"label": "Armor",
"rollLabel": "Armor Save",
"enabled" : false
diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html
index 3856967..2b340c6 100644
--- a/templates/actor/actor-sheet.html
+++ b/templates/actor/actor-sheet.html
@@ -353,7 +353,6 @@
{{ localize 'Mosh.Items' }}
{{ localize 'Mosh.Bio' }}
{{ localize 'Mosh.Notes' }}
-
{{!-- Sheet Body --}}
@@ -389,8 +388,8 @@
{{armor.name}}
- {{armor.system.armorPoints}}
- {{armor.system.damageReduction}}
+ {{armor.system.armorPoints}}
+ {{armor.system.damageReduction}}
{{armor.system.speed}}
{{#if armor.system.oxygenMax}}
{{armor.system.oxygenCurrent}}/{{armor.system.oxygenMax}}
@@ -424,7 +423,7 @@
{{armor.name}}
- {{armor.system.armorPoints}}
+ {{armor.system.armorPoints}}
{{armor.system.speed}}
{{#if armor.system.oxygenMax}}
{{armor.system.oxygenCurrent}}/{{armor.system.oxygenMax}}
@@ -599,7 +598,7 @@
{{weapon.name}}
{{#if weapon.system.antiArmor}}
- {{weapon.system.damage}} ({{ localize 'Mosh.AntyArmorAcronym' }})
+ {{weapon.system.damage}} ({{ localize 'Mosh.AntiArmorAcronym' }})
{{else}}
{{weapon.system.damage}}
{{/if}}
diff --git a/templates/actor/creature-sheet.html b/templates/actor/creature-sheet.html
index 720ab2f..550fd56 100644
--- a/templates/actor/creature-sheet.html
+++ b/templates/actor/creature-sheet.html
@@ -13,8 +13,8 @@
{{#if system.swarm.enabled}}
{{ localize 'Mosh.Combat' }} {{ localize 'Mosh.SwarmWoundShort' }}
-
+
{{else}}
{{ localize 'Mosh.Combat' }}
@@ -99,7 +99,7 @@
-
+
{{ localize 'Mosh.Health' }}
@@ -134,7 +134,35 @@
{{ localize 'Mosh.Current' }}
{{ localize 'Mosh.Maximum' }}
+
+
+
{{ localize 'Mosh.Armor' }}
+
+
{{ localize 'Mosh.ArmorPoints' }}
+
{{ localize 'Mosh.DMGReduction' }}
+
+
{{editor enriched.description target="system.description" button=true owner=owner editable=true}}
@@ -159,8 +187,11 @@
{{!-- Sheet Tab Navigation --}}
+ {{ localize 'Mosh.Skills' }}
{{ localize 'Mosh.Weapons' }}
+ {{ localize 'Mosh.Items' }}
{{ localize 'Mosh.Bio' }}
+ {{ localize 'Mosh.Notes' }}
{{!-- Sheet Body --}}
@@ -168,32 +199,248 @@
{{!-- Biography Tab --}}
- {{editor system.biography target="system.biography" button=true owner=owner editable=true}}
+ {{editor enriched.biography target="system.biography" button=true editable=true}}
+ {{!-- Notes Tab --}}
+
+ {{editor enriched.notes target="system.notes" button=true editable=true}}
+
+ {{!-- Owned Items Tab --}}
+
+
+ {{#if system.settings.firstEdition}}
+
+
+
+ {{#each armors as |armor id|}}
+
+
+ {{armor.name}}
+ {{armor.system.armorPoints}}
+ {{armor.system.damageReduction}}
+ {{armor.system.speed}}
+ {{#if armor.system.oxygenMax}}
+ {{armor.system.oxygenCurrent}}/{{armor.system.oxygenMax}}
+ {{else}}
+ {{ localize 'Mosh.NA' }}
+ {{/if}}
+
+
+
+ {{/each}}
+
+ {{else}}
+
+
+
+ {{#each armors as |armor id|}}
+
+
+ {{armor.name}}
+ {{armor.system.armorPoints}}
+ {{armor.system.speed}}
+ {{#if armor.system.oxygenMax}}
+ {{armor.system.oxygenCurrent}}/{{armor.system.oxygenMax}}
+ {{else}}
+ {{ localize 'Mosh.NA' }}
+ {{/if}}
+
+
+
+ {{/each}}
+
+ {{/if}}
+
+
+
+
+ {{#if system.settings.hideWeight}}
+ {{#each gear as |item id|}}
+
+
+ {{item.name}}
+ {{item.system.quantity}}
+ {{item.system.cost}}
+
+
+ {{/each}}
+ {{else}}
+ {{#each gear as |item id|}}
+
+
+ {{item.name}}
+ {{item.system.quantity}}
+ {{item.system.weight}}
+ {{item.system.cost}}
+
+
+ {{/each}}
+ {{/if}}
+
+ {{#unless system.settings.hideWeight}}
+
+ {{/unless}}
+
+
+ {{!-- Owned Skills Tab --}}
+
+
+
+
+ {{#each skills as |skill id|}}
+
+
+ {{skill.name}}
+ {{skill.system.rank}}
+ {{skill.system.bonus}}
+
+
+ {{/each}}
+
+
+ {{#if system.settings.firstEdition}}
+
+
+
+
+
{{ localize 'Mosh.SkillTraining' }}
+
+
{{{system.xp.html}}}
+
+
+
+ {{/if}}
+
+
+
+
+
+
+
+
+ {{#each conditions as |condition id|}}
+
+
+ {{condition.name}}
+ {{condition.system.severity}}
+
+ {{#if condition.system.treatment.html}}
+
+ {{{condition.system.treatment.html}}}
+
+ {{else}}
+
+ {{condition.name}}
+
+ {{/if}}
+
+
+
+
+ {{/each}}
+
+
+
+
+
{{!-- Owned Weapons Tab --}}
+
{{#each weapons as |weapon id|}}
-
+
- {{weapon.name}}
+ {{weapon.name}}
+ {{#if weapon.system.antiArmor}}
+ {{weapon.system.damage}} ({{ localize 'Mosh.AntiArmorAcronym' }})
+ {{else}}
{{weapon.system.damage}}
+ {{/if}}
{{#if weapon.system.useAmmo}}
{{weapon.system.ammo}}
{{else}}
@@ -214,20 +461,16 @@
{{ localize 'Mosh.NA' }}
{{/if}}
{{#if weapon.system.ranges.value}}
-
-
{{weapon.system.ranges.value}}
{{else}}
{{ localize 'Mosh.NA' }}
{{/if}}
-
{{/each}}
-
diff --git a/templates/actor/ship-sheet-sbt.html b/templates/actor/ship-sheet-sbt.html
index cb208e2..0ff1b4f 100644
--- a/templates/actor/ship-sheet-sbt.html
+++ b/templates/actor/ship-sheet-sbt.html
@@ -102,7 +102,7 @@
{{!-- Sheet Header --}}
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/templates/dialogs/actor-generator/actor-generator-skill-option-full-master-dialog.html b/templates/dialogs/actor-generator/actor-generator-skill-option-full-master-dialog.html
index a6087db..e14bf2d 100644
--- a/templates/dialogs/actor-generator/actor-generator-skill-option-full-master-dialog.html
+++ b/templates/dialogs/actor-generator/actor-generator-skill-option-full-master-dialog.html
@@ -1,3 +1,5 @@
+
+
-