Page 1 of 1
hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 7:06 pm
by Deadlock989
It's possible, even likely, that I'm not doing it right, but it looks to me like the hidden_from_flow_stats flag for recipe prototypes is only read/write in the API, and just read in the prototype. The reason I think that is (a) it says "read/write" for LuaRecipe but only "read" for LuaRecipePrototype in the 0.16.0 patch notes and (b) setting it in a recipe prototype doesn't seem to have any effect.
I'm assuming this hides things from the "P" production stats screen, if I'm wrong - what is it for?
If I'm right about both of the above, would it possible to make it read/write in prototypes? If not, then do I have to set it in on_init() in control.lua?
Re: Request: hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 7:20 pm
by Bilka
Why do you want it to writable in the LuaRecipePrototype? Just change it in the LuaRecipe for every force. It's just like LuaRecipe::enabled, which is RW for LuaRecipe and read-only for LuaRecipePrototype.
Re: Request: hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 7:22 pm
by Deadlock989
Bilka wrote:Why do you want it to writable in the LuaRecipePrototype? Just change it in the LuaRecipe for every force. It's just like LuaRecipe::enabled, which is RW for LuaRecipe and read-only for LuaRecipePrototype.
Easier to set all the recipe's properties in just one place? Not having to use a mixture of data and control methods to set things up? It's not something ever intended to be different for different forces but is a basic property of this kind of recipe/crafting process, permanently?
It's not urgent but it seems odd to me this way.
Re: Request: hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 7:28 pm
by Rseding91
Deadlock989 wrote:... It's not something ever intended to be different for different forces ...
It wouldn't be read/write runtime if that was true.
Re: Request: hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 7:32 pm
by Deadlock989
Rseding91 wrote:Deadlock989 wrote:... It's not something ever intended to be different for different forces ...
It wouldn't be read/write runtime if that was true.
I meant in my use case.
Re: Request: hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 7:38 pm
by Deadlock989
Bilka wrote:It's just like LuaRecipe::enabled, which is RW for LuaRecipe and read-only for LuaRecipePrototype.
Hmmm. That's what it says in the docs as well. But I'm setting
enabled in prototypes and it works. It doesn't work for hidden_from_flow_stats.
Re: Request: hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 7:42 pm
by Bilka
Deadlock989 wrote:Bilka wrote:It's just like LuaRecipe::enabled, which is RW for LuaRecipe and read-only for LuaRecipePrototype.
Hmmm. That's what it says in the docs as well. But I'm setting
enabled in prototypes and it works. It doesn't work for hidden_from_flow_stats.
The prototype property in the data phase is named hide_from_stats instead of hidden_from_flow_stats. No idea why it's different.
Re: Request: hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 7:50 pm
by eradicator
Bilka wrote:The prototype property in the data phase is named hide_from_stats instead of hidden_from_flow_stats. No idea why it's different.
There are numerous such example where the api name is different from the data stage. I wish they'd fix that some day...
Re: Request: hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 7:51 pm
by Deadlock989
Bilka wrote:The prototype property in the data phase is named hide_from_stats instead of hidden_from_flow_stats. No idea why it's different.
Ahhhhh. Thank you.
Re: Request: hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 7:53 pm
by orzelek
eradicator wrote:Bilka wrote:The prototype property in the data phase is named hide_from_stats instead of hidden_from_flow_stats. No idea why it's different.
There are numerous such example where the api name is different from the data stage. I wish they'd fix that some day...
Especially that if base game doesn't use it... there is no good way to find it I think.
Unelss I'm missing a page somewhere with prototype description.
Re: Request: hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 8:25 pm
by Bilka
orzelek wrote:eradicator wrote:Bilka wrote:The prototype property in the data phase is named hide_from_stats instead of hidden_from_flow_stats. No idea why it's different.
There are numerous such example where the api name is different from the data stage. I wish they'd fix that some day...
Especially that if base game doesn't use it... there is no good way to find it I think.
Unelss I'm missing a page somewhere with prototype description.
There's
https://wiki.factorio.com/Prototype/Recipe but it's outdated and doesnt include it because I dont have the time to fix it...
Re: Request: hidden_from_flow_stats write
Posted: Wed Mar 28, 2018 11:26 pm
by Nexela
orzelek wrote:eradicator wrote:Bilka wrote:The prototype property in the data phase is named hide_from_stats instead of hidden_from_flow_stats. No idea why it's different.
There are numerous such example where the api name is different from the data stage. I wish they'd fix that some day...
Especially that if base game doesn't use it... there is no good way to find it I think.
Unelss I'm missing a page somewhere with prototype description.
Base game uses it in data-updates.lua for the barreling recipes.