Actionable - reonZ/pf2e-toolbelt GitHub Wiki

This feature will let users link macros to actions and spells. Simply drag & drop a macro in the Details tab of an action/spell sheet.

Action Macro

A use button is added to the action in the character sheet and works the same way self-applied ones do, it is compatible with the Use Button feature.

The actor and the action/feat will both be forwarded to the macro parameters as actor and item respectively.

Spell Macro

Spells will trigger the macro on cast. The macro will be executed with the following arguments in its scope:

{
    actor: ActorPF2e,
    item: SpellPF2e,
    options: {
        slotId?: number;
        rank?: OneToTen;
        consume?: boolean;
        message?: boolean;
        rollMode?: RollMode;
    }
}

If the macro returns false or an object containing any of the following, the spell cast will be cancelled:

{
    skipNotification?: true;
    customNotification?: string
}
  • skipNotification will cancel the spell cast without any notification
  • customNotification will replace the notification message

Settings

Enabled 🌎

Enables this feature in your world.

API

/*
 * retrieve the api object for this feature
 */
game.modules.get("pf2e-toolbelt")?.api.actionable;
/**
 * Retrieve the macro of an action if it exist and no self-applied effect is present
 */
getActionMacro: (item: Maybe<ItemPF2e>) => Promise<Macro | null>
⚠️ **GitHub.com Fallback** ⚠️