This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Nesbro's profile picture

Reactor program?

Started by Nesbro, 09 March 2015 - 08:23 PM
Nesbro #1
Posted 09 March 2015 - 09:23 PM
If anybody has ever used Direwolf20's reactor program that he has made, I'm wondering if there is a way to change his code a bit so i can use it for 4 reactors instead of 1? Such as if the power usage was higher then what 1 reactor could make then i would want it to kick on a 2nd reactor to cover the loss. I'd want it to work so if i was using a quarry that took tones of power it could control how many reactors get turned on to help cover the power need.
The_Cat #2
Posted 09 March 2015 - 09:37 PM
Could we see Direwolf20's code? a like the the Pastebin?
Nesbro #3
Posted 09 March 2015 - 09:40 PM
Let me get it real fast

http://pastebin.com/4qNyaPav

I don't know much about code, so to me it looks impossible without rewriting it.
Lupus590 #4
Posted 09 March 2015 - 10:37 PM
his code monitored an energy storage cell and and used rednet to get the reactor states and send turn on/off signals

you could easily use an array and for loop to change the state of each reactor, however the displaying of information will require a rewrite

he posted a video at some point explaining how it worked

edit: found it https://www.youtube.com/watch?v=l7ZwSFVYITU

also, what are you running that could need two reactors?
Edited on 09 March 2015 - 09:39 PM
:-) #5
Posted 09 March 2015 - 10:57 PM
also, what are you running that could need two reactors?

Probably 4 MFSUs or every IC2 block using UU-Matter…
Edited on 09 March 2015 - 10:00 PM
Nesbro #6
Posted 09 March 2015 - 11:11 PM
hahaha a ender quarry with fortune 3 and speed 3. im not using a super huger reactor tho, just a 7 by 7 reactor because ive heard those are the most efficient when it comes to usage of yellorium.

Im using HV solars to make UU lol
Bomb Bloke #7
Posted 10 March 2015 - 12:26 AM
Why not run them all in parallel all the time? Surely you'd get better cooling efficiency that way.
Nesbro #8
Posted 10 March 2015 - 01:20 PM
Yea i could do that, just thought id try something out with cc code

I would love to learn code and i use minecraft as my tool to help me learn
Lupus590 #9
Posted 10 March 2015 - 01:46 PM
There are plenty of tutorials for CC, google is also a good friend.

As for your reactor problem, If you must have 2 , have 1 on all the time which makes a bit too little RF and have the second regulated with DW20s program.
Edited on 10 March 2015 - 12:46 PM
Nesbro #10
Posted 11 March 2015 - 02:03 AM
I figured out how to connect all 4 reactors to the program, now im wondering where in the code do i need to change it to where i have the rf gen say for all 4 instead of just 1?
Lupus590 #11
Posted 11 March 2015 - 10:00 AM
you may need to rewrite most of the program for that

later in the video he explains line by line: https://www.youtube....h?v=l7ZwSFVYITU

to add more reactors to the code, you will need to store them in a table, when the program interacts with a reactor you will need to make it loop through the table
Edited on 11 March 2015 - 09:28 AM
Nesbro #12
Posted 11 March 2015 - 01:09 PM
I added more reactors to the code with no problem lol and yea i watched that video guess i should just watch it again.
Lupus590 #13
Posted 11 March 2015 - 01:17 PM
So you got it working with the 4 reactors?
Nesbro #14
Posted 11 March 2015 - 10:00 PM
Not individual control but yes i got all 4 to turn on at once and off at once
blackrabt #15
Posted 13 March 2015 - 11:06 AM
I tried doing a partial rewrite of this code to control multiple turbines but my skills were not up to the task. It seems to hone in on the production values of the primary(#1) reactor or turbine, so if you can figure that out you may be able to make the next step. Good luck!