Page 1 of 1

More powerful recipe 'categories'

Posted: Thu May 25, 2017 1:03 am
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.

Re: More powerful recipe 'categories'

Posted: Thu May 25, 2017 12:32 pm
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.

Re: More powerful recipe 'categories'

Posted: Thu Dec 12, 2024 8:02 pm
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.