Freya Battery Management
Изображение 1 из 2. Материалы автора из Steam Workshop.
О материале
«Freya Battery Management» — материал мастерской Space Engineers. Моды, чертежи кораблей, скрипты и миры для Space Engineers. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
This is obsolete, but fortunately Deeganator has take up the task of updating it! See if you like his version: https://steamcommunity.com/sharedfiles/filedetails/?id=911384087
EDIT: This program is getting pretty old and creaky. Keen has changed a lot of things.
Intended to work with the Powerfix mod, may result in blackouts if you are using default power ordering!
Powerfix mod: https://steamcommunity.com/sharedfiles/filedetails/?id=570484985
This is a simple script that turns your batteries to recharge during the day, and discharge at night. With the powerfix mod in place, this will not result in blackouts and doesn't require any supplimentary power (such as reactors). It avoids the "neutral battery" issues you may have had.
This MAY work in dedicated servers due to 2/11/16's patch. Unverified.
To use: Create a programming block. Put this script inside. Create a timer block. Point it at itself and the programming block, and set it to run every second. Trigger the timer block.
To display output: Create a display named "Freya Display" (caps matter). If the time on the display constantly updates, you're doing it right!
Vehicles: Do not put Freya on vehicles. Put her on the base, she can automatically charge/discharge vehicles as they dock/undock.
If you have batteries on vehicles, put the word "Vehicle" in their name somewhere. Freya will charge them, and only switch them to discharge when you disconnect the vehicle. You may also name solar panels in the same way, and Freya will consider them not part of the station's power grid.
Best practice is to name each vehicle battery completely uniquely, because the only way Freya can detect disconnections is by name. So if you print 3 of the same vehicle with 2 batteries each, there should be 6 unique battery names with "Vehicle" in them.
Note: To detect daytime, Freya simply checks to see if at least 50% of the panels have a max output of 10 kW. If you are using modded panels or are otherwise receiving only a tiny portion of light, this can be modified easily: it's a variable near the top.
Recommendations: Check ownership. The programmable block should have the same owner as all your other blocks. There is currently a bug in Space Engineers which causes programmable blocks to freak out if there's different owners for various blocks on the grid, even if they aren't targeted by the programmable block.
Turn off reactors. They will attempt to charge batteries, which is a waste of uranium.
Remember that batteries have a 20% power tax, meaning that charging a battery with a battery, or with uranium, is not a good idea. You just waste 20% of the power.
You can output to multiple displays if you go into the script and edit the display variable. It's near the top, super easy to see.
Debug: If you still have brownouts, change the code so that the line "double solarThreshold = 10;" uses a higher number, like 50. This will lower your efficiency, but should reduce the brownouts. This should only be required if you're running the ragged edge of not having enough solar power.
This probably won't work on a dedicated server, since the dedicated server does not calculate shadows.
This only works in English, at least until the devs surface more variables.
If you are getting an exception, please tell me your setup. This is a known level load order bug, and I'm trying to work around it, but apparently it sometimes fails. If it happens, hit "edit" and "remember & exit" without changing anything. This will reload the system and it will work fine.
If Freya thinks it is always day, even at night, you are probably experiencing a known bug I call "midnight sun". The server can think solar panels are getting sun even when each client knows they are not. I don't know how to fix this, although the threshold update may have helped.
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.