Starbound

Starbound

Galactic Almanach - Biome Name Display
Biome Detection - Method Pros / Cons
Hey friend!

Looking through the biome detection that Galactic Almanach uses inspired me to try my own method for biome detection.

I didn't like how searching for object descriptors worked because it felt like it would give too many false positives, so I decided to use scripted critters instead that report their position when they spawn (they immediately die after reporting their position).


Using the object descriptors has the benefit of the data simply already being there when you arrive, but it has the downside of false positives with modded biomes that reuse existing objects.

Using critter spawns has the upside of always reporting the correct biome, but the downside of requiring the player to explore the area so critters can spawn first.

If you're interested in how I tried my approach, the code for it is over here:
https://github.com/LoftyLoftyLoftyLoftyLofty/sb_irisil/blob/main/scripts/lofty_irisil_util_biome.lua

There are also critter behaviors and behavior nodes that are used to hook scripts up to critter spawning.

I mostly just wanted to share this with you because your mod was the catalyst that made me decide to finally try to implement biome detection this way. Maybe it will be useful to you :os_ram:
< >
Showing 1-4 of 4 comments
Pixelflame  [developer] 9 May @ 7:28am 
I've tested this method extensively. Ultimately the only weakness is that if there are no objects to detect, it wouldn't work.

However, it does not have false positive issues as it uses a custom parameter on the biome's objects, as seen here.

{ "mode": "floor", "priority": 1, "variants": 1, "distribution": "/biomes/distributions.config:scatteredSmall", "type": "object", "objectSets": [ { "pool": [ [ 0.35, "pf_genericstone" ] ], "parameters": { "originBiome": "surface/moon" } } ] }

This parameter can be fudged sure, but nowhere else in the game does this parameter appear. Its unique to every biome and can only be made via biome gen. These are not in the object's config files at all, only parameters when shown.

And when said objects are picked up as an item, it reverts to the config, so placing objects doesn't cause false positives either.
Originally posted by Pixelflame:

This parameter can be fudged sure, but nowhere else in the game does this parameter appear. Its unique to every biome and can only be made via biome gen. These are not in the object's config files at all, only parameters when shown.

And when said objects are picked up as an item, it reverts to the config, so placing objects doesn't cause false positives either.

What I am currently refining in my method is how to accurately detect biomes after someone has used a terraformer / microformer. How does this method hold up when a terraformer is involved?
Pixelflame  [developer] 9 May @ 4:31pm 
Originally posted by LoftyLoftyLoftyLoftyLofty:
Originally posted by Pixelflame:

This parameter can be fudged sure, but nowhere else in the game does this parameter appear. Its unique to every biome and can only be made via biome gen. These are not in the object's config files at all, only parameters when shown.

And when said objects are picked up as an item, it reverts to the config, so placing objects doesn't cause false positives either.

What I am currently refining in my method is how to accurately detect biomes after someone has used a terraformer / microformer. How does this method hold up when a terraformer is involved?

Ah, good point. Haven't tried terraformers, I know they do spawn plants, but not so sure if it changes objects. I just realized that.
Originally posted by Pixelflame:
Originally posted by LoftyLoftyLoftyLoftyLofty:

What I am currently refining in my method is how to accurately detect biomes after someone has used a terraformer / microformer. How does this method hold up when a terraformer is involved?

Ah, good point. Haven't tried terraformers, I know they do spawn plants, but not so sure if it changes objects. I just realized that.
Objects with "biomePlaced" set to true will be spawned by terraformers.

EDIT: Oh yeah, I also just realized that critters / monsters may be useful for biomes with no tiles at all. Maybe both can be used.
Last edited by Void Eye Gaming; 31 May @ 7:59pm
< >
Showing 1-4 of 4 comments
Per page: 1530 50