Git Product home page Git Product logo

kopernicus's Introduction

Kopernicus

June 17th, 2024

  • Created by: BryceSchroeder and Nathaniel R. Lewis (Teknoman117)
  • Actively maintained by: Prestja and R-T-B.
  • Formerly maintained by: Thomas P., NathanKell and KillAshley
  • Additional Content by: Democat3457, Gravitasi, aftokino, KCreator, Padishar, Kragrathea, OvenProofMars, zengei, MrHappyFace, Sigma88, Majiir (CompatibilityChecker), blackrack/LGHassen (shaders/GPL'd scatterer code)
  • Much thanks to Sarbian for ModuleManager and ModularFlightIntegrator

New in this latest version release-205:

1.) Fixed Kittopia heightmap exporting to use the proper range, stopping some heightmaps from clipping and other oddities.

2.) Added/edited a lot of the Kittopia export descriptions in Orbit and Atmoshpere nodes with the help of our resident scienfic genius, OhioBob.

About

Kopernicus is a KSP add-on that allows for modification of stock planets and the creation of new planets via modification of the system prefab. Why is this advantageous you might ask? Previous planet adder mods, such as Planet Factory, modified the live planetary system and had to keep multiple hacks actively running to provide these worlds. We strive to provide the least hacky solution by introducing planets into the game in the exact same manner Squad would.

Kopernicus is a one step process. It is started before the planetary system is created and rewrites a property called PSystemManager.Instance.systemPrefab. The game itself then creates our planetary system as if it were blessed by Squad themselves. The mod’s function ends here, and it terminates. Kopernicus introduced worlds require zero maintenance by third party code, all support is driven entirely by built in functionality. This yields an incredibly stable and incredibly flexible environment for planetary creation.

One caveat exists that prevents absolute control over a planetary system. Due to the way Squad defines how launch control and ship recovery work, a planet called Kerbin must exist and must have a reference body id of 1. While it is easy to provide this scenario, as a star to orbit and a single planet satisfies this, any would be universe architect needs to be aware so they don’t get mystery errors. The displayed name of the body (i.e. the celestialBody.bodyName property) can be changed after the spawn of the PSystem

Each celestial body in KSP has a property called “flightGlobalsIndex.” This number does not directly correspond to the reference id, but is related. Once all of the celestial bodies have been spawned, references to them are written into the localBodies list. This list is then sorted in increasing order of the flight globals index. The index the body is located at after the sort becomes the reference body id.

We have yet to see if removing or rearranging the other bodies causes any sort of errors in the science or contracts system.

Instructions

  • Copy the contents of the GameData/ folder to KSP’s GameData/ folder
  • Launch KSP and enjoy!
  • Please report any bugs you may find to either or both of the email addresses above.

Examples

Selectively copy folders inside of KopernicusExamples/ into a GameData/KopernicusExamples/ folder. There are a number of examples of how to use Kopernicus.

Building

To build Kopernicus from source, don't edit the project file.

Instead, define a Reference Path pointing to the root of your local KSP install.

In Visual Studio and Rider, this can be done within the IDE UI, by going to the project properties window and then in the Reference Path tab. If you want to set it manually, create a Kopernicus.csproj.user file next to the src\Kopernicus\Kopernicus.csproj file with the following content :

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ReferencePath>Absolute\Path\To\Your\KSP\Install\Folder\Root\</ReferencePath>
  </PropertyGroup>
</Project>

kopernicus's People

Contributors

bryceschroeder avatar corfiot avatar dasskelett avatar dbent avatar democat3457 avatar dpentz avatar gerry1135 avatar gotmachine avatar gravitasi avatar hebarusan avatar jonnyothan avatar josh6680 avatar lghassen avatar linuxgurugamer avatar marr75 avatar maximebrean avatar nathankell avatar olympic1 avatar prestja avatar qboid-bot avatar r-t-b avatar sigma88 avatar starstrider42 avatar stolld avatar teknoman117 avatar thewhiteguardian avatar tinygrox avatar tuupertunut avatar unquietwiki avatar warriorsabe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kopernicus's Issues

Broken energy flow

Hello there,

I'm using Kopernicus in conjunction with the Outer Planets Mod.
Yesterday I wanted to place a satellite on a orbit around Kerbin and was confused as I got a warning that my ship was running out of charge, although I had deployed two 1x6 solar panels. I noticed that, while having a decent amount of sun exposure, my energy flow was 0, therefore generating no charge.

After rummaging through 60 mods I finally found this mod here to be the culprit.
The following entry in the System.cfg (@e2fd931e1fe0f1a882d98b95a11eb4ff093bd4cd) seems to cause the problem:

    // SolarPowerCurve
    // {
    //     key = 206000000000 0 0 0
    //     key = 13599840256 1 0 0
    //     key = 68773560320 0.5 0 0
    //     key = 0 10 0 0
    // }

After uncommenting the lines, the solar panels will generate charge again.

flightglobalsindex

when using the Sun as a template for a body my KSP freezes in the loading screen (just when the bar hits 100%)

this is easily solvable by adding a flightGlobalsIndex line into the cfg, but still I thought you may want to know :)

NullReferenceException

NullReferenceException
at (wrapper managed-to-native) UnityEngine.MonoBehaviour:StopCoroutine (string)
at PQS.ResetSphere () [0x00000] in :0
at PSystemSetup.SetPQSInactive () [0x00000] in :0
at PSystemSetup.SetMainMenu () [0x00000] in :0
at PSystemSetup.OnLevelWasLoaded (Int32 level) [0x00000] in :0

Currently the only exception occurring, right up until a ship is launched. Then the whole PQS system dies for all planets, and the game dies in a fit of exceptions from almost every component of the game.

Gas giants with rings have translucent edge around them

OPMs Sarnus and Urlum, the only planets with rings in my mod, have translucent edges that obscure part of the rings and other things such as orbital paths. Both in previous Kopernicus versions as the more recent ones like 0.0.5 and the dev version.

While I haven't tried it on a vacuum body, I do suspect it is related to interplay between the rings and the gas giant's atmosphere.

Image from KopernicusTech version, but it looks the same in my Kopernicus only WIP: http://i.imgur.com/ByHgxgC.png

Questioning the Logic

Can anyone tell me why this

// Fix the maximum viewing distance of the map view camera (get the farthest away something can be from the root object)
PSystemBody rootBody = PSystemManager.Instance.systemPrefab.rootBody;
double maximumDistance = rootBody.children.Max(b => (b.orbitDriver != null) ? b.orbitDriver.orbit.semiMajorAxis * (1 + b.orbitDriver.orbit.eccentricity) : 0);
PlanetariumCamera.fetch.maxDistance = ((float)maximumDistance * 3.0f) / ScaledSpace.Instance.scaleFactor;

Got changed to this?

        // Fix the maximum viewing distance of the map view camera (get the farthest away something can be from the root object)
        PSystemBody rootBody = PSystemManager.Instance.systemPrefab.rootBody;
        double maximumDistance = 1000d; // rootBody.children.Max(b => (b.orbitDriver != null) ? b.orbitDriver.orbit.semiMajorAxis * (1 + b.orbitDriver.orbit.eccentricity) : 0);
        if (rootBody != null)
        {
            maximumDistance = rootBody.celestialBody.Radius * 100d;
            if(rootBody.children != null && rootBody.children.Count > 0)
            {
                foreach (PSystemBody body in rootBody.children)
                {
                    if (body.orbitDriver != null)
                        maximumDistance = Math.Max(maximumDistance, body.orbitDriver.orbit.semiMajorAxis * (1d + body.orbitDriver.orbit.eccentricity));
                    else
                        Debug.Log("[Kopernicus]: Body " + body.name + " has no orbitdriver!");
                }
            }
            else
                Debug.Log("[Kopernicus]: Root body children null or 0");
        }
        else
            Debug.Log("[Kopernicus]: Root body null!");
        Debug.Log("Found max distance " + maximumDistance);
        PlanetariumCamera.fetch.maxDistance = ((float)maximumDistance * 3.0f) / ScaledSpace.Instance.scaleFactor;

The original logic is that the maximum orbital radius of any of the root body's children is going to dwarf that of any child body. Like Kerbin->Mun is much less than Sun->Kerbin, or Sun->Kerbin much less than Black Hole->Sun.

Also, can we find some common time this weekend to chat (Thomas, NathanKell, Me)?

Spawned Stars and CelestialBodies

I'm implementing a SolarPanel-Fixer for custom Stars into Kopernicus, similar to the StarSystems-Fix. But for this, I need the CelestialBody-Component of my custom Star, which is some sort of broken, or non-existent. Is there any possibility to fix that? I've been trying to fix this for the whole day now, but all I got were bugs. ^^

Best regards!
Thomas (The guy who likes Kopernicus and who is coding too much:D)

Support navballSwitchRadiusMult

1.0.4 lets you change what multiplier is used to body radius for when to switch the navball from srf to obt. Kopernicus should support it in Properties.
navballSwitchRadiusMult (Default 0.06)

ScaledSpace cache does not export new PQSMods

Situation: I've added a PQSMod to Hodor (VoronoiCraters) but in ScaledSpace I don't see them. Even if I completly remove the check and generate the .bin file for every single planet, nothing happens.

Game alternates between stock sizes and configured system resizes

I currently have the following issue when I install a Kopernicus mod that does nothing besides resizing stock planets:

  • First start: everything stock size.
  • Second start: everything properly resized.
  • Third start: everything stock size.
  • Fourth start: everything properly resized.
  • And so on and so forth.

I can reproduce this at will with a fresh stock 1.0.4 instance and no other mods except the Kopernicus mod in question. For example, it works with both Paul Kingtiger's KScale2 and with Eudae55's Kerbol 3.7 for me.

In both cases Kopernicus 0.1 is involved. I have tried manually upating to 0.2.2, but it renders the resizing configs nonfunctional and results in stock sizes every time.

What can I do to help you guys track this down?

Kopernicus Wiki

We need to put together documentation on all the systems from Kopernicus and what all the options do.

Persistent crash to desktop in career mod and achieving orbit

Hello,
I am getting an CTD when achieving orbit in career mode. This is repeatable in KScale2 and 64K so I suspect it is a Kopernicus issue rather than an issue with the config files (KScale2 is very light).

To reproduce:
Start a career mode game with some starting science points.
Unlock a liquid fuel engine and tank (not required but makes it easier)
Launch a simple craft into orbit (I use the infinite fuel cheat to make it easier)
Various automatic contracts and records are reached during launch, but on completing the circularize burn to achieve orbit the game crashes. Note you can achieve any altitude sub orbital, this only happens when your Pe is high enough for stable orbit.

Tested on Kopernicus 0.9

Overlays only showing when zoomed out at max

I'm playing with Outer Planets Mod and I've scanned the planets using the stock scanner. When I activated the overlay map for Ore, it didn't show up. Same for the other resource overlays.

The overlays only showed up when I zoomed very far out in flight view or if I viewed via map view. This only happens for some custom planets, and none of the stock ones.

These images are showing SCANsat overlays but the same thing happens for stock overlays.
Zoomed out just before the overlay shows up:
Not showing

Zoomed out to max, then overlay shows up:
Showing

Configuration/Body.cs:235 - Un-necessary Code

Should move generating the atmosphere shell mesh to the Atmosphere object. Since no scaling is required anymore, this won't cause issues. It also helps to clean up that disgustingly large function.

AtmosphereFromGround does not work on templated planets

If you create a new planet, based on, let's say Tylo, add an Atmosphere { } node to it and set all the values like pressureCurve and lightColor, the Sky is totally black when you land on it's surface.
I have compared the created AFG to the one from Laythe, but I couldn't notice any differences. :/

Mun has Kerbin's map

At first I thought it was another mod or the configs I had made (which only changed waveLength for atmosphere) but when I tried it in 100% stock it still happens. OpenGL and D3D9 same thing.
2015-06-24 23_04_22-kerbal space program
2015-06-24 23_04_30-kerbal space program
2015-06-24 23_04_40-kerbal space program
As you can see, Kerbin's hightmap. I'm using Kopernicus version 0.0.9, on KSP 1.0.2, with MM 2.6.5

Terrain glitches when timewarping in Space Center scene and launching through launchpad (might only occur when Kerbin is reparented)

I'm the developer for Kerbal Construction Time and I keep seeing reports of KCT and New Horizons not working together and causing tons of terrain glitches (which then get blamed on KCT). I determined that it is actually a Kopernicus bug that appears to happen when you timewarp at high rates while in the space center scene (might just require a large displacement of Kerbin, since the more you timewarp the worse it gets) and then launch a craft without first changing the scene (by clicking the launchpad or runway, perhaps by clicking on a vessel that's near KSC but I haven't tested that). It seems to happen only when Kerbin is reparented, as I could reproduce it in New Horizons and Alternis Kerbol, but not with just Kopernicus.

I also reported it on the forum here, and on the New Horizons thread here but nobody seemed to notice it. Those posts have pictures and a log file.

The problem also appears to happen if you load the game, then a save, and launch immediately without timewarping or changing scenes.

If you need any other info, let me know.

For the time being I'm advising everyone who uses KCT with New Horizons to timewarp in the Tracking Station, then switch back to the Space Center to launch.

Pre-release vs release

Even though Kopernicus is technically in pre-alpha, in order for CKAN to index releases, releases must not be marked as 'pre-release'. This is why we are unchecking that box.

Texture Problem

When i load the game with the mod installed my space center becomes a ray of red light. My lander on Duna is floating, and none of the new planets have textures. What did I do wrong?

Format for PQSMods

I am working on a script (or possible pull request of Kopernicus itself) to enable use of Planet Factory config files in Kopernicus. This is really the last 'missing link' before Kopernicus can be actively used, imho, and I have spent hours combing through the code. I've managed to map all but the PQSMod configs to Kopernicus configs. What is the implemented or intended format for PQSMod nodes which are dynamically loaded?

Main title screen not loading

Hi I tried installing Kopernicus 0.2 on my Linux version of KSP, it loads up all the textures and modules but as soon as I get to the loading screen the loading animation spins super fast but won't load. I checked the debug and it's just an infinite loop of "Look rotation viewing vector is zero".

Sphere of Influence priority

Is there a way to manually set a priority list for Sphere of Influence such as if one or more bodies are in close proximity the craft will orbit the one with the highest priority?

Contracts disappear when contracts non-stock bodies are spawned

This might no longer be an issue in the new Kopernicus, but in KopernicusTech contracts will (sometimes) disappear when contracts for non-stock bodies are spawned. I haven't been able to replicate it, but it's not easy to replicate anything in career mode anyway so it might still be an issue.

I believe someone mentioned in my thread it had something to do with the flightGlobalsIndex and another in-game numeric identifier for bodies not matching up or something.

Possibility of a download without the examples?

Hi there!

I'm wondering if it would be possible to supply a version in your releases that does not include all the examples? I find myself downloading ~44MB but the part I want is only ~500KB (the Kopernicus folder inside GameData).

I've no idea how hard/easy such a thing would be but I thought I'd throw it out there :)

Invisible Wall Around KSC

I've recently run into this issue while testing aircraft from the runway. While on approach the craft will collide with an invisible wall as it enters the KSC biome approaching the runway... and explodes.

I've testes this a few times and I can't link it to any specific part, altitude or direction... in all cases when approaching the runway (even from the side) the plane explodes.

I'm using New Horizons, and tried it without, but the bug was still there. Testing without Kopernicus, and with all other mods in place, the bug disappeared.

New planet not appearing in science archives

The RDArchivesController has its own PSystem prefabSystem member. It is not static and RDArchivesController has no "Instance" member by which to access it. There are probably other ways to locate the instance of this class, but will it then be too late to alter its systemPrefab?

Flights are getting killed with the addition of planets around stars

So, I've been scratching my head with this one for a week or two, now, and I can't figure out any solution. I don't think it's my config files, as I've checked them over and over again, but I'll include them at the bottom, anyway.

I've added 6 stars to the game, and I can leave them there without them causing any hassle. However, the moment I add a planet to any one of these stars, there are problems. Any flights that are around any of the stars will either be drastically teleported (I've noticed this in only one instance, with a ship around Adamant being moved to a fly-by trajectory of Titania, the star/black hole that had the new planet in previous tests) or killed outright, and those that are killed outright have typically been in orbit of the new planet. Any flights on the surface of the new planet will be unaffected, including flags and Kerbals.

Flights that are around any of the stock celestial bodies are also affected, though seemingly less so. I did notice a ship go missing from Kerbin orbit, so there's no safe haven, really.

I've tested this in my mod-laden x64 install and a fresh x86 install (with just a couple of mods that enable me to actually do the testing). I saw this occurring in both copies of the game, so I'm doubting it's KSP screwing up, and I can't see there being any way that it's the mods I'm using that are messing things up.

Any thoughts? If you need any other files, let me know and I'll try to get them.


Stars: https://www.dropbox.com/sh/izsyebbecwsorli/AACQH7IbfN70ILnLe1LdOgQ5a?dl=0

Test planet (the textures are 8K, just watch out): https://www.dropbox.com/sh/jrhvgmt7fguu71z/AADCD5GGu1kPnGm-NTUngaqGa?dl=0

(Install the planet to AdamantSystem from the Stars download above; config file obviously goes in Config, and the texture folder is to be dropped in, well, Textures)

baryCenter ScaledSpace shows up in Science Archives

Title is pretty self explanatory.

When using the baryCenter feature you can still find the body in the science archives, and it shows also it's model.

(e.g. if you use jool as a template, you'll see an image of jool)

this is low priority, I just put it here to help tracking the issues

let me know If I should report less stuff :D

👍

Conflict with "A visor for Val"

I think your modifications to the starting menu scene undo Lilleman's "A visor for Val" tweak (since, when I've got Kopernicus and valVisor and nothing else installed, I see your debug notices in the log immediately after "GVSA" -- "Give Val Some Air"). Please stop asphyxiating Val! :) (Or give Lilleman some guidance to fix things on his end, I guess.)

Deactivate Orbit Renderer

is there any way to deactivete the orbit renderer?
I went through the OrbitLoader.cs but I couldn't identify anything that may help with that.

I've already tried "color = 0,0,0,0" but this still renders a black orbit.

I don't know if this can help you, but kittopia already did that
https://github.com/KCreator/Kittopiatech_Planeteditor/blob/cfa711bed17b69e8b3b876771c3fd46f983e298f/Source/Planet_GUI.cs

I think the important bit may be this one:

cbBody.orbitDriver.Renderer.drawMode = OrbitRenderer.DrawMode.OFF;

but I'm not sure

loading stock heightmaps

I am trying to load stock heightmaps with this code

VertexHeightMap
{
map = BUILTIN/oceanmoon_height
deformity = 8000
offset = -2000
scaleDeformityByRadius = false
enabled = true
order = 100
}

but this isn't working

I've tried loading other heightmaps but the result doesn't change.

I was able to load normal_maps and color_maps. but not heightmaps

is this a bug or am I doing something wrong?

Reference frame shift between "universal" and "rotational"

I've reported a weird behaviour of KSP (not direcly related to kopernicus)
both in the forum and in the KSP bug tracker

forum: http://forum.kerbalspaceprogram.com/threads/128497

bugtracker: http://bugs.kerbalspaceprogram.com/issues/5234

this was the answer:

"The game uses two reference frames: universal reference frame above 100 km (in Kerbin case, it differs for other bodies), and rotational reference frame below 100 km. Reason for this is to prevent alignment problems with ships landed on surface"

so there should be a parameter that defines at which altitude the reference frame changes.

I've noticed that making custom planets this altitude is copied from the template, would it be possible to assign one manually? Did you ever encountered anything like this?

It's not a major issue, so don't lose too much time on it ;)

keep up the good work

Sigma

Planetary rings "ignore" cloud cover

When playing with a visual enhancement mod that adds clouds (EVE), when said clouds are viewed through the planets' ring system, cloud cover is wiped away and removed, but only the area viewed through the rings. All other cloud persists fine.

Kopernicus Beta (0.2) issue with Linux

Hello!

Kopernicus Beta 0.1 doesn't work with my KSP 64 bits (fresh install) and ModuleManager 2.6.6 on LinuxMint 17.1 Rebecca 64bits.

If I install the plugin with Outer Planets Mod 1.7.1, the planets do not appear. I tested with Kopernicus Pre-Alpha Release 9 with OPM 1.7.1, the plugin and the OPM work fine.

Any chance to have a compatibility for the futur version? :)

Thanks you very much for you work and sorry for my bad english.

Take care,
Seloune.

Auto-set music space altitude

Just noticed when watching Scott Manley's RP-0 playthrough that the "space" music starts playing at 70 km. It would be nice if Kopernicus could set MusicLogic.fetch.flightMusicSpaceAltitude to FlightGlobals.GetHomeBody().atmosphereDepth automatically.

Custom Coronas Not Working

Custom coronas aren't working for stars. From what I can tell, there is some construct controlling the corona local transforms for the default coronas that is not working for the custom ones. I don't know where this construct is, but it exists somewhere.

0.0.9

@ThomasKerman I think we're ready but it's too late at night for me to feel comfortable releasing after me being the only one to test. If it looks good to you, though feel free.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.