Allow setting hidden_from_player_crafting on a LuaRecipe

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 326
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Allow setting hidden_from_player_crafting on a LuaRecipe

Post by Therenas »

The attribute 'hidden_from_player_crafting' has been added to LuaRecipePrototype recently. However, you can't change that property at runtime through LuaRecipe, as the field is only present on the Prototype. I think it would be reasonable to add it as read-write to LuaRecipe as well, seeing that 'hidden_from_flow_stats' is available this way.

My particular use case would be to hide non-handcraftable recipes from the player's inventory view. This is not really doable at the data stage because you can't guarantee that the mod will be loaded last, potentially missing some recipe changes made by other mods. But I'm sure there could be more use cases for this, like custom scenarios for example.
User avatar
mat1k
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Sat Dec 22, 2018 8:48 am
Contact:

Re: Allow setting hidden_from_player_crafting on a LuaRecipe

Post by mat1k »

Therenas wrote: Mon Aug 05, 2019 2:43 pm
But I'm sure there could be more use cases for this, like custom scenarios for example.
Like hiding all but the basic recipes from player crafting.
Then creating research to allow the player to gradually unlock more advanced recipes for hand crafting.

I don't think hidden_from_player_crafting can be changed by technologies directly yet?
Post Reply

Return to “Modding interface requests”