Oxygen Not Included

Oxygen Not Included

Computer Parts (Automation)
35 Comments
Pholith Jan 24 @ 4:18pm 
Hello, it would benice to your mods to be translatable
xujunhao6082 Jul 11, 2024 @ 10:48am 
The field sideScreenContentBody doesn't exist after an update published by Klei,which means that the game will crash if you create or load your save with this mod.To solve it,PLib in this mod's folder should update to 4.15.0.0 or further versions.The other approach to it is modifying it with the new version of PLib's code(In PeterHan.PLib.UI.UIDetours,field SS_CONTENT_BODY should be modified),aiming to avoid some possible risks.
hl May 7, 2024 @ 1:08pm 
can you publish a fixed version somewhere we can use as a local library until this is updated? Thanks!
Pen Aim Kawata.pw Apr 9, 2024 @ 10:26am 
Hey, I was able to get this working, Thank you SOOOOO much for publicly posting a link to your source code. All I did was update some libraries like PLib and ILMerge, corrected the references for each, and compiled and now it works with the latest version of the game. I'll be making a PR request just to save you some time.
Pen Aim Kawata.pw Apr 8, 2024 @ 11:15pm 
This mod needs to be updated, Klei changed some ui stuff and now this causes a crash on loading into a world.

Your error good sir, trunicated ofc.
Error in DetailsScreen(Clone).DetailsScreen.OnPrefabInit at (1870.0, 176.0, 0.0)

PeterHan.PLib.Detours.DetourException: Unable to find sideScreenContentBody on type DetailsScreen
at PeterHan.PLib.UI.PUIUtils.AddSideScreenContentWithOrdering[T] (System.String targetClassName, System.Boolean insertBefore, UnityEngine.GameObject uiPrefab) [0x0002b] in <d7d10af00ba3499d9e82b0f7be4e883e>:0
at PeterHan.PLib.UI.PUIUtils.AddSideScreenContent[T] (UnityEngine.GameObject uiPrefab) [0x00000] in <d7d10af00ba3499d9e82b0f7be4e883e>:0
at KBComputing.Patches+SideScreenCreator.Postfix () [0x00000] in <fee2fc88d369467dad6ec17145897c97>:0
at (wrapper dynamic-method) DetailsScreen.DetailsScreen.OnPrefabInit_Patch22(DetailsScreen)
at KMonoBehaviour.InitializeComponent () [0x00068] in
Zaxabock Apr 1, 2023 @ 6:43pm 
https://ibb.co/0q6Vcmq
If I set it up like that it works? The top input's first bit comes from the bottom's 4th bit and vice versa. Not sure why it's "offset" like that
Zaxabock Apr 1, 2023 @ 6:20pm 
Is there something wrong with the DeMux at the moment? I've wired it up identically to how the image shows and instructions say, but the wrong pixel lights are lighting up
Ragnaman Feb 7, 2023 @ 6:28am 
Awesome story to hear.
R. Mueller  [author] Feb 7, 2023 @ 5:55am 
Gamma_Draconis: I believe the 4-bit register can serve as your "ribbon switch".

Ragnaman: I did not have any sources of inspiration. If anything, it started with my frustration with the lack of a diode gate, and my decision to try making a game mod for the first time. Then I added some more useful parts to thar mod. ('Edge Detecters and diode'), then I went on to make another mod, with more complex parts. (this one).

BTW, I have since designed an instruction decoder for use with the stack-ALU. Then i decided to integrate the two together, since wiring was pretty complex. Never finished that mod, though. Got bored - some things, like UI design, are pretty tedious, with the way some parts of the API are coded. (Not sure if that's Harmony programmers faulr or ONI programmers fault.)
Gamma_Draconis Aug 24, 2022 @ 3:28pm 
A part that I simply must have is a ribbon switch. It takes a ribbon cable and a wire as inputs, and outputs a ribbon cable, and outputs the input ribbon cable value when the wire input is green, and 0 otherwise.

Ideally it would be 1x3 [width x height] tiles, with the input ribbon on the bottom, the input wire in the middle, and the output ribbon at the top.

This is the biggest thing restricting me from building a full processor with this or anything else. I need it to build a proper bus.
*****oxygennot***** Jun 12, 2022 @ 4:30pm 
Nice Mod :steamhappy:
Can You Create a Gate ("Buffer & Filter") 4-Bit ? :steamthumbsup:
Ragnaman Apr 13, 2022 @ 12:53pm 
I am curious what sources you used and took inspiration from ? Shenzhen IO perhaps ?
Ragnaman Apr 13, 2022 @ 12:43pm 
wonderful to hear you carved your own path through knowledge.
I can only say that many people can learn this stuff, and an easy start is with nandgame
https://nandgame.com/

Fun and teaches how computers are made right from scratch.
R. Mueller  [author] Apr 12, 2022 @ 10:43am 
(3/3) i have no intended application. just a fullly programmable computer so ppl can do whatever they want. using an assembly language of my own design. but i've gotten distracted from it and have no eta. -- (i'm playing around with convnets )
R. Mueller  [author] Apr 12, 2022 @ 10:39am 
(2/3) each higher number queue would be a higher priority thread. so the cpu would have 16 threads, and the instructions would be what to do with each of the two alu stacks, or to transfer data between stacks or between a stack and an i/o queue, or a stack and internal memory.

so it's a turing-complete real-time interrupt-based computer, with a 2-core stack-based cpu. i already have the instruction set and assembly language designed.
R. Mueller  [author] Apr 12, 2022 @ 10:37am 
(1/3) what i have in mind for the cpu is, combined into one chip: a memory module, two stack based alus, and then 16 input queues and 16 output queues, the inputs would be a queue selector, and a data available / request next line. same with the output.
gnidan Mar 31, 2022 @ 9:17pm 
I'm really curious - do you have in-game applications in mind? I've gotten my interplanetary clock set up, but I'm struggling to fill the massive bandwidth you've afforded me with this mod (so far I have planetoids communicating resource requests back to my main base, but that's about it :)

Would love to hear what you have in mind for your CPU design!

(This has also got me thinking... what would a high-level language look like in-game? Could there be a Scratch-like interface with building for loops and such?)
R. Mueller  [author] Mar 28, 2022 @ 4:35pm 
(2/2) instructions would be 8-bit long, and control 2 16-bit stack alus or read from data in or write to data out or transfer data between stacks or to/from the instruction pointer or instruction value (for load immediate). each thread has its own pair of safe-guarded stacks. the first 16 16-bit words are the addresses of the first instruction for each of the 16 threads. a pop instruciton on an empty stack resets the thread to instruction 0, and a push on an empty data in causes it to go to sleep, so the computer handles lower priority threads until there's no data on it's input channel.
R. Mueller  [author] Mar 28, 2022 @ 4:35pm 
(1/2) i've been thinking about a pc, and it would be all in one chip, it would be an asynchronous real-time computer, with 16 threads, thread 0 is the idle thread and the remainder or higher priority levels. it would have 8 bit data out, 8 bit data in, and a 4-bit channel in selector and a 4-bit channel out selector (so 16 channels each). it would actually be a 16-bit computer, so each input or output would be multiplexed over 2 game ticks. both data in and data out would be queued, so a sender/receiver pair have to communicate over two wires: the sender has an "available" wire and the receiver has a "next" wire. "acks" are simpy falling edges or red signals.
gnidan Mar 24, 2022 @ 7:51pm 
after a reload, my off-by-one error disappeared. not sure if this is an ONI bug or "this mod" bug, but seems unreproducible now :/
really legendarier Sage Mar 24, 2022 @ 6:48pm 
also i am sorta munbo jumbo
really legendarier Sage Mar 24, 2022 @ 6:47pm 
time to make a pc
R. Mueller  [author] Mar 24, 2022 @ 10:35am 
gridan: clock them both the same, with a ribbon clock, that cycles from 0 to 15. the clock input determines which bit is read/written. you can just take a not gate and feed its output to its input, then after its output, put an edge counter. also if you put any circuitry in-between them, that adds a delay of one game tick, which will shift the output.
R. Mueller  [author] Mar 24, 2022 @ 10:32am 
Let Me Fizz On U: You're right, sorry. I've changed it to public. Here's the link again: https://github.com/happyjack27/ONI-Mods/blob/master/ComputerParts/notes/stack-based-alu.txt

Off topic: my instruction set is on hold at the moment, too many possibilities, and thinking of just having one part that's the entire computer, because otherwise the ciruitry is too complex. the ntruction set - my current idea - is to have two stack alus at a time, and when one of the instructions is a push or a peek, the other instruction switches to a read or write selector - e.g. whether to write to the instruction pointer, the memory address input, the memory data input, etc.

I'm also thinking of making a 16-bit stack alu. It would send/receive 8 bits at a time.
gnidan Mar 23, 2022 @ 7:42pm 
I'm getting an off-by-one error with the time mux/demux setup in your screenshot - each bit on the mux side gets output to (index+1)%8 on the demux side. Is there anything special I have to do when building this?
chriz0101 Mar 23, 2022 @ 1:20pm 
@R. Mueller, the github links are not working. wanted to check the opcodes. maybe your repo is private?
R. Mueller  [author] Mar 21, 2022 @ 5:21am 
it uses both.
3GuB Mar 21, 2022 @ 4:17am 
Actually the mod uses kanims from Automation Plus
https://steamcommunity.com/sharedfiles/filedetails/?id=2661900022&searchtext=automation+plus
Which were done by me
R. Mueller  [author] Mar 20, 2022 @ 2:20pm 
Stack based ALU is out!!

i have new ideas for my planned instruction set. but two stack alu's and some roms and rams, som muxes and demuxers, and a clock (just take a not gate and feed its output to its input) should be all the parts you need to build a computer.
R. Mueller  [author] Mar 19, 2022 @ 3:35pm 
Quick update: 1) the "instruction decoder" would just be a read-only memory; it would take every 8-bit instruction and convert it into more bits that are actually sent over wire and ribbons to "chips" . So that takes no work. Just a pre-set read-only memory. or maybe two of them.

The stack ALU- the more central piece of this - has some kind of annoying bug that's probably just a typo somewhere. but that makes it s needle-haystack problem. In other words, it's done, just waiting on some tedious quality assurance.

Once I publish that, you will be able to make and program a computer in ONI.

It will take some ingenuity, but it will be possible.
R. Mueller  [author] Mar 16, 2022 @ 5:22am 
it does use kanims from "Automation Expanded", yes.
I don't have the ability to make my own kanims ATM. :/
pether.pg Mar 16, 2022 @ 3:44am 
Does it use kanims from "Automation Expanded"? https://steamcommunity.com/sharedfiles/filedetails/?id=2014558219
trashcanhands Mar 15, 2022 @ 8:32pm 
That's incredible, lol. I'll keep an eye out for that.
R. Mueller  [author] Mar 15, 2022 @ 3:28pm 
i'm fully self-taught.
low-level language: i have an assembly language.already designed.
with the parts i'm making you will be able to build a microprocessor. they are sub-components of one. i'm going to build one myself as proof of completeness.
trashcanhands Mar 15, 2022 @ 3:46am 
Bro, this is incredible. I'm assuming you have education in electronics engineering. Just throwing this out there: microprocessors. (would some basic low-level language programming be possible?)