[0.14] Reactors & Atomic Locomotives

Topics and discussion about specific mods
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.14] Reactors

Post by Optera »

AlphaLima wrote:Awesome. Although it looks like this and Nuclar are not compatible if you have researched Nuclar first. Nuclar has fuel reprossessing first and it appears i cant get it to work with Reactors. The Reactors repro shows researched but it dosent show up in the factory menus. On a new game it work fine even with both installed, as long as Reactors is used first.
You either need to clean save (remove nucular - save - uninstall nucular and install reactors - load) or use a merged mod with migration scripts.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.14] Reactors

Post by Optera »

Thanks for fixing the vanishing items in 1.3.0.
It's better, but still seems glitched to me. Crafting suddenly pops from current progress to basically 0 when a reactor is not under load. That's free energy if you somehow time it right.
Your comment suggests crafting_progress was intended to be slowed down not reset.

I suggest using a mix of the cubes for uranium, depleted uranium and cylinders for fuel, depleted fuel and maybe something entirely different for plutonium.
The ore color is very close to iron and Bob's Zinc in appearance. A greenish color would make it easier distinguishable.
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.14] Reactors

Post by GotLag »

What's the duration on the reactor recipes in your game? In my testing a reactor's crafting progress still chuffs along without load, albeit slowly.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.14] Reactors

Post by Optera »

For me they seem to snap back to 0.001 and stay there until there's load again.
I modified your calculation a bit to get them to slow down according to load, but always keep their crafting progress.

Code: Select all

CRAFTING_INCREMENT = 1 / 120 / UPDATES_PER_SECOND


reactor.progress = reactor.progress or 0
local progress_delta = math.max((reactor.entity.crafting_progress - reactor.progress) * (reactor.power / MAX_POWER), CRAFTING_INCREMENT) --slow down crafting progress at low throttle
reactor.entity.crafting_progress = reactor.entity.crafting_progress + progress_delta 
reactor.progress = reactor.entity.crafting_progress
Correct me if I'm wrong, crafting_progress is the progress in % not the progress increment right?
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.14] Reactors

Post by GotLag »

The reactor recipes (fission and breeder) should last 10 seconds, not 120. I'm curious as to why yours haven't automatically updated.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.14] Reactors

Post by Optera »

Since I migrated from Nucular I forked version 1.1.1.
I wrote a migration script to rename items, added Nucular's weapons and steam turbine. I also made your reactor interfaces report their inventories so I can only make them craft on demand.

When updating to Reactors 1.3.0/1.3.1 I kept the longer durations as they seemed more realistic, while updating all other changes.
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.14] Reactors

Post by GotLag »

Optera wrote:It's better, but still seems glitched to me. Crafting suddenly pops from current progress to basically 0 when a reactor is not under load. That's free energy if you somehow time it right.
Your comment suggests crafting_progress was intended to be slowed down not reset.
Optera wrote:Since I migrated from Nucular I forked version 1.1.1.
I wrote a migration script to rename items, added Nucular's weapons and steam turbine. I also made your reactor interfaces report their inventories so I can only make them craft on demand.

When updating to Reactors 1.3.0/1.3.1 I kept the longer durations as they seemed more realistic, while updating all other changes.
Next time please tell me you've altered the mod before I waste time searching for a problem that doesn't exist.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.14] Reactors

Post by Optera »

Sorry for that.
Removing and rebuilding all reactors somehow fixed it for me.
User avatar
Philip017
Filter Inserter
Filter Inserter
Posts: 360
Joined: Thu Sep 01, 2016 11:21 pm
Contact:

Re: [0.14] Reactors

Post by Philip017 »

i have been running this mod a few days and it took me several hours to get it figured out how to run it and keep it running and i enjoyed the challenge, i did not build it like you did, but i absolutely had to get your flow control mod, i suggest that you make it a dependency

a friend of mine also wanted to try it but it wouldn't run for him and i tried some of his mods and narrowed it down to Yuoki Industries mod causing the conflict
https://mods.factorio.com/mods/YuokiTani/Yuoki
when combined with Angels Infinite ores
https://mods.factorio.com/mods/Arch666A ... finiteores

the error when starting the game:
"Path __Nucular__/graphics/icons/uranium-ore-icon.png does not match any mod."

looks like angels mod is calling for functions triggered by yuoki mods presence.
bug report for angel
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.14] Reactors

Post by GotLag »

Looks like it's got the icon path hard-coded instead of pulling it from the item/entity definition.

I didn't want to make Reactors explicitly dependent on Flow Control, as other mods can also add pumps, but I see your point. I'll add dependency in the next release.
ghoti
Burner Inserter
Burner Inserter
Posts: 15
Joined: Thu Apr 24, 2014 5:40 pm
Contact:

Re: [0.14] Reactors

Post by ghoti »

GotLag. Do you have a repo to accept pull requests? I have two changes I've tested out that I like.

1. I've swapped out your reactions icon group for this one (I made it, it's yours if you want it or not): Image

2. I see you were planning to add a throttle signal. I think reactors are more interesting when you are the one controlling the throttle, rather than it being automatic. So I implemented it.

The power output of the plant gradually moves to the throttle on the circuit network. from 0-100. It defaults at 0, so by default a reactor will throttle up to 20% or 60%.
It's pretty easy to just use a constant combinator to pin it to 100.
pinning with a constant
regulating based on temperature with one arithmetic and constant combinator
red or green wire or both. It adds them like normal.

zip with both changes attached.
Attachments
Reactors_manualControl.zip
(336.87 KiB) Downloaded 171 times
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.14] Reactors

Post by GotLag »

ghoti wrote:GotLag. Do you have a repo to accept pull requests? I have two changes I've tested out that I like.

1. I've swapped out your reactions icon group for this one (I made it, it's yours if you want it or not): Image
Ooh, nice. Much better than the shitty abstract atom icon I threw together.
ghoti wrote:2. I see you were planning to add a throttle signal. I think reactors are more interesting when you are the one controlling the throttle, rather than it being automatic. So I implemented it.
I'll have a look at what you've done here. I initially planned for active control but shelved that when I realised the API doesn't provide any means of measuring power consumption/demand other than making woefully inaccurate guesses based on accumulator charge. Or measuring the reactor's own output, in which case it may as well do the throttle-setting itself - the first iteration calculated momentary power consumption each update and set the throttle target to that value, before I settled on using temperature as a target.
ghoti
Burner Inserter
Burner Inserter
Posts: 15
Joined: Thu Apr 24, 2014 5:40 pm
Contact:

Re: [0.14] Reactors

Post by ghoti »

I felt compelled to make this change because I figured I could make a control using combinators that read the temperature and accumulators to make a better control than the default one you had, even with the woefully inaccurate guesses. To be honest, I think engineering is more interesting when the sensors you have arn't telling you directly about the thing you are measuring.

OH. BTW.

I found an exploit!

You can vent the reactors temperature faster than you should be able to by deliberately under filling the reactor. The problem is the heat transfer isn't accounting for the mass of fluid.

Here's a refactor that accounts for that:

Code: Select all

  if fluid and fluid.amount > 1 then -- equalize heat between fluid and reactor core, with fluid capped at 100 degrees
    local TRANSFER_RATE = 0.05
    local reactor_energy = reactor.core_temp * REACTOR_MASS
    local fluid_energy = fluid.amount * fluid.temperature
    local total_energy = reactor_energy + fluid_energy
    local avg_temp = total_energy / (REACTOR_MASS + fluid.amount)
    local target_fluid_energy = avg_temp * fluid.amount
    local max_fluid_energy = 100 * fluid.amount
    local after_fluid_energy = math.min(fluid_energy + (target_fluid_energy - fluid_energy) * TRANSFER_RATE, max_fluid_energy) 
    local energy_transfer = after_fluid_energy - fluid_energy
    local after_reactor_energy = reactor_energy - energy_transfer * TICKS_PER_UPDATE -- this is how much energy it takes to apply to the fluid for this many ticks
    reactor.fluid_temp = after_fluid_energy/fluid.amount
    reactor.core_temp = after_reactor_energy/REACTOR_MASS

    reactor.signals.parameters[4] = reactor.signals.parameters[4] or {signal={type="fluid", name=fluid.type}, index=4}
    reactor.signals.parameters[4].count = round(fluid.amount)
This change makes the reactors power output match up with the constants you specified. 5.5 MW at mimimum power, and 27.5 MW at maximum

Here's some comparisons: http://imgur.com/a/Zhe5c
User avatar
Philip017
Filter Inserter
Filter Inserter
Posts: 360
Joined: Thu Sep 01, 2016 11:21 pm
Contact:

Re: [0.14] Reactors

Post by Philip017 »

thought i would share something interesting i discovered playing with your reactors mod,

with just your turbines it can output 25.5MW at full power and still have some headroom, so i decided to experiment...

my max output i could achieve was 28.9MW, admitably not at full temp, it ran for a short period above that, but settled down at this when being driven to this maximum draw i placed on it.

i started the reaction with some boilers and the AquiferDrill

hope you enjoy
Attachments
reactor setup.jpg
reactor setup.jpg (314.29 KiB) Viewed 8736 times
reactor output.jpg
reactor output.jpg (103.73 KiB) Viewed 8736 times
ghoti
Burner Inserter
Burner Inserter
Posts: 15
Joined: Thu Apr 24, 2014 5:40 pm
Contact:

Re: [0.14] Reactors

Post by ghoti »

Ah nice. Yah if you stuff the reactor with water using express pumps rather than underfilling it, you can get more production. I manged to get 29.2 MW with 4 express pumps. Recalculation fixes it for this scenario as well.
User avatar
Philip017
Filter Inserter
Filter Inserter
Posts: 360
Joined: Thu Sep 01, 2016 11:21 pm
Contact:

Re: [0.14] Reactors

Post by Philip017 »

ghoti wrote:Ah nice. Yah if you stuff the reactor with water using express pumps rather than underfilling it, you can get more production. I manged to get 29.2 MW with 4 express pumps. Recalculation fixes it for this scenario as well.
i got 29.2MW for a short period until the reactor temp dropped below 100, it settled down at 97, 96 with 28.9MW
ghoti
Burner Inserter
Burner Inserter
Posts: 15
Joined: Thu Apr 24, 2014 5:40 pm
Contact:

Re: [0.14] Reactors

Post by ghoti »

well, yah, if you have the setup first then the reactor will heat up and can produce more power than it can sustain.

This setup seems to reach equilibrium at 29.3 though: http://imgur.com/a/jUBlw

I think the difference here is I manged to get 426 units of water in the reactor, rather than 421.
NastyEbilPiwate
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Oct 08, 2016 9:53 pm
Contact:

Re: [0.14] Reactors

Post by NastyEbilPiwate »

What's the optimal ratio of reactors/reprocessors to get the "A combination of fission and breeding yields over 110 reactor cycles with no surplus, given the right balance" that's mentioned on the mod page?
renhanxue
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Oct 08, 2016 10:03 pm
Contact:

Re: [0.14] Reactors

Post by renhanxue »

Tried it out, it's a lot of fun. I like that you have to sort out the control circuits yourself!

I did run into a small issue that's probably my fault for being dumb, but I figured I'd tell you about it just in case. I was using version 1.3.1 and built two reactors and got them working, so far so good. Saved the game, transferred the saved game to another computer that happened to have 1.3.0 (yes, I know, dumb to not just sync both the mods and the saves, will fix in the future). Try to load the save, but I got this error:

Code: Select all

50.086 Info Scenario.cpp:152: Map version 0.14.13-2
51.233 Warning Scenario.cpp:165: Map loading failed: Couldn't read from input file. File could be corrupted.
That was a bit alarming, but updating to 1.3.1 fixed it. Again, this is really user error on my part but the error message was so odd that I figured I had to tell someone. Maybe it's out of your control as well but a more graceful way to handle the error would be cool. Just let me know if I should report it to the actual Factorio devs instead of to you (or if I should just file it under "don't do that").

(edit: there was some dumb here, removed)
User avatar
komrade_toast
Inserter
Inserter
Posts: 44
Joined: Sat Apr 16, 2016 3:28 am
Contact:

Re: [0.14] Reactors

Post by komrade_toast »

After some messing around in my test world, I finally decided to give them a go in my survival world.
It's basically the same setup as what I had built in my test world, with the difference of added hot water tanks, and the statistics display / logic area.

Since I already uploaded my whole album to imgur, and gave pretty good descriptions of how things are working there, I am just going to post the imgur link. If anyone wants the images embeded in this post, just ask and I'll get right to it.

Anyways, a little bit of explaining just to draw people in...
The main changes with this setup compared to the last I posted are that I have added hot water storage tanks, and seperated the reactor control logic from the reactor build, and placed it on it's own.. The storage tanks hold enough hot water to last through an overheating and re-initialization of the reactor. The control logic is off to the side of the reactors, with the statistics display. The logic unit (if you can call it that) controls all the pumps, and allows changing of settings all in one place, instead of changing every pump. The only thing I could see myself wanting to change is the constant combinator that stores the max temp that can be reached before being cooled, and the threshold below that for the cooling to stay active. If I use this the right way it can act as a sort of throttle.
The setup outputs a constant 100 degree water supply, no drop that is less than that gets in to the tanks or turbines. The Power Output % also stays at a constant 100%, thanks to the hysteresis circuit.

Link to Imgur gallery

Edit:
renhanxue wrote:I did run into a small issue that's probably my fault for being dumb, but I figured I'd tell you about it just in case. I was using version 1.3.1 and built two reactors and got them working, so far so good. Saved the game, transferred the saved game to another computer that happened to have 1.3.0 (yes, I know, dumb to not just sync both the mods and the saves, will fix in the future). Try to load the save, but I got this error:

Code: Select all

    50.086 Info Scenario.cpp:152: Map version 0.14.13-2
    51.233 Warning Scenario.cpp:165: Map loading failed: Couldn't read from input file. File could be corrupted.
That was a bit alarming, but updating to 1.3.1 fixed it. Again, this is really user error on my part but the error message was so odd that I figured I had to tell someone. Maybe it's out of your control as well but a more graceful way to handle the error would be cool. Just let me know if I should report it to the actual Factorio devs instead of to you (or if I should just file it under "don't do that").
I had the same error, however I got my error upon updating from 1.3.0 to 1.3.1. The screenshots you see in this post are from 1.3.0, I had to downgrade back to it to get my save to work.
Post Reply

Return to “Mods”