Space Engineers

Space Engineers

30 ratings
Vehicle Idle Power Optimiser V2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
5.005 KB
4 Nov, 2019 @ 8:20pm
1 Change Note ( view )

Subscribe to download
Vehicle Idle Power Optimiser V2

Description
In-Game script for Programmable Block

This is an All-In-One version of a few of my previous scripts:
Docking Detector Power Control, Wheel Suspension Power State Controller, O2H2 Generator Control for H2 Engines V3

plus one or two extra small features that fit nicely in with the conglomeration of scripts.

This AIO vehicle idle power optimiser script, is designed to take care of all the annoying little things that need to happen when you enter/exit your vehicle, change battery mode and turning off hydrogen engines (after you exit) when undocking from/docking to a connector, monitor O2/H2 Generators making sure they are not wasting power for no reason like feeding the Hydrogen Engine fuel just to power the O2/H2 Generator to fuel the Hydrogen Engine... etc etc :)

the full description of each feature is best read on the individual script page, yes this sucks, but i type too much, links down below, but for now, here is the top of the script that shows all the user configurable options, the default values that are set, should work nicely for most players, vehicle designs of Rovers and Ships, and situations, but be sure to check all the true's and false's at the configurable top part of the script :)

*** shows the start of the options for the next feature

for non-scripter savvy players, "//" is a one comment line, "/*" is the start with "*/" as the end of a block of comment lines, these are not part of the functional script.
Script must be recompiled if controlled blocks are added/removed/destroyed.

//---------------------------------------------------------------------------------------------------- // Script must be recompiled if controlled blocks are added/removed/destroyed. // ---------------------------------------------------------------------------------------------------- // *** Docking Detector Power Control feature *** /* Control of Hydrogen Engines and Batteries, and the DOCK connector. Name can be set below. Name of connector on other grid to serve as the Dock, script will set batteries to recharge and turn Hydrogen Engines off when a connector on the vehicle is locked to a connector with this name. */ string DockConnectorName = "Connector Vehicle Dock"; /* leave blank to disable feature, if not blank then you also need to choose options below */ // set true or false for controlling battery recharge/auto when docked AND you leave/enter cockpit bool ControlBatteries = true; // Batteries must be set on Auto when script first runs // Batteries switched off at run-time will be ignored (allows for an emergency battery) // set true or false for controlling Hydrogen Engine off/on when docked AND you leave/enter cockpit. bool ControlHydrogenEngines = true; // Hydrogen Engine Blocks must be enabled when script first runs. /*----------------------------------------------------------------------------------------------------*/ // *** Wheel Suspension Power State Controller feature *** // enable control of suspensions on/off state when exiting/entering vehicle control bool ControlSuspensions = true; // also includes handbrake enable on releasing control of vehicle/exiting cockpit. /*----------------------------------------------------------------------------------------------------*/ // *** O2H2 Generator Control for H2 Engines *** // monitor Hydrogen Engines and control O2H2 Generators on/off state when docked, and when h2 engine internal tanks are at certain level bool ControlO2H2gens = true; //if true, you also need to set/change the options below. // set the group names here VVVVVVV in between the double quote marks, ore leave empty for auto-detect string H2engineGroupName = ""; // Hydrogen Engines group, or leave empty for auto-detect and control all of them. string O2H2genGroupName = ""; // O2/H2 Generators group, or leave empty for auto-detect and control all of them. // please note, this script requires/expects o2h2 generators to be enabled before it starts // H2 Engine internal fuel tank percentage to turn O2/H2 Generators OFF, must be no higher than 1.000 double TurnO2H2gensOffAt = 0.99; // default 99% // H2 Engine internal fuel tank percentage to turn O2/H2 Generators ON, must be no higher than 1.000, no lower than 0.000 double TurnO2H2gensOnAt = 0.95; //default 95% /*----------------------------------------------------------------------------------------------------*/

detailed feature instructions...
Docking Detector Power Control
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1792865308

Wheel Suspension Power State Controller
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1782474713

O2H2 Generator Control for H2 Engines V3
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1773899916
2 Comments
Nikolas March  [author] 21 Sep, 2024 @ 9:55pm 
subgrids would need their own PB and script
its been a while since i looked at any of this code
Into 14 Sep, 2024 @ 4:37pm 
Is there a method to include subgrids?