ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/pod/random_maps.pod
(Generate patch)

Comparing deliantra/server/pod/random_maps.pod (file contents):
Revision 1.10 by root, Mon Jul 12 22:28:17 2010 UTC vs.
Revision 1.11 by root, Wed Dec 15 20:16:38 2010 UTC

1=head1 Random Map Deployment Guide 1=head1 Random Map Deployment Guide
2 2
3=head2 Using random maps 3=head2 Using random maps
4 4
5Any exit with "/!" as the destination map will generate a random map. To 5Any exit with "/!" as the destination map will generate a random map. To
6specify random map parameters, you put parameters in the message field for 6specify random map parameters, you put parameters in the message field for
7the exit. 7the exit.
8 8
9=head2 How styles work 9=head2 How styles work
10 10
11A "style" is usually a small map which contains only objects which 11A "style" is usually a small map which contains only objects which define
12define the "style". For example, a monsterstyle "orc" might be a map 12the "style". For example, a monsterstyle "orc" might be a map which has
13generated with crossedit which has six orcs, a kobold, and a troll in it. 13six orcs, a kobold, and a troll in it. When monsters are placed, the
14When monsters are placed, the generator will randomly choose monsters from the 14generator will randomly choose monsters from the "orc" style, and for this
15"orc" style, and for this example, on average, it will generate 6 orcs/troll 15example, on average, it will generate 6 orcs/troll and 1 kobold/troll. So
16and 1 kobold/troll. So orcs will be very common, and there'll be occasional 16orcs will be very common, and there'll be occasional trolls and kobolds.
17trolls and kobolds.
18 17
19In principle, you may put any object in any style map. However, the 18In principle, you may put any object in any style map. However, the
20map generator will do special things with the object depending on which 19map generator will do special things with the object depending on which
21directory it is in. Style maps are located in maps/styles/*, you may use 20directory it is in. Style maps are located in maps/styles/*, you may use
22the editor to modify the style maps, or create new ones. 21the editor to modify the style maps, or create new ones.
23 22
24Any style parameters that accept a map path accept both simple maps 23Any style parameters that accept a map path accept both simple maps
39=head2 Style Parameters 38=head2 Style Parameters
40 39
41 layoutstyle <style> (special!) Pick the layout style for the map. 40 layoutstyle <style> (special!) Pick the layout style for the map.
42 Currently, "rogue", "spiral", "maze", "cave", 41 Currently, "rogue", "spiral", "maze", "cave",
43 "castle", "snake", "onion", "squarespiral" and 42 "castle", "snake", "onion", "squarespiral" and
44 "multiple" are allowed. See below for more 43 "multiple" are allowed. See below for more
45 detail. 44 detail.
46 45
47 floorstyle <style> Load /styles/floorstyles/<style> and pick a random 46 floorstyle <style> Load /styles/floorstyles/<style> and pick a random
48 floortype from that style map for the random map. 47 floortype from that style map for the random map.
49 The entire map will be tiled with the floortype. 48 The entire map will be tiled with the floortype.
50 49
51 wallstyle <style> Load /styles/wallstyles/<style> and pick a random 50 wallstyle <style> Load /styles/wallstyles/<style> and pick a random
52 walltype from that style for the random map. All 51 walltype from that style for the random map. All
53 the walls in the map will be of this type. The 52 the walls in the map will be of this type. The
54 walls are modified on insertion so that players 53 walls are modified on insertion so that players
55 cannot go through them: this is expected for 54 cannot go through them: this is expected for
56 walls, but the random map generator makes sure of 55 walls, but the random map generator makes sure of
57 it. A <style> of "none" causes no walls or doors 56 it. A <style> of "none" causes no walls or doors
58 to be generated. 57 to be generated.
67 leading to another, harder, random map. A style of 66 leading to another, harder, random map. A style of
68 "none" causes no exits to be generated. 67 "none" causes no exits to be generated.
69 68
70 decorstyle <style> Load /styles/decorstyles/<style> and pick the 69 decorstyle <style> Load /styles/decorstyles/<style> and pick the
71 decor objects from that style to insert in the 70 decor objects from that style to insert in the
72 map. Decor objects are modified on insertion so 71 map. Decor objects are modified on insertion so
73 that they do NOT block movement, regardless of the 72 that they do NOT block movement, regardless of the
74 archetype. They are placed randomly. A style of 73 archetype. They are placed randomly. A style of
75 "none" causes no decor objects to be generated. 74 "none" causes no decor objects to be generated.
76 75
77 monsterstyle <style> Load /styles/monsterstyles/<style>, if it exists. 76 monsterstyle <style> Load /styles/monsterstyles/<style>, if it exists.
78 If it doesn't exist, then it will look for a directory 77 If it doesn't exist, then it will look for a directory
79 of that name. If it finds a directory, it will choose 78 of that name. If it finds a directory, it will choose
80 a style based on dungeon_level. It will pick the style 79 a style based on dungeon_level. It will pick the style
81 with the name <name>_# with the # closest to the 80 with the name <name>_# with the # closest to the
82 dungeon_level. Monster objects are copied from the 81 dungeon_level. Monster objects are copied from the
83 style map, so you may form style maps with modified 82 style map, so you may form style maps with modified
84 monsters which are weaker or stronger than the default 83 monsters which are weaker or stronger than the default
85 archetype.A style of "none" causes no monsters to be 84 archetype.A style of "none" causes no monsters to be
86 generated. 85 generated.
87 86
88 treasurestyle <style> (Special) If the style name chosen is contained 87 treasurestyle <style> (Special) If the style name chosen is contained
89 in the lib/treasures file, it will use 88 in the lib/treasures file, it will use
90 that for making treasures. If it is NOT 89 that for making treasures. If it is NOT
91 in the lib/treasures file, it will look up 90 in the lib/treasures file, it will look up
92 /styles/treasurestyle/<style>, and pick random 91 /styles/treasurestyle/<style>, and pick random
93 treasures from there. If <style> matches neither 92 treasures from there. If <style> matches neither
94 of these, it will generate treasures using the 93 of these, it will generate treasures using the
95 "chest" treasurelist. A style of "none" causes no 94 "chest" treasurelist. A style of "none" causes no
96 treasures to be placed. 95 treasures to be placed.
97 96
98=head2 Layout Parameters 97=head2 Layout Parameters
99 98
100 99
101 xsize <int> size of the map: if not set, random from 10 to 70 100 xsize <int> size of the map: if not set, random from 10 to 70
102 101
103 102
104 ysize <int> size of the map: if not set, random from 10 to 70 103 ysize <int> size of the map: if not set, random from 10 to 70
105 104
106 105
107 expand2x <bool> Do we double the size of the layout? This has 106 expand2x <bool> Do we double the size of the layout? This has
108 the effect of increasing the corridor widths by about 107 the effect of increasing the corridor widths by about
109 2x. Set it to a non-zero integer if this is desired. 108 2x. Set it to a non-zero integer if this is desired.
110 109
111 110
112 symmetry <sym> symmetry of the layout: You can cause the map generator 111 symmetry <sym> symmetry of the layout: You can cause the map generator
113 to generate a symmetrical layout by using this flag. 112 to generate a symmetrical layout by using this flag.
114 symmetry 0 random symmetry 113 symmetry 0 random symmetry
115 symmetry 1 no symmetry 114 symmetry 1 no symmetry
116 symmetry 2 symmetry about the vertical centerline 115 symmetry 2 symmetry about the vertical centerline
117 symmetry 3 symmetry about the horizontal centerline 116 symmetry 3 symmetry about the horizontal centerline
118 symmetry 4 both 2 and 3 symmetry 117 symmetry 4 both 2 and 3 symmetry
119 118
120 119
121 Layout Style: Parameter: Effect: 120 Layout Style: Parameter: Effect:
122 121
123 122
124 maze maze_type 0: roomy (open space with some walls) 123 maze maze_type 0: roomy (open space with some walls)
125 1: sparse (maze with some larger open spaces) 124 1: sparse (maze with some larger open spaces)
126 2: braided (few dead ends) 125 2: braided (few dead ends)
127 3: closed (complete maze) 126 3: closed (complete maze)
128 default: random 127 default: random
129 128
130 cave cave_type 0: very rough, mazelike 129 cave cave_type 0: very rough, mazelike
131 1: round 1-2 space corridors, often elliptic 130 1: round 1-2 space corridors, often elliptic
132 2: more open, roundish 131 2: more open, roundish
133 3: wide open areas, roundish 132 3: wide open areas, roundish
134 133
135 50% of the time a maze layout will be "doorified", meaning that doors 134 50% of the time a maze layout will be "doorified", meaning that doors
136 will be placed at random in the maze. 135 will be placed at random in the maze.
137 136
138 onion layoutoptions1 0 (default) Pick random options 137 onion layoutoptions1 0 (default) Pick random options
139 See "Onion Rooms" below for 138 See "Onion Rooms" below for
140 the rest of the options. 139 the rest of the options.
141 140
142 onion layoutoptions2 0 (default) Pick a random number of 141 onion layoutoptions2 0 (default) Pick a random number of
143 "onion layers" 142 "onion layers"
144 143
145=head2 Map generation parameters 144=head2 Map generation parameters
146 145
147 146
148 difficulty Set the map difficulty. Has no relation to the 147 difficulty Set the map difficulty. Has no relation to the
149 "difficulty" defined in common/*.c. 148 "difficulty" defined in common/*.c.
150 If nonzero, this map and its descendants will 149 If nonzero, this map and its descendants will
151 have the same difficulty. If zero, it'll be set 150 have the same difficulty. If zero, it'll be set
152 to the value of dungeon_level and incremeneted with 151 to the value of dungeon_level and incremeneted with
153 each recursive map. 152 each recursive map.
154 153
155 difficulty_increase Sets how fast the difficulty increases. This value 154 difficulty_increase Sets how fast the difficulty increases. This value
156 is a float - the default value is 1.0. Reducing 155 is a float - the default value is 1.0. Reducing
157 This only applies to map without a default 156 This only applies to map without a default
158 difficulty set (but that could change in the 157 difficulty set (but that could change in the
159 future). For each level of a map, the difficulty 158 future). For each level of a map, the difficulty
160 is set to depth * difficulty_increase. Setting 159 is set to depth * difficulty_increase. Setting
161 this parameter to 0.5 (or other values between 0 160 this parameter to 0.5 (or other values between 0
162 and 1) is a way to have deep dungeons that do not 161 and 1) is a way to have deep dungeons that do not
163 increase in difficulty all that rapidly. 162 increase in difficulty all that rapidly.
164 163
165 164
166 dungeon_level Another way of setting the map difficulty. This 165 dungeon_level Another way of setting the map difficulty. This
167 has no relation to the "difficulty" defined in 166 has no relation to the "difficulty" defined in
168 the common/*.c source code. The effect is to pick 167 the common/*.c source code. The effect is to pick
169 which monsters to use: for example, if the 168 which monsters to use: for example, if the
170 monsterstyle 169 monsterstyle
171 is "humanoid" and the dungeonlevel is 9, the style 170 is "humanoid" and the dungeonlevel is 9, the style
172 map /styles/monsterstyles/humanoid/humanoid_9 will be 171 map /styles/monsterstyles/humanoid/humanoid_9 will be
173 the style from which monsters are chosen. After the 172 the style from which monsters are chosen. After the
174 monsters are placed, the map 173 monsters are placed, the map
175 difficulty is set according 174 difficulty is set according
176 to the server's rule, for treasure purposes. 175 to the server's rule, for treasure purposes.
177 176
178 dungeon_depth The map generated will have an exit to another 177 dungeon_depth The map generated will have an exit to another
179 random map of the same style if 178 random map of the same style if
180 dungeon_level < dungeon_depth. The next random map 179 dungeon_level < dungeon_depth. The next random map
181 will have dungeon_level incremented. If dungeon_level 180 will have dungeon_level incremented. If dungeon_level
182 >= dungeon_depth, no exit to a more difficult map 181 >= dungeon_depth, no exit to a more difficult map
183 will be made. 182 will be made.
184 183
185 orientation How the exits look: 184 orientation How the exits look:
186 0 random "orientation" 185 0 random "orientation"
187 1 player arrives in the map at 186 1 player arrives in the map at
188 a "stairs up", he goes to harder 187 a "stairs up", he goes to harder
189 levels by finding a "stairs down" 188 levels by finding a "stairs down"
190 2 reverse of 1 189 2 reverse of 1
191 3-6 exits are horizontal. In the future 190 3-6 exits are horizontal. In the future
192 these will be made to make exits to 191 these will be made to make exits to
193 rightward, leftward, north and south. 192 rightward, leftward, north and south.
194 193
195 rotate 0 do not randomly rotate the map 194 rotate 0 do not randomly rotate the map
196 1 randomly rotate by 90, 180, 270° (default) 195 1 randomly rotate by 90, 180, 270° (default)
197 196
198 origin_x <You shouldn't need to set this> The exit which 197 origin_x <You shouldn't need to set this> The exit which
199 leads back from this map will go to this x. 198 leads back from this map will go to this x.
200 199
201 origin_y Like origin_x 200 origin_y Like origin_x
202 201
203 random_seed Set the random seed number used. This number 202 random_seed Set the random seed number used. This number
204 completely determines the random numbers: a map 203 completely determines the random numbers: a map
205 with the same random seed and other parameters 204 with the same random seed and other parameters
206 will always produce exactly the same map. 205 will always produce exactly the same map.
207 206
208 final_map When dungeon_level >= dungeon_depth, another exit 207 final_map When dungeon_level >= dungeon_depth, another exit
209 isn't usually made. However, if final_map is set 208 isn't usually made. However, if final_map is set
210 to a map's name, then an exit to this map will 209 to a map's name, then an exit to this map will
211 be made. 210 be made.
212 211
213 exit_on_final_map The default action is to place an exit on 212 exit_on_final_map The default action is to place an exit on
214 the final map. When explicitly set to 'no' this will 213 the final map. When explicitly set to 'no' this will
215 not place a return exit on the final_map. 214 not place a return exit on the final_map.
216 If you use this setting YOU MUST PROVIDE A WAY BACK IN THE FINAL MAP! 215 If you use this setting YOU MUST PROVIDE A WAY BACK IN THE FINAL MAP!
217 216
218=head2 Misc. Parameters 217=head2 Misc. Parameters
219 218
220 decoroptions <option> Currently, ignored. Possibly in the future it 219 decoroptions <option> Currently, ignored. Possibly in the future it
221 will cause the decor to be patterned in some way, 220 will cause the decor to be patterned in some way,
222 such as <put decor along walls> or <put decor 221 such as <put decor along walls> or <put decor
223 in center of rooms> 222 in center of rooms>
224 223
225 224
226 treasureoptions <opt> Parameterizes how the treasure is placed and protected. 225 treasureoptions <opt> Parameterizes how the treasure is placed and protected.
227 0 choose random treasure options 226 0 choose random treasure options
228 1 concentrate the treasure on the map in a few locations 227 1 concentrate the treasure on the map in a few locations
229 2 hide the treasure behind hidden doors 228 2 hide the treasure behind hidden doors
230 4 put the treasure in a chest which must be unlocked. 229 4 put the treasure in a chest which must be unlocked.
231 (a key will be placed somewhere in the map, probably 230 (a key will be placed somewhere in the map, probably
232 in a monster.) 231 in a monster.)
233 8 Put locked doors around the treasure (a key to each 232 8 Put locked doors around the treasure (a key to each
234 door will be placed in a monster or somewhere reachable 233 door will be placed in a monster or somewhere reachable
235 by the player: one key on each side of the door.) 234 by the player: one key on each side of the door.)
236 In onion maps, the treasure is co-located with the 235 In onion maps, the treasure is co-located with the
237 exit to harder levels, so this makes the exit harder 236 exit to harder levels, so this makes the exit harder
238 to get to. 237 to get to.
239 16 Trap the treasure. A trap from /styles/trapstyles/traps 238 16 Trap the treasure. A trap from /styles/trapstyles/traps
240 is selected and inserted into the treasure chest. 239 is selected and inserted into the treasure chest.
241 32 sparse treasure. 1/2 as much treasure is generated. 240 32 sparse treasure. 1/2 as much treasure is generated.
242 64 rich treasure. 2x as much treasure is generated. 241 64 rich treasure. 2x as much treasure is generated.
243 242
244 If option 1 is not set, options 2-16 are ignored. Options 243 If option 1 is not set, options 2-16 are ignored. Options
245 may be added together: treasureoptions 3 means treasure 244 may be added together: treasureoptions 3 means treasure
246 optons 1 and 2 are set. 245 optons 1 and 2 are set.
247 246
248=head2 Map Layout styles 247=head2 Map Layout styles
249 248
250=head3 Onion Maps 249=head3 Onion Maps
251 250
252Onion rooms are like this: 251Onion rooms are like this:
253 252
254 regular random 253 regular random
255 centered, linear onion: bottom/right centered, nonlinear: 254 centered, linear onion: bottom/right centered, nonlinear:
256 255
257 ######################### ######################### 256 ######################### #########################
258 # # # # 257 # # # #
259 # ######## ########## # # ##################### 258 # ######## ########## # # #####################
269 # #################### # # # # # # 268 # #################### # # # # # #
270 # # # # # # # # 269 # # # # # # # #
271 ######################### ######################### 270 ######################### #########################
272 271
273 options: 272 options:
274 0 Pick random options below 273 0 Pick random options below
275 1 "centered" 274 1 "centered"
276 2 linear doors (default is nonlinear) 275 2 linear doors (default is nonlinear)
277 4 bottom "centered" 276 4 bottom "centered"
278 8 bottom-right centered 277 8 bottom-right centered
279 16 outer wall off: i.e., no outer wall. 278 16 outer wall off: i.e., no outer wall.
280 32 irregularly/randomly spaced layers (default: regular) 279 32 irregularly/randomly spaced layers (default: regular)
281 280
282=head3 Maze Maps 281=head3 Maze Maps
283 282
284Maze maps are like this: 283Maze maps are like this:
285 284
621 ########################### 620 ###########################
622 621
623 layoutoptions1: 622 layoutoptions1:
624 623
625 0 pick random options 624 0 pick random options
626 1 Regular spiral: distance increases constantly with angle 625 1 Regular spiral: distance increases constantly with angle
627 2 Fine spiral: most coils possible are fit in 626 2 Fine spiral: most coils possible are fit in
628 4 Fit Spiral: scale spiral to fit rectanglar region 627 4 Fit Spiral: scale spiral to fit rectanglar region
629 (i.e., the spiral will look elliptical) 628 (i.e., the spiral will look elliptical)
630 629
631=head3 Rogue-like Maps 630=head3 Rogue-like Maps
632 631
633A Rogue-like Map: 632A Rogue-like Map:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines