Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-24-2012, 04:14 AM
Sourdough35
Hill Giant
 
Join Date: Nov 2004
Posts: 126
Default Does it ever rain?

I have not seen any yet.
Reply With Quote
  #2  
Old 02-24-2012, 05:47 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

If the zone has a weather type of 1-3 it will eventually happen. You can also force it with a script.
Reply With Quote
  #3  
Old 02-24-2012, 07:12 AM
louis1016
Hill Giant
 
Join Date: Dec 2009
Posts: 157
Default

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
Reply With Quote
  #4  
Old 02-25-2012, 01:30 AM
Sourdough35
Hill Giant
 
Join Date: Nov 2004
Posts: 126
Default

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?
Reply With Quote
  #5  
Old 02-25-2012, 02:25 AM
Sourdough35
Hill Giant
 
Join Date: Nov 2004
Posts: 126
Default

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.
Reply With Quote
  #6  
Old 02-25-2012, 03:26 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

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.
Reply With Quote
  #7  
Old 02-25-2012, 06:21 PM
Sourdough35
Hill Giant
 
Join Date: Nov 2004
Posts: 126
Default

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?
Reply With Quote
  #8  
Old 02-25-2012, 08:51 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

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.
Reply With Quote
  #9  
Old 03-03-2012, 07:14 PM
Sourdough35
Hill Giant
 
Join Date: Nov 2004
Posts: 126
Default

Is there a place I can read up on how to set up scripts? I have no idea what I'm doing.
Reply With Quote
  #10  
Old 03-03-2012, 11:19 PM
louis1016
Hill Giant
 
Join Date: Dec 2009
Posts: 157
Default

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
Reply With Quote
  #11  
Old 03-04-2012, 12:58 AM
louis1016
Hill Giant
 
Join Date: Dec 2009
Posts: 157
Default

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)
Reply With Quote
  #12  
Old 03-04-2012, 12:44 PM
Sourdough35
Hill Giant
 
Join Date: Nov 2004
Posts: 126
Default

Will test out and report back. Thanks.
Reply With Quote
  #13  
Old 03-04-2012, 08:59 PM
Sourdough35
Hill Giant
 
Join Date: Nov 2004
Posts: 126
Default

Still no rain. I walked around the Rathe Mountains for about 45 mins using your numbers.
Reply With Quote
  #14  
Old 03-05-2012, 12:50 AM
louis1016
Hill Giant
 
Join Date: Dec 2009
Posts: 157
Default

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
Reply With Quote
  #15  
Old 03-05-2012, 01:23 AM
Sourdough35
Hill Giant
 
Join Date: Nov 2004
Posts: 126
Default

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?
Reply With Quote
Reply


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:52 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3