-
Notifications
You must be signed in to change notification settings - Fork 55
Macros
This page is dedicated to various different useful macros people have asked for or contributed.
The system generates certain macros with drag and drop functionality.
These macros can be used if the actor is selected. Note the only item types this supports currently are weapons, skills, prayers, spells, and traits.
These macros open the entity's sheet.
These macros are custom scripts to provide useful functionality.
Characteristics have been accommodated as "items" for convenience.
game.wfrp4e.utility.rollItemMacro("ws", "characteristic");
game.wfrp4e.utility.rollItemMacro("bs", "characteristic");
game.wfrp4e.utility.rollItemMacro("s", "characteristic");
game.wfrp4e.utility.rollItemMacro("t", "characteristic");
game.wfrp4e.utility.rollItemMacro("i", "characteristic");
game.wfrp4e.utility.rollItemMacro("ag", "characteristic");
game.wfrp4e.utility.rollItemMacro("dex", "characteristic");
game.wfrp4e.utility.rollItemMacro("int", "characteristic");
game.wfrp4e.utility.rollItemMacro("wp", "characteristic");`
game.wfrp4e.utility.rollItemMacro("fel", "characteristic");
Since skills are not draggable, you can still easily make a macro to do so.
game.wfrp4e.utility.rollItemMacro("Athletics", "skill");
You can either use a chat macro
/table hitloc
Or a script macro
ChatMessage.create({content : game.wfrp4e.tables.formatChatRoll("hitloc"), user : game.user.id})
Script macros are more powerful - for example: I want a macro to roll the Winds and Weather tables simultaneously
ChatMessage.create({content : game.wfrp4e.tables.formatChatRoll("winds"), user : game.user.id})
ChatMessage.create({content : game.wfrp4e.tables.formatChatRoll("weather"), user : game.user.id})
You can find table names by entering /table help
in the chat.
Note: Weather table requires Enemy in Shadows Module
game.wfrp4e.utility.rollItemMacro
takes an additional object as an optional argument that can bypass the roll dialog to instantly roll. {bypass: true, testModifier: <value>, slBonus: <value>, successBonus: <value>}
Example
game.wfrp4e.utility.rollItemMacro("Zweihander", "weapon", {bypass : true, testModifier: -10, slBonus: 2, successBonus : 1});