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.
[Release] Asteroid Respawn 1.0 (for 1.79 only)
Moderators: winston, another_commander
[Release] Asteroid Respawn 1.0 (for 1.79 only)
Last edited by spara on Thu Jun 19, 2014 6:24 pm, edited 3 times in total.
- CaptSolo
- ---- E L I T E ----
- Posts: 909
- Joined: Wed Feb 23, 2011 10:08 pm
- Location: Preying Manta
- Contact:
Re: [Wip] Asteroid Respawn 0.1
Superb idea, Spara. Should make for some very happy miners.
Re: [Wip] Asteroid Respawn 0.2
Thanks Solo .
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.
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)
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.
The use of startUpComplete makes this a 1.79 only and as such I have packaged it as an oxz.