[MOD 0.16] Realistic Reactors

Topics and discussion about specific mods
User avatar
IngoKnieto
Fast Inserter
Fast Inserter
Posts: 106
Joined: Mon Oct 03, 2016 9:29 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by IngoKnieto »

Light wrote:
IngoKnieto wrote:I really like both of these two ideas, because currently you have no reason to operate a reactor above 500 degrees.
I will disagree with this. The blueprint I showed previously uses Bob's Mk2 turbines which require the reactors to reach >900 degrees to maintain 100% load with dozens of Mk2 exchangers. This is greatly pushing the limits of an overheating situation which is why the cooling loop activates above 950 and scram at 980, which isn't a large margin for error should something go wrong. It took many tries to fine tune the system to avoid wasting precious heat through cooling towers or hitting scram too early (wasting precious fuel) but it's a very compact and powerful setup when it's well primed by providing 1.9GW instead of the 1.2GW vanilla limit using the same number of buildings. At 100% load the cooling towers should never have to run if it's balanced perfectly, resulting in a 100% efficient power system that trumps the rest.

A larger scale vanilla build could also use >900 heat for the same effect, despite vanilla games often needing far less power than a heavily modded game. Yet I find that it's worth the effort anyway since you shouldn't waste heat with your cooling towers that could be providing far more power for you, vanilla or otherwise. Losing efficiency by wasting heat makes reactors worse then other power production options if set up quite poorly.

It's pushing that thermal limit without exploding the reactor to obtain every single MW possible that's the fun challenge, even if you don't think you need it. That's what ultimately drew me to this mod.
Right, I forgot about modded heat exchangers and turbines ;) And obviously you have to go above 500 degree depending on the size of the heat pipe network.

But what effect in a larger scale vanilla build do you mean? Four connected reactors (for example) currently always produce 560 MW, it doesn't matter if you run them at 600° or 900° (as long as all connected heat exchanger reach at least 500° of course). So the power output is always the same, or am I seeing something wrong here?
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 402
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by ownlyme »

almost done but the temperature display on the reactor entity always resets to 15° after replacing it...
you got any idea?

todo:
- adding a setting to toggle between special fuel cells and always scaling output
- implementing the check for fuel type or setting active
- localization for all reactor levels
- remove the debug messages that output the reactor temperature before and after replacing

see you tomorrow
Attachments
RealisticReactors_1.0.3.zip
(325.06 KiB) Downloaded 182 times
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance
User avatar
IngoKnieto
Fast Inserter
Fast Inserter
Posts: 106
Joined: Mon Oct 03, 2016 9:29 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by IngoKnieto »

Nice job :)
I love the way you add the 100 reactor entities, I still can't believe I didn't think of this when I first made the mod...

I found a couple of issues with your version:
1. your "reactor bonus formula" in line 540
a) I don't understand it. How exactly are you calculating the bonus level here?
b) it contains a bug, when core temp < 500 it produces a negative output crashing the game
2. The bonus level check only works for connected reactors, a single reactor is not checked.
3. The reactor picture of the 100 added reactors is a little bit off to the south (-> maybe that is a compatibility issue with the SqueakThrough mod)
4. Meltdown doesn't work anymore - when the reactor reaches 1000° the game crashes
I could not reproduce the issue with the temperature display, both the signal and the dispaly on the right side worked for me.

I fixed 1 and 2, see the attached version. Since I didn't understand your calculation I redid the reactor leveling like this:
- a reactor at 500° or below produces 40 MW, that is level 1
- a reactor at 1000° produces 140 MW, that is level 100
- reactor power output is linear between 500° and 1000° following the formula: y = 99/500 * x -98 (where y is the reactor level, and x is the core temperature)
- each connected running reactor adds bonus levels (if the reactor is attached to 3 others, then a level bonus of 25 is added).
So for example a reactor operating at 700° would be level 40, and if it is connected to 3 others, it would get 25 bonus levels to a total of level 65 (producing about 104 MW). That level is currently shown in the neighbour bonus signal.

It probably needs some balancing, but like this it worked for me. Also I didn't notice any perfromance impact (I tested with 10 reactors). Let me know what you think of this solution.


In general I think we need to take care of a few points, before publishing this as a new version.
- Currently this version would break existing save games. If we can, we should avoid this.
- All 100 added reactors need to be added in the SqueakThrough mod, otherwise it'l be incompatible.
- I want to add settings that remove the vanilla reactor and make it possible to disable the check for connected reactors temporarily (see known issues).
- Also blueprinting does not work correctly, the wires to the circuit interface are not included in the blueprint (but I have no idea why).
Attachments
RealisticReactors_1.0.3.zip
(325.41 KiB) Downloaded 168 times
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 402
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by ownlyme »

this is very weird, did you deactivate the old mod?
for me the meltdown worked, (the white cloud that damages you if you are inside it if thats correct? before i only used the explosion tweak :D)

you're right, in the reactor bonus formula i forgot a math.max
math.floor(math.max(0,reactor.core.temperature-500)/5 * (1+reactor_bonus/10) )
i thought the bonus level should have been multiplicative, but maybe your implementation makes more sense.
i think you forgot to apply math.floor on the reactor level for rounding

are you sure it breaks existing games? i tried it with a savegame with a level 1 reactor running and it simply migrated.
(thats why i maintained the old entity names)

i think the wire blueprinting doesnt work because the interface is script-created and the blueprint doesn't place it.

i have an idea for the temperature reset, maybe we can add a heat accumulator under the reactor thats connected to it, with a high heat transfer, while making the reactor heat buffer smaller maybe?
i will try it in 2 hours when im back, i'm currently on the rush sorry :D
see you later
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 402
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by ownlyme »

hmm i tried your version and it seems to explode just normally
but i noticed that we have to calculate the temperature based on 75 levels because i only added 100 entities (you can pass 0 there)
(btw are you a mathematician ? your formulas look very complicated :D)

i'm afraid there is no solution to make the temperature reset smoother, adding a heat pipe with any properties and changing the reactor heat buffer to anything doesn't seem to have any effect on the speed the temperature resets to normal..
the only option i see is replacing the reactors slower, maybe +0.5 seconds is enough, but i'm curious how much heat gets lost by replacing the reactor.
maybe we have to go the other way with periodically refueling the reactor.
i attached the mess i made for testing, if you wanna try it yourself.
Attachments
RealisticReactors_1.0.4.zip
(326.2 KiB) Downloaded 175 times
Last edited by ownlyme on Wed Jul 11, 2018 9:46 pm, edited 2 times in total.
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance
User avatar
IngoKnieto
Fast Inserter
Fast Inserter
Posts: 106
Joined: Mon Oct 03, 2016 9:29 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by IngoKnieto »

Hm, strange, my game crashed on the meltdown, but I didn't copy the error. Also I think you are right - this version shouldn't break existing save games - however it did that for me, but I didn't copy that error either. Anyway, I test that tomorrow again...

The formulas are actually not that complicated. I bet we both learned this in school somewhere around 9th or 10th grade. :)
Here is what I used to refresh my memory (it's in German however...): https://www.youtube.com/watch?v=AqaHHNTWLvk That's really all mathematical knowledge which is in this update.

What exactly are you planning on changing with the internal heat accumulator? What's that supposed to do?
If you make changes please keep in mind that I already started including the settings and fixes mentioned earlier, so keep track of whatever you are changing...
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 402
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by ownlyme »

yeah i didnt really change anything except the reactor level formula

local reactor_temp_level

reactor_temp_level = math.max(0,reactor.core.temperature-500)/20*3 --linear leveling, 500°=lvl 0, 1000°=lvl 75 (500/6.66 = 75)

local reactor_level = math.floor(reactor_temp_level + ((reactor_bonus*25/3)-(25/3)))

(level 0 is valid, in the replacer function theres an explicite check for 0 and -99 (starting)
level 0 is the normal "realistic-reactor" entity without number (because i had to keep that one for savegame compatibility)

i created a request in the modding-interface-requests forum, maybe they will add an api that makes it easier.

maybe they will add something like that, a staff member replied:
"I'd like to request this to be implemented as properties of (a new newly created) LuaHeatEnergySource."
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by Reika »

That cooling tower sprite looks familiar. :P

http://simcity.wikia.com/wiki/Nuclear_p ... #SimCity_4
Image

EDIT: The reactor dome too:
Image


Great as SC4 was/is, and its sprites holding up even today, I do not think it wise to be using assets from a commercial game, especially not one from EA.
Image
User avatar
IngoKnieto
Fast Inserter
Fast Inserter
Posts: 106
Joined: Mon Oct 03, 2016 9:29 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by IngoKnieto »

Damn, this looks a lot like you are right :shock:

I actually didn't know this, I'm just re-using the graphic files from the original reactors mod. Well, I guess I have to look for new building models now, which really is a problem, because I have no clue how to make them myself :(

Or maybe the original mod author got permission from EA to use those sprites. Yeah that sounds ... realistic...
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by Reika »

IngoKnieto wrote:Damn, this looks a lot like you are right :shock:

I actually didn't know this, I'm just re-using the graphic files from the original reactors mod. Well, I guess I have to look for new building models now, which really is a problem, because I have no clue how to make them myself :(

Or maybe the original mod author got permission from EA to use those sprites. Yeah that sounds ... realistic...
I would ask Yuoki; they are good at that, and while their sprites are not quite in the vanilla style, they are nonetheless quality. You could also do what I do and remix and recombine the vanilla Factorio sprites:

Image
Image
Image
Image
User avatar
Sigma1
Fast Inserter
Fast Inserter
Posts: 233
Joined: Mon Nov 21, 2016 5:25 pm
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by Sigma1 »

Here is a cooling tower I just made for you, feel free to use:
cooling-tower.png
cooling-tower.png (37.99 KiB) Viewed 7659 times
Note that it's a bit low-res, will make a high-res one soon

EDIT: High-Res version with slightly fixed shadows:
cooling-tower-hr.png
cooling-tower-hr.png (98.28 KiB) Viewed 7657 times
she/they
User avatar
IngoKnieto
Fast Inserter
Fast Inserter
Posts: 106
Joined: Mon Oct 03, 2016 9:29 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by IngoKnieto »

Wow, thanks! That tower looks really good:
newcoolingtower.png
newcoolingtower.png (778.57 KiB) Viewed 7657 times
I think it even fits better in the Factorio style than the previous one :)
User avatar
IngoKnieto
Fast Inserter
Fast Inserter
Posts: 106
Joined: Mon Oct 03, 2016 9:29 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by IngoKnieto »

With version 1.0.4 I just released a mini update with the new picture of the cooling tower.
The reactor picture is a little bit more difficult, it will be changed in a big update which is already in the making. Probably at the end of August / beginning of September...
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 402
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by ownlyme »

the substructure of the normal resolution tower looks better somehow.
i made images for the reactor and breeder reactor by layering the vanilla reactor onto it.
maybe it's not perfect but i would love to know what you guys think
Attachments
preview.png
preview.png (66.47 KiB) Viewed 7625 times
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance
Saiph300
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Aug 14, 2018 5:20 pm
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by Saiph300 »

If I may say, the thing I don't like with the new sprite is that it doesn't look like "usual" cooling towers :|

Any way to make it white/gray and curved ? (like the ones you get when googling "nuclear reactor cooling tower")
User avatar
Sigma1
Fast Inserter
Fast Inserter
Posts: 233
Joined: Mon Nov 21, 2016 5:25 pm
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by Sigma1 »

ownlyme wrote:the substructure of the normal resolution tower looks better somehow.
I know, I'm not quite sure what is off with the high-res one, but will try to fix it at some point.
ownlyme wrote:i made images for the reactor and breeder reactor by layering the vanilla reactor onto it.
maybe it's not perfect but i would love to know what you guys think
That actually looks pretty nice, it layers surprisingly well.
she/they
User avatar
IngoKnieto
Fast Inserter
Fast Inserter
Posts: 106
Joined: Mon Oct 03, 2016 9:29 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by IngoKnieto »

I think so too, this fits pretty well together...
newmodels.png
newmodels.png (1.25 MiB) Viewed 7613 times
User avatar
Sigma1
Fast Inserter
Fast Inserter
Posts: 233
Joined: Mon Nov 21, 2016 5:25 pm
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by Sigma1 »

I have made some tweaks to the hr-sprite for the tower, now it looks a lot better:
cooling-tower-hr-fix.png
cooling-tower-hr-fix.png (99.78 KiB) Viewed 7601 times
On a side note, guess who remembered to save the original blender file and now only has a 720x720 render of the tower to work with.
she/they
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 402
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by ownlyme »

hmm the first hr version was better i think... (and also sharper)
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance
User avatar
Sigma1
Fast Inserter
Fast Inserter
Posts: 233
Joined: Mon Nov 21, 2016 5:25 pm
Contact:

Re: [MOD 0.16] Realistic Reactors

Post by Sigma1 »

ownlyme wrote:hmm the first hr version was better i think... (and also sharper)
Can you tell what was better in it, other than the sharpness?

Also, this one should be just as sharp.
she/they
Post Reply

Return to “Mods”