We have begun migration of most wikis to our new host, Amazon Web Services. All but the top 100 wikis are in read-only mode until the migration is complete. Estimated completion: TBD -- Update: Fri 10/20 11pm UTC - We have encountered some unexpected issues. Our staff is working around the clock to complete this process as quickly as possible. Thank you for your patience.

指南:Wiring

来自Terraria Wiki
(重定向自指南:电路
跳转至: 导航搜索
此页面的(部分)内容需要被翻译。

Wiring is a feature introduced to Terraria in the 1.1 update. Wires are not "on" or "off", rather, they follow toggle rules; hitting a switch will trigger every output connected to it by wire.

Basics[编辑 | 编辑源代码]

A basic example of wiring.

The basics of wiring are simple. The two main components of a circuit are inputs and outputs. An input is something that creates a current and an output is something that receives a current. The most important thing to remember is that nothing will generate a constant current. For most inputs, there is no such thing as on or off. They will activate every output wired to them one time when they are activated. This means that you can't wire a switch to a statue and make it constantly spawn things; You must either flip the switch repeatedly or add a timer.

As of version 1.3.1, there are now four different colors of wire, placed using any of the four different colored wrenches, the Multicolor Wrench, or the Grand Design. The wire item is still the same for all wrenches; they are simply painted when placed. The four types are functionally identical, but red wire will not connect to blue, green, or yellow wire, and likewise for blue and green and yellow; this allows more compact and complex circuitry to be designed. Also, the Junction Box allows wire to cross without actually connecting, allowing even more complex and intricate wiring to be built.

Inputs[编辑 | 编辑源代码]

Switches and Levers[编辑 | 编辑源代码]

Switches and Levers are both inputs. They send a current once every time they are toggled. It doesn't matter which direction they are flipped. If you connect a torch to a switch, then it will turn off the first time you flip the switch and on the second time, even if the switch was in the off position when the torch was wired to it.


Pressure Plates[编辑 | 编辑源代码]

A Pressure Plate sends a current every time something walks over it. Stepping on the pressure plate activates it; Stepping off of it does nothing. The most effective use of pressure plates is enemy detection, be it for activating automated traps or just as an advanced warning so you can be ready to defend. (Note: Some pressure plates only detect players. See Pressure Plate.) Differently colored plates will trigger under different circumstances.

Sensor[编辑 | 编辑源代码]

A sensor sends a signal whenever a certain set of conditions are met. There are currently 3 sensors as of 1.3.1. The Night, the Day, and the Player above. The Night Sensor sends a signal when day turns to night (7:29 to 7:30) IT DOES NOT SEND A CONSTANT SIGNAL DURING NIGHT! Same for day except from night to day (4:29 to 4:30). The Player Above Sensor sends a signal when the player enters its field of view, and again when it steps off. Similarly to the Day and Night Sensors, it does not send a constant signal when its condition is fulfilled.

Outputs[编辑 | 编辑源代码]

Torches and Other Lighting[编辑 | 编辑源代码]

Many, but not all light sources can be turned on and off if they are wired to an input. Their state will toggle upon receiving a current.

Doors[编辑 | 编辑源代码]

Doors will toggle their state upon receiving a current. Despite the fact that they only toggle, you can wire them to only close if you place the wire on a block that the door takes up when opened. If the door is closed, they will not receive the current and will not open. This is especially useful for exits that need to be automatically closed for safety, without risking them opening accidentally. Entities standing in the door while it tries to close due to a current may sometimes cause the door to disappear, not even becoming a dropped item.

Statues[编辑 | 编辑源代码]

Statues that can be activated by wiring will activate one time whenever a current is received, providing that enough time has passed since the previous activation on that input. Not all statues provide actions, while statues which do must be wired and are usually used for farms. Also, entities spawned by a statue will not drop money, and most of them have lowered drop rates. Critters spawned by statues cannot be caught.

Actuators[编辑 | 编辑源代码]

Actuators will change the state of the block that they're placed on when a current is received. This allows you to create doors that are opened with a switch or lever instead of an actual door, which can be opened by enemies. Also, trap doors can be created so that lava pits and other traps can be covered when they aren't needed. This can also come in handy during Blood Moons when you can barricade the doors off using them.

Dart Trap[编辑 | 编辑源代码]

Dart Traps will fire a dart whenever a current is received, provided that enough time has passed since the previous activation. The darts have a 100% chance of poisoning whatever they hit, as well as doing simple damage and clearing grass. Their range is quite high, going off-screen at 1600x800.

Other Traps[编辑 | 编辑源代码]

Traps will activate when a current is received, providing such action as dropping a spear from the ceiling or shooting out a jet of flame. Caution should be used when traps are suspected, as they can be extremely lethal to early-game players, dealing over 70 damage per hit with some armor (~20).

Explosives[编辑 | 编辑源代码]

Explosives detonate when a current is received. The explosion they cause is slightly stronger than that of a Dynamite. They can be placed tactically and detonated from a safe distance, making them a more accurate, yet not as simple to set up solution than other block-damaging explosives.

Pumps[编辑 | 编辑源代码]

There are two kinds of pumps that can be crafted to move large quantities of Water, Lava, or Honey. the Inlet Pump sucks in a liquid (as long as it is touching the liquid), and the Outlet Pump sends it out (until the pump is completely submerged). The two pumps need to be connected with a wire which acts like a "pipe". Each time either pump is activated, the Inlet Pump will transfer up to four tiles of liquid to the Outlet Pump. For continuous automated pumping, a Timer must be connected to the wire. This method may also be used in a trap manner in defending your crafted home if used correctly. It should be noted that over time, the amount of liquid pumped out will be greater than the amount of liquid pumped in. (See: Guide:Making liquid.)

Timer[编辑 | 编辑源代码]

There are three types of timers: one second, three second, and five second. Timers are both an input and an output, making them uniquely capable of sending close to a constant current. If a timer is active, it will send a current every 1, 3 or 5 seconds, depending on which type is used. If a timer receives a current, it will change its state. Timers can be used with statues to activate them as often as possible. Unfortunately, timers can't be placed sequentially to create longer intervals between activations unless you use a special technique. Two one second timers will not add up to two seconds. However, if you link timers together with different colored wire, it will make a cascade that will make a custom length of time kind of timer. See https://www.youtube.com/watch?v=KhVgnlOidpY for how to build it. A current will be sent at the interval of the shortest timer on the circuit. A simple use for timers would be making a disco room or mob area.

Engines[编辑 | 编辑源代码]

Switches, levers and timers aren't the only way to keep a farm, light show, or series of traps running. Using Crab Statues or Bird Statues with pressure plates, you can create an engine that is simple to create, and activates more frequently than a 1 second timer. This is done by spawning crabs or birds, then trapping them so that they spam pressure plates. This makes it ideal for hooks, gel, and banner farms.

There are multiple guides on how to create them. The Bird Engine with multiple pressure plates is more efficient to use and is much more compact compared to the Crab Engine, which requires a path for crabs to walk to the pressure plates.

There is a guide in the forums that advanced players may find helpful An Introduction to Hoiktronics "Hoiktronic is intended to communicate the key use of the 'hoik' glitch (with sloped blocks) to control the movement of NPCs so rapidly and precisely that they become somewhat like big, fat electrons, facilitating rapid digital mechanisms." Another useful guide is Fastest Engines, which includes: Hoiktronic Counter (Video), Crab Engine (Compact), Hoik Engines, House Hoik Engine, Teleporter Engines (Standard, Hoik Hybrid (Guide Engine, Hoik Hybrid (Ultimate, 1 Step)), Minecart Engines, Bird Engines, Rainstick Engines (Video included) (Stumps, Repeater, Spear Trap Batteries, Continuous Drop), 1.3 Update Notes (Including 'Ghost Dummy' Engines).

Other[编辑 | 编辑源代码]

Detonators[编辑 | 编辑源代码]

Detonators are special wiring objects added in version 1.3.0.1. They are different from most other wiring devices due to being both an input and output (timers being the only other device like it). They are also a combination of pre-existing inputs, namely the Switch and Pressure Plate. They are a 2x2 object that, when stepped on by the player (but not other entities) produces current, and can also be right-clicked to do the same. When a current runs through a Detonator, it switches states, and also is unable to be right-clicked to switch states until a second current is received by it.

Diodes[编辑 | 编辑源代码]

Timers often "backfire" onto a mechanism, but with the Teal Pressure Pad and a Dart Trap it is possible to create a "diode," a wiring function which only works in one direction. Wire the source up to the Dart Trap, place the Teal Pressure Pad directly in line (you may need to do some hammering of the trap or plate to make sure the dart will hit), and wire the output up to the Pressure Pad. This means that when the source is activated, the Dart Trap fires, causing the Teal Pressure Pad to register a hit. However, because there is no continuous wire then whatever is rigged up to the Teal Pressure Pad will not re-activate the source.

A simpler form of diode can be constructed out of most Logic Gates (except XOR) with a single Lamp on top. Wire the source to the lamp and the sink to the gate.

Counting Machines[编辑 | 编辑源代码]

It is possible to construct a mechanism out of a series of Logic Gates whose output signal will be triggered on every other input signal. Such mechanisms can be concatenated to produce a machine with the ability to count the number of inputs signals it receives. This may be used, for example, to count the number of days by attaching such a machine to a Logic Sensor (Day).

指南
 
基础 Walkthrough • Getting started • Practical Tips • Inventory management • Class setups • Mining techniques • Events • Jump Height Comparison
Farming 种植 •  •  • 叶绿矿 •  • 生物群落钥匙/钥匙模具 • 液体 • 可再生资源
困难模式之前的 Boss Mobile only.png Lepus • Mobile only.pngTurkor the Ungrateful • King Slime • Eye of Cthulhu • Eater of Worlds • Brain of Cthulhu • Queen Bee • Skeletron • Wall of Flesh‎
困难模式 Getting Started with Hardmode • Containing the Hallow/Corruption • Lunar Event strategies • Frost Moon strategies • Old One's Army strategies
困难模式的 Boss The Twins • The Destroyer • Skeletron Prime • Plantera • Golem • Console only.pngMobile only.pngOcram • Duke Fishron • Desktop only.png Lunatic Cultist • Desktop only.png Moon Lord
进阶 Dungeon Guardian • Skipping Stones
建造 Bases • Base defense • Arena • Wiring (Logic Gates) • Travel • Artificial biomes • Minecarts
生存 Corruption • Crimson • Ocean • Jungle • Dungeon • Underworld • Hallow • Jungle Temple • Expert Mode
制作 Crafting 101 • Quick Reference • Cell Phone • Ankh Shield • Terra Blade
多人模式 Setting up a Terraria server • Setting up Steam Multiplayer • Capture the Gem • PvP
电路
 
工具 电线 • 扳手 • 钢丝钳 • 五彩扳手 • 精密线控仪 • 制动魔杖
配饰 机械晶状体 • 自动安放器
触发器 控制杆 • 开关 • 压力板 • 计时器 • 引爆器 • 受困宝箱 • 宝石锁
设备 通电石块/未通电石块 • 制动器 • 广播盒 •  • 传送机 • 功能雕像 • 光源 • 晶莹宝石块
机关 飞镖机关 • 超级飞镖机关 • 长矛机关 • 尖球机关 • 烈焰机关 • 炸药 • 喷泉
机关
 
地下地牢 巨石 • 飞镖机关 • 炸药 • 尖刺 • 喷泉
丛林蜥蜴 烈焰机关 • 长矛机关 • 尖球机关 • 超级飞镖机关 • 木尖刺