Jump to content

[1.8.1 - 1.9.x] KerbalKomets - Add komets to your game!


Angelo Kerman

Recommended Posts

17 minutes ago, Angel-125 said:

At the moment, I don't even know if I can fix it. The bigger issue is that asteroids that you've visited will be reshaped when you install the mod and when you uninstall it. I have to fix that first, then I can look at seeing what I can do about Kopernicus. If nothing, I'll be bummed because I use Kopernicus in my career game. But we'll see.

Not a problem thanks for replying.

Kind of happy that you use Kopernicus LOL :P

Nah thanks again for every thing you do :)

Link to comment
Share on other sites

After much head banging onto the keyboard, I finally figured out how to prevent existing asteroids from changing their shape when installing/uninstalling the mod, and I get my custom komet sample experiment!

0XQxW8U.png

Next step is to reduce the chances of komets spawning- it's a wee bit too high right now, even at 1%. The reason is that the game frequently spawns asteroids. Once I get that done, I can push out a new release and then see what I can do about Kopernicus.

Link to comment
Share on other sites

12 hours ago, CatastrophicFailure said:

Tagging on to this thread pending Kopernicus support, and hopefully it'll work with GPP too.:D

The day this mod popped up, we started on cfgs only to find it wasn't working with kopernicus.. This will be a thing with GPP though, absolutely

Link to comment
Share on other sites

6 minutes ago, smotheredrun said:

@Angel-125Not sure if this is possible, but could one rename a komet?

Of course. It works just like an asteroid. Simply fly to the komet and press the "Rename Komet" button. That's in the upcoming release, currently you press the "Rename Asteroid" button.

 

Edited by Angel-125
Link to comment
Share on other sites

I think I resolved the problem with Kopernicus. It uses its own asteroid spawner, and doesn't fire the stock onAsteroidSpawned event, which Kerbal Komets looks for. It does use onVesselCreate, however, and I tapped into that:

A0tQVr8.png

FSZlE3J.png

Definitely working with Kopernicus. :)

And here is version 0.3.5:

- Existing asteroids won't change shape when you install or uninstall the mod.
NOTE: If you've installed Kerbal Komets before, and visited an asteroid/komet, then its size and shape will change, but that will be the last time it does so.

- Reduced chances of spawning a komet.
- Komets now spawn with Kopernicus installed.
- If you manually flip an asteroid to a komet, its orbit will remain unchanged.
- Re-labeled the "Rename Asteroid" button to "Rename Komet" when the asteroid becomes a komet.

Now, I need your help. Right now with Kerbal Komets, the komet orbits don't extend out to the Outer Planets when you have OPM installed. You can change the orbit by editing the Settings.cfg file, which looks like the following:

KERBALKOMETS
{
    //Eccentricity modifiers for when the asteroid is a komet.
    //Komets are highly eccentric.
    eccentricityMin = 0.7
    eccentricityMax = 0.99

    //Minimum orbital altitude (m)
    kometMinAltitude = 100000

    //Max orbital altitude (m)
    kometMaxAltitude = 100000000000
}

You can change the minimum and maximum spawn altitudes, which are currently set for stock, but what I need is some play testing and /or a ModuleManager patch for OPM to make komets spawn with altitudes more reasonable for OPM. I've done my part, help make Kerbal Komets work well with OPM! :)

Link to comment
Share on other sites

Well Plock's apoapsis is 675,150,469,668m and Leto's from GPP is 596,852,300,000m so it really depends on how far out you want them to spawn.

@KerbalKomets:AFTER[GPP]
	@KERBALKOMETS
	{
		@kometMaxAltitude = 625000000000
	}

@KerbalKomets:AFTER[OPM]
	@KERBALKOMETS
	{
		@kometMaxAltitude = 700000000000
	}

... for example.

EDIT: Also in the parts directory you have the KometTail.txt file listed as a text file rather than a .cfg file? Is this intended?

EDIT EDIT: Also is there any opportunity to (I haven't exactly looked so correct me if this is already the case) increase the particle emission with proximity to the Sun and vice versa?

Edited by Poodmund
Link to comment
Share on other sites

1 hour ago, Galileo said:

The day this mod popped up, we started on cfgs only to find it wasn't working with kopernicus.. This will be a thing with GPP though, absolutely

Hey, totally off-topic, but what versions of SVE and SVT work with Kopernicus 1.2.2-4? In my career game, my KSP won't load, and I'm getting a bunch of this in my logs:

[EXC 09:38:10.988] NullReferenceException: Object reference not set to an instance of an object
    Kopernicus.Components.Ring.Update ()
[LOG 09:38:10.989] Look rotation viewing vector is zero
[LOG 09:38:11.003] Look rotation viewing vector is zero
[LOG 09:38:11.004] Look rotation viewing vector is zero

I'm running Kopernicus 1.2.2-4, OPM 2.1 (both alone in my dev build work just fine, hence I was able to fix integration issues with Kopernicus), SVT 2.0.2, SVE and 1.1.6-MR with JoolRings. This is what I see in game:

Jga7yTn.png

Any ideas what could cause that?

10 minutes ago, Poodmund said:

Well Plock's apoapsis is 675,150,469,668m and Leto's from GPP is 596,852,300,000m so it really depends on how far out you want them to spawn.


@KerbalKomets:AFTER[GPP]
	@KERBALKOMETS
	{
		@kometMaxAltitude = 625000000000
	}

@KerbalKomets:AFTER[OPM]
	@KERBALKOMETS
	{
		@kometMaxAltitude = 700000000000
	}

... for example.

EDIT: Also in the parts directory you have the KometTail.txt file listed as a text file rather than a .cfg file? Is this intended?

EDIT EDIT: Also is there any opportunity to (I haven't exactly looked so correct me if this is already the case) increase the particle emission with proximity to the Sun and vice versa?

Thanks! I have personal stuff to do today, but this evening I can incorporate this into the next release. The KometTail.txt is intended, it is a debug part that I use to make sure the emitter is working properly. Increase/decrease particle emission: not sure, depends upon what parameters I can play with in the emitter while in-game. It is something I've thought about though, along with a texture change of the asteroid itself. The texture change is something I definitely need help with, perhaps @Galileo can shed some light on this... :)

Link to comment
Share on other sites

15 minutes ago, Angel-125 said:

Increase/decrease particle emission: not sure, depends upon what parameters I can play with in the emitter while in-game.

I'm sure there is something in the API that can be called to give relative distance or orbital altitude with respect to the Sun body. On the topic of varying particle emission rate, SmokeScreen implements this for the rocket plume generation and does it relative to throttle value. You can then specify a curve in the config for the increase of rate of emission relative to throttle position.

It may be worth looking at the SmokeScreen source code if you're definitely interested in implementing something like this.

Edited by Poodmund
Link to comment
Share on other sites

2 hours ago, Angel-125 said:

Hey, totally off-topic, but what versions of SVE and SVT work with Kopernicus 1.2.2-4? In my career game, my KSP won't load, and I'm getting a bunch of this in my logs:

[EXC 09:38:10.988] NullReferenceException: Object reference not set to an instance of an object
    Kopernicus.Components.Ring.Update ()
[LOG 09:38:10.989] Look rotation viewing vector is zero
[LOG 09:38:11.003] Look rotation viewing vector is zero
[LOG 09:38:11.004] Look rotation viewing vector is zero

I'm running Kopernicus 1.2.2-4, OPM 2.1 (both alone in my dev build work just fine, hence I was able to fix integration issues with Kopernicus), SVT 2.0.2, SVE and 1.1.6-MR with JoolRings. This is what I see in game:

Jga7yTn.png

Any ideas what could cause that?

Thanks! I have personal stuff to do today, but this evening I can incorporate this into the next release. The KometTail.txt is intended, it is a debug part that I use to make sure the emitter is working properly. Increase/decrease particle emission: not sure, depends upon what parameters I can play with in the emitter while in-game. It is something I've thought about though, along with a texture change of the asteroid itself. The texture change is something I definitely need help with, perhaps @Galileo can shed some light on this... :)

I'll look into your issue with SVE and SVT just pm me your logs and a screenshot of your gamedata folder. 

What do you need help with regarding the retexture of asteroids? If you need textures, I can surely help with that :) let me know what you need

Link to comment
Share on other sites

I had a question about the issue of the style of game you play. namely, does Kerbal Komets work only in Science/Career modes and not Sandbox? or does this work in Sandbox as well.? I've actually installed this and am playing a sandbox mode game, and have the sliders set up to 50% and I still have yet to see a comet show up on screen.

 

If a little clarification on the settings could be made it would be most appreciated.

 

Also, I think the Comet naming idea would be a good one. as well, the ability to change a comet to a name you want.

 

Space_Coyote

Link to comment
Share on other sites

9 hours ago, Poodmund said:

I'm sure there is something in the API that can be called to give relative distance or orbital altitude with respect to the Sun body. On the topic of varying particle emission rate, SmokeScreen implements this for the rocket plume generation and does it relative to throttle value. You can then specify a curve in the config for the increase of rate of emission relative to throttle position.

It may be worth looking at the SmokeScreen source code if you're definitely interested in implementing something like this.

This would be harder than seems at first glance.... If you took the current orbital height as a percentage of the Apoapsis that would give you a nice relative range to determine how much particle effect to add to the komet. Only question is how this is calculated after an SOI change to a body that isn't Kerbol.

Link to comment
Share on other sites

2 hours ago, Space_Coyote said:

I had a question about the issue of the style of game you play. namely, does Kerbal Komets work only in Science/Career modes and not Sandbox? or does this work in Sandbox as well.? I've actually installed this and am playing a sandbox mode game, and have the sliders set up to 50% and I still have yet to see a comet show up on screen.

 

If a little clarification on the settings could be made it would be most appreciated.

 

Also, I think the Comet naming idea would be a good one. as well, the ability to change a comet to a name you want.

 

Space_Coyote

It works in all modes, just like asteroids do. You can rename the komet just like renaming an asteroid. You might even say that the komets are asteroids, with some makeup. :wink:

Link to comment
Share on other sites

42 minutes ago, Slamnam said:

Man, Angel-125 is a powerhouse. Keep it coming!

 

What other ideas are you kicking around for the future?

Thanks! :) I'm working on an update to Buffalo currently. After that, some DSEV updates, and an update for Pathfinder. So I've got a bit more to do...

Link to comment
Share on other sites

Here's a suggestion for the next update or in one of the future updates..

 

I noted when using version 0.3.5 that the comics all line up along one direction and that in reality, many comets come from different parts of the deep space area (or are or were parts of asteroid belts.

 

The issue here is that all comets line up.. but I figured out (Using Hyper edit0 how to set up comets so that they have varying orbits with varying inclinations and even different longitudes of Ascending nodes (This last point is important cause of the fact that isn't the Ascending node longitude that determines which way a comet comes from 

Inclination also plays an important role here as does the Semi-major axis of a set plus its eccentricity of its orbit.

Also changing the Periapsis is another issue, as some comets are "Sun Grazers" and others just are parabolic One shots (Sort of like certain comets in recent times (E.g. Hale-Bopp)_

 

but by using hyper edit I was able to modiy the orbits and thus get a more realistic looking System..(Some comets have certain orbits, that are nearly circular or planetary like, others are longer.

 

Also another point is that comets no only come from other locations but also from further out than the farthest most planets (I'm using the outer Planets mod, but by adjusting the semi-Major axis and Eccentricity I was able to alter a lot of paths here so that they are more realistic looking (Some are rather parabolic and make one large pass through the galaxy, others are elliptical and long term and others are  a lot shorter..

 

(Though I have to ask, what is a Kerbin Astronomical unit (AU?) if I knew that I could in theory set up, even more, realistic trajectories.

 

(The interesting thing that if you do a search for Cometary orbital data you can find a lot of data for comets already discovered in our solar system.

 

(Also if it is possible maybe some sort of orbits that are out there that circle the outside of the Kerbin system (Sort of like an "Oort Cloud" may be an area of space where we have an asteroid belt that actually orbit.. or something there the comets can sit out on the edge waiting for a "Nudge" by a planet to send them inwards..)

( I mean it would be interesting to see if this program could incorporate this kind of options. 

It's just suggestions and I hope the feedback can come up with some idea.s..

 

Anyway Back to playing "God" in sandbox mode and moving comets around.

 

(Also I think the naming idea still would be a good idea.

 

Space_Coyote

Link to comment
Share on other sites

15 minutes ago, Space_Coyote said:

Here's a suggestion for the next update or in one of the future updates..

 

I noted when using version 0.3.5 that the comics all line up along one direction and that in reality, many comets come from different parts of the deep space area (or are or were parts of asteroid belts.

 

The issue here is that all comets line up.. but I figured out (Using Hyper edit0 how to set up comets so that they have varying orbits with varying inclinations and even different longitudes of Ascending nodes (This last point is important cause of the fact that isn't the Ascending node longitude that determines which way a comet comes from 

Inclination also plays an important role here as does the Semi-major axis of a set plus its eccentricity of its orbit.

Also changing the Periapsis is another issue, as some comets are "Sun Grazers" and others just are parabolic One shots (Sort of like certain comets in recent times (E.g. Hale-Bopp)_

 

but by using hyper edit I was able to modiy the orbits and thus get a more realistic looking System..(Some comets have certain orbits, that are nearly circular or planetary like, others are longer.

 

Also another point is that comets no only come from other locations but also from further out than the farthest most planets (I'm using the outer Planets mod, but by adjusting the semi-Major axis and Eccentricity I was able to alter a lot of paths here so that they are more realistic looking (Some are rather parabolic and make one large pass through the galaxy, others are elliptical and long term and others are  a lot shorter..

 

(Though I have to ask, what is a Kerbin Astronomical unit (AU?) if I knew that I could in theory set up, even more, realistic trajectories.

 

(The interesting thing that if you do a search for Cometary orbital data you can find a lot of data for comets already discovered in our solar system.

 

(Also if it is possible maybe some sort of orbits that are out there that circle the outside of the Kerbin system (Sort of like an "Oort Cloud" may be an area of space where we have an asteroid belt that actually orbit.. or something there the comets can sit out on the edge waiting for a "Nudge" by a planet to send them inwards..)

( I mean it would be interesting to see if this program could incorporate this kind of options. 

It's just suggestions and I hope the feedback can come up with some idea.s..

 

Anyway Back to playing "God" in sandbox mode and moving comets around.

 

(Also I think the naming idea still would be a good idea.

 

Space_Coyote

Ok, so, Kerbal Komets is still alpha which means it's a work in progress. It says so on the OP. I know about the orbits, I have plans to vary the inclination and such. Thanks for the suggestions, that's basically what I have in mind.

Also, what the f is wrong with the existing naming??? I'm pretty irked that people keep complaining about naming komets when you can already do this! Do people not pay attention to the right-context menus? It works exactly like asteroid naming. You right-click the komet, and rename it.

When a komet is first created, it is given a designation and random name based upon type of komet, date of discovery, and a random kerbal name. This is very similar to how the real-world International Astronomical Union names real-world comets.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...