Raised This Month: $106 Target: $400
 26% 

Element (real-Time weather)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Event Related       
DJEarthQuake
Senior Member
Join Date: Jan 2014
Location: Midwest
Old 07-28-2014 , 16:44   Element (real-Time weather)
Reply With Quote #1

Element:
Actual rain, snow, sky-changing, dusk and dawn are all brought into your server from a JSON feed.
Enhancements:
1. Weather is in real time. HUD flickers centered. Console has more information.
2. Debugger user-friendliness.
3. Local weather and news.
4. Many bug fixes. IE| Day is day and night is night. No eclipse! General upkeep of code and port from BBC, to Y, to Open.
5. Open to projects for forking this further. This is a good base plugin designed to be re-used. Remember if I was worried about people copying it, this thread never would have been.
6. Validation and approval are completely unnecessary. Please just compile, download and enjoy.

CVARS:
Code:
 
 *  dark   <0-25> D: 24         | The higher the number, the darker after sunset.
 *  lums   <0-25> D: 0          | The lower the number, the brighter it gets at noon.
 *  time   <0-24> D: 0          | Manually sets daytime 0 = off
 *  region <regioncode>         | 616411&units=metric&APPID= ....32-bit token you will get after registration. (openweathermap.org)
CL_COMMANDS
say temp, weather, or climate.................|displays HUD and console weather feed


CS1.6 and equivalent engines:
say /mytemp....................................... |for your very own local temp
say /news......................................... ..|for local and International news


Summary:
Weather is added to server on region of your choice. The default compile is Chicago. Time of day lighting conditions are brought into the Half-Life server of any mod. The portion that is CS1.6 and alike specific is the applied SIM. There are 3 modes: DRY, WET, and ICE. This means it is either raining, snowing, or not.
SPiNX
Add your server here if you want tracked.

Known limits:
  • City and state doesn't work on Openweathermap. A subscription limit exists but doubtful it will be breached as it only polls on map change. There will never be more than X per hour rate.
  • Day and night is based off the server's actual real time. So if you pick US and server is in AU the time for sunset will be askew.
  • Element stacking limits. We can do rain and fog with default sky but occasionally not all 3: rain, fog, and custom sky. I could use a hand on that later. Deleted the log of it.
  • Half-life compatible. The satchel can't be triggered. There are no elements except sky, night, day, and feed. That is engine limit. Future work-around challenge
  • customsky.amxx and other amazing skychanging programs need disabled for this one to work without interference. No mix and matching.




CS1.6



OP4


Very careful attention has been made since 2017 into assuring at noon the sun is on top and going down at night and so on. Sky tuning I called it. The light phases are explained in English so others have a great base plugin to work with. Special thanks to EagleHamlet who pointed out some things about programming that forced me to stop using only pico, nano, and vi. And edon1337 for making very specific points. Last but not least Ted for leaving us some rugged code like botman. The whole AMXMODX team for leaving one hell of a structure to work with.
Attached Images
File Type: jpg element WET2.jpg (54.6 KB, 1121 views)
File Type: jpg ant_thrax.weather.jpg (94.6 KB, 307 views)
Attached Files
File Type: zip _Skys.zip (7.81 MB, 101 views)
File Type: sma Get Plugin or Get Source (yahoo-element-obsolete.sma - 87 views - 20.1 KB)
File Type: sma Get Plugin or Get Source (element3b.sma - 82 views - 16.0 KB)
File Type: sma Get Plugin or Get Source (element4.sma - 91 views - 14.8 KB)

Last edited by DJEarthQuake; 12-05-2018 at 18:22. Reason: Disables satchel.
DJEarthQuake is offline
internel
Member
Join Date: Nov 2012
Old 07-28-2014 , 19:05   Re: Element
Reply With Quote #2

Thank you so much for updating that plugin. I couldn't answer your PM, but you know, If you want to add ML support, I'll be glad to help with Spanish ^^

I'm going to test it!
internel is offline
DJEarthQuake
Senior Member
Join Date: Jan 2014
Location: Midwest
Old 07-28-2014 , 23:01   Re: Element
Reply With Quote #3

You are most welcome o no hay day que internal.

Thank you for encouraging me to make this public.
I am glad there is demand for language support already.


I'm also promoting advancements such as lunar data and historical events predicting anywhere from fishing condition to likelihood of crime .

Last edited by DJEarthQuake; 07-29-2014 at 03:49.
DJEarthQuake is offline
internel
Member
Join Date: Nov 2012
Old 07-29-2014 , 18:42   Re: Element
Reply With Quote #4

This is AWESOME!! I just tested it, and it works perfectly!! , you sir did a great job here !

thank ye!

Last edited by internel; 07-29-2014 at 18:42.
internel is offline
Vivo
Senior Member
Join Date: May 2014
Old 07-29-2014 , 23:34   Re: Element
Reply With Quote #5

Sounds great
__________________
ViRuSeS # The best Servers and Host: viruses.ga
CSGO: 185.107.96.150:27015 or viruses.ga:27015
TeamSpeak3: 185.107.96.150:9987 or viruses.ga
Welcome! Good luck and have fun enjoy your time.
Vivo is offline
DJEarthQuake
Senior Member
Join Date: Jan 2014
Location: Midwest
Old 07-31-2014 , 05:49   Re: Element
Reply With Quote #6

Ironically I almost forgot the earthquake condition. I have seen maps with such an effect that will be perfect here. Those are rare. Therefore this is placed at an extremely low priority.

A proposed windy condition will make us have to check the wind direction and compensate at range.

Already existing plugin Shot Administration (by Nomexous) or similar will be used to handle the trigger of high wind.
Accuracy fix could be used then disabled when it gets windy. I also noticed ever since CS 1.6 got to Steam it wasn't accurate.

The sky is off at noon and shows a night sky still. This will be corrected too. Let me know what else. I appreciate the salutations.

Last edited by DJEarthQuake; 09-23-2018 at 16:46. Reason: Selecting plugin to handle windy condition
DJEarthQuake is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-01-2014 , 22:43   Re: Element
Reply With Quote #7

Quote:
Originally Posted by DJEarthQuake View Post
Ironically I almost forgot the earthquake condition.

A proposed windy condition will make us have to check the wind direction and compensate at range.
So, epic.

I will wait for this update. Just let we all know, when it is ready.
__________________
Problem with ZP?
ZP Helper!

Last edited by zmd94; 08-01-2014 at 22:45.
zmd94 is offline
Old 08-19-2014, 17:05
DJEarthQuake
This message has been deleted by DJEarthQuake.
DJEarthQuake
Senior Member
Join Date: Jan 2014
Location: Midwest
Old 08-22-2014 , 16:40   Re: Element
Reply With Quote #8

I made an update to the source. Debugging was enabled. Now it is disabled. Majority of the log is currently too cryptic. I had an update earlier this week. I promptly took it down. Sky tuning is still underway. IE | Night sky showing at noon.
DJEarthQuake is offline
DJEarthQuake
Senior Member
Join Date: Jan 2014
Location: Midwest
Old 08-26-2014 , 02:15   Re: Element
Reply With Quote #9

I like how OpenWeatherMap.org has current wind condition.

$~telnet api.openweathermap.org 80
Trying 162.243.53.59...
Connected to api.openweathermap.org.
Escape character is '^]'.
[
Code:
GET /data/2.5/weather?id=4887398&units=imperial&APPID=register-for-a-openweathermap&u=c HTTP/1.0
...PRESS ENTER TWICE...

HTTP/1.1 200 OK
Server: openresty
Date: Sun, 02 Apr 2017 00:57:51 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 438
Connection: close
X-Cache-Key: /data/2.5/weather?APPID=register-for-a-openweathermap=4887398&u=c&units=imperial
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST

{"coord":{"lon":-87.65,"lat":41.85},"weather":[{"id":800,"main":"Clear","description":"cl ear sky","icon":"01n"}],"base":"stations","main":{"temp":50,"pressur e":1022,"humidity":46,"temp_min":46.4,"temp_m ax":53.6},"visibility":16093,"wind":{"speed":6.93,"deg" :110},"clouds":{"all":1},"dt":1491093300,"sys":{" type":1,"id":1007,"message":0.1218,"country": "US","sunrise":1491132670,"sunset":1491178654 },"id":4887398,"name":"Chicago","cod":200}
Connection closed by foreign host.

This is a good start. If anybody else wanted to collaborate or spin-off with the sniping section! Hint hint wink wink nudge n u d g e.

Last edited by DJEarthQuake; 09-22-2018 at 03:10. Reason: register-for-a-openweathermap
DJEarthQuake is offline
Dare.Devil
Member
Join Date: May 2014
Old 08-27-2014 , 16:54   Re: Element
Reply With Quote #10

where exactly in yahoo can I find the region code??..

you said in first post e.g chicago 2379574 ..

how do I get this serial code??

thanks in advance
Dare.Devil is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:58.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode