Allow changing the hidden field at runtime

Things that we aren't going to implement
User avatar
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 843
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Allow changing the hidden field at runtime

Post by IsaacOscar »

Bassically, it would be great if you could set the hidden field (https://lua-api.factorio.com/latest/cla ... tml#hidden) at runtime. (Similarly with hidden_in_factoriopedia).

Perhaps it could also be set per player or per force?

The idea being that mods can hide stuff from all the GUIs until they are actually useful for players (so as to not clutter the GUI or give spoilers).
binaryDiv
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon Jan 27, 2025 12:44 pm
Contact:

Re: Allow changing the hidden field at runtime

Post by binaryDiv »

I think this would be really useful!

I'm currently working on a mod that hides military technologies and recipes that aren't useful when playing in peaceful mode. I first thought about disabling (enabled=false) instead of hiding the technologies, which can be done at runtime, but hiding is the much cleaner way to do this (e.g. you can remove the mod and its changes will be automatically undone, which isn't possible when setting "enabled=false").

For some technologies and recipes it could be useful to dynamically enable them during runtime, though.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 349
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Allow changing the hidden field at runtime

Post by protocol_1903 »

+1, would be very useful for mods that change entities and the like at runtime to operate differently. So there's less confusion about which is which and what the player can actually use
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
curiosity
Filter Inserter
Filter Inserter
Posts: 696
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Allow changing the hidden field at runtime

Post by curiosity »

binaryDiv wrote: Sun Feb 02, 2025 6:58 pm I'm currently working on a mod that hides military technologies and recipes that aren't useful when playing in peaceful mode. I first thought about disabling (enabled=false) instead of hiding the technologies, which can be done at runtime, but hiding is the much cleaner way to do this (e.g. you can remove the mod and its changes will be automatically undone, which isn't possible when setting "enabled=false").
You do realize that if hidden becomes a state, it won't be undone on mod removal either?
Rseding91
Factorio Staff
Factorio Staff
Posts: 16195
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow changing the hidden field at runtime

Post by Rseding91 »

Sorry but this is not going to be done. Prototype values are immutable after startup and anything runtime which wants to be mutable has to make a copy, and save/load it. The entire game is built on top of this principle and it won't be changing.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Won't implement”