Starstrider42

[1.3.x] Custom Asteroids 1.5.0 - May 29

Recommended Posts

Last%20Release-May%2029,%202017-red.png   Custom-Asteroids.svg?label=Version  KSP-1.3.0-orange.png   CKAN-Indexed-brightgreen.svg   Custom-Asteroids.svg

Tired of asteroids hitting Kerbin every other month? Bored with your 10th identical playthrough of an asteroid redirect mission? Want bigger Δv challenges?

Custom Asteroids is a rework of the stock asteroid system. Just install the mod, load up a save game, and any newly spawned asteroids will appear in locations around the solar system, including an asteroid belt, a more varied near-Kerbin asteroid population, and cometary orbits (ice and tails not supported at present, sorry). No in-game configuration necessary once the included asteroid packs are installed, although nearly everything can be configured.

l93kdHe.png

Latest versions

KSP 1.3: Version 1.5.0 (SpaceDock) (Github)

KSP 1.2*: Version 1.4.1 (SpaceDock) (Curse) (Github)

KSP 1.1.2-1.1.3*: Version 1.3.1 (SpaceDock) (Curse) (Github)

*No longer supported.

Custom Asteroids is available under the MIT license. Source code hosted by Github. Please report bugs on the issue tracker, and include the mod version, the KSP version, whether it's 32- or 64-bit, and your operating system.

Public documentation, including both user's guide and public mod API. User's guide also included in the download in .md (plain-text) format.

Optional Asteroid Packs

I am happy to take config file submissions to go with popular solar system mods.

Easy-to-reach belts around KSP 64k planets by @Sandworm

Features

  • (Optional) new spawn system that lets asteroids appear gradually over time, instead of any time there are no untracked asteroids. For players who prefer the stock spawner, set Spawner = Stock in the options file.
  • Modular config files let you pick and choose asteroid packs, or write your own.
  • Asteroids may appear in any number of groups, including planet intercept trajectories. All orbital elements and spawn rates are customizable. Asteroids may even be placed around planets or moons.
  • Asteroids come in five classes: Stony, Metallic, Carbonaceous, Icy-Organic, and Comet. Different classes have different resource content (need 3rd-party mods to take advantage) and different science flavor text.
  • Supports update monitoring through KSP-AVC and CKAN.

Planned Features

  • Distinct models/textures for each asteroid class.
  • Control of asteroid size per group.
  • An asteroid discovery API for 3rd party modders (e.g., telescope mods).

Known Issues

  • There is currently no way to determine the asteroid class from the tracking station or during approach, though it will be displayed in the right-click menu once you're attached.
  • Does not interact with Kopernicus -- if you install CA and Kopernicus, you'll have two completely independent asteroid systems.
  • Does not interact with Sentinel telescope; Sentinel-spawned asteroids will follow stock rules.

Credits

Custom Asteroids started with some proof-of-concept code by xEvilReeperx for placing asteroids in specific orbits. I am eternally grateful for their help, as otherwise this mod would not exist. Many thanks to Thomas P. for improving the original method.

Custom Asteroids was inspired by Trueborn's Custom Biomes and rbray89's Visual Enhancements, and follows a similar "customize everything" philosophy. While Custom Biomes is now defunct, I still recommend Visual Enhancements. :D

Edited by Starstrider42
Updated for 1.5.0 release

Share this post


Link to post
Share on other sites

WOudlnt gilly sized asteroid be impossible to move around and affect like part of ship that asteroid in fact is?

Share this post


Link to post
Share on other sites

Very cool, however, My computer literally dies at high time warps(My computer is a beast too.). So until some optimization is done, I think I'll take a pass.

Share this post


Link to post
Share on other sites
WOudlnt gilly sized asteroid be impossible to move around and affect like part of ship that asteroid in fact is?

agreed.

Should use Remote tech 2 for the astroid discovery API or ScanSAT

Share this post


Link to post
Share on other sites

Congrats on the release, the best asteroid mod out there. I haven't tried the release version though, but I played a lot with pre-release. The feature I am looking forward the most is discovery API.

RSS config is coming.

Share this post


Link to post
Share on other sites

I think you shoudl include some asteroid detection method, station or basaes, another reason to send probes.. Many probes.

Share this post


Link to post
Share on other sites
WOudlnt gilly sized asteroid be impossible to move around and affect like part of ship that asteroid in fact is?

Pretty much anything larger than class E would be unmovable. That's why ARM doesn't include any (and makes asteroids unnaturally light, to boot). But people have been talking about using large asteroids for bases and the like. For that, or even for flyby/impactor/etc. missions, a, say, 200m asteroid would be a nice target.

But Gilly sized is maybe a bit too ambitious. There's a huge dynamic range in between class E and Gilly (which, if you just extrapolate the current system, would be class Q), so maybe I'll remove that from the feature description and just say the upper size limit is TBD.

Very cool, however, My computer literally dies at high time warps(My computer is a beast too.). So until some optimization is done, I think I'll take a pass.

EDIT: Are you saying you can't run KSP at high time warps in general, or are you saying this mod breaks time warping? If the latter, it's a bug -- I tested CA at 100,000×, in a heavily modded game, on a laptop, and didn't run into any ill effects.

Please give more details.

Should use Remote tech 2 for the astroid discovery API or ScanSAT
I think you shoudl include some asteroid detection method, station or basaes, another reason to send probes.. Many probes.

To clarify, I'm not planning (ATM) to make an asteroid detector myself -- for one thing, I've no experience modeling or making parts. But I've already gotten requests to support this from two different people, so once the API is done I imagine a mod for this would come soon.

Edited by Starstrider42

Share this post


Link to post
Share on other sites

EDIT: Are you saying you can't run KSP at high time warps in general, or are you saying this mod breaks time warping? If the latter, it's a bug -- I tested CA at 100,000×, in a heavily modded game, on a laptop, and didn't run into any ill effects.

Please give more details.

Too many asteroid spawn in too many places and then it kills my time warp. If there is a way to stop asteroids from spawning every 2 seconds, then I'm re-downloading and putting it back in. Then again, I do have this

Share this post


Link to post
Share on other sites
(and makes asteroids unnaturally light, to boot)

Because we all know KSP is all about being totally accurate, especially when it comes to the densities of celestial bodies :P

Share this post


Link to post
Share on other sites
Too many asteroid spawn in too many places and then it kills my time warp. If there is a way to stop asteroids from spawning every 2 seconds, then I'm re-downloading and putting it back in. Then again, I do have this

Ah, ok, I did not foresee 10,000,000× time warp. That will be tricky to handle. The basic issue is that, at present, asteroid cleanup is scheduled every 15 seconds of player time using the old system, which at your warp speed is 4.7 years of game time. I'll have to find a way to modify it without introducing lots of lag from the cleanup...

I can suggest two possible workarounds at the moment. The simplest is to set UseCustomSpawner = False in the options file, as stated in the first post. You'll still get the new spawn locations, but the old spawn behavior, which scales down with time warp and has an explicit asteroid cap.

Another solution is to go into the files in configs and reduce all the spawn rates by, say, a factor of 100. But that means you won't get any asteroids when you're NOT at 10,000,000×. For your gaming setup, I suspect using the stock spawner is the more appropriate option.

Edited by Starstrider42

Share this post


Link to post
Share on other sites

Does this work with older saves? I just started a new one so it won't really matter, but it will still take time away if I have to start over.

Share this post


Link to post
Share on other sites
Does this work with older saves? I just started a new one so it won't really matter, but it will still take time away if I have to start over.

For me it works.

Anyway, thanks for the work arounds. This is going to be one of this have to install each time mods.

Share this post


Link to post
Share on other sites
Does this work with older saves? I just started a new one so it won't really matter, but it will still take time away if I have to start over.

Yes, with one caveat: any asteroids, tracked or untracked, that already appeared before you installed the mod will be unchanged.

Edited by Starstrider42

Share this post


Link to post
Share on other sites

So after some bugs with maximum time warp in general, I got rid of it and changed the .cfg.

Works wonders!

Question time! How possible would it be to make a .cfg to put asteroids around Jool? In BA I'm adding rings to jool and this would make a wonderful addition.

Share this post


Link to post
Share on other sites
So after some bugs with maximum time warp in general, I got rid of it and changed the .cfg.

Works wonders!

Question time! How possible would it be to make a .cfg to put asteroids around Jool? In BA I'm adding rings to jool and this would make a wonderful addition.

Very possible. rbray89 asked for that feature for the exact same reason before I'd even released 0.1. :D

To get Jool-centered orbits, all you really need to do is set centralBody = Jool in the asteroid config. You may want to read CUSTOMIZATION.md (either in the mod directory or online) for a couple of advanced features that will help. Specifically, scaling orbits to Ratio(Jool.rad, <some factor>) is a good way to pick the inner edge of the ring.

EDIT: also, despite what I said in the first post, CA doesn't really care where asteroids' .cfg files live. So you can put yours in the Visual Enhancements directory and it should still work. Should make packaging a little easier. :)

Edited by Starstrider42

Share this post


Link to post
Share on other sites

So, with NKOs spawning that don't immediately happen to encounter Kerbin but are on an orbit that could someday encounter Kerbin... how best should I figure out roughly when that would be?

Share this post


Link to post
Share on other sites
So, with NKOs spawning that don't immediately happen to encounter Kerbin but are on an orbit that could someday encounter Kerbin... how best should I figure out roughly when that would be?

Given how big the kerbol system is compared to kerbin, given that orbits in KSP never change (no radiation pressure, no 3-body gravity, etc.), and especially given the small number of asteroids that will ever be simulated, it's nearly impossible for an NKO to collide with Kerbin. That's one of the reasons I created a group ("Potentially Hazardous Asteroids") that acts like stock asteroids.

There is a measure called the minimum orbit intersection distance that tells you if an asteroid could ever get in Kerbin's sphere of influence, but calculating it is a real pain -- you have to solve systems of nonlinear equations. :(

Share this post


Link to post
Share on other sites
Congrats on the release, the best asteroid mod out there. I haven't tried the release version though, but I played a lot with pre-release. The feature I am looking forward the most is discovery API.

RSS config is coming.

Any progress on an RSS config?

Share this post


Link to post
Share on other sites

Very nice, Was looking for this since I realized the asteroids only spawn around Kerbin.

However this has most likely been asked but, is it normal to still only see the default 7 asteroids until the new ones are encountered? I still only see 7 so I was just wondering.

Share this post


Link to post
Share on other sites
Given how big the kerbol system is compared to kerbin, given that orbits in KSP never change (no radiation pressure, no 3-body gravity, etc.), and especially given the small number of asteroids that will ever be simulated, it's nearly impossible for an NKO to collide with Kerbin. That's one of the reasons I created a group ("Potentially Hazardous Asteroids") that acts like stock asteroids.

I figured out how to do it for SOI intersection. Simple, really. Just switch to the asteroid (I used to edit a quicksave to do this but now the new Kerbal Alarm Clock lets you switch to any asteroid when its alarm fires), set Kerbin as the target, and if a Close Approach marker appears then set a maneuver node and use the right-click buttons to jump forward an orbit. Just tested this on an asteroid that swung by earlier in the game to find it will be coming back around into Kerbin's SOI in 46 years (earth time). Yea, in this case it's a bit of a non-issue but for newly-discovered LKOs it could be sooner

Edited by Gaiiden

Share this post


Link to post
Share on other sites

I would really like to have asteroids that are actually made up of a number of smaller asteroid parts - very close but not "docked". Is there any way to do that currently, like spawning 2 asteroids with very similar orbits?

Share this post


Link to post
Share on other sites
I would really like to have asteroids that are actually made up of a number of smaller asteroid parts - very close but not "docked". Is there any way to do that currently, like spawning 2 asteroids with very similar orbits?

I don't think so. What would stop the individual objects from drifting apart as soon as you give them a nudge?

In any case, given the limits of how KSP treats ships at long distances, I don't think you'd be able to keep two asteroids within a fixed distance of each other long term.

Share this post


Link to post
Share on other sites
I don't think so. What would stop the individual objects from drifting apart as soon as you give them a nudge?

In any case, given the limits of how KSP treats ships at long distances, I don't think you'd be able to keep two asteroids within a fixed distance of each other long term.

In fact that would be the intended behavior, just as in real life :) There are some counter-intuitive vagaries inherent in mining asteroids. KAS to the rescue!

Though if there were multiple in a cluster you might see some interesting pinballing...

Perhaps they could spawn in as multiple parts "attached" to each other, but would un-attach automatically if something collides with them? Hmm.

EDIT: Could that be done by setting the part's crash tolerance really low? Then you could enable surface attach, cobble some together as a vessel in place of a normal asteroid (is that possible with the spawning system?) and as soon as you touch down, it slowly breaks apart...

Edited by curiousepic

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