Author Topic: [MOD] Simple Asteroid Respawner  (Read 1155 times)

Laserzwei

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    391
    • View Profile
on: January 12, 2019, 07:17:05 PM
This is a simple asteroid respawn script. It's based on vanilla's respawn file, but extends it for a use in actively loaded sectors.
It turns barren asteroid fields into nice mining places:
Spoiler: show



Video of an 360x sped up process:
Spoiler: show



It is not required to set the variable
numRichAsteroids
seen at the very beginning. I only had to use this for demonstration purposes.


It comes with 2 config options:
Quote
respawnTime
  • The time until the next batch of asteroids gets spawned.
and
Quote
respawnAmount
  • An percentage of the sectors original number of asteroids.
List of sectors with this script attached by default:
Spoiler: show

asteroidfield
asteroidfieldminer
functionalwreckage
miningfield
pirateasteroidfield
piratefight
resistancecell
smallasteroidfield
smugglerhideout
wreckageasteroidfield
startsector

So it only works in these sectors.
* It requires at least one (empty) asteroid in the sector to begin respawning.

From Avorion 0.23 on, this mod will be continued in the workshop (https://steamcommunity.com/sharedfiles/filedetails/?id=1692998037)

Motivation:
I mothballed an older project over at Github and I didn't want to throw this here away. So I updated it for 0.20.x.
This is not the only asteroid respawn mod:
Regenerative Asteroid Fields    With very customizeable resource respawning sectors
Asteroid Respawner
Attachment in the second post very similar script to simple asteroid respawner (might be outdated)
« Last Edit: May 21, 2019, 05:08:48 PM by Laserzwei »
My Mod Collection
My Discord     screw google captcha
My Github
Questions?
> PM me here on the forums!



Laserzwei

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    391
    • View Profile
on: January 12, 2019, 07:20:55 PM
Installation instructions
  • Download the .zip file from the 1st post
  • Place the content in the respective /Avorion/ folders. Create /mods/, if necessary. This will overwrite /data/scripts/sector/respawnresourceasteroids.lua

Version history
1.0.0 for 0.20.x (probably works with 0.19 as well) [2019-01-12]
  - initial release
« Last Edit: January 13, 2019, 08:35:06 PM by Laserzwei »
My Mod Collection
My Discord     screw google captcha
My Github
Questions?
> PM me here on the forums!