Space Engineers

Space Engineers

评价数不足
LydianLights Inventory Manager (Multiplayer Friendly)
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
35.064 KB
2020 年 2 月 9 日 下午 6:51
1 项改动说明 ( 查看 )

订阅以下载
LydianLights Inventory Manager (Multiplayer Friendly)

描述
Overview
This is an inventory and production management script for Space Engineers. It allows you to automatically sort your storage systems in an easily configurable way, set production goals to automate assembly of components from raw materials, and output inventory and production information to LCD displays.


Features
  • Automatically sort items with configurable filters and priorities
  • Lock containers on the grid to completely excluded them from the sorting system
  • Push/pull items from the following container types: cargo containers, connectors, H2/O2 tanks, assemblers, and refineries
  • Easily manage automatic production through a master list of production goals
  • High focus on performance -- i.e. minimal impact to multiplayer servers
  • Output customizable information to LCD displays
  • All configuration managed through block Custom Data


Quickstart
Add the script to your grid, and add Custom Data to your blocks to configure them.
Containers
[InventoryManager] Items=<item selector> Priority=<number> Locked=<true/false>
Displays
[InventoryManager] Mode=<Inventory/Production> Title=<display name> Items=<item selector> Page=<number> Widescreen=<true/false>
Assemblers
[InventoryManager] Automate=<true/false>
Production Queue
On the programmable block, set the following:
[InventoryManager] list of items with the following format: <item id>=<amount to produce> <item 2 id>=<amount to produce> . . .


Basic Setup
Just put the script on a programmable block on your grid and it will start running automatically. To configure a container to receive specific items, you'll need to add some configuration tags to that container's Custom Data in the terminal (as shown below):

Click Custom Data here:


Which will open a text box like this:


For containers, the Custom Data can contain these fields:
[InventoryManager] Items=Ore Priority=1 Locked=true

[InventoryManager] is a required header used to designate options managed by this script.

Items can be either an item category (Ore, Ingots, Components, etc), a comma-separated list of component ids (SteelPlate, IronOre, PlatinumIngot, etc), or an asterisk (*) to designate all items. More on the specifics of this later.

Priority is optional, and can be any number greater than 0. Containers with a lower priority number will fill before those with a higher number.

Locked is optional, and if set to true will prevent the script from modifying the contents of this container.


As soon as you add these tags to a container on your grid, it will start to automatically pull the designated items to it from all other containers on the grid connected to it by the conveyor system, while following a few rules:
  • It will not pull from higher-priority containers (with 1 being maximum priority)
  • it will not pull from containers with Locked=true
  • If two containers want the same item and have the same priority, the container with a more-specific filter will get the item (i.e. "SteelPlates" is more specific than "Components" is more specific than "*"). This makes it simpler to set up dump containers that take any excess items not sorted elsewhere.

Please also note that for performance reasons, any changes you make to Custom Data can take as long as 10 seconds for the script to notice and update.


Setting Up Automated Production
Automated production requires two things:
  1. Setting up a list of production goals
  2. Designating which assemblers are allowed to be managed by the script

Setting an assembler to automated mode is as easy as adding the following to its Custom Data
[InventoryManager] Automate=true
Note that an assembler in automated mode will have its production queue fully controlled by the script. It will not allow the player to add or remove items. If you need manual control of the assembler again, just set Automate=false.

To set up a list of production goals, you need to edit the Custom Data of the programmable block that the script is running on. To easily generate a configuration template that you can fill in, click the Run button on the programmable block (shown below). Note that clicking Run will overwrite any previous data you may have entered.

Click Run on the programmable block:


This will generate Custom Data that looks like this:


After doing that, just fill in the quotas you would like to meet, and delete any items you don't want to automate. Note that the order you list the items in will determine the order the items are queued up in the assembler.


Setting Up Displays
Displays can be tagged with Custom Data in the following format:
[InventoryManager] Mode=Inventory Title=Ore Stockpile Items=Ores Page=1 Widescreen=true

Mode should be set to either "Inventory" or "Production". When set to "Inventory", the display will show a configurable list of items and your current stockpile. When set to "Production" the display will show your configured production goals and the progress made towards completing them. Defaults to "Inventory" when not set.

Title sets the text shown at the top of the display. Optional.

Items uses the same item filtering rules as containers to only show certain items on the display. More info on valid values below. Does nothing in "Production" mode.

Page allows you to combine multiple displays for lists that are too long to show on one display. Defaults to 1 if not set.

Widescreen should be set to true for Widescreen LCD blocks, otherwise leave it false. Defaults to false if not set.


Item Filters
When setting the Items field on containers or displays, there are a few different ways to select items.

Match All Items
Items=*
This will match all items, and is useful for creating dump containers to hold any items not collected by other containers.

Match a Category
Items=Ores
These types of filters will match a specific category of items, and will probably be the filter type you use the most (if you're like me at least). Valid values are as follows:
  • Ore
  • Ingots
  • Components
  • Tools
  • Ammo

Match an Item ID
Items=SteelPlate
These types of filters are for matching specific items. The ID is based on internal names used by the game logic though, so they aren't always obvious. This is the name that gets output to displays managed by the script, which can be a useful way to find the ID of an item. A non exhaustive list of some examples:

Ore
  • Stone
  • IronOre
  • SiliconOre
  • NickelOre
  • CobaltOre
  • SilverOre
  • GoldOre
  • UraniumOre
  • MagnesiumOre
  • PlatinumOre

Ingots
  • Gravel
  • IronIngot
  • SiliconIngot
  • NickelIngot
  • CobaltIngot
  • SilverIngot
  • GoldIngot
  • UraniumIngot
  • Magnesium
  • PlatinumIngot

Components
  • BulletproofGlass
  • Canvas
  • Computer
  • ConstructionComp
  • DetectorComp
  • Display
  • Explosives
  • Girder
  • GravityComp
  • InteriorPlate
  • LargeSteelTube
  • MedicalComp
  • MetalGrid
  • Motor
  • PowerCell
  • RadioCommComp
  • ReactorComp
  • SmallSteelTube
  • SolarCell
  • SteelPlate
  • Superconductor
  • ThrusterComp
3 条留言
mazrados 2022 年 8 月 20 日 上午 8:01 
Is it possible to set needed amount for items?
dnvm84 2021 年 5 月 16 日 下午 12:56 
Hello,
First let me compliment you on a well done script.
I would like to ask a question/suggestion. Is it possible to add the ability to block certain items from a cargo container?
Example: I would like to have a container that holds my ore, but I don't want ice to be added to this specific container.

Thank you.
Niiro 2021 年 5 月 10 日 上午 3:24 
I'm getting a "Script execution terminated, script is too complex. Please edit and rebuild script." error.
It worked before, but this is what always displays