Space Engineers

Space Engineers

29 ratings
Inventory Compactor
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
3.837 KB
15 Feb, 2015 @ 1:46pm
4 Nov, 2019 @ 7:31pm
2 Change Notes ( view )

Subscribe to download
Inventory Compactor

Description
This script will attempt to compact the inventory of all inventories in the current ship/station (current grid + attached rotors and pistons, but not through connectors).

By default the script will use all inventories on the current ship/station, you can change this so that you must opt-in to the compacting. If you add the following Custom Data to the programming block

[InvCompactSettings]
OPT_IN_WITH_TAG=true

Now the script will only affect inventories that have in their custom data a section that looks like

[InvCompact]

If you want to change the name the opt in section uses it can be set in the settings via

[InvCompactSettings]
OPT_IN_WITH_TAG=true
TAG_NAME=MyCustomTag

Then in the block with a inventory you would use

[MyCustomTag]


By default the script only checks for new inventories to compact on game startup and whenever you hit the "Run" button from inside the terminal of the programming block. At a possible performance penalty you can have the script auto detect any changes in inventories every 100 ticks by setting the setting

[InvCompactSettings]
AUTO_DETECT_CHANGES=true;

Any changes to the configuration must be followed by a hit of the "Run" button inside the terminal on the programming block to pick up the new settings.
16 Comments
aRTy 19 Mar, 2020 @ 1:54pm 
WARNING: This script will crash a multiplayer save if the auto detect feature is on.
Mr_Crazy_Manno 5 Nov, 2019 @ 7:25am 
Thank you :)
I would recommend making a new thumbnail, that use the new UI.
leftler  [author] 4 Nov, 2019 @ 7:35pm 
The script has been updated to work with the current version of SE. It also no-longer needs a timer block to run.
Cooper 15 Mar, 2019 @ 11:44am 
any idea how to get this running?
Sunflower 29 Jul, 2018 @ 10:07am 
DOES NOT WORK - :'(
Flow86 15 Jul, 2018 @ 3:01am 
this definitly needs an update :-/ it seems se simply cant download the script from workshop at all?!?
Zilch 30 May, 2018 @ 9:17am 
So hot, just need it to sort the items by type as well.
DragonSkull 10 Sep, 2017 @ 7:27am 
Is not working to me
Mr_Crazy_Manno 4 Jan, 2017 @ 2:36am 
It works for me it just warns you about unused/unneeded arguments, ignore that, you can run it without problems.
VivaVii 6 Nov, 2016 @ 2:00pm 
Is it true that this script no longer works?