指南:傳送網絡

出自Terraria Wiki
跳到: 導覽搜尋
此頁面的(部分)內容需要被翻譯。
你可以幫助我們來翻譯此頁面
電腦版 電腦版獨有內容:此的信息適用於電腦版泰拉瑞亞

一對傳送機是易於上手且便於使用的。同樣,一個小面積覆蓋的網絡也易於搭建。但是當地點數量達到20-30個時,傳送網絡將變得難以建造,維護,和使用。我們提供了可能的解決方案和對應的解釋說明。

本教程專注於喜歡工程學的人,所以對其他玩家看起來會比較奇怪。好吧,我警告過你了。

概覽[編輯 | 編輯原始碼]

Root room wiring

傳送器有如下使用案例。

玩家走進有一個有傳送機的房間,房間內需要有一組開關背景牆上。每一個開關控制地圖上的一個傳送機。玩家打開其中一個開關,然後跳入傳送通道中。1-2秒後會被傳送至設定好的傳送機上。

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

1.3.1版本更新之後,引入了邏輯門。現在玩家甚至可以在遊戲中建造一台電腦。

所以現在我們有如下需求:

  • 一個傳送房間(root room)(構造相對複雜)和一個在遠端的簡陋傳送機。
  • 傳送機之間互相連接,所以不必用電線連接到傳送房間。
  • 傳送機本身是無屬性的,玩家可以在傳送房間處理任何邏輯問題。
  • 注意添加新的傳送機時一定不要使傳送房間發生複雜的改動。
  • 放置新的傳送機前,應該使用簡單的電線連接精密線控儀與傳送機。
  • 突發的伺服器重啟一定不能讓邏輯網絡的狀態混亂。
  • 玩家可以使用背景牆在傳送房間的多個開關位置內做出標記。


拓撲結構[編輯 | 編輯原始碼]

傳送網絡的拓撲結構幾乎是二叉樹,除了根和子樹,最多可以有四個連接。

Network topology

每個傳送機在網絡中有它自有的地址,就像如圖右下側的綠色點的地址是「黃綠黃綠」,根對所有顏色的連接實行串行激活。連接是通過電線, 連接兩個不同的傳送機來實現的 。在遊戲中傳送機可以連接最多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.

Cabin


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.

Root block scheme


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:

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[編輯 | 編輯原始碼]

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[編輯 | 編輯原始碼]

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[編輯 | 編輯原始碼]

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[編輯 | 編輯原始碼]