Register

Group Tokens

An Add-on Module for Foundry Virtual Tabletop

Author: Mestre Digital Project: Source Foundry Version 14 (Verified 14) Last Updated 15 hours, 1 minute ago

This package contains art, text, or software code produced using generative AI.

Group Tokens for Foundry VTT

Move tokens as one. Merge any group of tokens into a single leader token and split them back apart with one click, or set a token to walk in behind another. Perfect for traveling parties, NPC squads, escort missions, or any set of tokens that should move together.

  • Unlimited groups, up to 25 members each
  • One-click group / ungroup from the Token HUD
  • Animated movement with A* pathfinding (respects walls)
  • Save & Load Formations so your party always lines up the way you want
  • Scene Transfer — move an entire group to another scene, preserving HP, items, and effects
  • Follow Mode — make any token you own walk in behind another token, respecting walls (works for players too)
  • Built for Foundry VTT V14

Buy Me a Coffee More Modules


Quick Start

1. Create a Group

  1. Select 2 or more tokens on the canvas.
  2. Right-click any of them and click the Group Tokens icon in the Token HUD (right column).
  3. Click Create Group.
  4. Pick which token will be the leader — it stays on the map when the group is collapsed; every other token is taken off the scene and stored until you release the group.

2. Group / Ungroup (Toggle)

Right-click the leader token → Group Tokens icon → Toggle Group.

  • Group (Crunch) — members fly into the leader and are removed from the scene.
  • Ungroup (Explode) — members come back at the leader's position and spread outward into free squares, avoiding walls and each other.

The module auto-detects the current state, so you only need one button.

Collected members are stored on the scene and come back exactly as they left: same token ID, same position in any saved formation, same follow links, and — for unlinked tokens — the same HP, name, image and effects. Initiative is preserved too: if a member was in an encounter, it returns to the combat tracker with its original turn order.

While a group is collected its members are not on the map, so Get Over Here!Get in Position!Kill them All! and the formation buttons are unavailable until you release it.

3. Get Over Here!

After ungrouping, members may be scattered across the map. Right-click the leader → Get Over Here! to call them back. They walk toward the leader using A* pathfinding that respects walls.

4. Get in Position!

Right-click the leader → Get in Position! to spread members into a circle formation around the leader. The radius is configurable in Actions & Sounds settings (default: 6 grid cells).

5. Save & Load Formation

Once your members are arranged exactly where you want them:

  1. Right-click the leader → Save Formation — stores each member's position relative to the leader.
  2. Later, right-click the leader → Load Formation — members walk back to their saved spots using the same animated pathfinding as Get Over Here.

The Load Formation button only appears after a formation has been saved. Formations persist across sessions.

6. Add or Remove Tokens

  • Add: right-click an ungrouped token → Group Tokens icon → Add to Group #N.
  • Remove: select one or more tokens → right-click → Group Tokens icon → Remove from Group.

7. Dashboard

Open the Dashboard from the Token HUD (every context menu has an Open Dashboard button) or from Module Settings → Configure Groups.

From the Dashboard you can:

  • Toggle any group (group/ungroup)
  • Find a group (select and pan to its tokens)
  • Transfer a group to another scene
  • Expand a group to see its members
  • Promote a member to leader
  • Remove individual members
  • Clear (delete) a group entirely
  • Copy Group ID for use in macros

Scene Transfer

Groups can be moved between scenes in two ways:

  1. Copy / Paste — copy the leader token and paste it into another scene. The module intercepts the action, shows a confirmation dialog, and transfers all members automatically.
  2. Dashboard — click the Transfer button next to any group and pick a destination scene.

All token data (HP, items, active effects on unlinked tokens) is fully preserved. Tokens are removed from the origin scene after a successful transfer. Groups arrive in collapsed (crunched) state — ungroup at the destination to spread members out.


Kill them All!

Send group members to attack GM-targeted enemy tokens directly from the canvas:

  1. With the group ungrouped, target one or more enemy tokens as the GM.
  2. Right-click the leader → Group Tokens icon → Kill them All!
  3. A slider dialog opens — choose how many members to send (1 to all visible members).
  4. Members animate toward the targets using the same pathfinding as Get Over Here.
    • 1 target — all selected members cluster around it.
    • Multiple targets — members are distributed round-robin across each target.

The button only appears when the group is ungrouped and at least one GM target is set.


Follow Mode

Follow Mode is independent of groups and is the one feature players can use on their own.

  1. Select a token you own.
  2. Target the token it should follow (the normal Foundry targeting click).
  3. Open the Token HUD and click the chain icon (right column).

From then on, whenever the target moves, your token walks in behind it. Click the chain icon again to stop. The button turns indigo while a link is active and its tooltip names the leader.

  • Chains work. Token1 can follow token2, which follows token3. The whole line animates together rather than one token at a time.
  • Loops are refused. If you try to make A follow B while B already follows A, the module says so and writes nothing.
  • Walls are respected while walking. The follower advances only where its leader actually walked, so it threads doorways and corridors correctly.
  • A follower is never dropped for being stuck. If it has no walkable line back to its leader — around a corner, nudged aside by its own player, held up by another token — it is teleported into place behind the leader instead. It always lands next to its leader and never anywhere else, but it will pass through a closed door to get there. Turn Teleport a follower that cannot walk off and it simply waits for a clear line instead. Either way the link survives.
  • Links survive scene changes. Transfer or copy both tokens to another scene and the link is re-established automatically. A link whose leader is not on the scene you are viewing simply lies dormant — it is never silently deleted.

How the follower picks its path

The follower replays the squares its leader physically walked, rather than aiming at a computed spot a fixed distance away. This is deliberate: Foundry v14 has no built-in pathfinder, so a computed destination would land inside a wall the moment the leader turned a corner, and the follower would stop for ordinary dungeon geometry rather than for a closed door. Replaying real footsteps is always a legal route.

One leg of that route is not a footstep: the one from wherever the follower is standing to the nearest square its leader walked. There is no pathfinder to route it, so it is a straight line, and a wall across it means the follower cannot walk at all. That — not a closed door — is the ordinary reason a follower gets stuck, and it is why the teleport recovery exists.

If you install a module that provides pathfinding (by overriding Token#findMovementPath), Follow Mode picks up genuine detours automatically, with no change to this module.

Limits worth knowing

  • Following is computed by the active GM's client. With no GM connected, links stay stored but nothing moves.
  • Only the scene the GM is viewing is processed.
  • A follower keeps a fixed spacing set by the Follow Distance setting, not the spacing the two tokens happened to have when you linked them. At the default of 1 it steps into the square the leader just vacated.
  • A follower that starts far from its leader closes the distance on the leader's next step — by walking if it can, by being displaced if it cannot.
  • Following pauses during combat by default, because each step counts as movement in the token's history and some systems read that as consumed movement. Turn it off in the settings if you prefer.
  • When a leader blinks or displaces, its followers ignore the move by default: those are teleports rather than footsteps, and replaying them would drag a chain through walls. That is the Follow teleports setting, and it is unrelated to the teleport recovery above — a follower being displaced into place is the module repositioning it, not a move it is copying from its leader.
  • Collecting a group does not disturb follow links: members return with the same token IDs, so links pointing at them stay intact.
  • Duplicating a follower duplicates its link.
  • Making an NPC follow a player is a GM action: a player has no write permission on the NPC's token.

Settings

On the Follow Mode tab of Module Settings → Actions & Sounds:

Setting Description
Enable Follow Mode Master switch for the button and the engine
Players may use Follow Mode When off, only the GM sees the button
Follow Distance How far behind a follower walks (1 – 5, default 1). At 1 it steps into the square the leader has just vacated
Animation Speed Match leaderfastnormalslow
Pause following during combat Default on
Follow teleports Default off
Avoid stacking followers Stop short instead of landing on another token
Teleport a follower that cannot walk Default on. Displaces a cut-off follower into place rather than leaving it behind
Maximum Chain Length How many links deep one move may cascade (2 – 25, default 10)

Macros

// Make the selected token follow your current target
FollowMode.follow(canvas.tokens.controlled[0].document, [...game.user.targets][0].document)

// Stop following
FollowMode.unfollow(canvas.tokens.controlled[0].document)

// GM: clear every follow link on this scene
await FollowMode.clearScene()
 

Sounds

Open Module Settings → Actions & Sounds to configure:

Setting Description
Gather Speed How fast members walk during Get Over Here / Load Formation (fastnormalslow)
Get in Position Radius Circle radius in grid cells (3 – 100, default 6)
Audio — Get Over Here Sound effect when gathering members
Audio — Get in Position Sound effect when spreading members
Audio — Load Formation Sound effect when loading a formation
Audio — Group (Crunch) Sound effect on group collapse
Audio — Ungroup (Explode) Sound effect on group expand
Audio — Kill them All Sound effect when sending members to attack targets

Visual Markers

The module draws small badges and colored borders on group tokens so you can tell at a glance who belongs to which group:

  • Leader tokens get a red border and a crown badge.
  • Member tokens get a blue border and a pawn badge.

These markers are visible to the GM only and update automatically as tokens are added, removed, or moved.


Macros & API

All features are accessible from macros and the browser console via the PartyCruncher global (Follow Mode has its own FollowMode global, shown further up).

Quick examples:

// Toggle the first group on the current scene
PartyCruncher.toggleParty()

// Open the Dashboard
PartyCruncher.Dashboard()

// Save the current formation
PartyCruncher.saveFormation("group-id-here")
 

You can copy a group's ID from the Dashboard (small copy icon next to each group name).


Good to Know

  • Only the GM can create, toggle, and manage groups. Follow Mode is the exception — any player can use it on a token they own.
  • A group can have up to 25 members.
  • Token identification uses Foundry document IDs, not names — duplicate token names are fine.
  • Group configuration is stored as world settings (shared across all GMs in the world). The tokens of a collected group are stored as a flag on the scene they belong to, so they travel with it and are removed with it.
  • Groups whose scene has been deleted are automatically cleaned up.
  • A player who owns only a member token has no vision while the group is collected — their token is genuinely off the map. Use a leader the players own, or grant them Observer on the leader.
  • The Token HUD button can be hidden for specific actor types via Module Settings → Actor Type Filter.

Categories

Available Versions

  1. Version 0.0.6

    15 hours, 1 minute ago
    Foundry Version 14 - 14 (Verified 14) Manifest URL Read Notes