Alternative recipe ingredients

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

SWeini
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Mon Apr 04, 2022 6:43 am
Contact:

Alternative recipe ingredients

Post by SWeini »

TL;DR
A new way to describe recipes:

2 iron plates OR 2 copper plates OR 1 steel plate
+ 5 wood
+ 100 water OR 50 petroleum
--->
2 medium power poles
What?
Every ingredient to a recipe is actually a list of alternative items/fluids.
I haven't thought this through to the very end, but it will need some UI adjustments and probably comes with a few limitations.
- New UI in recipe tooltips & factoriopedia
- New UI in crafting machine
- No mixing of items and fluids as in "1 iron plate OR 50 water"
- Probably some limitations in combination with filtered fluid boxes
- Maybe no auto-switching between ingredients if it's too difficult to implement
- Probably limitation of single items/fluids are not allowed in multiple "slots"

All the limitations are OK in my opinion.
Why?
In large mod packs there are often multiple items/fluids with similar properties, and for some recipes a modder might want to allow any of those as ingredients. The above example already needs 6 recipes in the current system. The other solution is to introduce intermediates for all the OR things, blowing up the number of items, plus needing more crafting machines / inserters / belts or working with scripted composite entities.
The whole Galdoc's Manufactoring is built on top of this idea, but other mods could benefit from using the same principle sparingly. See also here: 109070

Feel free to move to modding requests if you think it fits better. I don't expect vanilla or space age to make use of this.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4345
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Alternative recipe ingredients

Post by boskid »

This does not feel realistic. There are basically 2 approaches, lets call them "automatic" and "manual" and both of them are a no-no.

In the "automatic" approach, you would select a recipe and a machine would accept any ingredients that match the specified list of ingredients. This approach would cause a lot of mod breaking changes on the lua api side since ingredients would have to be provided in a completly different structure. A lot of in game interactions would be completly broken, like copying filters from assembler to a requester chest (this would have to copy all variants of ingredients), reading recipe ingredients from assembler, blueprint parametrization setting dependant parameters to be nth ingredient of a recipe etc, and crafting queue doing decomposition that would have to account for variable ingredient compositions to get a product. This is unlikely to happen.

In the "manual" approach when setting recipe on an assembler you would also choose an exact ingredients composition. This would be just adding weird complexity on top of the RecipePrototype since one would effectively describe multiple recipes, and its better to just have multiple separate recipe prototypes so that other mods can more easily adjust recipe costs without worrying about alternative ingredients.
Post Reply

Return to “Ideas and Suggestions”