Space Engineers

Space Engineers

十分な評価がありません
Advanced Power Management
   
アワード
お気に入り
お気に入り
お気に入りから削除
ファイルサイズ
投稿日
更新日
2.312 KB
2015年4月21日 16時05分
2017年4月16日 10時12分
6 項目の変更履歴 ( 表示 )

サブスクライブしてダウンロード
Advanced Power Management

解説
Advanced Power Management script. This uses excess solar and battery power to charge the batteries with the lowest charge on the ship or station. By charging all batteries in parallel you maximise your power throughput. Semi-Auto and random charging scripts do not achieve this.

How the script works:

1) All full batteries are set to discharge
2) The reactor is checked to determine if power is being drawn from it, if so, switch the recharging battery with the highest charge to discharge, repeat until all batteries are discharging, or the reactor is no longer draining
3) The available power output from the solar panels and batteries not recharging are checked, and if the system can tollerate another battery charging without drawing power from the reactor, the battery with the lowest charge is charged. This is repeated until all batteries are charging/charged, or there is no power surplus available.

This cycle is repeated once per block run, so be sure to put the block on a repeat timer, the faster the time, the faster the system will react to power changes.

This script is based off of the power management script by Stiggan and Malakeh, available here: http://steamcommunity.com/sharedfiles/filedetails/?id=368765260, however works drasticly differently.

How to use the script:

1) Add a programming block to your station or large ship
2) Load this script from the workshop
3) Add a timer block with a suitable delay
4) Configure timer block to trigger the programming block, and then itself

That's it, this script will work for any number of panels, reactors, or batteries, on any ship/station size, and across connected grids. This means you can dock a ship, and use the power manager on a station to initiate charging automatically, in either direction.

Verified to work with these mods:

miniBattery by entspeak
Accumulators by Darth Biomech
VonCeed Solar Panelby VonCeed
Advanced Batteries by SpaceNet Engie
http://steamcommunity.com/sharedfiles/filedetails/?id=380067603
72 件のコメント
The Oracle 2021年7月10日 8時59分 
So there is no indication that the script is running. I am new to scripts and using them. I put it in a programable block and put a timer to it. It triggers but it does not look like its doing anything.
Kevin Starwaster 2021年1月26日 16時37分 
I get sometimes you want to use batteries to charge other batteries, especially if you want to shorten the time it takes to recharge.

But you lose energy in the process because there is a penalty when a battery is charged.

To give you an example, take two large grid batteries: Each one has 900 kW hours for a combined 1.8 MW hours. However, if you transfer all of one battery into the other (set one to recharge; the other to discharge) you end up with only 1.6 MW hours. Reverse them so that all the energy flows back into the first battery and you get 1.3 MW hours. That's a pretty substantial loss.
Dragonhost 2019年12月19日 23時08分 
That would be realy nice, if you could do that :)
nictheman123 2019年12月14日 10時25分 
I never did finish getting the turbines working, I am not familiar with how the scripting works and how I would go about finding them. I do have a version that was working last I checked, but it has been several months since I've even opened SE. If you want I can send you a copy of the script in the latest form I have (I use Notepad++ for most of my coding, I am a CS student and they don't allow us to use IDEs very often) so that's up to you
Fozz  [作成者] 2019年12月13日 10時38分 
Would love to see what you come up with Nic, mine was using an existing script with some minor changes to get it functional. As a professional software engineer I struggle with in-game scripting as an IDE and havent gotten a good workspace outside of the game yet which is a big limiter for me
Dragonhost 2019年9月5日 5時37分 
@nictheman123 , where you able to finish your rework? I'm rally interested to see you version.
nictheman123 2019年3月30日 1時50分 
Okay, since I never got a response from Fozz and I found myself bored this week, I have decided to take on refactoring this code myself. It was quite a mess format wise, but I have cleaned that up and am now working on reducing redundancy while keeping the script working. I am also adding the ability to keep batteries outside the system using tags in the block names, which I believe to be working.

After I have all of that, I will try and add turbine support, and then reupload the full thing to the workshop myself, with credit to all the relevant scripters of course.

I'm currently abroad and my thoughts are bouncing between about 12 different things at any given time, so it might take a while, but it is in the works now. Anyone with questions or anyone with coding experience who wants to help, shoot me a dm.
Scruffy 2019年3月18日 4時05分 
Does this support turbines? need turbine suport, can i add it?
jackik 2018年8月10日 15時36分 
If there is no response, could you upload your version of it yourself?
nictheman123 2018年3月23日 19時20分 
UPDATE: I ended up having that solution break just now and had to add that line to a few other places in the code as well. Fozz, if you want, send me a message and I will give you my latest copy of the code and explain what I've done to it.