Mods / Temperature Height Tweak

Tags: #Tweak #Worldgen
Author: Burneddi
Side: Both
Created: Feb 21st at 9:40 PM
Last modified: Feb 23rd at 6:11 PM
Downloads: 8026
Follow Unfollow 90

Latest release (for Vintage Story 1.20.4, outdated):
temperatureheighttweak_0.3.0.zip  1-click install


A pet peeve of mine has long been walking up a 60-block tall hill and seeing ambient temperature drop by 10°C.

In the vanilla game temperature decreases linearly with elevation by about 0.16°C for each block above sea level. While this makes for nice snow-capped mountains, I feel it's not particularly realistic for hills, ridges and highlands to get so cold so quickly. Realism, of course, is impossible to achieve to begin with in a toybox world of very limited height (not to even get into how local terrain affects temperature, e.g. canyons being cooler than the mesas surrounding them), so here's a compromise solution.

What this does

This mod changes the function by which temperature decreases with elevation to follow a sigmoid curve rather than being linear. The temperature decreases very gently at first, then starts decreasing steeply at about 100 blocks above sea level until it intersects the vanilla temperature drop at about 170 blocks above sea level. From there the curve levels back out, but this won't be relevant for most worlds due to world height limitations.

To illustrate:

Blocks above sea level Vanilla temperature Modded temperature
0 20°C 20°C
50 12.2°C 18.6°C
100 4.3°C 13.3°C
150 -3.5°C 0°C
170 -6.7°C -6.7°C
200 -11.4°C -14.7°C

Below sea level this mod uses the standard linear function.

Or see this calculator or the mod screenshot: https://www.desmos.com/calculator/tlizehxfmy (in this calculator, the variable U controls the ambient base temperature)

New world recommended

While this mod can be dropped into an existing world, certain terrain features such as snow and glaciers on mountaintops will not update to reflect the changes in existing chunks.

The numbers in this mod are tuned for a world height of 320. It will work with other world heights, but shorter worlds will be warmer at peak elevation while taller worlds will be colder. This same limitation applies to the vanilla system though.

Configuration (changing the curve)

To configure the mod, run the game with it once and then edit TemperatureHeightTweak.json (or create it with the following content):

{
  "a": 188.0,
  "b": 0.03,
  "c": 155.0
}

These values correspond to the variables in the equation y = a / (1 + exp(-b(x - c))) - a / (1 + exp(bc))

image

Use this calculator (or any other graphing calculator) to adjust the variables until the curve has an acceptable shape. Adjusting them blindly is an exercise in madness, so don't try it.

Mod compatibility

This should work with pretty much any mod, including worldgen mods. This will only conflict with other mods that pretty much do the exact same thing, as there is no reason to patch the functions this mod patches except to change temperature elevation scaling.

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
0.3.0 temperatureheighttweak 7756 Feb 23rd at 6:11 PM temperatureheighttweak_0.3.0.zip 1-click install

Adds configuration options for the curve shape

0.2.1 temperatureheighttweak 202 Feb 22nd at 12:57 AM temperatureheighttweak_0.2.1.zip 1-click install

Removes the custom shader (for now)

0.2.0 temperatureheighttweak 68 Feb 21st at 9:41 PM Empty temperatureheighttweak_0.2.0.zip 1-click install

23 Comments (oldest first | newest first)

💬 Pentasis, Nov 20th at 10:37 AM

ShaeTsu That makes sense to me. Thanks.

💬 ShaeTsu, Nov 16th at 1:29 AM (modified Nov 16th at 1:48 AM)

Pentasis Take this with a grain of salt, but based on my experience messing around with super high world height, that's probably the entire idea behind the mod (or at least half of it). Go gen a world at max world height without this mod and compare ambient temperature at sea level vs a standard world height world, and you'll see the max world height world is noticeably colder. This has an adverse effect on flora generation especially, the landscape tends to get extremely barren just a few dozen blocks above sea level because the game doesn't account for world height at all anywhere in deciding altitude temperature. For example, an area that would be a pine/larch forest on 256 world height may be nothing but grass blocks on 384. At 384 world height, without this mod, you also start to see mountain tree gen in plains. 

💬 Pentasis, Nov 14th at 2:00 PM

@Burneddi : I was writing my own mod to change this when I came across this one. Can I ask why you decided to patch WeatherSystemBase instead of Climate? I will admit I am not a good coder but wouldn't WeatherSystemBase mess with biome and worldgen because you override the generation-value (whereas Climate would just change the final computed value)? But maybe I misunderstand, hence the question.

💬 Burneddi , Oct 22nd at 7:18 PM

The change this mod does is very simple, so it's likely to stay working with game updates. I'll probably bump the version number next time I touch Vintage Story again.

 

If the mod stops working, let me know (easiest way to contact me is via the VS Discord under this same nickname) and I'll see if I can update it. Failing that, the mod is open source (click the Source tab above the image) and anyone is free to fork it and make an updated version.

💬 FinkThinker, Sep 8th at 9:43 PM

This mod seems to work just fine for 1.21, just hasn't been officially "updated" yet.

After about an hour of testing I used the following configuration for a 448 height world, it seems to work well.

{ "a": 188.0, "b": 0.027, "c": 170.0}

 

💬 JaceAurelius, Aug 29th at 1:08 PM

Any chance this is going to update for 1.21.0? This mod is so helpful in my 384 height world.

💬 Duleva, Jul 23rd at 3:38 PM

Thanks to this mod, configuring the "sea level fix" mod to 0.21484375 for sea level for a world height of 512 has allowed me to have 110 depth worlds with 402 blocks now of height for world gen+building! Giving me much better world gen results from Terra Prety now 😁👍

 

Without this mod, my entire world with my sea level config would've had been 90% ice cold mountains due to icy low temps seen at your average spawn at 100 block height 😅.

To fix that I used these values for this mod:

"a": 180.0,
"b": 0.023,
"c": 250.0

It's a shame vanilla doesn't scale this automatically with world height nor includes the ability to adjust it without these essential mods though.

💬 ModernScience, Jul 23rd at 1:43 AM

Found a thing. It appears as though when you wipe server info/data with this mod installed, if you provide a config file on initial startup, the server will hang indefinitely during launch. At least it seems to be what's happening. Here's my curves:

{
"DefaultLandCurveControlPoints": {
"p1x": 0.41,
"p1y": 0.11,
"p2x": 0.9,
"p2y": 0.49
},
"DefaultSeaCurveControlPoints": {
"p1x": 0.41,
"p1y": 0.11,
"p2x": 0.27,
"p2y": 0.98
},
"LandformOverrides": {}
}

💬 Streetwind, Mar 12th at 9:09 AM

That this mod exists at all just blew my mind. The lack of world height aware temperature scaling has long been a pet peeve of mine too, and I had resigned myself to faintly hoping for changes in the vanilla game...

Burneddi, you are a gentleman (or -woman, if you prefer) and a scholar.

💬 Eurielle, Feb 24th at 7:13 PM

Interesting, I'll go ahead and give it a shot to test it out then!

💬 Burneddi , Feb 24th at 6:11 PM

Eurielle it will work with any worldgen mod. To my knowledge there's no other mod that patches these functions.

💬 Eurielle, Feb 24th at 4:37 PM

Out of curiosity how does this interact with something like terra pretty?

💬 AmethystZhou, Feb 24th at 11:21 AM

Burneddi Wow thank you for the amazingly quick update! :)

And thanks DarkThoughts for the suggestion, it looks very promising.

💬 DarkThoughts, Feb 23rd at 6:49 PM

Sounds good. This annoyed me quite a bit too for farming, especially with terrain mods & configs where not everything is within 5 blocks of sea level, but also with how cold the game start actually is if you set the body temp threshold to 10 degrees Celsius (which afaik is close to the real life hypothermia threshold).

AmethystZhou

Conquest Landform Overhaul may be worth a look for mountains, and it is otherwise somewhat similar to Terra Prety in both being somewhere between vanilla and Plains & Valleys.

💬 Burneddi , Feb 23rd at 6:20 PM

AmethystZhou okay, I added a config file in version 0.3.0. In my experience Terra Prety very rarely had snow-capped mountains even with the vanilla curve though.

💬 AmethystZhou, Feb 23rd at 1:50 AM

Is there a way to change the function used by the mod? If I use Terra Prety mod for the worldgen, the tallest areas (those intended to be snowy mountains) are still a few degrees above freezing. It'd be great to be able to tweak the function slightly so the curve is flatter. Thank you very much for the mod!

💬 washaa, Feb 22nd at 9:42 PM

Great stuff

💬 Burneddi , Feb 22nd at 1:19 PM

Dirty_Shisno Below sea level it uses the original linear function for calculating temperature increase.

Tels it does affect tree spawning and other worldgen properties, but this obviously only works if the mod is active when those chunks are generated.

💬 Tels, Feb 22nd at 8:33 AM

This is a nice change and I think it should be in vanilla.
One question: Does it change the spawning of trees and entities like sheep and goat, that are temperature based or is it just the temp for the player?

💬 Dirty_Shisno, Feb 22nd at 6:00 AM

Does this make any noticable changes to temperatures below sea level or just above? Seems very interesting to say the least, can't wait to try it!

💬 Shadowise, Feb 22nd at 1:23 AM

Cool stuff!

💬 DUCATISLO, Feb 21st at 10:00 PM

fair

💬 jayu, Feb 21st at 9:56 PM

Very nice!

 (edit comment delete)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом