Recipe filter or method to get only available recipes
Posted: Thu Apr 30, 2026 6:42 pm
TL;DR
The addition of a recipe display filter that only shows recipes with ingredients that you can already make.What?
Additional API on LuaForce and/or RecipePrototypeFilter to “get_buildable_recipes” that returns only the recipes that can be built given the currently available techs.Doing this in a mod at runtimes requires iterating over every tech and determining tech recipes, and comparing those to a recipe. This should be able to be optimized by removing it from a mod hook.
Why?
For a mod that has a large number of auto generated recipes, the best way right now to limit what a player sees is by using recipe filters in UI. This will display all unlocked recipes, regardless of if all the ingredients are able to be built by a force. This clutters up the UI significantly for a mod i work with (Baketorio).Hidden techs can be used to mimic this behavior, but that feels like a workaround when the tech might only unlock a single recipe, and will just w the recipe when the two ingredients and a base tech are unlocked.