How to create prototypes without quality?
How to create prototypes without quality?
Is there a way to define a prototype that won't have quality (or will just have quality 'normal'). In my mod Autodrive, I have several BatteryEquipmentPrototypes where quality just doesn't make sense. My equipment (so-called 'sensors') doesn't do anything on its own, it just serves as a kind of flag for my mod: If a certain sensor is found in a vehicle's equipment grid, some additional code is run (for reloading vehicle weapons, refueling vehicle and other vehicle equipment, etc.). Quality may be useful for some equipment (e.g. higher quality personal batteries storing more energy than batteries of lower quality), but if people tried to craft, say, a legendary fuel sensor they'd just waste their legendary items.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: How to create prototypes without quality?
I think you just need to set RecipePrototype - allow_quality to "False" to prevent Quality Modules' usage? This is done for Oil Processing Recipes only; I'm not sure if there's extra logic anywhere else to catch all-fluid recipes in Mods... It is still possible to manually pick a higher-tier-ingredient for such recipes.
If you really want to prevent these items from occurring "accidentally", you might be able to use an on_tick handler to find any Machines with these recipes, and take action on them (change the recipe to Normal quality, and/or display a Message)... This is probably more trouble than just letting the Users make a uselessly Legenedary item.
Good Luck!
If you really want to prevent these items from occurring "accidentally", you might be able to use an on_tick handler to find any Machines with these recipes, and take action on them (change the recipe to Normal quality, and/or display a Message)... This is probably more trouble than just letting the Users make a uselessly Legenedary item.
Good Luck!
Re: How to create prototypes without quality?
Thanks a lot! Yes, makes sense to set this in recipes, not in whatever the recipes produce. 

A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!