Visible Planets in Space

by Nauviax

Render the local planet behind platforms when in orbit. Now with parallax, rotation, and mod support!

Tweaks
3 days ago
2.0
14.3K
Environment

g Crash

8 days ago

Sorry for the incomplete log. It happened when I adjusted the planet parallax and planet final scale setting in the Visilble Planet mod. From the log it looks like there are some compatibility issues between the Visible Planet and Planet Picker.

I also made a post on that forum
https://mods.factorio.com/mod/planet-picker/discussion/675ed1be037e23ecc20972cf


planet-picker/control.lua:21: bad argument #3 of 3 to 'index' (string expected, got nil)
stack traceback:
[C]: in function '__index'
__planet-picker
/control.lua:21: in function <planet-picker/control.lua:20>
stack traceback:
[C]: in function 'newindex'
__visible-planets
/control_stuff/render_planets.lua:50: in function <visible-planets/control_stuff/render_planets.lua:21>
2449.752 Error ServerMultiplayerManager.cpp:84: MultiplayerManager failed: "The mod Visible Planets in Space (1.2.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event visible-planets::on_runtime_mod_setting_changed (ID 64)
The mod Planet picker (0.4.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event planet-picker::on_runtime_mod_setting_changed (ID 64)
planet-picker/control.lua:21: bad argument #3 of 3 to 'index' (string expected, got nil)
stack traceback:
[C]: in function '__index'
__planet-picker
/control.lua:21: in function <planet-picker/control.lua:20>
stack traceback:
[C]: in function 'newindex'
__visible-planets
/control_stuff/render_planets.lua:50: in function <visible-planets/control_stuff/render_planets.lua:21>"
2449.752 Info ServerMultiplayerManager.cpp:806: updateTick(6769268) changing state from(InGame) to(Failed)
2449.752 Quitting: multiplayer error.
2449.752 Info GlobalContext.cpp:760: Deleting active scenario.
2450.270 Info ServerMultiplayerManager.cpp:146: Quitting multiplayer connection.
2450.270 Info ServerMultiplayerManager.cpp:806: updateTick(18446744073709551615) changing state from(Failed) to(Closed)
2450.270 Info ServerMultiplayerManager.cpp:166: Deleting active scenario (global = true).
2450.271 Info HttpSharedState.cpp:55: Downloading https://multiplayer.factorio.com/remove-game/19946859
2451.193 Info UDPSocket.cpp:233: Closing socket
2451.193 Info UDPSocket.cpp:263: Socket closed

7 days ago

I think I know what is happening, and it'll be a fix they need to add on their end. I'll respond on their forum too.

My mod's visible-planets-regen-renders setting triggers a reset of all planet renders when enabled, and turns the setting back off when it's done.
Planet picker has a function that seems to run whenever a setting is changed, and it makes a bad assumption that a setting is always changed by a player. When it tries to get the player that changed the setting, it gets nil because my mod changed it's own setting, not a player. You can't get the nil-th player in a game, so it crashes.

Planet picker should be able to fix this by checking if e.player_index is nil, and doing nothing (or something else) if it's nil.

7 days ago

(In the mean time, you should be able to avoid the crash by not using the regen planets setting. You can still regen a planet manually by leaving and returning to orbit, though stationary platforms will be stuck with the old planets ofc)

5 days ago

Cool, it works. Thanks!

New response