This is a much better system than the first version.
It all comes in a single include file.
Four functions for use by worlds with a persistant updating of the game calendar:
void SetWeatherTemperate(object oPC)
void SetWeatherTropical(object oPC)
void SetWeatherArid(object oPC)
void SetWeatherArctic(object oPC)
The use of any of the above provides a seasonal weather system.
Two functions for use by worlds without a means of persistantly updating the game calendar:
void SetGenericRain(object oPC)
void SetGenericSnow(object oPC)
These two functions provide a daily random weather pattern, (usually rains in the afternoons) but they can also be used by persistantly updated calendar worlds if you so choose.
All six functions work to make a more believable weather system. If it is raining in one area of a region, it is raining in all areas of that region.
They now update the control area's weather when you enter ANY area of that region.(In the old system they only updated when you entered the control area)
Added a check for excessive weather (snow and rain) that you can set yourself.
My thanks to ffbj for this suggestion.
If the random weather makes a call for rain twice or more in a row, the script will check your own personal setting of "Rain Maximum" against it, and if it exceeds that setting it will set the weather to clear.
It does the same for any repeat calls for snow.
The include file is heavily commented on how to implement this system.
Really simple to set up.
Please report any bugs, problems, or suggestions here.
(and toss a vote my way if you're feeling generous.)
Alright, perfect! That worked just right, thank you so much! I was just a little confused about how to use it in existing OnEnters, so this really cleared it up. Thanks again, I love the script, haven't found a better one yet. =D
1) The system requires you to have the include file in your module. You don't actually put it in any of your events. You simply need it to exist in your game.
2) In the control area for the Temperate Region place a waypoint tagged:
"ControlRegionTemperate". (This is the only waypoint you'll need for the temperate region)
3) In ALL areas(including the control area) of the Temperate Region
call "void SetWeatherTemperate(object oPC)" in the OnEnter Event.
(Be certain you include this file as an include at the top of your
OnEnter script with #include "00_Weather")
If all you want to use is that one function simply make a script like so:
Name that script "weath_temp" or whatever you like and use it over and over again in the OnEnter event of each area that you wish to have the temperate weather in.
In those areas where you already have an OnEnter script simply call the function:
SetWeatherTemperate(oPC);
somewhere within the already existing script and add
#include "00_Weather" at the top.
"OR" simply use ExecuteScript("weath_temp",oArea); within your already existing script.
Hopefully that helps. Feel free to ask as many questions as you like. I am more than happy to assist.
Just to cover all the bases, I sent you an email with this information.
I have a question. I'm having a little trouble with this, because I wan to script it so that I can have the "SetWeatherTemperate" function in my original OnEnter... my question is how do I do this? Where would I put it, so that I don't have to have an entire script just for calling this function? Go easy on me, I'm hardly an expert on this whole NWscript thing.
Posted by Infected Biro at 2008-12-03 16:23:55 Voted 10.00 on 12/03/08
Ah.. we think alike ffbj! I have several NPC's who travel from town to town in my (as yet incomplete) module.
Their conversational topics can differ based on several factors such as which town they are currently in, or even the current weather conditions.
One thing I did.. was change the name of the months. Just simply created my own names for each of the twelve months of the year. I also created a "timepiece" (tag based unique power self only tool) which when used tells the player the time of the day, the day of the week (I chose not to change the names of the days of the week as I felt it might be more than a little confusing for the player), and the name of my uniquely named month. (well as unique as my imagination would permit)
My twelve months are as follows:
January = Alpha
February = IceBound
March = Tides
April = Tears
May = Jubilation
June = LongDays
July = Talonius
August = Solaris
September = Sorrows
October = Feasting
November = FrostFall
December = Omega
So a sample message sent to a pc when he/she uses the timepiece might be:
"The time is 7 a.m. on Wednesday. It is day 19 of the month of FrostFall"
I'm not overly happy with all of the names, so if you or anyone else has a good replacement name for any of the above I would certainely welcome the input.
And if anyone can think of any possible improvements for this weather system let me know and I will see if I can implement them.
Posted by ffbj at 2008-11-20 15:25:25 Voted 10.00 on 07/22/08
Currently it's month 10, October in my world, and the first snows have started.
Coincidentally I put a script on my barbarian rangers where, when it's snowing, they will sometimes say: "I like snow it remind me of home.'
The point is that you could have certain events occurring only at certain times of the year. A simple example would be spawns: Winter wolves only spawn in the winter when it's snowing for instance.
Posted by Farchilde at 2008-10-10 11:16:40 Voted 10.00 on 10/10/08
Great work. Simple to use and simple to understand, and I am all for simplicity.
Posted by ffbj at 2008-07-22 16:14:44 Voted 10.00 on 07/22/08
Cool or Hot depending I suppose. Though I found your first weather system fine, this is clear or partly cloudy, much better. Thanks for the mention.
You must be Logged In to post comments in this section.