Jump to content

[WIP] Planet Randomizer 0.2.4 (2014-09-21)


metaphor

Recommended Posts

Have you ever wondered what it would be like to explore the kerbal system would be like if the planets and moons were in different places? Look no further, this is the mod for you!

This mod randomizes both the position of the planets/moons (who orbits what, inclination, eccentricity, etc), and their mass and radius (within a factor of 2 from the stock ones).

This is just a preliminary release, so I can figure out any major bugs. If you want to try it, extract into your KSP/GameData/ folder. Feedback is appreciated.

DOWNLOAD (0.2.4)

I have no idea which mods it's compatible or not compatible with, so I would suggest a new clean save.

How it works: Every time you start a new save, the Planet Randomizer window pops up that asks you to enter a random seed and then press Select to randomize the system. That save will then remain the same any future time you open it. If you enter the same seed number as another save, it should give the same configuration, so you can duplicate the same kerbal system configuration on multiple saves. The seed and planet info is saved along with the regular save file.

The different planets/moons' SOIs should never overlap with each other. Also, less massive bodies should always orbit more massive bodies. Please let me know if you find any incongruities with masses or SOIs.

Note: after starting a save, go to the tracking station and tab through the planets/moons to see if you like the layout of the system.

Screenshots:

TijQwRt.png

QCwjlnp.png

iIzSJMn.png

2KyqVfm.png

PsYVu3m.png

Source code (on GitHub)

License: CC-BY-NC-SA

Credit goes to Galantir's RandomSolarSystem mod for giving me the idea of how to structure the code, NathanKell's Real Solar System mod for some bits of code, and NovaSilisko's Alternis Kerbol mod for some ideas about changing planet parameters.

Older versions:

0.2

0.2.1

0.2.2

0.2.3

To do list:

-rotation period randomization, possibly tidal locking <-- mostly done

-science balancing

-terrain smoothing

-atmospheric parameters

-fix ocean bug on Laythe/Eve

-compatibility with other mods <-- compatible with RealSolarSystem and PlanetFactory

-realistic planets based on masses/radii

-making planets from scratch

Change Log:

0.2 (2014-08-22) Made it more compatible with RSS; if you use it with RSS the planets will now be spread out in ~10 times larger orbits around the Sun, about the same as the real solar system. Also fixed a scaledspace bug.

0.2 (2014-08-22) Made it mostly compatible with Planet Factory and any planet packs that come with it; it might still bug out if there's too many large stars/black holes. Also fixed some bugs with orbital parameters.

0.2 (2014-08-23) Modified rotation periods. Tidal locking is now possible. If a satellite is close enough to its primary it will become tidally locked. If the mass ratio between the primary and the satellite is low enough, the primary can also be tidally locked to its satellite (like Duna and Ike).

0.2.1 (2014-08-24) You can now re-randomize the planets multiple times in a single save. When you start one up, go to the tracking station and look at the planets, and pick a different random seed if you want a different planet configuration. It will use the previous configuration as its starting point, so after a few tries you can get very different planets. (Still working on fixing that bug, but you don't have to start multiple saves now.)

0.2.2 (2014-08-25) Fixed the save bug. Now the mod will start with the default planets whenever it is called on to randomize them. (Default meaning stock/RSS/PlanetFactory/whatever planets you already have installed). So there shouldn't be any more Duna's with 10 g's of gravity etc after multiple randomizes.

0.2.3 (2014-09-08) Kept Kerbin the same mass and radius as in the stock game, so only the other planets/moons have their radius/mass changed. Larger planets/moons now have lower eccentricities and inclinations. Moons are slightly further away from their planets to prevent SOIs ending under their physical surface. Planets orbiting the sun are slightly further away from each other. The mod shouldn't activate for a save that's already in progress (more than 5 game minutes played), but only for new saves.

0.2.4 (2014-09-21) Fixed a bug with the random system being overwritten by the default system when switching back to the space center screen. Also fixed (maybe) a bug with ships in Kerbin orbit disappearing after reloading.

Edited by metaphor
Link to comment
Share on other sites

So is it possible for Eve to orbit Gilly?

Also, with the wording in the original post, maybe a planet that is 2x the size of Eve could orbit a moon that is 2x smaller than Gilly. Is that correct?

Nonetheless, this sounds pretty interesting.

Link to comment
Share on other sites

So is it possible for Eve to orbit Gilly?

Also, with the wording in the original post, maybe a planet that is 2x the size of Eve could orbit a moon that is 2x smaller than Gilly. Is that correct?

Nonetheless, this sounds pretty interesting.

Nope, that shouldn't be able to happen, only less massive bodies can orbit more massive ones. Something with a larger radius (but lower density) can orbit something with a smaller radius and higher density, but the central body will always have more mass.

Link to comment
Share on other sites

Would a scenario like Pluto-Charon be possible to generate in KSP?

Pluto-Charon_System.gif

These kinds of orbits would make for loads of fun. Especially where one orbiting body overlaps (or almost overlaps) the other's orbit...

Orbit2.gif

Link to comment
Share on other sites

Would a scenario like Pluto-Charon be possible to generate in KSP?

Yeah, but KSP models it from the point of view of the larger body. In which case it looks exactly like an orbit of the smaller body around the larger one. It all depends on your frame of reference.

Link to comment
Share on other sites

This is really impressive :cool:

I'll be keeping an eye on this one

maybe eventually you could integrate with planet factory so it can pick from a larger database of planets?

In theory this should work with any number of planets, since I don't have them hardcoded in. I haven't checked Planet Factory yet.

I would be interested to see what other people's systems look like and what you think looks "wrong" about the arrangement of planets. There's millions of possible configurations so I can't go through all of them.

Link to comment
Share on other sites

It might be interesting to take certain universal rules into account. The Roche limit for example is the boundary between a stable orbit and one that is close that the orbiting body would be ripped apart by tidal forces. Using that you could create a rule that prevents a planet's moon from orbiting unrealistically close to its parent body.

Planets are likely to be gas giants at 10 Earth masses and can become brown dwarfs at 13 Jupiter masses. Basing it on the KSP equivalents (Kerbin and Jool) you could use that data to create a realistic rule governing the mass of gas giants. Another phenomenon observed in real-life is that less massive gas giants often grow quite large in radius, especially close to their sun. Gas giants more massive than Jupiter on the other hand are generally not that much bigger, because the higher gravity causes them to compress.

Rocky planets are generally considered to not be more massive than 10 Earth masses (aka Kerbin masses), although there is one extrasolar rocky planet that weighs as much as Neptune (aka 17 Earth masses). At a radius of 2.35 Earths, it's the largest known rocky planet. There are also lower limits. Icy moons are generally believed to start to look round (so like the Mun and Ike) instead at around 0.03 Earth radius. Below that it's going to look more irregular à la Minmus, Pol, etc. Rocky planets with atmospheres might do with a lower limit of 0.4 Earth radius, because that's what Titan is.

Link to comment
Share on other sites

Just a suggestion , if you assign the randomizer to skip planets based on the planet index you can avoid planets orbitin moons

If a "planet" is lower mass than a "moon", then it can orbit it (I'm assuming you mean the specific planets and moons in the stock game). I don't really see a problem with that. I'm already selecting only the lower mass objects to orbit the higher mass objects.

Link to comment
Share on other sites

This is pretty sweet. I second the idea of following the rules we've discovered via Kepler and all the other extrasolar planet surveys.

Also when two bodies orbit each other as close as some of those I've seen in these pictures, they'd be tidally locked. Is there a way to force that in the mod?

Link to comment
Share on other sites

This is pretty sweet. I second the idea of following the rules we've discovered via Kepler and all the other extrasolar planet surveys.

Also when two bodies orbit each other as close as some of those I've seen in these pictures, they'd be tidally locked. Is there a way to force that in the mod?

I'll try to allow for that. But there is a limit since the mod works with whatever planets are already present in the game. Right now, gas giants and stars don't change radius (and in most games there's only a single gas giant which is Jool). All the other planets can have radius increase or decrease by a factor of 2 (more than that and the terrain will start looking funky). All the planets can also have their density increase or decrease by a factor of 2.

I'm working on tidal locking and rotation right now. It is possible to force that for close orbiting objects.

I guess in the future it might be possible to just make planets from scratch using the Kopernicus mod and then make a solar system entirely with those planets (kinda like Space Engine).

edit: Finished tidal locking mostly. If a satellite is close enough to its primary it will be tidally locked to it. If the mass ratio between the primary and the satellite is close enough, the primary will also be tidally locked to the satellite (like Duna and Ike).

Edited by metaphor
Link to comment
Share on other sites

Still looking for people to test this if possible. Would appreciate feedback about how the planets' orbits could be improved to make for a better gameplay experience (like moons being too big or too close to their planets, too many planets orbiting the Sun, etc). And how it works together with other mods.

Link to comment
Share on other sites

Downloaded this the other day, and currently testing it - the only thing I can say is that it would be very nice to be able to rerandomize the planet positions without quitting out and starting a whole new save every time until we get one we like.

Link to comment
Share on other sites

Downloaded this the other day, and currently testing it - the only thing I can say is that it would be very nice to be able to rerandomize the planet positions without quitting out and starting a whole new save every time until we get one we like.

Yeah like type in a seed (or click "random seed") and see a map of the system. Look around, go "Nuh uh" and put in a new random seed.

Link to comment
Share on other sites

Actually, there is a faster way to rerandomize - just open your save game folder, and delete PlanetRandomizer.cfg. Then quit traking station screen - and voila, randomize window shows up!

But yeah, it would be definitely easier, if this mod could have integration to toolbar plugin.

Link to comment
Share on other sites

Well I've got to say, this mod is very promising keep it up!

So far I've noticed some confusing things - like huge Jool orbiting tiny, but massive central body (Duna, for ex.), which have escape velocity of 50k+ m/s.

Also it would be definitely good to implement Roche limit, as was mentioned above, to avoid very close orbits.

As to compatibility with other mods - there is an issue with BoulderCo clouds. If a planet got equator radius boost, chances are that instead of terrain, cloud layer would get inflated.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...