Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Interface TokenMovementActionConfig

    interface TokenMovementActionConfig {
        canSelect: (token: TokenDocument | PrototypeToken) => boolean;
        deriveTerrainDifficulty:
            | ((nonDerivedDifficulties: { [action: string]: number }) => number)
            | null;
        getAnimationOptions: (
            token: TokenDocument,
        ) => Pick<
            TokenAnimationOptions,
            "duration"
            | "movementSpeed"
            | "easing"
            | "ontick",
        >;
        getCostFunction: (
            token: TokenDocument,
            options: TokenMeasureMovementPathOptions,
        ) => TokenMovementActionCostFunction;
        icon: string;
        img: string | null;
        label: string;
        measure: boolean;
        order: number;
        teleport: boolean;
        visualize: boolean;
        walls: string | null;
    }
    Index

    Properties

    canSelect: (token: TokenDocument | PrototypeToken) => boolean

    Can the current User select this movement action for the given Token? If selectable, the movement action of the Token can be set to this movement action by the User via the UI and when cycling.

    deriveTerrainDifficulty:
        | ((nonDerivedDifficulties: { [action: string]: number }) => number)
        | null

    If set, this function is used to derive the terrain difficulty from from nonderived difficulties, which are those that do not have deriveTerrainDifficulty set. Used by foundry.data.regionBehaviors.ModifyMovementCostRegionBehaviorType. Derived terrain difficulties are not configurable via the behavior UI.

    getAnimationOptions: (
        token: TokenDocument,
    ) => Pick<
        TokenAnimationOptions,
        "duration"
        | "movementSpeed"
        | "easing"
        | "ontick",
    >

    Get the default animation options for this movement action.

    getCostFunction: (
        token: TokenDocument,
        options: TokenMeasureMovementPathOptions,
    ) => TokenMovementActionCostFunction

    The cost modification function.

    icon: string

    The FontAwesome icon class.

    img: string | null

    An image filename. Takes precedence over the icon if both are supplied.

    label: string

    The label of the movement action.

    measure: boolean

    Is the movement measured? The distance, cost, spaces, and diagonals of a segment that is not measured are always 0.

    order: number

    The number that is used to sort the movement actions / movement action configs. Determines the order in the Token Config/HUD and of cycling.

    teleport: boolean

    Is teleportation? If true, the movement does not go through all grid spaces between the origin and destination: it goes from the origin immediately to the destination grid space.

    visualize: boolean

    Is segment of the movement visualized by the ruler?

    walls: string | null

    The type of walls that block this movement, if any