Visible Planets in Space

by Nauviax

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

Tweaks
5 days ago
2.0
17.8K
Environment

i Feature request: Individual planet size and random ship position

a month ago

This mod is fantastic! It feels like a perfect addition to Factorio.

I have two ideas that could make it even better:
1. What if each planet had a different size? Maybe we could base that on their size in the star map, or let players set it themselves.
2. To make things feel more natural, maybe the ship's parking spot could be slightly randomized. Each planet could even have its own unique spot. For example, at Nauvis, the ship parks on the right, and at Vulcanus, it parks on the left.

a month ago

Random parking spots would be a nice optional feature, I'll definitely look into it.

The current implementation doesn't really support planet specific settings, though it'd be possible to do it. I might get around to looking into it later, but it's not a high priority. (Is there a way to get a planet size from a given space location / planet at runtime? I haven't looked for anything like that yet.)

a month ago

I think there is no size data for the planets. Currently, I just add a quick hack by providing the size and parking position for each planet in a dictionary and it works well.
Perhaps that would be good enough as a first implementation for the main mod as well.

a month ago
(updated a month ago)

You could use gravity as a proxy for size: Nauvis has a gravity of 10, Gleba 20. Now this doesn't mean Gleba should be twice as big; it has twice the mass, so assuming the planets consist of roughly the same elements, Gleba's volume is twice as big.

The radius of a sphere in terms of volume is as follows: r = (3V / 4π)^(1/3)
And the other way around: V = 4/3πr³

So if we take Nauvis as the base size and define its r as 1, filling in the second formula, we get the V(Nauvis) = 4.19.
Then doubling that and putting it in the second formula we get r(Gleba) = 1.26

So Gleba should be rendered 26% bigger than Nauvis.

Though this is assuming the ship is at the same distance from each planet.

a month ago
(updated a month ago)

edit mistake

a month ago

I like that way of getting a size. If/when I get around to implementing dynamic planet sizes then I'll probably use that method as it'll automatically work for modded planets too. (Might need to clamp it ofc for some mods)

For now, just pretend you're parking extra close to the smaller planets.

a month ago
(updated a month ago)

To play the devil's advocate:
Realistically, a space agency would want to be as close to the planet as possible above the planet's atmosphere such that getting to the ship from the surface as easy as possible. So at a planet without any atmosphere you'd want to orbit just a handful of kilometers above the surface (or above the highest mountain of the surface, but we can ignore that).
In that case you would have to do some math accounting for both the gravity as well as the pressure (at surface, which is the value the game gives you, I guess). Though I'm not sure exactly how that works out and this is again assuming the atmosphere of all the planets is roughly identical.

14 days ago

The latest version supports planet specific scales, but they would need to be set via a mod currently. There's an example at the bottom of the mod page that makes Nauvis twice as big relative to other planets.

It shouldn't be too hard to throw together a mod that just calls this function for each planet you want to set, if it's something you're still interested in. I may also add a way to set them via mod settings, but it'd probably need to be done via a json string setting or similar.

11 days ago
(updated 11 days ago)

I made a mod for it: https://mods.factorio.com/mod/vp-scale.

Feel free to implement it in the base mod whenever you feel like. Just let me know and I'll deprecate my mod.

New response