Jump to content

[1.12.5] Automatic Lab Housekeeper: Transmit Lab Science Home automatically


Recommended Posts

Tired of constantly having to manage data for mobile labs on stations you have flying around? Automatic Lab Housekeeper is for you.
Let's set the stage, you have a few space stations in Kerbin's SOI, a ship currently in orbit around Duna, waiting for a transfer window back, and a ship currently on its way to Eeloo.
Each of them has a mobile lab on-board, turning data into science. The transfer to Eeloo takes at least another three years and you can't wait to finally go explore it, but hang on.
With your labs eventually filling up with science, you gotta stop warping every X amount of days, transmit science home and fill the lab back up with data you have stored.
Using more efficient modded labs and well-seasoned scientists, that amount of days can easily go below 10. That does not sound fun, and I don't think I have to tell you that it isn't.

When warping (or not), every chosen amount of in-game days, Automatic Lab Housekeeper will check any loaded or unloaded vessels for labs it might have on-board, transmit its science back home, and fill up its data whenever there's space.

As this mod checks for the Science Lab module instead of part names, its functionality shouldn't have an issue with mods that add new science lab parts into the game (like Nertea's Stockalike Station Parts Expansion).

In detail, the mod does the following:

  1. In Flight Mode: Checks loaded and unloaded vessels every chosen amount of in-game days, regardless of time-warp
    In Tracking Station & Space Center: Checks unloaded vessels every chosen amount of in-game days, regardless of time-warp
     
  2. Looks for module ModuleScienceLab on-board vessels
     
  3. For loaded vessels: Checks if there is science >= 1 on-board. If there is science, it transfers it (as whole numbers, leaving the rest in the lab) to R&D
    For unloaded vessels: Using the module ModuleScienceConverter and part cfg data, simulates how much science has been created since the last update, if science has accumulated, transfers it to R&D
     
  4. Checks if an ExperimentStorageUnit has been selected for this lab. If so, calculates data size for all experiments and checks if any or all of them fit into the Lab, if so, pulls data into lab.


WHEN FIRST INSTALLING THE MOD, ALL DESIRED LABS HAVE TO BE LOADED AT LEAST ONCE (this is because ModuleManager only applies changes to part configs and not unloaded vessels)
 

Example of what receiving science looks like:

YRQocgV.jpeg

The settings for in-game intervals and enabling of AutomaticLabHousekeeper can be performed through the game difficulty settings menu

9JToMBu.jpeg

For each loaded Lab, a Part Action Window exists, in which the automatic transmission and automatic data pulling can be changed individually

BRJ22c7.jpeg

When pressing the "Select Experiment Storage Unit" Button, a Part containing module ModuleScienceContainer may be selected from which experiment data will be pulled

Ol1aIkd.jpeg

 

This mod is currently localized in English and German

Dependencies
ModuleManager

Considered for future implementation are (in order of priority):
Implementation of Strategia's scientist experience level enhancements
Checking if unloaded vessel has an established CommNet connection to home.
Checking if unloaded vessel has enough electricity on-board.
Adding a tab into game difficulty settings that includes CommNet and electricity settings

Download
via CKAN
Spacedock

Installation
Simply merge the downloaded zip with the GameData folder

Source
GitHub

License
MIT

Known Issues

  • When using Strategia's Scientist Focus, the enhanced Scientist Experience isn't considered in the background simulation of science
  • When first installing mod, all labs have to be loaded once for AutomaticLabHousekeeper to implement its module (could be changed with injection in the future, risky approach however)
  • When trying to report a new issue, please enable debug mode in game difficulty -> AutomaticLabHousekeeper settings and provide KSP.log


This is my first mod, so I hope you'll like it. Naturally there might still be some additional issues.

Edited by ScienceDaemon
mod added to CKAN
Link to comment
Share on other sites

Happy to announce the following changes have been added in the newest versions:

alpha-1.1.1

  • Added Localization (currently en_us and de_de)
  • Added settings menu in game settings
  • Added ability to turn ALH on and off globally
  • Added customizability for in-game days interval
  • Added debug mode (for detailed debug messages)

alpha-1.2

  • Added Part Action Window Tab to labs for Automatic Lab Housekeeper
  • Added new Module for all parts containing ModuleScienceLab, containing Automatic Lab Housekeeper settings
  • Added description into lab parts in VAB/SPH
  • Added dependency on ModuleManager
  • Added Automatic Data Pulling for loaded and unloaded vessels

alpha-1.2.1

  • Fixed incorrect data calculation issue (data calculation for data pulling resulted in lower values than in-game)

beta-1.0

  • Fixed incorrect science accumulation simulation for unloaded vessels
  • Fixed issue that ALH sometimes takes a while to start Transmission/Data-Pulling Routine when previously having loaded a quicksave
  • Fixed incorrect initialization during scene change and quickload

1.0.0

  • Added version file for CKAN
  • Mod has been added to CKAN
Edited by ScienceDaemon
update for 1.0.0
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...