Custom Asteroids

Custom Asteroids

21.6k Downloads

Duplicate asteroids

KSAMissionCtrl opened this issue ยท 5 comments

commented

Background Info

  • Operating System: Win10
  • KSP Version: 1.3.1
  • 32-bit/64-bit KSP: 64
  • Custom Asteroids Version: 1.5.0

Issue Description

Seeing asteroids spawning with the same name in the exact same orbit and position as they did days or weeks ago. I have 3 different save files for various purposes and I pull asteroids out of each of them into a separate save, so it's reasonable to think that maybe different saves would generate asteroids of the same name but unless the orbital properties are determined based on the name it's a bit weird to see the exact same orbit show up as well. Some asteroids that have the same name are of a different group (KBO vs. Trojan, for example) so in that case their orbits are different. The stock "Ast." group does also produce duplicate names at time but no where near the frequency of the Custom Asteroid groups.

Not sure what to tweak in the SFS or CA config to play around and see how the spawning behavior changes over time.

commented

Example of a dupe:
ksp_x64 exe_dx9_20180128_065440
ksp_x64 exe_dx9_20180128_065443

commented

another observation that may help is that this process seems cyclical. Right now I'm barely seeing any dupes generated, if at all. I remember having a period of no-dupes a few months ago and was like "oh maybe this isn't really an issue" and then they started gradually coming back. Now I've noticed they've just tailed off again

commented

Hi, sorry for not getting back to you sooner. Do you need to track 4000 asteroids to see the issue? That's... quite a bit more than I tested with.

Also, how do you track that many? Is there a mod that auto-tracks them?

EDIT: also, you're obviously not playing with the stock solar system. Is it OPM?

commented

Do you need to track 4000 asteroids to see the issue? That's... quite a bit more than I tested with.

No, I noticed the duplicates spawning back when I only had a few hundred. It hasn't seemed to really have gotten any worse the more asteroids I have, it's just a thing that happens

how do you track that many?

I just make sure to never actually show them all in the tracking station. The game runs a tad slower but otherwise no issues. Also this is a separate save I don't actually play in. It's just for holding asteroids. When needed I copy the VESSEL{} into my main save (that is the extremely short answer)

Is it OPM?

yes

commented

Unfortunately, this seems to be something weird with how KSP handles random numbers (specifically, it resets the Unity RNG to a value that depends on your machine and KSP version, but not on the unique game seed). I've added a workaround that greatly reduces the number of duplicate asteroids, but I don't think I can prevent all of them.

Though I'll admit I only tested up to 800 or so... ๐Ÿ˜‰