Features
Live Weather Integration
To use live weather data, set Config.UseLiveWeather = true
and provide your latitude and longitude in the configuration file. This feature uses the Open-Meteo API to fetch real-world weather data.
Config.UseLiveWeather = true
Config.Latitude = 34.0522
Config.Longitude = -118.2437
Customizing Time Scale
Customize the duration of an in-game day by setting Config.TimeScale
in the configuration file. For example, to make a 24-hour in-game period last 60 real-world minutes:
Config.TimeScale = 60
Real-Time Server Clock Synchronization
To synchronize the in-game time with the real-world time of the server's location, set Config.UseRealTime = true
in the configuration file.
Config.UseRealTime = true
Extreme Weather Events
b2_weatherEssentials supports a variety of extreme weather events. You can trigger these events using admin commands or exports.
Available Extreme Events
EARTHQUAKE
STORM
EXTREME_COLD
EXTREME_HEAT
TSUNAMI
Triggering Extreme Events
Use the /extremeevent [EVENT_TYPE]
admin command or the TriggerExtremeEvent
export to trigger an event. For example:
exports.b2_weatherEssentials:TriggerExtremeEvent('EARTHQUAKE')
Blackout System
The blackout system can be triggered manually using admin commands or automatically during certain extreme events.
Triggering Blackouts
Use the /blackout
and /clearblackout
admin commands or the TriggerBlackout
and ClearBlackout
exports to control blackouts. For example:
exports.b2_weatherEssentials:TriggerBlackout()
exports.b2_weatherEssentials:ClearBlackout()
Voting System
The voting system allows players to vote for the next weather type during designated voting periods.
Configuring Voting
Enable and configure the voting system in the config.lua
file:
Config.EnableVotingSystem = true
Config.VotingDuration = 5 -- in minutes
Config.VotingInterval = 30 -- in minutes
Config.WeatherBlacklist = {"XMAS"}
Player Voting
Players can vote for the next weather type using the /weathervote [WEATHER_TYPE]
command or by typing !WEATHER_TYPE
in chat.
Last updated