Balancing recipes?

Place to post guides, observations, things related to modding that are not mods themselves.
Kingdud
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat Dec 16, 2017 3:23 am
Contact:

Balancing recipes?

Post by Kingdud »

I'm working on a mod and have hit a bit of a balancing issue. I try to bring some sense of realism to what I do because I figure while we play this fine game, why not also teach that, yes, indeed, X really does use more/less material than Y and if you google that you'll find the same information I used. I go so far as to cite sources in my mods when relevant.

But I've hit a problem with figuring out how much steel to use. The mod is a refresh of nuclear power. Specifically, it will make it far less UPS intensive, while moving much of the complexity of building nuclear to the assembly phase, rather than the layout phase. But it will have a lot of intermediate products that are actual things you need to build a nuclear reactor (steam generators, switchgear, turbine hall, etc). To build 500 MWe in Factorio, you need

Code: Select all

Water	20000
Iron	37105
Copper	24965
Stone	2000
Oil	40000
Coal	2000
By comparison, to build 500 MWe of solar (with accumulators) you need:

Code: Select all

Water	ignored
Iron	188019
Copper	264190
Oil	ignored
To make that easier on the eyes, you need 66070 units of non-infinite resources to build 500 MWe of nuclear, and 660559 to build the same with solar. I could just recycle the material targets for existing nuclear reactors and say I had a budget of 66,000 units of material to build a 500MW building, and around 177k to build a 1.5GW reactor. But I feel like that's too little given how massive actual nuclear sites are. The concrete is much easier to figure out. In factorio, one unit of concrete is 1 square meter. Thus, a 1GWe reactor should use around 75,000 units of concrete. Where I get lost is in the steel.

A (real world - circa 1970) 1 GW nuclear reactor is going to use around 36,000 metric tons of steel https://web.archive.org/web/20060316092 ... _8=051.pdf (if you were curious). But how much is one unit of steel in Factorio? Or even of iron? I tried calculating it and I got that one unit of steel was somewhere between 16 and 258kg. Not exactly a reasonable range. And it's fairly obvious that one 'unit' of a thing in factorio does not mean they have equivalent mass or volume. 1 unit of concrete is one square meter (because it fills one grid square in game, and each grid square is stated to be around 1 meter by the devs).

So I guess I'm asking, how would you go about balancing this mod? I want it to be a challenge to build because actual nuclear reactors are not at all simple things to construct (I've visited them, and seen the blueprints the engineers work on when replacing and repairing pipes). But I also don't want it to be so massive of a resource sink that people say "Well screw that." because it seems unreasonable. I do feel like 75000 units of concrete is reasonable (no it won't all be one blueprint, there will be intermediates). But how much steel should I use? 36k? 50k? 75k? 150k? More? Ahh!
Adamo
Filter Inserter
Filter Inserter
Posts: 481
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: Balancing recipes?

Post by Adamo »

Kingdud wrote: Tue Oct 01, 2019 7:31 pm
I think I went through a lot of the turmoil you're feeling at the moment, because I also wrote a nuclear mod. I've been trying to figure out how to respond to your post for a few moments. I get what you're going for: you want to have this huge up-front cost for the nuclear reactor, and give it a huge power boost; right? I just don't think I'd ever be able to get past that upfront cost. It doesn't make sense to me simply because the building is only 5x5. Now, if you're talking about a scale-up of the nuclear reactor size to something huge, well, that might be different. So I don't have any direct advice for you at the moment, but I thought I would leave a few of the thoughts I tried to form while considering your question.

Your range on steel unit mass is probably about right. We have attempted to compute volumes and masses of various items and fluids, and there is little consistency to it.

I want to mention that things in Factorio are small in the sense of that the machines are just smaller than machines in modern industry are. And it's also sci-fi, so we don't always have to worry about meeting the same requirements of modern industry. You always have the choice to go more or less, both with amount and complexity. I mean: in real life, regular steel would never work in a reactor. So are you going to introduce a molybdenum resource to make steel-molybdenum alloys for reactor casings? You really also need nickel and other things, too! The answer to this is probably no, of course, but I'm trying to point out a continuum we're on, here. This is a bit silly: but how much iron ore do you have to separate to get enough molybdenum for a reactor casing alloy?
Kingdud
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat Dec 16, 2017 3:23 am
Contact:

Re: Balancing recipes?

Post by Kingdud »

Believe me, I am well aware of the materials science problems. :p But I also don't want to introduce Angel's/Bob's levels of ore complexity into a nuclear mod. I'm ok with a reasonable suspension of disbelief. It's just a bit silly when I see mods where you get something that's totally amazing, like a solar panel that can deliver 1 GW, but it only takes a few thousand ore to make it. "wut?!"

As for size, I have a few different ideas I'm kicking around for how, exactly, I'd make this mod work. For the 1.0 release, I'm just going to make everything in a single, massive, building. But I much prefer being able to break the buildings up into components so that if you go through the massive investment of building a nuclear site, you can later upgrade it with a better reactor core, turbines, and other subsystems as you research them. Similar to RL. There's a lot of stuff I'd *like* to do with this mod. But I'm trying to keep focused on releasing *something* first, and then reaching for the stars later.

No, the reactors won't be 5x5. My current thinking is around 100x100. That's actually a bit too small, and I might push it to 125x125. There will be three tiers of research. Light Water Reactors (500MWe, 25% efficient), Liquid Metal Reactors (1GWe, 33% efficient), and Molten Salt Reactors (1.5GWe, 45% efficient).

LWR will take the most material to build and be the largest land footprint. They also must be placed near water (like offshore pumps -- if I can figure out how to do that).

LMR will take the least material to build and be the smallest reactor in terms of physical footprint. We're talking maybe a 60x60 building.

MSR will be take a bit more material than a LMR to build, and be around 75x75 in size. There won't be much to make MSRs attractive until post 1.0 releases. MSRs will be the only reactors that don't explode and poison the landscape when destroyed, for example. MSRs won't require U235 to run, since they can make their own (actually, this could be done in 1.0). MSRs won't have the long shutdown cycles that LWRs do, and won't passively consume fuel even when they are at max heat. A lot of what makes MSRs special is scripting, rather than item/entity work. And I'm skill level 0 at scripting right now.
Adamo
Filter Inserter
Filter Inserter
Posts: 481
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: Balancing recipes?

Post by Adamo »

Kingdud wrote: Tue Oct 01, 2019 8:08 pm
Regarding the steel amounts, then, if the reactor really is on the order of 100x100, maybe your steel amounts do start to make sense. Vanilla reactor takes 500 steel? 500*new_length^2/25 = 200000 steel for a 100x100 reactor, just scaling up the steel cost already assigned. So cutting this DOWN to 60,000 is fine, OK, but if it's just a pure scaling of the reactor itself, 200000 isn't outrageous. I think the 500 steel cost in the first place is too high, though, since the reactor just isn't that big compared to other things made of steel. So I'd saying you're actually probably close when you're on the order of 50,000 steel. Whether it's 50,000 or 70,000 hardly matters, just use whatever number fits best with the rest of your production.

Take a look at the Rocket Silo Construction mod. He has a script that turns the rocket silo into a multi-tiered construction project that requires the input of materials in stages.

If we like your nuclear design, I will surely add support for it to Adamo Nuclear! I've done lots of calculations for it (my training was in physics), so if I can help with anything, like breedings ratios, let me know.
Kingdud
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat Dec 16, 2017 3:23 am
Contact:

Re: Balancing recipes?

Post by Kingdud »

95% of the materials in a nuclear reactor are the concrete and steel. 35% of all the steel used at a nuclear site is just the rebar in the concrete. So, if anything, 500 steel is about right and 500 red chips/copper is where it goes sideways. It should be more like 10 red chips and 30 copper. :p
Adamo
Filter Inserter
Filter Inserter
Posts: 481
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: Balancing recipes?

Post by Adamo »

Kingdud wrote: Tue Oct 01, 2019 8:24 pm 95% of the materials in a nuclear reactor are the concrete and steel. 35% of all the steel used at a nuclear site is just the rebar in the concrete. So, if anything, 500 steel is about right and 500 red chips/copper is where it goes sideways. It should be more like 10 red chips and 30 copper. :p
Ehh, I don't agree. Other things have a significant amount of steel in their structure, too, and they require, you know, 6 steel, 10 steel, maybe 50 steel for a 3x3. But that's OK. I think you have numbers now for either case, and you can decide what you think is the right interpretation.
Kingdud
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat Dec 16, 2017 3:23 am
Contact:

Re: Balancing recipes?

Post by Kingdud »

Agreed, I feel less bad about my scaling now. Thanks. (Still welcome to hear other viewpoints from readers though!)
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3110
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Balancing recipes?

Post by BlueTemplar »

Adamo wrote: Tue Oct 01, 2019 7:49 pm I mean: in real life, regular steel would never work in a reactor. So are you going to introduce a molybdenum resource to make steel-molybdenum alloys for reactor casings? You really also need nickel and other things, too! The answer to this is probably no, of course, but I'm trying to point out a continuum we're on, here.
Heh.
Attachments
py_nuke.png
py_nuke.png (318.47 KiB) Viewed 4503 times
BobDiggity (mod-scenario-pack)
Honktown
Smart Inserter
Smart Inserter
Posts: 1042
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Balancing recipes?

Post by Honktown »

Realistically, a lot of the other power requirements should be brought down. A megawatt at 480 V AC is ~2083 amps, or very thick bundle of cables . Going into a machine smaller than like, a 10x10x10 foot room (we can say 3x3x3 meter, doesn't matter). I know someone who worked at a factory that only uses a limited number of 240-480 V hundreds of amp lines. Meanwhile in Factorio you can have machines pushing multiple megawatts.

A 10 MW reactor is much more reasonable as a small and futuristic reactor. Further, uranium in real life is even more stupidly efficient than Factorio's. Even a few percent enriched fuel (not sure the kg, but not a lot) can last reactors over a year for hundreds of megawatts. It'd be more interesting to have to process the nuclear fuel into a slurry, and pipe the slurry into the exchangers, and after the turbines are ran, only providing 50% efficiency at best, you have to empty the water into a large cooling pool. There's mods that make it more complicated, but idk how realistic they take it.
I have mods! I guess!
Link
tsen
Burner Inserter
Burner Inserter
Posts: 13
Joined: Tue Jul 30, 2019 5:41 am
Contact:

Re: Balancing recipes?

Post by tsen »

Honktown wrote: Thu Oct 03, 2019 7:24 pmIt'd be more interesting to have to process the nuclear fuel into a slurry, and pipe the slurry into the exchangers, and after the turbines are ran, only providing 50% efficiency at best, you have to empty the water into a large cooling pool. There's mods that make it more complicated, but idk how realistic they take it.
Ah, the thing about that, though, is you only have to empty the water anywhere if you care about not venting it into the atmosphere. We care about that an awful lot here on Earth, but not caring about venting things into the atmosphere is one of the core features of Factorio science. This extends to a general principle; you'd be amazed how much you can simplify by cutting enough corners.
Adamo
Filter Inserter
Filter Inserter
Posts: 481
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: Balancing recipes?

Post by Adamo »

Honktown wrote: Thu Oct 03, 2019 7:24 pm Further, uranium in real life is even more stupidly efficient than Factorio's.

Even a few percent enriched fuel (not sure the kg, but not a lot) can last reactors over a year for hundreds of megawatts. It'd be more interesting to have to process the nuclear fuel into a slurry, and pipe the slurry into the exchangers, and after the turbines are ran, only providing 50% efficiency at best, you have to empty the water into a large cooling pool.
For the record, a typical PWR reactor has about 80-100 tonnes of uranium fuel in about 150-250 rods organized into three blocks that each are scheduled to be replaced in a rolling order about 1.5 years at a time, giving approximately a 4-year burn time life cycle for each block when accounting for downtime and other things, and produces on the order of 1-1.5 GW. Most PWRs only use about 5% of the available fissile material compared to what a fast reactor can use (which is essentially all of it), but this is changing now, for example, that the Russians have invented the REMIX reprocessing cycle, which appears to allow for up to 5 recyclings of water and graphite-moderated reactors by reenergizing the fuel with fresh plutonium. Slurry-type reactors are one type of reactor, but certainly not the only or "best" type, if there is one! Side note: take a look at the fission fragment reactor. By decelerating the ion beam of fission fragments, we can potentially harness nuclear energy outside of the constraints of the carnot cycle.

But back to the point: I guarantee you my nuclear mod is the most accurate on the mod portal. I did not model a slurry reactor, however. I modeled a "boiling water reactor" (in the vanilla boiler footprint, I called it the thermal nuclear boiler) and a generic "metal-cooled fast reactor". The enrichment requirements for the fuels on these are within the correct range, as is the model that allows you to reprocess and breed the fuel to nothing but smaller fission products, to within less than 1% of conservation rules and probably about 20-30% of "real" rates, but real rates are impossible to achieve because you can't actually do it in a sensical gameplay way: the breeding and fissioning rates depend on power, which is a non-constant function of time, and burn time, and to make appreciable amounts of plutonium, the burn time is on the order of months, or even years, (worse: it depends what kind of plutonium you want!) so you have to speed it up about 1000 times to get it within gameplay hours. Furthermore, while it's difficult to compute a real mass for an item in the game, after attempting to do so based on a few heat_capacity values of known entities, and a few other assumptions, the uranium fuel cell seems to be on the order of 1 to maybe 50kg. The point is that this is pretty damn small and in the smaller cases wouldn't be enough to achieve criticality. So we ignore that part, too, but, if we had a fuel cell that could burn at 1 kg, and at 1000 times the reaction rates of today's fuel cells, my fuel cell physics is *on point*. :D The point I'm getting at is that if you go the slurry route, then I see the possibility that I could use your thing alongside my thing, at least to try it out, and I've got the ratios for you if you need them, and you should match my ratios because they're the best. I also have a function here to compute new enrichment recipes if you need a different enrichment level.
Honktown
Smart Inserter
Smart Inserter
Posts: 1042
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Balancing recipes?

Post by Honktown »

Sorry, I'm not making a mod. Factorio masses are definitely way off what's realistic, but we're also carrying around 10 nuclear reactors in the same pocket space we're holding 200 gun magazines.

For the "realism" factor again, you could divide power requirements in factorio by 100 and it'd be far closer to real values than what's current, assuming we're not using a 3x3 drill to mine 1000 kg ore that we can fit 50 of easily in our pockets. (don't want to get off topic but fission fragment reactors look cool)

Different reactors could be used to stage the material/costs/power requirements. A basic reactor (graphite+fuel) would be the simplest large-scale reactor, but, in exchange for more logistics and cost, a pebble-bed could be used which would only need to consume water during it's creation. A "pile" reactor could produce very low power, but be like an accumulator+assembler: you place many down and have belts+inserters, and you can insert/remove fuel regularly. Cheap, simple, but would take a lot of space and produce little power (say 100-200 kW for a 2x2 or 3x3 building). Plumbing water through, steam goes out the side or it can be directly built with a steam engine, even though it produces very little power (part of the drawback of building them but you can recycle boiler buildings).
I have mods! I guess!
Link
Adamo
Filter Inserter
Filter Inserter
Posts: 481
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: Balancing recipes?

Post by Adamo »

Honktown wrote: Wed Oct 09, 2019 9:48 am Sorry, I'm not making a mod. Factorio masses are definitely way off what's realistic, but we're also carrying around 10 nuclear reactors in the same pocket space we're holding 200 gun magazines.

For the "realism" factor again, you could divide power requirements in factorio by 100 and it'd be far closer to real values than what's current, assuming we're not using a 3x3 drill to mine 1000 kg ore that we can fit 50 of easily in our pockets. (don't want to get off topic but fission fragment reactors look cool)

Different reactors could be used to stage the material/costs/power requirements. A basic reactor (graphite+fuel) would be the simplest large-scale reactor, but, in exchange for more logistics and cost, a pebble-bed could be used which would only need to consume water during it's creation. A "pile" reactor could produce very low power, but be like an accumulator+assembler: you place many down and have belts+inserters, and you can insert/remove fuel regularly. Cheap, simple, but would take a lot of space and produce little power (say 100-200 kW for a 2x2 or 3x3 building). Plumbing water through, steam goes out the side or it can be directly built with a steam engine, even though it produces very little power (part of the drawback of building them but you can recycle boiler buildings).

Sorry, wasn't clear enough. I meant this also for KingDud, who is making a mod, potentially. I'd be very pleased to have another nuclear mod that matches my materials analysis. :D

You've brought up several good reactor types. I personally didn't see a lot of need to go through many types or mechanics. So I made the boiling reactor (one of the simplest kinds of reactors) and the fast reactor, metal-cooled. That covered the bases I want. But I have many types of uranium enrichment levels available, and I could add more, so if anyone wants to simply add more reactor types, I'd be pleased to support those types with any materials processing recipes that they would need.
Kingdud
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat Dec 16, 2017 3:23 am
Contact:

Re: Balancing recipes?

Post by Kingdud »

For all indentured porpoises my mod will only be useful to people at megabase levels. Why? Well, you *could* build the LWR and LMR (IIRC) reactors before launching a rocket, but the entire purpose of the mod is to make the UPS hit of nuclear not a thing. That means I'm fixing a problem that only occurs long after you've won the game. At that point, if I hit you with a million material requirement, that just means it takes longer to build one reactor unit.

I've spent the past few days trying to write a program to convert data.raw to a JSON format so I could create an automatic calculator for recipe costs (IE: you feed it a list of your recipes and it spits out how many raw materials are required -- like we get in game, but it would fully expand advanced-crafting recipes as well). But it turns out that converting data.raw's format to JSON is no trivial feat. I haven't declared this little side quest dead yet, but I'm close to doing so.

Regardless of if I get my calculator working or not, I will make *something* to fully expand my recipes so I can balance them much more easily than the spreadsheet method I use now. I will target material parity with current nuclear (IE: if 500MWe of stock factorio nuclear takes 200k materials, then mine will take around that much as well) and go from there (LMR take less material to build, MSRs take more than LMR and less than LWR). It seems like most people don't really have a problem with a high material cost because, at mega-base scale, it just becomes about time. Besides, you'd only ever be building 40 or so of the MSRs anyway.

Thanks for all the feedback. :)
Post Reply

Return to “Modding discussion”