Space Engineers

Space Engineers

34 ratings
Autokit Assembler
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
594.921 KB
17 Aug, 2021 @ 6:28am
23 Jan, 2024 @ 11:32am
11 Change Notes ( view )

Subscribe to download
Autokit Assembler

Description
The script allows you to automatically save an irreducible stock of necessary components and ammunition on a ship or base. The work requires ingots, one or more assemblers and containers for storing stocks. Easy to install. Allows the production of vanilla and mod components if added to the production list.

Main features

1. production of components using one or more assemblers working in cooperative mode
2. automatic transfer of crafted components from assemblers to designated storage containers
3. verification of the production feasibility of mod components

Example ship: Storm Ghost Light

Required blocks
For the script to work, the following are required:

a) program block
b) assembler
c) container
d) LCD for output (optional)

The installation of the script code into the program block is carried out by subscription in Steam. Scripts must be allowed in the world setting.

Script setting
In the control panel:

1. Add the same Autokit prefix (default) to the names of the main assembler, one or more storage containers, and the LCD display panel (if need). If no assembler is specified, the first one found will be used.

2. Add the !Autokit prefix for assemblers that will not be involved in production. This applies to the Survival Kit, which is also an assembler.

3. Load the script code into the program block from the script library and click OK

4. In the "Custom Data" field of the program block, specify the desired value after the "=" sign for each component that you need

5. Recompile script

Assemblers must be enabled, in a build state, and connected to conveers. The main assembler is involved in production, the rest will be connected to it through the "cooperative mode", but the removal of components into storage containers is done from all assemblers installed on the grid.

List of required components
After the first run of the script, the list will be automatically generated in the "Custom Data" field of the Autokit program block. Just enter the number of components of each type you need. The lower the component is in the list, the faster it gets into the assembly queue. The list in "Custom Data" will be generated based on the list of components in the script code, where you can immediately specify the number of required components. After changing the "Custom Date" field, recompile the script.
Attantion: Do not add non-stackable components to the list, such as oxygen and hydrogen bottles, handle grinders, welders, drills etc.

Display information
The output of the production progress is carried out in the control panel and is duplicated on the LCD panel (if used). The script monitors the presence of ingots and displays "no ingots" if there are not enough of them. Wait a few seconds and if the state of production does not change, then the ingots are definitely over - the script runs with a frequency of about 1.5 seconds. and "no ingots" can appear while ingots are being transferred to assemblers over pipelines. This refresh rate makes the script easy to use on servers.

Adding new components
By default, the settings show the main vanilla components and ammunition. To add new elements to the list, you must first find out its in-game name, and then check the possibility of its production. Not all mod components can be produced - it depends on the mod itself. To add new items to the list, you must:

1. manually produce the desired component in the main assembler and place it in the first slot of the assembler inventory

2. execute the script with the "item" parameter and see what name will appear in the control panel (or LCD-screen)

3. copy the received name into the parameter string and execute the script that will inform you about the possibility of production

If production is possible, then you need to add a new component to the list in the script code and "Custom Data" by analogy with the existing ones.

Element Description Format
In the script code, the element description consists of three parts, separated by a semicolon ";". Here the first part is the in-game name of the components or ammo, the second part is how the item is stored in containers (it is output by the "item" command), and the third is how the item is represented in the assembler queue. When adding a mod element, the second and third parts of the description must match.

You can change the first part of the description as you see fit, including translating the name into another language.

Description of other parameters and settings in the script header. Comments and questions are welcome.
24 Comments
DawnNannas 9 Jun @ 11:49pm 
Solar Cells aren't part of the list, if you want them, add

{ "Solar Cell;SolarCell;SolarCell", 0},

to the list
Survival Ready  [author] 21 Nov, 2024 @ 5:02pm 
I don't know what the reason is for you, but I went through the entire Contact update with this script. Here is a link to a world where it is used against Factorum https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3365228468
RadioActive 7 Oct, 2024 @ 9:24pm 
Unfortunately in the latest version of the game does not work this script, all done according to the instructions
Qotov 1 Sep, 2024 @ 9:15am 
Hello. Nice script, its working fine but not updating LCD panel for some reason and has multiple exceptions during execution. Could you please update the script?
erik 15 Feb, 2024 @ 2:10am 
hello I have a request to make to you would it be possible to make a script for the management of ice stock which can be transferred from a Landa container to an ice container with support on LCD because I cannot find a script
Survival Ready  [author] 11 Feb, 2024 @ 11:23am 
@OGatoAJato, it's in the description:

1. add the same Autokit prefix (default) to the names of the main assembler, one or more storage containers, and the LCD display panel (if need).
OGatoAJato 3 Feb, 2024 @ 9:30am 
How to get the components list cast in a LCD? I can see the list in PB Custom Data, but i want it to be cast in a LCD screen. Using Autokit in LCD name only gives me information about assemblers, containers and production status.
Survival Ready  [author] 21 Jan, 2024 @ 2:46pm 
Thank you @Krougal, I just ran into this problem today. Previously it did not exist, since the production of ammunition is precisely the main function of this script. Apparently, after the Keen update, the disaster is not only with music. By the way, old ammo magazine for the Interior Turret have become available again. I'll probably need to look somewhere around here.
Krougal 28 Dec, 2023 @ 7:10am 
If I try to add any ammo to the quota, I get a "Caught exception during execution of script:Object reference not set to an instance of an object." error. This happens to your published ships as well if you pull enough ammo out of containers for it to trigger. Otherwise it works just fine and seems like a really nice lightweight alternative to TIM or Isy's.
mirrorimage 21 Jul, 2023 @ 7:17am 
You can distinct Assemblers from Survival kit like that:

Echo(block.GetProperty("SpawnName") == null ? "Assembler" : "Survival Kit");