View Single Post
Old November 10, 2011, 16:34   #4
Nomad
Knight
 
Nomad's Avatar
 
Join Date: Sep 2010
Location: England
Posts: 958
Nomad is on a distinguished road
Quote:
Originally Posted by kaypy View Post
Can you make exterior doors use the usual system? Maybe mark appropriate edges as "suitable for external connections" and letting the normal corridor generator do its stuff?
That's what I've done - I used the same exterior wall symbol as the vault code, and the generator seems to hook up pretty happily, usually with corridors, occasionally with doors. For instance, loading from this template:

Code:
D:###############
D:%.............#
D:%.............#
D:##########...##
D:     ###...### 
D:   ###...###   
D: ###...###     
D:##...##########
D:#.............%
D:#.............%
D:###############
Got this result:

Code:

                                                                                
High-Elf      #                                                                 
Lord          #                                                                 
Warrior       #                                                                 
LEVEL     50  #                                                                 
Exp 72383137  #                                                                 
AU   1001986  #                                                                 
\}=="~[ )     #                                                                 
Str!  18/130 :#                                                                 
Int!  18/100  #                %###%%#%%%##########                             
Wis!   18/20  #########%%%##   #            ..]...#                             
Dex!  18/140               %   # %%#%        .....#                             
CON!  18/130 ##########%##$%#### #  #%########@..##                             
CHR!  18/140 ..#         %       %       ###...###                              
             ..#         #######%%     ###...###                                
Cur AC    60 ..#                     ###.].###                                  
HP  876/ 876 ..#                    ##...#############                          
             ###                    #.............'..#                          
                                    #.............##.#                          
                                    ################.#                          
             ###            %##########            #.#                          
             ..#            %.........#            #.#    ###                   
             #.#########   %#.........##############'###### #                   
2050' (L41)                                                                     
I don't really understand how the corridor generator works, and fear to poke it, but it seems to do its best to connect to one of the allowed squares, occasionally giving up and breaking a different wall if it really can't. (The fix would probably be to make every templated room a moated room, but that's a bit dull and limits the possible room size, so I've decided to consider occasional strange corridor placement more feature than bug. Hey, it adds variety.)

Quote:
Originally Posted by kaypy View Post
It might help add variety to have a "stretch this room by copying the previous row/column" mechanism.
That's a neat idea, but I'm not sure it would be workable with how the code translates text files into rooms. It starts with fixed dimensions specified in the edit file, defines that as a room, and then steps through individual squares one by one, so doubling on rows or columns would probably introduce more complexity than it's worth. (Plus the max sizes for rooms are defined by dungeon blocks to try and avoid parts of them being off-screen, so stretching them beyond the current 11x33 maximum could create issues.)

One wild idea I did have, though, is the idea of creating randomised lesser vaults from these room layouts. It probably wouldn't be too hard to give each room a suitability rating (to define whether it should be used as a base for random vaults - open cavern type rooms like the zed room above shouldn't - and decide risk/reward level) and step through the squares adding monsters and a random chance of traps or treasure based on crunching those numbers for existing vaults. Not sure how successful that idea would be, but it might be an interesting thing to try out.
Nomad is offline