Space Engineers

Space Engineers

Not enough ratings
Categorized Inventories
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
362.011 KB
2 Jan, 2015 @ 12:45pm
8 Jan, 2015 @ 3:46am
2 Change Notes ( view )

Subscribe to download
Categorized Inventories

Description
.. let's you auto-sort your inventories based on customizable categories in an easy item/category map.

Setup:
- Create 1 Programmable Block
- Create 1 Timer Block
- Create 4 Cargo Containers
- Add the Script to the Programmable Block
- Set the Timer Actions to:
--- Run Programmable Block
--- Start Itself again
- Set the Timer to 2minutes (or something longer) (altho the script is as light as possible it is advised not to spam it)
- Don't start the Timer yet, we still need to prep our containers

Now let's take a look into the code of the thing. In there you'll find the public void InitInventoryCategories() method. This is where you can map items to categories with ease.

inventory["Ore", "Iron"] = "Ores";

That looks pretty simple don't it?!
inventory targets the sorting system to which we add the type "Ore" and "subType "Iron" into the category "Ores".

So how do we get the Stone into the Trash (Container or Connector ;) you simply have to prefix the name of the containment block with a $ and have it contain the string "trash".. meaning these are valid options

$White-trash
$Trashster Mc Gee
$Snowwhite and the 7 Trashers
$Trash Container 001

The default categories i put in are: "ores", "components", "refined" and " * ". So name your containers accordingly. You should have at least one container for each category you specified in the InitInventoryCategories method. and one for random stuff.
Now that you set the names go ahead and kick off that Timer from earlier and enjoy some nicely organized and categorized Inventories.

As always the script is as lightweight as possible and fully documented.
have phun


Plannet features:
- none atm

ChangeLog
- did a full rewrite so writing a detailed changelog would be ridiculous ;)
28 Comments
Gameboy Nitro 25 Aug, 2015 @ 1:49pm 
Thanks for this m8. Perfect. :thumbs::thumbs:
Twinkle Tip 20 Mar, 2015 @ 4:44am 
I have been using this for a couple of days now and my automated station has been working fine (A lot better than my previous station with sorting conveyors).

The latest update, 1.074, introduced Ice. If this gets into the system an exception is thrown because it has no idea how to handle it.
[ISFR]n2o_live 11 Mar, 2015 @ 7:47am 
Sorry! It's work with *Random Stuff
[ISFR]n2o_live 11 Mar, 2015 @ 7:34am 
Thanks!!! Your script is just amazing, but he don't work with the ammunition :s
DSMTurboAWD 20 Jan, 2015 @ 9:40am 
Super slick, Code works great :happycthulhu:
BarfightSpectator  [author] 18 Jan, 2015 @ 1:00am 
correct.

i assume you mean to do this for docking purposes. it is something that annoys me aswell but once merged or docked all containers belong to the same grid.. the only way is to index beforehand and compare the lists at dock to determine what belongs to whuich ship and which cargo pc. the thing about that is, that the cargo PCs have to be able to talk to eachother.. a functionality i hoped to have been released in last thursdays update already.. to my dissapointment however there was no such release and we're stuck with problems like this.
Uthwe 17 Jan, 2015 @ 7:59pm 
Is there a way to exclude ships inventories? Is the only option to rename everything with a ! if we don't want it to be auto pulled?
BarfightSpectator  [author] 16 Jan, 2015 @ 3:38pm 
of course :)

it'll even leave a 5% margin when filling up containers then jump to the next one on the grid, not sorted by name.
Nekochan 16 Jan, 2015 @ 3:25pm 
Excuse me if I missed it somewhere, but will this work if I create two ore containers and mark both with ore? So when one fills up the other will be used as overflow?
justin.binda 14 Jan, 2015 @ 2:05pm 
simple effective and easy to use simply awesome