Zroom is generic room code for creating your own areas, with all the features of /room/room.c and /room/xroom.c, as well as introducing a number of its own.
The most notable feature of Zroom is its introduction of doors. Doors are added between two room with a single function call in one of the rooms. Zroom contains code for opening, closing, locking, unlocking, breaking down, picking the lock, and knocking on a door. The room that the door is linked to is also notified when such events occur.
Another feature of Zroom is invisible containers. Imagine a room that states in its long description that it contains a desk. Now imagine that you would like a key to be placed inside the desk without having to code the desk itself. This can be done in Zroom with a single function call.
Other features are properties such as the room being inside or outside, and if outside, it can have a day/night cycle and weather automagically. Items that can be searched are added with a single function call, and you can add hidden exits to a room.
Zroom is completely Xroom compatible - instead of inheriting xroom, you inherit zroom instead - without making any changes to the room code itself (except the inheritance path.) The last important point is that Zroom can be distributed anywhere. You don't need my "blessing" to use it.
2002-07-11 v2.0 First release to the public.
Creating a simple room requires inheriting it from Zroom, describing it, and (possibly) adding one or more exits to it. Take a look at this example:
1 inherit "room/zroom";
2
3 public void create_zroom( void )
4 {
5 set_light(1);
6 set_short("Inside a leafy forest");
7 set_long("The trunks of the large elm trees are wider than a grown man could reach around. " +
8 "Their grand canopies eight to ten metres above you colour the sunlight green. The ground " +
9 "is strewn with leaves from previous years that occasionally rustle as some animal moves " +
10 "around in search of food.", 75);
11 add_exit("/players/wizard/leafy_forest14", "east");
12 set_exit("/players/wizard/leafy_forest16", "west");
13 }
Note that you don't write the line numbers when you write your code.
Let's assume that this file is called leafy_forest15.c and is placed in the /players/wizard directory. In the first line this room inherits Zroom. You would put a line such as this at the top of all your rooms. It makes your room get all the functionality of Zroom.
The statement on line 3 declares the function create_zroom. This function is called when your room is created for the first time and is where you set all permanent characteristics of the room. Line five sets the light of the room. This is not a feature of Zroom but an external function that will work in all objects.
Line 6 sets the short description of the room. The short description is displayed when a player uses brief or semi-brief mode in the game. The next lines, numbers 7 to 10 define the long description of the room. This text will be displayed when a player looks inside the room. The number 75 at the end of the statement makes Zroom format the text so that at most 75 characters are displayed on each line.
The statements on lines 11 and 12 create east and west exits to the rooms /players/wizard/leafy_forest14.c and /players/wizard/leafy_forest16.c respectively. On line 11 add_exit is used but set_exit on line 12. There is no reason for this but to illustrate that add_exit is an alias for set_exit so it doesn't matter which function is used.
And that's all there's to it.
create_room | set_short | set_long | set_exit | add_exit
If a player enters the room created in the example in the previous section, he (or she) may want to examine the room further by, for example, looking closer at the trees, or the canopy, or the leaves on the ground. This is easily added to the code:
1 inherit "room/zroom";
...
12 set_exit("/players/wizard/leafy_forest16", "west");
13 set_item("trees", "The trees reach high into the sky.\n");
14 add_item("canopy", "You spot the faint yellow sphere of the sun as you gaze at the canopy.\n");
15 set_item("leaves", "The leaves on the ground are coloured in dozens of hues of browns and greys.", 75);
16 }
Note that the code on lines 2 to 11 has been omitted from this example.
The lines that add an item to the room on lines 13 to 15 work in a similar way: They define the name of the item, followed by its description. On line 14 add_item is used instead of set_item. Which function name is used does not matter - they both do exactly the same thing. At the end of the statement on line 15 there is a number 75, but not on the other lines. This is an optional argument that formats the string just as it does for the function set_long.
Continuing with the example room leafy_forest15.c, a squirrel will be added to the room. This squirrel will reappear (if it has been killed) every time the room is reset.
1 inherit "room/zroom";
...
16 }
17
18 public void reset_zroom( void )
19 {
20 object squirrel;
21
22 if ( !present("squirrel") )
23 {
24 squirrel = clone_object("obj/monster");
25 squirrel->set_name("squirrel");
26 squirrel->set_short("a squirrel");
27 squirrel->set_long("A grey and brown squirrel scurries among the leaves.\n");
28 squirrel->set_level(1);
29 move_object(squirrel, this_object());
30 }
31 }
The function reset_zroom is called every time the room is reset.
Name: add_exit Description: An alias for set_exit. See that function for details. Syntax: void add_exit( string file, string dir, string hook ) Returns: None
Name: add_item Description: An alias for set_item. See that function for details. Syntax: void add_item( string mixed item_list, string desc, string hook ) Returns: None
Name: add_long
Description: Set any text that is to be added to the long description.
Syntax: void add_long( string str [, int length] )
Returns: None
Arguments: str is text to be added to the long description of the room.
length is the maximum number of characters on each line of text.
Example: add_long("The exit north is barred by a rock slide.\n");
Name: add_treasure Description: An alias for set_treasure. See that function for details. Syntax: void add_treasure( string name, string location, int delay ) Returns: None
Name: create_zroom
Description: This function is used to set up the zroom when it is first
created. Functions such as set_short, set_long etc.
should all be called from this function.
Syntax: void create_zroom()
Returns: None
Arguments: None
Name: reset_zroom
Description: This function is called whenever the zroom is reset. It can be used to
replace objects that have been taken by players, clone a killed monster etc.
Syntax: void reset_zroom()
Returns: None
Arguments: None
Name: query_door_states Syntax: mixed* query_door_states() Returns: The status of any doors in the room as an array of arrays, else null. Arguments: None
Name: query_doors Syntax: mixed* query_doors() Returns: The descriptions of any doors in this room as an array of arrays, else null. Arguments: None
Name: query_exits Syntax: mixed* query_exits() Returns: Any exits from this room as an array of arrays, else null. Arguments: None
Name: query_hidden_exit
Syntax: string* query_hidden_exit()
Returns: Returns a string array describing the hidden exit if and only if a hidden exit has
been defined, else null.
The first element is the file to link to.
The second element is the direction of the exit.
Arguments: None
Name: query_items Syntax: mixed* query_items() Returns: Any items in the room, else null. Arguments: None
Name: query_light Syntax: int query_light() Returns: The amount of light in the room. Arguments: None
Name: query_long Syntax: string query_long() Returns: The long description - including any additions - as a string. Arguments: None
Name: query_outdoors Syntax: status query_outdoors() Description: Get whether a room is out of doors. Arguments: None Returns: True if the room is out of doors, else false.
Name: query_short Syntax: string query_short() Returns: The short description as a string Arguments: None
Name: query_search
Syntax: mixed* query_search()
Returns: If at least one object can be search_values then an array of arrays
is returned, else null is returned. See set_search for details.
Arguments: None
Name: query_treasure
Syntax: mixed* query_treasure()
Returns: If at least one object should be added to this room during regular resets then
an array of arrays describing those objects is returned, else null.
Arguments: None
Name: query_walls Syntax: string* query_walls() Returns: A list of walls in the room. Null if there are no walls. Arguments: None
Name: query_zroom Syntax: int query_zroom() Returns: True if the room inherits this object. Arguments: None Notes: This function is an identifier only.
Name: remove_add_long Description: Remove any text that was added to the long description. Syntax: void remove_add_long() Returns: None Arguments: None
Name: remove_container Description: Remove an item which can contain other objects. Syntax: void remove_container( string str ) Returns: None Arguments: str is the name of the container that should be removed.
Name: remove_door Description: Remove a door between two rooms Syntax: void remove_door( string dir ) Returns: None Arguments: dir is the direction of the door to be removed.
Name: remove_exit Description: Remove an exit from the room. Syntax: void remove_exit( string dir ) Returns: None Arguments: dir is the direction of the exit to remove.
Name: remove_hidden_exit Description: Remove the hidden exit. Syntax: void remove_hidden_exit() Returns: None Arguments: None
Name: remove_item Description: Remove an item that can be examined in the room. Syntax: void remove_item( string str ) Returns: None Arguments: str is the name of the item to be removed.
Name: remove_search
Description: Make an item no longer searchable.
Syntax: void remove_search( string str, status flag )
Returns: None
Arguments: str is the name of the item that should not be searchable any
longer. If flag is true then the item is also removed from
the list of items that can be looked at in the room.
Name: remove_treasure Description: Remove treasure from a room. Syntax: void remove_treasure( string str ) Returns: None Arguments: str is the name of the treasure to be removed.
Name: set_container
Description: Insert an invisible container into the room. This could be useful if you want
an item in the room that can contain another item.
Syntax: void set_container( string name, string desc [, int state [, string key [, string func]]] )
Returns: None
Arguments: name is the name of the container.
desc is the message displayed when a player examines it.
state is the same as for doors:
ZROOM_DOOR_OPEN - The container is open
ZROOM_DOOR_CLOSED - The container is closed but unlocked
ZROOM_DOOR_LOCKED - The container is closed and locked
This argument is optional. The container is closed but unlocked by default.
key is a unique identifier for the key that unlocks the container.
This argument is optional.
func can be the name of a file or the name of a function.
If it is the name of a file then that object is cloned into the container when it is reset.
If it is the name of a function then the function is called every time the item is reset.
It should return void.
This argument is optional.
Example: set_container("cupboard", "The paint on the greenish cupboard has started to peel.\n",
ZROOM_DOOR_OPEN, "obj/beer");
If the player would look at the cupboard she would see the following:
The paint on the greenish cupboard has started to peel.
Cupboard contains:
bottle of beer.
Name: set_dark_message
Description: Set the description to be displayed when the player enters a dark
room without carrying sufficient light.
Syntax: void set_dark_message( string str )
Returns: None
Arguments: str is the message to be displayed to the player when a
dark room is entered
Default: "It is completely dark."
Name: set_door
Description: Create a closed door leading to a specified direction.
Syntax: void set_door( string file, string dir, string desc )
Returns: None
Arguments: file is the filename of the room to which the door leads.
dir is the direction of the door.
desc is the description of the door.
Notes: See the function set_door_props for how to set the properties of the door.
A design-fault means that the room to which the door leads is loaded.
Example: set_door("/players/zog/dungeon55", "east",
"The door to the east is made of wood that has become petrified with age.\n");
Name: set_door_props
Description: Set optional properties of an existing door.
Syntax: void set_door_props( string dir, int door_state [, string key [, int pick [, int bash [, string hook]]]]])
Returns: None
Arguments: dir is the direction of the door. Note that the door must have
been created earlier with set_door.
The argument door_state defines the initial state of the door.
This argument can be:
ZROOM_DOOR_OPEN - The door is open
ZROOM_DOOR_CLOSED - The door is closed but unlocked (default)
ZROOM_DOOR_LOCKED - The door is closed and locked
The argument key is a string description of the key that will
unlock the door ("small silver" or "brass" etc.) A key with
the name "master_key" will unlock all doors. If the door is
set as locked but no key defined then it can only be unlocked
with a lock-pick (if a chance is set) or by bashing it in (if,
again, a chance is set) or by using a master key.
pick is the percentage chance of picking the lock on the door. The player
must have an item that matches the id "lock pick" for the command
"pick lock" to work. If not set, the chance is zero.
The argument bash is the percentage chance of breaking down the door
with brute force. If not set, the chance is zero.
Finally, hook is the name of a function to call after an action has been
performed on the door (such as the door being opened or closed.) The name of the
function must begin with a # symbol, the function should return 'void' and
it takes two arguments:
int state_before - the state before the action
int state_after - the state after the action
Both arguments are of the same type as door_state above.
Notes: Include the file "zroom.h" to access the state constants.
The file "zkey.c" is a convenient key object.
Example: set_door_props("east", ZROOM_DOOR_LOCKED, "long steel", 45, 20);
Name: set_exit
Description: Exits to other rooms are created with this function.
Syntax: void set_exit( string file, string dir [, string hook] )
Returns: None
Arguments: file is the filename that the exit leads to.
dir is the direction of the exit.
hook is an optional argument and is the name of a function to
call before the player is moved though the exit. The function should
return a non-zero value if the player should not be moved, otherwise
zero. The name of the function should be prepended by a '#' symbol and
it should take no argument.
Example 1: set_exit("/players/zog/dungeon12", "north");
Example 2: set_exit("/players/zog/dungeon38", "west", "#check_guard");
...
public int check_guard( void )
{
if ( present("guard", this_object()) )
{
tell_room(this_object(), "The guard says: None shall pass!\n");
return 1;
}
return 0;
}
Name: set_hidden_exit
Description: Set a hidden exit. This is an exit which is not displayed among the obvious
exits but still leads somewhere.
Syntax: void set_hidden_exit( string file, string dir )
Returns: None
Arguments: file is the filename of the room to which the hidden exit dir should lead.
Notes: Currently only one hidden exit is possible in each room.
Example: set_item("curtain", "You notice a staircase leading down behind the curtain.\n");
set_hidden_exit("/players/zog/dungeon21", "down");
Name: set_hide_obvious
Description: Set whether or not obvious exits should be displayed.
Syntax: void set_hide_obvious( status flag )
Returns: None
Arguments: flag is true if obvious exits should not be displayed,
false if they should be displayed as normal.
Name: set_item
Description: The names of items and their description are set with this function.
Syntax: set_item( mixed nouns, string desc [, int width | string read [, int width] ] )
Returns: None
Arguments: nouns is a string or an array of strings of item names.
desc is the description of the item(s). If desc begins with a # then the function
is called instead. That function should return 'void' and take no arguments.
rd_bk is intended as either a string or an integer:
as a string it is the string displayed when the item(s) is (are) read.
This string can also begin with a # for the same feature as desc above.
Again the function should return 'void' and take no argument.
as an integer it defines the maximum character width of the description desc.
brk is an integer that defines the maximum character width of the description
desc and the 'read'-string rd_bk.
Example 1: set_item("floor", "The floor is covered with filthy straw.", 68);
Example 2: set_item("sign", "It is a large wooden sign.",
"The sign reads: 'North be trolls. Beware!'", 70);
Example 3: set_item(({ "wall", "wall_list" }), "Water leaks down the walls.\n");
Example 4: set_item("window", "#window_description");
...
public void window_description( void )
{
if ( window_is_open )
write("The window is open.\n");
else
write("The window is closed.\n");
return;
}
Name: set_long
Description: The long description of the room is defined with this function.
Syntax: void set_long( string str [, int length] )
Returns: None
Arguments: str is the long description of the room. If str begins with the
character # then that function is called. See example 3. That function
should return 'void' and take no argument.
length is optional and is the maximum number of characters on each line.
Example 1: set_long("You are in a maze of twisty passages, all alike.\n");
Example 2: set_long("You are in a maze of twisty passages, all different.", 70);
Example 3: set_long("#display_long_description");
...
public void display_long_description( void )
{
if ( boulder_blocks_passage )
write("You are in a cave. A large boulder has crashed down\n" +
"blocking the exit east.\n");
else
write("You are in a cave, a large passage leads east.\n");
return;
}
Name: set_outdoors
Description: Define whether or not the room is out of doors.
Syntax: void set_outdoors( status out )
Arguments: out is a non-zero value if the room is outdoors, if it is zero
then the room is indoors.
Returns: None
Name: set_search
Description: Make an item searchable. This function is similar to set_item.
Syntax: void set_search( string item_name, string desc, string func, int amount )
Returns: None
Arguments: item_name is the name of the item that can be searched.
desc is the message displayed when a player looks at the item.
func can be one of two things:
If it is the name of a file then that object is cloned when the player searches the item.
If it is the name of a function then its name should begin with # and when the object
is searched, that function is called. It should take no arguments and return void.
amound is the number of times the item can be searched per reset.
If the item should only be searchable once then this argument can be ignored.
Example: Here the player can search a barrel four times and find an apple each time:
set_search("barrel", "It is a large oak barrel.\n", "/players/zog/obj/apple", 4);
Name: set_short
Description: Call this to set the short description. This description is quite important
for the structure of the room. Remember not to use newline (\n) in this
string.
Syntax: void set_short( string str )
Returns: None
Arguments: str is the short description of the room
Notes: If the long description of the room has not been set then this function will
set it to be the short description with a newline on the end.
Name: set_treasure
Description: Add treasure or monsters to the room.
Syntax: void set_treasure( string name, string location [, int delay] )
Returns: None
Arguments: name is the name of the treasure.
location can be one of two things:
it can be the file name for the object that is to be added to the room or it can be
the name of a function to call to create the object. Such a function must return the
object created but take no arguments.
delay is the number of seconds to wait from when the room is created or reset
until the object should appear.
Notes: This function is for convenience only. reset_zroom can of course be used to
handle the same tasks.
Name: set_obvious_string
Description: Set the description to be displayed to the player instead of
'There are xx obvious exits: ...'
Syntax: void set_obvious_string( string str )
Returns: None
Arguments: str is the message to be displayed
Name: set_permanent
Description: Call this function only if the room should never self- destruct,
no matter how much time has passed since last it was visited.
Syntax: void set_permanent()
Returns: None
Arguments: None
Name: set_walls
Description: Set the directions in which there are walls.
Syntax: void set_walls( string* dir )
Returns: None
Arguments: dir is an array of the directions in which there are walls. If there is only a
wall in one direction then the argument still needs to be sent as an array.
Name: query_weather Description: Tells whether or not the room uses weather. Syntax: status query_weather() Arguments: None Returns: A non-zero value if the room uses weather, else zero.
Name: query_climate
Description: Get the type of climate in the room.
Syntax: int query_climate()
Arguments: None
Returns: The type of climate as an integer.
Constants for climate are defined in atmosphere.h and are:
CLIMATE_ARCTIC, CLIMATE_SUBARCTIC, CLIMATE_TEMPERATE,
CLIMATE_SUBTROPICAL, CLIMATE_TROPICAL
Name: query_terrain
Description: Get the type of terrain in the room.
Syntax: int query_terrain()
Arguments: None
Returns: The type of terrain as an integer.
Constants for terrain are defined in atmosphere.h and are:
TERRAIN_DESERT, TERRAIN_FOREST, TERRAIN_HILLS,
TERRAIN_MOUNTAINS, TERRAIN_PLAINS, TERRAIN_SEACOAST
Name: query_temperature
Description: Get the temperature in the room (in degrees centigrade).
Syntax: int query_temperature()
Arguments: None
Returns: The temperature as an integer, -37 < t < 60.
The value is in degrees centigrade and its ranges are:
52 -> 59 : Extremely Hot
44 -> 51 : Very Hot
36 -> 43 : Hot
28 -> 35 : Warm
20 -> 27 : Pleasantly Warm
12 -> 19 : Cool
4 -> 11 : Chilly
-4 -> 3 : Cold
-12 -> -5 : Freezing Cold
-20 -> -13 : Very Cold
-28 -> -21 : Bitterly Cold
-36 -> -29 : Extremely Cold
Name: query_effective_temperature Description: Get the temperature in the room (in degrees centigrade) after effects of wind chill and rain have been considered. Syntax: int query_effective_temperature() Arguments: None Returns: The effective temperature as an integer (in degrees centigrade.)
Name: query_cloud_cover
Description: Get the amount of cloud cover in the room.
Syntax: int query_cloud_cover()
Arguments: None
Returns: The amount of cloud cover as an integer. This is a number from zero (clear
skies) to WEATHER_MAX_SKY, which is defined in the file weather.h
(its value is around 6). The sky can be considered cloudy if the returned
value is greater than or equal to the constant WEATHER_CLOUDY (same file.)
Name: query_precipitation
Description: Get the degree of rain in the room.
Syntax: int query_precipitation()
Arguments: None
Returns: The degree of rain as an integer. This is a number from zero (no rain)
to WEATHER_MAX_RAIN, which is defined in the file weather.h (its
value is around 7). The rain should be considered significant if the
returned value is greater than or equal to WEATHER_DOWNPOUR (same file.)
Name: query_raining Description: Tells whether or not it's raining in the room. Syntax: status query_raining() Arguments: None Returns: A non-zero value if it is raining, else zero.
Name: query_snowing Description: Tells whether or not it's snowing in the room. Syntax: status query_snowing() Arguments: None Returns: A non-zero value if it is snowing, else zero.
Name: query_wind_direction Description: Get the direction from which the wind in the room is blowing. Syntax: string query_wind_direction() Arguments: None Returns: The direction as a string, zero if it is calm.
Name: query_wind_speed Description: Get the wind speed in the room. Syntax: int query_wind_speed() Arguments: None Returns: The wind speed as an integer. Notes: The constant WEATHER_WINDY in weather.h is the minimum wind speed for the weather to be considered windy.
Name: query_weather_description Description: Get the description of the weather in the current room. Syntax: string query_weather_description() Arguments: None Returns: The description as a string. Example: "The sky is clear and it is cold. A breeze blows from the southwest."
Name: set_weather Description: Toggle weather in the room. Syntax: void set_weather( status the_weather ) Arguments: the_weather should be non-zero if the weather should be turned on, else zero. Returns: None Notes: Weather is turned off by default.
Name: set_environment
Description: Set the the terrain and climate of the current room.
Syntax: void set_environment( mixed the_climate, mixed the_terrain )
Arguments: the_climate is the climate. See set_climate.
the_terrain is the terrain. See set_terrain.
Returns: None
Name: set_climate
Description: Set the climate in the current room.
Syntax: void set_climate( mixed the_type )
Arguments: the_type is the type of climate. This can be one of the following:
arctic, subarctic, temperate, subtropical or tropical
Returns: None
Name: set_terrain
Description: Set the terrain in the current room.
Syntax: void set_terrain( mixed the_type )
Arguments: the_type is the type of terrain. This can be one of the following:
desert, forest, hills, mountains, plains or seacoast
Returns: None
Name: query_time Description: Get a description of the current mud time. Syntax: string query_time() Arguments: None Returns: The time as a string. Example: "the third quarter of the tenth hour"
Name: query_time_period
Description: Get the current time period in the room.
Syntax: int query_time_period()
Arguments: None
Returns: The time period as an integer.
Notes: These values are defined in the file time.h and are:
TIME_MORNING, TIME_AFTERNOON, TIME_EVENING, and TIME_NIGHT
Name: query_minute Description: Get the current mud time minute. Syntax: int query_minute() Arguments: None Returns: The minute as an integer.
Name: query_hour Description: Get the current mud time hour. Syntax: int query_hour() Arguments: None Returns: The hour as an integer.
Name: query_day Description: Get the current mud day. Syntax: int query_day() Arguments: None Returns: The day as an integer.
Name: query_weekday Description: Get the name of the current mud weekday. Syntax: string query_weekday() Arguments: None Returns: The weekday as a string. Example: "Dyeday"
Name: query_month Description: Get the name of the current mud month. Syntax: string query_month() Arguments: None Returns: The name as a string. Example: "Sunna"
Name: query_year Description: Get the current mud year. Syntax: int query_year() Arguments: None Returns: The year as an integer.
Name: query_cycle Description: Get the name of the current mud year as per the year cycle. Syntax: string query_cycle() Arguments: None Returns: The name as a string. Example: "second"
Name: query_date Description: Get a description of the current mud date. Syntax: string query_date() Arguments: None Returns: The date as a string. Example: "Marketday the twenty-fourth in the month of Hexine, year of the Golem"
Name: query_heavenly_bodies
Description: Get a description of the current mud time as evaluated
by examing the sun or moon, depending on the time of day.
Syntax: string query_heavenly_bodies()
Arguments: None
Returns: A string describing the position of the sun or moon.
Example: "The position of the sun indicates it is somewhere in the ninth hour."
Name: query_moon Description: Get a description of the mud moon. Syntax: string query_moon() Arguments: None Returns: The description as a string. Example: "slightly less than full"
Name: query_moon_status
Description: Get the description of the status of the mud moon.
Syntax: string query_moon_status()
Arguments: None
Returns: The description as a string. This can be:
"full", "waning", "waxing" or "new"
Name: set_day_and_night Description: Turn on or off whether the room should cycle through day and night. Syntax: void set_day_and_night( status on ) Arguments: on is non-zero if the room should cycle through day and night, else zero. Returns: None
Name: set_morning_desc
Description: Set the description of the room as seen in the morning.
Syntax: void set_morning_desc( string str, int length )
Arguments: str is the long description of the room.
length is the maximum length of each line, optional
Returns: None
Name: set_afternoon_desc
Description: Set the description of the room as seen during the afternoon.
Syntax: void set_afternoon_desc( string str, int length )
Arguments: str is the long description of the room.
length is the maximum length of each line, optional
Returns: None
Name: set_evening_desc
Description: Set the description of the room as seen during the evening.
Syntax: void set_evening_desc( string str, int length )
Arguments: str is the long description of the room.
length is the maximum length of each line, optional
Returns: None
Name: set_night_desc
Description: Set the description of the room as seen during the night.
Syntax: void set_night_desc( string str, int length )
Arguments: str is the long description of the room.
length is the maximum length of each line, optional
Returns: None
Name: set_dawn_message
Description: Set the text that is displayed when the cycle of day changes
from night to morning.
Syntax: void set_dawn_message( string str, int length )
Arguments: str is the text to be displayed
length is the maximum length of each line, optional
Returns: None
Default: "The sun appears from behind the horizon."
Name: set_noon_message
Description: Set the text that is displayed when the cycle of day changes
from morning to afternoon.
Syntax: void set_noon_message( string str, int length )
Arguments: str is the text to be displayed
length is the maximum length of each line, optional
Returns: None
Default: "The shadows lengthen as the sun begins its descent from zenith."
Name: set_dusk_message
Description: Set the text that is displayed when the cycle of day changes
from afternoon to evening.
Syntax: void set_dusk_message( string str, int length )
Arguments: str is the text to be displayed
length is the maximum length of each line, optional
Returns: None
Default: "It begins to get dark as the sun sinks beneath the horizon."
Name: set_night_message
Description: Set the text that is displayed when the cycle of day changes
from evening to night.
Syntax: void set_night_message( string str, int length )
Arguments: str is the text to be displayed
length is the maximum length of each line, optional
Returns: None
Default: "The dark curtain of night is drawn across the world."
Name: set_moonlight_message
Description: Set the text that is displayed when the moon is full enough to
illuminate a room at night.
Syntax: void set_moonlight_message( string str, int length )
Arguments: str is the text to be displayed
length is the maximum length of each line, optional
Returns: None
Default: "Moonlight illuminates your surroundings."