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

Planning Bee Automation Help

Started by Konatsu, 10 October 2013 - 07:54 AM
Konatsu #1
Posted 10 October 2013 - 09:54 AM
I'm currently planning a system for automating bees. In addition to auto-breeding for mutations, it also will be able to send special bees to necessary biomes for breeding, innoculate bees, and be able to automatically send mutated bees to a production facility if the user chooses. Finally it would have a "starting mode" that automatically breeds imperial and industrious bees given some minimum requirements have been met, then send them to the production facility to get their produce. I have a few questions to help me get the set up right.

My coding background so far is basically some visual basic and a tiny bit of C++ in high school, but that was 2 years ago so I really don't know much. Part of the fun of this for me is learning more advanced concepts (for example we never learned about functions, but I have messed around with them a little bit with CC)

The questions:

1. Currently, I plan on there being more than one computer/turtle controlled via a main computer with monitor support. Now I don't know exactly how apis work, but what I was thinking is that rather than make a separate program for each computer or turtle, I could somehow make an API to get on all of them, and then write a simple program with that api depending on what that computer or turtle needs to do (just as an example, bee.extradrones or something). Is that a good idea? Would it be better to just have a separate program for each?

2. Can computers/turtles talk across dimensions? Basically I'd like to be able to send bees to the nether for certain mutations. If that doesn't work, a more bee related question would be if I could program a turtle to automatically assemble an alveary for special climate conditions and it work for mutations that supposedly require a specific biome.

3. How can I prevent the system from screwing up in the event that a chunkloader get destroyed by someone, a server restart, etc. Basically things that could cause a crash that I can't simply debug?

Thanks for all the help :)/>

Kona
Lyqyd #2
Posted 10 October 2013 - 11:11 AM
Split into new topic.
Bomb Bloke #3
Posted 10 October 2013 - 11:43 AM
1. Currently, I plan on there being more than one computer/turtle controlled via a main computer with monitor support. Now I don't know exactly how apis work, but what I was thinking is that rather than make a separate program for each computer or turtle, I could somehow make an API to get on all of them, and then write a simple program with that api depending on what that computer or turtle needs to do (just as an example, bee.extradrones or something). Is that a good idea? Would it be better to just have a separate program for each?

Yes, if you want to make use of certain functions you've written yourself from a variety of systems, then you've got a reason to implement them via an API.

I suggest starting out by writing a program for one computer/turtle. When you go to write the next, consider at that stage whether an API is worthwhile, adapt the first program to use one, then start writing the second.

2. Can computers/turtles talk across dimensions? Basically I'd like to be able to send bees to the nether for certain mutations. If that doesn't work, a more bee related question would be if I could program a turtle to automatically assemble an alveary for special climate conditions and it work for mutations that supposedly require a specific biome.

You might be able to arrange something by spitting disks through portals, but I'm not aware of any direct methods.

I suspect you'd find it faster overall to deal with such mutations manually rather then trying to get ComputerCraft to deal with them. To my understanding, some now require special blocks under the hives. Those bees that require certain biomes NEED those biomes, and simply matching the climate won't work.

You may be able to automate a system that applies serums to bees for you (eg, apply racial serums to bees with maxed out tolerances, or maxed out tolerances to bees that lack them). This won't help with those "special" mutation cases, but I don't see it being worth going further then that.

3. How can I prevent the system from screwing up in the event that a chunkloader get destroyed by someone, a server restart, etc. Basically things that could cause a crash that I can't simply debug?

If you've got moving turtles, a GPS system would be handy (so they can determine their locations when they boot back up).

Computers and turtles get their own filesystems and so can be programmed to periodically save important information (eg what they're carrying and what sort of job they're about to perform) to their internal drives. Note that turtles (intentionally) are not very good at keeping track of their inventories: a lot of inferences go into item management.
Konatsu #4
Posted 10 October 2013 - 12:40 PM
Yes, if you want to make use of certain functions you've written yourself from a variety of systems, then you've got a reason to implement them via an API.

I suggest starting out by writing a program for one computer/turtle. When you go to write the next, consider at that stage whether an API is worthwhile, adapt the first program to use one, then start writing the second.

You might be able to arrange something by spitting disks through portals, but I'm not aware of any direct methods.

I suspect you'd find it faster overall to deal with such mutations manually rather then trying to get ComputerCraft to deal with them. To my understanding, some now require special blocks under the hives. Those bees that require certain biomes NEED those biomes, and simply matching the climate won't work.

You may be able to automate a system that applies serums to bees for you (eg, apply racial serums to bees with maxed out tolerances, or maxed out tolerances to bees that lack them). This won't help with those "special" mutation cases, but I don't see it being worth going further then that.

If you've got moving turtles, a GPS system would be handy (so they can determine their locations when they boot back up).

Computers and turtles get their own filesystems and so can be programmed to periodically save important information (eg what they're carrying and what sort of job they're about to perform) to their internal drives. Note that turtles (intentionally) are not very good at keeping track of their inventories: a lot of inferences go into item management.

Thanks for the fast response :)/> A lot of useful info here, again thanks it definitely helps :D/>

Edit: Thought I put in here but I guess I forgot. The reason I was thinking api was that I wanted the mutation and production systems to be, for the most part, separate, but be able to share certain stuff, such as breeding a bee to get extra drones, or checking a bee's traits.

I'm sure manually breeding would be faster for those special cases, and I may end up just doing those mutations by hand before really starting up the full system, I just wanted to see if it was possible to do it in some way. I also had thought about using disks for the nether (I think the ones for overworld biomes are ok because they can talk within the same dimension fine right?), but I don't know if it's possible to have a program waiting for instructions from a disk or something along those lines.

I also forgot to put in the OP that I was planning on having serum automation for breeding, or possibly for other traits the user defines. I think I would keep the actual serum vial creation manual though, as I feel like it would be quite a bit of work to get it set up to produce new serums for each species automatically. I'd rather have the user create serums themselves and have the system wait for the user to input the serum vial into a chest THEN let the system handle filling the vial up, purification, etc.
Bomb Bloke #5
Posted 10 October 2013 - 07:02 PM
I also had thought about using disks for the nether (I think the ones for overworld biomes are ok because they can talk within the same dimension fine right?), but I don't know if it's possible to have a program waiting for instructions from a disk or something along those lines.
An event fires when a disk goes in a drive, so you should be able to have your program wait for one using os.pullEvent.

Computers in the same dimension are able to communicate via modems. You can either cable them together or go wireless - wireless obviously being the better choice for anything long-range, but each modem has a limit to have far it can transmit. You may need to set up some extra computers to act as repeaters.

Mind you, I suppose you could just fire disks off along whatever path you're sending the bees.

I think I would keep the actual serum vial creation manual though, as I feel like it would be quite a bit of work to get it set up to produce new serums for each species automatically.
I don't see how it'd be possible to have turtles identify new serums, no. Which is a shame, because use of racial serums dramatically speeds up your advancement through the different species.

Come to think of it, I'm a little hazy as to whether you'll be able to identify bees, for that matter. There's a peripheral which'll do it, but I have a vague memory that it might require manual use of a regular beealyser before it'll work.