---
# System prepended metadata

title: MerchantStation Guide to Circuits
tags: [Wiki]

---

---
tags: Wiki
---

# MerchantStation Guide to Circuits

[//]: # (This is an example wiki page. It needs to be filled in over time; right now it'll be a skeleton, mildly useful for anyone reading through.)

[//]: # (Also any help copying/rewriting shit from the tg guide to circuits - it doesn't apply 100% - would be appreciated, besides any help actually porting the more useful tg circuits)

[//]: # (Also, as of April, I've been adding some descriptions. They're not complete and don't list inputs and outputs because there's reworks we'll port that will mess with it all)

**Circuits** are the scarecrow of antagonists, security and admins alike. On merchantstation, you can automate simple tasks, create new functionality for hardware you connect to your circuits, or even create deadly unmanned murder-mechs seeking the nearest cook to maul.

## List of circuit components

### Basic components
(WIP) These components can always be printed from inside a circuit board. 

* **Compare**
Provides object comparison operations, a versatile and necessary component for any complex circuit.
* **Pathfind**
A simple component that allows you to have a bot move as it pleases, allowing you to move around the station more freely.
* **Radio**
Radio components are effectively signallers for circuits. Very useful for blowing stuff up! Just remember, circuits are slow.
* **Sound Emitter**
A fast way to get smited if you abuse it.
* **Speech**
Sometimes, you want to find things out from your circuit, whether for debugging, hacking together a communication system (until NTNet gets ported!) or just plain screaming WGW on the radio.
* **Direction**
Given an entity, find out which way to go.
* **GPS**
Always gives you your circuit's current GPS coordinates. Do I need to explain why positioning is useful?
* **Health**
It's always a good thing to stop your mech from beating the lizard into a pulp if you're not an antag. Or perhaps you wish to revenge bomb whoever is killing you - your call.
* **Voice activator**
When buttons are not available, your voice is always there. Not recommended for mimes.
* **Self**
**Self**-descriptive.
* **Species**
Useful for automated discrimination.
* **Concat**
Take a list of strings, put it together, spit it out the voice activator.
* **Get Column**
Given a table, take a certain column and turn it into a list. Circumstantial but it's there.
* **Index Table**
Given a table, return an entry in it as a list indexed by column identifiers.
* **Index**
Given a list, get the entry at a certain index. Be aware - indexes can be strings, not just numbers!
* **Select Query**
Allows you to filter down tables to only the components you need. Essential for advanced trolling.
* **Split**
Splits a string into a list, using a character as a separator.
* **String Split**
Same as the previous component, but it insteads only gives a limited amount of results - but they're all immediately available without having to use an index component, making your circuitry just that much more readable.
* **Arithmetic**
For when you need to put 2 and 2 together, this component can almost do as much as your average tabletop calculator. Early adopters say the Nanotrasen division manufacturing this component is working on introducing a Trigonometry component as well - but adoption has been slowed by the general dislike of mathematics shared by assistants who are the main target market.
* **Comparison**
Wait, didn't we do this one already? Well apparently not. There's two of them, and I don't know why. Oh right - this one does MATH comparisons, the other one does OBJECT comparisons. 
* **Length**
Have table or list, need to know its length. Useful to avoid null results.
* **Logic**
And/or more than that, if you include exclusive xor.
* **Not**
Unary negation, always fun.
* **Random**
Circuits you'd forget even exist, this is useful if you want to simulate the DEX saving throw of the assistant you are about to blow up.
* **Concatenate**
The inverse of splitting a string, a must have for verbal operations.
* **Contains**
Does this string contain this word or letter? We'll find out.
* **Textcase**
So that nobody can fool you by saying textcasE.
* **To Entity**
Have entity marked as "Any", make into Entity. Simple.
* **To Number**
Need to parse a number? Here you go.
* **To String**
Anything can become a string if you really need it to.
* **Clock**
Goes tick tock, allows you to constantly check if there are ayys around.
* **Combiner**
Useful if you want to trigger a single signal based on multiple potential conditions.
* **Delay**
A surprise for later.
* **Multiplexer**
Helps you choose between multiple inputs based on an index.
* **RAM**
Really just a latch.
* **Typecheck**
To make sure you have the right thing.

### Advanced components
These components **have** to be printed from a circuit printer, and usually have a cost. 

* **Computer Vision**
 This component allows you to perceive mobs or other objects, which you can then process with table operators. The output of the computer vision component is a *table*, which can be operated on with *index table* components, *select qury* components or *get column* components. In the mob mode, the table contains columns for the mob's *name*, *entity* (which can be used with a ToEntity component), *range* (distance from the circuit) and *species*. In object mode, the latter column does not exist. Use GetColumn or Index operators to select those values.
