Teleports

Teleports are the "faster way" for a Sim from moving from Point A to Point B. Instead of walking, the Sim will use a specified teleport to reach his/her destination.

There are 3 types of teleports (based on Interaction names), two of which relies on the Teleport Tuning and Enums.

* TeleportHereInteraction
* GoHereSuperInteraction (Tuned)
* TeleportStyleSuperInteraction

## TeleportHereInteraction

The TeleportHereInteraction is a *Debug Interaction to teleport a Sim to a selected terrain position* (TDESC). This interaction can be used outside of debug usage such as the Wellness Teleport introduced in GP02: Spa Day.

The Interaction Tuning can be specified to have an animation should it be needed, it is advised that `set_visibility_state` in `basic_extras` be used along with a VFX (if needed) to show the transition of the teleport.

## GoHereSuperInteraction (Old Teleport System)

The GoHereSuperInteraction is a *Test and interaction function for the Go Here Interaction* (TDESC). It is predominantly used as the basis for a Sim to walk from point A to point B. The interaction can be tuned with a `teleport_style_liabilities` in `basic_liabilities` to make a teleport that is referenced from teleport.teleport-tuning and teleport.teleport-enums.

```
<L n="basic\_liabilities">
 <V t="teleport\_style\_liability">
 <U n="teleport\_style\_liability">
 <E n="teleport\_style">teleport_mist</E>
 </U>
 </V>
</L>

```
Example of a `basic_liabilities` that uses a tuned `teleport_style_liability` from the now defunct teleportHere\_VampireMist Interaction Tuning.

This teleport system is previously used by the Vampire Teleports (Bat & Mist), but it has since been moved over to the TeleportStyleSuperInteraction as of Patch 1.68.

For permanent or always active teleports, a trait with a buff can be used where the `teleport_style` can be specified inside the buff.

```
<V n="teleport\_style" t="enabled">
 <E n="enabled">teleport_bat</E>
</V>

```
Example of a tuned `teleport_style` that can be used inside a buff.

## TeleportStyleSuperInteraction (New Teleport System)

The TeleportStyleSuperInteraction is a *SuperInteraction that implements GoHere, which utilizes teleport styles to get a Sim from one point to another, while implementing other space- reserving utilities, such as jigs* (TDESC). The interaction can be tuned with a specified `teleport_style_tuning` and setting `allow_teleport_style_injection` to True (if needed). This interaction requires a regular SuperInteraction to call this interaction.

```
<T n="allow\_teleport\_style\_injection">True</T>
<E n="teleport\_style\_tuning">teleport_witch_broom</E>

```
Example of the tunings used for the TeleportStyleSuperInteraction.
The interaction also needs a TestSet that test the distance of the Sim and the picked terrain in order to prevent an issue with certain objects (mainly the cauldron). In regards the this issue, you can look at this Answers HQ issue that is regarding Cauldron Issues for Potion Making (TwelfthDoctor1 Posts).

```
<V t="distance">
 <U n="distance">
 <U n="threshold">
 <T n="value">7</T>
 </U>
 </U>
</V>

```
An example of a distance test that can be used in any TunableTestSet, TestGlobals, etc.

Arguably, this teleport system is slower compared to a tuned GoHereSuperInteraction as this Teleport System uses an interaction to call another interaction, which slows down the running of interactions and the time for the teleport to commence.

For permanent or always active teleports, a trait can be used where the `teleport_style_interaction_to_inject` can be specified inside the trait.

```
<T n="teleport\_style\_interaction\_to\_inject">218321<!--teleportStyleSuperInteraction\_WitchSpell\_Automatic--></T>

```
Example of a tuned `teleport_style_interaction_to_inject` that can be used inside a trait.

## Teleport Tuning

The Teleport Tuning holds all the data used to run a teleport such as the `teleport animation`, `fade_duration`, `VFX`, etc.

```
<C n="TeleportTuning">
 <L n="TELEPORT\_DATA\_MAPPING">
 <U>
 <E n="key">teleport_mist</E>
 <U n="value">
 <L n="animation\_outcomes">
 <U>
 <U n="animation">
 <T n="factory">152513<!--occult\_Vampire\_SpiritPowers\_Mist--></T>
 </U>
 </U>
 </L>
 <T n="fade\_duration">0.3</T>
 <V n="fade\_out\_effect" t="play\_effect">
 <U n="play\_effect">
 <T n="effect\_name">gp04_vampire_corpus_to_nebula</T>
 <V n="joint\_name" t="Current\_Position" />
 </U>
 </V>
 <T n="start\_teleport\_fade\_sim\_xevt">608</T>
 <T n="start\_teleport\_vfx\_xevt">666</T>
 <V n="teleport\_cost" t="specify\_cost">
 <U n="specify\_cost">
 <T n="cost">5</T>
 <T n="teleport\_statistic">150238<!--commodity\_Motive\_Visible\_Vampire\_Power--></T>
 </U>
 </V>
 <T n="teleport\_xevt">609</T>
 </U>
 </U>
 </L>
</C>

```
Example of a section of the Teleport Tuning.

## Teleport Enums

Teleport Enums are the identifiers of the teleport, it is used in the Teleport Tuning to allocate on which teleport should be used, etc.

Similar to Tag Tuning, a custom enum can only be made by script.

Below is an example of how to add and inject a custom Teleport Enum.

```
from teleport import teleport\_enums

def add\_category\_tags(name, number):
    with teleport\_enums.TeleportStyle.make\_mutable():
        teleport\_enums.TeleportStyle.\_add\_new\_enum\_value(name, number)

# Example: add\_category\_tags('TeleportTagName', EnumValue)

add\_category\_tags('td1\_teleport\_mist', 353359)  # <- This TeleportEnum is for the Mist Form Spell in Vampiric Teleport Spells
add\_category\_tags('td1\_teleport\_bat', 12038858)  # <- This TeleportEnum is for the Bat Form Spell in Vampiric Teleport Spells
add\_category\_tags('td1\_teleport\_grimreaper', 3439920)  # <- This TeleportEnum is for the Reaper's Scythe
add\_category\_tags('td1\_teleport\_dark\_apparate', 8057763)  # <- This TeleportEnum is for the Dark Apparation Spell in Mastery Spells
add\_category\_tags('td1\_teleport\_dark\_apparate\_always\_teleport', 14088733)  # <- This TeleportEnum is for the Dark Apparation Spell in Mastery Spells
add\_category\_tags('td1\_teleport\_dark\_apparate\_fail', 8257766)  # <- This TeleportEnum is for the Dark Apparation Spell in Mastery Spells
add\_category\_tags('td1\_teleport\_wellness', 12067918)  # <- This TeleportEnum is for the Wellness Teleport FOr Teleport Memory System

```
Example of a Custom Teleport Enum Injection - Similar to Scumbumbo's Version of Tag Enum Injection