Skip to content

[#4060] Add teleport activity#6904

Open
Kapuzenjoe wants to merge 8 commits into
foundryvtt:6.0.xfrom
Kapuzenjoe:4060-teleport-activity
Open

[#4060] Add teleport activity#6904
Kapuzenjoe wants to merge 8 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
Copy link
Copy Markdown
Collaborator

@arbron arbron left a comment

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 on lines +29 to +36
/** @inheritDoc */
async _prepareEffectContext(context, options) {
context = await super._prepareEffectContext(context, options);
return context;
}

/* -------------------------------------------- */

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.

Suggested change
/** @inheritDoc */
async _prepareEffectContext(context, options) {
context = await super._prepareEffectContext(context, options);
return context;
}
/* -------------------------------------------- */

effect: {
template: "systems/dnd5e/templates/activity/teleport-effect.hbs",
templates: [
...super.PARTS.effect.templates,
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.

Not including an active effects on this tab, so the other templates aren't necessary.

Suggested change
...super.PARTS.effect.templates,

@arbron arbron requested a review from Fyorl June 3, 2026 16:42
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