Logic Signals

From StarMade Wiki

Revision as of 03:48, 9 July 2016 by DukeofRealms (talk | contribs) (Imported page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Logic signals are an additional tool by which players can remotely control and interact with active blocks such as lights, doors, docking modules and complex systems such as factories,weapons and effect clusters. Logic system is represented by it's own family of blocks, that provide varied methods of manipulating the player's signal input and performing logical operations upon that input.

Logic circuits can be used to make player's environment more dynamic. It allows the creation of automatic doors, interactive lights, gravity elevators, clocks, factory controllers and even more complex binary systems like coded locks and basic computer functions.

Logic State

All active blocks can have one of two states, either On or Off, which represents binary logical statements of True and False, respectively. In order for block to switch its state, it requires to receive a logic signal opposite to it's current state. Conventionally it is done by direct interaction (using R key) or through the Ship's core, which dispense signals as player uses one or another module from a ship's hotbar. When activated through logic signal, weapons, docking blocks and "burst"-effects trigger only once, but other switchable types of blocks remain in the signal state as long as the given signal persists. In order to transmit a signal, every block in the logic chain must be linked to one or multiple blocks that would receive that signal further in the chain.

Most active blocks initiate in Off state, while factories and light blocks are active upon placement. In both situations, logic and other active blocks do not instantly consider the signal state when linked to, thus a single state change might be required to align it properly (Ex: Light block will not turn Off when Off-signal source is linked to it, and will require a signal source to turn On/Off one time while linked). While simple doors or lights can be switched manually, logic state of weapons and factories is changed through their User Interface, but can still be changed directly through Logic Blocks.

Change of logic states through Logic Blocks has a preset phase of half a second (500 milliseconds), thus it's the fastest rate at which states can be changed without player's direct actions. Unless delay signal block is used, all consecutive state changes are performed instantly through a single phase.

Logic Blocks

Logic Blocks are placed like regular blocks and work specifically on the entity they're placed upon. When one or another logic block receives the On-signal, it will emit a blue light. Like factories, logic blocks render connection beams, thus consideration for the placement of logic chains is advised.

Block Name Behaviour
Activation Module Input block, which can be switched manually or through other logic outputs, and can also be used as a non-delay signal transmitter. A necessary component for an Area system functioning.
NOT-Signal Chain block, that receives a state signal and sends the opposite state, effectively reversing the signal. On-signal will turn it Off, and vice versa. Necessary element for clocks and more complex chains.
AND-Signal Chain block, that sends the On-signal only when all logic blocks linked to it also are in On-state. Necessary element for code locks and other multi-conditional systems.
OR-Signal Chain block, that sends the On-signal when any of the logic blocks linked to it is On-state. Necessary for systems with multiple input points and more complex chains.
DELAY-Signal Chain block, that receives the signal, but propagates it further with a half-second delay. Foundational element for sequenced actions and clocks.
Trigger (Area) Controller Input block, that looks for instances (players, ships, etc.) entering the Area Triggers slaved to it and turns all adjacent Activation Modules On on detection.
Trigger (Area) A slave block for its Controller, Area Trigger is an invisible and intangible volume sensor, which changes parent controller state depending on whether there's something inside it or not.
Trigger (Step On) Input block, that sends On-signal when gravity-attracted player stands on it. Allows for gravity-dependent logic systems to be created.