diff --git a/macros/triggered_0e/-1d10_max_calm.js b/macros/triggered_0e/-1d10_max_calm.js deleted file mode 100644 index c7a2c71..0000000 --- a/macros/triggered_0e/-1d10_max_calm.js +++ /dev/null @@ -1,15 +0,0 @@ -prepModifyActor('system.other.calm.max',null,'-1d10',true); - -//tell the actor to run the function -async function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) { - //determine who to run the macro for - if (game.settings.get('mosh','macroTarget') === 'character') { - //run the function for the player's 'Selected Character' - game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - } else if (game.settings.get('mosh','macroTarget') === 'token') { - //run the function for all selected tokens - canvas.tokens.controlled.forEach(function(token){ - token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - }); - } -} \ No newline at end of file diff --git a/macros/triggered_0e/+2_stress copy.js b/macros/triggered_0e/-1d10_max_stress.js similarity index 91% rename from macros/triggered_0e/+2_stress copy.js rename to macros/triggered_0e/-1d10_max_stress.js index ab73e8f..7084fdf 100644 --- a/macros/triggered_0e/+2_stress copy.js +++ b/macros/triggered_0e/-1d10_max_stress.js @@ -1,4 +1,4 @@ -prepModifyActor('system.other.stress.value',2,null,true); +prepModifyActor('system.other.stress.max',null,'-1d10',true); //tell the actor to run the function async function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) { diff --git a/macros/triggered_0e/-1d5_calm.js b/macros/triggered_0e/-1d5_calm.js deleted file mode 100644 index 3ec897b..0000000 --- a/macros/triggered_0e/-1d5_calm.js +++ /dev/null @@ -1,15 +0,0 @@ -prepModifyActor('system.other.calm.value',null,'-1d5',true); - -//tell the actor to run the function -async function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) { - //determine who to run the macro for - if (game.settings.get('mosh','macroTarget') === 'character') { - //run the function for the player's 'Selected Character' - game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - } else if (game.settings.get('mosh','macroTarget') === 'token') { - //run the function for all selected tokens - canvas.tokens.controlled.forEach(function(token){ - token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - }); - } -} \ No newline at end of file diff --git a/macros/triggered_0e/-2_max_calm.js b/macros/triggered_0e/-2_max_calm.js deleted file mode 100644 index a9ebb1b..0000000 --- a/macros/triggered_0e/-2_max_calm.js +++ /dev/null @@ -1,15 +0,0 @@ -prepModifyActor('system.other.calm.max',-2,null,true); - -//tell the actor to run the function -async function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) { - //determine who to run the macro for - if (game.settings.get('mosh','macroTarget') === 'character') { - //run the function for the player's 'Selected Character' - game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - } else if (game.settings.get('mosh','macroTarget') === 'token') { - //run the function for all selected tokens - canvas.tokens.controlled.forEach(function(token){ - token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - }); - } -} \ No newline at end of file diff --git a/macros/triggered_1e/-2_max_calm.js b/macros/triggered_0e/-2_max_stress.js similarity index 92% rename from macros/triggered_1e/-2_max_calm.js rename to macros/triggered_0e/-2_max_stress.js index a9ebb1b..6edec58 100644 --- a/macros/triggered_1e/-2_max_calm.js +++ b/macros/triggered_0e/-2_max_stress.js @@ -1,4 +1,4 @@ -prepModifyActor('system.other.calm.max',-2,null,true); +prepModifyActor('system.other.stress.max',-2,null,true); //tell the actor to run the function async function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) { diff --git a/macros/triggered_1e/-1_calm.js b/macros/triggered_1e/-1_calm.js deleted file mode 100644 index 4478111..0000000 --- a/macros/triggered_1e/-1_calm.js +++ /dev/null @@ -1,15 +0,0 @@ -prepModifyActor('system.other.calm.value',-1,null,true); - -//tell the actor to run the function -async function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) { - //determine who to run the macro for - if (game.settings.get('mosh','macroTarget') === 'character') { - //run the function for the player's 'Selected Character' - game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - } else if (game.settings.get('mosh','macroTarget') === 'token') { - //run the function for all selected tokens - canvas.tokens.controlled.forEach(function(token){ - token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - }); - } -} \ No newline at end of file diff --git a/macros/triggered_1e/-1d10_calm.js b/macros/triggered_1e/-1d10_calm.js deleted file mode 100644 index a7545d0..0000000 --- a/macros/triggered_1e/-1d10_calm.js +++ /dev/null @@ -1,15 +0,0 @@ -prepModifyActor('system.other.calm.value',null,'-1d10',true); - -//tell the actor to run the function -async function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) { - //determine who to run the macro for - if (game.settings.get('mosh','macroTarget') === 'character') { - //run the function for the player's 'Selected Character' - game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - } else if (game.settings.get('mosh','macroTarget') === 'token') { - //run the function for all selected tokens - canvas.tokens.controlled.forEach(function(token){ - token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - }); - } -} \ No newline at end of file diff --git a/macros/triggered_1e/-1d10_max_calm.js b/macros/triggered_1e/-1d10_max_calm.js deleted file mode 100644 index c7a2c71..0000000 --- a/macros/triggered_1e/-1d10_max_calm.js +++ /dev/null @@ -1,15 +0,0 @@ -prepModifyActor('system.other.calm.max',null,'-1d10',true); - -//tell the actor to run the function -async function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) { - //determine who to run the macro for - if (game.settings.get('mosh','macroTarget') === 'character') { - //run the function for the player's 'Selected Character' - game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - } else if (game.settings.get('mosh','macroTarget') === 'token') { - //run the function for all selected tokens - canvas.tokens.controlled.forEach(function(token){ - token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - }); - } -} \ No newline at end of file diff --git a/macros/triggered_0e/-1d10_calm.js b/macros/triggered_1e/-1d10_max_stress.js similarity index 91% rename from macros/triggered_0e/-1d10_calm.js rename to macros/triggered_1e/-1d10_max_stress.js index a7545d0..7084fdf 100644 --- a/macros/triggered_0e/-1d10_calm.js +++ b/macros/triggered_1e/-1d10_max_stress.js @@ -1,4 +1,4 @@ -prepModifyActor('system.other.calm.value',null,'-1d10',true); +prepModifyActor('system.other.stress.max',null,'-1d10',true); //tell the actor to run the function async function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) { diff --git a/macros/triggered_1e/-1d5_calm.js b/macros/triggered_1e/-1d5_calm.js deleted file mode 100644 index 3ec897b..0000000 --- a/macros/triggered_1e/-1d5_calm.js +++ /dev/null @@ -1,15 +0,0 @@ -prepModifyActor('system.other.calm.value',null,'-1d5',true); - -//tell the actor to run the function -async function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) { - //determine who to run the macro for - if (game.settings.get('mosh','macroTarget') === 'character') { - //run the function for the player's 'Selected Character' - game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - } else if (game.settings.get('mosh','macroTarget') === 'token') { - //run the function for all selected tokens - canvas.tokens.controlled.forEach(function(token){ - token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg); - }); - } -} \ No newline at end of file diff --git a/macros/triggered_0e/-1_calm.js b/macros/triggered_1e/-2_max_stress.js similarity index 92% rename from macros/triggered_0e/-1_calm.js rename to macros/triggered_1e/-2_max_stress.js index 4478111..6edec58 100644 --- a/macros/triggered_0e/-1_calm.js +++ b/macros/triggered_1e/-2_max_stress.js @@ -1,4 +1,4 @@ -prepModifyActor('system.other.calm.value',-1,null,true); +prepModifyActor('system.other.stress.max',-2,null,true); //tell the actor to run the function async function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) { diff --git a/module/actor/actor.js b/module/actor/actor.js index 22fbda7..47adffe 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -186,7 +186,7 @@ export class MothershipActor extends Actor { } }, //stress flavor text (0e) - stress_0e: { + stress: { increase: { android: `Power surges through your chest and you start to overheat.`, human: `You feel tightness in your chest and start to sweat.` @@ -988,7 +988,7 @@ export class MothershipActor extends Actor { enrichedRollResult.dice.forEach(function(roll){ //loop through each result roll.results.forEach(function(die) { - //change any 10s to 0s + //change any 100s to 0s if (die.result === 100) {die.result = 0;} }); }); diff --git a/module/mosh.js b/module/mosh.js index d2ce5e7..9d51b94 100644 --- a/module/mosh.js +++ b/module/mosh.js @@ -88,8 +88,6 @@ Hooks.once('init', async function () { }); - - Hooks.once("ready", async function () { // Wait to register hotbar drop hook on ready so that modules could register earlier if they want to Hooks.on("hotbarDrop", (bar, data, slot) => createMothershipMacro(data, slot)); diff --git a/packs/macros_triggered_0e.db b/packs/macros_triggered_0e.db index e90bea4..cdbb8e7 100644 --- a/packs/macros_triggered_0e.db +++ b/packs/macros_triggered_0e.db @@ -35,14 +35,14 @@ {"_id":"BnQZTR7V7va8WRGO","name":"+1d5 Stress","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',null,'1d5',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"WEICDPMGI3waJ6PX","name":"+2 Stress","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',2,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"ZcqUtSMCGvERjQlG","name":"+3 Stress","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',3,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} -{"_id":"dNX3ZDk42CcpTo1l","name":"-1 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.calm.value',-1,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} +{"_id":"dNX3ZDk42CcpTo1l","name":"-1 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',-1,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"4G0yEepSUvif6b6r","name":"-1d10 Body Save","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.stats.body.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} -{"_id":"5jMEd9JjJPIJBKHr","name":"-1d10 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.calm.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} +{"_id":"5jMEd9JjJPIJBKHr","name":"-1d10 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"ZHLgJKrIG82SNbt8","name":"-1d10 Health","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.health.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"P1XjeNN1XswJ2nSC","name":"-1d10 Intellect","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.stats.intellect.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} -{"_id":"FGraO3xTnChUfWGY","name":"-1d10 Maximum Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.calm.max',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} -{"_id":"M91INKwIL3rOZBcx","name":"-1d5 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.calm.value',null,'-1d5',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} -{"_id":"fRja0aFO5muR0q3H","name":"-2 Maximum Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.calm.max',-2,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} +{"_id":"FGraO3xTnChUfWGY","name":"-1d10 Maximum Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.max',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} +{"_id":"M91INKwIL3rOZBcx","name":"-1d5 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',null,'-1d5',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} +{"_id":"fRja0aFO5muR0q3H","name":"-2 Maximum Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.max',-2,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"qENogEcf1awpT98o","name":"-5 Intellect","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.stats.intellect.value',-5,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"VZPWorbauAExrYLZ","name":"-5 Speed","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.stats.speed.value',-5,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"k663ybRMCY3u0OXF","name":"-5 Strength","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.stats.strength.value',-5,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} diff --git a/packs/macros_triggered_1e.db b/packs/macros_triggered_1e.db index e9d4233..d47b919 100644 --- a/packs/macros_triggered_1e.db +++ b/packs/macros_triggered_1e.db @@ -52,22 +52,22 @@ {"_id":"Tx19z2BhTY6onldp","name":"+6 Bleeding","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyItem('pxtF1NfletmoFFGV',6);\n\n//tell the actor to run the function\nasync function prepModifyItem(itemName,addAmount) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyItem(itemName,addAmount);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyItem(itemName,addAmount);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"ZJaVFBB0Kslv1k4f","name":"+7 Bleeding","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyItem('pxtF1NfletmoFFGV',7);\n\n//tell the actor to run the function\nasync function prepModifyItem(itemName,addAmount) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyItem(itemName,addAmount);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyItem(itemName,addAmount);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"V1PPeCwryXNQAkUe","name":"-1 All Stats/Saves","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepRadiationDamage();\n\n//tell the actor to run the function\nasync function prepRadiationDamage() {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.takeRadiationDamage();\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.takeRadiationDamage();\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} -{"_id":"FeLyHueck8h7fjYk","name":"-1 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.calm.value',-1,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} +{"_id":"FeLyHueck8h7fjYk","name":"-1 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',-1,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"vwpxRBbMwjfDCQVG","name":"-1 Health","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.health.value',-1,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"qD8Mvegkf3zVarFr","name":"-1 Maximum Wound","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.hits.max',-1,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"qbq694JMbXeZrHjj","name":"-1 Stress","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',-1,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"C9iTlPOpROuuYi2F","name":"-10 Health","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.health.value',-10,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"nT2AsZwrYhJyxizF","name":"-1d10 Body Save","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.stats.body.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} -{"_id":"CLkqqMR1Cd3zguRN","name":"-1d10 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.calm.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} +{"_id":"CLkqqMR1Cd3zguRN","name":"-1d10 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"w3ttEaXP7yp25M5Q","name":"-1d10 Health","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.health.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"oYSjanH7BmmweIpp","name":"-1d10 Intellect","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.stats.intellect.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} -{"_id":"J61Srent4vEthGAn","name":"-1d10 Maximum Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.calm.max',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} +{"_id":"J61Srent4vEthGAn","name":"-1d10 Maximum Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.max',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"V3L1iRkWwyTzCZK9","name":"-1d10 Strength","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.stats.strength.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"jHyqXb2yDFTNWxpy","name":"-1d10 Stress","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',null,'-1d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} -{"_id":"0bpklH1cLqMWBC6P","name":"-1d5 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.calm.value',null,'-1d5',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} +{"_id":"0bpklH1cLqMWBC6P","name":"-1d5 Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',null,'-1d5',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"yYujq1tBZPqGrQlh","name":"-1d5 Maximum Health","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.health.max',null,'-1d5',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"AvKZE5IFubIaAIUy","name":"-1d5 Stress","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.value',null,'-1d5',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} -{"_id":"eoGfi5JdPASUUJU4","name":"-2 Maximum Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.calm.max',-2,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} +{"_id":"eoGfi5JdPASUUJU4","name":"-2 Maximum Calm","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.other.stress.max',-2,null,true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"ISd2nEMYvWCPQpl0","name":"-2d10 Body Save","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.stats.body.value',null,'-2d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"pS6A6OklvM6S3bvO","name":"-2d10 Health","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.health.value',null,'-2d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} {"_id":"nECUu4pcwsNTE8C5","name":"-3d10 Health","type":"script","scope":"global","img":"icons/svg/d10-grey.svg","command":"prepModifyActor('system.health.value',null,'-3d10',true);\n\n//tell the actor to run the function\nasync function prepModifyActor(fieldAddress,modValue,modRollString,outputChatMsg) {\n //determine who to run the macro for\n if (game.settings.get('mosh','macroTarget') === 'character') {\n //run the function for the player's 'Selected Character'\n game.user.character.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n } else if (game.settings.get('mosh','macroTarget') === 'token') {\n //run the function for all selected tokens\n canvas.tokens.controlled.forEach(function(token){\n token.actor.modifyActor(fieldAddress,modValue,modRollString,outputChatMsg);\n });\n }\n}","folder":null,"flags":{},"_stats":{"systemId":"mosh","systemVersion":"0.4.0","coreVersion":"11.308","createdTime":1685936572185,"modifiedTime":1693515520278,"lastModifiedBy":"6EeM38DJkcBWNAmw"}} diff --git a/template.json b/template.json index 17fbd64..b972009 100644 --- a/template.json +++ b/template.json @@ -133,18 +133,6 @@ "max": 20, "label" : "Stress" }, - "stress_0e": { - "value": 2, - "min": 2, - "max": 999, - "label" : "Stress" - }, - "calm": { - "value": 85, - "min": 0, - "max": 85, - "label" : "Calm" - }, "stressdesc": { "value": "" } diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index 5480b76..fd29775 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -112,49 +112,33 @@ {{#if system.settings.useCalm}}
- +
-
- +
Current
Maximum
{{else}} - {{#if system.settings.firstEdition}} - -
- -
- -
- -
-
Current
-
Minimum
+ +
+ +
+ +
+
- {{else}} - -
- -
- -
- -
-
Current
-
Minimum
-
- {{/if}} +
Current
+
Minimum
+
{{/if}} {{#if system.settings.firstEdition}}