[2.0.23] Nauvis lacks surface properties
Posted: Mon Dec 09, 2024 9:45 am
What did you do?
I attempted to limit a recipe to being created only on Nauvis.
What happened?
The recipe was available on all planets.
What did you expect to happen instead?
For the recipe to only be available on Nauvis.
Does it happen always, once, or sometimes?
It always happens.
Game State
Modded.
Activated Mods
base 2.0.23
elevated-rails 2.0.23
quality 2.0.23
space-age 2.0.23
DBLib 0.0.2
Verbose Description
The above topics aren't really that useful for this bug report, but I decided to keep them in for the sake of protocol.
While I was working on a mod that generates recipes for resources based on their availability on different planets I stumbled upon what I believe might be an oversight.
I usually avoid having mods enabled when reporting bugs, but in this case I feel like it's inconsequential.
DBLib only provides functions for other mods to use, it doesn't touch any of the game's data other than a call in data-final-fixes.lua which consists of;
Code: Select all
local dump_all = false
local dump_table = {"planet"}
if dump_all == true then
local msg_dump = "=== DBLIB DATA DUMP ===\n=== "..src_table.." ===\n"..DBLIB:DumpTable(data.raw[src_table])
log(msg_dump)
else
log("=== DBLIB DATA DUMP ===\n\ndump_all == false")
end
if #dump_table > 0 then
for _,table_name in pairs(dump_table) do
DBLIB:LogDump(table_name)
end
endCode: Select all
data.raw["planet"]["nauvis"].surface_propertiesCode: Select all
day-night-cycleThe only reason I used data-final-fixes.lua was to make sure space-age has done any modifications that it needs to.
After looking through the game's source code I can confirm that Nauvis doesn't have any surface_conditions other than day-night-cycle nor does space-age patch the others in.
Whilst the game obviously functions without these properties added to the planet prototype it's a very inconsistent behaviour seeing as Nauvis has the properties defined when looking in the Factoriopedia.
The only patches for the base game regarding Nauvis are;
Code: Select all
data\space-age\base-data-updates.lua:
288: data.raw.planet.nauvis.subgroup = "planets"
289: data.raw.planet.nauvis.asteroid_spawn_influence = 1
290: data.raw.planet.nauvis.asteroid_spawn_definitions = asteroid_util.spawn_definitions(asteroid_util.nauvis_vulcanus, 0.1)
Known Workaround
As a modder one can just patch Nauvis directly by doing the following;
Code: Select all
data.raw["planet"]["nauvis"].surface_properties = {
["day-night-cycle"] = 25200,
["magnetic-field"] = 90,
["solar-power"] = 100,
gravity = 10,
pressure = 1000,
}
Closing Statements
I believe it could be beneficial for the game to have an alternative to "surface_conditions" which acts as a white-/blacklist so that recipes can be defined as only being available on specific planets.
Attachments
Log: Save: N/A