| 1 |
//////////////////////////////////////////////////////////////////////// |
| 2 |
// POWDER Rooms |
| 3 |
//////////////////////////////////////////////////////////////////////// |
| 4 |
|
| 5 |
This is the definition of the .map file format as used in POWDER. |
| 6 |
|
| 7 |
//////////////////////////////////////////////////////////////////////// |
| 8 |
// Format |
| 9 |
//////////////////////////////////////////////////////////////////////// |
| 10 |
|
| 11 |
A .map file consists of: |
| 12 |
|
| 13 |
1) Lines starting with "# ". These are comments and are ignored. |
| 14 |
|
| 15 |
2) An ascii map. This is a + followed by W -s, and then another +. |
| 16 |
|
| 17 |
Each successive H lines must consist of | followed by W |
| 18 |
printable characters, followed by a terminating |. |
| 19 |
|
| 20 |
After H lines, a line consisting of +, W -s, and a final + must |
| 21 |
occur. |
| 22 |
|
| 23 |
This will define a W x H room. |
| 24 |
|
| 25 |
3) A legend entry. This is any printable character followed by a : |
| 26 |
After the : should a series of comma seperated attributes |
| 27 |
defining what the printable character should represent. Any |
| 28 |
instance of the character in the map will be replaced by these |
| 29 |
attributes. A given legend entry does not have to appear in |
| 30 |
the map, but every character in the map must have a legend |
| 31 |
entry. |
| 32 |
|
| 33 |
4) A global definition. This is the name of some global variable |
| 34 |
followed by =, and then followed by the value. The global |
| 35 |
variable for this map will get the value to the right of the =. |
| 36 |
Global variables have default values so do not have to be |
| 37 |
specified. |
| 38 |
|
| 39 |
//////////////////////////////////////////////////////////////////////// |
| 40 |
// Attributes |
| 41 |
//////////////////////////////////////////////////////////////////////// |
| 42 |
|
| 43 |
Attributes are in ALL CAPS. |
| 44 |
|
| 45 |
Attributes have a TYPE followed by an _ followed by the specific |
| 46 |
name. |
| 47 |
|
| 48 |
The attribute names correspond to those generated by source.txt. |
| 49 |
|
| 50 |
Valid types are: |
| 51 |
|
| 52 |
SQUARE |
| 53 |
This is a floor tile. It is a mandatory attribute, and there |
| 54 |
can only be one. |
| 55 |
|
| 56 |
SQUAREFLAG |
| 57 |
This is a flag for the tile. Often it is set to |
| 58 |
SQUAREFLAG_LIT to specify a lit map square. |
| 59 |
|
| 60 |
MOB |
| 61 |
This creates the specified creature. |
| 62 |
|
| 63 |
MOBLEVEL |
| 64 |
This creates a creature of a given level range, depending on |
| 65 |
the threat level of the dungeon the room is in. |
| 66 |
|
| 67 |
ITEM |
| 68 |
This creates the specified item. |
| 69 |
|
| 70 |
ITEMTYPE |
| 71 |
This creates a random item of the given type. To create an |
| 72 |
entirely random item, use ITEMTYPE_ANY. |
| 73 |
|
| 74 |
INTRINSIC |
| 75 |
This will set the given intrinsic to any MOBs also on this |
| 76 |
square. For example, INTRINSIC_ASLEEP will ensure the MOB |
| 77 |
starts off asleep. |
| 78 |
|
| 79 |
//////////////////////////////////////////////////////////////////////// |
| 80 |
// Global Variables |
| 81 |
//////////////////////////////////////////////////////////////////////// |
| 82 |
|
| 83 |
Valid global variables are: |
| 84 |
|
| 85 |
minlevel |
| 86 |
Defaults to -1, for no limit. |
| 87 |
|
| 88 |
The room will not be created if the dungeon level is less than |
| 89 |
this. |
| 90 |
|
| 91 |
maxlevel |
| 92 |
Defaults to -1, for no limit. |
| 93 |
|
| 94 |
The room will not be created if the dungeon level is greater |
| 95 |
than this. |
| 96 |
|
| 97 |
rarity |
| 98 |
Defaults to 100 for normal. |
| 99 |
|
| 100 |
This affects how often the map will show up. Lower numbers is |
| 101 |
rarer. 0 will prevent it from being generated. |
| 102 |
|
| 103 |
mandatory |
| 104 |
Defaults to false. |
| 105 |
|
| 106 |
This controls whether the room MUST show up on at least one |
| 107 |
level. Not yet implemented. |
| 108 |
|
| 109 |
onlyonce |
| 110 |
Defaults to false. |
| 111 |
|
| 112 |
This controls whether the room show up at MOST once. Not yet |
| 113 |
implemented. |
| 114 |
|
| 115 |
allowstairs |
| 116 |
Defaults to true. |
| 117 |
|
| 118 |
This controls whether staircases can be built in the room. |
| 119 |
Rooms with big nasties (like zoos) or from which their may be |
| 120 |
no exit, should not get stairs. |
| 121 |
|
| 122 |
allowgeneration |
| 123 |
Defaults to true |
| 124 |
|
| 125 |
Determines if a map containing this room is allowed to have monster |
| 126 |
generation |
| 127 |
|
| 128 |
allowdig |
| 129 |
Defaults to true |
| 130 |
|
| 131 |
Determines if one is allowed to dig down in levels with this map. |
| 132 |
|
| 133 |
quest |
| 134 |
Whose quest this is. Defaults to GOD_NONE. |
| 135 |
|
| 136 |
Determines which god's quest this is map is attached to. |
| 137 |
|
| 138 |
pos |
| 139 |
Defaults to -1, for no location |
| 140 |
|
| 141 |
Creates the room at the given X Y coordinates. |
| 142 |
|