Space Engineers

Space Engineers

115 ratings
Asteroid Filter API
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Asteroid
File Size
Posted
Updated
600.097 KB
10 Apr, 2024 @ 1:23pm
4 Aug, 2024 @ 11:59pm
28 Change Notes ( view )

Subscribe to download
Asteroid Filter API

Description
This API can be used to apply filters to all procedural asteroids as they attempt to spawn. The filters can be used to block individual asteroids from appearing under whatever conditions are defined/registered.

You can create rules to limit asteroid spawning based on:
  • Proximity to planets/planetary rings/other objects
  • Speed of nearby grids
  • A custom 3D distribution curve
  • Random number generation
  • Current player resources
  • Asteroid size or composition
  • A timer
  • Any other logic desired...

Example
Multiple rules can be registered at once with differing priorities to create a complex ruleset to control asteroid spawning. For instance, you could apply rules with priorities:
  • P=0; Restrain asteroids to spawn with a 3D Perlin noise distribution to create random pockets of asteroids surrounded by large voids.
  • P=1; Restrain asteroids so that each has a 50% chance of successfully spawning.
  • P=5; When near certain planets, asteroids will spawn densely (none are removed), overriding the lower priority rules.
  • P=10; Asteroids will not spawn at all when near any grids moving faster than a certain threshold (to prevent collisions).
There are no limit on the number of rules you can apply, so feel free to experiment with different arrangements.

Other Notes
  • The system works by catching procedural asteroids as they spawn and then instantly deleting them if they are deemed invalid.
  • Asteroid spawns are not guaranteed to be deterministic depending on the rules applied, so you might enter an area and see many asteroids only to return later and find it empty. This does not apply to any asteroids that have been modified. Once an asteroid is changed (i.e. voxels), it will stay in the world forever.
  • This system does not spawn any additional asteroids; it can only remove them. Play with higher asteroid density to start with before adding restrictions if you aren't seeing enough of them.
  • Multiplayer is fully supported.

Config Values
https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/3218645300/6690735450901827357/

API Guide
https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/3218645300/6690735095222034427/



Mods That Use This
(Asteroid Filter: Grid Speed) https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3219800568
(Asteroid Filter: Clusters) https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3220848664

Other Mods:
https://steamhost.cn/steamcommunity_com/id/adrsquared/myworkshopfiles/?appid=244850

Join My Discord for Mod Discussion and Bug Reports
Mods by Echthros[discord.gg]

Support Future Mods/Updates
[ko-fi.com]
[www.paypal.com]
Popular Discussions View All (2)
0
16 Apr, 2024 @ 1:58pm
Config Values
Echthros
0
11 Apr, 2024 @ 9:20pm
Asteroid Filter Mod API
Echthros
13 Comments
Exelsiar 10 Dec, 2024 @ 3:46am 
Ahh perfect thank you!
Echthros  [author] 10 Dec, 2024 @ 3:40am 
Yes, they are designed for it.
Exelsiar 10 Dec, 2024 @ 3:35am 
Hi is it fine to sub to multiple filter mods?
Phantasm 5 Dec, 2024 @ 2:16am 
Thx a lot, I will try
Echthros  [author] 4 Dec, 2024 @ 3:28pm 
You might need to delete SANDBOX_0_0_0_.sbsB5 as well (you will get a warning when loading back in the first time). Though I would make a backup of the save first, just in case.
Phantasm 4 Dec, 2024 @ 2:02pm 
For some reason, all the changes in this file reset the moment I launch the world
Echthros  [author] 4 Dec, 2024 @ 12:31pm 
Open the Sandbox.sbc file for that world and look for <ProceduralDensity>. Set it to 0 and save the file. That should remove the normal procedural asteroids.
Phantasm 4 Dec, 2024 @ 7:40am 
Hi, can I use this mod to block asteroids from spawning in the usual way and make it so that asteroids spawn only through another mod (Planetary Asteroid Rings), which creates asteroid rings around planets? The problem is that I can't disable spawning in the settings because this is a modded world that has already been created, so the asteroid settings are locked.
Echthros  [author] 3 Dec, 2024 @ 12:04pm 
Tens of km, I believe.
Beamster 2 Dec, 2024 @ 3:37pm 
How large is the perlin nose voids? Like 5km wide or are we talking 1000km?