Space Engineers

Space Engineers

82 lượt đánh giá
Asteroid Filter API
   
Giải thưởng
Yêu thích
Đã yêu thích
Bỏ thích
Type: Mod
Mod category: Asteroid
Kích cỡ file
Đã đăng
Đã cập nhật
600.097 KB
10 Thg04 @ 1:23pm
4 Thg08 @ 11:59pm
28 ghi chú thay đổi ( xem )

Đăng ký để tải xuống
Asteroid Filter API

Mô tả
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://gtm.you1.cn/workshop/filedetails/discussion/3218645300/6690735450901827357/

API Guide
https://gtm.you1.cn/workshop/filedetails/discussion/3218645300/6690735095222034427/



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

Other Mods:
https://gtm.you1.cn/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]
Thảo luận nổi bật Xem tất cả (2)
0
16 Thg04 @ 1:58pm
Config Values
Echthros
0
11 Thg04 @ 9:20pm
Asteroid Filter Mod API
Echthros
6 bình luận
Echthros  [tác giả] 16 Thg09 @ 2:41pm 
@REALRACE New asteroid gravity filter now available: https://gtm.you1.cn/sharedfiles/filedetails/?id=3332458377
REALRACE 15 Thg09 @ 2:45pm 
addendum: i do not know, if of interest for you, but i just found https://gtm.you1.cn/sharedfiles/filedetails/?id=3033100558 which seems to prevent having asteroids in gravity (too;)
REALRACE 11 Thg09 @ 4:27pm 
hi, thanks for answering. instead of (constant) radii, it would be better simply to check for the existence of gravity (btw. TryGetPlanetPosition() is not reliable in non-vanilla gravityfalloffs).
cool, i will happily wait then 8-)
Echthros  [tác giả] 11 Thg09 @ 3:56pm 
A new mod using this API would be necessary. That said, I've gotten a few requests for something similar, so I'll go ahead and make that now.
REALRACE 11 Thg09 @ 1:29pm 
hi, i search for a possibilty to prevent asteroids from spawning inside a radius of 300km around Earth (at the end in every gravity-well - falloff "2"). afaik, your mode can delete them, if they would not fit ... now ... are such filters already defined somewhere? or do i need to have a look into your cluster-mod how to do? cheers
<†>Baigle1<†>™ 17 Thg08 @ 10:41pm 
If the game lags when generating asteroids at high speed it might be beneficial for the mod to hook and gate the spawning rather than triggering additional actions after spawning. Reducing lag will certainly improve adoption and enjoyment of this aging Havok-2013 engine before the release and modding crowd starts on the Havok-202X engine with fancy algorithms and protocols.