Scrap Mechanic

Scrap Mechanic

View Stats:
Logic?
Hi folks,

This is by no means important but it's been bugging me for too long now.

We've seen the neat little 3-gate circular set that will generate a series of pulses using Exor, Or and And; a must for the packing station. I know the i/p o/p rules for the three gates but, just for fun, I tried to draw exactly how it works. I totally failed!

Please could some clever person put me out of my misery and explain the implied connections when you use logic gates in SM. All the YuoTube tutorials show a neat pair of input signals and a single output result, not what the pulse-generator shows at all. Wits end here!
< >
Showing 1-9 of 9 comments
Since the game doesnt allow to connect output of the gate to input of the same gate, the 3 gates setup is just a complex looped NOT gate.

Also, with the mentioned gates (xor, or, and) you wont be able to make a pulse generator.
You place a single negated gate, NOR for example. The other 2 gates are just used to loop the wire back into the NOR gate. A bonus they give some delay.
Um, thanks for the explanation. Not sure i quite understand it though. (Maybe a diagram is what I need?)

"with the mentioned gates (xor, or, and) you wont be able to make a pulse generator". And now you've lost me completely. There are loads of YouTube vids showing something like this:

Switch --- Exor ----- And ------- Output
\ /
\ Or /

As I said, I use it to 'pulse' the Packing Station fruit/veg receiver. It saves standing by the chest/vacuum pump combination and having to press the switch over and over again to create a package. Time better spent loading the delivery vehicle! Maybe 'pulse' was the wrong word for me to use but that what it feels like in use.

Let me ask a specific question. That Or gate. It seems to have only a single input line; the one from the Exor gate. So what is it 'Oring' with? Is the And gate somehow sending an input to it?

Sorry if I'm being obtuse here. But I guess I need all the help I can get! :)
Oh dear, my ASCII art failed!

Space out the \ / line so the slashes appear under the Exor and And gates and the line below that so the Or gate sits in the middle. Arrgh!
Originally posted by Mebyon:
"with the mentioned gates (xor, or, and) you wont be able to make a pulse generator". And now you've lost me completely.

The 3 mentioned gates, XOR, OR, AND, cannot turn TRUE from all FALSE inputs. Or 1 from 0. Depending on the gate, at least a single input must be TRUE / 1.

But by adding another input from a switch, it will work.


Originally posted by Mebyon:
Let me ask a specific question. That Or gate. It seems to have only a single input line; the one from the Exor gate. So what is it 'Oring' with? Is the And gate somehow sending an input to it?

Like I said, 2 gates are only used to loop the signal back into the gate "doing the work" and adding a delay. It's a limitation of the game, not of the gates.

The game doesnt allow you to connect a gate to itself. Also once two gates are connected, you cannot add a second connection the opposite direction between those two gates. So to make a loop, you need 3 gates.

So no, the OR gate doesnt "oring" anything. It can be replaced by AND, XOR gates. With only 1 single input from a switch, you can place 3 XOR gates. Removes the task of "thinking" where to connect the switch.
OK. Thanks for that explanation. I'm obviously over-thinking this stuff. I'll just use the gate setup that I know works and not try to understand! Condition normal for me.
Another setup I use includes a timer, so you can set how long each flicker takes, uses 2 gates and a switch. One gate xor, the other gate and. Switch to both gates. Xor to And. And to timer. Timer to Xor. Use the And gate to output where you want it. Whenever the switch is on, it will flicker as fast as the timer is set to. I use this for my glowbug feedling system, so when I'm getting full of glow poo or low on cardboard, I can turn the timer up to slow down how often they get fed.
Originally posted by Darthos3:
Another setup I use includes a timer, so you can set how long each flicker takes, uses 2 gates and a switch. One gate xor, the other gate and. Switch to both gates. Xor to And. And to timer. Timer to Xor. Use the And gate to output where you want it. Whenever the switch is on, it will flicker as fast as the timer is set to.

Thanks. I'll add that to my collection of working 'solutions'. Of course the real snag is that I'd just love to look at a new problem and figure out a set of gates that'd address that one. But, to do that, I have to know what SM does internally. Which is where this thread started!

But thanks for all the time you guys have spent trying to teach me. It's really appreciated. Anyway, I'm now off in Raft Mechanic and trying to work out a different 'logic' problem with steering a raft with tiny rectangular sails that only move in 90 deg steps! Logical solution; hit the pesky thing with a hammer. Not elegant but works! :)
You can always place the sail on a bearing.
But you will advance fast enough to skip it and go with the propellors.

About SM "logics", its the same with the mentioned exception of no loops allowed.
If you know how to flowchart, you should be able to plan out your circuits fairly simply. Color coding and spacing different sections of the logic to keep functions clear can also help. Maybe even use pipe pieces as pretend wires so you can visualize your circuit without needing the connection tool. https://www.youtube.com/watch?v=wLkvvqypq1E for help in how to flowchart.
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: May 14, 2022 @ 4:39am
Posts: 9