Thomas P.

[1.3.0/1.3.1] [FREE FOR ADOPTION] Planetary Diversity (Release 4) - Oct. 29

Recommended Posts

Unfortunately I doubt that I am going to have the time or the motivation to work on this mod at the moment or in the future.
I mainly made this as a proof of concept to show that such a mod is possible and never expected that a lot of people would play with it, so I never cared as much as I cared for Kopernicus.
Also, some of the limitations of KSPs planet system are a real time killer. (Regenerating the whole system cache if you want to test one thing etc.)

If anyone out there wants to adopt this mod, either just to maintain it, or to add some cool features to it, feel free to do so. If you need any help with understanding what it does, and how it does it, feel free to shoot me a message in the Kopernicus Discord server, or send me a forum PM.

 

What is this?
This is a mod that adds some diversity to the (otherwise static) KSP solar system. It archives that by changing various parameters of the CelestialBody and PQSMod components, but it has the potential for expanding it further, either through "official" tweaks, or tweaks made by other modders.

How does it work?
Every savegame you create in KSP gets a random number assigned, a seed. This seed is different for every savegame you create. Planetary Diversity modifies the solar system between the MainMenu and the SpaceCenter scene. It uses the seed from the savegame that was loaded to generate random numbers, for example to replace the static seeds in the terrain system. Since most of the planets in KSP are procedural, this changes how the KSP planets are formed. They are a bit different, but the overall look doesn't change, i.e. Kerbin will still be blue-ish, and Eve stays purple. It supports planets made with Kopernicus, however, if they don't have procedural components (i.e. they only have a height and a color map), it won't be able to change them.

At the moment it changes the seeds, orbits, color of gas planets, atmospheric pressure, names (hi Sigma!) and it can add / remove atmospheres. Also, it is modular, with an API, so users can implement their own tweaks if they want.

However, there is one caveat: When you load a savegame for the first time, with Planetary Diversity installed, it will lock down for a while. The reason is that in KSP, every planet has a low-res representation for larger distances - called "Scaled Space". This scaled space representation needs to be computed, but the computation is rather expensive. Thats why Planetary Diversity will generate the representations of all bodies in the solar system that were changed, and save it into your savegame folder. When you load the same save in the future, the mod will simply load the files from your disk instead of re-creating them every time.

What if I want to use a specific seed for my savegame?
While this is not possible in Stock KSP, Planetary Diversity adds an UI for this, in the Game Creation dialog.

WYufRZv.png

The UI should be pretty much self-explanatory. It is also localizeable.

Does this depend on Kopernicus?
No. It is completely standalone. However, if you have Kopernicus installed and the OnDemand texture loading feature is enabled, Planetary Diversity will integrate with it and load the planet textures only when they are needed.

But I don't want to have <insert Feature here> changed!
Don't worry, all tweaks can be disabled seperately. Just open GameData/PlanetaryDiversity/Config/{config name}.cfg (for custom tweaks please ask the respective modder) and set everything you don't want to false. However, you can only disable it for your whole installation. Per-savegame configuration is neither planned nor easily realizeable.

Download?
You can download Planetary Diversity from Github: https://github.com/StollD/Planetary-Diversity/releases/latest
You can find it's source code on Github too: https://github.com/StollD/Planetary-Diversity
Planetary Diversity is licensed under the terms of the MIT license, except the file "Utility.cs" and "Gradient.cs" which is a modified version of Kopernicus Utility.cs.

Like my mods?
Please consider supporting me and my mods on Paypal! I would greatly appreaciate it, since I don't get much money anyways. :)
However note, that this doesn't grant you anything special, but it will help to keep my motivation up. Therefor it's just an extremly nice way to say "thanks". :)

Edited by Thomas P.
  • Like 13

Share this post


Link to post
Share on other sites

This will be terrific with fully procedural mods like Uncharted Lands.

  • Like 1

Share this post


Link to post
Share on other sites

Very interesting and intriguing. How does it handle the KSC placement, if its staying at stock KSC coords will it sometimes be on a island in the middle of an ocean and other times at the bottom of a deep square pit in the middle of a mountain range by way of the randomization?

I second, GregroxMun's sentiments above. :D 

Edited by Poodmund

Share this post


Link to post
Share on other sites
2 minutes ago, Poodmund said:

Very interesting and intriguing. How does it handle the KSC placement, if its staying at stock KSC coords will it sometimes be on a island in the middle of an ocean and other times at the bottom of a deep square pit in the middle of a mountain range?

I second, GregroxMun's sentiments above. :D 

Yes, that can happen, but unfortunately I don't have a good idea how to fix this.

Share this post


Link to post
Share on other sites

That depends on the CKAN team, I am definitely not opposed to it.

Share this post


Link to post
Share on other sites
25 minutes ago, Thomas P. said:

Yes, that can happen, but unfortunately I don't have a good idea how to fix this.

When a heightmap is exported the elevation data, mapSO, is written into an array and then each cell/pixel is given a 0-255 colour, right? If the 0m height of the elevation for the homeworld can be deduced, could you scan the array for an area where there is a high density of cells/pixels that represent the 0m height and rewrite the homeworld SpaceCenter node to locate the KSC in this area? This would obviously have to be done on initial generation at the Seed input stage but could be isolated for the Homeworld.

I'm severely simplyfying things here as I do not understand the complications of the suggestion. :D 

EDIT: This could be scary though as you might get a KSC plonked on the North Pole for example, I guess a toggle to lock 0 degrees latitude could be considered also to combat this.

Edited by Poodmund
  • Like 1

Share this post


Link to post
Share on other sites

if mountains are not placed at original locations after generation, would the science module detect it as mountain anymore?

Edited by ssd21345

Share this post


Link to post
Share on other sites
8 minutes ago, ssd21345 said:

if mountains are not placed at original locations after generation, would the science module detect it as mountain anymore?

the science results are based on the biome map which will not change 

Share this post


Link to post
Share on other sites

Wow,thank you for your work @Thomas P.! I can't wait to give it a try. I can't tell from the comments, does it actually change the KSC coordinates?

Share this post


Link to post
Share on other sites
6 minutes ago, Nightside said:

Wow,thank you for your work @Thomas P.! I can't wait to give it a try. I can't tell from the comments, does it actually change the KSC coordinates?

No, it doesn't change them

  • Like 1

Share this post


Link to post
Share on other sites

Just got a chance to play with this tonight. The changes to Kerbin were subtle, mostly visible in the sky line of the western mountain range. I didn't look too closely for differences to the stock game, but in general enjoyed not feeling too familiar.

Thanks for this Thomas!

Share this post


Link to post
Share on other sites

Hello,

I released Version 1.3.0-2 of Planetary Diversity, you can get it on GitHub. Changelog:

* Added a module that tweaks the orbits of the solar system bodies
* Added a module that recolors the textures of gas planets.

Have fun.

Share this post


Link to post
Share on other sites

Hello again (and sorry for doubleposting),

I released Version 1.3.0-3 of Planetary Diversity, you can get it on GitHub (Link in the OP). Changelog

* Added a tweak for atmospheric pressure and temperature
* Fully recolor gas planet atmospheres

Note: This release works with both, 1.3.0 and 1.3.1

Have fun.

  • Like 1

Share this post


Link to post
Share on other sites

I released Version 1.3.0-4of Planetary Diversity, you can get it on GitHub (Link in the OP). Changelog

* Ported @Sigma88's namegenerator from Stellarator to PD
* Various fixes for all tweaks
* Added an atmosphere toggle tweak, that can add and remove atmospheres

(This is the biggest update for PD so far.)

Note: This release works with both, 1.3.0 and 1.3.1

Another note: Running GN with all supported planet packs and PD is really fun, if your Computer has got enough power (16 GB RAM minimum)

Have fun.

Share this post


Link to post
Share on other sites

So release 4 doesn't seem to be working at all, when starting a new game it's throwing an exception in onGameSceneSwitchRequested - I tested release 3 in case it was me doing something wrong, but that seems to be working fine (I assume so anyway, it's still generating the cache :D).

Here's a log: https://www.dropbox.com/s/ivrtklna104p7ty/output_log.txt?dl=0

Share this post


Link to post
Share on other sites

Hello! I just found this on CKAN and was wondering if anyone has any pictures of some of the random changes that are made with each new save game seed? 

  • Like 1

Share this post


Link to post
Share on other sites
On 3/17/2018 at 1:37 AM, Dewar said:

Is this still functioning?

Yes, its 1.4.3 compatible.

Edited by Starslinger999
  • Like 1

Share this post


Link to post
Share on other sites

If I remove this mod, will it corrupt my saves? (I'm having issues with Kerbin being dark all the time, and the solar system being gone on map view in the tracking station. I warped to day and it was pitch black. When a vehicle is launched, it is still pitch black out.)
(Well, I can see a little but not much. It's effectively night all the time.)

As of this last edit, I have not tried restarting the game. I am trying that right now. Either way, I still need to know if removing the mod will corrupt my saves.

Oh and another note - my game is heavily modded, so it takes a while to launch.

Also I'm not sure if this is even working for me. I see it ingame and it does the thing where it generates stuff when a new save is created, and loads the stuff it generated whenever the save is opened again.

BUT, the closest mountains to the KSC for example, are in the same spot and look identical.

On 10/29/2017 at 5:05 AM, Thomas P. said:

I released Version 1.3.0-4of Planetary Diversity, you can get it on GitHub (Link in the OP). Changelog


* Ported @Sigma88's namegenerator from Stellarator to PD
* Various fixes for all tweaks
* Added an atmosphere toggle tweak, that can add and remove atmospheres

(This is the biggest update for PD so far.)

Note: This release works with both, 1.3.0 and 1.3.1

Another note: Running GN with all supported planet packs and PD is really fun, if your Computer has got enough power (16 GB RAM minimum)

Have fun.

Are you still okay? It's been quite a while since you updated the title of this mod thread to reflect the new changes.

Edited by InfiniteAtom

Share this post


Link to post
Share on other sites

This mod shows up and install in the latest version of KSP and CKAN, but when I enter the game it just gets stuck on generating moho and I can't do anything other than Alt-F4.

Share this post


Link to post
Share on other sites

I think its time for some status update from me here...

 

Unfortunately I doubt that I am going to have the time or the motivation to work on this mod at the moment or in the future.

I mainly made this as a proof of concept to show that such a mod is possible and never expected that a lot of people would play with it, so I never cared as much as I cared for Kopernicus.

Also, some of the limitations of KSPs planet system are a real time killer. (Regenerating the whole system cache if you want to test one thing etc.)

 

If anyone out there wants to adopt this mod, either just to maintain it, or to add some cool features to it, feel free to do so. If you need any help with understanding what it does, and how it does it, feel free to shoot me a message in the Kopernicus Discord server, or send me a forum PM.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now