How to access the used preset at runtime?
How to access the used preset at runtime?
I want to read these properties at runtime: https://lua-api.factorio.com/latest/con ... pGenPreset, especially the advanced settings. How's that possible?
Re: How to access the used preset at runtime?
All presets are available here: https://lua-api.factorio.com/latest/cla ... en_presets
The preset used for the current map is not saved. But you can get the current map gen settings are from the surface: https://lua-api.factorio.com/latest/cla ... n_settings
The preset used for the current map is not saved. But you can get the current map gen settings are from the surface: https://lua-api.factorio.com/latest/cla ... n_settings
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: How to access the used preset at runtime?
I know that, then I suggest to make EnemyEvolutionMapSettings, EnemyExpansionMapSettings and PollutionMapSettings readable during runtime.Bilka wrote: ↑Fri May 24, 2024 9:12 pm All presets are available here: https://lua-api.factorio.com/latest/cla ... en_presets
The preset used for the current map is not saved. But you can get the current map gen settings are from the surface: https://lua-api.factorio.com/latest/cla ... n_settings
Further suggestion would be to make them also writable and per-surface.
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: How to access the used preset at runtime?
Try taking a look at this mod and what it does and how:
https://mods.factorio.com/mod/ChangeMapSettings
https://mods.factorio.com/mod/ChangeMapSettings
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: How to access the used preset at runtime?
Thanks! There they are: https://lua-api.factorio.com/latest/cla ... p_settingsFuryoftheStars wrote: ↑Fri May 24, 2024 10:50 pm Try taking a look at this mod and what it does and how:
https://mods.factorio.com/mod/ChangeMapSettings