[Encore] In MOO Weather System Update
Julian Wolfe
fireflyst at earthlink.net
Tue Nov 7 12:43:42 MST 2006
Hi there,
This is something I had planned to implement in my mud.
Is there some way I can assist you in your efforts?
Julian
_____
From: encore-bounces at encore-consortium.org
[mailto:encore-bounces at encore-consortium.org] On Behalf Of Kevin Jepson
Sent: Monday, November 06, 2006 10:37 PM
To: encore at encore-consortium.org
Subject: [Encore] In MOO Weather System Update
Good Evening Folks
I thought I would give you all a quick update on my attempts to create a
weather system for my MOO.
I have successfully converted the paper and pencil system I mentioned before
to MOO code and it is working fairly well.
A new outside room class has been created that integrates a basic weather
message into it's text description when the rooms look_self verb is called.
A system of container objects is used to keep track of what climatic zone
and terrain a given room is in.
The weather is determined once every 24 hours.
Here is the description of the Generic_Outside_Room right now at 9:28 pm Nov
6 2006:
It is a windy very cold night.
Dimly in the darkness you can see...
A vast, apparently endless plain.
Obvious exits: [lab] to porting lab
I'm working on a way to customize the rooms descriptions based on the
detailed weather information the system generates.
In order to test the more detailed information I created a Weather Radio
(WX) that I can "listen to" to get the details.
For example for this room here is what I get if I "listen wx" right now:
============== Weather Radio Broadcast===========
Current conditions for generic_outside_room
Realm is subarctic
Terrain is Plains
The weather today is windy .
High temperature today is -5 F.
Low temperature today is -20 F.
Current temperature is -5 F.
The wind is blowing from the northwest at 30 miles per hour.
The sky is clear.
Dawn occurs at 9 a.m. and dusk at 3 p.m.
The moon phase is Full.
-------------------------------------------
Would you like to see the forecast for tomorrow? [Enter `yes' or `no']
-------------------------------------------
Forecast
Tomorrow, the weather should be windy .
High temperature will be 0 F.
Low temperature will be -10 F.
The wind will blow from the northwest at 15 miles per hour.
The sky will be clear.
============ End Weather Radio Broadcast ==========
Pretty reasonable (brrrr!) for November here actually, I'm at 51 deg North.
The system generates the weather a day in advance, hence the "forecast".
Notice that the weather tomorrow is in line with what we have today. This is
due to the way the paper and pencil system works. A brilliant system that
must have taken an immense amount of work to design, research and write.
All the data above is available on two properties contained on the Terrain
container the room is in.
In order to make this system as easy to setup as possible it works with a
hierarchy of containers controlled by a single weather master object.
The container hierarchy works as follows:
At the top are "Realms" these correspond to climatic regions of which there
are 5
Arctic, Subarctic, Temperate, Subtropical and Tropical
Within each Realm are containers called "Terrains" that correspond to
landscape types of which there are 7
Deserts, Plains, Forests, Mountains, Hills, Seacoasts, Swamps
Rooms of the Generic_outside_room class are moved to the appropriate terrain
within a particular realm and take on the climate and weather accordingly.
The cool thing about this approach is that it doesn't care about what exits
or entrances are already assigned, in fact this system does not change the
spatial layout at all. I have moved some of my existing outside rooms to a
terrain, @chparented to the generic_outside_room class and POOF, weather!
All rooms in a given terrain share the same weather although each can use it
differently in it's descriptions.
I had my first heavy snowfall on this plain the other day, it was exciting
in an odd sort of way :-)
To reduce the lag potential of this system the only scheduled task is a
single day2day change verb that runs once a day and updates the system.
Some of the detailed items above, dusk/dawn, day/night, current temperature,
moon phase, are calculated on the fly so if nobody is in the room to notice
there are no wasted ticks.
So far so good :-)
Next steps are to make the WEB side of enCore integrate the weather
descriptions (preferably even if being browsed from the WEB) and to come up
with the customizable way to utilize the details. I envision a kind of
pronoun sub like scheme for including the details in the descriptions.
I hope the weather where you are is nice.
Ciao
KJ
=======================================================
Kevin Jepson R.E.T.
President
4K Consulting Inc.
An't nanum hearm deth, doth hwaet ye willath.
PHONE: (403) 875-8372
Email: kevijeps at telusplanet.net
=======================================================
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.28/518 - Release Date: 04/11/2006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/encore_encore-consortium.org/attachments/20061107/d4773181/attachment.html
More information about the Encore
mailing list