Page 1 of 1

[Release] Asteroid Respawn 1.0 (for 1.79 only)

Posted: Fri May 30, 2014 5:36 pm
by spara
A system can be emptied of asteroids because they are spawned only on load game and witchspace exit. If you're playing as a miner, then you might want that behaviour to be different. This oxz implements asteroid respawning into the game. It calculates the number of missing asteroids when you dock, finds an asteroid that is over 500 kms away from you and adds an asteroid field around that asteroid. The size of the new asteroid field is the number of asteroids destroyed before docking. In case no suitable asteroid is found, the missing asteroids will be spawned scattered around the player.

In short, for every asteroid destroyed a new asteroid is spawned on docking, keeping the number of asteroids in system constant. 500 km limit is quite a random one, I tried to choose a distance so far that you won't notice the new asteroid fields popping into existence. You'll rather have to find them.

Download from the expansion pack manager.

Re: [Wip] Asteroid Respawn 0.1

Posted: Sun Jun 01, 2014 12:56 pm
by CaptSolo
Superb idea, Spara. Should make for some very happy miners.

Re: [Wip] Asteroid Respawn 0.2

Posted: Mon Jun 02, 2014 6:47 am
by spara
Thanks Solo :D .

Tweaked the script a bit and put out a new version (0.2). Now, in the unlikely case where every suitable asteroid to be used as a spawn position is destroyed before the player docks, the respawned asteroids are scattered around the player (500-750 km away) instead of adding them as a field.

Re: [Wip] Asteroid Respawn 0.3 (for 1.79 only)

Posted: Mon Jun 02, 2014 12:25 pm
by spara
Such a small oxp and I just have to keep tweaking it. The first implementation was a bit of an overkill, using shipSpawned, but then again, it was just concept proofing. Version 0.3 has a much more sane method of simply calculating the number of asteroids in startUpComplete & shipExitedWitchspace and then after docking comparing the number of asteroids in system to that original number. If asteroids are lost, then they are compensated by spawning more asteroids.

The use of startUpComplete makes this a 1.79 only and as such I have packaged it as an oxz.