Space Engineers

Space Engineers

Not enough ratings
Co-op (Refinery & Assembler) Controller
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
17.798 KB
29 Mar, 2015 @ 10:57am
6 Aug, 2019 @ 10:43am
13 Change Notes ( view )

Subscribe to download
Co-op (Refinery & Assembler) Controller

Description
Co-op Refineries & Co-op Assemblers Controller

WHAT DOES IT DO?
This script will handle a variety of tasks:
1. Switch idle assemblers, refineries & arc furnaces off
2. Automatically turn the production blocks on when something's in line
3. Distribute ores equally over all refineries so that they work the same amount of time
4. Distribute Iron, Nikkel, Cobalt & Scrap metal equally over
arc furnaces & (idle refineries OR refineries that are only producing "AF ores")
5. Redistributes all ores whenever a refinery is idle
6. Drain excessive ingots from idle assemblers
7. Dumps produced ingots from refineries to a designated cargo storage every time the script is called, thus periodically

CONFIGURATION, WHAT SHOULD YOU KNOW!
As with most scripts, you'll need a timer block & a programmable block to repeat the process.
I personally recommend setting the trigger delay somewhere between 5 to 10 seconds.
Furthermore you need to make sure that you have correct names set for your production blocks, i.e.:
1. Your main assembler should be called "Assembler MAIN [Co-op]"
--> Add "[Co-op]" to all assembers that are participating the co-operation with MAIN
2. At least 1 refinery MUST be named "Refinery MAIN [Co-op]", which will be your "distributor"
--> Design your base so that incoming ores pass through this refinery
3. Arc furnaces MUST contain "Arc furnace" & "[Co-op] in their name in order to be recognized
4. This script supports the "Large refinery mod" (the one with the 2 giant balls)
--> Make sure only these specific large refineries contain "Large Refinery" & "[Co-op]" in their name
otherwise it screws with ratios since that "Large refinery mod" refines 5x faster
Subscribe @ http://steamproxy.net/sharedfiles/filedetails/?id=351103963
5. Every regular refinery, i.e. produces at the same rate as stock-refinery
MUST contain "Refinery" & "[Co-op]" in its name
6. The assembler-drainer & refinery-dumper requires you to target cargo containers by adding a tag to their names,
--> Possible tags: "[I-DUMP]", "[AI-DUMP]" & "[RI-DUMP]"
----> I-DUMP: collects ingots from assemblers & refineries
----> AI-DUMP: collects ingots only from assemblers
----> RI-dump: collects ingots only from refineries
--> Make sure the storage containers have enough room at all times
7. Ownership settings can cause problems, so double check that all blocks are "allowed" to interact with eachother

EXTRA NOTES
You can configure the names & tags in the script, just after this readme.
Thanks to MMaster, maker of the configurable LCD script, I was inspired to use the same idea regarding tags. You can subscribe to his awesomeness @ http://steamproxy.net/sharedfiles/filedetails/?id=403921671
If you wish to support mods with other refineries that have different production speeds,
either try to understand the code or let me know :p
Furthermore, special thanks to thank Sn0w_Lynx for originally inspiring me.
Also thanks to Lithorn & Ser Artemiel for notifying me on bugs and providing more ideas.


If you like this script, you may also like my Co-op Disassemblers
@ http://steamproxy.net/sharedfiles/filedetails/?id=450959713
BTW, Please report any bugs you find along the way :)
49 Comments
Stoner  [author] 6 Aug, 2019 @ 10:45am 
@VoHD , ok so it turns out the unreachable code was in fact a correct warning, i forgot to remove a line after debugging last time.. everything should work as expected now.. if you're still experiencing issues, please let me know ;)
VoHD 3 Aug, 2019 @ 7:27pm 
@Stoner maybe, but after launch, programmable block show few errors in it's info screen. I can screenshot it, if you need,
Stoner  [author] 2 Aug, 2019 @ 12:05pm 
@VoHD , mind that a warning is not the same as an error.. so in theory the script ought to work, even if SE's interpreter considers that code unreachable, though i'm pretty sure that's a mistake cause that code does get reached iirc...
VoHD 1 Aug, 2019 @ 11:32pm 
@Stoner has error in script. On compilation.
Program(182,4): Warning Unreachable code detected
2x
Stoner  [author] 15 Feb, 2019 @ 7:13am 
@yokmp , In the future, if the script stops working due to updates, just hit me up since I'm not playing space engineers on a regular basis anymore..
yokmp 15 Feb, 2019 @ 6:52am 
Nice!
The way your Script handles distribution feels better than TIMs oder the other ones which name I can't remember rn.
Stoner  [author] 13 Feb, 2019 @ 6:17pm 
@Ser Artemiel , K nvm, a working version should now be available...
Stoner  [author] 13 Feb, 2019 @ 5:47pm 
@Ser Artemiel , Do you perhaps have any experience with the programming block? Cause I'm running into a weird problem when it comes to transferring ore... any help would be appreciated :p
Ser Artemiel 13 Feb, 2019 @ 2:45pm 
Thank you so very much!
Stoner  [author] 13 Feb, 2019 @ 1:45pm 
@Ser Artemiel , It's been quite a while since I fired up Space Engineers. Will try to update it somewhere in the next week if I find some extra time..