The Ruins Mod - Planet settings


Choose which planets will spawn ruins. By default only Nauvis, Gleba and Aquilo. Requires Abandoned Ruins - Updated (core)

Utilities
27 days ago
2.0
275
Planets Environment

g ERROR

Error while running event AbandonedRuins-PlanetSettings::on_load()
Error when running interface function AbandonedRuins.exclude_surface: AbandonedRuins_updated_fork/control.lua:278: attempt to index global 'data' (a nil value)
stack traceback:
AbandonedRuins_updated_fork/control.lua:278: in function <AbandonedRuins_updated_fork/control.lua:274>
stack traceback:
[C]: in function 'call'
AbandonedRuins-PlanetSettings/control.lua:63: in function 'set_exculdes'
AbandonedRuins-PlanetSettings/control.lua:152: in function <AbandonedRuins-PlanetSettings/control.lua:147>

27 days ago
(updated 27 days ago)

when trying to load a world I get this

The mod The Ruins Mod - Planet settings (0.1.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AbandonedRuins-PlanetSettings::on_load()
Error when running interface function AbandonedRuins.reinclude_surface: AbandonedRuins_updated_fork/lua/surfaces.lua:44: name='nauvis' is already removed from surfaces.excluded table
stack traceback:
[C]: in function 'error'
AbandonedRuins_updated_fork/lua/surfaces.lua:44: in function 'reinclude'
AbandonedRuins_updated_fork/control.lua:298: in function <AbandonedRuins_updated_fork/control.lua:291>
stack traceback:
[C]: in function 'call'
AbandonedRuins-PlanetSettings/control.lua:61: in function 'set_exculdes'
AbandonedRuins-PlanetSettings/control.lua:152: in function <AbandonedRuins-PlanetSettings/control.lua:147>

when I try to create a world I get this

The mod The Ruins Mod - Planet settings (0.1.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AbandonedRuins-PlanetSettings::on_init()
Error when running interface function AbandonedRuins.reinclude_surface: AbandonedRuins_updated_fork/lua/surfaces.lua:44: name='nauvis' is already removed from surfaces.excluded table
stack traceback:
[C]: in function 'error'
AbandonedRuins_updated_fork/lua/surfaces.lua:44: in function 'reinclude'
AbandonedRuins_updated_fork/control.lua:298: in function <AbandonedRuins_updated_fork/control.lua:291>
stack traceback:
[C]: in function 'call'
AbandonedRuins-PlanetSettings/control.lua:61: in function 'set_exculdes'
AbandonedRuins-PlanetSettings/control.lua:144: in function <AbandonedRuins-PlanetSettings/control.lua:140>

27 days ago

This mod won't work due to deliberate changes made in "Abandoned Ruins - Updated (core)" version 1.4.0.

26 days ago

I just found this thread because someone reported it broken to me. So now I subscribe to this forum so I can see broken stuff here, too.

25 days ago

I have pushed an update 1.4.2 that should address the issue. The "inner" functions surfaces.exclude() and surfaces.reinclude() need to check exclusion status but the "outer" remote-call functions can be invoked repeatedly on the same surface as a new function surfaces.is_excluded() is now doing the condition check.

25 days ago

And please, in the future, refrain from using < 1.x.x conditions, that way, outdated and maybe later removed versions (and they are unsupported) are required by mods which then makes the mod unusable.

25 days ago

This mod still won't work due to disallowing exclusions of Planets and Space Locations.
Though even before that 'AbandonedRuins_updated_fork' crashes because data doesn't exist. I believe data cannot be accessed in Control stage.

25 days ago
(updated 25 days ago)

Yes, it isn't available. Hmm, I still like to block planets in exclude_surface() and reinclude_surface() as they are not correctly used.

25 days ago
(updated 25 days ago)

Hmm, can you run your code on a different lifecycle phase, e.g. data-updates.lua as your mod only updates existing data? Yes, it doesn't touch anything in data.raw itself.

EDIT: No, then script isn't available. :-(

25 days ago
(updated 25 days ago)

Can I check game.surfaces[name].planet ~= nil to have the same effect? Because there are maybe mod developers that might invoke exclude_surface() and think they have disabled only their ruin-set from being spawned on that surface. That is however not true. exclude_surface() stops ANY ruin from spawning on that surface. For example, the mod Subsurface might want to have no ruins spawned. It is maybe still assigned to a planet? I checked 1.1.10 and it doesn't assign its surfaces with a planet.

25 days ago
(updated 25 days ago)

BTW: You can make your mod more flexible by running a pair(game.surfaces) instead of having each surface's name added to your mod.

24 days ago

I guess the only way to solve this problem (outdated version / misusing exclude_surface()) is to add this mod's functionality to the main mod. If you like, you can fork my repository at github and send me PR then I can merge it.

New response