Hello, when I load Planetaris Unbounded I get the following mod loading error in Planetaris Tellus.
(Error while loading the mod) Fehler beim Laden der Mods: planetaris-tellus/data-updates.lua:264: attempt to index field 'tool' (a nil value) stack traceback: planetaris-tellus/data-updates.lua:264: in main chunk
If I unzip the mod and check the lines 264 - 270 with Notepad++ there are the following lines to be found:
if data.raw["tool"]["planetaris-pathological-science-pack"] then
data.raw["tool"]["planetaris-pathological-science-pack"].spoil_to_trigger_result =
{
items_per_trigger = 1,
trigger = two_medium_premature_wasp
}
end
Maybe it´s relevant to say I didn´t settle on Tellus before updating Factorio to Factorio 2.1.
The crash seems to happen because data.raw["tool"]["planetaris-pathological-science-pack"] is nil at the time data-updates.lua runs (likely because the science pack hasn't been defined yet or depends on a specific mod loading order). When the code tries to index .spoil_to_trigger_result on a nil value, it throws the error.
You can fix this by adding a safety check to ensure the science pack actually exists before trying to modify its spoiling behavior:
if data.raw["tool"] and data.raw["tool"]["planetaris-pathological-science-pack"] then
data.raw["tool"]["planetaris-pathological-science-pack"].spoil_to_trigger_result =
{
items_per_trigger = 1,
trigger = two_medium_premature_wasp
}
end
At least the game starts and loads the mod without error for me. But please countercheck it for any errors because I am unsure whether it affects the spoiling mechanic of the science pack in your info.json file.
Thank your for the great Planetaris mod pack. I really enjoy your planets, especially Hyarion.