Auto Weather [UPDATED 11/29/2014]

Post Reply
greenie
Full Member
Full Member
Posts: 1815
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Nu

Auto Weather [UPDATED 11/29/2014]

Post by greenie »

Auto Weather
TeddyDesTodes 2008-2014

.: Description / Features :.
This is a weather plugin, actually therer are many out there, but this one is different.
It' grabs data from feeds.bbc.co.uk and sets your servers weather to the forecast from bbc

- automatic sky changer if it is cloudy sunny foggy or partially cloudy
- automatic fog if humidity is over 90%
- automatic fog color to fit daytime
- automatic weather rain/snow
- automatic lights depending on sunrise/sunset time
- automatic temperature depending on min/max temp values
- maybe later
- you have to buy a jacket or at least have to change to an arctic model (for cstrike) or u will freeze

.: Screenshots :.

Image

Image

.: Cvars :.
Minimal light
weather_minlight <0-25> 24 Darkest, 0 Brightest <default: 24>

Maximum light
weather_maxlight <0-25> 24 Darkest, 0 Brightest <default: 10>

Set hours ingame
weather_currhour <0-23> Manually sets hour of day (0 = Off) <default: 0>

Set your region
weather_region <regioncode> For example: 0050 for Berlin <must be 4 digits>

.: Client Commands :.
say /weatherinfo - shows current weather condition.
.: Credits :.
xPaw - Cleanupping, debugmod, fm convert
.: Changelog :.

version 0.85 yahoo (weather_yahoo.sma):
ported to yahooweather
weather_region is now the 6-digit yahoo regionid
https://weather.yahoo.com/germany/berlin/berlin-638242/

version 0.85 maybe fixed version(weather.sma):
removed ugly (and useless) precache that keeps plugin from running
added footstep sounds for snow (if i have good sounds for rainy i'll add them)
added sv_skycolor for more realistic model illumination
version 0.8 test:
switched to nvault should be faster (weathertest.sma)
changed ThreadDesign by xPaw =)
version 0.7:
Changed to fakemeta (big thanks to xPaw)
Included debug mode (thanks to xPaw)
Region is now showed - Bugfix 11/06/08
Fixed some troubles with containi where -1 not false and therefore weather conditions not detected correctly
.: Known Bugs :.
(only for none cs mod) plugin returns runtime error when fog is on ( i need an is_valid_ent equivalent for fakemeta)
for some odd reason when its noon sky changes to night but everythign else works ok(someone should take a look at set_sky() im blind for some reason)
.: How to install :.
to get the region code for your server go here: http://www.bbc.co.uk/weather/
enter any city you like to get the weather for and hit go
if there are more than one city found, you have to select the right one on the next page
if you have selected your town, the url should look like that
http://www.bbc.co.uk/weather/5day.shtml?world=4581
We need the last 4 digits
In this example 4581

Set the cvar weather_region to your region code
In this example weather_region 4581

Finally
extract drizzle.zip to "sound/ambience"
extract vault.zip in ur amxmodx directory (only on fresh install) it will provide some data for first run(i dont think it's needed(if u can life with a warning on first run) so only a cosmetic fix)
.: Note :.

after you have set the cvar weather_region u have to wait 2 mapchanges/restarts to make the data become available
because this plugin is using the vault system because the sockets are to slow for plugin precache

i've only tested it in cstrike but it contains no mod specific code so it should work on any hl mod

* In DOD the fog not works

.: ToDo :.
Making the weather more accurate with live data (for now it uses the first day of the 3 day forecast)
adding some ambient sound for rain (if anyone could explain how to do that)
i need skies for foggy

sky.zip
drizzle.zip
vault.zip
Post Reply

Return to “General Purpose”