Space Engineers

Space Engineers

Not enough ratings
Simple Inventory Manager
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
558.000 KB
6 Oct, 2019 @ 4:06pm
13 Jul, 2020 @ 4:46am
16 Change Notes ( view )

Subscribe to download
Simple Inventory Manager

Description
* Automatically and dynamically adds containers for ores, ingots and component and shows how full your containers are.

* Empties your refineries and assemblers and makes sure your excess assemblers are working in cooperative mode.

* Automatically adds new blocks dynamically.

* Shows your stocks on LCD panels.

* Enables ejecting excess gravel.

This script is inferior to Isy's Inventory Manager but is a decent choice if you want something more lightweight.

*** USAGE ***
1. create a group named "invManageGroup" without the quotation marks and add any containers, assemblers, refineries,
connectors, LCD panels you want. You can change the group name to whatever you want in the Program() constructor method.
The script will automatically add new blocks you add to the group as long as you haven't set the script to run only once.
As it is now the script will only add containers as needed and will warn when you are running out of containers.
If you want to change this behaviour to allocate all available containers from the start change addContainerWhenNeeded to false under Program().

2. The script will automatically update by default. If you want to only run it once or run it off of a timer block you can change it in Program().

3. If you add any connectors they will eject any excess gravel you have, the amount is defined by max_gravel in the Program()
constructor method. If you are in space remember to have a gravity generator pushing away all the excess gravel or
the gravel will stop the connector from ejecting if you are ejecting large amount and your settings allow loose items.

4. If you wish to have LCD panels too easily see your stocks you can let the script assign what any LCD panel show
or you can enter "show ore", "show ingot" or "show component" without the quotation marks into custom data of the block
to force a panel to show a specific type of data.
11 Comments
NANANNANANANA  [author] 13 Jul, 2020 @ 4:49am 
I updated it with you fix, Zecrah and also fixed a few other things, so thanks for your input.
I haven't played Space Engineers for a while and simply forgot to fix the problems, but please continue to report problems.
NANANNANANANA  [author] 17 Apr, 2020 @ 11:20am 
Thanks for the input, Zecrah. I'm a bit busy right now but I'll hopefully take a look at it within a week.
Zecrah 14 Apr, 2020 @ 10:41am 
I also experienced julek's bug. If you're using this on a ship where items are rapidly moving around, you'll likely get it because your collections are changing in the middle of a foreach loop. The easy fix is to amend .ToList() to all 4 of your foreach loops in moveItems(). e.g. foreach(IMyAssembler assembler in assembler_list.ToList())
SOBEK 13 Nov, 2019 @ 8:20am 
Thanks for info. Good luck :)
NANANNANANANA  [author] 13 Nov, 2019 @ 7:11am 
Hello, Juliusz. I'm sorry it took a while for me to answer, I've been busy.
I tried adding 44 containers to a save I had and there were no problem. I can add as many containers I want and they are all renamed and allocated correctly.

From what you're saying I can't really see a problem. It's possible your mod is what is causing the problem. For this mod it does not matter if you use 1x, 5x or 10x for cargo, as long as you use in game settings. Third party mods might cause issues.

If the mod causes my program to halt then the program will stop renaming and moving items until the problem is fixed. Try deactivating your mod. It's possible from your error message that something could not be moved, and that is causing the issue but my program checks if it can move objects so that again might be your other mods causing issues.
SOBEK 30 Oct, 2019 @ 5:52am 
Script stop work ramdomly and this is annoing, so can you do somthing with that issue , i dont know what do with this, cant add new container when have 10 empty extra cargo but script cant add another empty when was in "InvManageGroup" .
SOBEK 30 Oct, 2019 @ 5:49am 
And script dont show empty containers like on yours pictures.
SOBEK 30 Oct, 2019 @ 5:47am 
Hi . Script crash himself , and dont add new container , i have more cargo mod with bigger cargo containers and 10 millions of free cargo space but script crash and stop work - " Caught exception during execution of script: Collection was modified; enumeration operation may not execute. at System. Throwhelper. ThrowInvalidOperationException[Exception Resourceresource] at System. Collection.generic.List`1.Enumerator.MoveNextRare[] at Program.moveitems[] at Program Main[Srting argument, UpdateType updatesurce] at Sandbox.Game.Entities.Blocks.MyProgramableBlock.<>c__DisplayClass46_0.<ExecuteCode>b__0[IMyGrindProgramprogram] at SandBox.Game.Entities.Blocks.MyProgramableBlock.RunSandboxedProgramAction[Action`1action,Srting&resource] , thiscode show when script crash in programable block . What is this ? Its bug or conflict with cargo space ?
Babbayega 9 Oct, 2019 @ 8:56am 
i will give that script a go. thanks for that.
NANANNANANANA  [author] 8 Oct, 2019 @ 3:07pm 
That's not what I want to do with this script. I did make a new script for what you asked for though.
https://gtm.you1.cn/sharedfiles/filedetails/?id=1884393928
That script I can probably change if you want something else specific.