Scrap Mechanic

Scrap Mechanic

Not enough ratings
ALC
By LowerDimensions
This is the official guide to the ALC mod.
   
Award
Favorite
Favorited
Unfavorite
Introduction
WORK IN PROGRESS | Information will be simplified & refined over time!

To the...
mod
showcase creation

Here are some universal bits of information.

  • Place at least one save button in your world for the ALC mod to work
  • type /console in chat, to view more information and find possible errors.
  • Many ALC components can be interacted with / pressed / clicked, this in many cases is to update them after you modified their inputs and outputs.
  • Currently components don't work when placed on free platforms.

Don't forget to shorten signals to 1 tick!
Save Button

The save button is an essentail part of the ALC mod, place at least one instance in every world you use the ALC mod in.

Many components save their data internally but some need to be saved manualy.

To be sure everything is saved just press the save button before you close your world
or whenever you feel like you like, just to be sure.

The save button can also be triggered by a normal input signal.
(Be sure to keep the signal length at 1 tick, to not loop the saving process more than once)
Bit

The bit is as the name suggest a component that lets you save 1 bit of data.


This component is designed after the SR-Latch, meaning you can set and reset it.

To use it, first you have to connect 2 input signals, the first connected is the set signal, the second is reset signal.

The output signal mirrors the current state of the component.
IO

The IO component can be used as either
input or output for many ALC components.


Input mode
Signal connected towards the IO component turn it on/off


Output mode
Outputs its state through any outgoing connections


So what are is the IO component used for?
Good question! The IO is used to input and output data from many ALC components.

Why not just use normal connections?
Because for many ALC componets the order of their inputs is important. Another aspect is the more tidy design, instead of having a bundle of input signals, you have a couple of IO components in a line.

So how do I use them for these ALC components?
All components that use the IO as input/output usually have markings in green/red to show you on what end to place them. Simply put them in a row, as many as you need and update the component if you can.
Decoder

The decoder converts a binary number to its decimal position and uses the IO component for its input and output.


The input side is marked by the green arrow.

The output side is marked by the red arrow.

Input & output size is variable.

Interact with it to update after you placed the IOs.


Visualisation
Input
Output
00
1000







Input
Output
01
0100







Input
Output
10
0010








Input
Output
11
0001
Counter

The counter is a component that can be incremented, reset and its count read.


You can connect 2 input signals, the first increments the counter, the second resets it.

The current count of the counter can be read by placing IO components in a line on the side of the red arrow. These will represent the binary output of the counter.

The binary output goes outwards, as represented below:
(In this example the counter arrow looks to the right)

Counter
IO 1
IO 2
IO 3
0
0
0
0
1
1
0
0
2
0
1
0
3
1
1
0
4
0
0
1
5
1
0
1

The counter can be increased up to the integer limit.
Register

The register is a component that can save a binary number. This component uses the IO component as its input and output method.

Furthermore it uses a input signal as the trigger to set the current saved value to the value of the connected input IOs.

The input side is maked by the green arrow, the output side by red one.

The value is again only limited by the maps size and the max number size of lua.
Memory

The memory component is similar to a RAM. You can store a binary value under a binary key. This component also has a doWrite and doRead input.

The "A" marks the IOs that are used for the address of the value you want to set.

The "I" marks the IOs that are used for the input, the value you want to save.

The red arrow marks the IOs that used to output the value read from memory.

The first input signal is the doWrite trigger which write the value from the input to the memory under the key, the address.

The second input signal is the doRead trigger which output the value from the key, the address that is currently set, so to speak, it reads the value from the memory.
Signal Stretcher

The Signal Stretcher outputs a signal with a set length upon being triggered.


When it receives any input signal, best kept at 1 tick, a signal with the length between 1-10 ticks is outputted.

The length can be set by interacting with the Signal Stretcher.
Adder

The Adder adds it's two binary inputs together while including their negative/positive flag.


It uses IO components for its inputs and output.

Input row 1 is marked by the green "1".
Input row 2 is marked by the green "2".
The output row is makred by the red arrow.

To update the component after placing the IOs, simply interact with it.

If the negative flag is 1 / on / active it negates value.

Input 1
+
00
Input 2
+
00
Output
+
000








Input 1
+
00
Input 2
+
01
Output
+
001








Input 1
+
01
Input 2
+
01
Output
+
010








Input 1
+
10
Input 2
+
10
Output
+
100








Input 1
-
10
Input 2
+
01
Output
-
001








Input 1
-
01
Input 2
-
01
Output
-
010
3 Comments
LowerDimensions  [author] 10 Oct, 2018 @ 10:49am 
@Mihai123410 Thank you very much
Lara 10 Oct, 2018 @ 1:33am 
#neat
Lara 10 Oct, 2018 @ 1:32am 
Noice