Macros for rolling - SolarBear/Numenera-FoundryVTT GitHub Wiki
Building a macro for rolling
Here's a nice macro template you can use to open up the Task dialog with pre-determined data. This is useful in cases you regularly need to perform a certain skill roll with common modifiers.
For instance, one could with to have a macro for the Speed Defense skill while using a shield (1 asset level).
Requirements
You need the Numenera system version 1.2.1 or higher.
How does that work?
I won't assume much knowledge of Javascript, although it obviously helps! Just create a new macro, edit it and select the type Script.
Here's the template to use:
const configs = {
//Your options here
};
game.numenera.applications.EffortDialog.create(game.user.character, configs);
And that's it! Simply copy and pasting this will open up an empty Effort dialog... except it's boring. No preselected stat or skill or... nothing.
Configuration object
The second parameter, called configs
, is an object that can have the following properties:
{
stat: "might",
skill: "JOpA4lmIcyvNNtf6",
ability: "dscsdcsdcscd",
assets: 1,
taskLevel: 5
}
All parameters are optional.
stat
: the stat to use as a string, in English and lowercased.skill
: a skill's ID as a string.ability
: an ability's ID as a string.assets
: a number representing the number of assets levels to use.taskLevel
: the starting task level for the current roll.
Note: if you're providing skill or ability ID, you don't need to provide the stat, unless you want to override the default stat.
ID?
Here's the easy way to find your skill or ability IDs:
- Open your character sheet.
- Drag your desired skill or ability to the macro bar to create a macro out of it.
- Right-click the newly-created macro and select Edit Macro.
- The macro dialog should open up with something looking like
game.numenera.useItemMacro("RTwSEY0MoVC8GDZS", "ZVVsphpkEN0D8VCU");
What you're looking for is the second string (here,"ZVVsphpkEN0D8VCU"
).
There it is! Just copy and paste it into the the object template, up there, and you should be good.
Yeah OK so how about examples?
Oh, you lazybones.
Speed Defense using a shield
const configs = {
skill: "ZVVsphpkEN0D8VCU", //whatever you Speed Defense skill's ID is
assets: 1
};
game.numenera.applications.EffortDialog.create(game.user.character, configs);
Using your Onslaught ability for the umpteenth time on a level 3 NPC
const configs = {
skill: "eWqKjSB6ETrW7sfI", //whatever your Onslaught ability's ID is
taskLevel: 3,
};
game.numenera.applications.EffortDialog.create(game.user.character, configs);