Skip to content

00202210/WeatherService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🌦️ WeatherService

A modular, server-authoritative global weather system for Roblox, designed to be clean, performant, and GitHub/Rojo-friendly.

Weather behavior is fully data-driven through per-weather modules (Weathers/<weather>/init), with client-side visuals and server-side control. Drop it into your game or sync it via Rojo β€” no manual setup required.


πŸ”— Studio Asset

πŸ‘‰ Roblox Creator Store (Studio Model): https://create.roblox.com/store/asset/110281205103235/WeatherService


✨ Features

  • 🌍 Global weather (one weather shared across the entire server)

  • 🧠 Server-authoritative weather selection and timing

  • 🎲 Chance-based weather picking (chance = {numerator, denominator})

  • πŸ” Automatic cycling with configurable duration per weather

  • 🎨 Client-side visuals

    • Lighting transitions (Atmosphere, ColorCorrection, DOF, etc.)
    • Player-attached particles
    • Music & ambience with smooth crossfades
  • πŸ“ Fully modular weather definitions

    • Each weather lives in its own folder
    • Assets colocated with logic
  • 🧩 Plug-and-play

    • Automatically installs itself on game start
    • Creates required RemoteEvents at runtime

πŸ“ Project Structure

WeatherService/
β”œβ”€ Init.server.lua
β”œβ”€ WeatherService.lua
β”œβ”€ WeatherSystem/
β”‚  β”œβ”€ Shared/
β”‚  β”‚  β”œβ”€ Config.lua
β”‚  β”‚  β”œβ”€ Types.lua
β”‚  β”‚  β”œβ”€ WeatherLoader.lua
β”‚  β”‚  └─ WeightedPicker.lua
β”‚  β”œβ”€ WeatherStateEvent (RemoteEvent)
β”‚  β”œβ”€ Client/
β”‚  β”‚  β”œβ”€ ClientRunner.client.lua
β”‚  β”‚  └─ WeatherClient.lua
β”‚  └─ Weathers/
β”‚     β”œβ”€ rain/
β”‚     β”‚  β”œβ”€ init.luau
β”‚     β”‚  └─ Particles/
β”‚     β”œβ”€ snow/
β”‚     └─ blizzard/

🌧️ Creating a Weather

Each weather lives in its own folder under WeatherService/WeatherSystem/Weathers/.

Example: Weathers/snow/init.luau

--!strict
return {
	id = "snow",
	display_name = "Snow",
	chance = {1, 12},        -- 1 in 12 chance
	length = 90,

	music = {
    id = "rbxassetid://1234567890",
    volume = 0.6
  },

	ambience = {
    id = "rbxassetid://2345678901",
    volume = 0.35
  },

	lighting = {
		Atmosphere = {
      Density = 0.35,
      Haze = 0.4
    },

		ColorCorrectionEffect = {
      Saturation = -0.05,
      Contrast = 0.02
    },
	},
}

Optional Asset Folders

Under the module instance:

  • Particles/ β†’ ParticleEmitters cloned onto the player

βš™οΈ Configuration

Global settings live in:

WeatherService/WeatherSystem/Shared/Config.lua

Includes:

  • Lighting & audio transition time
  • Server tick rate
  • Broadcast interval
  • Default music & ambience volume

🧠 How It Works (High-Level)

  • Server

    • Loads all weather definitions
    • Computes weights from chance fractions
    • Chooses and times weather
    • Replicates a single WeatherState to clients
  • Client

    • Applies lighting tweens
    • Spawns particles on the player
    • Crossfades music & ambience
    • Handles respawns and late joins cleanly

About

A modular, server-authoritative global weather system for Roblox, designed to be clean, performant, and GitHub/Rojo-friendly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages