logicgates.js tutorial
im gonna make a thread on how to use logicgates.js rq
64 Replies
Step 1: Place the gates themselves. For example, to make a full-adder, you need 2 XOR, 1 OR, and 2 AND.
Step 2: Plan the connections. Is your diagram simple enough to use wires or is it too complex and needs wifi to avoid intersections?
Step 3a: If you are using wires, make inputs with wire - E2L Lever - logic wire. Connect these to your gates with more logic wire and ensure that each connection only touches 1 of the gate's 8 neighbors. Then, use output on one of the neighbors of the gate and connect that to something else via logic wire.
Step 3b: If you need to use wifi, make your inputs first with wire - E2L Lever - Logic wire - Logic Transmitter. Choose a channel (name) for your input. Then, connect all of the gates that need those to a receiver and logic wire set to the same channel. You may also funnel the output of a gate through a logic transmitter.
Step 4: Once everything is connected for the main circuitry, make your outputs with a Logic Wire - L2E Constant - Wire.
Step 5: Use shock tool on your various inputs to toggle them and see if they work as expected.
passive-yellow•2y ago
what is logicates.js
ur mod?
like a machines mod?
logicgates.js is a mod that adds logic gates that i made
um
okay?
step 1: gate layout

step 2: "the plan"

step 3b: wifi

step 5: testing

jesus christ what is that giant block of red
ok all logic gates and outputs should be 1 pixel max
logic wires should idealy be 1 pixel wide at max but it doesnt matter due to my fabulous electricity system
shock doesnt work on logic wires because they dont use sandboxels electricity. this is why E2L converters are needed
yep
.. nah
just use debug to check the channel
good idea
ill make that a f e a t u r e
i could add a logicshock tool
(doesnt work if channel name is too long)


forgot to add quotes hold on
\


wooo

umm. yea
thats how logic wires work.
they are toggle instead of pulses
because, spoiler alert:
it is a PAIN to get logic to be good with pulses
its toggle for your own sanity
-2 represents an uncharged spreader
-1 is an uncharged buffer
0 is uncharged
1 is a charged buffer
2 is charge spreader
national-gold•16mo ago
Full adder, although it seems its already been done but still pretty fun.

nice!
why does each input have 2 wifi
national-gold•16mo ago
My bad I was at school I'm not sure what you mean by wifi but every input has 2 outputs if that's what you mean

a transmitter can transmit to multiple receivers that have the same channel
national-gold•16mo ago
I see that makes sense. Could be optimised
buffers are used to help prevent charge mixing as well as help remove the randomness of sandboxels
noble-gold•6mo ago
I'm trying to use the E2LLever module, and that one isn't working. I've got regular and logic wire connected, and the reguar wire is powered. Am I doing something wrong?
I now realize this is an old thread, so I apologize for opening it again.
its all good!
the levers and buttons are a bit finnicky
ill probably change them
noble-gold•6mo ago
Ah. Guess it's a bug, then?
most likely
noble-gold•6mo ago
Right. In the meantime, I may have found a possible workaround. I gotta experiment, though...
harsh-harlequin•5mo ago
how do u use a not gate
same way as the others
logic wire for input
logic wire next to "output" next to the gate for output
harsh-harlequin•5mo ago
are you sure about that

what is that
list the pixels you used in order
harsh-harlequin•5mo ago
battery-wire-e/l lever-logic wire-not gate-logic wire-l/e const-wire-red led
bro
you dont have an output pixel
you've just given the not gate 2 inputs
harsh-harlequin•5mo ago
what
bru
logic gates can't assume which wire is supposed to be input/output
which is why output pixel exists
harsh-harlequin•5mo ago
ok
why is it sometimes giving power even tho its input is on
nvm
conscious-sapphire•4mo ago
oh well tryna make subrime req by redbirdly lmao
saving this thread
later
was on learning to use the logicgates and things
because i cant machines
the first machine that i made is solar panel without any mods
distinguished-silver•3mo ago
what is an 'inputpin' and an 'outputpin' and when would I need one
logicgates.js doesn't
have those
do you have circuitcore.js
that's made by someone else, i dont know how their addon works
distinguished-silver•3mo ago
yes
i often get confused on which is which
but the two are completely compatible?
these are all the logicgates.js elements

they should be
he made circuitcore.js as an addon to logicgates.js
distinguished-silver•3mo ago
oh
what is the lever thing and how is it different to the button
the button makes pulses of logic electricity
the lever just toggles the wire
distinguished-silver•3mo ago
oh
doesn't seem to work?
wdym?
distinguished-silver•3mo ago
above uses lever bottom uses button

yeah the E2L is slightly janky
i do plan on making it better in the next update
distinguished-silver•3mo ago
ok
distinguished-silver•3mo ago
why does the upper wire light up

distinguished-silver•3mo ago
(the upper green gate is an AND; the lower purple one is an XOR)
the AND has 0 inputs
all 0 of the 0 inputs are on
distinguished-silver•3mo ago
what about the two receivers
gates only look for wire
distinguished-silver•3mo ago
so if I simply move the two transmitters back one pixel and put a wire in front
yeah that'll work
distinguished-silver•3mo ago
thanks
or i could just add a wire in front of each
true
secure-lavender•3mo ago
yay the thread i needen
grumpy-cyan•3w ago
i am stupid

what is the red?
grumpy-cyan•3w ago
output
i am just stupid bro
you only need 1 pixel of output
not an entire line of it
also, vanilla electricity & logic electricity can't pass diagonal gaps
(a gate can read its diagonal neighbors however)