Mod name: RealisticReactors
Version: 2.0.0
Factorio version: 0.16.x
Authors: IngoKnieto, OwnlyMe
Download from mod portal: https://mods.factorio.com/mods/Ingo/RealisticReactors
Source code: https://github.com/IngoKnieto/factorio- ... c-reactors (outdated)
Special thanks go to GotLag for his original Reactors mod, which this mod is based on, and also a big thanks to Sigma1 for providing the new awesome picture for the cooling tower.
Feedback is welcome, if you have any idea how to improve this mod, or if you find any bugs, please let us know here.
Short description
------------------------------------------------------------------------------------------------
This mod adds a nuclear reactor, a breeder reactor and a cooling tower. The normal reactor has a high power output, the breeder reactor has a medium power output, but produces bonus materials (i.e. extra empty fuel cells).
Both reactors power output and fuel efficiency is dynamic depending on the temperature they are operating on, and also depending on the setup of your plant.
The reactors need to be controlled with signals via the integrated circuit interface, and they need to be cooled over their Emergency Core Cooling System (ECCS), otherwise they might get too hot causing a reactor core melt down.
The cooling tower is used to cool down hot water or steam coming from the ECCS or other parts of the plant.
To start a nuclear reactor, you need to insert fuel cells and send the Start Control Signal to the circuit interface. The reactor is now producing heat at a certain efficiency (->see the two corresponding signals on the circuit interface).
To stop the nuclear process, either let the reactor run out of fuel cells, or send the Scram Control Signal to the interface.
Be aware that the scram process takes some time and the reactor will still produce heat until it is fully stopped.
Both reactors power output and fuel efficiency is dynamic depending on the temperature they are operating on, and also depending on the setup of your plant.
The reactors need to be controlled with signals via the integrated circuit interface, and they need to be cooled over their Emergency Core Cooling System (ECCS), otherwise they might get too hot causing a reactor core melt down.
The cooling tower is used to cool down hot water or steam coming from the ECCS or other parts of the plant.
To start a nuclear reactor, you need to insert fuel cells and send the Start Control Signal to the circuit interface. The reactor is now producing heat at a certain efficiency (->see the two corresponding signals on the circuit interface).
To stop the nuclear process, either let the reactor run out of fuel cells, or send the Scram Control Signal to the interface.
Be aware that the scram process takes some time and the reactor will still produce heat until it is fully stopped.
Long description
------------------------------------------------------------------------------------------------
The nuclear reactor consists of three elements: the reactor core, the circuit interface and the Emergency Core Cooling System (ECCS):
The reactor core is the part, where the nuclear reaction is happening. You need to attach the heat pipes to any of its heat pipe connections (see the flame symbols when you mouse-over it). You can click the reactor core to open it and insert the uranium fuel cells, or right-click it to remove the reactor (only possible when the reactor is in the stopped state).
The circuit interface is the part, where you can interact with the reactor. It outputs all important information as signals (see below for details on the signals). You need to send the control signals here, if you want to make the reactor change its state.
In the ECCS water is used to cool down the reactor core. Simply attach pipes to any of the four pipe connections (one pipe for incoming water, one for outgoing water), and if you pump cold water into the reactor, it will reduce the core temperature, and come out as hot water.
Please note: if you use inserter to feed or collect fuels cells to/from the reactor, they don't necessarily need to reach the 2x3 tile box of the reactor core, they also work if they can reach the circuit interface or ECCS.
Reactor signals
Reactor core temperature
This is the current temperature of the reactor core. Don't let it reach 999°
Reactor power output
This is the current power output in MW. It depends on the core temperature and other factors.
Reactor efficiency
The current fuel efficiency in percent. It depends on the core temperature and other factors.
Breeder bonus cell production
This is the amount of bonus empty fuel cells, the breeder reactor produces. It depends on the core temperature and other factors. It only applies to the breeder reactor.
Internal accumulator charge
This is the charge level in percent of the internal accumulator of the reactor. The reactor will consume it's needed electrical power from it.
ECCS fluid amount
The amount of fluid in the ECCS.
The reactor bonus level
This is the current bonus level of the reactor. It depends on the number of other connected running reactors.
The reactor content
These signals show the number of fuel cells and empty fuel cells in the reactor.
The current reactor state
The reactor will always report its current state in one of these four signals. See below for more details to the states.
Control Signal Start
This is one of the two control signals. Send it to the circuit interface of the reactor and it will start.
Control Signal Scram
This is the other control signal. Send it to the circuit interface of the reactor and it will go into the scramed state.
If you send control signals to the reactor, make sure to send them for more that 60 ticks (1 second), as the reactor state update function runs only once per second. So a one-tick-signal is not enough.
Reactor states and how to operate it
Stopped
This is the state when you build the reactor. There is no nuclear reaction happening, and the reactor core will slowly cool down to the environment temperature. In this state the reactor has a minimal electric energy consumption of 200 KW to power the circuit interface. This is the only state, in which you can remove the reactor from the map.
To start the reactor, you need to insert a fuel cell and send the Starting Control Signal to the circuit interface.
Starting
During the starting phase, the reactor will consume an increased amount of electric power (3600 KW). If it's not properly supplied from the electric grid, the start will interrupt. The starting phase lasts 30 seconds, after that the reactor automatically switches in the running state. You can see the current duration in the Starting State signal, it will count down from 30 to 0.
If you need to stop the reactor in this state, send the Scram Control Signal to the circuit interface (it will override the Start Control Signal in case you still send that too).
Running
In this state, the reactor is producing power at a certain efficiency depending on it's temperature.
When the current fuel cell is empty, and there is another full fuel cell in the reactor core, this state will continue, otherwise the reactor will switch to the stopped state. In this phase the boni (output and efficiency) from the bonus level are applied.
If you need to stop the reactor while it is still burning a fuel cell, send the Scram Control Signal to the circuit interface.
Scramed
If you put a reactor in this state by sending the Scram Control Signal, it will slowly power down while still producing decay heat.
The scram phase lasts 120 seconds (or until the current fuel cell burnt out), you can see the current duration in the Scram State signal.
Reactor Bonus Level (a.k.a. neighbour bonus)
The base game neighbour bonus system is not applied on the realistic reactors. Instead the mod will calculate, to how many other reactors a reactor is connected by heat pipes, and if these reactors are running, a bonus will be applied to all of these reactors.
The current bonus level of a reactor is displayed in the reactor bonus level signal . A reactor will always be level one, it can get to a maximum of level 4 when three other reactors are connected and running.
The reactor core is the part, where the nuclear reaction is happening. You need to attach the heat pipes to any of its heat pipe connections (see the flame symbols when you mouse-over it). You can click the reactor core to open it and insert the uranium fuel cells, or right-click it to remove the reactor (only possible when the reactor is in the stopped state).
The circuit interface is the part, where you can interact with the reactor. It outputs all important information as signals (see below for details on the signals). You need to send the control signals here, if you want to make the reactor change its state.
In the ECCS water is used to cool down the reactor core. Simply attach pipes to any of the four pipe connections (one pipe for incoming water, one for outgoing water), and if you pump cold water into the reactor, it will reduce the core temperature, and come out as hot water.
Please note: if you use inserter to feed or collect fuels cells to/from the reactor, they don't necessarily need to reach the 2x3 tile box of the reactor core, they also work if they can reach the circuit interface or ECCS.
Reactor signals
Reactor core temperature
This is the current temperature of the reactor core. Don't let it reach 999°
Reactor power output
This is the current power output in MW. It depends on the core temperature and other factors.
Reactor efficiency
The current fuel efficiency in percent. It depends on the core temperature and other factors.
Breeder bonus cell production
This is the amount of bonus empty fuel cells, the breeder reactor produces. It depends on the core temperature and other factors. It only applies to the breeder reactor.
Internal accumulator charge
This is the charge level in percent of the internal accumulator of the reactor. The reactor will consume it's needed electrical power from it.
ECCS fluid amount
The amount of fluid in the ECCS.
The reactor bonus level
This is the current bonus level of the reactor. It depends on the number of other connected running reactors.
The reactor content
These signals show the number of fuel cells and empty fuel cells in the reactor.
The current reactor state
The reactor will always report its current state in one of these four signals. See below for more details to the states.
Control Signal Start
This is one of the two control signals. Send it to the circuit interface of the reactor and it will start.
Control Signal Scram
This is the other control signal. Send it to the circuit interface of the reactor and it will go into the scramed state.
If you send control signals to the reactor, make sure to send them for more that 60 ticks (1 second), as the reactor state update function runs only once per second. So a one-tick-signal is not enough.
Reactor states and how to operate it
Stopped
This is the state when you build the reactor. There is no nuclear reaction happening, and the reactor core will slowly cool down to the environment temperature. In this state the reactor has a minimal electric energy consumption of 200 KW to power the circuit interface. This is the only state, in which you can remove the reactor from the map.
To start the reactor, you need to insert a fuel cell and send the Starting Control Signal to the circuit interface.
Starting
During the starting phase, the reactor will consume an increased amount of electric power (3600 KW). If it's not properly supplied from the electric grid, the start will interrupt. The starting phase lasts 30 seconds, after that the reactor automatically switches in the running state. You can see the current duration in the Starting State signal, it will count down from 30 to 0.
If you need to stop the reactor in this state, send the Scram Control Signal to the circuit interface (it will override the Start Control Signal in case you still send that too).
Running
In this state, the reactor is producing power at a certain efficiency depending on it's temperature.
When the current fuel cell is empty, and there is another full fuel cell in the reactor core, this state will continue, otherwise the reactor will switch to the stopped state. In this phase the boni (output and efficiency) from the bonus level are applied.
If you need to stop the reactor while it is still burning a fuel cell, send the Scram Control Signal to the circuit interface.
Scramed
If you put a reactor in this state by sending the Scram Control Signal, it will slowly power down while still producing decay heat.
The scram phase lasts 120 seconds (or until the current fuel cell burnt out), you can see the current duration in the Scram State signal.
Reactor Bonus Level (a.k.a. neighbour bonus)
The base game neighbour bonus system is not applied on the realistic reactors. Instead the mod will calculate, to how many other reactors a reactor is connected by heat pipes, and if these reactors are running, a bonus will be applied to all of these reactors.
The current bonus level of a reactor is displayed in the reactor bonus level signal . A reactor will always be level one, it can get to a maximum of level 4 when three other reactors are connected and running.
Details about the dynamic power output and fuel efficiency
------------------------------------------------------------------------------------------------
The reactor will produce power (=heat) with a certain fuel efficiency depending on its temperature and the reactor bonus level.
There are two modes how this is calculated: Ingo's formulas and Ownly's formulas. You can change this in the settings, by default Ownly's formulas will be used.
Ownlys formulas
In short: the hotter, the better. Power output and efficiency rises with higher temperatures.
Each kind of fuel cell has it's own behaviour and every mod's fuel cell has a different breeder curve to keep the recycling balanced. See the chart below.
Each neighbour additionally adds 1% to the output.
Ingos formulas
With Ingo's calculations, power output rises linear depending on the reactor core temperature, additionally there is a power bonus for every neighbour reactor. Fuel efficiency also rises, but has a certain maximum depending on temperature and the number of neighbour reactors, after which decreases again.
That means that depending on your reactor setup, there is a certain temperature above which the power output will still increase, but the efficiency will drop quickly, which means you will waste fuel cells.
Here you can see the behaviour for the four possible reactor setups (single reactor, reactor with one neighbour, etc.):
In the mod folder you'll find an ODS-file with more details.
As you can see, a single reactor will start producing 40 MW power at 500° while having 100% fuel efficiency. With increasing reactor core temperature, both power (the dark blue line) and efficiency (the red line, at the start hidden behind the brown line) will increase. At 620° the single reactor has it's maximum efficiency of 200% while outputting 47 MW of power. And while power output still increases above 620°, the efficiency will constantly drop up to a minimum capped at 50% starting at 800°. That means a single reactor operating at 800° will output 70 MW, but you will waste half of your fuel cells.
The temperature points with the maximum efficiency increase with each connected reactor (up to a maximum of three). That leads to four temperatures for the four possible reactor setups, at which you'll have a maximum output while not wasting fuel:
Temperature MW/Reactor MW total
Single reactor 620 47 47
Reactor w. 1 NB 740 62 124
Reactor w. 2 NB 860 78 234
Reactor w. 3 NB 1000 123 492
(As you can see this is loosely based on the outputs of the vanilla reactor with it's different neighbour boni. That was the idea behind this behaviour.)
There are two modes how this is calculated: Ingo's formulas and Ownly's formulas. You can change this in the settings, by default Ownly's formulas will be used.
Ownlys formulas
In short: the hotter, the better. Power output and efficiency rises with higher temperatures.
Each kind of fuel cell has it's own behaviour and every mod's fuel cell has a different breeder curve to keep the recycling balanced. See the chart below.
Each neighbour additionally adds 1% to the output.
Ingos formulas
With Ingo's calculations, power output rises linear depending on the reactor core temperature, additionally there is a power bonus for every neighbour reactor. Fuel efficiency also rises, but has a certain maximum depending on temperature and the number of neighbour reactors, after which decreases again.
That means that depending on your reactor setup, there is a certain temperature above which the power output will still increase, but the efficiency will drop quickly, which means you will waste fuel cells.
Here you can see the behaviour for the four possible reactor setups (single reactor, reactor with one neighbour, etc.):
In the mod folder you'll find an ODS-file with more details.
As you can see, a single reactor will start producing 40 MW power at 500° while having 100% fuel efficiency. With increasing reactor core temperature, both power (the dark blue line) and efficiency (the red line, at the start hidden behind the brown line) will increase. At 620° the single reactor has it's maximum efficiency of 200% while outputting 47 MW of power. And while power output still increases above 620°, the efficiency will constantly drop up to a minimum capped at 50% starting at 800°. That means a single reactor operating at 800° will output 70 MW, but you will waste half of your fuel cells.
The temperature points with the maximum efficiency increase with each connected reactor (up to a maximum of three). That leads to four temperatures for the four possible reactor setups, at which you'll have a maximum output while not wasting fuel:
Temperature MW/Reactor MW total
Single reactor 620 47 47
Reactor w. 1 NB 740 62 124
Reactor w. 2 NB 860 78 234
Reactor w. 3 NB 1000 123 492
(As you can see this is loosely based on the outputs of the vanilla reactor with it's different neighbour boni. That was the idea behind this behaviour.)
Details about the core meltdown
------------------------------------------------------------------------------------------------
Depending on the settings (-> the meltdown related settings are all in the Startup-Settings) one or all of the following horrible events will happen, when your reactor reaches 1000° or is destroyed otherwise.
To be honest we're kinda proud of this, so please promise us to cause the meltdown at least once
Reactor explosion
The reactor core will explode (duh) leaving behind a ruin.
If you choose the (absolutely-unrealistic-but-apparently-everybody-wants-it) atomic meltdown explosion, buildings (and players...) around the reactor will be destroyed.
Radiation and fallout
The reactor ruin will constantly produce radiation. For a certain time it will also emit radioactive clouds, which will move over the map affected by the wind, radiating the area around it.
The radiation from the clouds will disappears after a while, but the radiation around the reactor ruin will stay.
Radiated areas are indicated by a geiger counter sound, you can also make the radiation visible in the settings. If you move in a radiated area, you will be damaged.
How do you stop the radiation?
Well, you do what they are doing in Chernobyl: you build a huge sarcophagus out of concrete and steel over the reactor ruin. Then the radiation will slowly decay, and after 30.000 years you can use the area again (or maybe it's a few minutes ^^).
You can remove the sarcophagus building after some time - you see that on its health bar.
An exploded reactor ruin producing radioactive clouds:
A sarcophagus build over a reactor ruin:
PS: This is just an intermediate model for the sarcophagus. We can't really do good graphics - if you can make us a really cool looking one, we'll appreciate it
To be honest we're kinda proud of this, so please promise us to cause the meltdown at least once
Reactor explosion
The reactor core will explode (duh) leaving behind a ruin.
If you choose the (absolutely-unrealistic-but-apparently-everybody-wants-it) atomic meltdown explosion, buildings (and players...) around the reactor will be destroyed.
Radiation and fallout
The reactor ruin will constantly produce radiation. For a certain time it will also emit radioactive clouds, which will move over the map affected by the wind, radiating the area around it.
The radiation from the clouds will disappears after a while, but the radiation around the reactor ruin will stay.
Radiated areas are indicated by a geiger counter sound, you can also make the radiation visible in the settings. If you move in a radiated area, you will be damaged.
How do you stop the radiation?
Well, you do what they are doing in Chernobyl: you build a huge sarcophagus out of concrete and steel over the reactor ruin. Then the radiation will slowly decay, and after 30.000 years you can use the area again (or maybe it's a few minutes ^^).
You can remove the sarcophagus building after some time - you see that on its health bar.
An exploded reactor ruin producing radioactive clouds:
A sarcophagus build over a reactor ruin:
PS: This is just an intermediate model for the sarcophagus. We can't really do good graphics - if you can make us a really cool looking one, we'll appreciate it
Known issues
------------------------------------------------------------------------------------------------
1. The flame symbols on the east side of the reactor are a bit of to the left.
- This is just a graphical problem, please ignore it, the heat pipe connection work.
- These lags are not random, they occur when the mod checks, which reactors are connected by heat pipes. This process starts 10 seconds, after you build or remove a heat pipe or a reactor. It will only run once, that means if you place two heat pipes it will start 10 seconds after you placed the second pipe.
You can disable the process in the mod settings ("disable reactor neighbour check"). Then you need to start it manually by writing "connect reactors" in the console (as admin).
Version history
version 2.0.3 (2018-10-19)
- Added radiation damage for non-vanilla characters
- Initial fallout radius now depends on the fallout duration to match the radius when radiation has to be respawned 6 times
- Default neighbour check delay is now 45 ticks
- fixed a bug where deconstructing an entity request slot with the deconstruction planer crashed the game
(as reported by Speadge and Mortico)
- fixed a bug where a reactor runnig out of fuel would crash the game
(as reported by hatifur)
- fixed a problem with dynamic cooling
version 2.0.2 (2018-09-25)
- forgot to include the russian localization by pnv25
version 2.0.1 (2018-09-25)
- reactors can now be started and scramed with the status button in the gui
- ownly's formulas: fixed 2 of the plutonium cells being treated as mox, increased maximum efficiency a bit
- ingo's formulas: balanced the bonus cell output of the breeder reactor for modded fuel cells
- optimized the neighbour check even more (now there should be no lagspikes at all)
- fixed the position of the flames on the reactor's heatpipes
- small bugfixes
- added support for RealisticReactors - Utilities
version 2.0.0 (2018-09-21)
***MAJOR UPDATE***
- added breeder reactors that output additional used fuel cells
- reactor stats (power output and efficiency) are now dynamic, depending on temperature and (as before) neighbours
- reactor start and scram phase are now dynamic
- added gui for monitoring (click on the interface)
- added electric interface (energy consumption by starting phase, cooling and interface)
- new graphics for reactors and cooling tower
- added working lights
- added blueprint functionality (you need a constant combinator to build the interface)
- added a variety of configuration options
- added more meltdown options (mushroom cloud, permanent radiation, reactor ruins, sarcophagus)
- added fallout and radiation damage system (better armor protects better from radiation damage)
- improved fallout clouds
- fallout causes pollution and increases the evolution factor
- optimized calculation of neighbours
- fixed lagspikes, only processing a few reactors every tick
- various performance optimizations
- realistic reactor glow color, ruins glow too
version 1.0.5 (2018-08-15)
- fixed error with hr version of the cooling tower
version 1.0.4 (2018-08-14)
- replaced the picture of the cooling tower
version 1.0.3 (2018-02-18)
- fixed incompatibility with Factorio 0.16.24 (fluid box check).
version 1.0.2 (2018-01-17)
- fixed incompatibility with Angels mods (angelpetrochem).
Important note: this update will brake savegames with version 1.0.1, see this post for a workaround: viewtopic.php?f=93&t=56621#p335700
version 1.0.1 (2018-01-15)
- compatibility with nuclear fuel cells from other mods added
version 1.0.0 (2018-01-14)
- initial release
- Added radiation damage for non-vanilla characters
- Initial fallout radius now depends on the fallout duration to match the radius when radiation has to be respawned 6 times
- Default neighbour check delay is now 45 ticks
- fixed a bug where deconstructing an entity request slot with the deconstruction planer crashed the game
(as reported by Speadge and Mortico)
- fixed a bug where a reactor runnig out of fuel would crash the game
(as reported by hatifur)
- fixed a problem with dynamic cooling
version 2.0.2 (2018-09-25)
- forgot to include the russian localization by pnv25
version 2.0.1 (2018-09-25)
- reactors can now be started and scramed with the status button in the gui
- ownly's formulas: fixed 2 of the plutonium cells being treated as mox, increased maximum efficiency a bit
- ingo's formulas: balanced the bonus cell output of the breeder reactor for modded fuel cells
- optimized the neighbour check even more (now there should be no lagspikes at all)
- fixed the position of the flames on the reactor's heatpipes
- small bugfixes
- added support for RealisticReactors - Utilities
version 2.0.0 (2018-09-21)
***MAJOR UPDATE***
- added breeder reactors that output additional used fuel cells
- reactor stats (power output and efficiency) are now dynamic, depending on temperature and (as before) neighbours
- reactor start and scram phase are now dynamic
- added gui for monitoring (click on the interface)
- added electric interface (energy consumption by starting phase, cooling and interface)
- new graphics for reactors and cooling tower
- added working lights
- added blueprint functionality (you need a constant combinator to build the interface)
- added a variety of configuration options
- added more meltdown options (mushroom cloud, permanent radiation, reactor ruins, sarcophagus)
- added fallout and radiation damage system (better armor protects better from radiation damage)
- improved fallout clouds
- fallout causes pollution and increases the evolution factor
- optimized calculation of neighbours
- fixed lagspikes, only processing a few reactors every tick
- various performance optimizations
- realistic reactor glow color, ruins glow too
version 1.0.5 (2018-08-15)
- fixed error with hr version of the cooling tower
version 1.0.4 (2018-08-14)
- replaced the picture of the cooling tower
version 1.0.3 (2018-02-18)
- fixed incompatibility with Factorio 0.16.24 (fluid box check).
version 1.0.2 (2018-01-17)
- fixed incompatibility with Angels mods (angelpetrochem).
Important note: this update will brake savegames with version 1.0.1, see this post for a workaround: viewtopic.php?f=93&t=56621#p335700
version 1.0.1 (2018-01-15)
- compatibility with nuclear fuel cells from other mods added
version 1.0.0 (2018-01-14)
- initial release