wldfile.doc
./Crimson2/doc/wldfile.doc · 5.0 KB
From the archive crimson2.tar.gz
Download the archive « Back to the archive contents
World File field description:
=============================
Main structure notes:
---------------------
#<virtual number> is:
A number for the given room. No two rooms may have the same number.
The <virtual number> must always increase when browsing down the
world file (but increments can be larger than one).
<name>~<NL>:
This name is the "title" of the room. This title is also used in special
procedures like:
"exits"
"brief mode"
<description>~<NL>:
This is the general description of the room.
<zone nr> is:
The number of the zone in which this room is located. This number is used
for resetting zones and monster zone movement. See the zone file.
<room_flags> are:
A bitvector consisting of the room conditions as:
DARK 1 Light must be used to see anything.
DEATH 2 A player 'dies' (no xp lost) when entering.
It is a good idea to:
*Have these rooms light, because then EXITS will show
the room title, for example "In Boiling Water".
*Make exits to all rooms from which one can enter the
death_room, then the "death cry" will be heard by
other members of the group considering following...
NO_MOB 4 No monsters may walk around in here
INDOORS 8 This is inside (a house,cave or dungeon for example)
LAWFULL 16 ???
NEUTRAL 32 ???
CHAOTIC 64 ???
NO_MAGIC 128 Not implemented.
TUNNEL 256 ???
PRIVATE 512 It is impossible to teleport to this room if it
already contains two characters.
Also the 'teleport' spell will never teleport a
player into this room.
??? means that the flag isn't used yet (and you Shouldn't use it either!)
<sector_type> is:
This determines how many movement points are used when moving through
a location of the type - use one of the numbers 0..7 (they are NOT the
movement-points used - merely indexes to a lookup-table):
SECT_INSIDE 0 Uses as if walking indoors
SECT_CITY 1 Uses as if walking in a city
SECT_FIELD 2 Uses as if walking in a field
SECT_FOREST 3 Uses as if walking in a forest
SECT_HILLS 4 Uses as if walking in hills
SECT_MOUNTAIN 5 Uses as if climbing in mountains
SECT_WATER_SWIM 6 Uses as if swimming
SECT_WATER_NOSWIM 7 Impossible to swim water - requires a boat
Direction fields:
-----------------
<Exit number> is one of:
0 = North
1 = East
2 = South
3 = West
4 = Up
5 = Down
<general description><NL>~<NL>:
What a player will see if he types 'look <direction>'
<keyword list>~<NL>:
used for commands like 'open', 'close', etc. should be 'door' for ordinary
doors. Example: An exit from a given room leads through a cupboard. The
keyword list for this exit might look like this:
"cupboard door~"
<Door flag> [NL]:
See the exit flags in exit.h
The state of the doors after reset may be controlled by a command in the
reset-command table (see rstfile.doc)
<Key Number> [NL]:
The number of the object which can unlock/lock the door (in the direction
given). If a player carries/holds this object, he can lock/unlock.
<Key Number> == -1 means no keyhole. If <Door flag> is 0, the value of this
field is ignored.
<to_room> <NL>:
The virtual number of the room to which the exit leads. If this number is
-1 (NOWHERE), the exit doesn't lead anywhere. This might be useful for
adding an exit-description in a direction which doesn't actually lead
anywhere.
** Note about doors. You must make a door in both rooms that the door
is set between.
Extra descriptions:
-------------------
<blank separated keyword list>~<NL> is:
A list of the keywords that will allow the extra description to be
displayed. The keywords must must be seperated by blanks.
<description><NL>~<NL>:
The description that is show when a player types 'look at <keyword>'
and keyword matches one of the above.
Example of a room entry is the database:
----------------------------------------
#100
The Lego temple~
You stand in a tiny, red temple; built entirely from Lego bricks. It is,
sadly, not a very interesting place, and perhaps you should leave through the
portal which leads south to a sunny garden.
~
1 12 0
D2
You see the grand portal of the Lego church. Beyond is an inviting garden.
~
portal grand~
1 2 107
E
portal~
The portal is high and arched, built out of lego bricks of the finest quality.
~
E
brick~
The bricks are all in bright different colours.
~
S
#101
.
.
.
Facts about this room is:
Room number 100
Zone number 1
Room Flags (8+4=12) INDOORS and NO_MOB
Sector Type Inside (movement loss calc only)
One exit (D2) to the south with 'look south' description
Door Flag 1
Key no. 2
Leads to room 107
Extra description for the portal and bricks.
-------------------------------------------------------------------------