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).
Allow changing the hidden field at runtime
- IsaacOscar
- Filter Inserter
- Posts: 843
- Joined: Sat Nov 09, 2024 2:36 pm
- Contact:
Re: Allow changing the hidden field at runtime
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.
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.
-
- Fast Inserter
- Posts: 188
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: Allow changing the hidden field at runtime
+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
If you need to reach me, message me on discord.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Re: Allow changing the hidden field at runtime
You do realize that if hidden becomes a state, it won't be undone on mod removal either?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").
Re: Allow changing the hidden field at runtime
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.