Page cover image

🌑️Climate Module

Overview

The Climate Module manages the temperature, humidity, snow, and wetness of your ecosystem allowing you to propagate these values to other modules in your system.

Compatibility Information

βœ… Has equivalent COZY Biome Module

βœ… Requires the Time Module or System Time Module to change the temperature and humidity over the year

βœ… Requires the Material Module, MicroSplat Module, or TVE Module for snow and rain accumulation

Key Features

Global Controls

  • Control the temperature over the course of the year.

  • Control the humidity over the course of the year.

  • Control the temperature over the course of the day.

  • Control the humidity over the course of the day.

Local Controls

  • Control snow and wetness accumulation (requires the Material Module or the MicroSplat Module or the TVE Module to appear visually).

  • Designate temperature and humidity filters to offset your climate.

  • Get the current temperature and humidity.

Usage Examples

Setup Climate to Work Independent of the Time Module

In the Selection Tab set your control method to native. You can now set the temperature and humidity directly within the module.

Get the Current Temperature in Celsius

COZY uses the Fahrenheit scale for backend calculations by default. This is due to the fact that the 0-100 degree scale for Fahrenheit works as a more useful percentage when creating weather based FX when compared with Celsius. This aside, if you want to localize your game to a region other than the US, you will likely want to convert the current temperature to Celsius when you are displaying it for in-game UI.

Here is a code example for how to do this:

// Convert current temperature
currentTemperatureCelcius = (CozyWeather.instance.climateModule.currentTemperature - 32) * 5/9;

Last updated