Space Engineers

Space Engineers

79 ratings
(broken) AUTUMN Ship AI Core V1.2.28
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
14.299 KB
21 Feb, 2015 @ 3:54pm
23 Mar, 2015 @ 6:41am
24 Change Notes ( view )

Subscribe to download
(broken) AUTUMN Ship AI Core V1.2.28

In 1 collection by a
FUCKING EVERYTHING
606 items
Description
Always felt a little alone on your huge ship? Need a companion to take care of all the systems for you and let you do the flying?
Look no further! AUTUMN will assist you in managing almost every aspect of your ship or base.

===============================
I've been working on a new version with much much more robust variable updating and such.. but currently I simply can't finish it because Keen's programming block API is just broken, entirely, I can't use most of the OOP features that I -really- need to build what I want, so I guess the project is kind of stalled until then......

Things that are broken that I need for the AI to work:
-Projectors don't update unless they're opened in control panel
-enums{} (cause crash)
-Lists of custom objects (e.g new List<MyClass>) (cause crash)
-Using the same member name throughout a script multiple times (e.g "void Main(){} class Test{ void Main(){}}" just won't compile) This is the main issue.
-INCOMPLETE and barely usable or just unusable API: LCD panels (image API broken), reactors, batteries, solar panels, etc (only way to get power values is by parsing the .DetailedInfo string which is by far the foremost reason for 'script execution halted')...

I could go on for a while actually. I really hope they fix it all so I can continue my work. The project is exciting, but impossible to implement in the programming block in its current state. The current update should be mostly bug-free, albeit flimsy perhaps.
===========================================





Install the new Screens Module on a separate programming block to get improved Core performance as well as brand new screens, and the ability to create your own easily! More info here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=398337947

NOW WITH 100% MORE NAME
AUTUMN, or Artificial User Transmutation and Ubiquitous Management Network


Workshop broken for you?
Use the github link to get the latest version straight from the source! See bottom for more info.

Want to discuss something? have ideas? bugs? Leave a comment or reply to this thread: http://forums.keenswh.com/post/modular-shipstation-management-ai-core-modules-thread-7327230


CURRENT Features (Working, or work in progress):
-Very extensive status screen with possibility to upgrade to multiple screen types (uses LCD panels)
-WIP Power management that (will) manage every block that consumes or produces power, function varies per block; e.g antenna and beacon range are increased when there's power available, and decreased when there's power being drained from the batteries. This will be extended to support every power consuming/producing block.
-WIP Alert system (code Blue, Orange and Red alerts, sound on speakers, flash lights, displays, etc)
-Modular; Turn on and off systems as you please to create your own customized AI fit for your wishes!
-Extensible; Add AI Modules on separate programming blocks for added functionality!
-Very extensive documentation and debugging tools, programmers hack away! (or cry blood, I know it's not the prettiest code :P)

For a changelog with much more info, see the 'change notes' next to the screenshots or the commit log on github!

PLANNED Features (not necessarily in next version, but work is in progress):
-new Power management subsystem, written from scratch to support batteries, capacitors, solarpanels, reactors and connectors as powersource/powerdrain. (planned for 1.3)
-Alert light support (like speakers, _blue, _orange, _red)
-Alert Timer block support, like speakers, allowing you to trigger any amount of extra events.
-Detect difference between own ship, and connected ships through connectors etc (with ability to toggle between managing/not managing those). currently it indiscriminately controls every block it can find in the same grid.
-Inventory management and enumeration for Screens module
-Configuration Module, to change runtime parameters without having to recompile all the time. (thought of a system that uses a series of lights as 'buffer' in order to give button input to a programming block, the API doesn't natively allow this)
-As soon as Keen fixes the LCD panel API, add Icon panel support. Right now I can only add images to the list of images it iterates over when activated. Nothing else. I can't even remove images from that list again, so the list will just grow and grow until the game starts lagging, let alone just set an image. #JustEarlyAccessThings



HOW TO USE
1) install AI on a programming block
2) create an LCD panel named 'ai_storage'. This is needed for persistent cross-block variables and internal things.
3) create one or more LCD panels that end with "_status". AI will automatically write status screen to those panels. Make sure that 'Show text on screen' is set to 'Public' in order to actually see things. Also note that LCD panels are buggy and don't always update right now.
4) set up constant timer: create a timer block => set interval to 3-8s => set actions to run programming block, and run timer block itself.
5) Start timer block. AI should now be managing everything for you!

Optional steps for added features:
6) create speakers that end with _blue, _orange and _red. These speakers will be used to play alarms on when the AI reaches certain alert states (e.g blue, orange or red).
7) create a panel named 'debugpanel' to get information about the AI as it works, and diagnose any issues.

Getting the Screens Module working:
8) install https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=398337947 on a programming block
9) add it to the timer block
10) make sure ownership etc is set correctly.
11) Done! The Core will automatically disable and offload parts of itself to the Screens Module

>Make sure that ownership of all blocks to be managed is set to the user. "Nobody" doesn't work, the API doesn't allow me to access anything.

>At the top of the script there's a few constants you can change, that will affect some basic things like the ship name it shows on the status panels.

>At the very bottom of the file there's the void Main(), you can remove parts (e.g manageRefineries()) as you please to enable/disable modules of the AI.

For more info, see the thread on the KeenSWH Forums: http://forums.keenswh.com/post/modular-shipstation-management-ai-core-modules-thread-7327230


F.A.Q:
Q: Why can't it handle more than ~120 devices per category?
A: this is because I have to intensively parse text for every block due to Space engineers not having the proper APIs in place to retrieve the values as integers/floats. I'm currently parsing the DetailedInfo field for every block (the same text as in the control panel). Early access yay.

Q: This is not Artificial Intelligence.
A: http://en.wikipedia.org/wiki/Artificial_intelligence "[..]an intelligent agent is a system that perceives its environment and takes actions that maximize its chances of success."

PASTEBIN/GITHUB LINK
Source is available at: http://pastebin.com/ULkqUqAS v1.2.25 [OLD]
Github link to latest source: https://raw.githubusercontent.com/xarinatan/AUTUMN-Space-Engineers-Ship-AI/master/ShipAI%20Core.cs
NOTE: The source on Github includes the boilerplate code for Visual Studio. Only copy the parts inside the CodeEditor region into the programming block.

I recommend using Visual Studio 2012 /2013 for syntax highlighting. (there's a free version that only requires registration, just google for 'express edition' or 'community edition')
See http://www.reddit.com/r/spaceengineers/comments/2r1j1q/scripting_in_visual_studio/ for a tutorial on getting syntax highlighting to work with Space Engineer's Mod API classes/namespaces.
You can also just use Notepad++ if you don't need intellisense and autocomplete but just want basic syntax recognition.
216 Comments
a  [author] 15 Oct, 2023 @ 3:44am 
https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=3051379460 I uploaded the new version here, it's not done but it should at least function. Let me know if you run into problems
a  [author] 14 Oct, 2023 @ 7:28am 
I made a new script based on the previous output, it doesn't have much AI features yet, but it'll display the status of your ship just like before: https://steamhost.cn/steamcommunity_com/id/dergnz/screenshot/2142082896954214928/

thinking of what to do with it next, thinking of giving the script a bit of personality, but I'm not entirely sure how yet, previously AUTUMN had the ability to drive some lights that reflected the 'mood' of the AI, which was then indirectly based on the amount of problems, with the intention of extending it with more random moods and perhaps ability to decide doing things and what not, but I never really knew if that was even desired by the people using it.

Right now it's basically a status script, which isn't bad, just less relevant than it used to be with the existence of stuff like MMaster's configurable LCDs (when I first made AUTUMN that didn't exist yet).
[LC] Kayn de Lunaris 14 Aug, 2021 @ 6:53pm 
we'll always have in your AI :>
a  [author] 13 Aug, 2021 @ 11:10pm 
Alright, well, Space engineers seems to run rather smoothly with proton, and I found someone who made an example for VSCode that I could use to develop the script with perhaps, I'll give it a try! Thank you all for your faith in me <3
H3792 13 Aug, 2021 @ 9:16pm 
I look forward to seeing what you do with this!
a  [author] 13 Aug, 2021 @ 1:45pm 
I'm still tempted to give it another try, but I'm afraid it'll be underwhelming because I have a rather busy full time job now, and additionally I run Linux everywhere now which makes running visual studio for development of the script hard as far as I know. I could give that a try some time but.. well, I can't promise an update soon for now.
Thank you for your interest though! I do have some ideas I was working out at the time that could make a fun automated and sort of quirky personality for your machines and ships, but again it would take some time to build from scratch.
a  [author] 13 Aug, 2021 @ 1:44pm 
oh wow, I almost forgot I still had this online! hmm..
It would require a rewrite from scratch, I built this when space engineers was just getting its first mod API and ability to run C# code. It was probably one of the first if not the first status displays that existed. The mod API has had quite a few complete overhauls since then so basically everything will be broken.
These days there's a lot of alternatives that didn't exist back then, such as MMaster's LCDs and some other HUD and LCD mods, combined with inventory manager scripts and so forth.
[LC] Kayn de Lunaris 9 Aug, 2021 @ 6:11am 
Status :)?
a  [author] 18 May, 2018 @ 2:32pm 
a  [author] 18 May, 2018 @ 2:16pm 
I haven't worked on it for a long time, or played much space engineers since. I've been waiting for especially the mod API to be more finished, but it seems that Keen is slowing down the development of space engineers even though it's still in early access phase, and I haven't seen an update from them in months.. :steamsalty:

I had a little status display script going a few years ago that was to be the next 2.0 at some point but with more mod API breakages and shortages I stopped developing that too. You can get it here if you want to give it a try, but I don't know if it works and it's not much more than basic display of energy + tank storage (click 'raw' to get a copypasteable version for ingame)