Adds automatic scaling to planets rendered by Visible Planets in Space based on their gravity and increases or reduces the rotation speed based on their day/night cycle duration.
Tweaks
Mod category: Tweaks
Small changes concerning balance, gameplay, or graphics.
768.745 Error MainLoop.cpp:1468: Exception at tick 20585492: The mod Visible Planets in Space (1.7.0) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event visible-planets::on_space_platform_changed_state (ID 195)
real number expected got nan.
stack traceback:
[C]: in function 'draw_sprite'
visible-planets/control_stuff/render_planets.lua:149: in function 'vp_generate_sprite_for_player'
visible-planets/control_stuff/render_planets.lua:115: in function 'vp_render_planet_on_platform'
visible-planets/control_stuff/render_planets.lua:125: in function <visible-planets/control_stuff/render_planets.lua:124>
LInk to save: https://drive.google.com/file/d/1NjgcWAYxaldex4CbVM3H0M-6RZlgn_Lo/view?usp=sharing
Loading save without this mod fixes the crash.
Apparently this is related to Neumann V from Metal and Stars, which I'm assuming has a day/night value of 0, resulting in a divide-by-zero error in this mod. I'll confirm once home but if so then the fix would just be checking for 0 before dividing and either using a multiplier of 1 or disabling rotation for the planet depending on what you prefer.
Thanks for the report Meelock and thanks for checking Nauviax!
I've released an update that should fix it. Can either of you check if it works? I've written the fix entirely without opening Factorio since I'm not at home until tomorrow in the afternoon and the fix seemed easy enough but you never know (Yay for release automation).
Updated to 1.4.1 but I'm still crashing when viewing a space platform that is orbiting Neumann V from metal and stars. Other planets work fine and crash doesn't happen if I disable visible planets scale.
The mod Visible Planets in Space (1.7.0) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event visible-planets::on_player_changed_surface (ID 59)
real number expected got nan.
stack traceback:
[C]: in function 'draw_sprite' visible-planets/control_stuff/render_planets.lua:149: in function 'vp_generate_sprite_for_player' visible-planets/control_stuff/render_planets.lua:133: in function 'vp_add_player_to_watched_render' visible-planets/control_stuff/render_planets.lua:203: in function <visible-planets/control_stuff/render_planets.lua:201>
@ReBootYourMind, can you maybe share which mods you're running. Maybe it's caused by another mod that tweaks some value in an unexpected way. You can find a file with all the mods you're running (on Windows) by opening the file explorer and in the address bar type %appdata%, press enter, in there there should be a folder called Factorio. Then go to mods and share the content of mod-list.json. You can open the file in notepad or any other text editor. Just be sure to don't modify anything in it.
Log file may actually be more useful, because it'll have a line with with either "nan" or "inf" in it, along with the planet it's using that value for.
Look for something like "@__vp-scale__/data-updates.lua:42: Setting rotation multiplier of planet <somePlanetNameHere> to: <EitherNANorINF>"
(Or just post the part of the logs where "__vp-scale__/data-updates" shows up)
Can you reboot Factorio for me with vp-scale enabled.
Then while in the main menu open %appdata%/Factorio/factorio-current.log in any text editor.
Can you confirm vp-scale version 1.4.1 is actually loading by searching for the string Loading mod vp-scale 1.4.1
Use ctrl+f to quickly search through the document.
Then if that's the case, can you copy paste all the lines that contain __vp-scale__/data-updates.lua like Nauviax described. With your mod list it should be about 60 lines and they should be right after each other.