Raised This Month: $7 Target: $400
 1% 

Elements of Openweathermap feed...06/07/2020.


Post New Thread Reply   
 
Thread Tools Display Modes
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 02-11-2019 , 17:52   Re: Element (real-Time weather)
Reply With Quote #61

Now that I have a lot of other stuff out of the way like how would I even start to make a function that makes a tornado and how do I be timeless by applying it on older part of engine like half-life1 without many things like fog, rain, and snow there already. The server redirect mod was what I had in mind until it lost popularity for tornado.


PHP Code:
native message_begin(destmsg_type, const origin[3] = {0,0,0}, player 0); 
While I was working on a camper mod, that instead of destroying players, it encourages them to remain on the server and creates amazing light show while it does. In the course of doing that I have all the missing pieces I wanted for this.

Also I have a Epoch clock worked out. The feed is in epoch.

The dusk and dawn precision is in minutes instead of hours.
Quote:
Post Dawn
[testing/element5.amxx] Dawn is in 305 min. About 5 hour. Time is 12: 39.
Post Dawn
L 02/11/2019 - 12:52: 31: [testing/element5.amxx] Dawn is in 291 min. About 4 hour. Time is 12:52
Post Dawn
L 02/11/2019 - 13:13:50: [testing/element5.amxx] Dawn is in 270 min. About 4 hour. Time is 13:13
Post Dawn
L 02/11/2019 - 16:45:56: [testing/element5.amxx] Dawn is in 58 min. About 0 hour. Time is 16:45
Attached Images
File Type: jpg 156.jpg (87.7 KB, 333 views)
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 02-28-2019 , 06:06   Re: Element (Updated 02/26/2019)
Reply With Quote #62



PHP Code:
Say climatetemp, or weather for conditions
HumidityCloudsSunrise/Sunset all effect visibility
Welcome to the b-team 
Welcome to Des Moines
Visibility is 1609'. Temperature is 9° while forecasted to be 5° 
|||||||||||code 800||||||||||Element:  ..::DRY::.. ..fair.. | humidity: 72 | epoch♞dawn 1551876058 epoch♘dusk 1551917455 
Skyname is 3dm_bikini 
Sunrise hour 7 
Sunset hour 19 
PreDawn::Dawn is in 337 min. About 5 hours.  Time is 1:3 
Epoch conversion was a challenge but thanks to amxmisc.inc upgrade/debug I made this is a cinch for everybody now.Daily build is posted.

I tested Half-Life Fog successfully using Victoria, Texas. What makes it different than cstrike fog is it is moving and glowing ground fog. Nobody else has ever done it or in such a way it works on all maps. Plus it is automatic to the real weather of selected region.

A cvar was made to control fog threshold when the generation begins then made many effects into commands to be used on per map basis, other mods like a new Zombie Fog etc, this is now a complete engine and not just a glorified weather feed port upkeep. Full Half-Life GoldSource Engine is pushed to it's limits in way we surpass HL2 and grant us this HL3 experience we all have been waiting for well just a small taste of it and nostalgia simultaneous.

__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 03-06-2019 at 04:33. Reason: Fog
DJEarthQuake is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 03-07-2019 , 01:04   Re: Element Epic Weather. All cities feed. Windage. HL1 FOG/RAIN/SNOW
Reply With Quote #63

Copy left protection added and finished auto weathering mods that cannot use the built in rain and snow like Counter-Strike spoiled us with and work ended there. In the process of refining the new weather conditions like the rain was so funny before I floated the vector it is static and will keep a copy in that format before it is finished. It makes an awesome function if somebody wants to make an alien ship shoot down a rocket or something cool. It is a 1 rainy rainbow beaming laser cloud that makes me laugh as it almost looks like a fire. The winter part if off the chart given the pallette.

The sockets have been upgraded to never ever play any sort of role in hanging on server changes. It started years ago the source I grabbed was set to 2MB, 2048. I have it set to 512 to get all the JSON. 256 will get just the weather but not the sunup and sundown or the wind etc. That is seriously optimized and nice hack for anybody wanting cleaner code.

Also the errors are enhanced to LIB6 as well as checks are made to see if the socket is read or writable to prevent hang.

When clients connect if the vault has no weather code, 0 the magic happens. An aurora borealis expands the entire maps sky to celebrate the event. I tested it; 1 client connects I see the light, feed is good. Another client connects, no event because the vault has data. I since changed to only when admin connects do we see light show and to get weather 60 seconds after map is loading to reduce server stress on map change.

Pruning was added to the vault. I am also looking at the sockets very carefully to make sure they close properly. The API feeds are used to slop weather code and close socket real fast as it is. A test with telnet is illustrated on 1 of my page 1 entries. That same session shows the kb so you can gauge your works from such manners.
The epic promise for windage is almost here. I have the feed showing when you look in console and the magic packet transport happens from encrypted APT into vault.

To fix the epoch feed time to military I went ahead and made an improvement to the stock amxmisc.inc as it had a bad line of code. The function name was changed in the process to Get_Roll instead of constraint_offset.

The work I speak of is in the first post copy and paste and so is the include. The default compiler won't work then since I am not adding this as a stock. The amxmisc.inc has been disabled from that function from it's addition in 2005 from what I can see. It was worded as untested when it was placed in on the forums here but it appears so I gifted a working tested version. I use it for military time going over the number 24. So if I have the number 36 with the low, high, offset, seed and 36 is noon or 12 as it needs to be in that example. 30 is 6AM. Get_Roll made 1 a low, 24 a high, offset -24, and seed is the raw number going in from the weatherfeed and minus raw get_systime epoch time function.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 06-12-2019 at 19:14. Reason: 1 letter typo: "any instead of and"
DJEarthQuake is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 03-10-2019 , 19:54   Re: Element (real-Time weather)
Reply With Quote #64

Quote:
Originally Posted by tarsisd2 View Post
your plugin could detect from what city is the player from and get the weather right for him!
Bug found in GeoIP

@tarsisd2. I got it done just how you say with GeoIP on connect. Users no longer have to say /mytemp and wait for MOTD into Google. That means it works on mods before Counter-Strike too. That's an upgrade. Thanks for the suggestion.

Spoiler
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 03-19-2019 at 11:56. Reason: Pick metric or imperial.
DJEarthQuake is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 03-18-2019 , 02:31   Re: Elements of Openweathermap feed...03/10/2019.
Reply With Quote #65

Sharing tested lite spin-off version of this plugin pasted in previous post. The unique temp of each player is posted now instead of just their locale. The string was broken up so the 32-bit API APP ID goes in 1 spot instead of admin attending to huge 128-bit string. Same thing with the units. If you want metric or imperial that's the only cvar.
Code:
L20190318.log:L 03/18/2019 - 22:01:33: [testing/namede.amxx] Temp is 79.43 degrees in Rio Grande do Norte.
L20190318.log:L 03/18/2019 - 22:35:03: [testing/namede.amxx] Temp is 34.12 degrees in Capital Region.
L20190318.log:L 03/18/2019 - 22:52:28: [testing/namede.amxx] Temp is 57.2 degrees in Arequipa.
L20190318.log:L 03/18/2019 - 22:59:42: [testing/namede.amxx] Temp is 54.9 degrees in California.
L20190318.log:L 03/18/2019 - 23:01:31: [testing/namede.amxx] Temp is 33.94 degrees in Capital Region.
L20190319.log:L 03/19/2019 - 04:44:04: [testing/namede.amxx] Temp is 76.44 degrees in Queensland.
L20190319.log:L 03/19/2019 - 04:45:31: [testing/namede.amxx] Temp is 76.44 degrees in Queensland.
L20190319.log:L 03/19/2019 - 04:54:14: [testing/namede.amxx] Temp is 76.48 degrees in Queensland.
L20190319.log:L 03/19/2019 - 04:59:50: [testing/namede.amxx] Temp is 37.67 degrees in Moscow.
L20190319.log:L 03/19/2019 - 05:08:45: [testing/namede.amxx] Temp is 40.32 degrees in Łódź Voivodeship.
L20190319.log:L 03/19/2019 - 06:18:29: [testing/namede.amxx] Temp is 30.24 degrees in Balıkesir.
L20190319.log:L 03/19/2019 - 09:13:24: [testing/namede.amxx] Temp is 45.73 degrees in Kyiv City.
L20190319.log:L 03/19/2019 - 08:15:41: [testing/namede.amxx] Temp is 31.08 degrees in Iowa.
L20190319.log:L 03/19/2019 - 08:32:06: [testing/namede.amxx] Temp is 33.12 degrees in Iowa.
L20190319.log:L 03/19/2019 - 08:49:35: [testing/namede.amxx] Temp is 33.66 degrees in Iowa.
L20190319.log:L 03/19/2019 - 09:11:03: [testing/namede.amxx] Temp is 35.19 degrees in Iowa.
L20190319.log:L 03/19/2019 - 09:13:24: [testing/namede.amxx] Temp is 45.73 degrees in Kyiv City.
L20190319.log:L 03/19/2019 - 09:37:17: [testing/namede.amxx] Temp is 36.84 degrees in Iowa.
L20190319.log:L 03/19/2019 - 09:37:27: [testing/namede.amxx] Temp is 28.51 degrees in Utah.
L20190319.log:L 03/19/2019 - 09:46:36: [testing/namede.amxx] Temp is 30.43 degrees in Utah.
L20190319.log:L 03/19/2019 - 09:55:01: [testing/namede.amxx] Temp is 30.43 degrees in Utah.
L20190319.log:L 03/19/2019 - 10:21:03: [testing/namede.amxx] Temp is 56.19 degrees in Utah.
L20190319.log:L 03/19/2019 - 10:21:04: [testing/namede.amxx] Temp is 56.19 degrees in Utah.
L20190319.log:L 03/19/2019 - 10:21:07: [testing/namede.amxx] Temp is 32.56 degrees in Utah.
L20190319.log:L 03/19/2019 - 10:30:05: [testing/namede.amxx] Temp is 56.19 degrees in Nevada.
L20190319.log:L 03/19/2019 - 10:31:28: [testing/namede.amxx] Temp is 54.84 degrees in California.
L20190319.log:L 03/19/2019 - 21:31:13: [testing/namede.amxx] Temp is 65.46 degrees in Florida.
L20190319.log:L 03/19/2019 - 21:31:19: [testing/namede.amxx] Temp is 39.49 degrees in North Carolina.
L20190319.log:L 03/19/2019 - 22:52:48: [testing/namede.amxx] Temp is 12.2 degrees in Sverdlovskaya Oblast'.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 03-20-2019 at 09:33. Reason: log
DJEarthQuake is offline
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 03-19-2019 , 12:58   Re: Elements of Openweathermap feed...03/10/2019.
Reply With Quote #66

This plugin deserve proper video tutorial for all effects
Great Job!
__________________
As soon as possible.
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 03-30-2019 , 16:28   Re: Elements of Openweathermap feed...03/10/2019.
Reply With Quote #67

Quote:
Originally Posted by xakintosh View Post
This plugin deserve proper video tutorial for all effects
Great Job!
That's one hell of a suggestion. Thank you. More to come! The windy condition is what is on my mind now. EF_CrosshairAngle is what I plan to use initially to test. I have some of the other weather captured while doing a weapon mod demo. A little fog, rain, new weapon mod, City Temperature on connect, 3 char country code flagging on name with UTF8 overflow immunity. That's all on a video zipped on that post.

Admin typing command in console: dry, fog, flash, snow, wet or just waiting for the weather automatically is my tutorial. I will get smaller gif video with better res over time on top. GitHub has more space, so might just move everything over there with the 1 page showing each element with small animated gif. The custom rain only happens in Half-Life and Gearbox or as far as the if is cstrike running reaches. I left cstrike alone with these. The current custom rain is fitting for Half-Life/Gearbox as it is unnatural comet shower what wouldn't match Cstrike as well.
Then there is that huge rainy cloud I can put over individual players for saying negative things. More work is needed for that. When admin types wet in console you will see what I mean. The hooking to player part hasn't been done yet. It made me laugh so I had to leave the 0,0,0 coordinate function for later use and the WET command. It has a bit of a rainbow pulsing into it.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 06-12-2019 at 19:19. Reason: leave not left! Typo.
DJEarthQuake is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 06-09-2019 , 09:00   Re: Elements of Openweathermap feed...03/10/2019.
Reply With Quote #68

How to the automatically post city temp in MOTD with SH.
OP4 example when using cron from root otherwise ~ would be easier instead of /home/username/
Code:
cat temps.sh #~/bin/sh MYAD=`date +L%Y%m%d*` cd /home/YOURUSERNAME/Steam/steamapps/common/Half-Life/gearbox/addons/amxmodx/logs grep degree $MYAD |cut -c 48-120 > /tmp/temps.txt sleep 7 grep degree $MYAD |cut -c 48-120 >> /home/YOURUSERNAME/Steam/steamapps/common/Half-Life/valve/motd.txt
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 09-19-2019 at 19:47. Reason: Fixed the web browser issue with larger buffer.
DJEarthQuake is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-02-2019 , 15:22   Re: Element
Reply With Quote #69

Quote:
Originally Posted by zmd94 View Post
So, epic.

I will wait for this update. Just let we all know, when it is ready.
₥₳ĐɆ ł₮


1.8.3+ Compile locally until 1.9.0 is released.


Copy and paste for 1.83+ from build of moment. Needs more testing and adjustments. When taking damage one has to reset their scope by squatting or getting more HP some how. More to come in the future.

I tested the windage was 220 degrees and HUD was pointing around 7 or 8 O' clock as it should.

Attached Images
File Type: jpg windage 220 deg.jpg (95.6 KB, 65 views)
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 10-06-2019 at 10:25. Reason: Cstrike test and pic
DJEarthQuake is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-19-2020 , 15:26   Re: Element
Reply With Quote #70

Quote:
Originally Posted by chuttenjr View Post
#DJEarthQuake ,have you found a fix for the silent footsteps while outside bug??,i experienced it and thought my pl_steps where corrupted or that they were of a very high bitrate annd frequency and did a fresh vanilla cs reinstall and after that i read that know bug.... hehehe

Cheers

Eduardo
Yes sir!
Code:
        if(!is_user_outside(id))             return FMRES_IGNORED;
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake 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 12:40.


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