hidden_from_flow_stats write

Things that already exist in the current mod API
Post Reply
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

hidden_from_flow_stats write

Post 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?
Last edited by Deadlock989 on Wed Mar 28, 2018 7:53 pm, edited 1 time in total.
Image

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Request: hidden_from_flow_stats write

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Request: hidden_from_flow_stats write

Post 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.
Image

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Request: hidden_from_flow_stats write

Post 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.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Request: hidden_from_flow_stats write

Post 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.
Image

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Request: hidden_from_flow_stats write

Post 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.
Image

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Request: hidden_from_flow_stats write

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Request: hidden_from_flow_stats write

Post 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...

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Request: hidden_from_flow_stats write

Post 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.
Image

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Request: hidden_from_flow_stats write

Post 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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Request: hidden_from_flow_stats write

Post 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...
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Request: hidden_from_flow_stats write

Post 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.

Post Reply

Return to “Already exists”