Recipe Decomposition

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Egg
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Jun 19, 2024 7:47 pm
Contact:

Recipe Decomposition

Post by Egg »

Introduction
Recipe Decomposition (The "Total Raw" tooltip) cannot be altered, but only disabled through the allow_decomposition property. The concept of recipe decomposition is super helpful to players to see how much resources something will take or get an idea of the production line by knowing the starting point. However, in experimenting with Factorio recipes, this tooltip can quickly lose all value, and can't be changed to fit the needs of the mod. If a recipe has a byproduct like iron-plate, the recipe decomposition will use that recipe as the raw resources for iron-plate since it has a longer chain of recipes leading up to it then the, more useful to know, "iron ore to iron plate" recipe. If an item has multiple recipes to make it, it most likely doesn't make sense to decompose its production further. The current solution is to not decompose recipes from a crafting category in a different machine, however, this has its own problems I will mention later.

The Suggestion
A recipe property which disables recipe decomposition from going down splitting recipe branches. For example,

Code: Select all

allow_decomposition_branching = false

would stop the "Total Raw" tooltip from breaking down items which have multiple recipes. There could also be the

Code: Select all

decompose_all_categories = true
which would allow breaking down recipes from all categories, instead of stopping, seemingly, prematurely at chemistry in some cases.
Alternatively, bringing this to its extreme, there could be a property for the modder to give manual ingredients for the tooltip (which they can calculate with their own formula if they so desire). For example,

Code: Select all

decomposition = {
	{itemName1, itemAmount1}, {itemName2, itemAmount2}
}
, so the modder can give the player guidance or more useful information for certain recipes.

Vanilla Factorio Too!
In fact, I believe this may be a benefit for both modding and vanilla. Currently, decomposition in the crafting menu just stops when it gets to the chemistry crafting category, but in the chemical plant it fully decomposes the recipes using its products needed in cracking (petroleum and light oil get broken down in terms of water and heavy oil). Both methods don't seem as helpful as they could be. Sulfuric acid, in say Batteries, being broken down into its raw ingredients can be very helpful but avoided since its in the chemistry category, and all oils given in terms of water and heavy oil doesn't seem to provide much to be worth spending that much room on the tooltip. There is also rocket fuel which is broken down into light oil and heavy oil specifically?? In Coal Liquefaction, the heavy oil ingredient is broken down into water and crude oil, but its output is heavy oil, so it makes no sense to decompose heavy oil here as if water and crude oil are reoccuring costs of coal liquefaction. The option to change these simple behaviors or the option for custom recipe breakdown would be very helpful for recipe modification in general.

Conclusion (TL;DR:)
When it comes to modding recipes or to vanilla chemistry, I believe adding a property/properties to recipes which allow altering their recipe decomposition (The "Total Raw" tooltip), would be very helpful.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15013
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Recipe Decomposition

Post by Rseding91 »

The decomposition stops when the player can't craft that items recipe and stops in the machine when the machine can't craft the items recipe.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Modding interface requests”