Space Engineers

Space Engineers

评价数不足
Systems Manager
   
奖励
收藏
已收藏
取消收藏
标签: other_script
文件大小
发表于
更新日期
425.250 KB
2022 年 12 月 10 日 上午 6:43
2023 年 3 月 17 日 下午 6:26
5 项改动说明 ( 查看 )

订阅以下载
Systems Manager

描述
Systems Manager helps reduce your workload, particularly for docking and basic airlocks.

All configuration is done from the Programmable Block's custom data.

If you change the configuration, click the Recompile button (or run the block with updateconfig).

The custom data will be populated with default values and those are described at the top of the Programmable block.

I hope to improve this description and documentation a bit, but I use this script on nearly every ship I build. Especially for docking and airlock management.

Commands (run the programmable block with these values)
* dock -- triggers docking actions, see configuration below
* undock -- triggers undocking actions
* updateconfig -- re-reads the configuration

Docking Management
When configured with a docking port, the "dock" and "undock" commands can be configured to handle:
* Connecting
* Disabling/enabling inertial dampeners
* Setting batteries to auto or recharge
* Setting tanks to stockpile
* Turning on or off other block groups on dock / undock

Set an action on your hotbar to run the programmable block with "dock" and a 2nd with "undock".

If the connector is able to connect, then the other actions (such as dampeners and battery management) will take place. This makes it safe, you can repeatedly run "dock" and nothing bad will happen unlike using a timer block and toggling groups.

Hydrogen Management
You can let Systems Manager enable and disable O2/H2 generators and H2 Engines if you want. It will disable the O2/H2 generators if the H2 or O2 tanks are filled past cutoffs and can enable or disable H2 engines based on battery power or ship overload. It can even optionally try to use O2 vents to determine if there is low pressure and run the O2/H2 generators.

The hydrogen management is not foolproof unfortunately. I use it on some ships and not on others, but it can be convenient and I already wrote it :D

Airlock Management
Group doors can be treated as simple airlocks. Only one door may be open at a time, and Systems Manager will close doors after a configurable time.

In the custom data configuration, group_name=delay (in seconds).

For doors that are in the group, opening a door will lock the other doors, then after the delay, the doors will close and then all the doors will be unlocked. If you manually close the door before the delay, all of the doors will unlock.

If the "autodetect" line is present, then Systems Manager will look for groups of doors with the word "Airlock" in the group name and treat them as an airlock using the delay specified. For example, autodetect=1 will automatically try to find airlocks and set their delay to 1 second.

Mirror Management
This is a simple on/off state mirror.

block_name=group_name

Whatever the on/off state of block_name is, the blocks in group_name will also be set to. For example, if you want some lights to be on whenever your reactor is, this makes that easy -- reactor_name=light_group_name

Misc Section
Mostly this is so you can have a display of what Systems Manager is doing if you would like. Set a block name and the particular LCD display number.
10 条留言
erik 2023 年 3 月 20 日 下午 10:36 
hello could you make a script for the hydrogen filling rate and ice stock because the scripts that I find no longer work thank you in advance
erik 2023 年 3 月 20 日 下午 10:35 
bonjour pourriez vous faire un script pour le taux de remplissage hydrogène et stock de glace car les scripts que je trouve ne fonctionnent plus merci d'avance
kinngrimm 2023 年 3 月 19 日 下午 5:30 
ok thx
cjb  [作者] 2023 年 3 月 19 日 下午 12:07 
Anything can run the script (I run it on bases to manage O2 generators, Hydrogen engines and airlocks) but it is not a carrier script. It only acts on blocks on the same grid as the PB.
kinngrimm 2023 年 3 月 18 日 上午 4:31 
can this be a centralized script on a carrier/station PG or does every drone and ship need a PG with this script?
kinngrimm 2023 年 3 月 17 日 下午 8:16 
ok nice. not all of my ships do rotor docking, but i was about to switch over to it complettly. One needs to be careful with it, but after figuring out f.e. that inertia dampners need to be off when rotor docking, or one shouldn't mix large and small grids with rotors, then one has a stable docking solution. More so even as current server admin told me that having more than 3 ships connected to each other via connectors is heavily influencing server performance and also can end up teleporting my ships away from their position twiching violently(happened on yet another server with a carrier of ours).
cjb  [作者] 2023 年 3 月 17 日 下午 6:29 
In fact supporting stockpiling was easy enough I just added that in.

Update your script and in the [docking] section, add "ManageTanks=true" and tanks will change their stockpile setting when they dock.

Obviously not everyone will want that, so the default is false.
cjb  [作者] 2023 年 3 月 17 日 下午 6:11 
Hi kinngrimm; most of what you describe is exactly what the script does.

It doesn't support rotor docking, but otherwise you would just configure the "docking" section in the Custom Data




- ManageBatteries set to true if you want the batteries to be set to recharge when docking
- ManageDampers set to true if you want inertial dampers to be disabled when docking (this means thrusters & gyros do not fight the parent ship)
- DockingPort -- just the name of the connector to use

The EnableOn* and DisableOn* settings take a group name, so if you have a group of things to enable or disable, just group them together and put it on the matching line.

Once you have your settings configured, Recompile the script (or run it with updateconfig).

When you dock or undock, it will only take the actions if it successfully docked or undocked.

Supporting H2/O2 tank stockpile (forcing them to fill) is a good idea; I'll see about adding that some time.
kinngrimm 2023 年 3 月 17 日 下午 5:33 
At times i have a whole toolbar just for things that need to be deactivated and powered down when connecting to a grid. That then also not nessearily just via connectors, but rotors.
to name some additionals to your list
- deaktivating gyros so they do not counteract the carrier ships gyros
- powering down lights, thrusters to safe power and H2
- o2/h2 generators which can be a performance drag and the carrier has those anyways

on the other hand what needs to be activated is
- charging of batteries
- refueling H2 and O2 tanks (forced fill up ? not sure the correct translation here)

That then all ofcause reveresed when undocking.
cjb  [作者] 2022 年 12 月 10 日 下午 12:58 
Minor update so that Airlock groups on other grids are not listed as auto detected (the script didn't control them anyway; it was just misleading).

Also set the default automatic airlock delay to 0.5 seconds instead of 0 seconds