Skip to content

Hero Actions

Idle edited this page Dec 20, 2024 · 11 revisions

This feature integrates and automates the Hero Deck actions into the PF2e system character sheet.

The UI added to the sheet will let you inspect, draw, discard, use, send-to-chat and trade hero actions with a single click.

Important

This feature requires a GM to be online for some of its functionalities to work.

Note

If a mythic character, Mythic Points will be used instead of Hero Points.

Variants

Regular Variant

This variant forces characters to have a single hero action per hero point:

  • if they have more points than actions, they will be asked to draw as many actions as needed to reach their hero points value.
  • if they have more actions than points, they will be required to discard the excess of actions they currently have.

Count Variant

Instead of having one action per point, the character will draw a set of # actions at once and will be able to use any of them as long as they have the hero point available for it. No discard will be required and actions cannot be drawn individually.

Trade

A character can request trade a hero action with another character, the other character can accept or reject the trade as they see fit.

Note

If the Private Draw setting is enabled, the trades will be blind, the character requesting the trade will not be able to pick which action they want in return and the other character will not see which one is offered to them.

Settings

Enabled 🌎

Enables the feature in your world

Table UUID 🌎

The module allows you to use your own table of hero actions instead of the one provided by paizo, in that case, you need to tell the module which one it is by providing its UUID, To get the UUID of a table (in a compendium or in the Rollable Tables directory), simply open the table and Right-Click on 📔 next to its name.

Hero Set Variant 🌎

If 0, characters can only have one hero action per hero point. Otherwise, the number of hero actions will be dissociated from the number of hero points available and characters will redraw hero actions in set.

Allow Trade 🌎 ✅

Allows characters to trade hero actions with each others

Private Draw 🌎

Make the message generated when drawing hero actions private instead. If enabled, trades will be blind to all participants.

Macros

you can create script macros yourself using the exposed API of this feature

Give Hero Actions

This macro will let you pick hero actions to give to a character

const selected = actor ?? character;
if (!selected) return;
game.modules.get("pf2e-toolbelt")?.api.heroActions.giveHeroActions(selected);

Remove Hero Actions

This macro will help you remove all the hero actions for selected characters

game.modules.get("pf2e-toolbelt")?.api.heroActions.removeHeroActions();

API

/*
 * retrieve the api object for this feature
 */
game.modules.get("pf2e-toolbelt")?.api.heroActions;
/*
 * can characters trade actions with each others
 */
canTrade: () => boolean;
/*
 * discard those hero actions from the character
 */
discardHeroActions: (actor: CharacterPF2e, uuids: string[] | string) => void
/*
 * draw and return a hero action
 * returns null when an error with the table occured
 */
drawHeroAction: () => Promise<{ uuid: string; name: string | undefined; } | null | undefined>
/*
 * draw the hero actions for this character
 */
drawHeroActions: (actor: CharacterPF2e) => Promise<void>
/*
 * returns the hero actions table that is used by the module
 */
getDeckTable: () => Promise<RollTable | undefined>
/*
 * returns the name and description of this action
 */
getHeroActionDetails: (uuid: string) => Promise<{ name: string; description: string } | undefined>
/*
 * gets the list of hero action on this character
 */
getHeroActions: (actor: CharacterPF2e) => { uuid: string; name?: string | undefined }[]
/*
 * opens a menu to give hero actions to this character
 */
giveHeroActions: (actor: CharacterPF2e) => Promise<null | undefined>
/*
 * opens a menu to discard all the actions from selected characters
 */
removeHeroActions: () => Promise<void>
/*
 * sends a character's hero action description to chat
 */
sendActionToChat: (actor: CharacterPF2e, uuid: string) => Promise<void>
/*
 * make the specified character initiate a trade
 */
tradeHeroAction: (actor: CharacterPF2e) => Promise<void>
/*
 * does this world use the action count variant
 */
usesCountVariant: () => boolean;
/*
 * make the provided character use the specified hero action
 */
useHeroAction: (actor: CharacterPF2e, uuid: string) => Promise<void>