Page cover image

🌦️Weather Module

Overview

Harness the power of the weather with the Weather Module. Determine what Weather Profiles can be played using a Forecast Profile and watch as COZY automatically propagates that information to the rest of the weather sphere.

Compatibility Information

βœ… Has equivalent COZY Biome Module

βœ… Works well with the Climate Module

Key Features

Manage The Global Weather

  • Use data from the Climate Module and Time Module to select a weather profile to play

  • Manage a forecast

  • Determine what weather profiles will be used by the system

  • Determine a transition time (in seconds) for your weather

Usage Examples

Get the Current Weather Type in C#

// Use this code to get the current weather
    CozyWeather.instance.weatherModule.ecosystem.currentWeather;

Set the Current Weather in C#

// Use this code to set the current weather
    CozyWeather.instance.weatherModule.ecosystem.SetWeather(yourWeatherProfile);

Add a New Weather Profile to the Forecast

// This code will add yourWeather (reference for your weather profile) to the end of the forecast.
// It will play for 5 in-game hours before changing.
    CozyWeather.instance.weatherModule.ecosystem.ForecastNewWeather(yourWeather, new MeridiemTime(5, 00));

Check when the Current Weather will Change

// By converting the weatherTimer float variable into Meridiem Time architecture, it will print with much nicer formatting
    Debug.Log((MeridiemTime)CozyWeather.instance.weatherModule.ecosystem.weatherTimer);

Last updated

Was this helpful?