Hero Actions - reonZ/pf2e-toolbelt GitHub Wiki

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

When the Hero Set Variant setting is set to 0, the module 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 to 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.

Note

If the user is the owner of both characters (GM included), no request validation will be needed and the trade will automatically proceed.

Settings

Enabled 🌎

Should your world use the Hero Point Deck actions.

Table UUID 🌎

Unique identifier of the table you want to use in your world.

Note

To get the UUID of a table (in a compendium or in the Rollable Tables directory), simply open the table and Left-Click on 📔 next to its name.

Hero Set Variant 🌎 (0)

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 🌎 ✅

When enabled, characters will be able to trade actions with one another.

Private Draw 🌎

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

API

game.toolbelt?.api.heroActions = {
    /** can characters trade actions with each others */
    canTrade(): boolean,
    /** remove the provided hero actions from the character */
    discardHeroActions(actor: CharacterPF2e, uuids: string[] | string): void,
    /** 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<HeroActionDetails | undefined>,
    /** gets the list of hero actions on this character */
    getHeroActions(actor: CharacterPF2e): HeroAction[],
    /** get the data needed to render the hero actions UI in a foundry application */
    getHeroActionsTemplateData(actor: CharacterPF2e): HeroActionsTemplateData | undefined,
    /** opens a menu to give hero actions to this character */
    giveHeroActions(actor: CharacterPF2e): Promise<void>,
    /** opens a menu to discard all the actions from the world's characters */
    removeHeroActions(): Promise<void>,
    /** sends a character's hero action description to chat */
    sendActionToChat(actor: CharacterPF2e, uuid: string): Promise<void>,
    /** initiate a hero action trade for the character */
    tradeHeroAction(actor: CharacterPF2e): Promise<void>,
    /** use the specified hero action on the character */
    useHeroAction(actor: CharacterPF2e, uuid: string): Promise<void>,
    /** does this world use the action count variant */
    usesCountVariant(): boolean,
}
type HeroAction = {
    uuid: DocumentUUID,
    name: string,
};

type HeroActionDetails = {
    name: string,
    description: string,
};

type HeroActionsTemplateData = {
    actions: HeroAction[],
    usesCount: boolean,
    mustDiscard: boolean,
    mustDraw: boolean,
    canUse: boolean,
    canTrade: boolean | 0,
    diff: number,
};
⚠️ **GitHub.com Fallback** ⚠️