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

Properties

canSelect: (token: PrototypeToken | TokenDocument) => 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. Default: () => true.

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

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: canvas.placeables.Token,
) => Pick<
    TokenAnimationOptions,
    "duration"
    | "movementSpeed"
    | "easing"
    | "ontick",
>

Get the default animation options for this movement action. Default: () => ({}).

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

The cost modification function. Default: () => cost => cost.

icon: string

The FontAwesome icon class.

img: null | string

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. Default: true.

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. Default: 0.

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. Default: false.

visualize: boolean

Is segment of the movement visualized by the ruler? Default: true.

walls: null | string

The type of walls that block this movement, if any. Default: "move".