指南:传送网络

来自Terraria Wiki
跳转至: 导航搜索
此页面的(部分)内容需要被翻译。
你可以帮助我们来翻译此页面
电脑版 电脑版独有内容:此的信息适用于电脑版泰拉瑞亚

一对传送机是易于上手且便于使用的。同样,一个小面积覆盖的网络也易于搭建。但是当地点数量达到20-30个时,传送网络将变得难以建造,维护,和使用。我们提供了可能的解决方案和对应的解释说明。

本教程专注于喜欢工程学的人,所以对其他玩家看起来会比较奇怪。好吧,我警告过你了。

概览[编辑 | 编辑源代码]

传送器有如下使用案例。

玩家走进有一个有传送机的房间,房间内需要有一组开关背景墙上。每一个开关控制地图上的一个传送机。玩家打开其中一个开关,然后跳入传送通道中。1-2秒后会被传送至设定好的传送机上。

返回的方法是使用魔镜或者其他的类似道具。

1.3.1版本更新之后,引入了逻辑门。现在玩家甚至可以在游戏中建造一台电脑。

所以现在我们有如下需求:

  • 一个传送房间(root room)(构造相对复杂)和一个在远端的简陋传送机。
  • 传送机之间互相连接,所以不必用电线连接到传送房间。
  • 传送机本身是无属性的,玩家可以在传送房间处理任何逻辑问题。
  • 注意添加新的传送机时一定不要使传送房间发生复杂的改动。
  • 放置新的传送机前,应该使用简单的电线连接精密线控仪与传送机。
  • 突发的服务器重启一定不能让逻辑网络的状态混乱。
  • 玩家可以使用背景墙在传送房间的多个开关位置内做出标记。


拓扑结构[编辑 | 编辑源代码]

传送网络的拓扑结构几乎是二叉树,除了根和子树,最多可以有四个连接。

每个传送机在网络中有它自有的地址,就像如图右下侧的绿色点的地址是“黄绿黄绿”,根对所有颜色的连接实行串行激活。连接是通过电线, 连接两个不同的传送机来实现的 。在游戏中传送机可以连接最多8根不同的电线,这里我们使用了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[编辑 | 编辑源代码]

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[编辑 | 编辑源代码]

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.

Address commutation[编辑 | 编辑源代码]

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:

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[编辑 | 编辑源代码]

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).

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[编辑 | 编辑源代码]

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.

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[编辑 | 编辑源代码]

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.