Skip to content

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

Notifications You must be signed in to change notification settings

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

No packages published

Languages