Space Engineers

Space Engineers

Selective Refining
94 Comments
Leon Aug 5, 2020 @ 2:32pm 
thx
Welerongorgo Aug 5, 2020 @ 2:21pm 
If anyone's still interested in this script. I've posted a fixed version of it to the workshop which brings the code up to date.

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2188612790

It doesn't look like this one is going to be updated any time soon.
Leon Jul 11, 2020 @ 4:34pm 
updat plz
Orhunersy May 13, 2020 @ 1:40am 
Please Update
zarozak Feb 7, 2019 @ 3:39am 
still not working
Leon Dec 11, 2018 @ 7:07pm 
updat plz
______ Nov 2, 2018 @ 6:32am 
No Function
xXPredzioXx Jun 1, 2018 @ 5:08pm 
damn i love this script if you culd update it i wuld be greatfull
Yumata Aug 15, 2017 @ 5:23pm 
Old Code,No Function
Leon Apr 29, 2017 @ 4:08pm 
updat plz ?!
Morphik Feb 2, 2017 @ 12:02am 
IMyInventoryOwner has been obsolete for a while now. if you don't want the warning you can literally just delete the word and the script should be just fine.
Jeder liebt Safari!! Jan 28, 2017 @ 6:54pm 
it warns that IMyInveotryOwner is obsolete, but works.

But I had a problem with |, without a blank +gold|all it doesnt work and do strange things, with a blank it works perfect.

nice work! thx for the script :)
Hanzaplast Jan 12, 2017 @ 7:38am 
I use this script and it works pretty good but now I stumbled upon a strange problem. I had it working successfuly with 4 refineries, but when I later built 4 more, it didn't work completely for the new 4. They are all connected to the conveyor network and the ownership is all set to me. The script doesnt pull in new ores despite te names being 'Refinery ## +all'. What it does do, however, is turn the refineries off. So somehow it doesn't want to pull new ores and as such thinks the refinery has nothing to do, thus turning the refinery off.

Anyone else have this problem? Any tips/hints/fixes?
Psycho Dec 19, 2016 @ 12:29pm 
thank god this still works.^^
Leon Dec 18, 2016 @ 9:19pm 
updat Plz
The Internet Sep 28, 2016 @ 12:33pm 
Same issue as Devlah here as well
Greystar Sep 5, 2016 @ 3:48pm 
for some reason since i started running this script my refineries won't refine Scrap Metal.
17864155 Aug 8, 2016 @ 10:02pm 
Can only control 40 refineries at the same time. More, it will appear, "the script is too complex, please re edit the reconstruction of the script"
Vichama Jul 17, 2016 @ 4:41pm 
Great powersaving mod. Is there a way to get this to pull ore out of the Nanite Factory Mod? Also, how do I add metal scrap to the ore list? Do I just put it in that "string[] oreTypes" line? If I do, do I leave a space like "metal scrap" or do I need an underscore like "metal_scrap", or can I just add "scrap"?
Mycroft Groks Apr 13, 2016 @ 7:32am 
I solved that by adding sorters to the refineries and turning off the conveyor system on the refineries. Have one sorter going into the refinery with only ore whitelisted, and then have a sorter pulling out the ingots.
Devlah Apr 6, 2016 @ 9:07pm 
SE v1.128: No errors in compiler or during execution, however it seems for some reason Ore is being ejected and replaced into designated refineries at the end of the timer cycle.
Mycroft Groks Mar 15, 2016 @ 5:34pm 
Same here as well
Ace_Fetz Mar 14, 2016 @ 3:48am 
same issue as Deviah
Devlah Mar 14, 2016 @ 12:03am 
Lines 292, 323, 328 and 336 have missing namespace errors. "IMyInventory" and "IMyInventoryItem" could not be found, are you missing a using directive or an assembly reference?
Mycroft Groks Feb 21, 2016 @ 3:01pm 
I'm having an issue with Arc furnaces turning off when there is no cobalt and nickel, but not sharing the workload with iron arc furnaces. I have them set up as "Refinery +Nickel |iron", "Refinery +Cobalt |Iron"
Robertak Jan 19, 2016 @ 1:33pm 
well.. i solved that by deleting of part of the code which was supposed to turn conveyor system use off.. script still seems to work fine, but is not shutting conv. system use off.. :-)
Robertak Jan 19, 2016 @ 6:42am 
Hi Reptar. I have one problem with this script. When used without Items Sorting script to move refined ignots from the refinery to cargo container refineries are getting stuck with refined ingots as for now "use conveyor system" function (which is set to off by this script) works for both feeder cargo and output cargo of refinery block.
Maniac Jan 17, 2016 @ 3:18pm 
This works if I use the all, setting, but I picked this script specifically because it has the ability to selectively control what is refined. The problem is, when I use, for examble +Uranium, or +Magnesium, for example, it just clears the refineries inventory, and turns it off. Every time.
ivianrr Dec 7, 2015 @ 5:52pm 
This is perfect, just what i needed. Will you update it?
REQUIM Nov 27, 2015 @ 12:27am 
strange problem here every time the script triggers my uranium gets pulled out and place back in alternating each time
Satis Nov 3, 2015 @ 2:22pm 
@Curzon Dax it already works with the Arc Furnace. I have no problems on my end. The only thing I needed to do was add the scrap to the accept list for the furnace and refinery to grab those as well.

Regarding updating the script, I'm guessing that it's about not sorting it based on what needs to be refined first before the secondary list kicks in.
Demon1337 Oct 18, 2015 @ 4:36pm 
This script needs a major update i think. It does its job partially but not all the way
HayateKusoni Sep 1, 2015 @ 10:56pm 
Hey can u make this script work with Arc Furnaces?
Rylo704 Apr 12, 2015 @ 1:17pm 
looks like some of your scripts need an update
L3htokurppa Apr 1, 2015 @ 2:57pm 
Every time the script is ran by timer block, all my refineries empty themself and later draw ore and then again on script ran, they empty. Any suggestions to solve this?
Dagothra Mar 22, 2015 @ 7:44pm 
I would like to see a tutorial on adding custom ores from other mods to be sorted. Right now it yanks most custom ore types back out.
yokmp Mar 18, 2015 @ 3:49am 
Pls add Scrap to Iron Refinery.
Keep up the good work!
Scrub Mar 17, 2015 @ 9:03am 
Seems to enable refineries to skip over the new conveyor blocks. Ores are going from my group of refineries through a Conveyor sorter that whitelists ingots rather than being put back into the container ores come from. There are no loops to bypass the sorter and nothing to stop the ores from returning to the previous container.
Tiger Feb 28, 2015 @ 7:13pm 
You can take your time, and make it all spiffy and clean, like this one.

I've been scouring the Workshop for a script that would tally up the ore stocks within an entire conveyor network (cargo containers & all refineries), and print that on an LCD screen... but alas, 'tis hopeless. My aim here is to have one LCD screen in my refinery room, which updates frequently to show overall progress. It doesn't need to list refineries individually (that can be a separate script request, for later); just the cumulative sum of all owned containers with any ore.
Tiger Feb 28, 2015 @ 7:13pm 
Ditto for a version that does the same, but with components. It'd be very handy to have a screen in a workroom that gives a complete inventory of available parts across an entire conveyor network (including within assemblers).
Tiger Feb 28, 2015 @ 7:13pm 
And another code that does the same trick, but with ingots, tallying up all containers, refineries, and assembler inventories, and simply listing them.

Each code should be expandable for custom ores (see Geneticus's new ores, and the Advanced Life Support mod), as well as mod-added refineries (especially the Stone Crusher and Uranium Centrifuge).
Tiger Feb 28, 2015 @ 7:13pm 
Simple list output would be perfect; doesn't need to be fancy to be effective. Just the name of an item, maybe a dash, and the sum total in the network, one per line. KISS, you know. ;)

Do any of those sould like something you could sharpen your mad C# skills on?
Reptar  [author] Feb 28, 2015 @ 6:42pm 
@Tiger Sure, I can write some stuff by request, but I can't promise if or when I'd ever finish it :P
Tiger Feb 28, 2015 @ 6:36pm 
Excellent script!
A perfect patch for the Automated Inventory Script (mod)'s current Keen-caused bug where it no longer manages the vanilla Refineries. I was even able to easily edit the ore string to include the many modded ores I have, and I know nothing of C#.

If I may ask, are you willing to consider writing new codes by request?
Fleabag Feb 27, 2015 @ 7:55pm 
Currently have 4 refineries and 2 arc furnaces, script continues to pull Cobalt and Iron out of the opposite arc and put in the other over and over, not sure what the issue is have not had a problem with this script before. (Naming conventions were followed mod blocks were removed from the system to detect any interference)
scorp27 Feb 22, 2015 @ 5:31pm 
seems the ingame scripts and workshop is broken, they dont show up even if your subscribed
rehsinuP Feb 22, 2015 @ 7:04am 
i never used scripts before...so...click on sub start se, load my survivalmap and try to load it in the programming block...but i didnt see the script. What i am doing wrong? I rly used this on the first time so sorry for a bit nooby ask
Reptar  [author] Feb 17, 2015 @ 10:50pm 
@AppleSucks No, you just change the actual name of the refinery to have the + or - in it.
WarDave Feb 16, 2015 @ 11:16pm 
So your saying to edit this line "string[] oreTypes = { "cobalt", "gold", "iron", "magnesium", "nickel", "platinum", "silicon", "silver", "stone", "uranium" };" to have the + or - in the ore name?