builder
Builder is used to interpret text files and convert them into (physical) world data, whether for a place module or terrain layout.
A text file may be a place layout or terrain layout.
-GDPlot |
Output graphical commands to render the data into graphical form. The output is suitable input to the GDPlot utility. |
-gif |
Output the data into graphical form (GIF). |
-svg |
Output the data into graphical form (SVG). |
-errsvg |
In SVG generated map, add red circles to areas where layout errors were reported. |
-imager imageid |
Output graphical commands to render the data into graphical form to Imager daemon named as per imageid. |
-labels |
When outputing a map, also show labels, which are typically hidden since they are only used for construction. |
-area areaname |
When outputting a map, only output the named area, not the whole map. |
-lines low-high |
When outputting a map, only generate from this range of source file lines, not the whole map. |
-unitsize size |
The default mapping unit is pixels per map unit. Using a large pixel count makes for larger maps. |
-html |
Generate output in HTML format. |
-php |
Generate output suitable for use with the PHP Arana website. |
-vrml |
Generate a 3-D description of the layout, which can be viewed using some VRML utilities, such as blender. |
-fe |
Generate a 3-D description of the layout as finite elements, which may be input to fe2view. |
-xml |
Generate output in XML format. |
-arealist |
After processing the map, generate a list of defined areas. |
-levellist |
After processing the map, generate a list of defined levels. |
-bdglist |
After processing the map, generate a list of defined buildings by name. |
-fullarealist |
After processing the map, generate a list of defined areas, even the "don't care" or unnamed map regions (such as hallways). |
-fullbdglist |
After processing the map, generate a list of defined buildings. |
-dbsave |
After processing the map, save it to the DraftMap database. |
-dbload name |
Instead of defining the map file file, pull it from database. |
-sql |
Generate the SQL commands to insert the data into the database. |
-quickmap location |
Given a location, show the terrain immediately around it. |
-lay |
Specify a place/ruin map layout. |
-ter |
Specify a terrain layout. |
filename |
Specify the input file. Note that "-" means standard input. |
-g |
Turn on debug. |
Generate HTML module document of place:
builder myfile.lay -html
Build the module and save it to DraftMap database table:
builder myfile.lay -dbsave
A layout file has these key parts:
Line |
Description |
dungeon "name" [placeid] |
Declare this place is a dungeon/ruin and specify its name. Quotes optional. This place name is searched in the Place table in the database to determine it place id if not provided. Note that dungeon levels 1, 2, 3 and so on are actually -1, -2, -3. |
place "name" [placeid] |
Declare this place is a town or above ground work and specify its name. Quotes optional. This place name is searched in the Place table in the database to determine it place id if not provided. Note that levels 1, 2, 3 and so on are above ground; levels -1, -2, -3 and so on are below ground. There is no level 0. |
descr text more text |
Provide a description of this place. |
author "name" |
Declare the creative author of this work. |
location "name" |
not used |
entrance "area" |
Declare the default entrance on this level. |
wmlist "name" |
Declare the wandering monster list name. Also include a wmfreq. This can be specific per level and per building. |
wmfreq minutes |
Provide how frequently to check for a wandering monster (in minutes). |
level number |
Provide a number designation for this level, like a floor number. Positive numbers indicate floors rising above ground; negative numbers indicate floors deeper in the earth. Places use positive and negative numbers; dungeons use positive numbers, but they are mapped to negative ones internally. Must be an integer. No requirement on sequencing or starting at 1. |
upfloor |
Switch from the current level to the level above. This is handy for specifying multiple floors inside a building. Note that going up from floor -1 means you going to floor 1 (not 0). |
downfloor |
Switch from the current level to the level below. This is handy for specifying multiple floors inside a building. Note that going up from floor -1 means you going to floor 1 (not 0). A level is considered 10' of height below ground. |
data "id level" |
Advanced. This is a short hand for providing the place id and the physical level for this layout. Used by web portal for ad hoc mapping. |
public text more text |
Provide a description that may be read to/by the players. Basic HTML formatting permitted. Text may overflow across lines in the text file, but each overflow line must start with a space (so the first word is not interpreted as a keyword). |
notes text more text |
Provide a description for the DM only. Basic HTML formatting permitted. Text may overflow across lines in the text file, but each overflow line must start with a space (so the first word is not interpreted as a keyword). |
include filename |
You can organize sections of layouts in different files and pull them into a dungeon or town as needed using include. Unlike templates, included files cannot be rotated or flipped. |
A map layout block of commands begins with the keyword map and concludes with the keyword end.
To specify a layout, the following comments describe the path of walls or spaces to skip. It is very handy to have the layout on grid/graph paper that you can mark. Mark it along the x-axis every 5, 10, etc. units. Similarly mark the y-axis. As you specify the path, you specify a vector path, where each point is often relative to the last point. It may be handy to label certain points on the grid, so you can easily reference those points by name (especially if you later realize that point is off by a little bit.)
In the syntax table that follows, these are some of the expressions:
pt |
Specify a point. A point may be absolute, such as (x,y[,z]) for Cartesian coordinates or (theta;radius) for polar coordinates. A point may have been predefined as a label, e.g. @label. A point may be relative to the last point, e.g. x,y[,z]. A point may be a charpt (see below). Note that a point has no spaces in it. |
charpt |
This is a short cut relative point that has been defined using the def command (see below). It is a single letter, such as "U", which has been defined as a relative point, e.g. "0,1". |
vector |
Specify a vector path. A vector path may be as simple as a single point (see pt above) or it may be a sequence of points. If it is a sequence of points, it must be a sequence of charpts, e.g. "UDLR". A vector can be any length of charaters. A vector may not have any spaces in it. |
props (wall) |
[width w] [height h] [slope s] [area ccw/cw] [note "n"] [data d] where w is the width of the wall (thickness to the right of the vector), h is the height of the wall, s is the slope as the wall moves from the first point to the second, ccw is the area name to the left (ccw) of the vector from point1 to point2, cw is the area name to the right (cw) of the vector from point1 to point2, n is some textual note about this, and d is additional data about this. |
props (portal) |
secret wood iron irongate concealed 1wayCW 1wayCCW [width w] [height h] [slope s] [area ccw/cw] [note "n"] [data d] using secret to designate a secret door, wood to designate a wooden door (default), iron to designate an iron door, 1wayCW to designate a 1-way door from the left, 1wayCCW to designate a 1-way door from the right, and where w is the width of the wall, h is the height of the wall, s is the slope as the wall moves from the first point to the second, ccw is the areaname to the left (ccw) of the vector from point1 to point2, cw is the areaname to the right (cw) of the vector from point1 to point2, n is some textual note about this, and d is additional data about this. |
areaname |
An area name is typically a room/area identifier that is later described in the layout file. However, the area can also refer to a place external to this map. For example, it can be level.areaname, which refers to an area on a different level. Or it can be be place:level.areaname, which refers to the external place (by name or place id), level within that place, and area. Note that valid area names do not have spaces, slashes, dots or colons. |
$prop=value |
Explicitly specify a property for a partition. Note that the property name (prop) must be valid (defined in /arana/conf/builderlay.conf) and the value assigned to it (value). See Layout Extensibility section below. |
Syntax |
Description |
north pt |
On the map layout that follows, which way is north pointed? The angle of pt specified determines that direction. The default is (0,1), up along the positive y-axis. |
def char=x,y[,z] |
Define a new shortcut character as a relative movement in a vector path. Predefined are: U=0,1; D=0,-1; L=-1,0; R=1,0; which define up, down, left and right for 10' or one unit. If layout frequently uses angles or other lengths, defining them may help save coding/typing. |
label identifier |
Specify a label for the current point. Later, you can use move @identifier to move back to this labeled point. |
move pt move vector |
Move to the point specified or along the vector. Nothing physical is recorded in the layout; this is simply for positioning. |
back |
Move the current point backwards. This is a little tricky. The current point is normally where the last vector or pt left it. However, You can back up further and further, point by point, moving the current point where it was before. This is tricky with a vector since it doesn't move back to the beginning of the vector, but to each previous charpt, if those were used. A vector with 3 charpts would require 3 backs to un-traverse it. Note that this is not an undo operation - this command make not physical changes. |
wall pt [props] wall vector [props] |
Create a wall from the current point to the specified point or along the specified path. The properties can specify width, height, slope, or note. |
hewn pt [props] hewn vector [props] |
Create a rough-hewn wall from the current point to the specified point or along the specified path. The properties can specify width, height, slope, or note. A rough-hewn wall is found in caves. |
door pt [props] |
Create a door portal from the current point to the specified point. The properties can specify width, height, slope, or note as well as the type of door: iron, wood, secret, concealed, 1wayCW, 1wayCCW. Make sure you specify an area property to designate what area is the the left (CCW) and what area is to the right (CW). Using "-" as the area name tells builder to figure it out itself or assign an area name to it (don't care). |
air pt [props] air vector [props] |
Create an air portal (aka invisible, open door) from the current point to the specified point or along the specified path. When two areas are touching without a physical door to connect them, you must use an air portal to separate the two areas. Make sure you specify an area property to designate what area is the the left (CCW) and what area is to the right (CW). Using "-" as the area name tells builder to figure it out itself or assign an area name to it (don't care). |
teleportal pt [props] |
Create a teleportal, a portal that bridges this space to another space that is not physically adjacent. For a teleportal, the CCW (first areaname) is the current space and the CW (second areaname) is the remote/teleportation target area. |
arch pt [props] |
Create an arch portal from the current point to the specified point. The properties can specify width, height, slope, or note. Make sure you specify an area property to designate what area is the the left (CCW) and what area is to the right (CW). Using "-" as the area name tells builder to figure it out itself or assign an area name to it (don't care). |
curtain pt [props] |
Create a curtain portal from the current point to the specified point. The properties can specify width, height, slope, or note. Make sure you specify an area property to designate what area is the the left (CCW) and what area is to the right (CW). Using "-" as the area name tells builder to figure it out itself or assign an area name to it (don't care). |
stairs pt [props] up/down |
Create a staircase (portal) from the current point to the specified point as its left side. The properties can specify width (to the right), height, or note. Make sure you specify an area property to designate what area is the the here and what area is to there (other end of stairs), e.g. area here/there. The up or down property indicates whether the stairs ascend or descend. The slope property indicates how quickly it ascends/descends (default: .5 for up, -.5 for down). |
ladder pt [props] up/down |
Create a ladder (portal) to the right (CW) from the current point to the specified point. The properties can specify width, height, or note. Make sure you specify an area property to designate what area is here and what area is above/below, e.g. area here/there. The up or down property indicates whether the ladder ascends or descends. |
marker label |
Place text on the map at the current point. The text appears on a 2-D map from above, but does not appear on a 3-D map. |
column radius round/square [props] |
Specify a column at the current location with the radius specified. A column may be round or square. Valid properties are height and note. |
window [props] |
Specify a window inside previously declared wall. Width indicates the width of the window; height indicates where the window begins. |
light radius [props] |
Specify a light source on previously declared wall. Height indicates where the light is positions up from the floor. Radius indicates the brightness of the light. |
tree radius [props] |
Specify a tree at the current location with the leaf radius specified. Valid properties are height and note. |
rubble radius [props] |
Specify a pile of rubble at the current location with the radius specified. Height indicates how tall the pile is. |
grass [props] |
Specify a swath of (rectangular) grass. The grassy area is to the right (CW) of the vector indicated and as wide as the width provided. Height indicates the hight of the grass itself. |
dirt [props] |
Specify a patch of (rectangular) dirt. The dirt area is to the right (CW) of the vector indicated and as wide as the width provided. |
water [props] |
Specify a pool of (rectangular) grass without containing boundaries. The wet area is to the right (CW) of the vector indicated and as wide as the width provided. The depth property specifies how deep the water is. |
road [props] |
Specify a road section. The road area is to the right (CW) of the vector indicated and as wide as the width provided. |
planks [props] |
Specify a plank road section. The plank road area is to the right (CW) of the vector indicated and as wide as the width provided. |
bridge [props] |
Specify a bridge section. The bridge itself is is to the right (CW) of the vector indicated and as wide as the width provided. Use area to specify each area on each side of the bridge; CCW is the near end of the bridge; CW is the far end. |
drawbridge [props] |
Specify a drawbridge section. The bridge itself is is to the right (CW) of the vector i |
fence [props] |
Specify a section of fence along the vector provided. |
railing [props] |
Specify a section of railing along the vector provided. |
chimney [props] |
Specify a hole in the ceiling going upward an amount specified by height. The hole is to the right (CW) of the vector. Specify what areas for the chimney, e.g. area here/there. Remember than an area on a different level is preceded by the level number and dot, e.g. 4.roof, to indicate the area is not on the current level. |
pit [props] |
Specify a hole in the floor going upward an amount specified by height. The hole is to the right (CW) of the vector. Specify what areas for the pit, e.g. area here/there. Remember than an area on a different level is preceded by the level number and dot, e.g. -4.cell14, to indicate the area is not on the current level. |
use templatename |
Use codes already defined in a template (see Templates, below). The use may be followed by rotate degrees. Likewise, it may also be followed by flipx or flipy to modify the layout. |
Additional layout commands may be defined as well as additional modifiers for dungeon parts using the /arana/conf/builderlay.conf configuration file. The configuration file has these keywords to extending the layout vocabulary:
Keyword |
Parameters |
Description |
default |
partition prop=value prop=... |
Declare default properties for the partition type specified. Multiple properties may be specified, separated by spaces. For example: default wall material=brick |
command |
name partition prop=value prop=... |
Declare a new partition (name) type based upon an existing partition type (partition). The new partition type gets all the properties of partition plus the additional ones specified. For example: command torch light class=torch light=4 |
mod |
name prop=value prop=... |
Declare a new partition modifier as name. When this modifier is used, the specified property values are set on that partition. For example: mod brick material=brick |
prop |
name value-list |
Declare a new property (name) and allowed values for the property (value-list). The value list is comma separated without spaces. The property may only be assigned a value in the list. If the value of the property is arbitrary, then specify value-list as "*" (wildcard - anything). For example: prop material brick,stone,mud,wood |
When underground/inside (dungeon floors or place floors below 0), the wall layout implies floors and ceilings. When above ground (outside), wall layout does not imply floors or ceilings. If you need floors and ceilings, then you must place those walls/partitions within a building (so they're inside). Buildings are declared using these keywords.
Line |
Description |
building "name" [using ...] |
Begin a building description. |
using "template" [props] |
Create a building layout from a template. This is very handy when you want to make copies of something already existing. For example, a neighborhood may be a collection of houses all created from a group of four or so template houses. Note that a template layout may be modified. Use "rotate angle" to rotate the layout (use degrees). To get variety out of a template, use flipy to flip the layout vertically (reflected across a horizontal axis); use flipx to flip the layout horizontally (reflected across a vertical axis). |
roof style |
Declare the roof style. Options: flat, peaked, slant, dutch, A, gabled, shingled, slate, thatch. Future use. |
siding style |
Declare the siding style. Options: brick, stone, wood, log, cement, tudor. Future use. |
sign "label" |
Indicate that this building offers a service to the public as indicated by the label. (Future:) A sign will be displayed outside the front door. Internally, this provides a label for players to know something about this building, e.g. it's a store or hotel or restaurant. If a building has no sign, it must be a private residence. Or private something. |
map |
Begin section that declares partition/wall layout within the building. Note that the building perimeter is implied by the partitions. |
upfloor |
Switch from the current level to the level above. This is handy for specifying multiple floors inside a building. Note that going up from floor -1 means you going to floor 1 (not 0). |
downfloor |
Switch from the current level to the level below. This is handy for specifying multiple floors inside a building. Note that going up from floor -1 means you going to floor 1 (not 0). A level is considered 10' of height below ground. |
end-building |
Specify the end of the building layout. Note that declaring a new building with the building keyword implies the last building's layout is done. State (x,y position, level, map mode) is restored when end-building is encountered. |
Unlike a dungeon, all walls inside a building must be specified, even if the walls are shared with another building or outside partitions. A building must have a self-contained complete layout.
A note about areas and buildings. A building's area names are unique to itself. Area "A" inside one building is not the same as area "A" inside a different building. As a result, it may be challenging to connect a portal (door, arch, etc) between two buildings. This connection is made automatically for you - just specify the other area as "outside". When two portals from different buildings are overlapping, any indication of "outside" is corrected to the other building's proper area name. If you need to refer to a building area from outside that building, use the syntax: level#.buildingname__areaname.
When you want to re-use groups of layout codes, declare that group as a template. Later, a template can be used to copy those codes into the layout. And when they are copied, they can be modified (rotated, flipped). A template is started using template name and concluded with end-template. Note that no syntax checking occurs when the template is created. Syntax is checked when the text is copied into place with a use templatename.
Syntax |
Description | ||||||||||||||||
area identifier |
Begin a block of commands related to the identified area. An identifier may not contain spaces. | ||||||||||||||||
intro text more text |
A description of the area, readable to/by PC's. Note that any text inside parenthesis is not visible or to be read to the PC's. HTML tags may be used. | ||||||||||||||||
notes text more text |
A description of the area, readable only by the DM. HTML tags may be used. | ||||||||||||||||
interest "name" text |
An interest is a sub-area within the area, such as a desk, rug, bookshelf, etc. The text following the interest's name is readable by/to the PC's (but not the text inside parenthesis). Note that any monster or item line that follows will be attached to this interest, not the above defined area. | ||||||||||||||||
monster qty "name" [treasure] |
Specify that a monster is in this area or interest that may attack the players. The quantity of monsters, qty, is specified as a die roll. The name of the monster should match a name in the Monster table. The treasure is a description of any booty that can be found on the monster once slain, e.g. 10gp (see Booty, below). During game play, a monster is listed with the room description and can easily be called up to fight. If an area may have one of multiple monsters possibly present, you may want to include all of them here, one per line; that will make game play move along quicker. | ||||||||||||||||
item "name" [qty] |
Specify an item in this area or interest that may be taken by the player. The item's name is searched in the Item table. The default quantity is 1, but a die roll may optionally be specified (e.g. 2, d4, d6+3, etc.. During game play, items so listed may be transferred readily to a player. Note that the real name of an item can be masked; instead of "flask_of_wine", specify "flask_of_wine:wine" so it shows up as "wine" to the player; instead of "ring_Contrariness", specify "ring_Contrariness:magic_ring" so it shows up as "magic ring". Note that the "_" will convert to a space when displayed. | ||||||||||||||||
booty "item(s)" |
Specify one or more booty items that may be taken by a player - money, gem, jewel, and misc. A booty item usually includes a value and optionally an experience point value. Booty items are separated by spaces; an individual booty item may contain no spaces (use "_" instead in names). Here's the syntax and examples of these items. Note that misc booty items are handy for valuables that are not in the Item table (e.g. tapestry:10gp).
Note that a qty (quantity) is given in the form of a die roll inside parenthesis or an integer outside of parentheis, e.g. (2d4) or 3. No quantity implies 1. Also note that value is given in the form of (qty)gp. Experience points (xp) are calculated from gp value if not provided. Any booty item may be followed by experience points in the format of (qty)xp, e.g. :100xp | ||||||||||||||||
copy areaname |
Copy the contents (and monsters, items, and interests) of the named area into this area. Note that additional monsters, items, and interests may be further specified. (You can create a template area for copying by using an area name that is not defined on the map layout.) |
A terrain layout block of commands begins with the keyword terrain and concludes with the keyword end.
Use terrain layout to define hexes or geographical data as well as declare places (locations, ids).
A vector is a sequence of numbers, where each number may be from 1 to 6, designating direction. (A hex has six side; side 1 or direction 1 is located in the NNE direction; side 2 or direction 2 is located in the E direction, etc.) Movement from one hex to another is specified by a direction (1-6). A sequence of numbers (no spaces, no commas) therefore describes a path.
Syntax |
Description |
terrain "name" |
Declare this region is part of the named terrain, specified its name as found in the Terrain table. Quotes optional. This place name is searched in the Place table in the database. All the hexes traversed/created will be marked as part of this identified terrain. |
descr text more text |
Provide a description of this place. |
public text more text |
Provide a description that may be read to/by the players. |
notes text more text |
Provide a description for the DM only. |
wmlist "name" |
Declare the wandering monster list name. |
wmfreq minutes |
Provide how frequently to check for a wandering monster (in minutes). |
climate code |
Specify the climate. future use |
forest pt [vector] |
Starting at pt and following the vector path, define hexes as forest. |
plains pt [vector] |
Starting at pt and following the vector path, define hexes as plains. |
desert pt [vector] |
Starting at pt and following the vector path, define hexes as desert. |
mountains pt [vector] |
Starting at pt and following the vector path, define hexes as mountains. |
rough pt [vector] |
Starting at pt and following the vector path, define hexes as rough/rocky. |
marsh pt [vector] |
Starting at pt and following the vector path, define hexes as marsh. |
scrub pt [vector] |
Starting at pt and following the vector path, define hexes as scrub/brush/bushes. |
wasteland pt [vector] |
Starting at pt and following the vector path, define hexes as wasteland (cold desert). |
ocean pt [vector] |
Starting at pt and following the vector path, define hexes as ocean. |
jungle pt [vector] |
Starting at pt and following the vector path, define hexes as jungle. |
hills pt [vector] |
Starting at pt and following the vector path, add hills property to the hexes. |
enclose terrain pt [vector] |
Prefixing "enclose" for the forest, plains, desert, mountains, rough, marsh, scrub, wasteland, ocean, jungle, or hills command is a quick way of specifying a perimeter and then having all the middle part automatically enclosed with the same terrain feature. This saves you from having to zigzag across the terrain, visiting very single hex. |
road pt [vector] |
Specify the course of a road, starting at pt and moving along the vector path. |
trail pt [vector] |
Specify the course of a trail, starting at pt and moving along the vector path. |
river pt [vector] |
Specify the course of a trail, starting at pt and moving along the vector path. |
coast pt [vector] |
Specify the course of a coast, starting at pt and moving along the vector path. |
place name id location type |
Declare a place/ruin, using the name and id (for Place table). The location is the coordinates. The type may be dungeon or ruin (which are identical) for an uninhabited place or a dwelling size for an inhabited place: thorpe, hamlet, village, town, city. |
perimeter pt [vector] |
Starting at pt and following the vector path, load the hex data from the database into memory. This is a handy way of making builder pull data from the database instead of defining it, and then telling builder to generate a map. |
data "longitude latitude terrain_id terrain_type hills coast road river void_type" |
Used for migration of old hex data, this is a short hand for providing the critical hex data. |