how is biome determined (on the world map)?

Started by rina_m, October 02, 2016, 05:38:44 PM

Previous topic - Next topic

rina_m

I noticed biome tiles have some hard and fast specifications when the world is generated -- ie rainfall separates a temperate forest from desert; temperature is all that separates temperate forest from shrubland
 
Could anyone point me to where these are coded? What is the likelihood of these being changed so that planets spawn with more realistic biome features and distribution?

ison

For each tile we call every BiomeWorker.GetScore() method, and then we choose a biome with the best score. Each biome has its own BiomeWorker. Currently biome workers return score based on the elevation, temperature, and rainfall of the tile.

RawCode

3 noise maps for more info http://lmgtfy.com/?q=procedural+biome+generation

this is academic stuff that cannot be implemented other way.

Serenity

An interesting thing is that it gets colder the deeper you get into mountain ranges :)

What I'd like is for some standard deserts (not extreme) to be hotter. At least during the day. I know that technically a desert is defined by a rainfall and not temperature. But hot and cold deserts should exist. Hot in the day and pretty cold at night would also be interesting.

MikeLemmer

Quote from: ison on October 04, 2016, 05:04:33 AM
For each tile we call every BiomeWorker.GetScore() method, and then we choose a biome with the best score. Each biome has its own BiomeWorker. Currently biome workers return score based on the elevation, temperature, and rainfall of the tile.

Are there To-Dos to give cold biomes native crops/trees? It's strange to me that tundras are often filled with trees that only grow 10% a year.

ison

#5
Quote from: MikeLemmer on October 05, 2016, 02:56:51 AM
Quote from: ison on October 04, 2016, 05:04:33 AM
For each tile we call every BiomeWorker.GetScore() method, and then we choose a biome with the best score. Each biome has its own BiomeWorker. Currently biome workers return score based on the elevation, temperature, and rainfall of the tile.

Are there To-Dos to give cold biomes native crops/trees? It's strange to me that tundras are often filled with trees that only grow 10% a year.

Not that I'm aware of. And short, or even none, growing periods is what makes theses biomes interesting.

MikeLemmer

Quote from: ison on October 06, 2016, 04:04:31 PM
Quote from: MikeLemmer on October 05, 2016, 02:56:51 AM
Quote from: ison on October 04, 2016, 05:04:33 AM
For each tile we call every BiomeWorker.GetScore() method, and then we choose a biome with the best score. Each biome has its own BiomeWorker. Currently biome workers return score based on the elevation, temperature, and rainfall of the tile.

Are there To-Dos to give cold biomes native crops/trees? It's strange to me that tundras are often filled with trees that only grow 10% a year.

Not that I'm aware of. And short, or even none, growing periods is what makes theses biomes interesting.

I know, I just think it's weird it affects the native plants as much as your crops; you would think with all the fires & lightning storms that occur once you crashland, the whole biome would be a barren wasteland by now.

(Also, there any plans to chance the fire mechanics so wildfires aren't blazing through 2 feet of snow?)

rina_m

Quote from: MikeLemmer on October 05, 2016, 02:56:51 AM
Are there To-Dos to give cold biomes native crops/trees? It's strange to me that tundras are often filled with trees that only grow 10% a year.

biome wild plants are in biomedefs i believe

Quote from: ison on October 04, 2016, 05:04:33 AM
For each tile we call every BiomeWorker.GetScore() method, and then we choose a biome with the best score. Each biome has its own BiomeWorker. Currently biome workers return score based on the elevation, temperature, and rainfall of the tile.

are biomeworkers hard-coded? is there any way to fiddle with the scores for individual biomes?

ison

Quote from: MikeLemmer on October 06, 2016, 05:02:32 PM
(Also, there any plans to chance the fire mechanics so wildfires aren't blazing through 2 feet of snow?)

I think the current fire behavior is ok, and it's fine that it can spread to other buildings even if there's snow around, if this is what you meant.

Quote from: rina_m on October 07, 2016, 09:31:14 AM
Quote from: ison on October 04, 2016, 05:04:33 AM
For each tile we call every BiomeWorker.GetScore() method, and then we choose a biome with the best score. Each biome has its own BiomeWorker. Currently biome workers return score based on the elevation, temperature, and rainfall of the tile.

are biomeworkers hard-coded? is there any way to fiddle with the scores for individual biomes?

"Worker" means that it's a def-specific special code, so yes, it's hard-coded, but it's still easy to change it - you just have to replace the whole worker (which in case of BiomeWorkers consists of just one method - GetScore()). You'd need to create a BiomeDef in your mod and use the same defName as the biome you want to modify, this will override the original BiomeDef. Then you can use your own workerClass (a C# class which inherits from BiomeWorker).

Zhentar

Quote from: ison on October 06, 2016, 04:04:31 PM
Quote from: MikeLemmer on October 05, 2016, 02:56:51 AM
Quote from: ison on October 04, 2016, 05:04:33 AM
For each tile we call every BiomeWorker.GetScore() method, and then we choose a biome with the best score. Each biome has its own BiomeWorker. Currently biome workers return score based on the elevation, temperature, and rainfall of the tile.

Are there To-Dos to give cold biomes native crops/trees? It's strange to me that tundras are often filled with trees that only grow 10% a year.

Not that I'm aware of. And short, or even none, growing periods is what makes theses biomes interesting.

I agree, but... tundra biomes have the worst feel of "this used to be a functioning ecosystem until I showed up to look at it". Three fourths of the year there is no food for wild animals except for the other starving wild animals, and very little grows for them to eat in the remaining portion.

Part of the problem is that there's no simulation of the things real wild animals do to survive winters (e.g. increased summer consumption to offset winter starvation, hibernation, etc.).

Another problem is that as soon as the temperature drops below -10C, absolutely all vegetation on the map is "leafless" and thus inedible (and requires a full 24 game hours above the leafless temperature before it will start growing again). This is reasonable, even generous, for milder biomes' plants but a poor simulation of alpine & tundra plant life, where lichens and other hardy plants take advantage of any moment above 0C to grow, and herbivores forage on these plants year round. (Related, another thing that would help this sort of biome work would be ingesting setting the growth back to 5% instead of destroying the plant. Ideally with some mechanism that leads to destroying the plant if the player tries to overgraze but wild animals leave the map without destroying plants)