Space Engineers

Space Engineers

评价数不足
Orion Base Management AI - Total Auto
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
364.053 KB
10 月 17 日 下午 9:34
10 月 23 日 下午 7:42
7 项改动说明 ( 查看 )

订阅以下载
Orion Base Management AI - Total Auto

描述
Orion Base Management AI - Total Auto (v28)

Take full control of your base logistics with this comprehensive, autonomous management script! Inspired by robust systems like Isy's Inventory Manager and enhanced with unique features, this script aims to automate the tedious aspects of base management, letting you focus on building and exploring.

---

Core Features:
  • Nanobot Integration: Automatically manages the production queue for Nanobot Build and Repair systems tagged with `[Nano]`.
  • Advanced Inventory Management (IIM Logic): Sorts and balances items across your base using tagged containers (`[ORES]`, `[INGOTS]`, `[COMPONENTS]`, `[AMMO]`, `[BOTTLES]`). Prioritizes filling emptier containers first. Ignores blocks tagged `[IGNORE]`.
  • Smart Refueling: Automatically refuels docked ships (Uranium, Ice, H2 Bottles, Ammo) and base power systems (Reactors, H2 Gens) from designated source containers (`[FUEL-URANIUM]`, `[FUEL-ICE]`). Uses safe batch transfers to prevent draining reserves on large ships.
  • Intelligent Autocrafting: Maintains component stock levels based on quotas set in the `[AutoCraftLCD]`'s Custom Data. Uses configurable margins (`ASSEMBLE_MARGIN_PERCENT`, `DISASSEMBLE_MARGIN_PERCENT`) to prevent micro-crafting. Dynamically assigns assemblers (`[AutoCraft]`) for production or disassembly. Includes blueprint validation (won't queue impossible items) and learning support (`!learn`, `!learnMany`).
  • Smart Refining: Prioritizes refining ores needed for autocrafting, then falls back to a user-defined priority list. Balances ore distribution across refineries.
  • Autonomous Operation: Runs automatically without needing a Timer Block.
  • Automatic Container Configuration: Can automatically assign roles (`[ORES]`, `[INGOTS]`, etc.) and names to untagged cargo containers if needed.
  • Advanced LCD Displays: Provides detailed status updates on multiple LCD panels:
    • `[NanoLCD]`: Overall base status, power, production, storage fill levels, docked ships, and recent logs.
    • `[AutoCraftLCD]`: Detailed component quota status (Stock/Quota, Surplus/Producing). Quotas are set via Custom Data.
    • `[PowerLCD]`: In-depth power statistics (Production vs Consumption, Generation Sources, Battery Status).
    • `[IngotLCD]`: Tracks ingot quotas, current ingot stock, and available ore reserves for each type. Quotas are set via Custom Data.
  • Subgrid Control (Opt-In): By default, only manages the main grid. Can be configured to manage piston/rotor subgrids (`MANAGE_SUBGRIDS` setting) or specific connector-attached subgrids (using the `[AllowManage]` tag on the subgrid's connector).

---

Setup:
1. Load the script into a Programmable Block on your main base grid.
2. Ensure the Programmable Block has ownership set correctly (Me/Nobody).
3. Name your functional blocks using the tags listed in the Configuration section (Part 2) of the script (e.g., `Cargo Container [ORES]`, `Assembler [AutoCraft]`, `LCD Panel [NanoLCD]`).
4. Set up your desired component quotas in the Custom Data of the panel named `[AutoCraftLCD]`. Format: `ItemName=Amount` (e.g., `SteelPlate=50000`).
5. Set up your desired ingot quotas in the Custom Data of the panel named `[IngotLCD]`. Format: `IngotName=Amount` (e.g., `Iron=300000`).
6. Check & Compile the script. It should start running automatically.

---

Configuration:
Key settings are located at the very top of the script:
  • `MANAGE_SUBGRIDS`: Set to `true` to manage inventories on piston/rotor subgrids. Default is `false`.
  • `SUBGRID_ALLOW_TAG`: The tag (default `[AllowManage]`) to put on a subgrid's connector to allow management of that specific connected grid.
  • `ASSEMBLE_MARGIN_PERCENT`: Production starts if stock falls below `Quota * (1 - Margin)`.
  • `DISASSEMBLE_MARGIN_PERCENT`: Disassembly starts if stock exceeds `Quota * (1 + Margin)`.
  • Block Tags: All tags (`[ORES]`, `[Nano]`, etc.) can be changed in the config section.
  • Refining Priority: The `fixedRefiningList` can be reordered.

---

Commands:
Run these commands by entering them into the "Argument" field of the Programmable Block and clicking "Run".
  • `reset_quotas`: Clears all component quotas from the `[AutoCraftLCD]`'s Custom Data.
  • `reset_blueprints`: Clears the script's memory of learned blueprints (requires recompile).

---

Credits & Inspiration:
Original script concept by Zaari.
Inventory, Autocrafting, and Refining logic heavily inspired by and adapted from Isy's Inventory Manager.

---

Please report any bugs or suggestions in the comments below! The script code is entirely in English.
20 条留言
Zaari  [作者] 8 小时以前 
hugums , just name the assembler with !learn then add 100+ of the component you want to learn to production , if it get instantly clear, just try angain, and get the main lcd up so you can see if it already learned it
hugums247 12 小时以前 
No dissemble Johnny 5
Yea won't do that either
And won't see solar power
hugums247 13 小时以前 
Can't get it to learn BP
Bonzaii 15 小时以前 
I subscribed as I am getting annoyed with IIM. Are you planning on adding equivalent of !Special cargo containers? I would like to automatically stock a few medkits, bottles, ammo and tools on my ship before I run on my adventures.
Zaari  [作者] 18 小时以前 
Vorg, i added the tag , i think you will like it! :steamhappy: Tell me if it isnt working!
Hapsiel 20 小时以前 
such a nice script! Thank you for working on it.
Vorg 10 月 23 日 下午 10:52 
Say I don't have the script, maybe don't even know about the script, but am in a faction with someone who does use the script. With Isy and others, If I dock with one of those ships or stations and they didn't flag that port as not to use, then the scrip rampages through my ship.

Instead, require a flag on the connector of the sub grid "allowing" or granting permission. Really need something more complex in case you wanted to allow some but not all. But to keep it simple, require a flag on the sub grid connector granting permission for the script to act withing that subgrid.
Zaari  [作者] 10 月 23 日 下午 7:29 
You mean , you want like a tag that the non pb is connected to have so then it can be managed, otherwise it just works for tha base that pb is connected ?

for now im doing a ~ Manage Subgrid ~ module so you can opt it to not manage subgrids
Vorg 10 月 23 日 下午 12:46 
I noticed there is a separate setting for autocraft and deconstruct, but it is down in the code. Maybe move that up to the setup so to make them easy find setting options.

If you add sub grid support, make it opt-in instead of opt-out. Most scripts be default go out to sub grids unless you put flags on connectors, etc.. I find it annoying connecting to a faction grid or being connected to a faction grid and a script gets turned on that drains my ships cargo because I didn't have some ignore flag on my connector. It's handy to have one script moving stuff around your own grids, but it needs to be off by default.
Vorg 10 月 22 日 上午 12:44 
Looks like autocraft set amount. Would be nice if you could do min/max separately With a blank or other char to say don't diss or don't make, but remove over this much