Space Engineers

Space Engineers

50 ratings
Printer Toner
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
428.011 KB
10 Sep, 2021 @ 1:50pm
25 May, 2022 @ 4:00pm
8 Change Notes ( view )

Subscribe to download
Printer Toner

Description
This script will keep your printer running by using an assembler to ensure that you have a minimum stock level of components. It can display this stock level, including production, on any screens. It will consider any inventories or screens on its own grid, or any sub-grid that is attached by rotors, hinges or pistons.

Installation

Simply copy the script into the Edit area of your programmable block, and enable it.

Configuration

By default, all assemblers and survival kits found might be used by the script. To limit this, you can mark assemblers as being available to the script, and the script will only look at using those. Simply put an empty Printer section into its Custom Data:

[printer]

If you wish to configure a screen to be used by this script, add a Printer section to its Custom Data. You can also configure some of the screen's behaviour:

[printer] display=0 scale=1.0 skip=0 mono=false

All of those options are optional.
  • changing display will cause another screen on the block (such as sci fi button panels, cockpits, etc) to be used. Only one display per block can be configured at present.
  • changing scale will resize the screen elements.
  • setting skip will cause the display to skip over the first n lines, where n is the number you typed in.
  • mono can be true or false. If true, the font will be changed to the Monospace font for displaying numbers.

As of version 1.3, an alternative configuration layout can also be used if you need to configure more than one display on the same block, such as in a cockpit or on a button panel. The [printer] heading is replaced by [printer_display𝑛] where 𝑛 is the screen number.
[printer_display0] scale=1.0 skip=0 mono=false

You can also configure the script itself by adding a Printer section to the Custom Data of the Programmable Block:
[printer] delay=3

Again, the options are optional. The delay option (default 3) configures how frequently the script will check out your inventory. For the fastest operation, set it to 0. This option helps with server load and game performance in general.

Putting this section in place will cause the screen on the Programmable Block to be configured as well. All of the options for a display (see above) are valid. If you do not wish the script to control the display, set display to 2, which is a non-existent screen on the programmable block.

Arguments

If run with the argument rebuild, the script will schedule a complete re-scan of the grid and its sub-grids for changes to inventories and changes to screens. It will also re-save the Custom Data configuration.

Configuring the Components to be built

When first run, and when run with the rebuild argument, the Custom Data section of the Programmable Block will be modified to include a Components section, with any components that were already found in any inventory. If you wish to add other components, simply place one into an inventory, or attempt to assemble one. The Components configuration will by default be set to 0; simply edit the Custom Data and enter the number of components that you wish to have on hand. The script will check this, and will update the assembler and the displays.
43 Comments
Brianetta  [author] 28 Jun, 2023 @ 12:43pm 
Try running the programmable block with the argument: rebuild

This should write any components that have been found since it started running to the Custom Data. It doesn't constantly save changes to Custom Data.

Alternatively, all vanilla components can be added by looking them up here and using the part of the name after the forward slash:
https://github.com/malware-dev/MDK-SE/wiki/Type-Definition-Listing#components

Modded components will be found if they follow the same naming pattern as vanilla components.
Imbaslash 26 Jun, 2023 @ 2:14pm 
Bug report: Only first 26 components are listed in PB custom data but more visible on LCD. In my case I can not configure item quota for Reactors and Medical compontents, since they are at the bottom of the list. I play on the modded server, and there are at least 10 custom components
Imbaslash 20 Jun, 2023 @ 12:35pm 
Feature request: add ability to hide components from LCD. Motivation: on Servers there a lot of custom components that can not be crafted but they are still displayed in Production Quota. One of the options to add "H" identifier next to production quota in CustomData. So it will be something like "Supling=0H"
Brianetta  [author] 20 Jun, 2023 @ 10:32am 
Correct.
Imbaslash 20 Jun, 2023 @ 7:29am 
Ok, I found how to make multiple assemblers works: 1 assembler should have cooperative mode: 0ff, and other should have it on. So items will be scheduled on 1-st assembler, but other assemblers will help
Imbaslash 20 Jun, 2023 @ 7:04am 
I there any way to split job between multiple assemblers? I have 2 assemblers with [printer] in custom data, but whole production quota is scheduled only in the first assembler
Brianetta  [author] 18 Jun, 2023 @ 12:38pm 
It should, if they use the same sort of internal blueprint naming conventions as the vanilla components. If they don't, they won't, and there's not much fixing that.
Abacus 18 Jun, 2023 @ 11:09am 
Will this work tracking mod components that are created by mods like Industrial Overhaul?
AwesomeCronk 27 Mar, 2023 @ 5:14am 
Oh that sucks lol
Brianetta  [author] 23 Mar, 2023 @ 12:06pm 
Ammunition isn't a component. Even vanilla ammunition isn't supported.