builder.doc
1. General
Note: // is used for comment but not supported in actual area file yet
Any database object has the format
<code> <index>
{
}
Where <code> is one of:
O = object
N = NPC (Non Player Character)
S = Shopkeeper NPC
R = Room
A = Area (header to create area must come before any objects in that area)
Where <index> is
<scope string>:<key string>
Scope string must match an area key. Key string must uniquely
identify objects of that type in that area scope.
Example: In area The Void, which has key 'void' all objects with
'void' as scope are considered part of that area. The scope field
may be omitted but the : must appear. The default scope is the
current area object.
N void:dragon-gold
{
...
}
can be written as
N :dragon-gold
{
...
}
In the game, when looking up objects the index is the same format.
Using ofind you may specify only the key which will list only
objects in the area you are standing in. Specify wild cards
to list globally or specifically.
Examples:
ofind sword // list swords in current area
ofind *:sword // list all swords
ofind drow:sword // list swords in drow area
ofind drow:* // list all Object in drow are
ofind *:* // list everything
mfind functions the same way.
When loading with oload/mload you must specify the whole index or
you will load objects from the current area.
Examples:
oload sword // load <current area>:sword
oload drow:sword-long // load sword-long from drow area
Teleporting with 'goto' works the same way.
Examples:
goto 0 // goto room '0' in current area
goto drow:room-20 // goto drow:room-20
2. Rooms
Format:
R <index>
{
<title>~
<desc> // multiline
~
<room-flags> <indoors>
<sector> <terrain>
[<optionals>,[...]]
}
Where:
index - described in Section 1
title - single line room title
desc - Long description of the room.
room-flags - numeric bit field
indoors - boolean number 0 - outdoors, 1 = indoors
sector - string in { ground, air, water, underwater }
terrain - numeric movement difficulty
optionals
Door
Repop
!! UNFINISHED !!
Example room
R void:room-0
{
The Void~
A line of text.
Another line of text
~
0 1
air 1
D{4 up 0 : void:room-1 You see nothing special.~ } // Door to void:room-1
R{M void:dragon-gold 1000} // repop void:dragon-gold 1000/1000
R{G void:orb-chromatic 100} // give him an orb 100/1000 (10%)
R{G void:bag 1000} // give him a bag 1000/1000 (100%)
R{P void:bar-gold 1000} // put a gold bar in the bag
R{O void:chest 1000} // load a chest in the room
R{L - 100} // lock chest 100/1000
R{P void:bag 1000} // put a bag inside chest
R{N void:bar-ivory 1000} // nest a bar inside bag
}