It would be nice if the localized name of a planet could be overwritten in the control stage.
Ideally it should also take priority over platform names, but since those can already be edited in the control stage there is no immediate need.
This would allow mods to deliberately change the icon of a planet during runtime as well, since it is part of the final localized string.
Usecases:
- for Space Exploration we might want some freezing surfaces, we cannot just have a pool of "se-frozen-#" prototypes since we would set the name of them in the data stage, as well as locking in the icon in terms of it being a planet or moon, and in case of third party mods they cannot swap the planet icon with like the primary resource either.
- deliberately wanting to override the localised_name of any surface for whatever reason, it should not be limited to "normal" surface types, it's less flexible.
It seems that localised_name is currently always saved along with the world, so if you change the localized name of a planet in the locale or data stage then readind localised_name will keep returning the original value, i would have to imagine this is why planets and platforms got priority over what was stored.
I propose that the saved field gets treated like an override instead, null unless the name got customized via script, writing nil would clear it back to the default (planet name -> platform name -> surface name), reading it in the control stage will always return the current localized string and never nil.
Preexisting surfaces will ofc still have that name saved, it could either be compared against what is currently showing or just reset to nil on the grounds of "before this version it didn't show anyways".
Thanks for considering this proposal, it would make writing to the localised_name so much more useful, secretly hoping this comes to 2.0.x since it's tiny.
LuaSurface::localised_name write should take priority over planet prototype
- protocol_1903
- Filter Inserter

- Posts: 471
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: LuaSurface::localised_name write should take priority over planet prototype
+1
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
https://mods.factorio.com/user/protocol_1903
Re: LuaSurface::localised_name write should take priority over planet prototype
OK, I changed it for 2.1.
If you want to get ahold of me I'm almost always on Discord.
