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

[Bigreactors][Screenies] ReactorControl

Started by Elsys656, 15 March 2015 - 06:18 PM
Elsys656 #1
Posted 15 March 2015 - 07:18 PM
Now with Images!
Screenies!








Thanks for coming to check this out it's my first actual released Computer Craft Program a Big Reactors controller

ReactorControl

Minecraft Bigreactors Mod Control program for Computercraft
This is the first release it's written with a Bedrock GUI a programming API/Kit that a fellow named Oeed designed it's feature rich as Computercraft GUI Api's go and plenty Flashy. I'd like to thank Oeed Here for making the API so I can just focus on functionality and leave the drawing to him :D/>.
A link to Oeed's github http://github.com/oeed/
Lolmer's bigreactors script was an inspiration for this code and some of the configuration saving/peripheral methods even a few routines for temperture control we're either used or heavily modified to make this a reality. As such some of the comments are unchanged I give him props for the parts of his codebase I ended up using.
The project github for Ez-Nuke is here https://github.com/s...reactor_control
MysticT's Sync api is used to redirect output to several displays if connected this was unmodified useage of their code that is located at http://pastebin.com/wPtGKMam
Features:

Should Theoretically support any number of reactors active or passively cooled (I tested with 4 active reactors and 56 endgame unattended design)
Output to any number of monitors connected by Wired Modem
Interface with and monitor EnderIO Cap Banks
Default option of monitoring internal RF buffers of turbines/reactors
Set a minimum Rf per tick rate to produce by 1k increments up to a theoretical limit of 1x10^9 Not that I recommend trying to hit that cap I think all but a select few systems would melt their processors/memory before getting there.
Debug logging to file
Set default rates for tempreture, min-max energy percentage, rf/tick rate, and turbine optimal speed
Manual control options for turbines/reactors togglable in each status page for the device
Set and unset manual configuration to switch back and forth to auto control
.options file based configuration for more granular control of specific devices
Requirements:

For monitor display you will need a 4 by 5 block advanced monitor you can have more than one. You will need to wire each turbine/reactor/monitor if not attached to the computer/EnderIO Cap Bank with wired modems wireless is not supported.
NOTE: The last device ID has first priority to the program as it's the first found by the peripheral methods if you want sequential organization with your devices take care to activate modems in proper order.
Important: I uploaded this with a completely free and clear license to do whatever you want with this code, out of respect for the people who's work this builds upon please credit them if you re-release. I could care less if you credit me.



CODE HERE V

https://github.com/E.../ReactorControl


Known Issues:
1. Auto response is very slow but it's built against 0.3 API of BigReactors as I don't have version 0.4 It does eventually Stabilize it takes a long while to do so however. Suggested that you find a configuration your going to use for the long haul most of the time and stick with it.

2. Random timeouts are to be expected when you reach a certain number of reactors/turbines/machines/etc that's just Minecraft lagging your pc too hard. Can result in nil errors/did not yield errors. If you encounter these I suggest you get rid of your turbine options files first keep your ReactorOptions.txt file if you can if that doesn't work kill all the config files they will re-write themselves. You will have to reset any options you had previously.

3.Hasn't been thoroughly tested with passive reactors only however it should operate properly as it does with Active ones and the passive portion of the reactor auto control is reused for 90% of the Active portion.

4.Feel free to fix bugs or suggest changes to code if you find doing something a different way could improve responsiveness or whatever.

5.Feel free to fork this code and fix it up if you find bugs, please allow me to port them to mine and please keep the credits intact for the original coders and their various contributions.

Suggested helper:
http://www.computerc...ory-downloader/ For installing on your computers(Haven't tested I usually just download via a browser and drop in my save folder)
Edited on 15 March 2015 - 09:16 PM
InDieTasten #2
Posted 15 March 2015 - 09:21 PM
If you want to get me hot, you must supply screenshot(s) ;)/> Just as an advise, since the rest of the post looks really nice
GrayHeart #3
Posted 24 March 2015 - 05:16 AM
I dont know if this should be posted here but…. i tried running your reactors code and am getting the error

"sync (Bedrock API):19: attempt to index ? (a function value)"

and only knowing the basics of coding i cant understand how to fix it … the lines of code before line 19 in bedrock are as follows

(15) local apis = {
(16) ["Drawing"] = [[
(17) local round = function(num, idp)
(18) local mult = 10^(idp or 0)
(19) return math.floor(num * mult* + 0.5) / mult
(20) end

any help is appreciated
Elsys656 #4
Posted 12 April 2015 - 03:49 AM
Sorry that's a bug with sync it was originally built against cc 1.58 sync isn't compatible with 1.6+ so I have to re-do the multiple monitor functionality. Also cleaned up some of the loading routines so it should time out way less often almost never. Havent pushed those changes yet however you can remove the call to sync in the findmonitors routine in the bigreactors api it should run but not display on monitors. Updated my code with cc 1.6 compatible code ill push the changes after I fix up my program loading routine and make sure reactor monitoring is being called effectively. May introduce another binary that runs in the background to that end as my logic and display logic is clashing with each other somewhat.
Edited on 15 April 2015 - 01:16 AM
GrayHeart #5
Posted 16 April 2015 - 12:58 AM
Thank you very much that seemed to work for the most part …. there are more glitches but at least its stabilizing my power a little for the time being … can i assume your working on making it 1.6+ compatible? i hope so as it seems to be the only program that supports multiple reactor/turbine setups that i have found with a nice interface.
SparkySamza #6
Posted 24 May 2015 - 09:35 PM
Hey i tried using your program, but my HUD looks nothing like your Screenies, can you explain that.
SparkySamza #7
Posted 24 May 2015 - 10:45 PM
Hey same issue with Line 19 andy help would be great. And a step by step instructions would really help. When i unpacked them all it only told me to keep picking a view, which i don't know how to.