Stationeers

Stationeers

32 ratings
[F&S] Emergency Power System
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
17.783 KB
28 Mar, 2019 @ 1:23pm
26 May, 2022 @ 11:04am
7 Change Notes ( view )

Subscribe to download
[F&S] Emergency Power System

In 1 collection by 123
[F&S] Advanced Devices
14 items
Description
Description
Automaticaly turn on a generator(s)(Solid/Gas) when there is a low energy in batteries.
Supports unlimited generators.

Turns on generator(s) if charge less then 5%.
Turns off generator(s) if charge more then 50%.

Requirements
  1. 1 IC Housing.
  2. 1 Integrated Circuit (IC10).
  3. 1 Solid Fuel Generator or Gas Fuel Generator (Supports only one type per system)
  4. 1 Stationary Battery (or/and) Stationary Battery Large.

IC ports description
Port
Device
D0
Generator
D1
Alert. (Optional not required. Turns on the Flashing Light/Klaxon Speaker/Any device)

Chip states
State
Description
0
All fine, normal discharge
1
Charge
2
Overload
3
No Battery(s)
4
No Generator(s)

Changeable values in IC code
define MinPercentage 0.05 # 5% define MaxPercentage 0.5 # 50% # 1.0 = 100%

Note
If you need more than 100kW, separate the power lines and connect a separate emergency power system to each line
You can mix different types of batteries.
You can connect an unlimited number of generators, but only one type.
Overload - means that energy production is less than consumption.
Percentage is calculated individually for each type of battery. (It is normal for some batteries to run out completely. But charging will go until all batteries are filled to the desired percentage.)

Game version support
0.2.3920.18842 06/04/2023
12 Comments
theoshuff 13 Oct, 2024 @ 3:03am 
Please can someone copy and paste the script into the comments / description
i'm experiencing a bug where none of the codes are showing in the source code library
Selrahc 23 Aug, 2024 @ 11:08pm 
Anyone know why the Alert just turns off anything in the Alert port? I know this is an older code and maybe the issue, just cant figure out where I would look to see why where it might be wrong. Thanks in advance for any help.
Z3RO 24 Apr, 2023 @ 11:12am 
Ah yes, I understand :) Thank you for your coding skills and making the game infinitely more fun to play!
123  [author] 18 Apr, 2023 @ 11:55am 
@Z3RO
Do not place IC10 between blocks, there, the code may not work correctly inside the IC10. Now I did not see this bug, it was in previous versions of game.

Another reason may be stack damage, when the code is abnormal interrupted, the stack corrupts, and the subsequent launch can lead to a malfunction of ic10, you just need to rebuild the ic10 housing. 128 lines of code is not enough, need to make sacrifices :) Because stack management will take up almost half of the memory.
Z3RO 18 Apr, 2023 @ 11:02am 
Apologies, I mean't to update, must've just been a game bug because moving it to a different housing in on a different block worked out eventually,
123  [author] 9 Apr, 2023 @ 8:34am 
Tested on 0.2.3920.18842 06/04/2023
@Z3RO update a game
Z3RO 14 Feb, 2023 @ 7:04pm 
Was working fine but out of nowhere in the middle of a session it stopped and IDK how to get it working again. Deconstructed IC housing, generator, flashed IC again and again. Any ideas?
123  [author] 26 May, 2022 @ 11:06am 
Fixed
Nuker1110 30 Dec, 2020 @ 11:24pm 
For using multiple generators, you could point the output screw at a single Batch Writer and have all the target generators share a data line with the BW output.
letmeout 13 Jul, 2020 @ 11:59am 
does this work with the engine generators?