Wiki reading hard on the eyes? Try out our Dark Theme! Visit the preferences page while logged in and select Hydra Dark. Don't forget to save your changes!

Guide:Teleporter network

From Terraria Wiki
Jump to: navigation, search
Desktop versionConsole version Desktop/Console-Only Content: This information applies only to the Desktop and Console versions of Terraria.

A pair of Teleporters are handy and simple to use. A small network with few locations is also not a problem. But when number of locations meets 20-30, it usually becomes something, that hard-to-build, hard-to-modify, and hard-to-use. Here is a possible solution and its explanation.

WARNING: this tutorial is focused on people who like engineering.

Overview[edit | edit source]

Root room wiring

This system has the following usage.

The player gets into a large room with one teleporter inside and a set of switches on the wall. Each switch represents a teleporter cabin on the map. He/she turns on one of them and steps on the teleporter. 1-2 second later he stands in a chosen cabin.

On the way back, the player can use the Magic Mirror or something similar.

So we have the following requirements:

  • One root room (relatively complex) and a network of dumb remote cabins.
  • Cabins are connected to each other, so there is no need to drag each wire to the root.
  • Cabins are stateless, so we can fix any logical problems in the root.
  • Adding a new cabin must not cause a complex renovation in the root room.
  • Wiring a new cabin is as simple as dragging a bundle of wires with The Grand Design.
  • Sudden server reboot must not mess the logical state of the network.
  • Player can use colored background walls to draw a map in the root, where switches placed.

Topology[edit | edit source]

The network topology is almost binary tree, except root and one its sub can have up to 4 connections.

Network topology

Each cabin have its address in network, like bottom-right green dot have address "yellow-green-yellow-green". To get player in there, root performs serial activations of all links of some color. Link is a wire, connecting 2 teleporters in different cabins. In game we can connect up to 8 different wires to teleporter. Here we use up to 4.

It means, all links are bundles of 3 (4 in one case) wires of different colors. One wire is teleporting, 2 other are activation signal bypass to subs. Of cause, end-points can be connected with only one wire

Cabin scheme[edit | edit source]

Let's start with simple one. Cabin must have a teleporter and a set of diodes.

Diode is needed to activate some set of links without wiring them together with a single wire. It is made of "AND" gate, one unwired activated lamp (just to split incoming and outgoing wires), and a wired lamp on top. Signal comes to top lamp, outgoing wire is connected to the gate.


Root scheme[edit | edit source]

As far as a teleport and switches, root must have an address commutation scheme, pulse generator, and a timed state machine. Here is the picture of root, allowing up to 4 jumps over links.

Root block scheme

Address commutation[edit | edit source]

The largest block is a commutation array. It consist of similar elements, 4 rows of them (maximum number of jumps), and 5 columns (each column serves up to 4 switches, since there are 4 different colors of wires). Each element is made of 2 diodes (same as used in cabins) and junction box, to split wires from switch and output from diodes. For detailed view, see an image below.

Here is example of wiring address "green-yellow-red" for switch on yellow wire:

green-yellow-red address

The array element can be wired with a switch in 4 ways:

  • To the left lamp (jump green link)
  • To the right lamp (jump red link)
  • To both of lamps (jump yellow link)
  • To none of them (blue link or no more jumps)

State machine activates that codes from top to bottom, so the address of the cabin is written this way.

Turning on the switch flips corresponding set of lamps in pulse generator. And if several switches are turned on, destination address may be unexpected. That's why I recommend to equip switches with torches on the same wire, to see which of them are turned on.

Pulse generator[edit | edit source]

It's not actually a "generator", but I didn't guess a better name. I takes address information in one side, and step sequence in another, making a sequence of pulses of right colors into a 4-wire bundle ("Activation wire" on root block scheme).

Pulse generator

Finally, AND gates are used for their purpose - "AND" logic from 3 inputs. This inputs are pulse from state machine, left and right diodes from address commutation row. But some inputs are inverted. Inversion is made by initial "off" state of logic gate lamp. The state of lamps on the picture above is initial (e.g. all switches on the wall are turned off). We also need an unwired isolating lamp under one of gates, to separate jump pulse wire from output wire of same color.

Knowing of how the AND gate works, you can see, the only one gate in this module will change his state during jump pulse from state machine. Which one, is depends on states of lamps under green and red wires. This gate will trigger a pulse into output wire of corresponding color.

First jump (from root) can be made in 4 directions. That's why we have 4 possible outputs for them. For other jumps, we need so-called "no more jumps" option. Otherwise, all teleporting travels will be 4 jumps long. In this scheme it replaced "jump blue link" option. So, we can remove a blue wire and its logic gate from second and further jumps.

Output from the pulse generator must be wired to root's teleporter (since all 4 colors are downlink for them) and conducted away to sub-cabins.

State machine[edit | edit source]

Maybe I could invent something exciting using logic gates, but I used an old trusty method. Button on the top of root teleporter triggers creation of a bunny. This guy runs through the row of buttons, triggering the sequence of jumps, then ends up as a Terminator 2. It's quite simple, but let me introduce some fool-protection for this system. To prevent making few bunnies at a time, launch button is disabled immediately after push and enabled back after bunny finishes his trip. It is implemented on "AND" gates... again.

State machine

First, we need to imitate double-click of launch button to keep "off" state of the top lamp on the left gate. It is made of AND gate (OR is also suitable) with a single lamp on the trigger wire. Please don't ask me why the game do it in this way, but it works.

When the top lamp blinks, the gate activates and turns off the second lamp via blue wire. So, all following blinks of top lamp will not affect anything until second lamp is turned on again. Other job of that blue wire is creating a bunny. At the end of bunny's way there is a reactivation button, which turns on second lamp again (via red wire).

If bunny, for some reason, failed to push reactivation button, player can trigger a switch with the same function. Or use it to disable launch button manually. It is also good to install some sort of indicator to tell the user if the system is ready to use. It must be connected to the same wires as the bottom lamp of AND gate.

Conclusion[edit | edit source]

Given system meets initial requirements. But it obviously have some problems. Here is what I found:

  • Teleporting starts not immediately after button push. So player can trigger teleporting and run away before first jump.
  • A bundle of wires to the cabins can cross other wiring. Use junction box in this case.
  • During Blood Moon, bunny transforms and can refuse to walk his way. Minions also attack him.

Helpful screenshots[edit | edit source]