King Arthur's Gold

King Arthur's Gold

88 ratings
The ultimate guide for Mechanism
By Sohkyo
A guide about Mechanism and its many contraptions.
2
   
Award
Favorite
Favorited
Unfavorite
Introduction
Recently, KAG's devs introduced us a new feature: Mechanisms. Soon enough it will be oficially avaible to everyone in sandbox, but for now, this guide's goal is to give you a good impression of what's coming and how to make contraptions using its tools.
Basic Wiring
Everything has a start, knowing the basics is the essence of doing something much more complex with wires, specially when you need to place every simple tool correctly to actually use more advanced tools.



These are part of a new inventory created by KAG developers, you can access it by playing sandbox.


Power sources


  • 1. The lever: Most common power source, simple on/off action.


  • 2. The button: Holds power for one second each press.


  • 3. The pressure plate: Activates once something steps on it, can also be activated by items and corpses.

  • 4. The coin slot: Activates when someone puts 60 coins on it, holds power for three seconds each put.

  • 5. The motion sensor: Detects movement, can also be activated by items and corpses. Holds power for one and a half second.



Wires and Juctions


  • Wire: Carries the signal in only one direction.

  • Elbow: Used to create a corner.


  • Tee: Splits the signal to three directions.


  • Junction: Splits the signal to all four directions.



Note: Both transport a strong signal 8 tiles away from the power source and take nearly one and a half second to move to the maximum distance.



As you can see above, the ninth signal is too weak to activate the spike or anything else in its place.



Contraptions


  • Bolter: Shoots regular and special arrows. (Must have a magazine attached to it for storing ammo)

  • Lamp: Provides a 12-tiled lighting radius. (Lanterns just provide a 8-tiled lighting radius)

  • Spiker: Regular spike, but only activated by a power source.


  • Dispenser: Shoots items in their pickable form. (Must have a magazine attached to it for storing ammo)


  • Obstructor: Acts similar to a trap block, but instead of deactivating when enemies are on it, the same will remain open unless it receives signal. They can also pass power like junctions
Auxiliars


  • Magazine: The magazine is the only contraption which has function based on another, its only job is to storage ammo for the dispenser or the bolter when attached to it.

To storage something inside a magazine, you must be holding the item you want to put, be near it and press E. To unload something your, hands must be empty. Once full or empty the magazine will change its sprite just like the picture above. Magazines can also be used to transport a signal just like wires and juctions.
Basic Wiring - Systems


Materials:
1 lever.
3 wires.
1 spiker.




Materials:
1 lever.
3 junctions.
6 wires.
3 spikers.




Materials:
1 button.
15 junctions.
15 spikers.




Materials:
1 pressure plate.
2 spikers.
Advanced Wiring I
Advanced Wiring I will introduce the mechanisms which are similar to logical gates.


  • The inverter: Acts like a NOT gate, it will be always on and will only change to off when powered.

  • The transistor: Acts like an AND gate, it will ONLY pass the signal if both of its inputs are on.

  • The toggle: Acts like a lever, it will turn on/off once it receives a signal.


  • The oscillator: It will delay the signal for half second before passing it again.
Advanced Wiring - Systems


Materials:

1 button.
3 wires.
1 junction.
1 inverter.
1 obstructor.




Materials:

1 lever.
1 button.
2 wires.
1 transistor.
1 obstructor.
Advanced Wiring II
Contraptions which make a great difference while building something complex.


  • Diode: One-way wire, meaning a signal from an opposite segment can't pass trough it.

  • Randomizer: Has 50% of chances to not pass the signal when powered.


  • Resistor: Makes the signal at least 60% weaker, making it spread just 4 tiles away if it's directly connected to a source or one tile away from it, the power will keep decreasing on each pair of tiles of signal. It also makes the signal die in chain reaction and not instantly.

  • Emitter: Emits a wireless signal.

  • Receiver: Receives the wireless signal. The max range between an emitter and a receiver is 18 tiles, still, the signal won't stop on the first receiver and can still be captured by later ones.
Logic Gates I
Inputs and outputs

  • Input: Referred as the entrance signal of certain system or gate, each can have one entrance or more.

  • Output: Referred as the exit signal of certain system or gate, each can have one exit or more.

    PS: The entrance/input signal might not be the same of the exit/output signal, in most cases it changes.


Truth Table

A Truth Table helps us understand the behaviour of logic gates


  • Here we can see that this gate has two inputs (A, B) and one output (Out)

  • On is referred as 1 and off is referred as 0.
    When A is off and B is off, Out is off.
    When A is off and B is on, Out is on.
    When A is on and B is off, Out is on.
    When A is on and B is on, Out is off.

  • Just by looking to a Truth Table we can discover any gate's name, in this case, this is a EXOR/XOR gate.






An example of EXOR/XOR gate made by mechanisms:


A = 0, B = 0; Out = 0














A = 0, B = 1; Out = 1














A = 1, B = 0; Out = 1














A = 1, B = 1; Out = 0

Logic Gates II
OR gate







The OR gate will pass the signal if one of its inputs are on, in bolean algebra, the OR gate symbol is a plus because its output's signal will be determined by the summation of all inputs.

In the case of the OR gate with two inputs we have:

0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 1*

*In digital signals, on is determined by 1 and off is determined by 0, so if the summation results in something greater than 1, it means that the signal is positive, in other words, it's on and is also represented by 1.


AND gate







The AND gate will only pass the signal if all inputs are on, its symbol is a " . " or an "x", both symbols referecing multiplication.

In the case of the AND gate with two inputs we have:

0 x 0 = 0
1 x 0 = 0
0 x 1 = 0
1 x 1 = 1
Suggestions
Describe a system in the comments and, if possible to be made, it will appear here.


Play-in-order system

Suggestion by Redead-ITA














This is a system which will only pass the signal if you power certain input first and later activate the secondary input. In the first image input A must be firstly activated, in the second image, input B must be firstly activated.

42 Comments
maxzanrus 6 Nov, 2021 @ 2:09am 
such a dumb:kag_tongue::kag_yes:
japodis1 30 Sep, 2021 @ 9:49am 
gates* because*
wow i was so illiterate back then
japodis1 12 Feb, 2021 @ 10:41pm 
i finaly know eveything but the logic games I dont want to know that becoous why
Go​ldy 2 Jul, 2019 @ 12:23pm 
finnaly i know what resistor does
Azzex 8 Aug, 2018 @ 10:38am 
Good for zombie server. Thx!
Gio 15 Aug, 2017 @ 1:08pm 
Awesome, a video tutorial could help a lot too. This is nice, I'm pretty sure this could help to learn how programming works. Keep it up the good work.
Terracraft 24 Oct, 2016 @ 10:53am 
Used the truth table to compare is she really loved me or not :)
Blackguard 5 Oct, 2016 @ 3:50am 
Ah yes, the ultimate guide to something that appears on about 0% of servers~

Much wiring, many uses, wow
pUnk 22 Jun, 2016 @ 2:17pm 
real nice guide
Glascade 19 Oct, 2015 @ 11:54am 
Thanks a lot for this guide, really helpful, I started to play in the attack/defense server and it helps me a lot :)