Weather Question
Looking at zone table in DB I noticed that there are 4 different chances for rain/snow.
Could someone tell me what does this mean? Are these 4 different types of rain that can happen? Like how strong it is? And apparently it can Snow in Gfay? =) Also, there are 4 different types of Fog setting - why 4? How do they combine with each other? Thank You so much! |
Check the source.
|
If I recall it selects one of the four "chances" and then performs a roll against that selected chance or something super weird?
Edit: On quick glance that's how it appears? There may be further reasoning though. I have always have had my weather/sky off :P |
Ok guys, so I am looking at
https://github.com/EQEmu/Server/blob...one/zonedb.cpp I see this: for (index = 0; index < 4; index++) { zone_data->fog_red[index] = atoi(row[1 + index * 5]); zone_data->fog_green[index] = atoi(row[2 + index * 5]); zone_data->fog_blue[index] = atoi(row[3 + index * 5]); zone_data->fog_minclip[index] = atof(row[4 + index * 5]); zone_data->fog_maxclip[index] = atof(row[5 + index * 5]); } So are we combing different fog values together? Why, whats the significance? I noticed that for pretty much ALL zones all 4 fog values are the same. Thanks! |
https://github.com/EQEmu/Server/blob...structs.h#L347
Each of those properties is a array of 4 indices. So you would get: Code:
zone_data->fog_red[0] = atoi(row[1]); |
Ok so we got those values.
But what does this mean in game? If my fog RGB is set to 255 0 0 - its red right? But then if fog1 and fog2 is set to something else - whats the end effect? Because I was changing values back and forth and I can't seem to notice any difference. Also - multiple fog maxclips confusing me... |
Pretty sure they correspond to the weather system..but, that's only a guess from me - I've been wrong many times before :P
https://github.com/EQEmu/Server/blob...20_Weather.sql EDIT: I meant to include this too: https://github.com/EQEmu/Server/blob...zone.cpp#L1301 Just shows that weather takes on one of four states, then intensity is applied for rain/snow. |
Thank you for your reply Uleat!
I trying hard to test the intensity but not sure how to force the client to show me different intensity for rain/snow. I have tried to force this with a quest script like: sub EVENT_SAY { if($text=~/hail/i) {quest::say("bla bla $name - $zoneweather"); } if($text=~/rain/i) {quest::say("bla bla $name - RAIN HARDER! $zoneweather"); quest::rain($zoneweather+5); } if($text=~/snow/i) {quest::say("bla bla $name - SNOW HARDER! $zoneweather"); quest::snow($zoneweather+5);} } I THINK its working - as I see snowflakes flying faster, but I can't say that I notice any changes on fog levels. Also, by chance is zone clip exposed to Perl script? I am asking because we have gm command #zclip, having it accessible via Perl function would be nice - we could then create Fog weather effect by lowering the clipplane. |
I definitely don't know enough about that to even make an educated guess...
I did see, in that function, that intensity seems to be its own value (1 - 10) and not part of the (0 - 3) array that controls which of the weather chances are used. I'll keep my eyes open for any documentation concerning this. |
Thank you Uleat!
|
You can modify weather and stuff in Perl using quest::UpdateZoneHeader(ID, value).
Code:
void QuestManager::UpdateZoneHeader(std::string type, std::string value) { |
Kingly_Krab thank you very much for sharing this.
I just need a little bit more help translating this into plain English =) Lets say I only want to alter clip plan (not entire zone header) in real time how do I pass it my quest npc that tracks weather? so I put quest::UpdateZoneHeader(maxclip, 300) into npc script, where ID and value can be my clipplane? and then I have void QuestManager::UpdateZoneHeader(std::string type, std::string value) as independent function, right? PS wanted to add that I don't see UpdateZoneHeader on official Perl functions list: http://wiki.eqemulator.org/p?Ultimat...rence&frm=Main |
It's not on the official list because it's undocumented (my fault). But all you need to do is put the following in a quest file:
Code:
quest::UpdateZoneHeader("maxclip", 300); |
Thank you so much! You have no idea how many issues this solves for me! ;)
|
Another question for today
Playing around with fog color - I want to make bright yellow fog - using 255 255 0 does give me yellow color but it is still very dark with sky 0. Any idea how to get bright yellow fog? |
All times are GMT -4. The time now is 12:39 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.