Space Engineers

Space Engineers

45 ratings
WIM - Wishy's Inventory Manager
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
350.615 KB
15 Mar, 2022 @ 3:16pm
17 Mar, 2023 @ 5:50am
15 Change Notes ( view )

Subscribe to download
WIM - Wishy's Inventory Manager

Description
Here is another Inventory Manager.
Primarily designed for multiplayer servers with a programmable block (PB) limiter, meaning the server admins restrict the runtime available for your script (resulting in a slower execution than other managers).

While many other managers overheat and offer limited options for adjusting the script's execution speed, I decided to create one (almost) from scratch.
Significant portions are inspired by ♥♥♥'s work (https://steamhost.cn/steamcommunity_com/profiles/76561197961286320/myworkshopfiles/?appid=244850), so huge thanks to him!

This should work for modded servers as well, as long as the designated assemblers can assemble/disassemble the respective items.

Tested and working with Tiered Materials on the space-engineers.de server.

Features:
  • Advanced Sorting: Allows categorizing and sorting items in cargo containers using custom data, including sorting special ores and components or allocating fixed amounts of items in containers or ammo in turrets.
  • LCD Display: Customizes LCDs to display specific item categories, such as battery, wind, hydro, solar, reactor, ore, ingot, component, and item.
  • Power Management: Enables or disables power management settings to efficiently control reactors based on battery charge levels.
  • Autocrafting: Automatically crafts items based on desired stock levels, updating a designated LCD with current and wanted stock numbers.
  • Auto Disassemble: Offers two disassembly modes: AutoDisassemble (disassembles all unwanted items) and DisassembleOverstock (disassembles items exceeding wanted stock levels).
  • Refinery Management: Controls refinery behavior by specifying which ores to process or exclude using arguments in the refinery name.
  • Task List: An LCD that displays the most wanted ore.

Known Issues:
  • Errors occur with overloaded cargo. Ensure enough space is available in your base/ship, and all cargo is marked for sorting. If cargo capacity is near 100%, build additional storage or use the Automatic Cargo assignment (enabled by default).
  • Error when grinding/building new cargo/refineries/assemblers while the script is running > recompile.
  • Some modded items don't assemble/disassemble (please send me the type + blueprint definition, example: "MyObjectBuilder_Component/ShieldComponent", "MyObjectBuilder_BlueprintDefinition/ShieldComponentBP").

SETUP:

- Read the brief guide below or watch the instructional video.
- Prepare enough LCDs, preferably Wide LCDs placed sideways with the text rotated (-)90 degrees.
- Install this script in a programmable block.
- Modify the values in the script (below this introduction) to match your LCDs, assemblers, groups, etc.
- Ensure proper sorting setup before using Autocrafting.
- Automatic Cargo assignment is enabled by default; disable it by setting shouldCheckAndAssign = false;
- Create an optional LCD named "WIM Wanted" to view the task list.(quota's will appear in the Custom Data)

1. Sorting
==========

Copy one or more category names to your cargo's customData to sort items accordingly.

Component Ore Ingot AmmoMagazine PhysicalGunObject GasContainerObject OxygenContainerObject PhysicalObject ConsumableItem

To ignore a container, write "Ignore" in the customData.
Use "Stop" on your connector to ignore grids on the other side!

You can sort special ores and components with:

Manual Iron IronIngot SteelPlate Ice ...

Or allocate a fixed amount of items in a container:

Manual Iron=5000 IronIngot=2000 SteelPlate=500 ...

Turrets work as well (including weaponcore), just put Manual and the amount on a separate line in the Custom Data.

Manual 20

It should automatically load the correct ammo into the turret. If using custom turrets and ammo, ensure they are added to the weaponToAmmoMapping dictionary.

2. LCD DISPLAY
==============

Edit your LCD's customData with "WIM" followed by the corresponding categories to display items there (each category on a new line).

Categories:
Battery
Wind
Hydro
Solar
Reactor
Ore
Ingot
Component
Item

Example:
WIM Ore Ingot

Background color can be changed in the LCD's block settings.

3. POWER MANAGEMENT
===================

This feature can be enabled or disabled in the Settings.
Settings can be modified in the PB's Custom Data.

PowerManagement: true/false

RatioHigh: Ratio (in %) when to turn Reactors OFF
RatioLow: Ratio (in %) when to turn Reactors ON
BatteryGroup: (OPTIONAL) only check batteries from this specific group
ReactorGroup: Name of the reactor group to toggle on/off
SkipRecharge: skip checking batteries set to Recharge

4. AUTOCRAFTING
===============

Assign an LCD with the name specified in the configuration or the Custom Data.
The first time, the LCD will display all the items you currently have.
Any new item crafted will be added to the list.
Items are listed in this format:
Itemname Current Stock / Wanted Stock
SteelPlate 500 / 600

You can edit the wanted value to your desired number.

Be sure to set up the name of your assemblers to match the name in the custom data.

5. AUTO DISASSEMBLE
===================

There are 2 different auto disassemble modes:

AutoDisassemble
This will disassemble ALL items specified in the config "UnwantedItems".
Best used when you don't use DisassembleOverstock; if you do, ensure
the values of Autocrafting are set to 0/0, or it will continuously assemble and disassemble!

DisassembleOverstock
Disassembles everything over the Wanted Stock levels.

Be sure to set up the name of your disassemblers to match the name in the custom data.

6. REFINERY MANAGEMENT
======================

When enabled, the script will analyze all the refinery names and their arguments.

Arguments: +OreName
-OreName
|OreName

Examples:
Refinery +Iron
This will only refine iron, nothing else.

Refinery +Iron +Gold
This will only refine iron and gold.

Refinery +All -Stone
This will refine everything except stone.

Refinery +Magnesium |Uranium
This will refine Magnesium only, if no Magnesium is found, it will refine Uranium only.

Refinery +Silver |All
This will refine Silver only, if no Silver is found, it will refine everything else.
95 Comments
_Dave. 5 May @ 11:04pm 
@Overlord: LCD, read description again
Overlord 25 Apr @ 2:50am 
Hello! I was wondering if someone could explain how to set stock values for autocrafting? I didn't find anything in Custom Data or Config.
TheGaminODST 25 Mar @ 12:45pm 
Is there a way to add ingots to the autocrafting? I have a mod that allows you to assemble a unique resourse via modded assembler, but it classifies as an ingot and would be very useful to be able to autocraft it in mass quantities
Nappel 21 Oct, 2024 @ 10:38am 
Is there a way to show or not show lines on lcd ? for example : i want to show ORE thad i have 0 of it dosent show on the ore lcd (automaticly) but i dont want things like normal grinder or plushies on the autocrafting lcd ..... so a line in custom data like : - plushie or show/not show 0 stats
kinngrimm 5 Sep, 2024 @ 2:05pm 
If you would open up the refinery logicstatements also for other inventories
like for a gatling munition depot, being able to write something like
Manual
NATO_25x184mm=10 -All

for having 10 boxes of munition and disallow any other object to be put in there, also therefor disallowing f.e. Ore overflow, for that one could say +Ore - All

if not too much work or boon on process cycles, then that might be a good addition to make the script more flexible and powerful.
Gigawatts 7 Jun, 2024 @ 6:08pm 
MyObjectBuilder_Component/SteelPlate_t3;MyObjectBuilder_BlueprintDefinition/Plate_t3
MyObjectBuilder_Component/SteelPlate_t2;MyObjectBuilder_BlueprintDefinition/Plate_t2
MyObjectBuilder_AmmoMagazine/SmallRailgunAmmo;MyObjectBuilder_BlueprintDefinition/Sentis_SmallRailgun
MyObjectBuilder_AmmoMagazine/LargeRailgunAmmo;MyObjectBuilder_BlueprintDefinition/LargeRailgunAmmo
Gigawatts 5 Jun, 2024 @ 10:29am 
Не работает
DeltaWing 19 May, 2024 @ 11:02pm 
Greetings, is the source code available anywhere? I would like to add a keyword for manual inventory assignment but without counting the items for autocrafting, such that any items sucked up by manual containers are brought up to quota.
kinngrimm 23 Apr, 2024 @ 3:36pm 
Conceptually still the best IM out there in my books, is it still working with the last/latest DLC(s) ?

After rereading some of the description and seeing the tut vid again, did the script give out a raw
and/or ingot ressource demand to fullfill the quotas/filllevels ("allocate a fixed amount of items in a container:")of cargo containers?
Mythalas 17 Apr, 2024 @ 3:53pm 
The LCD for Autocrafting has no data in it to set the desired values