Keran's Weather System And Time Code 4.0 (TinyMUX 1.6, TinyMUSH 3.0)

A weather system for TinyMUX 1.6+ and TinyMUSH 3.0. In order to make this code work with TinyMUSH 3.0, you need to install "Bugfix For Keran's Weather System (TinyMUSH 3.0)" after this is installed.

Author: Keran
Category: Weather Systems
Compatibility: TinyMUSH, TinyMUX.

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Keran's Weather System And Time Code 4.0 (TinyMUX 1.6, TinyMUSH 3.0)

Keran's MUSH/MUX Weather and Time Code Package Version 4.0 beta
MUX Code and Installation Instructions

This code and accompanying materials are copyright (C) 1996, 1997,
1998 by Keran (keranset@mail1.nai.net).
You can do anything with this code except sell it or claim credit for
the parts I wrote. Use at your own risk, and all that.

This code will run on TinyMUX 1.4 and 1.6. (It may run on earlier
releases as is, but I haven't tried it.) It shouldn't be run on 1.5
(which is a beta) because memory leaks will cause your process size
to increase continually if the weather and time code is running.
Upgrade to 1.6 and then run it.

A preliminary look at TinyMUSH 3.0 suggests that this code is
likely to run without alteration on it.

The latest version of this code is running at Keranset Island,
telmaron.telmaron.com 5252.

Features:

Time functions for determining the year, month, season, time of day,
tide, and moon phase;
A weathermaker that determines a different weather type every day;
Day and night length that vary by season. The length of the longest
day can be set by hours or by latitude;
A weather description bank with descriptions that vary by time of day
and season;
A collection of outdoor parent rooms that make it easy to write
descriptions that vary by time of day, season, weather, and the
visibility of the moon, in different styles;
Indoor parent rooms for writing descriptions that vary with lighting
conditions and the visual capability of the viewer;
A parent room hierarchy that means you can write your own parent rooms
and easily have them recognized as the correct type of room.
Configurable time compression ratios, in two different modes. You can
accelerate all time with clock compression, or skip days with
calendar compression;
Simple adjustable weather modelling;
An optional quasi-Gregorian calendar in addition to the native
calendar, and an option for taking the date from the system clock
in 1:1 time;
Clock code that can send out messages to specified receivers at given
times, such as sunrise, moonset, other time of day transitions, tide
changes, at specific hours, every hour, every half hour, or every
quarter hour.
An auxiliary bank of descriptions varying by season, time of day, and
weather, geared to surroundings with a lot of leafy trees, to
illustrate how to make auxiliary desc banks for different
environments;
Regional weather, and a sample slave weather station.
A fairly realistic moon;
Diurnal or semi-diurnal tides synchronized with the moon;
A Storm Maker that can be used to do global, area, and room type emits
to allow the production of storms, earthquakes, blackouts, etc.
A test room for ensuring that the whole thing works.
The code is intended to be readable and adjustable by a competent
coder, allowing it to be set up in numerous non-vanilla ways, which
are discussed at some length in the configuration section of the
+help.


Changes between 3.0 and 4.0:

-- The Time Functions object was too big in 3.0, and it would have been
staggering with the 4.0 moon on it. The moon and tide functions now have
an object all to themselves. Miscellaneous functions and weather desc
functions now also reside on a separate object.

-- The Emits Bank now sends its sunrise, sunset, time of day, etc.,
messages to rooms on which &hear-weather-emits=1, as opposed to
&hear-global-emits. It will also send tide emits to rooms on which
&hear-tide-emits=1.

-- There are new times at which the Clock can trigger events.
Meridian-transit is when the moon reaches its zenith. It can also
trigger events every hour without your needing to specify the hours,
every half-hour, or every quarter-hour.

-- There's a new command on the Wizard Weather and Time Commands object
to allow you to compute the length of the longest day by giving a
latitude.

-- The moon's behavior is now astronomically sane. The tides are
synchronized with the moon.

-- There's a Storm Maker that can be used to changed the day's weather
and can broadcast effects messages to selected groups of rooms, making
it possible to generate local storms, earthquakes, etc.

-- There is now a system clock calendar mode. If you're going to run
in 1:1 and you want to run off the system clock and get a 365-day year
complete with dates, and stay in synchronization with the real year,
you can.

-- There is a hierarchy of parent rooms, including indoor rooms with
lighting variations, and several more outdoor parent rooms. This works
in conjunction with the Storm Maker; you can add your own parent rooms
to it.

-- The +help has been reorganized drastically. It may not be any
clearer, but it's at least different. There are now three sections to
the +help, general, admin commands, and configuration. I have, I hope,
located the information builders need once the code has been installed
in general +help instead of burying it in the config section.

-- Bug fixes will be noted in the changes.txt file in the same ftp
directory I distribute the code from.


For this installation, you need to be a wizard.

There are three global functions which are best loaded on #1; God
needs to set this up. However, if necessary, you may also load
globals on any wiz-inherit item whose dbref is lower than the dbref
of anything that needs to call weather and time code.

You need a configuration change to the server. Function_invocation_limit
should be set to approximately 12,500. No, that is not a typo. And, no,
it's highly unlikely to bring your server to its knees. CPUs improve
every year, and most games can easily handle this code; it's possible
that on a large and very heavily loaded server that this could cause
difficulties, but generally speaking you won't even notice this config
change. The reason it's required is that the set of functions invoked
when the variable-desc Parent Rooms include calls for a moon desc is
extremely large; the 4.0 moon is complex. +today may also fail to
function correctly if the function invocation limit is not high enough.

If you don't know /anything/ about code, don't attempt this. Get a
code wiz. You don't need to be a psychocoder to install it, but you
really should have at least passing familiarity with the basics of
how code works.


The items in Keran's Weather and Time Code package are

#7 Keran's Time Functions
#25 Keran's Tree Weather Descriptions
#26 Keran's Weather Long Description Bank
#31 Keran's Box of Weather and Time Stuff, with Notes
#111 Keran's Weathermaker
#113 Keran's Wizard Weather and Time Commands
#114 Keran's Slave Weather Station
#115 Keran's Clock
#173 Keran's Emits Bank
#175 Keran's Global Command Object
#315 Keran's Weather and Time Help - Admin Commands
#316 Keran's Weather and Time Help - Configuration Considerations
#531 Keran's Weather and Time Help - General
#533 Keran's Miscellaneous Functions
#550 Keran's Storm Maker
#555 Keran's Moon and Tide Functions

Rooms:

#133 Keran's Parent of Separable Day-Night and Season Desc Outdoor
Rooms
#400 Keran's Parent of Season-and-Day-Night Varying Outdoor Rooms
#404 Keran's Parent of Windowed Indoor Rooms
#436 Keran's Parent of Windowless Indoor Rooms
#545 Keran's Parent of Separable Day-Night-Dawn-Dusk and Season
Desc Outdoor Rooms
#567 Keran's Parent of Separable Desc Outdoor Rooms
#619 Keran's Parent of Weather-and-Day-Night Varying Outdoor Rooms
#510 Keran's Grandparent of Windowed Indoor Rooms
#512 Keran's Grandparent of Windowless Indoor Rooms
#515 Keran's Grandparent of Outdoor Rooms
#508 Keran's Great-grandparent of Rooms
#624 Keran's Test Room


The procedure for installing this code involves:

-- Creating the items.
-- Editing the code section of this text file to replace my dbrefs
with yours.
-- Loading the attributes onto the individual items.
-- Putting Keran's Global Command Object in the Master Room.
-- Putting everything else in the box in your Auxiliary Room.
-- Adding global function loads to #1.
-- Adding the +help entry point to your own +help.
-- Reconfiguring the server's function_invocation_limit.
-- @triggering the Clock.
-- Deciding what configuration you want and setting it up.

* * *

There are too many items to make @editing tolerable. It's easier to
edit the text file. Begin by creating the following and noting the
item numbers.

@create Keran's Time Functions
@create Keran's Tree Weather Descriptions
@create Keran's Weather Long Description Bank
@create Keran's Box of Weather and Time Stuff, with Notes
@create Keran's Weathermaker
@create Keran's Wizard Weather and Time Commands
@create Keran's Slave Weather Station
@create Keran's Clock
@create Keran's Emits Bank
@create Keran's Global Command Object
@create Keran's Weather and Time Help - Admin Commands
@create Keran's Weather and Time Help - Configuration Considerations
@create Keran's Weather and Time Help - General
@create Keran's Miscellaneous Functions
@create Keran's Storm Maker
@create Keran's Moon and Tide Functions
@dig/teleport Keran's Parent of Windowed Indoor Rooms
@dig/teleport Keran's Parent of Windowless Indoor Rooms
@dig/teleport Keran's Parent of Separable Day-Night and Season Desc Outdoor Rooms
@dig/teleport Keran's Parent of Season-and-Day-Night Varying Outdoor Rooms
@dig/teleport Keran's Parent of Season-and-Day-Night-Dawn-Dusk Outdoor Rooms
@dig/teleport Keran's Parent of Separable Day-Night-Dawn-Dusk and Season Outdoor Rooms
@dig/teleport Keran's Parent of Weather-and-Day-Night Varying Outdoor Rooms
@dig/teleport Keran's Grandparent of Windowed Indoor Rooms
@dig/teleport Keran's Grandparent of Windowless Indoor Rooms
@dig/teleport Keran's Grandparent of Outdoor Rooms
@dig/teleport Keran's Great-grandparent of Rooms
@dig/teleport Keran's Test Room

Now do a search-and-replace on all the text in the code section
below. Search for the database reference numbers in my item list
farther up the page, and replace with the dbrefs of the corresponding
items you just created. Upload the code itself item by item from the
code section.

A caution: it may happen that one of your objects may turn out to
have the same dbref as a /different/ one of my objects. In that
case, the order in which you execute the search-and-replace
operations is important. If, for example, one of your objects
turns out to be numbered #115, and it isn't the Clock, you'll
need to do the search-and-replace for the Clock in the code
section before you do the search-and-replace for whatever object
came out numbered #115, because if you do the Clock replace
afterward, all the references to the Clock and all the references
to whatever object is your #115 will end up pointing to the Clock.

What to do if you're upgrading from 3.0:
There are various approaches, depending on what you've done with 3.0
If you've done significant amounts of custom coding or complex setup,
you very probably want to do a new installation of 4.0 and leave 3.0
working as is, then port your changes to 4.0 gradually; after that, you
can do a brute-force database edit to fix dbrefs. (Note to TinyMUSH dev
team: what I really want is RCS for softcode. <grinning, ducking, and
running>)

If you have a 3.0 setup with no significant dependent code or building,
you can do a new 4.0 installation and simply discard the 3.0 stuff.

A common case will be to have nothing particularly unusual in the setup
--no recoding, no complex regional weather, etc.--but to have code or
building that calls 3.0 functions by dbref--usually, this means
functions from the 3.0 Time Functions object--and possibly to have
rooms parented to the 3.0 Outdoor Parent Room. There are two approaches
you can take to this:

1) Erase the attributes from your 3.0 objects, and load the 4.0
attributes onto the corresponding objects; make the new 4.0 objects in
the usual way; then alter a couple of the 4.0 items so dependent code
can use some of the 3.0 references instead.

2) Ditto, but instead of altering any 4.0 items for 3.0 compatibility,
comb through your database with some editing code to switch all the
references to 4.0. This is more work up front; however, what you have
when you get done will be a pure 4.0 installation and you won't have
to contend with possible incompatibilities in bug fixes, add-ons,
documentation, etc.; it's also slightly more efficient.

Procedure:

@nuke the 3.0 +help items (Common function help, Uncommon function
help, Topics). They're expendable.

Your basic erase-the-objects procedure is easily done with @dolist
lattr(<3.0 item>)=&## <3.0 item>. Remember to include the Global
Command Object and the Outdoor Parent Room, which won't be in the box
with the other stuff.

Rename the box to Keran's Box of Weather and Time Stuff, with Notes.
Rename the Outdoor Parent Room to Keran's Parent of Separable Day-Night
and Season Desc Outdoor Rooms. You can rename all the other 3.0 stuff
if you want; it won't hurt anything if you don't, but having all the
names start with 'Keran's' makes it easier to keep track of the parts
of the package.

Now @create all remaining items from 4.0. When you get done, you'll
have the 4.0 blank items, but the dbrefs of those 4.0 items that existed
in 3.0 will be the same as your 3.0 dbrefs in your new installation.
Search and replace the dbrefs in the code section below so they refer to
your items instead of mine, and upload the code onto your items.

For the edit-the-code approach:

1) If you've set &hear-global-emits to 1 on significant numbers of
individual rooms, @edit the Emits bank so:
@edit Emits Bank/*=hear-weather-emits,hear-global-emits
Then replace &hear-weather-emits=1 on all the parent rooms with
&hear-global-emits=1.

If you haven't individually set &hear-global-emits on many rooms,
skip this and change the attribute on the individual rooms from
&hear-global-emits=1 to &hear-weather-emits=1.

2) Patch the Time Functions object so all the functions likely
to be called from it by external code in 3.0 can still be called from
it in 4.0, as follows:

&RANDWORD Time Functions=[extract(%0, add(1, rand(words(%0))), 1)]
&TILDE2BLANK Time Functions=[edit(v(0),~,%b)]
&BLANK2TILDE Time Functions=[edit(v(0),%b,~)]
&LONG-WEATHER Time Functions=[u(#26/[u(#7/season)][u(#7/day-night-dawn-dusk)][u(#111/weathertype)])]
&SHORT-WEATHER Time Functions=[u(#111/[u(#7/season)][u(#111/weathertype)])]
&TREE-WEATHER Time Functions=[u(#25/trees_[u(#7/season)]_[u(#7/day-night)]_[u(#111/weathertype)])]
&SLAVE-LONG-WEATHER Time Functions=[u(#26/[u(#7/season)][u(#7/day-night-dawn-dusk)][u(#114/slave-weathertype)])]
&SLAVE-SHORT-WEATHER Time Functions=[u(#111/[u(#7/season)][u(#114/slave-weathertype)])]
&SLAVE-TREE-WEATHER Time Functions=[u(#25/trees_[u(#7/season)]_[u(#7/day-night)]_[u(#114/slave-weathertype)])]
&WINDOW Time Functions=[lcstr(first(u(long-weather)))] [rest(u(long-weather))]
&MOON-ADJECTIVE Time Functions=[switch(u(moon-phase), new, black, waxing crescent, faint, first quarter, dim, waxing gibbous, bright, full, brilliant, waning gibbous, bright, last quarter, dim, waning crescent, faint)]
&MOON-PHASE Time Functions=[u(#555/moon-phase)]
&TIDE Time Functions=[u(#555/tide)]

Search and replace my dbrefs above with yours, naturally.

For the edit-the-database approach:

Proceed with a normal 4.0 installation from here. Then edit the
database.

Here follows code for doing mass edits that should catch most of
the differences between 3.0 and 4.0; it's possible that for given
installations, there may be other items you want to add to the list of
things to be edited. Edit the code below, replacing #7 with the dbref
of your Time Functions object, #533 with the dbref of your
Miscellaneous Functions object, and #555 with the dbref of your Moon
and Tide Functions object. This code should be placed on a
wizard/inherit object(you can put it on yourself if you want). To run
it, type:
edit <first dbref>, <last dbref>
This allows you to edit a block of items at once. Keep the number of
items you edit at a time reasonable--20 might a reasonable value--so
you don't load the server too heavily all at once, or run into various
limits; you may need to adjust that number downward, or may be able to
adjust it upward. You might start, for example, with edit 0, 19.

Remember *not* to edit the object this code is actually on. Stop
one object before it and start again one object afterward.

It takes some 10-15 minutes to do a thousand objects, generally
speaking.

&FIRST-ITEM-EDIT me=$edit *, *: &counter me=%0; &cutoff me = %1; think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/moon-phase, #555/moon-phase)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/tide, #555/tide)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/randword, #533/randword)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/blank2tilde, #533/blank2tilde)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/tilde2blank, #533/tilde2blank)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/moon-adjective, #555/moon-adjective)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/long-weather, #533/long-weather)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/short-weather, #533/short-weather)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/tree-weather, #533/tree-weather)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/window, #533/lowercase-long-weather)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/slave-short-weather, #533/slave-short-weather)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/slave-long-weather, #533/slave-long-weather)])); think iter(lattr(#%0), set(#%0, ##:[edit(get(#%0/##), #7/slave-tree-weather, #533/slave-tree-weather)])); @switch hasattr(#%0, hear-global-emits) = 1, {&hear-weather-emits #%0 = [get(#%0/hear-global-emits)]; &hear-global-emits #%0}, @@; @trigger me/next-item-edit

&NEXT-ITEM-EDIT me=&counter me = [inc(v(counter))]; think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/moon-phase, #555/moon-phase)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/tide, #555/tide)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/randword, #533/randword)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/blank2tilde, #533/blank2tilde)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/tilde2blank, #533/tilde2blank)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/moon-adjective, #555/moon-adjective)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/long-weather, #533/long-weather)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/short-weather, #533/short-weather)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/tree-weather, #533/tree-weather)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/window, #533/lowercase-long-weather)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/slave-short-weather, #533/slave-short-weather)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/slave-long-weather, #533/slave-long-weather)])); think iter(lattr(#[v(counter)]), set(#[v(counter)], ##:[edit(get(#[v(counter)]/##), #7/slave-tree-weather, #533/slave-tree-weather)])); @switch hasattr(#[v(counter)], hear-global-emits) = 1, {&hear-weather-emits #[v(counter)] = [get(#[v(counter)]/hear-global-emits)]; &hear-global-emits #[v(counter)]}, @@; @switch lt(v(counter), v(cutoff)) = 1, @trigger me/next-item-edit, think Stopped at #[v(cutoff)]



At this point, whether you're upgrading or doing a new installation,
you should have a large collection of objects and rooms with the code on
them, but with nothing actually running yet.

Type 'note 1' where the box can hear you and make sure you have all
the stuff listed.

Check flags. Everything should be set safe. The box should be set
!no_command. The Global Command object should be set !no_command and
royalty. The Wizard Weather and Time Command object, the Clock, and
the Storm Maker should be set !no_command and inherit. The Emits Bank
should be set royalty. All functions objects and description banks
should be set visual; so should the Weathermaker and the Slave Weather
Station.

Check @uselocks. The Global Commands object shouldn't be locked; the
Wizard Weather and Time Command object should be @uselocked to wizards,
and the Clock and the Storm Maker should be locked to admins.

@link the Global Command object to the Master Room and put it there.
@link the box to your Auxiliary Room and put it there. @link all the
other items to the box and put them there. The Storm Maker is unlocked
because whoever's using it may want to carry it around the IC landscape
to watch how their effects are coming across.

#1 needs to do this:
Read +wtc global-setup to see how to set up the global functions. The
code should run correctly before the global setup, but the
documentation will be incorrect; it assumes the functions to be global.
Set function_invocation_limit on your server up to 12500; this can be
done with @admin function_invocation_limit = 12500, but Keran prefers
to edit the config file in the server account to keep track of config
changes. Not setting the function_invocation_limit up will mean that
descriptions in children of the Parent Rooms will sometimes fail to
evaluate completely, on a somewhat erratic basis, with the moon descs
on clear or fair nights being the usual place for the code to break;
you /won't/ see a FUNCTION INVOCATION LIMIT EXCEEDED error.

Back to an ordinary wizard:
@trigger Clock/startup.

Test the installation so far by typing '+today'. You should get
intelligible results.

Type @ps. You should see the Clock in the wait queue.

Type 'note 2' where the box can hear you for instructions on
installing the initial +help entries.

Type +wtc and read all the entries marked with a *; you may want to
read others besides. You can then type +wta to see the commands you
can use to set up the basic configuration options like the length of
the longest day, the kind of tide, the time compression, the calendar
mode, etc.

Check the Clock, and make sure it has the following in its
triggerlist attributes:

&TRIGGERLIST-TIME~OF~DAY clock=<#Weathermaker> <#Emits Bank> <#Test Room>
&TRIGGERLIST-SUN clock=<#Emits Bank> <#Test Room>
&TRIGGERLIST-MOON clock=<#Emits Bank> <#Test Room>
&TRIGGERLIST-TIDE clock=<#Emits Bank> <#Test Room>
&TRIGGERLIST-HOUR clock=<#Emits Bank> <#Test Room>
&TRIGGERLIST-EVERY~HALFHOUR clock=<#Test Room>
&TRIGGERLIST-EVERY~QUARTERHOUR clock=<#Test Room>
&TRIGGERLIST-EVERY~HOUR clock=<#Test Room>

When you reach this point, you should have a working basic
installation.

I've added a Test Room to the package for 4.0. The acid test of
whether your installation is working, aside from getting sensible
results from +today, is whether you hear all the emits the Clock can
trigger, and all the global emits from the Emits Bank. To this end,
the Test room has on it &trigger-at-<time> attributes which will
@emit to whatever's in the room; it has all the varieties of
&trigger-at-<time> attributes the clock can @trigger, and therefore
also serves as an example of how to create Clock-@triggered effects
on other objects. It also has &hear-weather-emits and &hear-tide-emits
set to one, and therefore if you're in it, you should hear all the
emits the Emits bank sends out. The easiest way to use this is to set
clock compression up to about 24:1 and drop a listening object in it.
You should then hear all the emits from the room and all the global
emits from the Emits Bank, and, over the course of several virtual
days (several real-time hours), the emits from the Emits Bank should
vary with a changing weather type. (You will almost certainly want
to use the Clock's del command to remove the Test Room from the
every~halfhour and every~halfhour triggerlists after you've heard
them a few times; otherwise you'll get spammed unmercifully. You
may want to remove the hourly triggers as well after determining
that they work.)

A note: the room has emits for every time at which the clock can
trigger them. The Emits Bank doesn't. There are no global emits for
the beginnings of the time periods denoted noon, afternoon, midnight,
or after midnight, first; there are global emits at the hours of 0
and 12, instead. Secondly, global emits about the moon rising,
setting, or reaching its zenith are only heard during clear and fair
nights when the moon is not new, so there will be times when you
should hear an emit about the moon from the room, but not from the
Emits Bank.

If you set up regional weather, you will need to @trigger Slave
Weather Station/startup after it's set up; it should be in the
semaphore queue (type @ps) after you do.

There will be future upgrades, but I'm not anticipating making any
more massive structural changes as I did between 3.0 and 4.0. Instead,
they'll be in the form of add-ons and patches, and installing them
will be much simpler than upgrading from 3.0 to 4.0.


----------------------------------------------------------------------------------------------

CODE SECTION

#7 - Time Functions

@lock Time Functions=#0
@Desc Time Functions=This object has the major timing functions on it. It belongs in the Auxiliary room and has no commands on it. It should be set visual.
&VERSION Time Functions=4.0
&AUTHOR Time Functions=Keran@Keranset Island
&TIME-BEGINS Time Functions=827380800
&STARTING-YEAR Time Functions=0
&CALENDAR-COMPRESSION Time Functions=1
&CLOCK-COMPRESSION Time Functions=1
&SOLSTICE-DAY-LENGTH Time Functions=18
&SECS-ELAPSED-TODAY Time Functions=[mod(sub(secs(), u(time-begins)), u(secs-per-day))]
&SECS-ELAPSED-THIS-YEAR Time Functions=[sub(sub(secs(), u(#7/time-begins)), mul(u(#7/native-year), u(#7/days-per-year), 24, u(#7/secs-per-hour)))]
&SECS-ELAPSED-THIS-CALENDAR-MONTH Time Functions=[mod(sub(secs(), u(time-begins)), u(secs-per-calendar-month))]
&SECS-PER-DAY Time Functions=[mul(u(secs-per-hour), 24)]
&SECS-PER-HOUR Time Functions=[fdiv(3600, u(clock-compression))]
&SECS-PER-HALFDAY Time Functions=[mul(u(secs-per-hour), 12)]
&SECS-PER-QUARTERDAY Time Functions=[mul(u(secs-per-hour), 6)]
&SECS-PER-HALFHOUR Time Functions=[div(u(secs-per-hour), 2)]
&SECS-PER-YEAR Time Functions=[mul(u(days-per-year), u(secs-per-day))]
&SECS-PER-CALENDAR-MONTH Time Functions=[mul(u(secs-per-day), u(days-per-calendar-month))]
&DAYS-PER-CALENDAR-MONTH Time Functions=[div(u(days-per-year), 12)]
&DAY-FROM-0 Time Functions=[div(sub(secs(), u(time-begins)), u(secs-per-day))]
&DAY-OF-YEAR Time Functions=[mod(u(day-from-0), u(days-per-year))]
&DAYS-PER-YEAR Time Functions=[div(u(base-days-per-year), u(calendar-compression))]
&DAYS-PER-SEASON Time Functions=[div(u(days-per-year), 4)]
&YEAR Time Functions=[u(native-year)]
&SEASON Time Functions=[u(native-season)]
&HOUR Time Functions=[u(calculated-hour)]
&BASE-DAYS-PER-YEAR Time Functions=360
&WEEK Time Functions=[inc(div(mul(dec(u(day-of-calendar-month)), u(calendar-compression)), 7))]
&CALENDAR-MONTH Time Functions=the~[elements(first~month~of~spring second~month~of~spring third~month~of~spring first~month~of~summer second~month~of~summer third~month~of~summer first~month~of~autumn second~month~of~autumn third~month~of~autumn first~month~of~winter second~month~of~winter third~month~of~winter, u(number-of-calendar-month))]
&NUMBER-OF-CALENDAR-MONTH Time Functions=[inc(mod(div(u(day-from-0), u(days-per-calendar-month)), 12))]
&DAY-OF-CALENDAR-MONTH Time Functions=[inc(mod(u(day-of-year), u(days-per-calendar-month)))]
&GREGORIAN-MONTH Time Functions=[elements(March April May June July August September October November December January February, u(number-of-calendar-month))]
&GREGORIAN-SEASON Time Functions=[elements(spring summer autumn winter, add(mod(div(u(day-from-0), u(days-per-season)), 4), 1))]
&GREGORIAN-YEAR Time Functions=[switch(u(gregorian-month), January, inc(u(native-year)), February, inc(u(native-year)), u(native-year))]
&NATIVE-SEASON Time Functions=[elements(spring summer autumn winter, add(mod(div(u(day-from-0), u(days-per-season)), 4), 1))]
&NATIVE-YEAR Time Functions=[add(div(u(day-from-0), u(days-per-year)), u(starting-year))]
&MONTH Time Functions=[u(calendar-month)]
&LAST-MIDNIGHT Time Functions=[add(mul(u(day-from-0), u(secs-per-day)), u(time-begins))]
&NEXT-MIDNIGHT Time Functions=[add(mul(inc(u(day-from-0)), u(secs-per-day)), u(time-begins))]
&MIDNIGHT-BEFORE-LAST Time Functions=[add(mul(dec(u(day-from-0)), u(secs-per-day)), u(time-begins))]
&LAST-NOON Time Functions=[switch(gt(secs(), add(u(#7/last-midnight), u(#7/secs-per-halfday))), 1, [add(u(#7/last-midnight), u(#7/secs-per-halfday))], [sub(u(#7/last-midnight), u(#7/secs-per-halfday))])]
&NOON-BEFORE-LAST Time Functions=[sub(u(last-noon), u(secs-per-day))]
&NEXT-NOON Time Functions=[add(u(last-noon), u(secs-per-day))]
&DAY-LENGTH-VARIATION Time Functions=[round(mul(sub(u(solstice-day-length), 12), u(#7/secs-per-hour)), 0)]
&SUN-CYCLE Time Functions=[fdiv(u(#7/day-of-year), u(#7/days-per-year))]
&DAY-LENGTH Time Functions=[round(add(mul(sin(fdiv(mul(mul(pi(), 2), u(day-of-year)), u(days-per-year))), u(day-length-variation)), u(secs-per-halfday)), 0)]
&NIGHT-LENGTH Time Functions=[sub(u(secs-per-day), u(day-length))]
&SUNSET Time Functions=[add(div(u(night-length), 2), u(day-length))]
&SUNRISE Time Functions=[div(u(night-length), 2)]
&IS-MIDNIGHT Time Functions=[or(gt(u(secs-elapsed-today), sub(u(secs-per-day), u(secs-per-halfhour))), lt(u(secs-elapsed-today), u(secs-per-halfhour)))]
&IS-DAWN Time Functions=[and(gt(u(secs-elapsed-today), sub(u(sunrise), u(secs-per-halfhour))), lt(u(secs-elapsed-today), add(u(sunrise), u(secs-per-halfhour))))]
&IS-MORNING Time Functions=[and(gt(u(secs-elapsed-today), add(u(sunrise), u(secs-per-halfhour))), lt(u(secs-elapsed-today), sub(u(secs-per-halfday), u(secs-per-halfhour))))]
&IS-NOON Time Functions=[and(gt(u(secs-elapsed-today), sub(u(secs-per-halfday), u(secs-per-halfhour))), lt(u(secs-elapsed-today), add(u(secs-per-halfday), u(secs-per-halfhour))))]
&IS-AFTERNOON Time Functions=[and(gt(u(secs-elapsed-today), add(u(secs-per-halfday), u(secs-per-halfhour))), lt(u(secs-elapsed-today), sub(u(sunset), u(secs-per-halfhour))))]
&IS-DUSK Time Functions=[and(gt(u(secs-elapsed-today), sub(u(sunset), u(secs-per-halfhour))), lt(u(secs-elapsed-today), add(u(sunset), u(secs-per-halfhour))))]
&IS-AFTER-MIDNIGHT Time Functions=[and(gt(u(secs-elapsed-today), u(secs-per-halfhour)), lt(u(secs-elapsed-today), sub(u(sunrise), u(secs-per-halfhour))))]
&IFDAWN Time Functions=[ifelse(u(is-dawn), dawn, u(ifmorning))]
&IFMORNING Time Functions=[ifelse(u(is-morning), morning, u(ifnoon))]
&IFNOON Time Functions=[ifelse(u(is-noon), noon, u(ifafternoon))]
&IFAFTERNOON Time Functions=[ifelse(u(is-afternoon), afternoon, u(ifdusk))]
&IFDUSK Time Functions=[ifelse(u(is-dusk), dusk, u(day-night))]
&IFAFTERMIDNIGHT Time Functions=[ifelse(u(is-after-midnight), after midnight, u(ifdawn))]
&TIME-OF-DAY Time Functions=[ifelse(u(is-midnight), midnight, u(ifaftermidnight))]
&DAY-NIGHT-DAWN-DUSK Time Functions=[ifelse(u(is-dawn), dawn, u(ifdusk))]
&DAY-NIGHT Time Functions=[ifelse(and(lt(u(secs-elapsed-today), u(sunset)), gt(u(secs-elapsed-today), u(sunrise))), day, night)]
&SYSTEM-WEEKDAY Time Functions=[switch(mid(time(), 0, 3), Mon, Monday, Tue, Tuesday, Wed, Wednesday, Thu, Thursday, Fri, Friday, Sat, Saturday, Sun, Sunday)]
&SYSTEM-MONTH Time Functions=[switch(mid(time(), 4, 3), Jan, January, Feb, February, Mar, March, Apr, April, May, May, Jun, June, Jul, July, Aug, August, Sep, September, Oct, October, Nov, November, Dec, December)]
&SYSTEM-DATE Time Functions=[mid(time(), 8, 2)]
&SYSTEM-TIME Time Functions=[mid(time(), 11, 9)]
&SYSTEM-HOUR Time Functions=[mid(time(), 11, 2)]
&SYSTEM-YEAR Time Functions=[add(mid(time(), 20, 4), u(starting-year))]
&SYSTEM-SEASON Time Functions=[switch(u(system-month), January, winter, February, winter, March, spring, April, spring, May, spring, June, summer, July, summer, August, summer, September, autumn, October, autumn, November, autumn, December, winter)]
&CALCULATED-HOUR Time Functions=[div(u(secs-elapsed-today), u(secs-per-hour))]
&THIS-YEAR-BEGAN Time Functions=[sub(u(#7/last-midnight), mul(u(#7/day-of-year), u(#7/secs-per-day)))]
&CLOCK-FACE-HOUR Time Functions=[switch(u(hour), 0, 12, 13, 1, 14, 2, 15, 3, 16, 4, 17, 5, 18, 6, 19, 7, 20, 8, 21, 9, 22, 10, 23, 11, u(hour))]
&SECS-PER-QUARTERHOUR Time Functions=[div(u(secs-per-hour), 4)]
&HALFHOUR Time Functions=[u(calculated-halfhour)]
&QUARTERHOUR Time Functions=[u(calculated-quarterhour)]
&CALCULATED-HALFHOUR Time Functions=[div(u(secs-elapsed-today), u(secs-per-halfhour))]
&CALCULATED-QUARTERHOUR Time Functions=[div(u(secs-elapsed-today), u(secs-per-quarterhour))]
&SYSTEM-HALFHOUR Time Functions=[add(mul(mid(time(), 11, 2), 2), div(mid(time(), 14, 2), 30))]
&SYSTEM-QUARTERHOUR Time Functions=[add(mul(mid(time(), 11, 2), 4), div(mid(time(), 14, 2), 15))]
@set Time Functions=VISUAL
@set Time Functions=NO_COMMAND
@set Time Functions=SAFE


#25 - Tree Weather Descriptions

@lock Tree Weather Descriptions=#0
&TREES_SPRING_DAY_FAIR Tree Weather Descriptions=[v(trees_spring_day_pollen)]
&TREES_SPRING_DAY_CLEAR Tree Weather Descriptions=[v(trees_spring_day_pollen)]
&TREES_SPRING_DAY_STORMY Tree Weather Descriptions=Gusts of wind tear through the tree limbs and howl around rocks, turning the leaves over so that you can see their silvery undersides.
&TREES_SPRING_NIGHT_STORMY Tree Weather Descriptions=[v(trees_stormy)]
&TREES_SPRING_NIGHT_OVERCAST Tree Weather Descriptions=[v(trees_spring_frogs)]
&TREES_SPRING_NIGHT_CLEAR Tree Weather Descriptions=[v(trees_spring_frogs)]
&TREES_SUMMER_NIGHT_CLEAR Tree Weather Descriptions=The leaves of the trees and bushes rustle in the breeze. Crickets and katydids sing throughout the night.
&TREES_AUTUMN_NIGHT_CLEAR Tree Weather Descriptions=[v(trees_autumn_night)]
&TREES_AUTUMN_NIGHT_STORMY Tree Weather Descriptions=[v(trees_stormy)] Fallen leaves blow past you in the dark.
&TREES_SUMMER_NIGHT_STORMY Tree Weather Descriptions=[v(trees_stormy)]
&TREES_SUMMER_DAY_STORMY Tree Weather Descriptions=[v(trees_stormy)]
&TREES_AUTUMN_DAY_STORMY Tree Weather Descriptions=[v(trees_stormy)] Red, orange and gold leaves swirl past you on the wind.
&TREES_SPRING_DAY_OVERCAST Tree Weather Descriptions=[v(trees_spring_day_pollen)]
&TREES_SPRING_DAY_RAIN Tree Weather Descriptions=Raindrops patter against the fresh leaves, and glisten like silver beads on their bright green surfaces. The wet tree trunks have darkened from grey to brown.
&TREES_SUMMER_DAY_RAIN Tree Weather Descriptions=Raindrops patter against the leaves, and glisten like silver beads on their deep green surfaces. The wet tree trunks have darkened from grey to brown.
&TREES_AUTUMN_DAY_RAIN Tree Weather Descriptions=Raindrops patter against the leaves, and glisten like silver beads on their fiery vermillion and gold surfaces. The wet tree trunks have darkened from grey to brown.
&TREES_AUTUMN_NIGHT_RAIN Tree Weather Descriptions=[v(trees_night_rain)]
&TREES_SUMMER_NIGHT_RAIN Tree Weather Descriptions=[v(trees_night_rain)]
&TREES_SPRING_NIGHT_RAIN Tree Weather Descriptions=[v(trees_night_rain)]
&TREES_SUMMER_DAY_CLEAR Tree Weather Descriptions=The deep green leaves of the trees and bushes rustle in the breeze, which provides welcome cooling from the heat of the blazing sun.
&TREES_AUTUMN_DAY_CLEAR Tree Weather Descriptions=[v(trees_autumn_day)]
&TREES_AUTUMN_DAY_OVERCAST Tree Weather Descriptions=[v(trees_autumn_day)]
&TREES_AUTUMN_NIGHT_OVERCAST Tree Weather Descriptions=[v(trees_autumn_night)]
&TREES_WINTER_DAY_OVERCAST Tree Weather Descriptions=Snow lingers in the forks of the broadleafed trees and on the needle-clad branches of the conifers.
&TREES_WINTER_NIGHT_OVERCAST Tree Weather Descriptions=Snow lingers in the forks of the broadleafed trees and on the needle-clad branches of the conifers, limning them palely in the darkness.
&TREES_WINTER_NIGHT_FAIR Tree Weather Descriptions=Blowing snow drifts against the trunks of the dark trees.
&TREES_WINTER_DAY_FAIR Tree Weather Descriptions=Blowing snow drifts against the trunks of the trees.
&TREES_WINTER_NIGHT_CLEAR Tree Weather Descriptions=Blowing snow drifts against the trunks of the dark trees, clinging to their windward sides.
&TREES_WINTER_DAY_CLEAR Tree Weather Descriptions=[v(trees_winter_clear)]
&TREES_SPRING_NIGHT_FAIR Tree Weather Descriptions=[v(trees_spring_frogs)]
&TREES_SPRING_FROGS Tree Weather Descriptions=You can hear peepfrogs, bullfrogs, and treefrogs singing. The leaves of the trees and bushes rustle in the wind.
&TREES_STORMY Tree Weather Descriptions=Gusts of wind tear through the tree limbs and howl around rocks.
&TREES_NIGHT_RAIN Tree Weather Descriptions=Raindrops patter against the leaves, invisible in the darkness.
&TREES_WINTER_CLEAR Tree Weather Descriptions=Blowing snow drifts against the trunks of the trees, clinging to their windward sides.
&TREES_SUMMER_DAY_OVERCAST Tree Weather Descriptions=The deep green leaves of the trees are unstirred.
&TREES_SUMMER_NIGHT_OVERCAST Tree Weather Descriptions=The leaves of the trees and bushes are unstirred.
&TREES_SUMMER_DAY_FAIR Tree Weather Descriptions=The shade under the deep green leaves of the trees is welcome relief from the hot glare of the sun.
&TREES_SUMMER_NIGHT_FAIR Tree Weather Descriptions=The shadows under the canopy of leaves are deep, and you can hear cicadas and crickets singing all around you.
&TREES_AUTUMN_DAY Tree Weather Descriptions=Fiery red, gold, and orange leaves rustle and blow past you, swirling in the wind.
&TREES_AUTUMN_DAY_FAIR Tree Weather Descriptions=[v(trees_autumn_day)]
&TREES_AUTUMN_NIGHT Tree Weather Descriptions=Leaves on the ground rustle, unseen, stirred by the winds. Falling leaves blow past you, whirled around by the wind in the dark.
&TREES_AUTUMN_NIGHT_FAIR Tree Weather Descriptions=[v(trees_autumn_night)]
&TREES_SPRING_DAY_POLLEN Tree Weather Descriptions=The wind rustles the bright green leaves of trees and bushes and carries pollen, downy seeds, and the fragrance of wildflowers along with it.
&TREES_WINTER_DAY_LIGHTSNOW Tree Weather Descriptions=Snowflurries dust the bare branches of the broadleaves and the needles of the conifers.
&TREES_WINTER_NIGHT_LIGHTSNOW Tree Weather Descriptions=Snowflurries dust the bare branches of the broadleaves and the needles of the conifers, giving them faint pale outlines which render them visible in the darkness.
&TREES_WINTER_DAY_SLEET Tree Weather Descriptions=Rain freezes on the bare twigs of the broadleafed trees and the needles of the conifers, coating them with a layer of glistening silver ice and weighing the branches down.
&TREES_WINTER_NIGHT_SLEET Tree Weather Descriptions=Rain freezes on the tree limbs. Occasionally you hear the crack of a branch breaking, weighed down by its coating of ice.
&TREES_WINTER_DAY_BLIZZARD Tree Weather Descriptions=The whirling curtain of snow accumulates in the forks of the trees and piles up in drifts against their trunks.
&TREES_WINTER_NIGHT_BLIZZARD Tree Weather Descriptions=The whirling curtain of snow accumulates in the forks of the trees, outlining them in the darkness, and piles up in drifts against their trunks.
&TREES_NIGHT_FOG Tree Weather Descriptions=The dark shapes of nearby trees loom at you suddenly out of the deep grey fog as you approach them.
&TREES_WINTER_NIGHT_FOG Tree Weather Descriptions=In the darkness and the veils of fog, the bare branches of the trees fade from sight.
&TREES_WINTER_DAY_FOG Tree Weather Descriptions=The bare branches of the trees form stark silhouettes of darker grey.
&TREES_AUTUMN_DAY_FOG Tree Weather Descriptions=Only the nearest tree branches, half-bereft of leaves, show their full color; more distant trees and branches are colorless and indistinct in the pallid grey fog, looking ghostly and not quite real.
&TREES_SUMMER_DAY_FOG Tree Weather Descriptions=Only the nearest tree branches show their full color; more distant trees and branches are colorless and indistinct in the pallid grey fog, looking ghostly and not quite real.
&TREES_AUTUMN_NIGHT_FOG Tree Weather Descriptions=[v(trees_night_fog)]
&TREES_SUMMER_NIGHT_FOG Tree Weather Descriptions=[v(trees_night_fog)]
&TREES_SPRING_NIGHT_FOG Tree Weather Descriptions=[v(trees_night_fog)]
&TREES_SPRING_DAY_FOG Tree Weather Descriptions=Only the nearest tree branches show the full color of their buds and new leaves; more distant trees and branches are colorless and indistinct in the pallid grey fog, looking ghostly and not quite real.
&TREES_SPRING_DAY_LIGHTSNOW Tree Weather Descriptions=[v(trees_spring_day_pollen)]
&TREES_SPRING_NIGHT_LIGHTSNOW Tree Weather Descriptions=[v(trees_spring_frogs)]
&TREES_SPRING_NIGHT_SLEET Tree Weather Descriptions=[v(trees_night_rain)]
&TREES_SPRING_DAY_SLEET Tree Weather Descriptions=Raindrops patter against the fresh leaves, and glisten like silver beads on their bright green surfaces. The wet tree trunks have darkened from grey to brown.
&TREES_SPRING_DAY_BLIZZARD Tree Weather Descriptions=Gusts of wind tear through the tree limbs and howl around rocks, turning the leaves over so that you can see their silvery undersides.
&TREES_SPRING_NIGHT_BLIZZARD Tree Weather Descriptions=[v(trees_stormy)]
&TREES_WINTER_NIGHT_RAIN Tree Weather Descriptions=Rain freezes on the tree limbs. Occasionally you hear the crack of a branch breaking, weighed down by its coating of ice.
&TREES_WINTER_DAY_RAIN Tree Weather Descriptions=Rain freezes on the bare twigs of the broadleafed trees and the needles of the conifers, coating them with a layer of glistening silver ice and weighing the branches down.
&TREES_WINTER_DAY_STORMY Tree Weather Descriptions=The whirling curtain of snow accumulates in the forks of the trees and piles up in drifts against their trunks.
&TREES_WINTER_NIGHT_STORMY Tree Weather Descriptions=The whirling curtain of snow accumulates in the forks of the trees, outlining them in the darkness, and piles up in drifts against their trunks.
@Desc Tree Weather Descriptions=This is an auxiliary weather description bank. It has different descriptions for a temperate environment with a lot of leafy trees that vary by season and whether it's day or night. It belongs in the Auxiliary room and has no commands on it.
&VERSION Tree Weather Descriptions=4.0
&AUTHOR Tree Weather Descriptions=Keran@Keranset Island
@set Tree Weather Descriptions=VISUAL
@set Tree Weather Descriptions=NO_COMMAND
@set Tree Weather Descriptions=SAFE


#26 - Weather Long Description Bank

@lock Weather Long Description Bank=#0
&AUTUMNDAWNRAIN Weather Long Description Bank=Cold rain is falling as the sky begins to lighten to overcast grey. A raw wind blows from the east.
&AUTUMNDAYRAIN Weather Long Description Bank=Chilly rain falls from a grey sky. It's bleak and raw. The wind blows from the east.
&AUTUMNDUSKRAIN Weather Long Description Bank=A chilling rain falls as the grey sky darkens in the twilight. It's cold and wet. The wind blows from the east.
&AUTUMNNIGHTRAIN Weather Long Description Bank=Cold rain falls from a grey-black sky without moon or stars. A raw wind blows from the east.
&AUTUMNNIGHTCLEAR Weather Long Description Bank=The deep blue night sky is clear and cloudless, and the stars glitter. An icy wind blows from the northwest.
&AUTUMNNIGHTSTORMY Weather Long Description Bank=Icy rain pours from grey-black clouds driven by a howling northeast wind.
&AUTUMNDUSKSTORMY Weather Long Description Bank=A cold rain driven by a howling northeast wind drenches you while the clouded sky fades from grey to black.
&AUTUMNDAYSTORMY Weather Long Description Bank=Chilling rain pours from thick grey clouds, driven by a furious northeast wind.
&AUTUMNDAWNSTORMY Weather Long Description Bank=Cold rain pours from clouds slowly lightening from black to grey, driven by a howling northeaster wind.
&AUTUMNDUSKCLEAR Weather Long Description Bank=The sun sets and the evening stars begin to appear in a blue and cloudless sky. A biting wind blows from the northwest.
&AUTUMNDAYCLEAR Weather Long Description Bank=The sky is brilliant blue and cloudless, the sunlight is bright, and a brisk wind blows from the northwest.
&AUTUMNDAWNCLEAR Weather Long Description Bank=It's a chilly morning and the brightening sky is clear and cloudless. The northwest wind is biting.
&AUTUMNNIGHTOVERCAST Weather Long Description Bank=The sky is grey-black, without moon or star. It's hard for human eyes to see anything in the deep shadows round about, without a light. The wind is chilly.
&AUTUMNDUSKOVERCAST Weather Long Description Bank=The grey of the clouds begins to darken. A chilling wind blows from the west.
&AUTUMNDAWNOVERCAST Weather Long Description Bank=The overcast sky lightens from grey-black to cloudy grey as the sun rises. A chill wind blows from the northwest.
&AUTUMNDAYOVERCAST Weather Long Description Bank=The sky is grey and cloudy, and nothing casts a shadow. The northwest wind is chilly.
&AUTUMNNIGHTFAIR Weather Long Description Bank=A chilly wind blows from the west, driving dark clouds before it and blotting out the stars in patches overhead. The air is clear and elsewhere they glitter brightly in the dark sapphire sky.
&AUTUMNDUSKFAIR Weather Long Description Bank=The fair weather clouds in the west turn orange, gold, carmine, and purple as the sun sets. A chill wind blows from the west.
&AUTUMNDAYFAIR Weather Long Description Bank=Fair weather clouds drift through the blue sky from the west. The wind is gusty.
&AUTUMNDAWNFAIR Weather Long Description Bank=Fair weather clouds glow pink and white-gold in the southeast, catching the rays of the rising sun while the earth remains in shadow. A cool wind blows from the west.
&WINTERNIGHTRAIN Weather Long Description Bank=Icy rain and sleet fall invisibly from a grey-black sky. It's very dark and the ice makes walking on the slippery ground difficult. A raw wind blows from the northeast.
&WINTERDUSKRAIN Weather Long Description Bank=Darkness comes early as thick clouds block the fading light of grey day. Freezing rain and sleet fall, coating everything with ice and making the ground slippery. Raw winds blow from the northeast.
&WINTERDAYRAIN Weather Long Description Bank=Sleet and freezing rain fall from heavy clouds, coating everything with ice and making the ground slippery. The world looks silver in the icy grey light. A raw wind blows from the northeast.
&WINTERDAWNRAIN Weather Long Description Bank=Darkness lingers and the dawn that breaks is grey. Sleet and freezing rain fall from heavy clouds, coating everything with ice and making the walking treacherous. Raw winds blow from the northeast.
&WINTERNIGHTFAIR Weather Long Description Bank=A cold wind blows from the west, driving charcoal clouds before it and blotting out the stars in isolated patches overhead. The air is clear and elsewhere the stars shine brightly.
&WINTERDUSKFAIR Weather Long Description Bank=The fair weather clouds in the west turn purple, gold, and vermillion as the sun sets. The snow, in shadow, looks blue. A cold wind blows from the west.
&WINTERNIGHTCLEAR Weather Long Description Bank=The icy northwest wind howls, blowing snow about in savage gusts. The cold is intense. The sky is clear deep blue and the stars glitter, brilliant as diamonds.
&WINTERDAWNCLEAR Weather Long Description Bank=The light of a cruelly cold dawn breaks in the southeast. The sky is clear and the northwest wind blasts snow across the landscape in gusts. Your breath fogs in the frigid air.
&WINTERDUSKCLEAR Weather Long Description Bank=The cold becomes intense as the light fades from the sky. The evening stars glitter brightly. The northwest wind blows the snow about in freezing gusts.
&WINTERDAWNFAIR Weather Long Description Bank=Fair weather clouds glow pink in the southeast, catching the rays of the rising sun while the earth remains in shadow. A cold wind blows from the west. You can see your breath misting in the cold air.
&WINTERDAWNOVERCAST Weather Long Description Bank=Dawn's light is grey. A thin layer of translucent cloud obscures the sun, showing only a bright patch in the sky. The air is cold and slightly damp.
&WINTERDUSKOVERCAST Weather Long Description Bank=The sky is a dull iron grey, and darkness closes in early. The air is cold and damp.
&WINTERNIGHTOVERCAST Weather Long Description Bank=The sky is grey-black, moonless and starless. Human eyes can distinguish the snow from everything else, and not much more: every shape that isn't snow-covered is a black shadow. The air is damp and cold. There is little wind.
&WINTERDAYCLEAR Weather Long Description Bank=The sky is cloudless and brilliant blue. The northwest wind is icy, blowing snow across the landscape in swirling white gusts.
&WINTERDAYOVERCAST Weather Long Description Bank=The air is damp and cold, the sky a translucent grey, brighter to the south. Nothing casts a shadow.
&WINTERDAYFAIR Weather Long Description Bank=Fair weather clouds drift through the blue sky from the west, along with the wind. The sunlight on the snow is dazzling, and it gleams on the ice.
&SUMMERDAYRAIN Weather Long Description Bank=A light rain falls from a grey sky. It's warm and there's a slight wind from the southeast.
&SUMMERDUSKRAIN Weather Long Description Bank=Light rain falls as the grey clouds darkens in the twilight. It's warm and there's a gentle wind from the southeast.
&SUMMERNIGHTRAIN Weather Long Description Bank=Soft rain falls from a grey-black sky without moon or stars. A warm gentle wind blows from the southeast.
&SUMMERDAWNRAIN Weather Long Description Bank=Soft rain is falling as the sky lightens to overcast grey. A warm breeze blows from the southeast.
&SUMMERNIGHTCLEAR Weather Long Description Bank=The deep blue night sky is clear and cloudless, and the stars glitter. A cool breeze blows from the west.
&SUMMDERDAWNPRECIP Weather Long Description Bank=Soft rain is falling as the sky lightens to cloudy grey. A warm breeze blows from the southeast.
&SUMMERDAWNOVERCAST Weather Long Description Bank=The sky pales in the east, turning overcast grey. There's little wind, and it's warm and humid.
&SUMMERDAWNFAIR Weather Long Description Bank=The sky turns a lighter blue and the stars fade out. It's clear and there's a soft breeze from the west.
&SUMMERNIGHTSTORMY Weather Long Description Bank=Heavy rain drenches you in the dark as it falls from grey-black clouds, driven by a howling east wind.
&SUMMERDUSKSTORMY Weather Long Description Bank=Driving rain pours from clouds darkening from grey to black as daylight fades, propelled by a furious east wind.
&SUMMERDAWNSTORMY Weather Long Description Bank=Heavy rain pours from clouds slowly lightening from black to grey, propelled by a howling east wind.
&SUMMERDAYSTORMY Weather Long Description Bank=Heavy rain pours from dark grey clouds, propelled by a furious east wind.
&SUMMERNIGHTOVERCAST Weather Long Description Bank=The sky is grey-black, moonless and starless. It's hard for human eyes to see anything in the deep shadows round about, without a light. It's warm, still, and humid.
&SUMMERDUSKOVERCAST Weather Long Description Bank=The grey of the clouds begins to darken, and the temperature drops slightly. It's warm and still.
&SUMMERDAYOVERCAST Weather Long Description Bank=The sky is grey and cloudy, and nothing casts a shadow. It's hot, humid, and still.
&SUMMERNIGHTFAIR Weather Long Description Bank=The night is warm and sultry, and dark clouds hide the stars in patches. Elsewhere they shine brightly. Dew forms on the ground.
&SUMMERDUSKFAIR Weather Long Description Bank=The sun sets, the western clouds turning purple, red, and gold. It's hazy and warm.
&SUMMERDAYFAIR Weather Long Description Bank=Towering white clouds drift slowly through the blue sky. It's hazy and hot, and the glare of the sun seems to drain the color from the landscape.
&SUMMERDUSKCLEAR Weather Long Description Bank=The sun sets and the evening stars begin to appear in a blue and cloudless sky. There's a cool breeze from the west.
&SUMMERDAYCLEAR Weather Long Description Bank=The sky is clear brilliant blue and there's a light breeze from the west. It's warm.
&SUMMERDAWNCLEAR Weather Long Description Bank=The sky starts to lighten and the stars fade out. The sky is clear and there's a cool breeze from the west.
&SPRINGNIGHTSTORMY Weather Long Description Bank=Cold driving rain pours down upon you in the dark from black clouds, propelled by a howling northeast wind.
&SPRINGDUSKSTORMY Weather Long Description Bank=Twilight falls and the clouds darken from grey to charcoal as cold driving rain pours from them, lashed by a raging northeast wind.
&SPRINGDAYSTORMY Weather Long Description Bank=Cold rain pours from thick grey clouds, driven by a howling northeast wind.
&SPRINGDAWNSTORMY Weather Long Description Bank=A cold driving rain pours from clouds slowly lightening from black to grey, propelled by a howling northeasterly wind.
&SPRINGNIGHTOVERCAST Weather Long Description Bank=The sky is grey-black, moonless and starless. It's hard for human eyes to see anything in the deep shadows round about, without a light. It's cool and a light breeze blows from the southwest.
&SPRINGDUSKOVERCAST Weather Long Description Bank=The grey of the clouds begins to darken, and it becomes cooler. A light wind is blowing from the southwest.
&SPRINGDAYOVERCAST Weather Long Description Bank=The sky is cloudy grey, and nothing casts a shadow. The southwest wind is mild.
&SPRINGDAWNOVERCAST Weather Long Description Bank=The sky begins to lighten. It's grey and overcast. A light wind blows from the southwest.
&SPRINGDAWNCLEAR Weather Long Description Bank=The sky begins to brighten as the stars fade out. It's a chilly morning and the sky is clear blue and cloudless.
&SPRINGDAYCLEAR Weather Long Description Bank=The sky is blue and cloudless, the sunlight is bright, and a cool wind blows from the northwest.
&SPRINGDUSKCLEAR Weather Long Description Bank=The sun sets and the evening stars begin to appear in a blue and cloudless sky. A cool wind blows from the northwest.
&SPRINGNIGHTCLEAR Weather Long Description Bank=The deep blue night sky is clear and cloudless, and the stars glitter. A brisk breeze blows from the northwest.
&SPRINGDAWNFAIR Weather Long Description Bank=The blue sky brightens. The sun lights the fair weather clouds in the east with pink and pale gold before it touches the ground, which remains in shadow. A mild breeze blows from the west.
&SPRINGDAYFAIR Weather Long Description Bank=Fair weather clouds sail across the blue sky, propelled by light breezes from the west. It's warm in the sun, cool in the shade, and the air is clear and dry.
&SPRINGDUSKFAIR Weather Long Description Bank=Oranges, reds, and golds light the fair weather clouds, shadowed in purple, around the setting sun. A soft breeze blows from the west.
&SPRINGNIGHTFAIR Weather Long Description Bank=A cool breeze blows from the west, driving dark clouds before it which blot out the stars in patches overhead. Elsewhere they glitter brightly in the dark sapphire sky.
&SPRNGDAYOVERCAST Weather Long Description Bank=The sky is cloudy grey, and nothing casts a shadow. A light wind blows from the southwest.
&SPRINGDAWNRAIN Weather Long Description Bank=Rain is falling as the sky begins to lighten to overcast grey. It's cool and there's a slight wind from the east.
&SPRINGDAYRAIN Weather Long Description Bank=A light rain falls from a grey sky. It's cool and there's a mild wind from the east.
&SPRINGNIGHTRAIN Weather Long Description Bank=Light rain falls from a grey-black sky without moon or stars. It's chilly and there's a fresh wind from the east.
&SPRINGDUSKRAIN Weather Long Description Bank=A light rain falls as the grey sky darkens in the twilight. The temperature is moderate and there's a slight wind from the east.
&WINTERDAWNLIGHTSNOW Weather Long Description Bank=The overcast sky slowly lightens from the grey-black of night to pale grey. Powdery snow falls from the clouds.
&WINTERDAYLIGHTSNOW Weather Long Description Bank=Snow flurries drift silently down from the pale grey sky. The air is damp and cold, and there is little wind.
&WINTERDUSKLIGHTSNOW Weather Long Description Bank=Darkness closes in early as thick grey clouds block the sun. A light snow is falling. There is scant wind.
&WINTERNIGHTLIGHTSNOW Weather Long Description Bank=The sky is grey-black, without moon or stars. The air is cold and wet, and there is little wind. Snow flurries fall. It is easier to feel the flakes landing than it is to see them, in the darkness.
&WINTERDUSKSLEET Weather Long Description Bank=Darkness comes early as thick clouds block the fading light of grey day. Freezing rain and sleet fall, coating everything with ice and making the ground slippery. Raw winds blow from the northeast.
&WINTERDAYSLEET Weather Long Description Bank=Sleet and freezing rain fall from heavy clouds, coating everything with ice and making the ground slippery. The world looks silver in the icy grey light. A raw wind blows from the northeast.
&WINTERDAWNSLEET Weather Long Description Bank=Darkness lingers and the dawn that breaks is grey. Sleet and freezing rain fall from heavy clouds, coating everything with ice and making the walking treacherous. Raw winds blow from the northeast.
&WINTERNIGHTSLEET Weather Long Description Bank=Icy rain and sleet fall invisibly from a grey-black sky. It's very dark and the ice makes walking on the slippery ground difficult. A raw wind blows from the northeast.
&WINTERNIGHTBLIZZARD Weather Long Description Bank=Night has come, and heavy snow falls. It's difficult to walk through the accumulating drifts, and difficult to see. It's hard to keep a sense of direction in the darkness and the blinding, swirling snow.
&WINTERDAYBLIZZARD Weather Long Description Bank=Heavy snow falls, making it hard to walk through the accumulating drifts, and occasionally even hard to see. All the world seems grey and white. The wind blows the snow about from the east, and it swirls around objects and never falls straight down.
&WINTERDAWNBLIZZARD Weather Long Description Bank=Dawn breaks to reveal snow falling from a dark sky that gradually lightens to grey-white. The snowfall is heavy and piles up in drifts, blown about by the shifting wind.
&WINTERDUSKBLIZZARD Weather Long Description Bank=Snow falls heavily in the deepening twilight, making it hard to walk through the accumulating drifts, and hard to see. The wind blows the snow about from the east, and it swirls around objects and never falls straight down.
&AUTUMNNIGHTFOG Weather Long Description Bank=The world is dark and foggy. Everything is half-hidden, nothing clearly seen. It's chilly and the air feels damp. No wind blows.
&AUTUMNDAYFOG Weather Long Description Bank=Everything is grey, veiled by mist. It's chilly and the air feels damp. There is no wind.
&AUTUMNDUSKFOG Weather Long Description Bank=Everything is grey, veiled by darkening twilit mist. There is little wind. It's chilly and the air feels damp.
&AUTUMNDAWNFOG Weather Long Description Bank=The sky slowly changes from dark grey to pale. Everything is veiled by fog. The air feels damp and chilly, and there is little wind.
&WINTERDAWNFOG Weather Long Description Bank=The sky slowly lightens from deep grey to pale, and a chilly mist veils everything.
&WINTERDAYFOG Weather Long Description Bank=The landscape looks ghostly and drained of color in the cold pale fog.
&WINTERNIGHTFOG Weather Long Description Bank=The night is shrouded in cold bleak mist, dark grey and colorless. The ground is icy and the air wet.
&WINTERDUSKFOG Weather Long Description Bank=The pale grey mists darken and begin to freeze, forming a slick of ice over the ground.
&SUMMERNIGHTFOG Weather Long Description Bank=Everything is half-hidden, nothing clearly seen in the dark fog. It's warm and still.
&SUMMERDUSKFOG Weather Long Description Bank=Everything is grey, veiled by darkening twilit mist. It's still, warm, and the air feels damp.
&SUMMERDAWNFOG Weather Long Description Bank=The sky begins to lighten from dark grey to pale, for the world is veiled by fog. It's still, warm, and the air feels damp.
&SUMMERDAYFOG Weather Long Description Bank=Everything is pale grey, veiled by mist. It's warm, humid, and still.
&SPRINGNIGHTFOG Weather Long Description Bank=The world is dark and foggy. Everything is half-hidden, nothing clearly seen. It almost feels as if you walk through some otherworld. It's cool and the air feels damp and still.
&SPRINGDUSKFOG Weather Long Description Bank=The mist begins to darken as twilight comes. It's cool and the air feels damp. There is no wind.
&SPRINGDAYFOG Weather Long Description Bank=Everything is grey, veiled by mist. It's cool and the air feels damp. There is no wind.
&SPRINGDAWNFOG Weather Long Description Bank=It grows lighter, and you see that everything is veiled by fog. It's moderately cool and the air feels damp and still.
&SPRINGDAWNSLEET Weather Long Description Bank=Rain is falling as the sky begins to lighten to overcast grey. It's cool and there's a slight wind from the east.
&SPRINGDAYSLEET Weather Long Description Bank=A light rain falls from a grey sky. It's cool and there's a mild wind from the east.
&SPRINGDUSKSLEET Weather Long Description Bank=A light rain falls as the grey sky darkens in the twilight. The temperature is moderate and there's a slight wind from the east.
&SPRINGNIGHTSLEET Weather Long Description Bank=Light rain falls from a grey-black sky without moon or stars. It's chilly and there's a fresh wind from the east.
&SPRINGNIGHTLIGHTSNOW Weather Long Description Bank=The sky is grey-black, moonless and starless. It's hard for human eyes to see anything in the deep shadows round about, without a light. It's cool and a light breeze blows from the southwest.
&SPRINGDAWNLIGHTSNOW Weather Long Description Bank=The sky begins to lighten. It's grey and overcast. A light wind blows from the southwest.
&SPRINGDAYLIGHTSNOW Weather Long Description Bank=The sky is cloudy grey, and nothing casts a shadow. The southwest wind is mild.
&SPRINGDUSKLIGHTSNOW Weather Long Description Bank=The grey of the clouds begins to darken, and it becomes cooler. A light wind is blowing from the southwest.
&SPRINGDAWNBLIZZARD Weather Long Description Bank=A cold driving rain pours from clouds slowly lightening from black to grey, propelled by a howling northeasterly wind.
&SPRINGDAYBLIZZARD Weather Long Description Bank=Cold rain pours from thick grey clouds, driven by a howling northeast wind.
&SPRINGDUSKBLIZZARD Weather Long Description Bank=Twilight falls and the clouds darken from grey to charcoal as cold driving rain pours from them, lashed by a raging northeast wind.
&SPRINGNIGHTBLIZZARD Weather Long Description Bank=Cold driving rain pours down upon you in the dark from black clouds, propelled by a howling northeast wind.
&WINTERDAWNSTORMY Weather Long Description Bank=Dawn breaks to reveal snow falling from a dark sky that gradually lightens to grey-white. The snowfall is heavy and piles up in drifts, blown about by the shifting wind.
&WINTERDAYSTORMY Weather Long Description Bank=Heavy snow falls, making it hard to walk through the accumulating drifts, and occasionally even hard to see. All the world seems grey and white. The wind blows the snow about from the east, and it swirls around objects and never falls straight down.
&WINTERDUSKSTORMY Weather Long Description Bank=Snow falls heavily in the deepening twilight, making it hard to walk through the accumulating drifts, and hard to see. The wind blows the snow about from the east, and it swirls around objects and never falls straight down.
&WINTERNIGHTSTORMY Weather Long Description Bank=Night has come, and heavy snow falls. It's difficult to walk through the accumulating drifts, and difficult to see. It's hard to keep a sense of direction in the darkness and the blinding, swirling snow.
@Desc Weather Long Description Bank=This is the main bank of long weather descriptions that vary with the seasons and whether it's day, night, dawn, or dusk. It belongs in the Auxiliary room and has no commands on it.
&VERSION Weather Long Description Bank=4.0
&AUTHOR Weather Long Description Bank=Keran@Keranset Island
@set Weather Long Description Bank=VISUAL
@set Weather Long Description Bank=NO_COMMAND
@set Weather Long Description Bank=SAFE


#31 - Keran's Box of Weather and Time Stuff, with Notes

@lock Keran's Box of Weather and Time Stuff, with Notes=#0
@Desc Keran's Box of Weather and Time Stuff, with Notes=Put me in the Auxiliary Room. Type 'note 1' and 'note 2' to read the notes.
&NOTE1 Keran's Box of Weather and Time Stuff, with Notes=$note 1: @pemit %# =%rThe items in Keran's Weather Code package are:%r%r#7 Keran's Time Functions%r#25 Keran's Tree Weather Descriptions%r#26 Keran's Weather Long Description Bank%r#31 Keran's Box of Weather and Time Stuff, with Notes%r#111 Keran's Weathermaker%r#113 Keran's Wizard Weather and Time Commands%r#114 Keran's Slave Weather Station%r#115 Keran's Clock%r#173 Keran's Emits Bank%r#175 Keran's Global Command Object%r#315 Keran's Weather and Time Help - Admin Commands%r#316 Keran's Weather and Time Help - Configuration Considerations%r#531 Keran's Weather and Time Help - General%r#533 Keran's Miscellaneous Functions%r#550 Keran's Storm Maker%r#555 Keran's Moon and Tide Functions%r%rRooms:%r%r#133 Keran's Parent of Separable Day-Night and Season Desc Outdoor Rooms%r#400 Keran's Parent of Season-and-Day-Night Varying Outdoor Rooms%r#404 Keran's Parent of Windowed Indoor Rooms%r#436 Keran's Parent of Windowless Indoor Rooms%r#545 Keran's Parent of Separable Day-Night-Dawn-Dusk and Season Desc Outdoor Rooms%r#567 Keran's Parent of Separable Desc Outdoor Rooms%r#619 Keran's Parent of Weather-and-Day-Night Varying Outdoor Rooms%r#510 Keran's Grandparent of Windowed Indoor Rooms%r#512 Keran's Grandparent of Windowless Indoor Rooms%r#515 Keran's Grandparent of Outdoor Rooms%r#508 Keran's Great-grandparent of Rooms%r#624 Keran's Test Room
&HELP_+TODAY Keran's Box of Weather and Time Stuff, with Notes=%r+today%r%r+Today returns information about the time of day, month, season, year, tides, weather, etc.%r
&HELP_+PARENTS Keran's Box of Weather and Time Stuff, with Notes=%r+parents%r%r+Parents returns a list of parent rooms you can use to build rooms with descriptions that vary according to the time of day, weather, etc. You build your room, @parent it to one of the parent rooms, and look at it to see instructions for how to write descriptions that vary according to environmental conditions. You can simply write descriptions for day, night, winter, summer, etc., and the parent room will switch them at the appropriate times.%r%rThere are two indoor parent rooms, one for rooms with windows and one for rooms without, and several outdoor parent rooms which have style variations in the variable descs returned. The parent rooms are set visual and you can examine <dbref> to see how they work.%r%r+help +parents2 for more.%r
&HELP_+PARENTS2 Keran's Box of Weather and Time Stuff, with Notes=%rThe outdoor room style variations are:%r%rSeparable Day-Night - This room will return a description consisting of an unchanging desc, a day/night desc, a spring/summer/autumn/winter desc, a weather desc, and a moon desc. You can suppress any elements you don't want, e.g., you can prevent it from showing a moon description.%r%rSeparable Day-Night-Dawn-Dusk - As above, but instead of returning a description that varies only by day and night, it returns different descriptions at day, night, dawn, and dusk.%r%rSeason and Day-Night - Returns a desc for summer-night, a desc for summer-day, a desc for autumn-night, a desc for autumn-day, and so on. Also returns a moon desc and a weather desc.%r%rSeason and Day-Night-Dawn-Dusk - As above, but also returns distinct dawn and dusk descriptions, e.g, winter-dawn, winter-dusk, etc.%r%rWeather and Day-Night - Returns descriptions that combine day-night and weather variations, e.g., fair-night, fair-day, overcast-day, etc. Also returns a moon desc.%r
&HELP_RANDWORD Keran's Box of Weather and Time Stuff, with Notes=%rrandword(<word1> <word2> <word3> <etc.>)%r%rRandword() returns a random word from the list.%r
&HELP_TILDE2BLANK Keran's Box of Weather and Time Stuff, with Notes=%rtilde2blank(<string>)%r%rTilde2blank() takes a string as its argument and replaces all the spaces with tildes (~).%r
&HELP_BLANK2TILDE Keran's Box of Weather and Time Stuff, with Notes=%rblank2tilde(<string>)%r%rTilde2blank() takes a string as its argument and replaces all the tildes (~) with spaces.%r
&HELP_WEATHER+TIME Keran's Box of Weather and Time Stuff, with Notes=%rKeran's Weather and Time Code is a configurable MUSH/MUX softcode package for maintaining virtual or in-character environments. It has +help divided into three sections:%r%r+wt - +help for common commands, functions and topics generally useful to builders and coders.%r%r+wta - Admin commands.%r%r+wtc - Configuration considerations. Extensive and sometimes complex, since there are many non-vanilla ways to set up this code, depending on the environment you're trying to model. This is version 4.0.%r
&NOTE2 Keran's Box of Weather and Time Stuff, with Notes=$note 2: @pemit %# = {%r+Help for Keran's Weather and Time Code Package%r%rAdd the following to your regular +help for global commands:%r%tweather+time +parents +today%r%rAdd the following to your +help for global functions:%r%tblank2tilde randword tilde2blank%r%rThe +help entries for these commands and functions are stored on this box, as attributes named &help_<item>; move them to your regular +help.%r}
@set Keran's Box of Weather and Time Stuff, with Notes=VISUAL
@set Keran's Box of Weather and Time Stuff, with Notes=SAFE



#111 - Weathermaker

@lock Weathermaker=#0
&SUMMERCLEAR Weathermaker=It's clear, warm, and breezy.
&SUMMERFAIR Weathermaker=It's fair and very warm, with a few clouds in the sky.
&SUMMEROVERCAST Weathermaker=It's overcast and warm.
&SUMMERRAIN Weathermaker=It's raining and warm.
&SUMMERSTORMY Weathermaker=It's raining hard, with thunder and flashes of lightning.
&SPRINGCLEAR Weathermaker=It's clear, cool, and breezy.
&SPRINGFAIR Weathermaker=It's fair and mild, with a few clouds in the sky.
&SPRINGOVERCAST Weathermaker=It's cloudy and mild.
&SPRINGRAIN Weathermaker=It's raining and cool.
&SPRINGSTORMY Weathermaker=It's raining hard and the winds are strong.
&WINTERCLEAR Weathermaker=It's clear, cold, and windy.
&WINTERFAIR Weathermaker=It's fair and chilly.
&WINTEROVERCAST Weathermaker=It's cloudy, cold, and damp.
&AUTUMNCLEAR Weathermaker=It's clear, cool, and windy.
&AUTUMNFAIR Weathermaker=It's fair and cool.
&AUTUMNOVERCAST Weathermaker=It's cloudy and cool.
&AUTUMNRAIN Weathermaker=It's raining and chilly.
&AUTUMNSTORMY Weathermaker=It's raining hard and the winds are strong.
&WINTERLIGHTSNOW Weathermaker=It's snowing.
&WINTERSLEET Weathermaker=It's sleeting.
&WINTERBLIZZARD Weathermaker=It's snowing heavily.
&WINTERFOG Weathermaker=It's foggy and cold.
&AUTUMNFOG Weathermaker=It's foggy and cool.
&SUMMERFOG Weathermaker=It's foggy and warm.
&SPRINGFOG Weathermaker=It's foggy and cool.
&SPRINGTYPE-CLEAR Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair rain fog stormy overcast)]
&SUMMERTYPE-CLEAR Weathermaker=[u(#533/randword,clear clear clear clear fair fair fair fair fair fair fair fair fair fair rain fog fog stormy overcast)]
&AUTUMNTYPE-CLEAR Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair rain fog stormy overcast)]
&WINTERTYPE-CLEAR Weathermaker=[u(#533/randword,clear clear clear clear fair fair fair fair fair fair fair fair fair fair clear fog lightsnow sleet blizzard overcast)]
&SPRINGTYPE-FAIR Weathermaker=[u(#533/randword,clear fair fair fair fair fair fair fair fair fair fair fair fair fair fair fair rain rain rain rain fog fog fog stormy overcast overcast overcast)]
&SUMMERTYPE-FAIR Weathermaker=[u(#533/randword,clear fair fair fair fair fair fair fair fair fair fair fair fair rain rain rain fog fog fog fog fog fog stormy overcast overcast overcast)]
&AUTUMNTYPE-FAIR Weathermaker=[u(#533/randword,clear fair fair fair fair fair fair fair fair fair fair fair fair fair fair fair rain rain rain rain fog fog fog stormy overcast overcast overcast overcast)]
&WINTERTYPE-FAIR Weathermaker=[u(#533/randword,clear fair fair fair fair fair fair fair fair fair fair fair fair fair fair fair clear clear clear clear fog lightsnow lightsnow blizzard lightsnow lightsnow lightsnow sleet overcast overcast overcast)]
&SPRINGTYPE-OVERCAST Weathermaker=[u(#533/randword,clear fair fair fair fair fair fair fair fair fair fair rain rain rain rain rain rain rain fog fog fog fog fog fog fog stormy overcast overcast overcast overcast)]
&SUMMERTYPE-OVERCAST Weathermaker=[u(#533/randword,clear fair fair fair fair fair fair fair fair rain rain rain rain rain fog fog fog fog fog fog fog fog fog fog fog fog stormy overcast overcast overcast overcast)]
&AUTUMNTYPE-OVERCAST Weathermaker=[u(#533/randword,clear fair fair fair fair fair fair fair fair fair fair rain rain rain rain rain rain rain fog fog fog fog fog fog fog stormy overcast overcast overcast overcast)]
&WINTERTYPE-OVERCAST Weathermaker=[u(#533/randword,clear fair fair fair fair fair fair fair fair fair fair sleet sleet sleet sleet sleet sleet sleet fog fog lightsnow lightsnow lightsnow lightsnow lightsnow blizzard overcast overcast overcast overcast)]
&SPRINGTYPE-RAIN Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair fair fair rain rain rain rain fog fog fog fog stormy overcast overcast overcast)]
&SUMMERTYPE-RAIN Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair fair fair rain rain rain fog fog fog fog fog fog fog fog fog stormy overcast overcast overcast overcast)]
&AUTUMNTYPE-RAIN Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair fair rain rain rain rain fog fog fog fog stormy stormy overcast overcast overcast)]
&WINTERTYPE-SLEET Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair fair sleet sleet sleet sleet lightsnow fog fog blizzard overcast overcast overcast)]
&WINTERTYPE-LIGHTSNOW Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair fair sleet sleet sleet sleet lightsnow lightsnow lightsnow lightsnow fog blizzard blizzard overcast overcast overcast overcast)]
&SPRINGTYPE-FOG Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair rain rain rain rain rain fog fog fog fog fog stormy overcast overcast overcast)]
&SUMMERTYPE-FOG Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair rain rain rain rain rain fog fog fog fog fog fog fog fog fog fog stormy overcast overcast overcast)]
&AUTUMNTYPE-FOG Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair rain rain rain rain rain fog fog fog fog fog stormy overcast overcast overcast)]
&WINTERTYPE-FOG Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair fog lightsnow lightsnow sleet sleet sleet sleet blizzard overcast overcast)]
&SPRINGTYPE-STORMY Weathermaker=[u(#533/randword,clear clear clear clear clear clear clear fair fair fair fair rain fog stormy overcast)]
&SUMMERTYPE-STORMY Weathermaker=[u(#533/randword,clear clear clear clear clear clear clear clear clear clear clear fair fair fair fair rain fog fog fog stormy overcast)]
&AUTUMNTYPE-STORMY Weathermaker=[u(#533/randword,clear clear clear clear clear clear clear clear clear clear clear fair fair fair fair rain fog stormy overcast)]
&WINTERTYPE-STORMY Weathermaker=[u(#533/randword,clear clear clear clear clear clear clear clear clear clear clear clear fair fair fair fair sleet lightsnow fog blizzard overcast)]
&SPRINGTYPE-SLEET Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair fair fair rain rain rain rain fog fog fog fog stormy overcast overcast overcast)]
&SPRINGTYPE-LIGHTSNOW Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair fair fair rain rain rain rain fog fog fog fog stormy overcast overcast overcast)]
&WINTERTYPE-RAIN Weathermaker=[u(#533/randword,clear clear clear clear clear fair fair fair fair fair fair fair fair fair fair fair fair fair fair sleet sleet sleet sleet lightsnow fog fog blizzard overcast overcast overcast)]
&SPRINGSLEET Weathermaker=It's raining.
&SPRINGLIGHTSNOW Weathermaker=It's cloudy and cool.
&SPRINGBLIZZARD Weathermaker=It's raining hard and the winds are strong.
&SPRINGTYPE-BLIZZARD Weathermaker=[u(#533/randword,clear clear clear clear clear clear clear fair fair fair fair rain fog stormy overcast)]
&WINTERSTORMY Weathermaker=It's snowing heavily.
&WINTERRAIN Weathermaker=It's sleeting.
&TRIGGER-AT-DAWN Weathermaker=&weathertype-old me=[u(weathertype)]; &weathertype me=[u([u(#7/season)]type-[u(weathertype-old)])]; @notify #114
@Desc Weathermaker=The Weathermaker selects the weather for the day, triggered by the clock. It also writes the phase of the moon at sunset on the Timing Functions object for a routine that keeps the moon phase from changing while the moon is visible in the sky. If you have set up regional weather, it notifies the Slave Weather Station to select weather for the day. It belongs in the Auxiliary Room.
&VERSION Weathermaker=4.0
&AUTHOR Weathermaker=Keran@Keranset Island
&WINTERTYPE-BLIZZARD Weathermaker=[u(#533/randword,clear clear clear clear clear clear clear fair fair fair fair sleet fog blizzard lightsnow overcast)]
&WEATHERTYPE Weathermaker=fair
&WEATHERTYPE-OLD Weathermaker=rain
@set Weathermaker=VISUAL
@set Weathermaker=NO_COMMAND
@set Weathermaker=SAFE


#113 - Wizard Weather and Time Commands

@lock Wizard Weather and Time Commands=#0
&GREGORIAN Wizard Weather and Time Commands=$gregorian: &month #7 = \[u(gregorian-month)\]; &season #7 = \[u(gregorian-season)\]; &year #7 = \[u(gregorian-year)\]; &hour #7 = \[u(calculated-hour)\]; &halfhour #7 = \[u(calculated-halfhour)\]; &quarterhour #7 = \[u(calculated-quarterhour)\]; @switch u(#7/calendar-compression) = 4, &base-days-per-year #7=384, &base-days-per-year #7=360; @edit #175/today = +abeyance, +today; @edit #175/today-system = +today,+abeyance
&NATIVE Wizard Weather and Time Commands=$native: &month #7 = \[u(calendar-month)\]; &season #7 = \[u(native-season)\]; &year #7 = \[u(native-year)\]; &hour #7 = \[u(calculated-hour)\]; &halfhour #7 = \[u(calculated-halfhour)\]; &quarterhour #7 = \[u(calculated-quarterhour)\]; @switch u(#7/calendar-compression) = 4, &base-days-per-year #7=384, &base-days-per-year #7=360; @edit #175/today = +abeyance,+today; @edit #175/today-system = +today,+abeyance
&CLOCK Wizard Weather and Time Commands=$clock *: &calendar-compression #7 = 1; &base-days-per-year #7 = 360; &clock-compression #7 = %0
&CALENDAR1 Wizard Weather and Time Commands=$calendar 1: &clock-compression #7 = 1; &base-days-per-year #7 = 360; &calendar-compression #7 = 1
&CALENDAR2 Wizard Weather and Time Commands=$calendar 2: &clock-compression #7 = 1; &base-days-per-year #7 = 360; &calendar-compression #7 = 2
&CALENDAR3 Wizard Weather and Time Commands=$calendar 3: &clock-compression #7 = 1; &base-days-per-year #7 = 360; &calendar-compression #7 = 3
&CALENDAR4 Wizard Weather and Time Commands=$calendar 4: &clock-compression #7 = 1; &base-days-per-year #7 = 384; &calendar-compression #7 = 4
&START-TIME Wizard Weather and Time Commands=$start time *: &time-begins #7 = [convtime(%0)]; &weathertype #111=fair; &weathertype-old #111=fair; &weathertype-master #114=fair; &slave-weathertype-old #114=fair; &slave-weathertype=fair
&STARTING-YEAR Wizard Weather and Time Commands=$starting year *: &starting-year #7 = %0
&REMOVE-REGIONAL-WEATHER Wizard Weather and Time Commands=$no regional: &trigger-at-dawn #111={&weathertype-old me=\[u(weathertype)\]; &weathertype me=\[u(\[u(#7/season)\]type-\[u(weathertype-old)\])\]}
&ADD-REGIONAL-WEATHER Wizard Weather and Time Commands=$regional: &trigger-at-dawn #111={&weathertype-old me=\[u(weathertype)\]; &weathertype me=\[u(\[u(#7/season)\]type-\[u(weathertype-old)\])\]; @notify #114}
@Desc Wizard Weather and Time Commands=This object has commands for making the most common configuration changes on it. It writes to the Time Functions Object and the Weathermaker. It has no globals and should be kept in the Auxiliary room.
&VERSION Wizard Weather and Time Commands=4.0
&AUTHOR Wizard Weather and Time Commands=Keran@Keranset Island
&IS-WIZARD Wizard Weather and Time Commands=[hasflag(%#, wizard)]
&LONGEST-DAY Wizard Weather and Time Commands=$longest day *: &solstice-day-length #7=%0
@lock/UseLock Wizard Weather and Time Commands=IS-WIZARD/1
&AXIAL-TILT Wizard Weather and Time Commands=[mul(fdiv(23.5, 360), pi(), 2)]
&DAY-LENGTH-BY-LATITUDE Wizard Weather and Time Commands=$latitude *: &solstice-day-length #7 = [round(mul(24, sub(1, [fdiv(mul(fdiv([atan(mul([fdiv(1, sin(u(#113/axial-tilt)))], [sqrt([sub([power(fdiv([cos(u(#113/axial-tilt))], [sin(mul(fdiv(%0, 360), pi(), 2))]), 2)], 1)])]))], mul(pi(), 2)), 360), 180)])), 2)]
&SYSTEM Wizard Weather and Time Commands=$system: &month #7 = \[u(system-month)\]; &season #7 = \[u(system-season)\]; &year #7 = \[u(system-year)\]; &hour #7 = \[u(system-hour)\]; &halfhour #7 = \[u(system-halfhour)\]; &quarterhour #7 = \[u(system-quarterhour)\]; &clock-compression #7 = 1; &base-days-per-year #7 = 365; &calendar-compression #7 = 1; @edit #175/today = +today,+abeyance; @edit #175/today-system = +abeyance,+today
&SEMI-TIDE Wizard Weather and Time Commands=$semidiurnal tide: &tide #555 = \[u(semi-tide)\]
&DI-TIDE Wizard Weather and Time Commands=$diurnal tide: &tide #555 = \[u(di-tide)\]
@set Wizard Weather and Time Commands=VISUAL
@set Wizard Weather and Time Commands=INHERIT
@set Wizard Weather and Time Commands=SAFE


#114 - Slave Weather Station

@lock Slave Weather Station=#0
&SPRINGTYPE-CLEAR Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&SUMMERTYPE-CLEAR Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&AUTUMNTYPE-CLEAR Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&WINTERTYPE-CLEAR Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast sleet lightsnow fog blizzard)]
&SPRINGTYPE-FAIR Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&SUMMERTYPE-FAIR Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&AUTUMNTYPE-FAIR Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&WINTERTYPE-FAIR Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast sleet lightsnow fog blizzard)]
&SPRINGTYPE-OVERCAST Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&SUMMERTYPE-OVERCAST Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&AUTUMNTYPE-OVERCAST Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&WINTERTYPE-OVERCAST Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast sleet lightsnow fog blizzard)]
&SPRINGTYPE-RAIN Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&SUMMERTYPE-RAIN Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&AUTUMNTYPE-RAIN Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&WINTERTYPE-SLEET Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast sleet lightsnow fog blizzard)]
&WINTERTYPE-LIGHTSNOW Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast sleet lightsnow fog blizzard)]
&SPRINGTYPE-FOG Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&SUMMERTYPE-FOG Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&AUTUMNTYPE-FOG Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&WINTERTYPE-FOG Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast sleet lightsnow fog blizzard)]
&SPRINGTYPE-STORMY Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&SUMMERTYPE-STORMY Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&AUTUMNTYPE-STORMY Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&WINTERTYPE-STORMY Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast sleet lightsnow fog blizzard)]
&SPRINGTYPE-SLEET Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&SPRINGTYPE-LIGHTSNOW Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast rain fog stormy)]
&WINTERTYPE-RAIN Slave Weather Station=[u(#533/randword,[u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] [u(weathertype-master)] clear fair overcast sleet lightsnow fog blizzard)]
&GENERATOR Slave Weather Station=@wait me={&slave-weathertype-old me = [u(slave-weathertype)]; &weathertype-master me = [u(#111/weathertype-old)]; &slave-weathertype me = [u([u(#7/season)]type-[u(weathertype-master)])]; @trigger me/generator}
@Startup Slave Weather Station=@drain me; @trigger me/generator
@Desc Slave Weather Station=This Slave Weather Station is an optional part of the weather code. It is only useful if you want to run regional weather (+topic regional for help). It is notified by the Weathermaker to select its own weather for the day. It has no commands and should be kept in the Auxiliary room or a regional auxiliary room. Set it visual, no_command, and safe.
&VERSION Slave Weather Station=4.0
&AUTHOR Slave Weather Station=Keran@Keranset Island
&WEATHERTYPE-MASTER Slave Weather Station=rain
&SLAVE-WEATHERTYPE Slave Weather Station=rain
&SLAVE-WEATHERTYPE-OLD Slave Weather Station=rain
@set Slave Weather Station=VISUAL
@set Slave Weather Station=NO_COMMAND
@set Slave Weather Station=SAFE


#115 - Clock

@lock Clock=#0
@Startup Clock=@trigger me/loop
&LOOP Clock=@trigger me/routine-time-of-day; @trigger me/routine-hour; @trigger me/routine-halfhour; @trigger me/routine-quarterhour; @trigger me/routine-tide; @trigger me/routine-moon; @trigger me/routine-sun; @wait 60 = @trigger me/loop
&DAY-NIGHT-DAWN-DUSK Clock=night
&LAST-DAY-NIGHT-DAWN-DUSK Clock=night
&ROUTINE-TIME-OF-DAY Clock=&last-time-of-day me = [u(time-of-day)]; &time-of-day me = [u(#7/time-of-day)]; @switch [comp(u(last-time-of-day), u(time-of-day))] = 0, @@, @dolist [v(triggerlist-time~of~day)] = @trigger ##/trigger-at-[u(#533/blank2tilde, u(#7/time-of-day))]
&ROUTINE-HOUR Clock=&last-hour me = [u(hour)]; &hour me = [u(#7/hour)]; @switch [comp(u(hour), u(last-hour))] = 0, @@, {@dolist [v(triggerlist-hour)] = @trigger ##/trigger-at-[u(#7/hour)]; @dolist [v(triggerlist-every~hour)] = @trigger ##/trigger-at-every~hour}
&ROUTINE-TIDE Clock=&last-tide me = [u(tide)]; &tide me = [u(#555/tide)]; @switch [comp(u(tide), u(last-tide))] = 0, @@, @dolist [v(triggerlist-tide)] = @trigger ##/trigger-at-[u(#533/blank2tilde, u(#555/tide))]
&ROUTINE-MOON Clock=&last-moon-up me = [u(moon-up)]; &moon-up me = [u(#555/moon-up)]; @switch [comp(u(moon-up), u(last-moon-up))] = 0, @@, 1, @dolist [v(triggerlist-moon)] = @trigger ##/trigger-at-moonrise, -1, @dolist [v(triggerlist-moon)] = @trigger ##/trigger-at-moonset; &last-meridian-transit me = [u(meridian-transit)]; &meridian-transit me = [gt(secs(), u(#555/meridian-transit))]; @switch [comp(u(meridian-transit), u(last-meridian-transit))] = 0, @@, 1, @dolist [v(triggerlist-moon)] = @trigger ##/trigger-at-meridian~transit
&ROUTINE-SUN Clock=&last-day-night me = [u(day-night)]; &day-night me = [u(#7/day-night)]; @switch [comp(u(day-night), u(last-day-night))] = 0, @@, -1, @dolist [v(triggerlist-sun)] = @trigger ##/trigger-at-sunrise, 1, @dolist [v(triggerlist-sun)] = @trigger ##/trigger-at-sunset
&HOUR Clock=18
&LAST-HOUR Clock=18
&ADD-TO-TRIGGERLIST Clock=$add * *: &triggerlist-%1 me = [setunion(%0, v(triggerlist-%1))]
&DELETE-FROM-TRIGGERLIST Clock=$del * *: &triggerlist-%1 me = [setdiff(v(triggerlist-%1), %0)]
@Desc Clock=The Clock runs a continual loop in which it checks the time of day and then @triggers various objects based on the time of day. It must trigger the Weathermaker, and the Time of Day Emits Bank if you want to use emits. You can add other objects to the list of objects it will @trigger. It has commands on it and should be kept in the Auxiliary room. It should be owned by a wizard and flagged inherit and safe.
&IS-ADMIN Clock=[orflags(%#, WZ)]
@lock/UseLock Clock=IS-ADMIN/1
&TRIGGERLIST-TIME~OF~DAY Clock=#111 #173 #624
&VERSION Clock=4.0
&AUTHOR Clock=Keran@Keranset Island
&TRIGGERLIST-SUN Clock=#173 #624
&TRIGGERLIST-MOON Clock=#173 #624
&TRIGGERLIST-TIDE Clock=#173 #624
&TIME-OF-DAY Clock=dusk
&DAY-NIGHT Clock=night
&LAST-TIME-OF-DAY Clock=dusk
&LAST-DAY-NIGHT Clock=day
&MOON-UP Clock=1
&LAST-MOON-UP Clock=1
&MERIDIAN-TRANSIT Clock=1
&LAST-MERIDIAN-TRANSIT Clock=1
&ROUTINE-HALFHOUR Clock=&last-halfhour me = [u(halfhour)]; &halfhour me = [u(#7/halfhour)]; @switch [comp(u(halfhour), u(last-halfhour))] = 0, @@, @dolist [v(triggerlist-every~halfhour)] = @trigger ##/trigger-at-every~halfhour
&ROUTINE-QUARTERHOUR Clock=&last-quarterhour me = [u(quarterhour)]; &quarterhour me = [u(#7/quarterhour)]; @switch [comp(u(quarterhour), u(last-quarterhour))] = 0, @@, @dolist [v(triggerlist-every~quarterhour)] = @trigger ##/trigger-at-every~quarterhour
&HALFHOUR Clock=37
&LAST-HALFHOUR Clock=37
&QUARTERHOUR Clock=76
&LAST-QUARTERHOUR Clock=75
&TRIGGERLIST-HOUR Clock=#173 #624
&TIDE Clock=high and ebbing
&LAST-TIDE Clock=high and ebbing
&TRIGGERLIST-EVERY~HALFHOUR Clock= #624
&TRIGGERLIST-EVERY~QUARTERHOUR Clock= #624
&TRIGGERLIST-EVERY~HOUR Clock= #624
@set Clock=VISUAL
@set Clock=INHERIT
@set Clock=SAFE


#173 - Emits Bank

@lock Emits Bank=#0
&TRIGGER-AT-DAWN Emits Bank=@dolist search(eroom=not(comp(u(##/hear-weather-emits), 1))) = @pemit/contents ## = [switch(u(#111/weathertype), clear, The stars in the east begin to look washed out as the sapphire night sky pales., fair, A faint sheen touches the clouds in the sapphire night sky to the east., fog, The eastern mist pales almost imperceptibly., lightsnow, {The dark grey sky in the east pales as damp, cold dawn approaches.}, blizzard, {Faintly, a grey pallor illuminates the thick snowfall.}, sleet, A faint gleam touches the eastern sky through the sleet and the cold wind., rain, {Through the veils of rain, the clouds to the east pale.}, stormy, The stormy sky lightens faintly to the east., overcast, Faint grey light seeps through a leaden layer of clouds toward the east.)]
&TRIGGER-AT-SUNRISE Emits Bank=@dolist search(eroom=not(comp(u(##/hear-weather-emits), 1))) = @pemit/contents ## = [switch(u(#111/weathertype), clear, Pink-gold light gilds the land as the sun creeps over the eastern horizon into a cloudless blue sky., fair, {The sun rises, painting the eastern clouds with a pink and pale gold glow.}, rain, Rain falls in the dawn's light., overcast, A grey dawn breaks., fog, Everything is half-concealed by fog in the grey half-light., stormy, Rain falls in wind-lashed sheets at dawn., lightsnow, {Through the snow flurries, the translucent grey sky brightens to the east.}, sleet, Freezing rain falls in the grey light of dawn., blizzard, Snow cascades from the sky in the half-light of dawn.)]
&TRIGGER-AT-DUSK Emits Bank=@dolist search(eroom=not(comp(u(##/hear-weather-emits), 1))) = @pemit/contents ## = [switch(u(#111/weathertype), clear, Shadows lengthen and the light turns golden as the sun sinks toward the west through a clear sky., fair, {Purple, gold, and vermillion clouds grace the western sky as the sun descends toward the west.}, overcast, The soft light dims at dusk., rain, A rainy late afternoon gives way to evening., fog, The misty light dims slightly., stormy, {The clouds darken further, rain drenching the landscape as evening approaches.}, lightsnow, {Through the drifting snowflakes, the translucent pale grey of the sky deepens.}, sleet, Sleet coats the ground with ice as evening draws near., blizzard, The whiteness of the whirling snow fades to blanched grey.)]
&TRIGGER-AT-SUNSET Emits Bank=@dolist search(eroom=not(comp(u(##/hear-weather-emits), 1))) = @pemit/contents ## = [switch(u(#111/weathertype), clear, The evening stars come out as the red-orange sun sinks below the horizon., fair, {The orange-red sun sinks below the western horizon, leaving a darkening tapestry of purple and red-gold clouds behind it.}, overcast, {A featureless blanket of grey cloud covers the evening sky.}, fog, Twilight deepens the grey of the fog., rain, The shower soaks the earth as twilight deepens., stormy, {The last light in the west begins to fail, heralding a stormy night.}, lightsnow, Snow flurries fall from a darkening grey sky., sleet, {In the deepening twilight, the freezing rain makes the footing treacherous.}, blizzard, Blinding snow spills from the sky as the twilight deepens.)]
&TRIGGER-AT-NIGHT Emits Bank=@dolist search(eroom=not(comp(u(##/hear-weather-emits), 1))) = @pemit/contents ## = [switch(u(#111/weathertype), clear, The stars glitter like diamonds in the deep sapphire blue of the night sky., fair, {Brindled clouds conceal a few patches of starlit sky.}, overcast, {The night is moonless and starless.}, fog, {Fog and darkness shroud the world.}, rain, Raindrops sprinkle down from a night sky obscured by dark grey clouds., stormy, Wailing wind blows rain through the darkness., blizzard, Snow swirls about you in gusts as night falls., sleet, {As night falls, the icy rain is whipped about by the wind.}, lightsnow, {The night is raw. Snow flurries drift down from the overcast sky.})]
@Desc Emits Bank=This is an emitter bank containing messages that are broadcast to outdoor rooms at first light, sunrise, sunset, moonrise, moonset, nightfall, etc. The messages vary with the weathertype. It is triggered by the Clock. It belongs in the Auxiliary room and has no commands on it.
&TRIGGER-AT-MORNING Emits Bank=@dolist search(eroom=not(comp(u(##/hear-weather-emits), 1))) = @pemit/contents ## = [switch(u(#111/weathertype), clear, The sun climbs into a brilliant blue sky., fair, The sun ascends in a bright blue sky filled with fluffy fair weather clouds and a few wisps of cirrus., overcast, The light from the overcast sky is diffuse and nothing casts a shadow., rain, It's a wan grey morning. Rain patters to earth., stormy, {Furious winds drive rain into the ground at angle. The morning sky is slate grey.}, sleet, Icing rain plates the world with silver in the cold light of morning., lightsnow, {The pallid gleam of the sun rises behind a veil of pearlescent grey, from which snow flurries drift. The air is chilly and damp.}, blizzard, {Heavy, wet snow falls throughout the morning.}, fog, Pale grey mists half-hide the world around you.)]
&TRIGGER-AT-12 Emits Bank=@dolist search(eroom=not(comp(u(##/hear-weather-emits), 1))) = @pemit/contents ## = [switch(u(#111/weathertype), clear, The sun blazes overhead in the clear blue sky., fair, {The sun shines overhead, bracketed by puffy fair weather clouds.}, overcast, A thick layer of stratus clouds cloaks the sky at mid-day., fog, The fog is grey-white in the light of mid-day., rain, Droplets splash in puddles at mid-day., stormy, {Torrential rains fall at mid-day, driven by raging winds.}, sleet, Freezing rain pours from the sky at mid-day., lightsnow, Light snow wafts gently down from the pale grey mid-day sky., blizzard, The world is lost in whiteness as snow blows about you at mid-day.)]
&TRIGGER-AT-0 Emits Bank=@dolist search(eroom=not(comp(u(##/hear-weather-emits), 1))) = @pemit/contents ## = [switch(u(#111/weathertype), clear, Stars glitter brilliantly in the deep blue of the midnight sky., fair, {Stars sparkle in the midnight sky, obscured here and there by clouds.}, overcast, Charcoal clouds fill the midnight sky., fog, It's hard to see through the midnight darkness and the fog., rain, {Rain falls at midnight, unseen in the darkness.}, stormy, The ferocity of the gale is unabated at midnight., lightsnow, {Powdery snow drifts down from the grey-black midnight sky, felt rather than seen in the darkness.}, sleet, Sleet spatters from the midnight sky., blizzard, The blizzard and the darkness of midnight hide everything.)]
&TRIGGER-AT-MOONRISE Emits Bank=@switch u(#555/moon-phase) = new, @@, {@switch u(#7/day-night) = night, {@dolist search(eroom=not(comp(u(##/hear-weather-emits), 1))) = @pemit/contents ## = [switch(u(#111/weathertype), clear, {The [u(#555/moon-phase)] moon rises into the sapphire blue of the night sky, dimming the light of the twinkling stars.}, fair, {Framed by a rack of clouds, the [u(#555/moon-phase)] moon rises into the deep blue of the starlit sky.},,)]}}
&TRIGGER-AT-MOONSET Emits Bank=@switch u(#555/moon-phase) = new, @@, {@switch u(#7/day-night) = night, {@dolist search(eroom=not(comp(u(##/hear-weather-emits), 1))) = @pemit/contents ## = [switch(u(#111/weathertype), clear, {The [u(#555/moon-phase)] moon sets, leaving the stars to spangle the crystalline night sky.}, fair, {The [u(#555/moon-phase)] moon, tracing a nearby wisp of cloud in silver, sinks below the western horizon. The stars sparkle in the ultramarine sky, distant and serene.},,)]}}
&TRIGGER-AT-AFTER~MIDNIGHT Emits Bank=@emit It's after midnight.
&TRIGGER-AT-AFTERNOON Emits Bank=@emit It's afternoon.
&TRIGGER-AT-NOON Emits Bank=@emit It's noon.
&TRIGGER-AT-MIDNIGHT Emits Bank=@emit It's midnight.
&VERSION Emits Bank=4.0
&AUTHOR Emits Bank=Keran@Keranset Island
&TRIGGER-AT-HIGH~AND~SLACK Emits Bank=@dolist search(eroom=not(comp(u(##/hear-tide-emits), 1))) = @pemit/contents ## = The tide is high and slack.
&TRIGGER-AT-LOW~AND~SLACK Emits Bank=@dolist search(eroom=not(comp(u(##/hear-tide-emits), 1))) = @pemit/contents ## = The tide is low and slack.
&TRIGGER-AT-LOW~AND~EBBING Emits Bank=@dolist search(eroom=not(comp(u(##/hear-tide-emits), 1))) = @pemit/contents ## = The tide is low and ebbing.
&TRIGGER-AT-LOW~AND~RISING Emits Bank=@dolist search(eroom=not(comp(u(##/hear-tide-emits), 1))) = @pemit/contents ## = The tide is low and rising.
&TRIGGER-AT-HIGH~AND~RISING Emits Bank=@dolist search(eroom=not(comp(u(##/hear-tide-emits), 1))) = @pemit/contents ## = The tide is high and rising.
&TRIGGER-AT-HIGH~AND~EBBING Emits Bank=@dolist search(eroom=not(comp(u(##/hear-tide-emits), 1))) = @pemit/contents ## = The tide is high and ebbing.
&TRIGGER-AT-MERIDIAN~TRANSIT Emits Bank=@switch u(#555/moon-phase) = new, @@, {@switch u(#7/day-night) = night, {@dolist search(eroom=not(comp(u(##/hear-weather-emits), 1))) = @pemit/contents ## = [switch(u(#111/weathertype), clear, {The [u(#555/moon-phase)] moon reaches its zenith, [u(#555/moon-adjective)]ly illuminating all below.}, fair, {The [u(#555/moon-phase)] moon gleams overhead, its light turning the clouds to tarnished silver.},,)]}}
@set Emits Bank=VISUAL
@set Emits Bank=ROYALTY
@set Emits Bank=NO_COMMAND
@set Emits Bank=SAFE


#175 - Global Command Object

@lock Global Command Object=#0
@Desc Global Command Object=This object is part of Keran's Weather and Time Code Package, and has global commands on it. It belongs in the Master Room and should be set royalty.
&AUTHOR Global Command Object=Keran@Keranset Island
@set Global Command Object/AUTHOR = no_command
&VERSION Global Command Object=4.0
@set Global Command Object/VERSION = no_command
&TODAY-SYSTEM Global Command Object=$+abeyance: @pemit %#=It's [squish([mid(time(), 0, 20)] [u(#7/year)])]. The [u(#555/moon-phase)] moon [switch(u(#555/moon-up), 1, is up., 0, isn't up.)] The tide is [u(#555/tide)].%r[u(#533/long-weather)]
&PARENTS Global Command Object=$+parents: @pemit %# = Available parent rooms are:%r [iter(iter(children(#508), children(##)), ## [name(##)]%r)]
&WT Global Command Object=$+wt *: @pemit %# = [u(#531/help_%0)]
&WT-LIST Global Command Object=$+wt: @pemit %# = [u(#531/list)]
&WTA Global Command Object=$+wta *: @pemit %# = [u(#315/%0)]
&WTC Global Command Object=$+wtc *: @pemit %# = [u(#316/%0)]
&WTC-LIST Global Command Object=$+wtc: @pemit %# = [u(#316/topic-list)]
&WTA-LIST Global Command Object=$+wta: @pemit %# = [u(#315/topic-list)]
&TODAY Global Command Object=$+today: @pemit %#=It's hour [u(#7/hour)] in the day, in week [u(#7/week)] of [u(#533/tilde2blank, u(#7/month))], in the year [u(#7/year)]. The [u(#555/moon-phase)] moon [switch(u(#555/moon-up), 1, is up., 0, isn't up.)] The tide is [u(#555/tide)].%r[u(#533/long-weather)]
@set Global Command Object=VISUAL
@set Global Command Object=ROYALTY
@set Global Command Object=SAFE


#315 - Weather and Time Help - Admin Commands

&CLOCK-COMMANDS Weather and Time Help - Admin Commands=%radd <dbref> <triggerlist>%rdel <dbref> <triggerlist>%r%rThese are the commands on the Clock allowing you to add or delete items from the Clock's triggerlists, so that the Clock can trigger commands on them at appropriate times. You must be where the Clock can hear you in order to use them. <dbref> is the number of the item to be added to the Clock's triggerlists, and <triggerlist> is which triggerlist to use. The triggerlist must be time~of~day, sun, moon, tide, hour, every~hour, every~halfhour, or every~quarterhour. An item to be triggered must have an attribute &trigger-at-<time> = <action to be triggered>, where <time> is dawn, sunrise, morning, noon, afternoon, dusk, sunset, night, midnight, after~midnight, moonrise, moonset, meridian~transit, every~hour, every~halfhour, every~quarterhour, 0 through 23, high~and~rising, high~and~slack, high~and~ebbing, low~and~ebbing, low~and~slack, low~and~rising. Use &trigger-at-0 and &trigger-at-12 for triggering at precisely midnight and noon; the times of day called noon and midnight are time stretches.%r%rThe Clock triggers the Weathermaker at dawn and the Emits Bank at various times of day and hours, by default.%r
&CALENDARS Weather and Time Help - Admin Commands=%rgregorian%rnative%rsystem%r%rThese commands, on the Wizard Weather and Time Command object, change the calendar to the named calendar mode. You must be where the Wiz Weather Command object can hear you to execute it. See +wtc calendars for an explanation of the calendar options.%r
&CLOCK-COMPRESSION Weather and Time Help - Admin Commands=%rclock <number>%r%rThis command sets the compression mode to clock and the clock compression ratio to <number>, where <number> is a small whole number, or a decimal ratio of small whole numbers by which 3600 can be evenly divided, e.g, 1.5 (3:2). (Other ratios might work, but Keran hasn't tested them.) You must be where the Wizard Weather and Time Command object can hear you to execute it. See +wtc compression, +wtc clock-compression.%r
&CALENDAR-COMPRESSION Weather and Time Help - Admin Commands=%rcalendar <number>%r%rThis command sets the compression mode to calendar and the calendar compression to <number>, where <number> is 1, 2, 3, or 4. You must be where the Wizard Weather and Time Command object can hear you to execute it. See +wtc compression, +wtc calendar-compression.%r
&START-TIME Weather and Time Help - Admin Commands=%rstart time <time>%r%rThis command on the Wizard Weather and Time Command object sets the real time from which the Weather and Time Code should begin its reckoning. The format for <time> is the same returned by time(); you don't have to correctly specify the weekday. Any three letters will do. The Wiz Weather Command object must be able to hear you for it to work.%r%rThis command also resets &weathertype and &weathertype-old on the Weathermaker, and &weathertype-master, &slave-weathertype-old, and &slave-weathertype on the Slave Weather Station, because if the new start time changes the season, it is possible that the current weathertypes may be inappropriate.%r
&STARTING-YEAR Weather and Time Help - Admin Commands=%rstarting year <year>%r%rThis command on the Wizard Weather and Time Command object sets the virtual starting year. <year> must be an integer. You must be where the Wiz Weather Command Object can hear you for it to work.%r
&REGIONAL Weather and Time Help - Admin Commands=%rregional%rno regional%r%rThese commands on the Wizard Weather and Time Command object set up the Weathermaker to @notify the Slave Weather Station at dawn to select its own weather, or remove such notification. You must be where the Wiz Weather Command Object can hear you for them to work. Setting up regional weather can be quite involved; see +wtc regional-weather for a discussion thereof.%r
&LONGEST-DAY Weather and Time Help - Admin Commands=%rlongest day <hours>%r%rThis command on the Wizard Weather and Time Command object sets the length of the longest day, in hours; the day length varies with the season. <hours> can be any number from 12 to just under 24, but there are definitely things that will break as you approach 24 hours of daylight, if you're attempting midnight sun effects in a polar setting, and Keran hasn't identified all of them. You must be where the Wiz Weather Command Object can hear you for it to work.%r
&LATITUDE Weather and Time Help - Admin Commands=%rlatitude <degrees>%r%rThis command on the Wizard Weather and Time Command object sets the length of the longest day by calculating it from latitude; the day length varies with the season. <lattitude> can be any number greater than 0 and less than or equal to 66. If you have an equatorial setting, use the longest day command to set a day length of 12 hours, instead of giving this command a latitude of 0; a division-by-0 error will occur. Keran hasn't done testing to determine exactly how close you can get to the poles before the code starts doing jarring things; it is conceivable that latitude 66 may be too high. You must be where the Wiz Weather Command Object can hear you for this command to work.%r
&TIDE Weather and Time Help - Admin Commands=%rsemidiurnal tide%rdiurnal tide%r%rThis commands on the Wizard Weather and Time Command object set the tide to either diurnal or semidiurnal mode. Diurnal tides have one high tide and one low tide per day, and are characteristic of areas on very large ocean basins, like the Pacific; semidiurnal times have two high tides and two low tides per day, and are characteristic of smaller oceans like the Atlantic. The tide is semidiurnal by default. You must be where the Wiz Weather Command Object can hear you for these commands to work.%r
&TOPIC-LIST Weather and Time Help - Admin Commands=%rThese commands are to be found on the Wizard Weather and Time Command Object, the Clock, or the Stormmaker. You must be a wizard to execute some of them, and wizard or royalty to execute others. The items the commands are on must be able to hear you.%r%r[columns(calendar-compression calendars clock-commands clock-compression latitude longest-day regional starting-year start-time stormmaker tide, 22)]%r%r+wta <name> for +help.%r
&STORMMAKER Weather and Time Help - Admin Commands=%rweather <weathertype>%rslave <weathertype>%r%rThese commands are all on the Stormmaker. You have to be somewhere where it can hear you to run them.%r%rThe weather and slave commands allow you to change the weathertype on the Weather Maker or the Slave Weather Station to something appropriate to the sort of effects you want to produce. <Weathertype> should be clear, fair, overcast, fog, rain, stormy, sleet, lightnow, or blizzard, appropriate to the season.%r%r+wta stormmaker2 for more.%r
&STORMMAKER2 Weather and Time Help - Admin Commands=%reverywhere <string>%routside <string>%rwindow <string>%rinside <string>%rzone <dbref>=<string>%rsearch <attribute>=<string>%r%rThese commands send the strings supplied, capitalized, to the contents of all rooms that fall into the appropriate categories. Everywhere, window, outside, and inside will only work correctly if all of the rooms in your IC area are parented to an appropriate parent room (see +wtc parent-room-hierarchy). Zone will send the string to the contents of any room @chzoned to the dbref given. Search will send the string to the contents of any room that has the attribute specified.%r
@Desc Weather and Time Help - Admin Commands=This is +wta, the admin command +help for Keran's Weather and Time Code Package. It should be set visual, safe, and no_command, and it belongs in the Auxiliary room. The items documented on this object are expected to be useful to admins.
@set Weather and Time Help - Admin Commands=VISUAL
@set Weather and Time Help - Admin Commands=NO_COMMAND
@set Weather and Time Help - Admin Commands=SAFE


#316 - Weather and Time Help - Configuration Considerations

&TOPIC-LIST Weather and Time Help - Configuration Considerations=%r[columns(*bugs *calendars *calendar-compression *clock-compression *compression *global-emits *global-setup foreign-timing moons next-version *parameters *parent-room-hierarchy regional-weather varying-the-weather weather-modelling, 22)]%r%rItems marked with a * are important for normal operations.%r%r+wtc <name> for +help.%r
@Desc Weather and Time Help - Configuration Considerations=This object has +help for various topics related to setting up and configuring Keran's Weather and Time Code. It has no commands and should be kept in the Auxiliary room.
&BUGS Weather and Time Help - Configuration Considerations=%rThis code has been tested at calendar compression ratios of 1:1, 2:1, 3:1, and 4:1, and at clock compression ratios of 4:1, 3:1, 2:1, 1:1, and 3:2. It appears to work; however, the testing period has not been long enough to let it cycle through a whole year. It is supposed to work correctly and consistently at these ratios; if it doesn't, please tell Keran (keranset@mail1.nai.net).%r%rKeran posts bug fixes in a changes file at the distribution site, ftp://telmaron.telmaron.com/pub/keranset/.%r%rSome known aberrations:%r%rOccasionally, you'll see a message from the Emits bank doubled. This isn't a bug in the Weather and Time Code; it's an aberration in the behavior of the server, and shows up in other code with timed @triggers as well. It doesn't happen often; there's no softcode fix for it.%r%r+wtc bugs2 for more.%r
&BUGS2 Weather and Time Help - Configuration Considerations=%rRarely, you'll find that for some reason, the weathertypes will not be correctly written to the Weathermaker, which, naturally, breaks everything in the code that depends on the weathertype. This has happened about 3 times at Keranset over the past couple of years. To fix it, manually set weathertypes on the Weathermaker, like so:%r%r&weathertype weathermaker=fair%r&weathertype-old weathermaker=fair%r%rA mysterious and erratic failure to completely evaluate a function can be a sign that the function_invocation_limit for the server is set too low. If you can evaluate a function individually but it fails up as part of something else--a variable desc--this is probably the problem. Set the function_invocation_limit up until it stops happening.%r%rKeran's Weather and Time code, when correctly installed, doesn't write to anything in the database other than itself, when your server is operating normally, unlike some other public code releases.%r
&CALENDARS Weather and Time Help - Configuration Considerations=%rKeran's weather and timing code comes with three possibilities for calendars: native, Gregorian, and system. System is a true Gregorian calendar that runs off the system clock in 1:1 time compression; the date and time will always be identical to whatever your system clock returns, except that you can change the year. The other two calendars are quasi-Gregorian and the native format, both of which have 360 day years (usually) and 30 day months.%r%rIn the quasi-Gregorian calendar in which December, January, and February constitute winter; March, April, and May, spring; June, July, and August, summer; and September, October, and November, autumn. The dates of the solstices and equinoxes are not accurate in this mode; winter, and the winter solstice, fall on December 1, not December 21 as is the case in the real world.%r%rIn the native calendar, the year and the first month of spring both begin on the vernal equinox.%r%rSee +wta calendars for +help on switching between calendars.%r%rRecoder's notes: calculations are made using the native mode; then month, season, and year are recalculated to produce the quasi-Gregorian timing.%r
&CALENDAR-COMPRESSION Weather and Time Help - Configuration Considerations=%rIn calendar compression, an IC day passes in 24 real hours, and IC time is accelerated by skipping days in each month, season, and year. At 3:1 calendar compression, for example, an IC month passes in 10 24-hour days. The calendar compression ratio above must be a small positive integer; the code as supplied is designed to handle calendar compression rations of 1, 2, 3, and 4. See +wta calendar-compression for +help on the commands to set the calendar compression.%r%rRecoder's notes: since the code works by counting days, fractional ratios do not work. In order not to break the moon, which has 8 phases and needs at least 8 counted days per month to go through an entire phase cycle, the minimum value of base-days-per-year is 8 phases * 12 months * calendar-compression, and it must be evenly divisible by both 8 and 12. The default value for the base days per year is 360; all calendar compression ratios of 3:1 or lower, as well as typical clock compression ratios, work with this value. The Wizard Weather Command object automatically sets an appropriate value for the base days per year if you use it to reset the calendar compression to 1, 2, 3, or 4.%r
&CLOCK-COMPRESSION Weather and Time Help - Configuration Considerations=%rWhen IC time is accelerated using clock compression, an IC hour goes by in less than a real hour. The number of seconds in an IC hour is determined by dividing 3600 (the number of seconds in a real hour) by the clock compression ratio. The clock compression ratio is expected to be a small positive number by which 3600 can be evenly divided. It may have a fractional part; for example, you can evenly divide 3600 by 1.5 (a 3 IC hour: 2 real hour ratio). 4, 3, 2, 1, and 1.5 are all acceptable clock compression ratios.%r%rThe effect of using ratios with fractional parts, like 1.5 (3:2), 1.25 (5:4), or 2.5 (5:2), is that it will desynchronize IC time and real time; that is, if a player logs in at the same time of day all the time, it won't always be the same time of day ICly. This can be useful if you wish to accommodate players who log in from other time zones at odd hours.%r%rSee +wta clock-compression for +help on how to set the clock compression.%r
&COMPRESSION Weather and Time Help - Configuration Considerations=%rThere are two different ways to accelerate IC time in Keran's weather and timing code: clock compression and calendar compression. It is assumed that you will only use one of them at a time, although so far it's produced reasonable results if both the clock and the calendar are compressed; Keran's testing of this has not been rigourous. The code has been tested at clock compression ratios of 4:1, 3:1, 2:1, 3:2, and 1:1, and at calendar compression ratios of 4:1, 3:1, 2:1, and 1:1.%r%rIn clock compression, a day goes by faster than it does in real time. For example, if you have a clock compression ratio of 3:1, 24 IC hours will go by in 8 real hours. In calendar compression, on the other hand, a day goes by in 24 hours, but you skip days, so that months, seasons and years pass more quickly. For example, if you have a calendar compression ratio of 2:1, 12 IC months will pass in 6 real months. See +wtc clock-compression, +wtc calendar-compression.%r
&GLOBAL-SETUP Weather and Time Help - Configuration Considerations=%rYou should put these attributes on #1 to set up the required global +functions:%r%r&SETUP-GLOBAL-FUNCTIONS #1 = @function randword = <dbref of Miscellaneous Functions>/randword; @function tilde2blank = <dbref of Miscellaneous Functions>/tilde2blank; @function blank2tilde = <dbref of Miscellaneous Functions>/blank2tilde%r@startup #1 = @trigger me/setup-global-functions%r%rFor version 4.0 of the Weather and Time Code, you'll need to kick the function_invocation_limit on the server up to handle the recoded in variable descs in children of the parent rooms. Setting function_invocation_limit to 12500 seems to suffice.%r
&GLOBAL-EMITS Weather and Time Help - Configuration Considerations=%rThe contents of any room which has an attribute &hear-weather-emits set to 1 will hear the weather emits from the Emits Bank, assuming the Emits Bank is on the Clock's lists of items to @trigger (it is, by default). Those supplied are usually only appropriate for outdoor rooms. The outdoor parent rooms and their children are set to hear weather emits by default; if you want to turn off the weather emits in a child of an outdoor parent room, set &hear-weather-emits <room #> = 0.%r%rAny room which has an attribute &hear-tide-emits set to 1 will hear the tide emits from the Emits Bank, assuming the Emits Bank is on the Clock's list of items to trigger at tide changes.%r%rSee +wta clock-commands for information on adding items to the Clock's triggerlists.%r
&FOREIGN-TIMING Weather and Time Help - Configuration Considerations=%rIn some cases you may wish to use this weather system with other timing code, replacing the Clock and the Time Functions Object. This is not recommended, as the timing code is the guts of the package, but an experienced coder should be able to manage it.%r%rRecoder's notes: in order to use foreign timing code and preserve most of the functionality of this weather system, the timing code must capable of the following:%r%rIt must, at the very least, distinguish between day and night; preferably, it distinguishes between day, night, dawn, and dusk.%rIt must distinguish the seasons spring, summer, autumn, and winter.%rIn order for the parent rooms to work as they do in this system, there must be a function that tells whether the moon is up or not.%rThere must be a clock capable of triggering the Weathermaker at dawn.%r%rIt is beyond the scope of this +help to attempt to explain exactly what steps must be undertaken to make the weather code work with foreign timing; however, the weather system was coded with readability and simplicity of code in mind (given the complexity of the system).%r
&MOONS Weather and Time Help - Configuration Considerations=%rAdding moons is easier in 4.0 than it was in 3.0, in the sense that you can @clone the Moon and Tide object, strip the unnecessary tide commands off the new object, and set &moon-daylength-difference on the new object to the difference between the amount of time it takes the moon to get around the sky, and 24 hours, in hours. That is to say, if it takes the moon 24.8 hours to get around the sky (the correct figure for Earth's moon, and the default setting for the existing moon), then moon-daylength-difference should be set to .8; if it takes 26 hours, it should be set to 2; if it takes 23.5 hours, it should be set to -.5. The code will handle all the phase and rise-and-set time recalculations, etc., from there, as far as determining how the new moon behaves. However, if you want the new moon to show up in +today, or in the variable descs in the parent rooms, you'll need to edit it in.%r
&PARAMETERS Weather and Time Help - Configuration Considerations=%rThis is a list of the parameters that you can set to control the basic operation of the Weather and Time Code. See +wta for +help for the commands you can use to set them. The somewhat complex ones are often explained in other +wtc topics.%r%rcompression mode%rcalendar%rcalendar compression ratio%rclock compression ration%rlongest-day-length/latitude%rdiurnal/semidiurnal tide%rregional weather%rstarting-year%rstart-time%r
&PARENT-ROOM-HIERARCHY Weather and Time Help - Configuration Considerations=%rThere are several parent rooms supplied with version 4.0 of the Weather and Time Code. The parent rooms make it comparatively easy to write rooms whose descriptions vary by time of day, season, weather, lighting conditions, etc. They can be used individually; as supplied, however, they exist in a hierarchy that determines what kind of rooms get what emits from the Stormmaker. You can create your own parent rooms and @parent them to the appropriate ancestors, which avoids your having to recode the Stormmaker to add parent rooms.%r%rAt the top of the hierarchy is the Great-grandparent of Rooms. Any room which is a remote descendant of this room is considered IC, and will receive certain emits from the Stormmaker; those rooms which are not descendants of this room are considered OOC and will not hear Stormmaker emits.%r%r+wtc parents2 for more.%r
&PARENTS2 Weather and Time Help - Configuration Considerations=%rThe next layer of the hierarchy comprises three rooms:%r%rGrandparent of Outdoor Rooms%rGrandparent of Windowless Indoor Rooms%rGrandparent of Windowed Indoor Rooms%r%rIt is possible to direct Stormmaker emits to the children of only one Grandparent Room, or to those of two of the three. For instance, emits for thunder should go to all three kinds of room; emits for lightning should only go to those with a view outside--Outdoor Rooms and Windowed Indoor Rooms; emits for a power blackout might only go to both kinds of Indoor Room.%r%rNeither the Great-Grandparent nor any of the Grandparent Rooms contain any variable description coding; this is all to be found on the Parent Rooms. There are seven Parent Rooms supplied, two indoor and five outdoor:%r%r+wtc parents3 for more.%r
&PARENTS3 Weather and Time Help - Configuration Considerations=%rParent of Windowless Indoor Rooms%rParent of Windowed Parent Rooms%rParent of Separable Day-Night and Season Desc Outdoor Rooms%rParent of Season-and-Day-Night Varying Outdoor Rooms%rParent of Separable Day-Night-Dawn-Dusk and Season Desc Outdoor Rooms%rParent of Separable Desc Outdoor Rooms%rParent of Weather-and-Day-Night Varying Outdoor Rooms%r%rThe +parents command returns the names and dbrefs of all grandchildren of the Great-Grandparent of Rooms, so that players can easily refer to a list of which parent rooms are available. The differences between the various outdoor parent rooms are differences in flavors of variable descriptions they'll return. See +wt parents.%r%r+wtc parents4 for more.%r
&PARENTS4 Weather and Time Help - Configuration Considerations=%rYou may decide that the existing parent rooms are insufficient. For example, you could decide to create a Shore Parent Room whose children would automatically hear tide emits from the Emits Bank. You might do this by @cloning one of the outdoor parent rooms, renaming the clone to Shore Parent Room, setting a &hear-tide-emits Shore Parent Room=1 on it, and then @parenting the Shore Parent to the Grandparent of Outdoor Rooms.%r%rYou might decide that the existing kinds of room are insufficient, so that you need to create a new Grandparent Room. Usually, the reason for doing this, as opposed to creating a new parent room, is that instead of needing to write a new variation on variable description code, you need a new class of room because you're going to recode the Stormmaker to accommodate a very different environment.%r%r+wtc parents5 for more.%r
&PARENTS5 Weather and Time Help - Configuration Considerations=%rFor instance, if you had a setting that involved humans in a sea lab interacting with civilized dolphins, you might need a Grandparent of Underwater Rooms, because undersea rooms might not appropriately receive messages relating to indoor human environments or surface weather, but you might want to be able to send distinct environmental event messages to them.%r%rThe Stormmaker is slightly misnamed. It's actually a Transient Environmental Effects Generator, and can be used to produce events besides storms--earthquakes, blackouts, and unusual sights in the sky are all within its purview.%r
&REGIONAL-WEATHER Weather and Time Help - Configuration Considerations=%rWith regional weather set up, different areas of the MUSH experience different weather at the same time. The regions should be about a day apart--since large weather systems move at vastly different speeds that may vary between 5 and 50 miles per hour, depending on the energy of the system, a certain amount of compromise is necessary; 200-300 miles might be a good figure. The Weathermaker becomes the master weather generator, and should control the weather in the region where storms enter the virtual landscape; Slave Weather Stations control the weather in other regions. For example, say your MUSH's landscape covered the southern New England coast; weather systems there have a large tendency to reach the southwestern portions before the northeastern, and so you would set the Weathermaker up to control the southwesternmost region and the first Slave Weather Station up to control a region 200-300 miles northeastward. It is possible to daisy-chain Slave Weather Stations; you could then have a second Slave Weather Station another 200-300 miles northeastward, using the first Slave Weather Station as its master.%r%r+wtc regional2 for more.%r
&REGIONAL2 Weather and Time Help - Configuration Considerations=%rThe Weathermaker uses yesterday's weather--its own weather--to determine what today's probably is. The Slave Weather Station models weather in a similar fashion, but it uses its master's previous day's weather to determine what its own probably will be. In the default configuration, usually the slave will select the master's weather of the previous day for its own weather, but sometimes it will select something else. In this way weather systems seem to move from one region to another, with some variation.%r%rTo set up regional weather, you need to do the following:%r%r1) Determine the areas on your MUSH that belong to each region, and which region will belong to the Weathermaker.%r%r2) Set up the Weathermaker for regional weather by typing 'regional' where the Wizard Weather Command object can hear you. This changes the &generator attribute on the Weathermaker so that, after picking its own weather, it notifies the slave to select a new weathertype for the day also. If you wish to remove this later, the 'no regional' command on the Wizard Weather Command object will do it.%r%r+wtc regional3 for more.%r
&REGIONAL3 Weather and Time Help - Configuration Considerations=%r3) You will need to make it clear in your documentation somewhere that rooms in the Slave Region should use the slave weather functions instead of the master weather functions. One set of slave weather functions is included on the Time Functions Object as an example.%r%r4) You can't use a single Emits Bank to broadcast time of day messages to multiple regions unless you change the messages on it: the ones supplied vary with the weather, and all regions may not have the same weather. To set up an Emits Bank for a second region, you will need to set &hear-weather-emits on rooms in it to 0, and select another attribute name that can be searched for, such as &hear-slaveweather-emits, like so:%r%r&hear-slaveweather-emits <room>=1%r&hear-weather-emits <room> = 0%r%r+wtc regional4 for more.%r
&REGIONAL4 Weather and Time Help - Configuration Considerations=Then @clone the Emits Bank, rename the copy to Slave Emits Bank, and @edit it so that its searches use your new attribute name instead of &hear-weather-emits:%r%r@edit Slave Emits Bank=hear-weather-emits, hear-slaveweather-emits%r%rAdd the Slave Emits Bank's database # to the Clock's triggerlists (type +wta clock-commands for help on this).%r%r+wtc regional5 for more.%r
&REGIONAL5 Weather and Time Help - Configuration Considerations=%rIf you wish to make another slave station, you will have to do the following:%r%r1) Clone the Slave Weather Station.%r%r2) Edit the *first* Slave Weather Station's &generator attribute so that it reads:%r%r@wait me={&weathertype-old me = \[u(weathertype)\]; &weathertype-master me = \[u(<dbref of Weathermaker>/weathertype-old)\]; &weathertype me = \[u(\[u(<dbref of Time Functions>/season)\]type-\[u(weathertype-master)\])\]; @notify <database # of Secondary Slave Weather Station>; @trigger me/generator}%r%rThis change causes it to notify the Secondary Slave Station to select its own weathertype of the day.%r%r+wtc regional6 for more.%r
&REGIONAL6 Weather and Time Help - Configuration Considerations=%r3) Now edit the &generator attribute on the Secondary Slave Station, so that the &weathertype-master command refers not to the Weathermaker, but to the first Slave Weather Station; it's going to read the first slave, not the Weathermaker, to determine its probable weather.%r%rYou will need to add another set of slave functions to the Miscellaneous Functions object, possibly called slave2-* instead of slave-*, set rooms in the Secondary Slave region with a &hear-slave2weather-emits attribute on it instead of &hear-weather-emits, and @clone another edited copy of the Emits Bank whose dbref must be added to the Clock's triggerlists.%r%rThere are various ways to approach regional weather architecture. You can set up more than one slave station that depends directly on the Weathermaker, or on a higher-ranking Slave Weather Station. You can set up more than one Weathermaker to have multiple independent masters.%r%r+wtc regional7 for more.%r
&REGIONAL7 Weather and Time Help - Configuration Considerations=%rIt's been asked whether you can to use this weather and timing code to set up different time zones. It has not been tested, but it seems likely that you could make second copy of the Time Functions Object and change time-begins slightly, so that it began 3600 secs / clock-compression after time-begins on the first Time Functions Object. It would be a nuisance to document this; you would no longer have a globally-valid value for hour, time-of-day, etc. You would probably need more than one Weathermaker and more than one set of parent rooms, if you're using the parent rooms, to make it work without significant code alterations.%r
&TIDE Weather and Time Help - Configuration Considerations=%rSome places, typically those on the shores of huge oceans like the Pacific, have diurnal tide cycles, or one high and one low tide per day, while others have semi-diurnal tide cycles with two high tides and two low tides per day. See +wta tide for +help setting the tide cycle.%r
&VARYING-THE-WEATHER Weather and Time Help - Configuration Considerations=%rThere are three fundamental ways to vary the weather produced by the weather code. They are:%r%r1) Changing the frequency with which various weathertypes are selected at each season. Instructions for how to do this are provided in +wtc weather-modelling.%r%rExperienced recoders may introduce new weathertypes; see +wtc weather-modelling.%r%r2) Changing the descriptions of the weathertypes by writing new desc banks. This is conceptually very simple, though laborious. You rewrite the descriptions in the desc banks to fit the kind of environment you want descriptions for. The descriptions in the Long Weather Description Bank assume a temperate climate; you could write desc banks for areas where the climate was usually warmer or colder. The Tree Weather Description Bank, supplied as an example of environmental variation with auxiliary desc banks, assumes a temperate, relatively wet climate with many leafy trees. It would be possible to write desc banks for conifer forests, grassland, deserts, tundra, cities, shores, the sky, or any sort of environment you like.%r%r+wtc varying2 for more.%r
&VARYING2 Weather and Time Help - Configuration Considerations=%r3) Varying the weather from place to place by using regional weather. Here it is not the quality of the weather that varies, but when it arrives at different regions. Instructions for setting up regional weather can be found in +wtc regional-weather.%r
&WEATHER-MODELLING Weather and Time Help - Configuration Considerations=%rThe Weathermaker saves yesterday's weathertype, and then uses the season and yesterday's weathertype to determine which routine it should use to pick the weather for today. For example, the springtype-clear attribute is used to generate today's weather if it was clear yesterday and the season is spring. The springtype-clear attribute selects today's weather at random from among the following types: (clear clear clear clear clear fair fair fair fair fair fair fair fair fair rain fog stormy overcast). The more often a weathertype is repeated, the more likely it is to be selected. Clear weather is generally a strong high pressure area, and a brisk clear day is more often followed by another, or by a day not so brisk where there are many fair weather clouds, than it is to be followed directly by rain, storm, fog, or overcast skies. The probability of the weathertypes varies from season to season; fog is always more likely in summer, while sleet, snow, and blizzards only appear in winter.%r%r+wtc modelling2 for more.%r
&MODELLING2 Weather and Time Help - Configuration Considerations=%rTo change the probability of a given weathertype being selected, you need to add or reduce the number of times it appears in arguments to randword() in the &<season>type-<weathertype> attrbutes on the Weathermaker. For instance, if you want less fog in summer, reduce the number of times 'fog' appears in the &summertype-<weathertype> attributes. You might, e.g., execute the following:%r%r@edit weathermaker/summertype-* = fog fog fog fog fog,fog fog%r%rRecoder's notes: if you add a weathertype to the code, you will need to account for it in the &<season>type-<weathertype> selectors on the Weathermaker, in the &<season><weathertype> short descriptions on the Weathermaker, in the &<season><day|night|dawn|dusk><weathertype> attributes in the long desc bank, and in appropriate attributes in any auxiliary desc banks you may using, like the Tree Weather Description Bank.%r%r+wtc modelling3 for more.%r
&MODELLING3 Weather and Time Help - Configuration Considerations=%rThere is one non-obvious point, however: the season changes at virtual midnight, while a new weathertype for the day is not selected until virtual dawn. If you add a weathertype that isn't going to appear in all seasons, you will need to add settings and descriptions for it in the next season to cover the hours between midnight and dawn. For example, sleet, lightsnow, and blizzard are only selected by the Weathermaker in winter; there are &springtype-sleet, &springtype-lightsnow, and &springtype-blizzard weather selector attributes on the weathermaker, which may be invoked on the first day of spring if the last day of winter's weather was frozen preciptation; these selectors only include spring weather in the possibilities they choose between, naturally. There are also &springsleet, &springlightsnow, and &springblizzard short descriptions on the weathermaker, and &spring<day|night|dawn|dusk>sleet, &spring<day|night|dawn|dusk>lightsnow, and &spring<day|night|dawn|dusk>blizzard attributes on the Long Description Bank. The content of these descriptions does not describe winter weather, but spring; they correspond to the spring rain, overcast, and stormy descriptions respectively, so as not to contradict the seasonal descriptions in children of the various parent rooms.%r
&NEXT-VERSION Weather and Time Help - Configuration Considerations=%rThere have been major structural changes between 3.0 and 4.0 in order to accommodate the revision of the moon and tides for reasonableness, and the Stormmaker. Keran doesn't currently have any plans for revisions involving such structural changes, but there will probably eventually be an astronomical add-on that handles constellations and planets.%r
@set Weather and Time Help - Configuration Considerations=VISUAL
@set Weather and Time Help - Configuration Considerations=NO_COMMAND
@set Weather and Time Help - Configuration Considerations=SAFE


#531 - Weather and Time Help - General

@lock Weather and Time Help - General=#0
&LIST Weather and Time Help - General=%rGlobal commands and topics:%r[columns([sort(v(global-commands))], 20)]%rGlobal functions:%r[columns(sort(v(global-functions)), 20)]%rOther common time and weather functions:%r%r[columns(sort(v(common-functions)), 20)]%r%r+wt <name> for help.
&VERSION Weather and Time Help - General=4.0
&AUTHOR Weather and Time Help - General=Keran@Keranset Island
&GLOBAL-COMMANDS Weather and Time Help - General=+today +parents weather+time
&COMMON-FUNCTIONS Weather and Time Help - General=clock-face-hour day-night day-night-dawn-dusk hour inside+outside long-weather month moon-phase moon-up moonrise moonset season short-weather slave-weather sunrise sunset tide time-of-day tree-weather weathertype week year
&GLOBAL-FUNCTIONS Weather and Time Help - General=randword tilde2blank blank2tilde
&HELP_+WT Weather and Time Help - General=%r+wt%r%rThis is the main +help for Keran's Weather and Time Code, a configurable MUSH/MUX softcode package for creating virtual or in-character environments. This +help describes features useful to ordinary builders and coders. +wta, +wtc, and +wtx call up +help for administration, configuration, and documentation for recoders.%r
&HELP_RANDWORD Weather and Time Help - General=%rrandword(<word1> <word2> <word3> <etc.>)%r%rRandword() returns a random word from the list. %r
&HELP_TILDE2BLANK Weather and Time Help - General=%rtilde2blank(<string>)%r%rTilde2blank() takes a string as its argument and replaces all the spaces with tildes (~). %r
&HELP_BLANK2TILDE Weather and Time Help - General=%rblank2tilde(<string>)%r%rTilde2blank() takes a string as its argument and replaces all the tildes (~) with spaces. %r
&HELP_TIDE Weather and Time Help - General=%ru(#555/tide)%ru(#555/high-low-tide)%r%rTide returns the state of the tide. Possibilities are low and rising, high and rising, slack high water, high and ebbing, low and ebbing, and slack low water. The default setting for the tide is semi-diurnal, that is, there are two tide cycles per day. But they may also be diurnal. In either case, the tide cycle is synchronized to the moon. High-low-tide returns whether the tide is high is low.%r
&HELP_MOONSET Weather and Time Help - General=%ru(#555/moonset)%r%rThe time of moonset, in seconds.%r
&HELP_MOONRISE Weather and Time Help - General=%ru(#555/moonrise)%r%rThe time of moonrise, in seconds.%r
&HELP_WEATHERTYPE Weather and Time Help - General=%ru(#111/weathertype)%r%rReturns the weathertype generated by the weathermaker for the day. May be clear, fair, overcast, fog, rain, stormy, sleet, lightsnow, or blizzard.%r
&HELP_MOON-UP Weather and Time Help - General=%ru(#555/moon-up)%r%rReturns 1 if the moon is up and 0 if it isn't.%r
&HELP_TREE-WEATHER Weather and Time Help - General=%ru(#533/tree-weather)%r%rReturns a description of the surroundings varying by day, night, dawn, dusk, and weather conditions, in an environment with leafy trees. A new weathertype for the day is generated shortly after dawn.%r
&HELP_SHORT-WEATHER Weather and Time Help - General=%ru(#533/short-weather)%ru(#533/lowercase-short-weather)%r%rReturns a one-line description of the weather which varies with the season and weather conditions. A new weathertype for the day is generated shortly after dawn. Lowercase-short-weather is identical, but the first word is not capitalized; for instance, if you were describing a window view, you might prefix lowercase-short-weather with some phrase like, 'Outside, '.%r
&HELP_LONG-WEATHER Weather and Time Help - General=%ru(#533/long-weather)%ru(#533/lowercase-long-weather)%r%rReturns a description of the weather which varies with season, day, night, dawn, or dusk, and the weather conditions clear, fair, overcast, fog, rain, stormy, sleet, lightsnow, blizzard. A new weathertype for the day is generated shortly after dawn. Lowercase-long-weather is identical, but the first word is not capitalized; for instance, if you were describing a window view, you might prefix lowercase-long-weather with some phrase like, 'Outside, '.%r
&HELP_SUNSET Weather and Time Help - General=%ru(#7/sunset)%r%rReturns the number of seconds after virtual midnight that sunset takes place. If you need the time as secs(), add u(#7/sunset) to u(#7/last-midnight).%r
&HELP_SUNRISE Weather and Time Help - General=%ru(#7/sunrise)%r%rReturns the number of seconds after virtual midnight that sunrise takes place. If you need the time as secs(), add u(#7/sunrise) to u(#7/last-midnight).%r
&HELP_DAY-NIGHT-DAWN-DUSK Weather and Time Help - General=%ru(#7/day-night-dawn-dusk)%r%rReturns day, night, dawn, or dusk.%r
&HELP_DAY-NIGHT Weather and Time Help - General=%ru(#7/day-night)%r%rReturns virtual day or night. %r
&HELP_TIME-OF-DAY Weather and Time Help - General=%ru(#7/time-of-day)%r%rReturns day, night, dawn, dusk, noon, midnight, morning, afternoon, or after midnight. %r
&HELP_HOUR Weather and Time Help - General=%ru(#7/hour)%r%rReturns the last hour struck in virtual time, in 24-hour format. Midnight is 0.%r
&HELP_MOON-PHASE Weather and Time Help - General=%ru(#555/moon-phase)%r%rReturns the phase of the moon, which may be new, waxing crescent, first quarter, waxing gibbous, full, waning gibbous, last quarter, waning crescent. %r
&HELP_SEASON Weather and Time Help - General=%ru(#7/season)%r%rReturns the season. Possibilities are spring, summer, autumn, or winter. %r
&HELP_MONTH Weather and Time Help - General=%ru(#7/month)%r%rReturns the virtual month. %r
&HELP_YEAR Weather and Time Help - General=%ru(#7/year)%r%rReturns the virtual year. %r
&HELP_WEEK Weather and Time Help - General=%ru(#7/week)%r%rReturns the number of the week in the current month; may range from 1-5. Meaningless if the date is taken from the system clock.%r
&HELP_CLOCK-FACE-HOUR Weather and Time Help - General=%ru(#7/clock-face-hour)%r%rReturns the virtual hour in 12-hour time instead of 24-hour time, e.g., hour 21 is 9 on a clock's face. Midnight is 12.%r
@Desc Weather and Time Help - General=This is +wt, the main +help for Keran's Weather and Time Code Package. It should be set visual, safe, and no_command, and it belongs in the Auxiliary room. The items documented on this object are expected to be generally useful to builders and coders.
&HELP_+PARENTS Weather and Time Help - General=%r+parents%r%r+Parents returns a list of parent rooms you can use to build rooms with descriptions that vary according to the time of day, weather, etc. You build your room, @parent it to one of the parent rooms, and look at it to see instructions for how to write descriptions that vary according to environmental conditions. You can simply write descriptions for day, night, winter, summer, etc., and the parent room will switch them at the appropriate times.%r%rThere are two indoor parent rooms, one for rooms with windows and one for rooms without, and several outdoor parent rooms which have style variations in the variable descs returned. The parent rooms are set visual and you can examine <dbref> to see how they work.%r%r+wt +parents2 for more.%r
&HELP_+PARENTS2 Weather and Time Help - General=%rThe outdoor room style variations are:%r%rSeparable Day-Night - This room will return a description consisting of an unchanging desc, a day/night desc, a spring/summer/autumn/winter desc, a weather desc, and a moon desc. You can suppress any elements you don't want, e.g., you can prevent it from showing a moon description.%r%rSeparable Day-Night-Dawn-Dusk - As above, but instead of returning a description that varies only by day and night, it returns different descriptions at day, night, dawn, and dusk.%r%rSeason and Day-Night - Returns a desc for summer-night, a desc for summer-day, a desc for autumn-night, a desc for autumn-day, and so on. Also returns a moon desc and a weather desc.%r%rSeason and Day-Night-Dawn-Dusk - As above, but also returns distinct dawn and dusk descriptions, e.g, winter-dawn, winter-dusk, etc.%r%rWeather and Day-Night - Returns descriptions that combine day-night and weather variations, e.g., fair-night, fair-day, overcast-day, etc. Also returns a moon desc%r
&HELP_+TODAY Weather and Time Help - General=%r+today%r%r+Today returns information about the time of day, month, season, year, tides, weather, etc.%r
&HELP_DATE+TIME Weather and Time Help - General=%ru(#7/year)%ru(#7/season)%ru(#7/month)%ru(#7/week)%ru(#7/hour)%ru(#7/clock-face-hour)%r%rA collection of functions returning the virtual or in-character date and time. Season is spring, summer, autumn, or winter. Month may return either the Gregorian month or the months of a non-Gregorian calendar, depending on which has been configured. Week returns which week it is in the month, which may be 1-5. Hour returns the hour in 24 hour format; midnight is hour 0. Clock-face-hour returns the hour in 12-hour format; midnight and noon are both 12.%r
&HELP_INSIDE+OUTSIDE Weather and Time Help - General=%ru(#533/is-outside)%ru(#533/is-inside)%ru(#533/has-outside-view)%ru(#533/is-inside-with-window)%ru(#533/is-inside-without-window)%r%rIf your room has been @parented to one of the parent rooms that's part of this package, and the parent room hierarchy has been installed, then this function will return 1 if the given condition is true and 0 if it's not. This can be useful for determining whether something can be sensed in a given room, e.g., lightning should only be seen in rooms that are outside or have windows, but thunder may be heard anywhere. These functions won't work on Penn installations with safer_ufun set.%r
&HELP_SLAVE-WEATHER Weather and Time Help - General=%ru(#114/slave-weathertype)%ru(#533/slave-short-weather)%ru(#533/slave-long-weather)%ru(#533/slave-tree-weather)%r%rIf regional weather has been configured, there may be more than one weather region. This code comes with one slave weather station which produces a weathertype for the day sometimes differing from that of the master Weathermaker. The slave weather functions work precisely like long-weather, short-weather, and tree-weather, which see, but are selected according to the Slave Weather Station's weathertype.%r%rIt is possible to have multiple slave stations and there may be more than one set of slave weather functions; these must be locally defined and documented.%r
&HELP_CLOCK-COMMANDS Weather and Time Help - General=%r+clock add <dbref> <triggerlist>%r+clock del <dbref> <triggerlist>%r%rIf these commands are enabled, they you to add or delete items from the Clock's triggerlists, so that the Clock can trigger commands on them at appropriate times. <dbref> is the number of the item to be added to the Clock's triggerlists, and <triggerlist> is which triggerlist to use. The triggerlist must be time-of-day, sun, moon, tide, hour, every-hour, every-half-hour, or every-quarterhour. An item to be triggered must have an attribute &trigger-at-<time> = <action to be triggered>, where <time> is dawn, sunrise, morning, noon, afternoon, dusk, sunset, night, midnight, after~midnight, moonrise, moonset, meridian~transit, every~hour, every~halfhour, every~quarterhour, 0 through 23, high~and~rising, high~and~slack, high~and~ebbing, low~and~ebbing, low~and~slack, low~and~rising. Use &trigger-at-0 and &trigger-at-12 for triggering at precisely midnight and noon; the times of day called noon and midnight are time stretches.%r
&HELP_WEATHER+TIME Weather and Time Help - General=%rKeran's Weather and Time Code is a configurable MUSH/MUX softcode package for maintaining virtual or in-character environments. It has +help divided into three sections:%r%r+wt - +help for common commands, functions and topics generally useful to builders and coders.%r%r+wta - Admin commands.%r%r+wtc - Configuration considerations. Extensive and sometimes complex, since there are many non-vanilla ways to set up this code, depending on the environment you're trying to model.%r
@set Weather and Time Help - General=VISUAL
@set Weather and Time Help - General=NO_COMMAND
@set Weather and Time Help - General=SAFE


#533 - Miscellaneous Functions

&RANDWORD Miscellaneous Functions=[extract(%0, add(1, rand(words(%0))), 1)]
&TILDE2BLANK Miscellaneous Functions=[edit(v(0),~,%b)]
&BLANK2TILDE Miscellaneous Functions=[edit(v(0),%b,~)]
&LONG-WEATHER Miscellaneous Functions=[u(#26/[u(#7/season)][u(#7/day-night-dawn-dusk)][u(#111/weathertype)])]
&SHORT-WEATHER Miscellaneous Functions=[u(#111/[u(#7/season)][u(#111/weathertype)])]
&TREE-WEATHER Miscellaneous Functions=[u(#25/trees_[u(#7/season)]_[u(#7/day-night)]_[u(#111/weathertype)])]
&SLAVE-LONG-WEATHER Miscellaneous Functions=[u(#26/[u(#7/season)][u(#7/day-night-dawn-dusk)][u(#114/slave-weathertype)])]
&SLAVE-SHORT-WEATHER Miscellaneous Functions=[u(#111/[u(#7/season)][u(#114/slave-weathertype)])]
&SLAVE-TREE-WEATHER Miscellaneous Functions=[u(#25/trees_[u(#7/season)]_[u(#7/day-night)]_[u(#114/slave-weathertype)])]
&LOWERCASE-LONG-WEATHER Miscellaneous Functions=[lcstr(first(u(long-weather)))] [rest(u(long-weather))]
&LOWERCASE-SHORT-WEATHER Miscellaneous Functions=[lcstr(first(u(short-weather)))] [rest(u(short-weather))]
&ITER-R Miscellaneous Functions=[tilde2blank(edit([iter(%0, blank2tilde(name(##)))], %b, %r))]
&IS-OUTSIDE Miscellaneous Functions=[not(comp(parent(parent(locate(%#, %0, *))), #515))]
&IS-INSIDE-WITH-WINDOW Miscellaneous Functions=[not(comp(parent(parent(locate(%#, %0, *))), #510))]
&IS-INSIDE-WITHOUT-WINDOW Miscellaneous Functions=[not(comp(parent(parent(locate(%#, %0, *))), #512))]
&HAS-OUTSIDE-VIEW Miscellaneous Functions=[or(u(is-outside, %0), u(is-inside-with-window, %0))]
&IS-INSIDE Miscellaneous Functions=[or(u(is-inside-without-window, locate(%#, %0, *)), u(is-inside-with-window, locate(%#, %0, *)))]
@Desc Miscellaneous Functions=This object has several important functions on it, including three that should be installed as globals. (randword, blank2tilde, tilde2blank). It belongs in the Auxiliary room and has no commands on it. It should be set visual.
@set Miscellaneous Functions=VISUAL
@set Miscellaneous Functions=NO_COMMAND
@set Miscellaneous Functions=SAFE
@power Miscellaneous Functions=see_all
&HAS-SOFTFLAG Miscellaneous Functions=[hasattr(%0,%1)]


#550 - Storm Maker

&EVERYWHERE Storm Maker=$everywhere *: @dolist iter(iter(children(#508), children(##)), children(##)) = @pemit/contents ## = [capstr(%0)]
&WINDOW Storm Maker=$window *: @dolist setunion(iter(children(#515), children(##)), iter(children(#510), children(##))) = @pemit/contents ## = [ifelse(hasattr(##, window-prefix), [u(##/window-prefix)] [lcstr(%0)], [capstr(%0)])]
&OUTSIDE Storm Maker=$outside *: @dolist iter(children(#515), children(##)) = @pemit/contents ## = [capstr(%0)]
&ISADMIN Storm Maker=[orflags(%#, WZ)]
@lock Storm Maker=ISADMIN/1
@lock/UseLock Storm Maker=ISADMIN/1
&CHANGE-MASTER-WEATHER Storm Maker=$weather *: &weathertype #111=%0; &weathertype-master #114=%0
&CHANGE-SLAVE-WEATHER Storm Maker=$slave *: &weathertype #114=%0
&INSIDE Storm Maker=$inside *: @dolist setunion(iter(children(#512), children(##)), iter(children(#510), children(##))) = @pemit/contents ## = [capstr(%0)]
&ZONE Storm Maker=$zone *=*: @dolist inzone(%0) = @pemit/contents ## = [capstr(%1)]
&SEARCH-ATTRIBUTE Storm Maker=$search *=*: @dolist search(eroom=\[hasattr(##, %0)\]) = @pemit/contents ## = [capstr(%1)]
@Desc Storm Maker=This item can be used to trigger local storm effects. It should be set wizard and safe, and should be kept in the Auxiliary room when not in use.
@set Storm Maker=VISUAL
@set Storm Maker=INHERIT
@set Storm Maker=SAFE


#555 - Moon and Tide Functions

@lock Moon and Tide Functions=#0
&TIDE Moon and Tide Functions=[u(semi-tide)]
&SEMI-TIDE Moon and Tide Functions=[ifelse(u(semi-low-and-rising), low and rising,)][ifelse(u(semi-high-and-rising), high and rising,)][ifelse(u(semi-slack-high-water), high and slack,)][ifelse(u(semi-high-and-ebbing), high and ebbing,)][ifelse(u(semi-low-and-ebbing), low and ebbing,)][ifelse(u(semi-slack-low-water), low and slack,)]
&SEMI-SLACK-HIGH-WATER Moon and Tide Functions=[or([and(gte(secs(), u(#555/semi-slack-high-water-begins-1)), lt(secs(), u(#555/semi-slack-high-water-ends-1)))], [and(gte(secs(), u(#555/semi-slack-high-water-begins-2g)), lt(secs(), u(#555/semi-slack-high-water-ends-2)))])]
&SEMI-HIGH-AND-EBBING Moon and Tide Functions=[or([and(gte(secs(), u(#555/semi-slack-high-water-ends-1)), lt(secs(), u(#555/semi-mid-ebb-1)))], [and(gte(secs(), u(#555/semi-slack-high-water-ends-2)), lt(secs(), u(#555/semi-mid-ebb-2)))])]
&SEMI-LOW-AND-EBBING Moon and Tide Functions=[or([and(gte(secs(), u(#555/semi-mid-ebb-1)), lt(secs(), u(#555/semi-slack-low-water-begins-1)))], [and(gte(secs(), u(#555/semi-mid-ebb-2)), lt(secs(), u(#555/semi-slack-low-water-begins-2)))])]
&SEMI-SLACK-LOW-WATER Moon and Tide Functions=[or([and(gte(secs(), u(#555/semi-slack-low-water-begins-1)), lt(secs(), u(#555/semi-slack-low-water-ends-1)))], [and(gte(secs(), u(#555/semi-slack-low-water-begins-2)), lt(secs(), u(#555/semi-slack-low-water-ends-2)))])]
&SEMI-LOW-AND-RISING Moon and Tide Functions=[or([and(gte(secs(), u(#555/semi-slack-low-water-ends-1)), lt(secs(), u(#555/semi-mid-flood-1)))], [and(gte(secs(), u(#555/semi-slack-low-water-ends-2)), lt(secs(), u(#555/semi-mid-flood-2)))])]
&SEMI-HIGH-AND-RISING Moon and Tide Functions=[or([and(gte(secs(), u(#555/semi-mid-flood-1)), lt(secs(), u(#555/semi-slack-high-water-begins-2l)))], [and(gte(secs(), u(#555/semi-mid-flood-2)), lt(secs(), u(#555/semi-next-cycle-begins)))])]
&SEMI-SLACK-HIGH-WATER-BEGINS-1 Moon and Tide Functions=[u(meridian-transit)]
&SEMI-EBB-BEGINS-1 Moon and Tide Functions=[add(u(meridian-transit), u(#7/secs-per-halfhour))]
&SEMI-SLACK-HIGH-WATER-ENDS-1 Moon and Tide Functions=[add(u(meridian-transit), u(#7/secs-per-hour))]
&SEMI-MID-EBB-1 Moon and Tide Functions=[add(u(meridian-transit), u(#7/secs-per-halfhour), div(u(secs-per-moonday), 8))]
&SEMI-SLACK-LOW-WATER-BEGINS-1 Moon and Tide Functions=[add(u(meridian-transit), div(u(secs-per-moonday), 4))]
&SEMI-FLOOD-BEGINS-1 Moon and Tide Functions=[add(u(meridian-transit), u(#7/secs-per-halfhour), div(u(secs-per-moonday), 4))]
&SEMI-SLACK-LOW-WATER-ENDS-1 Moon and Tide Functions=[add(u(meridian-transit), u(#7/secs-per-hour), div(u(secs-per-moonday), 4))]
&SEMI-MID-FLOOD-1 Moon and Tide Functions=[add(u(meridian-transit), u(#7/secs-per-halfhour), mul(div(u(secs-per-moonday), 8), 3))]
&SEMI-SLACK-HIGH-WATER-BEGINS-2L Moon and Tide Functions=[add(u(meridian-transit), div(u(secs-per-moonday), 2))]
&SEMI-SLACK-HIGH-WATER-BEGINS-2G Moon and Tide Functions=[add(u(last-meridian-transit), div(u(secs-per-moonday), 2))]
&SEMI-EBB-BEGINS-2 Moon and Tide Functions=[add(u(last-meridian-transit), u(#7/secs-per-halfhour), div(u(secs-per-moonday), 2))]
&SEMI-SLACK-HIGH-WATER-ENDS-2 Moon and Tide Functions=[add(u(last-meridian-transit), u(#7/secs-per-hour), div(u(secs-per-moonday), 2))]
&SEMI-MID-EBB-2 Moon and Tide Functions=[add(u(last-meridian-transit), u(#7/secs-per-halfhour), mul(div(u(secs-per-moonday), 8), 5))]
&SEMI-SLACK-LOW-WATER-BEGINS-2 Moon and Tide Functions=[add(u(last-meridian-transit), mul(div(u(secs-per-moonday), 4), 3))]
&SEMI-FLOOD-BEGINS-2 Moon and Tide Functions=[add(u(last-meridian-transit), u(#7/secs-per-halfhour), mul(div(u(secs-per-moonday), 4), 3))]
&SEMI-SLACK-LOW-WATER-ENDS-2 Moon and Tide Functions=[add(u(last-meridian-transit), u(#7/secs-per-hour), mul(div(u(secs-per-moonday), 4), 3))]
&SEMI-MID-FLOOD-2 Moon and Tide Functions=[add(u(last-meridian-transit), u(#7/secs-per-halfhour), mul(div(u(secs-per-moonday), 8), 7))]
&SEMI-NEXT-CYCLE-BEGINS Moon and Tide Functions=[add(u(last-meridian-transit), u(secs-per-moonday))]
&DI-TIDE Moon and Tide Functions=[ifelse(u(di-low-and-rising), low and rising,)][ifelse(u(di-high-and-rising), high and rising,)][ifelse(u(di-slack-high-water), high and slack,)][ifelse(u(di-high-and-ebbing), high and ebbing,)][ifelse(u(di-low-and-ebbing), low and ebbing,)][ifelse(u(di-slack-low-water), low and slack,)]
&DI-SLACK-HIGH-WATER Moon and Tide Functions=[and(gte(secs(), u(#555/di-slack-high-water-begins)), lt(secs(), u(#555/di-slack-high-water-ends)))]
&DI-LOW-AND-EBBING Moon and Tide Functions=[and(gte(secs(), u(#555/di-mid-ebb)), lt(secs(), u(#555/di-slack-low-water-begins-l)))]
&DI-HIGH-AND-EBBING Moon and Tide Functions=[and(gte(secs(), u(#555/di-slack-high-water-ends)), lt(secs(), u(#555/di-mid-ebb)))]
&DI-SLACK-LOW-WATER Moon and Tide Functions=[and(gte(secs(), u(#555/di-slack-low-water-begins-g)), lt(secs(), u(#555/di-slack-low-water-ends)))]
&DI-LOW-AND-RISING Moon and Tide Functions=[and(gte(secs(), u(#555/di-slack-low-water-ends)), lt(secs(), u(#555/di-mid-flood)))]
&DI-HIGH-AND-RISING Moon and Tide Functions=[and(gte(secs(), u(#555/di-mid-flood)), lt(secs(), u(#555/di-next-cycle-begins)))]
&DI-SLACK-HIGH-WATER-BEGINS Moon and Tide Functions=[u(meridian-transit)]
&DI-EBB-BEGINS Moon and Tide Functions=[add(u(meridian-transit), u(#7/secs-per-hour))]
&DI-SLACK-HIGH-WATER-ENDS Moon and Tide Functions=[add(u(meridian-transit), mul(u(#7/secs-per-hour), 2))]
&DI-MID-EBB Moon and Tide Functions=[add(u(meridian-transit), u(#7/secs-per-hour), div(u(secs-per-moonday), 4))]
&DI-SLACK-LOW-WATER-BEGINS-L Moon and Tide Functions=[add(u(meridian-transit), div(u(secs-per-moonday), 2))]
&DI-SLACK-LOW-WATER-BEGINS-G Moon and Tide Functions=[add(u(last-meridian-transit), div(u(secs-per-moonday), 2))]
&DI-FLOOD-BEGINS Moon and Tide Functions=[add(u(last-meridian-transit), u(#7/secs-per-hour), div(u(secs-per-moonday), 2))]
&DI-SLACK-LOW-WATER-ENDS Moon and Tide Functions=[add(u(last-meridian-transit), mul(u(#7/secs-per-hour),2), div(u(secs-per-moonday), 2))]
&DI-MID-FLOOD Moon and Tide Functions=[add(u(last-meridian-transit), u(#7/secs-per-hour), mul(div(u(secs-per-moonday), 4), 3))]
&DI-NEXT-CYCLE-BEGINS Moon and Tide Functions=[add(u(last-meridian-transit), u(secs-per-moonday))]
&MOON-PHASE Moon and Tide Functions=[ifelse(u(transit-of-new), new,)][ifelse(u(transit-of-waxing-crescent), waxing crescent,)][ifelse(u(transit-of-first-quarter), first quarter,)][ifelse(u(transit-of-waxing-gibbous), waxing gibbous,)][ifelse(u(transit-of-full), full,)][ifelse(u(transit-of-waning-gibbous), waning gibbous,)][ifelse(u(transit-of-last-quarter), last quarter,)][ifelse(u(transit-of-waning-crescent), waning crescent,)]
&TRANSIT-OF-FULL Moon and Tide Functions=[or([lte(u(meridian-transit), add(u(midnight-before-meridian-transit), div(5400, u(#7/clock-compression))))], [gt(u(meridian-transit), add(u(midnight-before-meridian-transit), div(81000, u(#7/clock-compression))))])]
&TRANSIT-OF-WANING-GIBBOUS Moon and Tide Functions=[and([gt(u(meridian-transit), add(u(midnight-before-meridian-transit), div(5400, u(#7/clock-compression))))], [lte(u(meridian-transit), add(u(midnight-before-meridian-transit), div(16200, u(#7/clock-compression))))])]
&TRANSIT-OF-LAST-QUARTER Moon and Tide Functions=[and([gt(u(meridian-transit), add(u(midnight-before-meridian-transit), div(16200, u(#7/clock-compression))))], [lte(u(meridian-transit), add(u(midnight-before-meridian-transit), div(27000, u(#7/clock-compression))))])]
&TRANSIT-OF-WANING-CRESCENT Moon and Tide Functions=[and([gt(u(meridian-transit), add(u(midnight-before-meridian-transit), div(27000, u(#7/clock-compression))))], [lte(u(meridian-transit), add(u(midnight-before-meridian-transit), div(37800, u(#7/clock-compression))))])]
&TRANSIT-OF-NEW Moon and Tide Functions=[and([gt(u(meridian-transit), add(u(midnight-before-meridian-transit), div(37800, u(#7/clock-compression))))], [lte(u(meridian-transit), add(u(midnight-before-meridian-transit), div(48600, u(#7/clock-compression))))])]
&TRANSIT-OF-WAXING-CRESCENT Moon and Tide Functions=[and([gt(u(meridian-transit), add(u(midnight-before-meridian-transit), div(48600, u(#7/clock-compression))))], [lte(u(meridian-transit), add(u(midnight-before-meridian-transit), div(59400, u(#7/clock-compression))))])]
&TRANSIT-OF-FIRST-QUARTER Moon and Tide Functions=[and([gt(u(meridian-transit), add(u(midnight-before-meridian-transit), div(59400, u(#7/clock-compression))))], [lte(u(meridian-transit), add(u(midnight-before-meridian-transit), div(70200, u(#7/clock-compression))))])]
&TRANSIT-OF-WAXING-GIBBOUS Moon and Tide Functions=[and([gt(u(meridian-transit), add(u(midnight-before-meridian-transit), div(70200, u(#7/clock-compression))))], [lte(u(meridian-transit), add(u(midnight-before-meridian-transit), div(81000, u(#7/clock-compression))))])]
&MOONDAY-BEGINS Moon and Tide Functions=[add(mul(u(moonday-from-0), u(secs-per-moonday)), u(#7/time-begins))]
&MERIDIAN-TRANSIT Moon and Tide Functions=[add(u(moonday-begins), div(u(secs-per-moonday), 2))]
&LAST-MERIDIAN-TRANSIT Moon and Tide Functions=[sub(u(meridian-transit), u(secs-per-moonday))]
&MIDNIGHT-BEFORE-MERIDIAN-TRANSIT Moon and Tide Functions=[switch(gt(sub(u(#555/meridian-transit), u(#7/last-midnight)), u(#7/secs-per-day)), 1, u(#7/next-midnight), [switch(lt(sub(u(#555/meridian-transit), u(#7/last-midnight)), 0), 1, u(#7/midnight-before-last), u(#7/last-midnight))])]
&NOON-BEFORE-MERIDIAN-TRANSIT Moon and Tide Functions=[switch(gt(sub(u(#555/meridian-transit), u(#7/last-noon)), u(#7/secs-per-day)), 1, u(#7/next-noon), [switch(lt(sub(u(#555/meridian-transit), u(#7/last-noon)), 0), 1, u(#7/noon-before-last), u(#7/last-noon))])]
&SECS-PER-MOONDAY Moon and Tide Functions=[round(mul(u(#555/moonday-in-hours), u(#7/secs-per-hour)), 0)]
&MOONDAY-FROM-0 Moon and Tide Functions=[div(sub(secs(), u(#7/time-begins)), u(secs-per-moonday))]
&MOONRISE Moon and Tide Functions=[sub(u(meridian-transit), div(u(moon-up-length), 2))]
&MOONSET Moon and Tide Functions=[add(u(meridian-transit), div(u(moon-up-length), 2))]
&MOON-UP Moon and Tide Functions=[switch([gt(secs(), u(moonrise))], 0, 0, 1, {[switch([lt(secs(), u(moonset))], 0, 0, 1, 1)]})]
&MOON-UP-LENGTH Moon and Tide Functions=[round(add(mul([sin(mul(mul(pi(), 2), add(u(sun-cycle-by-moonday), u(moon-cycle))))], u(#7/day-length-variation)), u(#7/secs-per-halfday)), 0)]
&MOON-CYCLE Moon and Tide Functions=[fdiv(sub(u(#555/meridian-transit), u(#555/noon-before-meridian-transit)), u(#7/secs-per-day))]
&SUN-CYCLE-BY-MOONDAY Moon and Tide Functions=[fdiv(u(moonday-of-year), u(moondays-per-year))]
&MOONDAY-OF-YEAR Moon and Tide Functions=[sub(u(#555/moonday-from-0), div(mul(u(#7/days-per-year), u(#7/native-year), u(#7/secs-per-day)), u(#555/secs-per-moonday)))]
&MOONDAYS-PER-YEAR Moon and Tide Functions=[fdiv(u(#7/secs-per-year), u(#555/secs-per-moonday))]
&DAY-OF-LUNAR-MONTH Moon and Tide Functions=[inc(mod(u(moonday-from-0), 30))]
&MOONDAY-IN-HOURS Moon and Tide Functions=[add(24, mul(u(moon-daylength-difference), u(#7/calendar-compression)))]
&MOON-ADJECTIVE Moon and Tide Functions=[switch(u(me/moon-phase), new, black, waxing crescent, faint, first quarter, dim, waxing gibbous, bright, full, brilliant, waning gibbous, bright, last quarter, dim, waning crescent, faint)]
@Desc Moon and Tide Functions=This object contains the functions that determine the moon and tides. It belongs in the Auxiliary room and has no commands on it. It should be set visual.
&HIGH-LOW-TIDE Moon and Tide Functions=[elements(u(#555/tide), 1)]
&MOON-DAYLENGTH-DIFFERENCE Moon and Tide Functions=.8
@set Moon and Tide Functions=VISUAL
@set Moon and Tide Functions=NO_COMMAND
@set Moon and Tide Functions=SAFE



#404 - Parent of Windowed Indoor Rooms

@tel #404
&LIGHT here=$light: @set me=light; @pemit/contents me=[u(light-action, %#)]
&LIGHTS-OUT here=$lights out: @set me=!light; @pemit/contents me=[u(lights-out-action, %#)]
&NORMAL-VISION here=[ifelse(hasflag(me, light), [u(artificial-light-desc)], {[switch([u(#7/day-night)], day, [u(day-desc)], {[ifelse([u(portable-light)], [u(portable-light-desc)], [u(night-desc)])]})]})]
&NIGHT-VISION here=[ifelse(hasflag(me, light), [u(artificial-light-desc)], {[switch([u(#7/day-night)], day, [u(day-desc)], {[ifelse([u(portable-light)], [u(portable-light-desc)], [u(night-vision-desc)])]})]})]
&DAYBLIND-VISION here=[ifelse(hasflag(me, light), [u(dayblind-desc)], {[switch([u(#7/day-night)], day, [u(dayblind-desc)], {[ifelse([u(portable-light)], [u(portable-light-desc)], [u(dark-vision-desc)])]})]})]
&WINDOW-PREFIX here=Outside,
&OUTSIDE-DESC here=%r%r[u(window-prefix)] [u(#533/lowercase-short-weather)]
&DAY-DESC here=This is what the room looks like by natural daylight to creatures that aren't blinded by bright light.
&DAYBLIND-DESC here=This is what the room looks like when lit to any creature blinded by bright light.
&ARTIFICIAL-LIGHT-DESC here=This is what the room looks like by electric light, firelight, etc.
&NIGHT-DESC here=This is what the room looks like to ordinary humans at night.
&NIGHT-VISION-DESC here=This is what the room looks like at night to creatures that can see in the dark.
&LIGHT-ACTION here=[name(%0)] lights the oil lamps.
&LIGHTS-OUT-ACTION here=[name(%0)] quenches the oil lamps.
&INSTRUCTIONS here=%r%rHow to describe variable lighting conditions in an indoor room with windows:%r&artificial-light-desc here=What the room looks like by firelight, electric light, etc., at any time of day. Overrides portable light and daylight.%r&portable-light-desc here=What the room looks like at night if it's lit by candle, flashlight, etc. This desc appears at night if the lights are out and there is something in the room set light, or carrying something set light.%r&day-desc here=What the room looks like by natural daylight. Overrides portable light.%r&night-desc here=What the room looks like at night with no artificial light sources.%r&dayblind-desc here=What the room looks like by natural or artificial light to creatures blinded by bright light.%r&night-vision-desc here=What the room looks like at night without artificial light to creatures that can see at night. %r&dark-vision-desc here=What the room looks like at night to creatures that can see in complete darkness. May be set to \[u(night-vision)\] if you're not trying to describe infravision or some such thing.%rThe vision type of a creature is determined by whether it has a dayblind, night-vision, or dark-vision attribute; no such attribute means normal human vision. Only one such attribute should be set on any creature.%r&window-prefix here=Some phrase that lets the viewer know that they're looking through a window, door, etc., at something outside. For example: 'Through the window, you can see that '. Used by the Storm Generator.%r&outside-desc here=A description of what the viewer sees when they look out, for example: Outside, \[u(#533/lowercase-short-weather)\]. Or Outside, \[u(#533/lowercase-long-weather)\].%r&light-action here=\[name(%%0)\] flips the light switch, lights the oil lamps, kindles a fire, or whatever.%r&lights-out-action here=\[name(%%0)\] turns off the lights, snuffs the oil lamps, douses the fire, and so on.%r@set here=!no_command%r'Light' turns the lights on; 'lights out' turns them off.%r&instructions here=\\ to turn these instructions off.%r&<name>-desc=\\ will turn any of the descriptions off.%rChildren of the Windowed Indoor Parent Room receive both visual and audible effects from the Storm Generator.
&DAY-NIGHT here=day
&DARK-VISION here=[ifelse(hasflag(me, light), [u(artificial-light-desc)], {[switch([u(#7/day-night)], day, [u(day-desc)], {[ifelse([u(portable-light)], [u(portable-light-desc)], [u(dark-vision-desc)])]})]})]
&DARK-VISION-DESC here=What the room looks like at night to creatures that can see in complete darkness.
&CARRIED-LIGHT-DESC here=What the room looks like when it's lit with a flashlight, candle, etc.
&PORTABLE-LIGHT here=[or([gt([iter(lcon(me), switch(hasflag(##, light), 1, setr(0, add(r(0), 1))))], 0)], [gt(iter([iter(lcon(me), lcon(##))], switch(hasflag(##, light), 1, setr(0, add(r(0), 1)))), 0)])]
&PORTABLE-LIGHT-DESC here=What the room looks like when lit by candle, flashlight, torch, etc.
&VERSION here=4.0
&AUTHOR here=Keran@Keranset Island
@set here=FLOATING
@set here=VISUAL
@set here=PARENT_OK
@set here=SAFE
@parent here=#510
@Desc here=[ifelse(u(#533/has-softflag,%#,dayblind), u(dayblind-vision), {[ifelse(u(#533/has-softflag,%#,night-vision), u(night-vision), {[ifelse(u(#533/has-softflag,%#,dark-vision), u(dark-vision), u(normal-vision))]})]})][u(outside-desc)][u(instructions)]



#436 - Parent of Windowless Indoor Rooms

@tel #436
&LIGHT here=$light: @set me=light; @pemit/contents me=[u(light-action, %#)]
&LIGHTS-OUT here=$lights out: @set me=!light; @pemit/contents me=[u(lights-out-action, %#)]
&LIGHT-ACTION here=[name(%0)] lights the oil lamps.
&LIGHTS-OUT-ACTION here=[name(%0)] quenches the oil lamps.
&NORMAL-VISION here=[ifelse(hasflag(me, light), [u(artificial-light-desc)], {[ifelse([u(portable-light)], [u(portable-light-desc)], [u(dark-desc)])]})]
&NIGHT-VISION here=[ifelse(hasflag(me, light), [u(artificial-light-desc)], {[ifelse([u(portable-light)], [u(portable-light-desc)], [u(dark-desc)])]})]
&DAYBLIND-VISION here=[ifelse(hasflag(me, light), [u(dayblind-desc)], {[ifelse([u(portable-light)], [u(portable-light-desc)], [u(dark-vision-desc)])]})]
&DARK-VISION here=[ifelse(hasflag(me, light), [u(artificial-light-desc)], {[ifelse([u(portable-light)], [u(portable-light-desc)], [u(dark-vision-desc)])]})]
&DAYBLIND-DESC here=What the room looks like to a creature blinded by bright light when it's lit.
&ARTIFICIAL-LIGHT-DESC here=What the room looks like when it's lit.
&DARK-DESC here=What the room looks like to a creature that can't see in complete blackness when it isn't lit.
&INSTRUCTIONS here=%r%rHow to describe variable lighting conditions in an indoor room without windows:%r&artificial-light-desc here=What the room looks like by firelight, electric light, etc., at any time of day. Overrides portable light.%r&portable-light-desc here=What the room looks like at night if it's lit by candle, flashlight, etc. This desc appears if the lights are out and there is something in the room set light, or carrying something set light.%r&dark-desc here=What the room looks like when unlit to creatures that can't see in complete darkness.%r&dayblind-desc here=What the room looks like by natural or artificial light to creatures blinded by bright light.%r&dark-vision-desc here=What the room looks like at night to creatures that can see in complete darkness.%rThe vision type of a creature is determined by whether it has a dayblind, night-vision, or dark-vision attribute; no such attribute means normal human vision. Only one such attribute should be set on any creature.%r&light-action here=\[name(%%0)\] flips the light switch, lights the oil lamps, kindles a fire, or whatever.%r&lights-out-action here=\[name(%%0)\] turns off the lights, snuffs the oil lamps, douses the fire, and so on.%r@set here=!no_command%r'Light' turns the lights on; 'lights out' turns them off.%r&instructions here=\\ to turn these instructions off.%r&<name>-desc=\\ will turn any of the descriptions off.%rChildren of the Windowless Indoor Parent Room hear audible effects produced by the Storm Generator, but no visuals.%r
&DARK-VISION-DESC here=What the room looks like to creatures that can see in complete darkness when it's not lit.
&PORTABLE-LIGHT here=[or([gt([iter(lcon(me), switch(hasflag(##, light), 1, setr(0, add(r(0), 1))))], 0)], [gt(iter([iter(lcon(me), lcon(##))], switch(hasflag(##, light), 1, setr(0, add(r(0), 1)))), 0)])]
&PORTABLE-LIGHT-DESC here=What the room looks like when lit by candle, flashlight, torch, etc.
&VERSION here=4.0
&AUTHOR here=Keran@Keranset Island
@set here=DARK
@set here=FLOATING
@set here=VISUAL
@set here=PARENT_OK
@set here=SAFE
@parent here=#512
@Desc here=[ifelse(u(#533/has-softflag,%#,dayblind), u(dayblind-vision), {[ifelse(u(#533/has-softflag,%#,night-vision), u(night-vision), {[ifelse(u(#533/has-softflag,%#,dark-vision), u(dark-vision), u(normal-vision))]})]})][u(instructions)]



#133 - Parent of Separable Day-Night and Season Desc Outdoor Rooms

@tel #133
@Desc here=[squish([u(unchanging-desc)] [u([u(#7/day-night)]-desc)] [u([u(#7/season)]-desc)])][u(separator)][squish([u(weather-desc)] [switch(u(#7/day-night), night, {[switch(u(#555/moon-phase), new,, {[switch(u(#555/moon-up), 1, {[switch(u(#111/weathertype), clear, u(moon-desc), fair, u(moon-desc))]})]})]})])]%r[u(instructions)]
&NIGHT-DESC here=This is what the place is like by night.
&SPRING-DESC here=This is what the place is like in spring.
&SUMMER-DESC here=This is what the place is like in summer.
&WINTER-DESC here=This is what the place is like in winter.
&WEATHER-DESC here=[u(#533/short-weather)]
&UNCHANGING-DESC here=This part of the desc never changes.
&AUTUMN-DESC here=This is what the place is like in autumn.
&MOON-DESC here=This is the desc of the [u(#555/moon-phase)] moon.
&INSTRUCTIONS here=%rHow to describe an outdoor room with seasonal and weather variations: %r&unchanging-desc here=This part of the description of the place never changes.%r&night-desc here=What the place is like at night.%r&day-desc here=What the place is like by day.%r&spring-desc here=What the place is like during spring.%r&summer-desc here=What the place is like during summer.%r&autumn-desc here=What the place is like during autumn.%r&winter-desc here=What the place is like during winter.%rDon't put things that are only true in specific weather conditions in the descriptions listed above; it'll look funny if you describe a blue sky and the weathermaker comes up with rain.%r&weather-desc here=\[u(#533/short-weather)\] or \[u(#533/long-weather)\]. You can also add \[u(#533/tree-weather)\] or any other environmental weather descriptions that have been written. To use the environmental effects, do something like &weather-desc here=\[u(#533/short-weather)\] \[u(#533/tree-weather)\]%r&moon-desc here=Describe the \[u(#555/moon-phase)\] moon as it shines on the scenery at night.%r&instructions here=\\%rThis last will turn off these instructions. You can suppress any other part of the description the same way, e.g.: &moon-desc here=\\%r&hear-weather-emits here=0 turns the sunrise, sunset, etc. messages from the emits bank off; setting it to 1 turns them on.%r&hear-tide-emits here = 1 turns the tide emits on; setting it to 0 turns them off.
&DAY-DESC here=This is what the place is like by day.
&SEPARATOR here=%r%r
&VERSION here=4.0
&AUTHOR here=Keran@Keranset Island
&HEAR-WEATHER-EMITS here=1
@set here=FLOATING
@set here=VISUAL
@set here=PARENT_OK
@set here=NO_COMMAND
@set here=SAFE
@parent here=#515



#400 - Parent of Season-and-Day-Night Varying Outdoor Rooms

@tel #400
@Desc here=[squish([u([u(#7/season)]-[u(#7/day-night)]-desc)])][u(separator)][squish([u(weather-desc)] [switch(u(#7/day-night), night, {[switch(u(#555/moon-phase), new,, {[switch(u(#555/moon-up), 1, {[switch(u(#111/weathertype), clear, u(moon-desc), fair, u(moon-desc))]})]})]})])]%r[u(instructions)]
&UNCHANGING-DESC here=\
&SPRING-NIGHT-DESC here=This is what the place is like on a spring night.
&SUMMER-NIGHT-DESC here=This is what the place is like on a summer night.
&AUTUMN-NIGHT-DESC here=This is what the place is like on an autumn night.
&WINTER-NIGHT-DESC here=This is what the place is like on a winter night.
&SPRING-DAY-DESC here=This is what the place is like on a spring day.
&SUMMER-DAY-DESC here=This is what the place is like on a summer day.
&AUTUMN-DAY-DESC here=This is what the place is like on an autumn day.
&WINTER-DAY-DESC here=This is what the place is like on a winter day.
&WEATHER-DESC here=[u(#533/short-weather)]
&MOON-DESC here=This is the desc of the [u(#555/moon-phase)] moon.
&SEPARATOR here=%r%r
&INSTRUCTIONS here=%rHow to describe an outdoor room with seasonal and day-night variations: %r&spring-day-desc here=What the place is like during a spring day.%r&spring-night-desc here=What the place is like during a spring night.%rAnd so on. The variations are spring-day-desc, spring-night-desc, summer-day-desc, summer-night-desc, autumn-day-desc, autumn-night-desc, winter-day-desc, and winter-night-desc.%rDon't put things that are only true in specific weather conditions in the descriptions listed above; it'll look funny if you describe a blue sky and the weathermaker comes up with rain.%r&weather-desc here=\[u(#533/short-weather)\] or \[u(#533/long-weather)\]. You can also add \[u(#533/tree-weather)\] or any other environmental weather descriptions that have been written. To use the environmental effects, do something like &weather-desc here=\[u(#533/short-weather)\] \[u(#533/tree-weather)\]%r&moon-desc here=Describe the \[u(#555/moon-phase)\] moon as it shines on the scenery at night.%r&instructions here=\\%rThis last will turn off these instructions. You can suppress any other part of the description the same way, e.g.: &moon-desc here=\\%r&hear-weather-emits here=0 turns the sunrise, sunset, etc. messages from the emits bank off; setting it to 1 turns them on.%r&hear-tide-emits here = 1 turns the tide emits on; setting it to 0 turns them off.
&HEAR-WEATHER-EMITS here=1
&VERSION here=4.0
&AUTHOR here=Keran@Keranset Island
@set here=FLOATING
@set here=VISUAL
@set here=PARENT_OK
@set here=NO_COMMAND
@set here=SAFE
@parent here=#515


#545 - Parent of Season-and-Day-Night-Dawn-Dusk Outdoor Rooms

@tel #545
@Desc here=[squish([u([u(#7/season)]-[u(#7/day-night-dawn-dusk)]-desc)])][u(separator)][squish([u(weather-desc)] [switch(u(#7/day-night), night, {[switch(u(#555/moon-phase), new,, {[switch(u(#555/moon-up), 1, {[switch(u(#111/weathertype), clear, u(moon-desc), fair, u(moon-desc))]})]})]})])]%r[u(instructions)]
&UNCHANGING-DESC here=\
&SPRING-NIGHT-DESC here=This is what the place is like on a spring night.
&SUMMER-NIGHT-DESC here=This is what the place is like on a summer night.
&AUTUMN-NIGHT-DESC here=This is what the place is like on an autumn night.
&WINTER-NIGHT-DESC here=This is what the place is like on a winter night.
&SPRING-DAY-DESC here=This is what the place is like on a spring day.
&SUMMER-DAY-DESC here=This is what the place is like on a summer day.
&AUTUMN-DAY-DESC here=This is what the place is like on an autumn day.
&WINTER-DAY-DESC here=This is what the place is like on a winter day.
&WEATHER-DESC here=[u(#533/short-weather)]
&MOON-DESC here=This is the desc of the [u(#555/moon-phase)] moon.
&SEPARATOR here=%r%r
&INSTRUCTIONS here=%rHow to describe an outdoor room with seasonal and day-night variations: %r&spring-day-desc here=What the place is like during a spring day.%r&spring-night-desc here=What the place is like during a spring night.%rAnd so on. The variations are spring-day-desc, spring-night-desc, spring-dawn-desc, spring-dusk-desc, summer-day-desc, summer-night-desc, summer-dawn-desc, summer-dusk-desc, autumn-day-desc, autumn-night-desc, autumn-dawn-desc, autumn-dusk-desc, winter-day-desc, winter-night-desc, winter-dawn-desc, and winter-dusk-desc.%rDon't put things that are only true in specific weather conditions in the descriptions listed above; it'll look funny if you describe a blue sky and the weathermaker comes up with rain.%r&weather-desc here=\[u(#533/short-weather)\] or \[u(#533/long-weather)\]. You can also add \[u(#533/tree-weather)\] or any other environmental weather descriptions that have been written. To use the environmental effects, do something like &weather-desc here=\[u(#533/short-weather)\] \[u(#533/tree-weather)\]%r&moon-desc here=Describe the \[u(#555/moon-phase)\] moon as it shines on the scenery at night.%r&instructions here=\\%rThis last will turn off these instructions. You can suppress any other part of the description the same way, e.g.: &moon-desc here=\\%r&hear-weather-emits here=0 turns the sunrise, sunset, etc. messages from the emits bank off; setting it to 1 turns them on.%r&hear-tide-emits here = 1 turns the tide emits on; setting it to 0 turns them off.
&SPRING-DAWN-DESC here=This is what the place is like on a spring dawn.
&SUMMER-DAWN-DESC here=This is what the place is like on a summer dawn.
&AUTUMN-DAWN-DESC here=This is what the place is like on an autumn dawn.
&WINTER-DAWN-DESC here=This is what the place is like on a winter dawn.
&WINTER-DUSK-DESC here=This is what the place is like on a winter dusk.
&AUTUMN-DUSK-DESC here=This is what the place is like on an autumn dusk.
&SUMMER-DUSK-DESC here=This is what the place is like on a summer dusk.
&SPRING-DUSK-DESC here=This is what the place is like on a spring dusk.
&HEAR-WEATHER-EMITS here=1
&VERSION here=4.0
&AUTHOR here=Keran@Keranset Island
@set here=FLOATING
@set here=VISUAL
@set here=PARENT_OK
@set here=NO_COMMAND
@set here=SAFE
@parent here=#515


#567 - Parent of Separable Day-Night-Dawn-Dusk and Season Outdoor Rooms

@tel #567
@Desc here=[squish([u(unchanging-desc)] [u([u(#7/day-night-dawn-dusk)]-desc)] [u([u(#7/season)]-desc)])][u(separator)][squish([u(weather-desc)] [switch(u(#7/day-night), night, {[switch(u(#555/moon-phase), new,, {[switch(u(#555/moon-up), 1, {[switch(u(#111/weathertype), clear, u(moon-desc), fair, u(moon-desc))]})]})]})])]%r[u(instructions)]
&NIGHT-DESC here=This is what the place is like by night.
&SPRING-DESC here=This is what the place is like in spring.
&SUMMER-DESC here=This is what the place is like in summer.
&WINTER-DESC here=This is what the place is like in winter.
&WEATHER-DESC here=[u(#533/short-weather)]
&UNCHANGING-DESC here=This part of the desc never changes.
&AUTUMN-DESC here=This is what the place is like in autumn.
&MOON-DESC here=This is the desc of the [u(#555/moon-phase)] moon.
&INSTRUCTIONS here=%rHow to describe an outdoor room with seasonal and weather variations: %r&unchanging-desc here=This part of the description of the place never changes.%r&night-desc here=What the place is like at night.%r&day-desc here=What the place is like by day.%r&dawn-desc here=What the place is like at dawn.&dusk-desc here=What the place is like at dusk.%r&spring-desc here=What the place is like during spring.%r&summer-desc here=What the place is like during summer.%r&autumn-desc here=What the place is like during autumn.%r&winter-desc here=What the place is like during winter.%rDon't put things that are only true in specific weather conditions in the descriptions listed above; it'll look funny if you describe a blue sky and the weathermaker comes up with rain.%r&weather-desc here=\[u(#533/short-weather)\] or \[u(#533/long-weather)\]. You can also add \[u(#533/tree-weather)\] or any other environmental weather descriptions that have been written. To use the environmental effects, do something like &weather-desc here=\[u(#533/short-weather)\] \[u(#533/tree-weather)\]%r&moon-desc here=Describe the \[u(#555/moon-phase)\] moon as it shines on the scenery at night.%r&instructions here=\\%rThis last will turn off these instructions. You can suppress any other part of the description the same way, e.g.: &moon-desc here=\\%r&hear-weather-emits here=0 turns the sunrise, sunset, etc. messages from the emits bank off; setting it to 1 turns them on.%r&hear-tide-emits here = 1 turns the tide emits on; setting it to 0 turns them off.
&DAY-DESC here=This is what the place is like by day.
&SEPARATOR here=%r%r
&VERSION here=4.0
&AUTHOR here=Keran@Keranset Island
&HEAR-WEATHER-EMITS here=1
&DAWN-DESC here=This is what the place is like at dawn.
&DUSK-DESC here=This is what the place is like at dusk.
@set here=FLOATING
@set here=VISUAL
@set here=PARENT_OK
@set here=NO_COMMAND
@set here=SAFE
@parent here=#515


#619 - Parent of Weather-and-Day-Night Varying Outdoor Rooms

@tel #619
@Desc here=[squish([u([u(#111/weathertype)]-[u(#7/day-night)]-desc)] [switch(u(#7/day-night), night, {[switch(u(#555/moon-phase), new,, {[switch(u(#555/moon-up), 1, {[switch(u(#111/weathertype), clear, u(moon-desc), fair, u(moon-desc))]})]})]})])]%r[u(instructions)]
&NIGHT-DESC here=This is what the place is like by night.
&SPRING-DESC here=This is what the place is like in spring.
&SUMMER-DESC here=This is what the place is like in summer.
&WINTER-DESC here=This is what the place is like in winter.
&WEATHER-DESC here=[u(#533/short-weather)]
&UNCHANGING-DESC here=This part of the desc never changes.
&AUTUMN-DESC here=This is what the place is like in autumn.
&MOON-DESC here=This is the desc of the [u(#555/moon-phase)] moon.
&INSTRUCTIONS here=%rHow to describe an outdoor room with weather and day-night variations: %r&clear-day-desc here=What the place is like on a clear day.%r&clear-night-desc here=What the place is like on a clear night.%r&fair-day-desc here=What the place is like on a fair day.%r&fair-night-desc here=What the place is like on a fair night.%rEtc. The weathertypes are clear, fair, overcast, rain, fog, stormy, lightsnow, sleet, and blizzard.%r&moon-desc here=Describe the \[u(#555/moon-phase)\] moon as it shines on the scenery at night.%r&instructions here=\\%rThis last will turn off these instructions. You can suppress any other part of the description the same way, e.g.: &moon-desc here=\\%r&hear-weather-emits here=0 turns the sunrise, sunset, etc. messages from the emits bank off; setting it to 1 turns them on.%r&hear-tide-emits here = 1 turns the tide emits on; setting it to 0 turns them off.
&DAY-DESC here=This is what the place is like by day.
&SEPARATOR here=%r%r
&VERSION here=4.0
&AUTHOR here=Keran@Keranset Island
&HEAR-WEATHER-EMITS here=1
&CLEAR-DAY-DESC here=What the place looks like on a clear day.
&CLEAR-NIGHT-DESC here=What the place looks like on a clear night.
&FAIR-NIGHT-DESC here=What the place looks like on a fair night.
&FAIR-DAY-DESC here=What the place looks like on a fair day.
&OVERCAST-DAY-DESC here=What the place looks like on an overcast day.
&OVERCAST-NIGHT-DESC here=What the place looks like on an overcast night.
&RAIN-NIGHT-DESC here=What the place looks like on a rainy night.
&RAIN-DAY-DESC here=What the place looks like on a rainy day.
&STORMY-DAY-DESC here=What the place looks like on a stormy day.
&STORMY-NIGHT-DESC here=What the place looks like on a stormy night.
&FOG-NIGHT-DESC here=What the place looks like on a foggy night.
&FOG-DAY-DESC here=What the place looks like on a foggy day.
&SLEET-DAY-DESC here=What the place looks like on a sleety day.
&SLEET-NIGHT-DESC here=What the place looks like on a sleety night.
&LIGHTSNOW-NIGHT-DESC here=What the place looks like on a night with light snow.
&LIGHTSNOW-DAY-DESC here=What the place looks like on a day with light snow.
&BLIZZARD-DAY-DESC here=What the place looks like on a day with a blizzard.
&BLIZZARD-NIGHT-DESC here=What the place looks like on a night with a blizzard.
@set here=FLOATING
@set here=VISUAL
@set here=PARENT_OK
@set here=NO_COMMAND
@set here=SAFE
@parent here=#515


#510 Grandparent of Windowed Indoor Rooms

@tel #510
@Desc here=Descendants of this room are indoors and have outside views.
@set here=FLOATING
@set here=VISUAL
@set here=PARENT_OK
@set here=NO_COMMAND
@set here=SAFE
@parent here=#508


#512 Grandparent of Windowless Indoor Rooms

@tel #512
@Desc here=Descendants of this room are indoors and have no view of outside.
@set here=FLOATING
@set here=VISUAL
@set here=PARENT_OK
@set here=NO_COMMAND
@set here=SAFE
@parent here=#508


#515 Grandparent of Outdoor Room

@tel #515
@Desc here=Descendants of this room are outdoors.
@set here=FLOATING
@set here=VISUAL
@set here=PARENT_OK
@set here=NO_COMMAND
@set here=SAFE
@parent here=#508


#508 Great-grandparent of Rooms

@tel #508
@Desc here=Descendants of this room are IC.
@set here=FLOATING
@set here=VISUAL
@set here=PARENT_OK
@set here=NO_COMMAND
@set here=SAFE


#624 Test Room

@tel #624
&HEAR-WEATHER-EMITS here=1
&HEAR-TIDE-EMITS here=1
&INSTRUCTIONS here=\
@Desc here=It's [u(#7/time-of-day)]. The weather is [u(#111/weathertype)]. The season is [u(#7/season)].
&TRIGGER-AT-EVERY~HOUR here=@pemit/contents me=@Emitted every hour.
&TRIGGER-AT-EVERY~HALFHOUR here=@pemit/contents me=@Emitted every halfhour.
&TRIGGER-AT-EVERY~QUARTERHOUR here=@pemit/contents me=@Emitted every quarterhour.
&TRIGGER-AT-DAWN here=@pemit/contents me=@Emitted at dawn.
&TRIGGER-AT-SUNRISE here=@pemit/contents me=@Emitted at sunrise.
&TRIGGER-AT-MORNING here=@pemit/contents me=@Emitted at morning.
&TRIGGER-AT-NOON here=@pemit/contents me=@Emitted at noon.
&TRIGGER-AT-AFTERNOON here=@pemit/contents me=@Emitted at afternoon.
&TRIGGER-AT-DUSK here=@pemit/contents me=@Emitted at dusk.
&TRIGGER-AT-SUNSET here=@pemit/contents me=@Emitted at sunset.
&TRIGGER-AT-NIGHT here=@pemit/contents me=@Emitted at night.
&TRIGGER-AT-MIDNIGHT here=@pemit/contents me=@Emitted at midnight.
&TRIGGER-AT-AFTER~MIDNIGHT here=@pemit/contents me=@Emitted at after~midnight.
&TRIGGER-AT-MOONRISE here=@pemit/contents me=@Emitted at moonrise.
&TRIGGER-AT-MOONSET here=@pemit/contents me=@Emitted at moonset.
&TRIGGER-AT-MERIDIAN~TRANSIT here=@pemit/contents me=@Emitted at meridian~transit.
&TRIGGER-AT-0 here=@pemit/contents me=@Emitted at 0.
&TRIGGER-AT-1 here=@pemit/contents me=@Emitted at 1.
&TRIGGER-AT-2 here=@pemit/contents me=@Emitted at 2.
&TRIGGER-AT-3 here=@pemit/contents me=@Emitted at 3.
&TRIGGER-AT-4 here=@pemit/contents me=@Emitted at 4.
&TRIGGER-AT-5 here=@pemit/contents me=@Emitted at 5.
&TRIGGER-AT-6 here=@pemit/contents me=@Emitted at 6.
&TRIGGER-AT-7 here=@pemit/contents me=@Emitted at 7.
&TRIGGER-AT-8 here=@pemit/contents me=@Emitted at 8.
&TRIGGER-AT-9 here=@pemit/contents me=@Emitted at 9.
&TRIGGER-AT-10 here=@pemit/contents me=@Emitted at 10.
&TRIGGER-AT-11 here=@pemit/contents me=@Emitted at 11.
&TRIGGER-AT-12 here=@pemit/contents me=@Emitted at 12.
&TRIGGER-AT-13 here=@pemit/contents me=@Emitted at 13.
&TRIGGER-AT-14 here=@pemit/contents me=@Emitted at 14.
&TRIGGER-AT-15 here=@pemit/contents me=@Emitted at 15.
&TRIGGER-AT-16 here=@pemit/contents me=@Emitted at 16.
&TRIGGER-AT-17 here=@pemit/contents me=@Emitted at 17.
&TRIGGER-AT-18 here=@pemit/contents me=@Emitted at 18.
&TRIGGER-AT-19 here=@pemit/contents me=@Emitted at 19.
&TRIGGER-AT-20 here=@pemit/contents me=@Emitted at 20.
&TRIGGER-AT-21 here=@pemit/contents me=@Emitted at 21.
&TRIGGER-AT-22 here=@pemit/contents me=@Emitted at 22.
&TRIGGER-AT-23 here=@pemit/contents me=@Emitted at 23.
&TRIGGER-AT-HIGH~AND~RISING here=@pemit/contents me=@Emitted at high and rising.
&TRIGGER-AT-HIGH~AND~SLACK here=@pemit/contents me=@Emitted at high and slack.
&TRIGGER-AT-HIGH~AND~EBBING here=@pemit/contents me=@Emitted at high and ebbing.
&TRIGGER-AT-LOW~AND~EBBING here=@pemit/contents me=@Emitted at low and ebbing.
&TRIGGER-AT-LOW~AND~SLACK here=@pemit/contents me=@Emitted at low and slack.
&TRIGGER-AT-LOW~AND~RISING here=@pemit/contents me=@Emitted at low and rising.
@set here=FLOATING
@set here=NO_COMMAND