2 Home
Flaig edited this page 2026-10-03 23:13:42 +02:00

TokenMove

A chainable macro API for eased token animations in Foundry VTT: attack lunges, recoils, dodges and shakes that return to where they started, relational movement between two tokens, and saved moves with wall collision and grid snapping. Every animation plays on all connected clients.

await TokenMove.between(source, target)
  .on("source").lunge()                                   // lunge toward the target, marks "impact"
  .on("target").at("impact").offset({ direction: "backward", tokens: 0.3, ease: "easeOutBounce" })
  .play();

Pages

  • Concepts: temporary vs. saved movement, timelines, directions, distances, token references.
  • API Reference: every method and option, presets, the module API.
  • Easings: the built-in curves and custom easings.
  • Sync, Saving and Permissions: how animations reach other clients, who saves moves, wall collision.
  • Examples: copy-paste macros for attacks, dodges, knockback, click-to-move and more.

Quick start

  1. Install TokenMove (Foundry v14) and socketlib, and enable both.
  2. Control a token, target another one.
  3. Create a Script macro with the snippet above and run it.

source and target are globals TokenMove defines for macros: the first controlled and the first targeted token. They can be turned off in the settings; TokenMove.source and TokenMove.target always work.