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: 692
Follow Unfollow 51

Latest file for v1.20.4:
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.

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v0.3.0 474 Feb 23rd at 6:11 PM Show temperatureheighttweak_0.3.0.zip Install now
v0.2.1 175 Feb 22nd at 12:57 AM Show temperatureheighttweak_0.2.1.zip Install now
v0.2.0 43 Feb 21st at 9:41 PM Show temperatureheighttweak_0.2.0.zip Install now

15 Comments (oldest first | newest first)

💬 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)