More powerful recipe 'categories'

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
soundlogic
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Jan 17, 2016 7:00 pm
Contact:

More powerful recipe 'categories'

Post by soundlogic »

Some mod created crafting devices want to handle a set of recipes related to but not the same as the recipes handled by another crafting device. Even in the built in sets of categories we see this sort of structure: "crafting", "advanced-crafting", crafting-with-fluid".

Productivity modules are meant to handle a subset of recipes that can be crafted, yet this winds up being stored on each module individually rather than being a property of the recipe.

Bob's electronics assemblers create the recipe categories 'electronics' and 'electronics-machine', meant to be a subset of recipes that can be crafted in an ordinarily assembler. This work-around however creates problems if multiple people want to do similar things.

The recipe prototype currently takes a single category string. I propose replacing it with a set of tags, and then machines and modules can operate on these tags using intersection, union, and negation operators.
"hand" would be a tag, indicating that the recipe can be done in hand. "assembler" would be a tag, indicating that the recipe can be done in an assembler. "fluid" would be a tag indicating that the recipe requires a fluid (and could be applied automatically). Then bob's assemblers would simply say "assembler UNION electronics" and the "electronics" tag would be added to rather than having to add a new crafting category to existing machines and then moving certain recipes into that category.

Alternatively, the tag system could be used and then crafting_categories/limitation could use a tag, dictionary or a function rather than having a built in union/intersection/negation system.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: More powerful recipe 'categories'

Post by bobingabout »

Another issue is that by setting electronics to their own category, the "God mode" crafting is unable to create these special categories, therefore it breaks the game.

If I were able to have categories and list "Crafting" and "Electronics" on a recipe that is electronics, then then the Electronics can both these tags, and it can be crafted in the assembling machine, and the electronics machine without these game breaking issues for creative mode.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Phnod
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 30, 2024 2:13 am
Contact:

Re: More powerful recipe 'categories'

Post by Phnod »

I know this is a really old post but this would be SUPER helpful to have, especially now with Space Age. I notice in SA there's a lot of individual "group" recipe categories such as "chemistry-or-cryogenics" when it feels like they should just be defined as the already existing categories "chemistry" OR "cryogenics". Right now if mods add crafting categories of their own and want it to also be able to craft some vanilla items they'd need to define any "overlapping" categories separately, and I imagine this could cause some mod conflicts if two mods are trying to modify the same recipe to be able to be crafted in their own machines. With a more flexible recipe category, mods could add additional categories to vanilla recipes instead of overriding them without interfering with each other.
Post Reply

Return to “Modding interface requests”