Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal


  • Content Count

  • Joined

  • Last visited

About BasedPythonScrub

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello OC forums, I am kind of a lua noob. I have had some coding experience but not with lua and little with OC so I need some help. I am creating some software for a nuclear craft power point. I have researched the nuclear craft functions as well as got some help from another user regarding sending information across a network. I need help putting together the software as well as wrapping my head round GUI APIs and usuage. I don't want to use somebody elses, I woud like help making my own. The reactor/computer setup comprises of: 5 reactors that have a computer each which all send their reactors information to a main computer that displays the graphics of the system onto a big screen. Also, i've want my system to dynamically update in real time like using a loop. The software is mainly just for looking at and getting information and not to control the system. I made a super rough design for what I want it to look like. As for the coloured lines, they don't have to monitored as if a reactor is off, it's safe to assume no energy or bred fuel is coming out of it, so it could be ifelse(d) with the reactor on status. Some of the GUI APIs i've tried but can't get to work include: https://github.com/mcCURS0R/myOcPrograms/tree/master/curlib https://github.com/kevinkk525/GUI I was inspired by this video I found and would like a arbitary loading screen for aesthtetic reasons. If someones willing to help me and be a bit of an advisor for the duration of the project reply or message me. Many Thanks, BPS
  2. Maybe you want it to constantly change with the values. You can use a while loop: local component = require'component' local reactor = component.reactor while true do heat = reactor.getHeat() MaxHeat = reactor.getMaxHeat() EUoutput = reactor.getReactorEUOutput() print("Heat : " .. heat .. "\n" .. "MaxHeat : " .. MaxHeat .. "\n" .. "EUoutput : " .. EUoutput) end
  3. Goddamn you're the best . It seems pretty consistent which is really nice. I assume its expandable by adding more strings as well as more elseif statements. What does "%s" do? Also, do you think I could use one port, to keep the code tidy, since the slaves aren't listening to the broadcast? Thanks !!
  4. Can I print both of the incoming messages at the same time with these methods? Using the while loop allows the for recieved information, from the slaves, to be updated as soon as a packet arrives and I want to display, I will produce a GUI later, multiple bits of information on the screen at once that update in real time. Could I use table.insert and print the table with what I recieve? e.g: if addr == "address" then table.insert(table1, 1) elseif addr == "address" then table.insert(table1, 2) print(table1)
  5. Thanks for the reply. I will try this when I hop on and get back to you
  6. Hello, I need help with seperating modem signals from multiple slave computers on the master computer. I'll attach an image of my current code. Currently it isn't consistent and I want to add more slaves to the system. Also I know in the image in the code, the syntax of the modem information isn't consistent (the c012, a32a, etc). Hopefully the code and the very brief description illustrates what my problem is and I know I've posted something similar before on my profile but still need help. Many Thanks
  7. How do I go about implementing this/how do you do it? When I was using ifelse statements, I would do : local _, _, messagesender, _, _, message = event.pull("modem_message") if messagesender == "--network card ID that sent the message--" then print(message) ifelse messagessender == "--the other network card--" then print(message) etc This would print the last signal it received and would print only that. Is "messagesender" what you mean by component address?
  8. Problem with receiving multiple signals Hello, I am using nuclearcraft and I want to create a program that visualises the reactor information, this information would include RF stored, efficiency, etc. However, I am using 5 reactors and want all 5 to be shown on one screen, through one computer. I have set up a wired network in which each reactor has it's own computer pulling the reactor information and sending it down the line, through a central relay and to a central computer. My problem is that you have to use event.pull("modem_message") and because of this, you can't differentiate between different inputs. The closest I got was using multiple ports and using if and elseif statements to print depending on the address of the network card that sent the message. This meant that they would takes turns printing their values but not simultaneously. To note: -Using threads or sides is something I thought of -Using a script or, the aforementioned, threads and then calling to them in a main program -I tried using if table.insert() and then printing the table, though this didn't work, the way I did it. Can somebody help me understand a method in which I can differentiate between inputs coming into to one computer. Thanks in advance :)
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.