|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics. Do not post support topics here. |
02-24-2012, 04:14 AM
|
Hill Giant
|
|
Join Date: Nov 2004
Posts: 126
|
|
Does it ever rain?
I have not seen any yet.
|
02-24-2012, 05:47 AM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,743
|
|
If the zone has a weather type of 1-3 it will eventually happen. You can also force it with a script.
|
02-24-2012, 07:12 AM
|
Hill Giant
|
|
Join Date: Dec 2009
Posts: 157
|
|
The weather is on a random timer in the eqemu code, but the timer is coded in a way so the timer will never go off early after a zone starts, so unless your zone has been booted up for a while chances are you wont see weather effects. The code has been designed for zones that are booted up for hours. open up the source and search for the "weather_timer" and take a look and change it however you see fit. Reducing the timer to suit your server needs is the best way to go
|
02-25-2012, 01:30 AM
|
Hill Giant
|
|
Join Date: Nov 2004
Posts: 126
|
|
Not really sure how to edit the server source or search for data so I may leave it as it is, although I'd prefer it to rain more often, or ever.
Does the timer reset every time I enter a zone? Or do I just need enough consecutive time there to trigger the rains?
|
02-25-2012, 02:25 AM
|
Hill Giant
|
|
Join Date: Nov 2004
Posts: 126
|
|
Scratch that. I installed everything I needed and am looking at the source in Visual C++
Found weather_timer entries in zone.cpp
But there are many of them and it's not really clear what to do. Anyone able to help?
Is it this one
autoshutdown_timer.Start(AUTHENTICATION_TIMEOUT * 1000, false);
Weather_Timer = new Timer((MakeRandomInt(1800, 7200) + 30) * 2000);
Weather_Timer->Start();
LogFile->write(EQEMuLog: ebug, "The next weather check for zone: %s will be in %i seconds.", short_name, Weather_Timer->GetRemainingTime()/1000);
weather_type = 0;
zone_weather = 0;
blocked_spells = NULL;
totalBS = 0;
aas = NULL;
totalAAs = 0;
gottime = false;
What happens if I set all the numbers to 0? What I want to do is just disable the time a zone waits before the random weather rules kick in. Going to set the numbers in Weather_Timer = new Timer((MakeRandomInt(1800, 7200) + 30) * 2000); to all 1 and see what happens.
|
02-25-2012, 03:26 AM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,743
|
|
Those are milliseconds, so anywhere from 3660 seconds to 14460 seconds, as it would put in the log when the zone starts up.
Those seem like some fairly arbitrary numbers, so making them smaller shouldn't cause you any issues. 1 will be instant pretty much assuming the random check passes.
You'll also probably want to change the calculation just above
Code:
Weather_Timer->Start(weatherTime);
in the same file.
|
02-25-2012, 06:21 PM
|
Hill Giant
|
|
Join Date: Nov 2004
Posts: 126
|
|
Changing everything to 0 just makes it flicker rapidly between rain, fog, and clear over and over. Not really sure I know what I'm doing. It looks like the server won't open a zone to random weather until it has been booted for 240 minutes. Does that reset every time I leave the zone or log out? Or does it keep a running track of how long a zone has been booted and after a few hours logged, opens it up?
And is there any way in the database to force random weather?
|
02-25-2012, 08:51 PM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,743
|
|
Well, the values set when the zone is loaded determine when the first check is. The second set determine when the next check is. You'd need to find a balance for those that does what you're looking for. If you set them all to very low values then the changes will be frequent. The values are in milliseconds, so if you set them to something between 300000 and 600000 it would change every 5-10 minutes.
You can also change the weather from a script if that is easier.
|
03-03-2012, 07:14 PM
|
Hill Giant
|
|
Join Date: Nov 2004
Posts: 126
|
|
Is there a place I can read up on how to set up scripts? I have no idea what I'm doing.
|
|
|
|
03-03-2012, 11:19 PM
|
Hill Giant
|
|
Join Date: Dec 2009
Posts: 157
|
|
heres a decent weather setup for a private server-
in zone.cpp
line 818 should read:
Code:
Weather_Timer = new Timer((MakeRandomInt(1, 2700000)));
then change lines 1289-1292 to
Code:
if(zone->zone_weather != zone->weather_type)
weatherTime = (MakeRandomInt(1, 2700000));
else
weatherTime = (MakeRandomInt(1, 2700000));
i find this to be much better then using perl scripts, the only problem is the code does not seem to generate random weather intensity, which you can do quite easily in perl scripts (some of the high intensity rain/snow settings are quite awesome, the default rain/snow intensity seen in eqemu is really low and crappy compared to what is capable)
I noticed however, on line 2018,
Code:
if(zone_weather>0)
outapp->pBuffer[4] = 0x10+MakeRandomInt(0, 9); // This number changes in the packets, intensity?
if this is correct, and this is the random intensity, then the values must be changed to 0, 60 rather then 0, 9. This would mean that the random intensity can only be between 0 and 9, which are very low. Changing the value higher will produce much different rain/snow storms. I have yet to test this out but I will get to it sometime
|
|
|
|
03-04-2012, 12:58 AM
|
Hill Giant
|
|
Join Date: Dec 2009
Posts: 157
|
|
EDIT:
in the beginning, change
Quote:
Weather_Timer = new Timer((MakeRandomInt(1, 2700000)));
|
to
Quote:
Weather_Timer = new Timer((MakeRandomInt(1, 2)));
|
this should start the random weather check immediately once the zone starts, (which is a 1 in 5 chance i think)
|
03-04-2012, 12:44 PM
|
Hill Giant
|
|
Join Date: Nov 2004
Posts: 126
|
|
Will test out and report back. Thanks.
|
03-04-2012, 08:59 PM
|
Hill Giant
|
|
Join Date: Nov 2004
Posts: 126
|
|
Still no rain. I walked around the Rathe Mountains for about 45 mins using your numbers.
|
03-05-2012, 12:50 AM
|
Hill Giant
|
|
Join Date: Dec 2009
Posts: 157
|
|
it works, ive tested it,
remember that the code i modified is to make the random checks more frequent, when the zone boots there is a 1 in 5 chance for immediate weather change, and then another 1 in 5 chance occurs within a random amount of time of up to 45 minutes. If that check fails or passes, there is another 1 in 5 chance after that in another random amount of time, and another after that and so on for as long as the zone is booted
I'm still not sure if the intensity check is working 100%, so far it seems like it is but i have to test a little more to be sure
|
03-05-2012, 01:23 AM
|
Hill Giant
|
|
Join Date: Nov 2004
Posts: 126
|
|
Sounds like I just wasn't understanding how the code worked. I probably ran through the zone for a half hour or more, but if it takes at least 45 minutes to even get another 1 in 5 chance to change the weather, then I wasn't doing it long enough. Does that mean 2700000 is the upper limit for the random time interval? If that's miliseconds, I believe that would be 45 minutes.
I think I'm going to play with much much shorter intervals just to test it out.
Also, I've seen on the boards, and am having some trouble compiling the whole source code. It runs into issues compiling queryseve, which I think compiles the chatserver exe. If I'm using all of the other files it compiles and getting the server up and running, that won't cause any issues, will it?
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 11:42 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|