Re: [NEWBIE]The four seasons and the time of day

From: Peter Ajamian (
Date: 01/12/00

John Bowman wrote:
>         I've been reading the posts on the dynamic room descriptions and I thought
> of an idea (an extraordinary occurance in and of itself).  Anyhoo, I was
> wonder if
> it would be difficult to code something where you have a separate
> description for
> the time of day (dawn day dusk night) and depending on when you enter that
> room
> the description changes in accordance with the time.  Maybe even have it so
> that
> it changes dependant on the season also, so in effect you could have up to
> 16
> different descriptions for 1 room!  Granted your builders would most likely
> scream unspeakable things to you and curse your very existance, but the
> effect
> would be interesting.  Actually, if your room (i.e. inside of a house)
> doesnt really
> respond to a time/seasonal change then you could just reuse the other descs.
> I was
> just wonder if someone had done this or knew of a few good starting places
> for
> something like this.

A good idea might be to use codes imbedded in the description to control
what lines are displayed when, to do that all you have to do is change
the function that displays the description, a very easy modification
that would not require any extra effort for the builders, for example
you can do something like this...

You are in a large @day{bright|dark} room.

The @day{bright|dark} should be parsed as follows...
if daytime then send the phrase "bright" else send the phrase "dark"

Then you modify (at think it's look_at_room, but I'm not looking it up
right now, so...) to display either bright or dark according to weather
or not it's daytime.

The nice thing about this is it will be relatively easy to code (all you
have to do is parse the description before displaying it), and you don't
have to mess with your OLC editor, or file formats or anything else like
that, also your builders will not have to enter several descriptions for
the same room.

If you need help modifying the function to do this lemmie know and I'll
see if I can spit out some quick code for you to use.

Regards, Peter

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT