Visible Planets Scale

by jurgy

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
27 days ago
2.0
11.0K
Factorio: Space Age Icon Space Age Mod
Environment

i Planet rotation speed

2 months ago

I have a suggestion to your mod, that can be implemented easily!
So, from the title, if you adjusted planets size relying on their gravitational force, it's also be very cool if you adjust rotation of every planet based on their own day night cycle.
Let me know if you need help implementing this :)

2 months ago

That's all Visible Planets internal runtime code. My mod only touches data stage stuff so you have to take it up with Nauviax to expose an endpoint which I can hook into. Also since the planets and their moons are all one single combined sprite, I can't rotate the moons individually from the planet.

2 months ago

It's sad, Nauviax didn't plan to implement these features due to being busy..

a month ago

Stumbled across this because I was using this mod to regression test VP 1.7.0 changes; Rotation has a hook now!

a month ago
(updated a month ago)

Stumbled across this because I was using this mod to regression test VP 1.7.0 changes; Rotation has a hook now!

I've looked into it and at first it looked great. So as Efremiros suggested I wanted to use the planet's day-night cycle to adjust the multiplier and using the visible-planets-rotation-speed setting as a baseline for Nauvis. But since that is a runtime-global setting, I don't have the value yet during startup and it could be changed during runtime.

Would it be possible to expose the vp_set_planet_rotation_mult function during runtime as well?

30 days ago
(updated 30 days ago)

Not as-is, because the overrides are stored in a mod-data prototype which afaik is read-only at runtime. There's likely a way around it, but not one that I know of without storing the override values in save game's runtime storage or something.

Why do you need to read rotation speed at all though? Day-night cycle time should be available in the planet prototype, so you could use that to decide what multiplier each planet should have right? I imagine Vulcanus would be 7m/1.5m = ~4.7 times faster than Nauvis right?

Or are you planning on a more complicated formula than that? If so I can investigate more into runtime modifications when I get the chance. (No promises I find a workaround though)

30 days ago

You're totally right. It's just a multiplier I'm configuring, my bad and sorry to have bothered you with this. I should've thought it through a bit more.

30 days ago
(updated 30 days ago)

I just released version 1.4 which sets the rotation speed multipliers! You can disable it if you want with the Day/Night Cyle rotation speed adjustment startup setting.

This thread has been locked.