Code: Select all
effects = {
{
type = "unlock-recipe"
name = "hidden-recipe"
hidden = true
},
{
type = "nothing"
effect_description = "description"
}
}
Code: Select all
effects = {
{
type = "unlock-recipe"
name = "hidden-recipe"
hidden = true
},
{
type = "nothing"
effect_description = "description"
}
}
My mod uses a furnace prototype and 10 recipes, each unlocked by a technology. I kind of exploited the way furnaces choose their recipe, so the recipes have the same ingredients, but a different name (recipe-1 will override recipe-5 because of lexicographical order), and each technology unlocks a recipe with a suffix 1 lower than the one before. Each recipe also produces a bit more than the one before. I thought it would be much better to just have a modifier that says "+10% output of [recipe]" than a recipe that has the same icon and everything except the "Produces: " part as all the other ones. Download the mod to see for yourself.Rseding91 wrote: Fri Aug 21, 2020 4:01 pm My default reaction is to say "no" since the one of the main points of the tech screen is to show what researching a technology does.
I will do that for now, thanks.Xorimuth wrote: Fri Aug 21, 2020 4:27 pm You can add a hook to the event `on_research_finished` to apply your hidden effect.
By your description it sounds like the crafting screen would show 10 different recipes at the end. And the user would have no clue about how the engine choses which one to use (if that is even a stable assumption). So using an event to disable all the "old" recipes is imho the better solution anyway. For the technology you could try to add a nothing effect with tooltip informing the user about the 10% bonus.Romner_set wrote: Fri Aug 21, 2020 6:16 pmMy mod uses a furnace prototype and 10 recipes, each unlocked by a technology. I kind of exploited the way furnaces choose their recipe, so the recipes have the same ingredients, but a different name (recipe-1 will override recipe-5 because of lexicographical order), and each technology unlocks a recipe with a suffix 1 lower than the one before. Each recipe also produces a bit more than the one before. I thought it would be much better to just have a modifier that says "+10% output of [recipe]" than a recipe that has the same icon and everything except the "Produces: " part as all the other ones. Download the mod to see for yourself.Rseding91 wrote: Fri Aug 21, 2020 4:01 pm My default reaction is to say "no" since the one of the main points of the tech screen is to show what researching a technology does.
I will do that for now, thanks.Xorimuth wrote: Fri Aug 21, 2020 4:27 pm You can add a hook to the event `on_research_finished` to apply your hidden effect.
Note that furnaces cache the last recipe used. So existing furnaces might get stuck at the old recipe after you researched the tech while newly build once use the better one.eradicator wrote: Tue Aug 25, 2020 2:17 pmBy your description it sounds like the crafting screen would show 10 different recipes at the end. And the user would have no clue about how the engine choses which one to use (if that is even a stable assumption). So using an event to disable all the "old" recipes is imho the better solution anyway. For the technology you could try to add a nothing effect with tooltip informing the user about the 10% bonus.Romner_set wrote: Fri Aug 21, 2020 6:16 pmMy mod uses a furnace prototype and 10 recipes, each unlocked by a technology. I kind of exploited the way furnaces choose their recipe, so the recipes have the same ingredients, but a different name (recipe-1 will override recipe-5 because of lexicographical order), and each technology unlocks a recipe with a suffix 1 lower than the one before. Each recipe also produces a bit more than the one before. I thought it would be much better to just have a modifier that says "+10% output of [recipe]" than a recipe that has the same icon and everything except the "Produces: " part as all the other ones. Download the mod to see for yourself.Rseding91 wrote: Fri Aug 21, 2020 4:01 pm My default reaction is to say "no" since the one of the main points of the tech screen is to show what researching a technology does.
I will do that for now, thanks.Xorimuth wrote: Fri Aug 21, 2020 4:27 pm You can add a hook to the event `on_research_finished` to apply your hidden effect.