Skip to content

[#4060] Add teleport activity#6904

Merged
Fyorl merged 11 commits into
foundryvtt:6.0.xfrom
Kapuzenjoe:4060-teleport-activity
Jun 29, 2026
Merged

[#4060] Add teleport activity#6904
Fyorl merged 11 commits into
foundryvtt:6.0.xfrom
Kapuzenjoe:4060-teleport-activity

Conversation

@Kapuzenjoe

Copy link
Copy Markdown
Contributor

I used the opportunity to turn the new Foundry API from foundryvtt/foundryvtt#13935, specifically token.planMovement, into a dedicated activity type for #4060

Functionally, activating the activity lets the user drag the token to the desired destination. After the move is completed, the token returns to its default movement mode.

teleport
example_teleport.mov

Feel free to rate the implementation. I tried to stick as closely as possible to the standard system.

Comment thread module/documents/activity/teleport.mjs Outdated
Comment thread module/documents/activity/teleport.mjs Outdated
Comment thread module/documents/activity/teleport.mjs Outdated
Comment thread module/documents/activity/teleport.mjs Outdated
Comment thread module/data/activity/teleport-data.mjs Outdated
Comment thread lang/en.json Outdated
Comment thread icons/svg/activity/teleport.svg
Comment thread module/applications/activity/teleport-sheet.mjs Outdated
@arbron arbron linked an issue Apr 6, 2026 that may be closed by this pull request
Comment thread module/documents/activity/teleport.mjs Outdated
@Fyorl Fyorl added strategic Requires sign-off from a core Foundry VTT developer before merge. priority: medium labels Apr 7, 2026
@Kapuzenjoe Kapuzenjoe requested a review from arbron April 8, 2026 14:07
Comment thread module/applications/activity/teleport-sheet.mjs Outdated
Comment thread module/data/activity/teleport-data.mjs Outdated
@arbron arbron added this to the D&D5E 6.0.0 milestone May 13, 2026
@Kapuzenjoe Kapuzenjoe force-pushed the 4060-teleport-activity branch from 08f8c20 to d6d7a34 Compare May 14, 2026 06:34
@Kapuzenjoe Kapuzenjoe marked this pull request as draft May 14, 2026 06:39
@Kapuzenjoe Kapuzenjoe marked this pull request as ready for review May 14, 2026 06:42
@arbron arbron changed the base branch from 5.3.x to 6.0.x June 2, 2026 17:12

@arbron arbron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a bit of clean up for the sheet but otherwise its looking good to me.

A few thoughts for future improvement to make things clearer when planning the teleport:

  • Display icon underneath or outline around token to be teleported
  • Add some way to cancel planned movement
  • Add UI to indicate movement being planned like discussed in #6796 for placements

Comment thread module/applications/activity/teleport-sheet.mjs Outdated
Comment thread module/applications/activity/teleport-sheet.mjs Outdated
@arbron arbron requested a review from Fyorl June 3, 2026 16:42
Co-authored-by: Jeff Hitchcock <github444@command-center.org>
@Kapuzenjoe

Copy link
Copy Markdown
Contributor Author

Just a bit of clean up for the sheet but otherwise its looking good to me.

A few thoughts for future improvement to make things clearer when planning the teleport:

A cancel option should be fairly easy to add. Maybe with an active listener on canvas.app.view.oncontextmenu so a right-click cancels the currently planned teleport (similar for placing Tokens).

What kind of icon/outline did you have in mind? Maybe something like in Crucible where the selection frame rotates around the token while it's marked for teleportation?

@Fyorl Fyorl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice feature. I will get this merged into 6.0 and we can tackle any follow-up later.

A few thoughts for future improvement to make things clearer when planning the teleport:

  • Display icon underneath or outline around token to be teleported
  • Add some way to cancel planned movement
  • Add UI to indicate movement being planned like discussed in #6796 for placements

For (1) we should hook into the turn marker machinery. We can pick some suitable asset to use here.

For (2) I observed that simply deselecting the controlled token is enough to cancel the teleport, which is good enough for now I think.

I also added the useRange property as I have to imagine that the targeting range will be the same as the teleport range most of the time (notable exceptions like Misty Step notwithstanding).

@Fyorl Fyorl merged commit 3ac359d into foundryvtt:6.0.x Jun 29, 2026
@arbron arbron mentioned this pull request Jun 29, 2026
33 tasks
@Kapuzenjoe Kapuzenjoe deleted the 4060-teleport-activity branch June 30, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium strategic Requires sign-off from a core Foundry VTT developer before merge. system: activities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity Type: Teleport

3 participants