Terasology / ClimateConditions

A module for managing temperature, humidity, and other climate factors
0 stars 6 forks source link

Make maps based on the world (blocks/biomes) rather than just noise #18

Open RatMoleRat opened 4 years ago

RatMoleRat commented 4 years ago

Basically what the title says. This bases the initial values for temperature and humidity maps on biomes, certain blocks, and (to a lesser degree than before) noise. Temperature still decreases with height.

To test, you can use the command showClimateMap temperature or showClimateMap humidity when standing at/near the edge of multiple biomes. I recommend the border between forest and desert to clearly see the difference. Note that the map displayed by showClimateMap does not rotate with the player, so you may need to turn your character so that your viewport is at the same orientation as the map.

ktksan commented 4 years ago

@RatMoleRat I tested the changes made in your PR (Only looked at the temperature values in various places)... The overall distribution of temperature seems good to me but there's a few things..

  1. The changes made for incorporating the snow part of the other biomes is working good, but there's a slight issue there, the temperature falls down slightly earlier than it should.... I think the condition position.y > seaLevel+96 in your code ends up being just position.y > 96 (seaLevel is zero). As soon as height reaches 96, the lower temperature kicks in however the snow blocks start at around 128 - 130... I think while placing the blocks during world gen the sea level used is around 33-34. which means seaLevel + 96 results around 128 -130.. But the seaLevel variable you use returns 0. Hence, the changes start right after y >=96. Please look into this..
  1. The getTemperature() method is returning 0 for all temperatures <= 0, it is not returning negative values. The climateValue command however is working correctly and returning negative values. Please fix the getTemperature() function too.