FoundryVTT Pathfinder 1 Docs

Macros

Functions

rollDefenses()

game.pf1.rollDefenses([options])

Parameter Type Description
options Optional Can contain one or more of the following properties: actorName and actorId, which should be strings referring to an actor
Example Call Description
game.pf1.rollDefenses(); Shows the defenses of the currently selected actor in a chat log
game.pf1.rollDefenses({ actorName: "Action Hank" }); Shows the defenses of an actor named ‘Action Hank’ (note the curly braces within the function call)

Sample Macros

Roll defenses

game.pf1.rollDefenses();

Effect: Shows the defenses for the currently selected actor.

Roll players' skill (GM)

const skill = "per";

game.actors.entities.filter(o => { return o.isPC && o.data.type === "character"; }).forEach(o => {
  o.rollSkill(skill, { event: new MouseEvent({}) });
});

Effect: Rolls a skill for all players (in this case Perception). Hover over your skills to see what you need to enter for other use cases. For example, replace “per” with “sen” to roll Sense Motive.

Last updated on 3 Apr 2020
Published on 3 Apr 2020