New Vaults Layout


Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Monday, 2nd July 2012, 19:45

New Vaults Layout

I have recently been working on a new layout (probably will become layouts) for the Vaults based on the wiki page. However, I have come to an important realization:

The wiki page is not revealed truth. It is just whatever someone (in this case mumra) happened to put there. From this, it follows that not everything it says is necessarily a good idea.

If you have not read the wiki page, especially the "Layout" section, please do before posting ideas here. I am working from that layout instead of the current one.

The guiding principles I am working with (in no particular order) are:
1. The Vaults should be somehow different from D (beyond just always having city layouts)
2. Vaults 8 is an awesome level
3. A branch (in this case Vaults) should have a consistent style of some sort
4. Vaults should have few or no narrow (width 1) hallways
5. I am a very bad judge of what is fun to play, so I shouldn't make too much up myself

The basic idea for my layout is as follows: I want to extend the style of Vaults 8 upwards. Specifically, the layout should have interesting rooms connected by wide, boring hallways. Sometimes, the rooms are connected to each other. The rooms will be filled by subvaults. To avoid subvault shortage/repetitiveness, I will make a few extremely general/randomized subvaults with relatively high weights (e.g. an empty room with a randomly-placed monster or band chosen randomly from the default monster list). As the player gets deeper into the vaults, the there are fewer, bigger rooms. Rooms have specific types and distributed between those type by percentages (not repeatedly picking at random) to ensure the difficulty does not vary too much.

The rooms types are as follows (as per the wiki):
1. Solid: The room is filled in. Effectively there is no room here.
2. Empty: There is nothing or stylistic features only here. There might be some weak monster or poor loot.
3. Monsters: This should be self-explanatory. There may be poor loot.
4. Hard Monsters: These are tougher than normal monsters. They also have better loot.
5. Loot: There would be no or weak monsters with decent loot here. These would be rare, of course.
6. Entry: These contain the stairs up. There may be monsters, but little or no loot.
7. Exit: These contain the stairs down. There may be monsters, but little or no loot.

Some questions I have come up:
1. Usefulness: Is there some reason why the whole project is pointless? For example, if there has been a general decision to remove the Vaults. Or if someone else has already made a better layout generator. Or something. I know this is unlikely, but if there is a good reason not to do this, it is better to find out now than when I finish.
2. Secret doors: The wiki wants many rooms to be accessible only be secret door to reward training the T&D skill. However, elsewhere, the wiki says secret doors should only be used where 1) there is a good reason and 2) they are not spoilery. Assuming that at least one exit room (stairs down) is not behind a secret door, should other rooms be hidden? If so, should hidden rooms be balanced more towards some room type (e.g. loot)?
3. Rooms only accessible through cTele: Do we want these? Should rTele get you it? I would guess that each of these would have to have an escape hatch, teleport trap, or shaft. Is there some other way to get trapped players out? Escape hatches and shafts could send a player into such a room. Is that a problem? Could teleport traps?
4. Rooms accessible only be stairs: Obviously, there has to be at least one stairs connected to the level proper. However, the wiki says suggests that having rooms accessible only by stairs is desired. There could be at most 4 of these. Is this a good idea? If so, which stairs are preferred: Up or down? It probably isn't a good idea to connect rooms to both, or there is a danger of creating a disconnected portion of the level. Or worse, disconnecting the bottom of the branch from the top. Is that bad? Does anyone know how (and if) Orc avoids this?
5. Closets (1x1): Currently, these sometimes generate on the first 3 (I think) floors (probability decreases with depth). There is very little chance for randomization in these. Also, they don't seem too vault-like. On the other hand, if seen from outside, these are 3x3 and help fill the gap to the next size of room. Do I want these on all map types? Or possibly just on city-like levels (see below)? Or not at all?
6. Hallway monsters: Should monsters spawn in hallways as normal? Or only special ones (the wiki suggests yaktaur bands)? Or none? Should random monsters spawn in hallways?
7. Mumra's thoughts: Apparently mumra has more thought on layouts for the Vaults. If you are mumra, what are these?

The layout styles I was thinking of are:
1. Square Ring (wiki): This is a hallway in the shape of a square with rooms on either side. The rooms may vary in size.
2. Walkways (wiki): A main hallway with side branches with rooms off the side branches The rooms may vary in size, although the ones bordering the main passage will have to be the biggest in the row (otherwise, some others may overlap).
3. Grid Maze (wiki): A grid of rooms connected in a maze with exactly one path between each pair of rooms. This may use the Scarab of Ra algorithm. The rooms must all be the same size in order to allow them to connect.
4. Vault Cross: A hallway in the shape of a cross with rooms on the sides. The rooms may vary in size, the the corner ones must be the biggest.
5. Vault City: Rooms in a grid with hallways between them. All rooms are the same size and completely surrounded with hallway.
6. Chaotic Vault City: Rooms places randomly in a big open room. There would be guaranteed hallways (of a minimum size increasing with depth) between them. The rooms would vary in size.

As of yet, I only have the square ring layout programmed, and that has not yet been ported to LUA (I find it easier to design things outside of DCSS and add then in after they work. DCSS has way too much going on and LUA debugging is abysmal for complex code: You basically get a "This code has an error" message and a line number for the end of the file when DCSS starts). A sample (actually 7 samples, one for each level) of what I am generating now appears below. The subvaults are not yet filled in. Also, the characters have been chosen for easy-to-understand-without-colour-ness, not Crawl-compliance.

Key (BBcode doesn't allow inline fixed width for some reason):
# wall
_ hallway
. empty room
o monsters
O hard monsters
% loot
< entry room with 1 up stairs
[ entry room with 3 up stairs
> exit room with 1 down stairs
] exit room with 3 down stairs

  Code:
Depth 1
######################################################################
#########%%%%%%%#ooooooo#OOOOOOO#ooooooo#.......######################
#########%%%%%%%#ooooooo#OOOOOOO#ooooooo#.......######################
#########%%%%%%%#ooooooo#OOOOOOO#ooooooo#.......######################
#########%%%%%%%#ooooooo#OOOOOOO#ooooooo#.......######################
#########%%%%%%%#ooooooo#OOOOOOO#ooooooo#.......######################
#########%%%%%%%#ooooooo#OOOOOOO#ooooooo#.......######################
#########%%%%%%%#ooooooo#OOOOOOO#ooooooo#.......######################
###########%%%#############OOO#####ooo#####...########################
#########_______________________________________#<<<<<<<##############
#########_______________________________________#<<<<<<<##############
#########_______________________________________<<<<<<<<##############
#########___###ooo#####################...###___<<<<<<<<##############
#########___#ooooooo#################.......#___<<<<<<<<##############
#########___#ooooooo#################.......#___#<<<<<<<##############
#########___oooooooo#################........___#<<<<<<<##############
#########___oooooooo#################........___######################
#.......#___oooooooo#################........___#>>>>>>>##############
#.......#___#ooooooo#################.......#___#>>>>>>>##############
#........___#ooooooo#################.......#___#>>>>>>>##############
#........___###...###########################___#>>>>>>>##############
#........___#.......#################<<<<<<<#___#>>>>>>>##############
#.......#___#.......#################<<<<<<<#___#>>>>>>>##############
#.......#___#.......#################<<<<<<<<___#>>>>>>>##############
#########___#.......#################<<<<<<<<___######################
#>>>>>>>#___#.......#################<<<<<<<<___#.......##############
#>>>>>>>#___#.......#################<<<<<<<#___#.......##############
#>>>>>>>#___#.......#################<<<<<<<#___........##############
#>>>>>>>#___#################################___........##############
#>>>>>>>#___#################################___........##############
#>>>>>>>#___#################################___#.......##############
#>>>>>>>#___#################################___#.......##############
#########___#################################___###%%%################
#.......#___#################################___#%%%%%%%##############
#.......#___#################################___#%%%%%%%##############
#........___#################################___#%%%%%%%##############
#........___#################################___#%%%%%%%##############
#........___#<<<<<<<#ooooooo#########OOOOOOO#___#%%%%%%%##############
#.......#___#<<<<<<<#ooooooo#########OOOOOOO#___#%%%%%%%##############
#.......#___<<<<<<<<#ooooooo#########OOOOOOOO___#%%%%%%%##############
#########___<<<<<<<<#ooooooo#########OOOOOOOO___######################
#ooooooo#___<<<<<<<<#ooooooo#########OOOOOOOO___#.......##############
#ooooooo#___#<<<<<<<#ooooooo#########OOOOOOO#___#.......##############
#oooooooo___#<<<<<<<#ooooooo#########OOOOOOO#___........##############
#oooooooo___###<<<#####ooo#############OOO###___........##############
#oooooooo_______________________________________........##############
#ooooooo#_______________________________________#.......##############
#ooooooo#_______________________________________#.......##############
###########################...#############>>>########################
#########################.......#########>>>>>>>######################
#########################.......#########>>>>>>>######################
#########################.......#########>>>>>>>######################
#########################.......#########>>>>>>>######################
#########################.......#########>>>>>>>######################
#########################.......#########>>>>>>>######################
#########################.......#########>>>>>>>######################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################

Depth 2
######################################################################
############################################.......###################
############################################.......###################
############################################.......###################
#########oooo######....###oooo##############.......#oooo##############
#########oooo######....###oooo##############.......#oooo##############
#########oooo######....###oooo##############.......#oooo##############
#########oooo######....###oooo##############.......#oooo##############
##########oo########..#####oo#################...####oo###############
#<<<<<<<#_______________________________________________##############
#<<<<<<<#_______________________________________________##############
#<<<<<<<#_______________________________________________##############
#<<<<<<<#___###...####..###OO##.###############ooo###___##############
#<<<<<<<#___#.......#....#OOOO#.###>>>>######ooooooo#___##############
#<<<<<<<#___#.......#....#OOOO#####>>>>######ooooooo#___##############
#<<<<<<<#___........#....#OOOO#####>>>>######oooooooo___##############
#########___........#....#OOOO#####>>>>######oooooooo___##############
####oooo#___........#########################oooooooo___##############
####ooooo___#.......#########################ooooooo#___##############
####ooooo___#.......#########################ooooooo#___##############
####oooo#___#########################################___##############
#########___#######################################..___##############
####>>>>#___#########################################___##############
####>>>>#___####################################>>>>#___##############
####>>>>#___####################################>>>>>___##############
####>>>>#___####################################>>>>>___##############
#####OO##___####################################>>>>#___##############
####OOOO#___#########################################___##############
####OOOO#___#########################################___##############
####OOOO#___#########################################___##############
####OOOO#___#########################################___##############
#####OO##___#%%%%####################################___##############
####OOOO#___%%%%%####################################___#<<<<#########
####OOOO#___%%%%%###############################....#___<<<<<#########
####OOOO#___#%%%%###############################.....___<<<<<#########
####OOOO#___####################################.....___#<<<<#########
#########___####################################....#___##############
#########___#########################################___#.......######
#########___oo#######################################___#.......######
#########___#########################################___........######
#########___#%%%%###############################<<<<#___........######
#########___#%%%%###############################<<<<#___........######
####....#___#%%%%###############################<<<<#___#.......######
####.....___#%%%%###############################<<<<#___#.......######
####.....___#########################################___##############
####....#___#ooooooo#########################.......#___oo############
#########___#ooooooo#########################.......#___##############
#########___oooooooo#########################........___#oooo#########
#########___oooooooo#oooo###....########....#........___ooooo#########
#ooooooo#___oooooooo#oooo###....########....#........___ooooo#########
#ooooooo#___#ooooooo#oooo###....########....#.......#___#oooo#########
#oooooooo___#ooooooo#oooo#.#....#.######....#.......#___##oo##########
#oooooooo___###ooo####oo##.##..##.#######..####...###___#oooo#########
#oooooooo_______________________________________________#oooo#########
#ooooooo#_______________________________________________#oooo#########
#ooooooo#_______________________________________________#oooo#########
###########...##################.############..####OOO################
#########.......################.######%%%%#....#OOOOOOO##############
#########.......#######################%%%%%....#OOOOOOO##############
#########.......#######################%%%%%....#OOOOOOO##############
#########.......#######################%%%%#....#OOOOOOO##############
#########.......#################################OOOOOOO##############
#########.......#################################OOOOOOO##############
#########.......#################################OOOOOOO##############
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################

Depth 3
######################################################################
#########.......#########ooooooo#ooooooo#########<<<<<<<##############
#########.......#########ooooooo#ooooooo#########<<<<<<<##############
#########.......#########ooooooo#ooooooo#########<<<<<<<##############
#########.......#########ooooooo#ooooooo#########<<<<<<<##############
#########.......#########ooooooo#ooooooo#########<<<<<<<##############
#########.......#########ooooooo#ooooooo#########<<<<<<<##############
#########.......#########ooooooo#ooooooo#########<<<<<<<##############
###########...#############ooo#####ooo################################
#ooooooo#_______________________________________________#.......######
#ooooooo#_______________________________________________#.......######
#oooooooo_______________________________________________........######
#oooooooo___###<<<#####...#####...###################___........######
#oooooooo___#<<<<<<<#.......#.......#.......#########___........######
#ooooooo#___#<<<<<<<#.......#.......#.......#########___#.......######
#ooooooo#___<<<<<<<<#.......#.......#.......#########___#.......######
#########___<<<<<<<<#.......#.......#.......#########___##############
#########___<<<<<<<<#.......#.......#.......#########___#OOOOOOO######
#########___#<<<<<<<#.......#.......#.......#########___#OOOOOOO######
#########___#<<<<<<<#.......#.......#.......#########___OOOOOOOO######
#########___###################################...###___OOOOOOOO######
#########___#################################.......#___OOOOOOOO######
#########___#################################.......#___#OOOOOOO######
#########___#################################.......#___#OOOOOOO######
#########___#################################.......#___##############
#ooooooo#___#################################.......#___##############
#ooooooo#___#################################.......#___##############
#oooooooo___#################################.......#___##############
#oooooooo___#########################################___##############
#oooooooo___#################################<<<<<<<#___##############
#ooooooo#___#################################<<<<<<<#___##############
#ooooooo#___#################################<<<<<<<#___##############
#########___#################################<<<<<<<#___##############
#########___#################################<<<<<<<#___#.......######
#########___#################################<<<<<<<#___#.......######
#########___#################################<<<<<<<#___........######
#########___#########################################___........######
#########___#ooooooo#########################OOOOOOO#___........######
#########___#ooooooo#########################OOOOOOO#___#.......######
#########___oooooooo#########################OOOOOOOO___#.......######
#########___oooooooo#########################OOOOOOOO___##############
#########___oooooooo#########################OOOOOOOO___##############
#########___#ooooooo#########################OOOOOOO#___##############
#########___#ooooooo#########################OOOOOOO#___##############
#########___#########################################___##############
#########___#%%%%%%%#OOOOOOO#%%%%%%%#]]]]]]]#.......#___##############
#########___#%%%%%%%#OOOOOOO#%%%%%%%#]]]]]]]#.......#___##############
#########___%%%%%%%%#OOOOOOO#%%%%%%%#]]]]]]]#........___##############
#########___%%%%%%%%#OOOOOOO#%%%%%%%#]]]]]]]#........___##############
#########___%%%%%%%%#OOOOOOO#%%%%%%%#]]]]]]]#........___#.......######
#########___#%%%%%%%#OOOOOOO#%%%%%%%#]]]]]]]#.......#___#.......######
#########___#%%%%%%%#OOOOOOO#%%%%%%%#]]]]]]]#.......#___........######
#########___###%%%#####OOO#####%%%#####]]]#####...###___........######
#########_______________________________________________........######
#########_______________________________________________#.......######
#########_______________________________________________#.......######
###########...#####################ooo#####ooo########################
#########.......#########.......#ooooooo#ooooooo######################
#########.......#########.......#ooooooo#ooooooo######################
#########.......#########.......#ooooooo#ooooooo######################
#########.......#########.......#ooooooo#ooooooo######################
#########.......#########.......#ooooooo#ooooooo######################
#########.......#########.......#ooooooo#ooooooo######################
#########.......#########.......#ooooooo#ooooooo######################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################

Depth 4
######################################################################
#############################################%%%%%%%%%%###############
#############################################%%%%%%%%%%###############
#############################################%%%%%%%%%%###############
############################.......##########%%%%%%%%%%###############
############################.......##########%%%%%%%%%%###############
############################.......##########%%%%%%%%%%###############
############################.......##########%%%%%%%%%%###############
############################.......##########%%%%%%%%%%###############
############################.......##########%%%%%%%%%%###############
############################.......##########%%%%%%%%%%###############
##############################...##############%%%%%%#################
####ooooooo#___________________________________________###############
####ooooooo#___________________________________________###############
####oooooooo___________________________________________###############
####oooooooo___________________________________________###############
####oooooooo___________________________________________###############
####ooooooo#_____###...#####################<<<###_____###############
####ooooooo#_____#.......#ooooooo#ooooooo#<<<<<<<#_____###############
############_____#.......#ooooooo#ooooooo#<<<<<<<#_____###############
####<<<<<<<#_____........#ooooooo#oooooooo<<<<<<<<_____###############
####<<<<<<<#_____........#ooooooo#oooooooo<<<<<<<<_____###############
####<<<<<<<#_____........#ooooooo#oooooooo<<<<<<<<_____###############
####<<<<<<<#_____#.......#ooooooo#ooooooo#<<<<<<<#_____###############
####<<<<<<<#_____#.......#ooooooo#ooooooo#<<<<<<<#_____###############
####<<<<<<<#_____###%%%###########################_____###############
####<<<<<<<#_____#%%%%%%%#########################_____###############
############_____#%%%%%%%#########################_____###############
#..........#_____#%%%%%%%#########################_____###############
#..........#_____#%%%%%%%#########################_____###############
#..........._____#%%%%%%%#########################_____###############
#..........._____#%%%%%%%#########################_____#<<<<<<<#######
#..........._____#%%%%%%%#########################_____#<<<<<<<#######
#..........._____###ooo###########################_____#<<<<<<<#######
#..........._____#ooooooo#################OOOOOOO#_____#<<<<<<<#######
#..........._____#ooooooo#################OOOOOOO#_____#<<<<<<<#######
#..........#_____#ooooooo#################OOOOOOOO_____#<<<<<<<#######
#..........#_____#ooooooo#################OOOOOOOO_____#<<<<<<<#######
############_____#ooooooo#################OOOOOOOO_____###############
############_____#ooooooo#################OOOOOOO#_____#.......#######
############_____#ooooooo#################OOOOOOO#_____#.......#######
############_____#################################_____........#######
############_____#.......#.......#]]]]]]]#ooooooo#_____........#######
############_____#.......#.......#]]]]]]]#ooooooo#_____........#######
############_____........#........]]]]]]]#oooooooo_____#.......#######
############_____........#........]]]]]]]#oooooooo_____#.......#######
############_____........#........]]]]]]]#oooooooo_____###############
####.......#_____#.......#.......#]]]]]]]#ooooooo#_____###############
####.......#_____#.......#.......#]]]]]]]#ooooooo#_____###############
####.......#_____###...#############]]]#####ooo###_____###############
####.......#___________________________________________###############
####.......#___________________________________________###############
####.......#___________________________________________###############
####.......#___________________________________________###############
############___________________________________________###############
##########################OOO#############ooo#####...#################
########################OOOOOOO#########ooooooo#.......###############
########################OOOOOOO#########ooooooo#.......###############
########################OOOOOOO#########ooooooo#.......###############
########################OOOOOOO#########ooooooo#.......###############
########################OOOOOOO#########ooooooo#.......###############
########################OOOOOOO#########ooooooo#.......###############
########################OOOOOOO#########ooooooo#.......###############
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################

Depth 5
######################################################################
#########.......##############.......#########>>>>>>>#################
#########.......##############.......#########>>>>>>>#################
#########.......##############.......#########>>>>>>>#################
#########.......#########OOOO#.......#########>>>>>>>#################
#########.......#########OOOO#.......#########>>>>>>>#################
#########.......#########OOOO#.......#########>>>>>>>#################
#########.......#########OOOO#.......#########>>>>>>>#################
###########...############OO####...#############>>>###################
#########____________________________________________#%%%%############
#########____________________________________________%%%%%############
#########____________________________________________%%%%%############
#########___###OOO####oo####%%%#############ooo###___#%%%%############
#########___#OOOOOOO#oooo#%%%%%%%#ooooooo#ooooooo#___#################
#[[[[[[[#___#OOOOOOO#oooo#%%%%%%%#ooooooo#ooooooo#___#################
#[[[[[[[#___OOOOOOOO#oooo#%%%%%%%#oooooooooooooooo___#################
#[[[[[[[[___OOOOOOOO#oooo#%%%%%%%#oooooooooooooooo___#################
#[[[[[[[[___OOOOOOOO######%%%%%%%#oooooooooooooooo___#################
#[[[[[[[[___#OOOOOOO######%%%%%%%#ooooooo#ooooooo#___#################
#[[[[[[[#___#OOOOOOO######%%%%%%%#ooooooo#ooooooo#___#################
#[[[[[[[#___######################################___#################
#########___#.......##############################___#################
#OOOOOOO#___#.......##############################___#ooooooo#########
#OOOOOOO#___........##############################___#ooooooo#########
#OOOOOOO#___........##############################___oooooooo#########
#OOOOOOO#___........##############################___oooooooo#########
#OOOOOOO#___#.......##############################___oooooooo#########
#OOOOOOO#___#.......##############################___#ooooooo#########
#OOOOOOO#___######################################___#ooooooo#########
###OOO###___#....#################################___#################
#>>>>>>>#___.....#################################___#ooooooo#########
#>>>>>>>#___.....#################################___#ooooooo#########
#>>>>>>>#___#....#################################___oooooooo#########
#>>>>>>>#___######################################___oooooooo#########
#>>>>>>>#___#.......######################.......#___oooooooo#########
#>>>>>>>#___#.......######################.......#___#ooooooo#########
#>>>>>>>#___........######################........___#ooooooo#########
#########___........######################........___#################
#########___........######################........___#################
#########___#.......######################.......#___#################
#########___#.......######################.......#___#################
#########___######################################___#################
#########___##############.......#.......#.......#___#################
#########___##############.......#.......#.......#___#################
#########___##############...............#........___#################
#########___#########....#...............#........___#################
#########___#########....#...............#........___#################
#########___#########....#.......#.......#.......#___#################
#########___#########....#.......#.......#.......#___#################
#########___##########..############...#####...###___#################
#########____________________________________________#################
#########____________________________________________#################
#########____________________________________________#################
###########ooo#####...##################ooo#####>>>###################
#########ooooooo#.......##############ooooooo#>>>>>>>#################
#########ooooooo#.......##############ooooooo#>>>>>>>#################
#########ooooooo#.......##############ooooooo#>>>>>>>#################
#########ooooooo#.......##############ooooooo#>>>>>>>#################
#########ooooooo#.......##############ooooooo#>>>>>>>#################
#########ooooooo#.......##############ooooooo#>>>>>>>#################
#########ooooooo#.......##############ooooooo#>>>>>>>#################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################

Depth 6
######################################################################
############################%%%%%%%%%%%%%%%###########################
############################%%%%%%%%%%%%%%%###########################
############################%%%%%%%%%%%%%%%###########################
############################%%%%%%%%%%%%%%%###########################
############################%%%%%%%%%%%%%%%###########################
#################<<<<<<<<<<#%%%%%%%%%%%%%%%###########################
#################<<<<<<<<<<#%%%%%%%%%%%%%%%###########################
#################<<<<<<<<<<#%%%%%%%%%%%%%%%###########################
#################<<<<<<<<<<#%%%%%%%%%%%%%%%###########################
#################<<<<<<<<<<#%%%%%%%%%%%%%%%###########################
#################<<<<<<<<<<#%%%%%%%%%%%%%%%###########################
#################<<<<<<<<<<#%%%%%%%%%%%%%%%###########################
#################<<<<<<<<<<#%%%%%%%%%%%%%%%###########################
#################<<<<<<<<<<#%%%%%%%%%%%%%%%###########################
#################<<<<<<<<<<#%%%%%%%%%%%%%%%###########################
###################<<<<<<#####%%%%%%%%%%%#############################
######<<<<<<<<<<#___________________________##########################
######<<<<<<<<<<#___________________________#>>>>>>>>>>###############
######<<<<<<<<<<<___________________________#>>>>>>>>>>###############
######<<<<<<<<<<<___________________________>>>>>>>>>>>###############
######<<<<<<<<<<<___________________________>>>>>>>>>>>###############
######<<<<<<<<<<<_____###...###########_____>>>>>>>>>>>###############
######<<<<<<<<<<<_____#.......#########_____>>>>>>>>>>>###############
######<<<<<<<<<<<_____#.......#########_____>>>>>>>>>>>###############
######<<<<<<<<<<#_____........#########_____>>>>>>>>>>>###############
######<<<<<<<<<<#_____........#########_____#>>>>>>>>>>###############
#################_____........#########_____#>>>>>>>>>>###############
#...............#_____#.......#########_____##########################
#...............#_____#.......#########_____#>>>>>>>>>>>>>>>##########
#................_____#################_____#>>>>>>>>>>>>>>>##########
#................_____#>>>>>>>#ooooooo#_____>>>>>>>>>>>>>>>>##########
#................_____#>>>>>>>#ooooooo#_____>>>>>>>>>>>>>>>>##########
#................_____>>>>>>>>#oooooooo_____>>>>>>>>>>>>>>>>##########
#................_____>>>>>>>>#oooooooo_____>>>>>>>>>>>>>>>>##########
#................_____>>>>>>>>#oooooooo_____>>>>>>>>>>>>>>>>##########
#................_____#>>>>>>>#ooooooo#_____>>>>>>>>>>>>>>>>##########
#................_____#>>>>>>>#ooooooo#_____>>>>>>>>>>>>>>>>##########
#................_____###>>>#####ooo###_____>>>>>>>>>>>>>>>>##########
#................___________________________>>>>>>>>>>>>>>>>##########
#................___________________________>>>>>>>>>>>>>>>>##########
#...............#___________________________>>>>>>>>>>>>>>>>##########
#...............#___________________________#>>>>>>>>>>>>>>>##########
#################___________________________#>>>>>>>>>>>>>>>##########
###############################<<<<<<<<<<<############################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
#############################<<<<<<<<<<<<<<<##########################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################

Depth 7
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
#oooooooooo#____________________________________________##############
#oooooooooo#____________________________________________##############
#ooooooooooo____________________________________________##############
#ooooooooooo____________________________________________##############
#ooooooooooo____________________________________________##############
#ooooooooooo_____###OOOOOO################......###_____##############
#ooooooooooo_____#OOOOOOOOOO#..........#..........#_____##############
#ooooooooooo_____#OOOOOOOOOO#..........#..........#_____##############
#oooooooooo#_____OOOOOOOOOOO...........#..........._____##############
#oooooooooo#_____OOOOOOOOOOO...........#..........._____##############
###......###_____OOOOOOOOOOO...........#..........._____##############
#..........#_____OOOOOOOOOOO...........#..........._____##############
#..........#_____OOOOOOOOOOO...........#..........._____#..........###
#..........#_____OOOOOOOOOOO...........#..........._____#..........###
#..........#_____#OOOOOOOOOO#..........#..........#_____#..........###
#..........#_____#OOOOOOOOOO#..........#..........#_____#..........###
#..........#_____#########################oooooo###_____#..........###
#..........#_____#oooooooooo############oooooooooo#_____#..........###
#..........#_____#oooooooooo############oooooooooo#_____#..........###
#..........#_____ooooooooooo############oooooooooo#_____#..........###
#..........#_____ooooooooooo############oooooooooo#_____#..........###
############_____ooooooooooo############oooooooooo#_____#..........###
############_____ooooooooooo############oooooooooo#_____###......#####
############_____ooooooooooo############oooooooooo#_____#oooooooooo###
############_____ooooooooooo############oooooooooo#_____#oooooooooo###
############_____#oooooooooo############oooooooooo#_____ooooooooooo###
############_____#oooooooooo############oooooooooo#_____ooooooooooo###
############_____##################################_____ooooooooooo###
############_____#[[[[[[[[[[#%%%%%%%%%%#..........#_____ooooooooooo###
############_____#[[[[[[[[[[#%%%%%%%%%%#..........#_____ooooooooooo###
############_____[[[[[[[[[[[#%%%%%%%%%%%..........._____ooooooooooo###
############_____[[[[[[[[[[[#%%%%%%%%%%%..........._____#oooooooooo###
############_____[[[[[[[[[[[#%%%%%%%%%%%..........._____#oooooooooo###
############_____[[[[[[[[[[[#%%%%%%%%%%%..........._____##############
############_____[[[[[[[[[[[#%%%%%%%%%%%..........._____#oooooooooo###
############_____[[[[[[[[[[[#%%%%%%%%%%%..........._____#oooooooooo###
############_____#[[[[[[[[[[#%%%%%%%%%%#..........#_____ooooooooooo###
############_____#[[[[[[[[[[#%%%%%%%%%%#..........#_____ooooooooooo###
############_____###[[[[[[################......###_____ooooooooooo###
############____________________________________________ooooooooooo###
############____________________________________________ooooooooooo###
############____________________________________________ooooooooooo###
############____________________________________________#oooooooooo###
############____________________________________________#oooooooooo###
##############......######OOOOOO################]]]]]]################
############..........##OOOOOOOOOO############]]]]]]]]]]##############
############..........##OOOOOOOOOO############]]]]]]]]]]##############
############..........##OOOOOOOOOO############]]]]]]]]]]##############
############..........##OOOOOOOOOO############]]]]]]]]]]##############
############..........##OOOOOOOOOO############]]]]]]]]]]##############
############..........##OOOOOOOOOO############]]]]]]]]]]##############
############..........##OOOOOOOOOO############]]]]]]]]]]##############
############..........##OOOOOOOOOO############]]]]]]]]]]##############
############..........##OOOOOOOOOO############]]]]]]]]]]##############
############..........##OOOOOOOOOO############]]]]]]]]]]##############
######################################################################
######################################################################
######################################################################


Edit: The maps are much easier to see if you copy them into a text editor.
Last edited by infiniplex on Tuesday, 3rd July 2012, 05:18, edited 1 time in total.

For this message the author infiniplex has received thanks:
sgrunt

Vestibule Violator

Posts: 1567

Joined: Friday, 21st January 2011, 22:56

Post Monday, 2nd July 2012, 20:52

Re: New Vaults Layout

It's great to see someone working on this! Your guiding principles seem fine, except maybe the last one. :)

Your layout ideas also all seem interesting, if any feel weird (but are still interesting and fun) they can just be made rare.

One more idea: it could be interesting if rooms sometimes don't have a door (hole in the wall).

I think I can answer your questions, at least the ones that don't require me to be mumra:

infiniplex wrote:1. Usefulness: Is there some reason why the whole project is pointless? For example, if there has been a general decision to remove the Vaults. Or if someone else has already made a better layout generator. Or something. I know this is unlikely, but if there is a good reason not to do this, it is better to find out now than when I finish.

There was some recent discussion, and some of the stuff on that wiki page was quite divisive or people flat out didn't like it. What you are working on seems pretty cool, though. As far as I know there is no consensus on what should be done with vaults, except maybe that it should be shorter and that it currently isn't great except for V:8. Work done on a new layout is probably not wasted. What you are planning seems to be very tunable, so even if they need improvement that shouldn't be a problem.

infiniplex wrote:2. Secret doors: The wiki wants many rooms to be accessible only be secret door to reward training the T&D skill. However, elsewhere, the wiki says secret doors should only be used where 1) there is a good reason and 2) they are not spoilery. Assuming that at least one exit room (stairs down) is not behind a secret door, should other rooms be hidden? If so, should hidden rooms be balanced more towards some room type (e.g. loot)?

There has been a lot of talk about removing secret doors lately. Nothing has happened or been decided so far, but I wouldn't put secret doors everywhere if I was you.

infiniplex wrote:3. Rooms only accessible through cTele: Do we want these? Should rTele get you it? I would guess that each of these would have to have an escape hatch, teleport trap, or shaft. Is there some other way to get trapped players out? Escape hatches and shafts could send a player into such a room. Is that a problem? Could teleport traps?

no_rtele_into prevents most or even all forms of randomly being placed somewhere. Shafts only work once, and teleport traps with unlimited ammo are a bit problematic, so I would go with hatches. Also I don't like the idea of this kind of room in general.

infiniplex wrote:4. Rooms accessible only be stairs: Obviously, there has to be at least one stairs connected to the level proper. However, the wiki says suggests that having rooms accessible only by stairs is desired. There could be at most 4 of these. Is this a good idea? If so, which stairs are preferred: Up or down? It probably isn't a good idea to connect rooms to both, or there is a danger of creating a disconnected portion of the level. Or worse, disconnecting the bottom of the branch from the top. Is that bad? Does anyone know how (and if) Orc avoids this?

Such rooms could do interesting stuff, like an ambush, or some special out of place monster set (like a family of deep dwarves living in a forgotten vault). However, stairdancing would be pretty easy in such a situation. I think they should be pretty rare. Disconnected portions of a level are possible, but connectivity to the branch end is checked and the level is vetoed if there is a problem. Of course producing levels that don't work all the time would be a bit silly, but if the rooms are rare it's probably not a problem. Disconnected level parts get hatches AFAIK, but not inside vaults. I'm not really sure about this, though. Maybe there is a way to allow placing hatches even in disconnected vaults.

Edit: note that connectivity is only checked within each level. AFAIK one specific upstair needs to be connected to one specific downstair. These correspond to the stairs used for connectivity checks on the previous and next level respectively, so you always get a path to the bottom. I really don't know enough about the connectivity check to competently answer questions about it. :(

infiniplex wrote:5. Closets (1x1): Currently, these sometimes generate on the first 3 (I think) floors (probability decreases with depth). There is very little chance for randomization in these. Also, they don't seem too vault-like. On the other hand, if seen from outside, these are 3x3 and help fill the gap to the next size of room. Do I want these on all map types? Or possibly just on city-like levels (see below)? Or not at all?

With many layouts you don't know what's behind a door from the outside, and being surprised by a monster right behind the door could be interesting (quite a few vaults do this already). If they are rare they could be pretty neat. Variety is good, and I don't see a good reason to have a minimum size for rooms.

infiniplex wrote:6. Hallway monsters: Should monsters spawn in hallways as normal? Or only special ones (the wiki suggests yaktaur bands)? Or none? Should random monsters spawn in hallways?

This was fairly strongly debated when vaults stuff was discussed. Probably having random monsters in the corridors and some of the empty and loot rooms, and no randomly placed monsters in rooms that do their own thing with monsters would work well. There's a tag for that, so this can be decided on a vault-by-vault basis. Corridors should definitely not be safe.
Last edited by Galefury on Monday, 2nd July 2012, 22:28, edited 1 time in total.

For this message the author Galefury has received thanks:
infiniplex

Blades Runner

Posts: 554

Joined: Tuesday, 25th January 2011, 14:24

Post Monday, 2nd July 2012, 21:59

Re: New Vaults Layout

This doesn't really go to level layout generation, but as far as monster sets go, I've always wondered why there aren't more humans in Vaults.

Vestibule Violator

Posts: 1567

Joined: Friday, 21st January 2011, 22:56

Post Monday, 2nd July 2012, 22:13

Re: New Vaults Layout

If all the layouts work well for this it might be cool to generate all but the final Vaults level with the same layout instead of using a random one for each level. This way instead of a random mess of rooms + corridors layouts there would always be a cohesive feel to the branch. Kind of like a mini branch roulette.

Vestibule Violator

Posts: 1567

Joined: Friday, 21st January 2011, 22:56

Post Monday, 2nd July 2012, 23:03

Re: New Vaults Layout

There was some IRC talk about this, mostly with people who don't usually post on the tavern, or even cant do so at the moment. Regarding your question about whether there are any major problems with what you are doing, this line in particular stands out:

<kilobyte> could you tell him that at least according to me that wiki post sucks balls, and he should do what he thinks is right, not what is written there

It might be good if you came to ##crawl-dev on freenode some time to discuss your plans if you have time. Also, you can read what was discussed there in the chat logs. You want ##crawl-dev-20120702.log, starting at 17:09:23.

For this message the author Galefury has received thanks:
infiniplex
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Monday, 2nd July 2012, 23:27

Re: New Vaults Layout

infiniplex wrote:I have recently been working on a new layout (probably will become layouts) for the Vaults based on the wiki page.

Nice. You should unite forces with mumra (note the spelling ;) ), I believe he has some working code too.

1. Usefulness: Is there some reason why the whole project is pointless? For example, if there has been a general decision to remove the Vaults. Or if someone else has already made a better layout generator. Or something. I know this is unlikely, but if there is a good reason not to do this, it is better to find out now than when I finish.

We certainly do want to change Vaults and differentiate it from D. What's decided is to reduce it to 5 levels. We'd like to change the formula used by the level generator to pick monsters first, to keep V:8 without a jump on difficulty when entering V. Would be useful for other short branches too to have a steeper progression. That's why it's been postponed to 0.12.
Since the goal is differentiation from D, level generators are certainly welcome, and your work (as well as mumra's) looks very interesting, keep it up! :)

2. Secret doors: The wiki wants many rooms to be accessible only be secret door to reward training the T&D skill. However, elsewhere, the wiki says secret doors should only be used where 1) there is a good reason and 2) they are not spoilery. Assuming that at least one exit room (stairs down) is not behind a secret door, should other rooms be hidden? If so, should hidden rooms be balanced more towards some room type (e.g. loot)?

I think everyone agree's that random secret doors should go. It's just waiting there for someone to pull the trigger. But some vaults make an interesting use of them so I see no reason to remove them. Use them only if you can make it interesting somehow (and that's kinda hard).

3. Rooms only accessible through cTele: Do we want these? Should rTele get you it? I would guess that each of these would have to have an escape hatch, teleport trap, or shaft. Is there some other way to get trapped players out? Escape hatches and shafts could send a player into such a room. Is that a problem? Could teleport traps?

no_rtele_into is used for places that could trap the player. no_ctele_into to protect loot rooms, but you can just use no_tele_into in this case. Hatches respect it.

4. Rooms accessible only be stairs: Obviously, there has to be at least one stairs connected to the level proper. However, the wiki says suggests that having rooms accessible only by stairs is desired. There could be at most 4 of these. Is this a good idea? If so, which stairs are preferred: Up or down? It probably isn't a good idea to connect rooms to both, or there is a danger of creating a disconnected portion of the level. Or worse, disconnecting the bottom of the branch from the top. Is that bad? Does anyone know how (and if) Orc avoids this?

I think it's safe to use. You just have to tag your vault transparent if it can be safely travelled through (floor on edge) and the level builder will make sure that everything is connected and that the branch bottom is accessible. It's even a bit paranoiac and often add hatches to parts that are "disconnected" by badly-tagged vaults.

5. Closets (1x1): Currently, these sometimes generate on the first 3 (I think) floors (probability decreases with depth). There is very little chance for randomization in these. Also, they don't seem too vault-like. On the other hand, if seen from outside, these are 3x3 and help fill the gap to the next size of room. Do I want these on all map types? Or possibly just on city-like levels (see below)? Or not at all?

Sure, why not. Though it's harder to make it interesting in such a small place. Make it rare, with 4 doors (cardinal) and in the middle either good loot or OOD. Mimics? ;)

6. Hallway monsters: Should monsters spawn in hallways as normal? Or only special ones (the wiki suggests yaktaur bands)? Or none? Should random monsters spawn in hallways?

Yeah definitely. Room only fights would be very boring. Probably just let the level generator handle it. We do want to add variety to the monster set, so if you have ideas (or vaults), come forward.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...
User avatar

Dungeon Master

Posts: 291

Joined: Wednesday, 6th June 2012, 18:59

Post Tuesday, 3rd July 2012, 03:47

Re: New Vaults Layout

Hmm. I like the concept of a more Vaults-like Vaults (if that makes any sense), particularly if things end up feeling more like Vaults:8...

In any case, I've taken a stab at implementing the Walkways layout. What I have so far is pretty messy on the code side of things, but it seems to work fairly well as a layout; what it could really use are some more room definitions (i.e. vaults!) to spice things up some more.

The .des files are attached - split into the base level generator and the rooms. I'm thinking if the layouts use standard room sizes, the rooms themselves can be used fairly interchangeably between the various layouts.

I might look into one of the other layout ideas next (the Grid Maze is an appealing idea, and not just because it reminds me of my Vaults entry vault...)
Attachments
vaults_walkways_rooms.des.txt
Room definitions - entries, exits, empty rooms, monster rooms (normal and hard), and loot rooms.
(4.66 KiB) Downloaded 13 times
layout_vaults_walkways.des.txt
Base layout code - generates the general room layout and places subvaults accordingly.
(6.33 KiB) Downloaded 6 times

For this message the author sgrunt has received thanks:
infiniplex
User avatar

Dungeon Master

Posts: 431

Joined: Tuesday, 13th September 2011, 17:34

Post Tuesday, 3rd July 2012, 04:48

Re: New Vaults Layout

A thought I had about the "tons of subvaults" idea for the vaults: have nested subvaults. This gives you more room variety and also kinda mirrors V:8.

For example, we define as the standard that Vaults rooms are all rectangles with sides of length 3, 7, 15, or 31. A bunch of 3x7, 15x15, 7x31, 15x31, etc. vaults get written by various industrious people. Then, for each size, there are a few (common) vaults that serve only to subdivide the space, like a 31x31 vault which just consists of four 15x15 vaults, or a 7x7 vault that has two 3x3 rooms and a 3x7:

  Code:
AAAlCCC
AAAlCCC
AAAlCCC
kkkxCCC
BBBmCCC
BBBmCCC
BBBmCCC


A, B, and C would get replaced with smaller vaults, and k, l and m would get randomized and end up as empty space or walls with doors or something.

Thus the level generator can ask for a 31x31 room and you'll end up with a Mondrian painting of rooms within rooms.
User avatar

Dungeon Master

Posts: 291

Joined: Wednesday, 6th June 2012, 18:59

Post Tuesday, 3rd July 2012, 05:40

Re: New Vaults Layout

After some poking, I give you the Grid Maze layout! Currently it is set up to generate a maze of an 8x8 grid of rooms, using the set of 6x6 rooms from the Walkways layout (so you'll need the rooms from a couple of posts back to see this in action), and to put the exit as far away from the entrance as possible in the maze. (With the monster rooms from walkways, this turns out to be quite vicious; perhaps the number of monsters in the rooms needs to be toned down, or the room weights for a given layout need to be adjusted?)

I've also fixed a couple of oversights in the Walkways layout (incorrect outer wall type generation and a leftover testing WEIGHT: value).
Attachments
layout_vaults_maze.des.txt
Maze layout!
(4.71 KiB) Downloaded 10 times
layout_vaults_walkways.des.txt
Slightly adjusted version of _walkways to account for a couple of oversights.
(6.31 KiB) Downloaded 4 times

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Tuesday, 3rd July 2012, 05:55

Re: New Vaults Layout

Wow. I had not expected nearly this much. At least not so quickly.

Thank you to Galefury and to galehar for your replies. This was exactly what I was looking for.

Also thanks (again) tp Galefury for the link to the ##crawl-dev transcripts. I have never used freenode or IRC (I think that is the term) before (crawl is the third time I have used a forum, even), so I will almost certainly not be there for a while at least. It sounds kind of confusing. I am afraid the Internet has trouble competing for my time against programming.

To mumra, I am sorry for misspelling your name. I have fixed it.

Based on the comments, I think I saw the following:
1. Usefulness: Yes, this is useful. Mumra also has something (C++ code?), but I do not know how to get at it. I got referred to some website talking about branches, so it probably is some system for allowing many people to work on a program at once. I may try harder at this later.
2. Secret doors: Bad, do not include. OK, I can do that.
3. cTele only rooms: These would work. They may be a bad idea.
4. Stairs-only rooms: ???
5. Closets: Yes. Maybe only where four doors are possible (on many maps, there may be something in the way on 3 sides).
6. Hallway monsters: Yes (details not specified).

On to other replies (in no order)
1. Please do not make any subvaults yet. I know sgrunt's are for his and ontaclasm is showing a concept, but it is a small step to someone making some. There will be weird restrictions (I mostly know them but have not written them up yet). I would feel bad telling someone I cannot use their hard work because of some technicality.
2. I can port this to LUA (mentioned on ##crawl-dev). Depending on which features exist in LUA, it may be more or less readable and easier or harder to adapt, but I can make it work.
3. I think we would need a few standard sizes of subvaults. There should be several sizes so the rooms are not all the same size. However, there should not be too many because that is too many to make. We will eventually have many industrious people, but not at first. Subvaults can address this, but only to a limited degree. My program is currently using sizes of 1, 4, 7, 10, and 15, but that is entirely arbitrary (it is just numbers in an array). I think the sizes should be quite spread out, not clumped together. I do not want too many because I will probably need multiple dummy subvaults for each to handle some of the complexity.
4. Open walls in place of doors. I think this is a fine idea. However, in my program, it would be a subvault thing, not a layout thing. I made the door part of the room so that the room can place it in a specific places if necessary. I was assuming there would be a standard door block subvault that could be applied to add a random door in most cases.
5. I thought these layouts were intended to be kind of boring. The interesting stuff would be in the rooms. It would not be too spoilery in many cases. You come down the stairs into a room. It could be on any layout. Eventually, you leave the room. You may now know what layout you are on, but it won't help you much. They are all about the same (except grid maze, I guess...)
6. It would not be a good idea for me to make too much up myself. I have experience with being me, and I know that I have a talent for picking ideas that sound good in theory (to me at least), but do not work out. That is why I am asking here.
7. sgrunt's layouts. Do you really make that in a few hours? And I see another one while I was writing this. I am impressed. I have not (yet) looked a mumra's but I assume he(?) also knows what he is doing. However, I have not real experience working on joint projects. I have always managed to arrange them so far as I do coding and other people do that hard stuff (graphics, design, ideas, etc.). Once I have the one layout, it is relatively easy for me to add more using the same helper functions. For example I only needed to add 3 functions (including the layout vaults) to add two additional layouts to the loops layout file. I know that my layout is more sophisticated than sgrunts (connect rooms sideways but not to solid rooms or rooms of another size, room size distribution is chosen separately, I can choose how many of each contents type I want, I can tell if a subvault can cover a wall or not, etc.), but my layout is also much longer (+2000 line including documentation). I am assuming mumra's is similar (but probably bigger). I am afraid I have trouble with writing short stuff.
8. What does AFAIK stand for?
9. I don't think there is a clear line between a very-heavily-randomized encompass vault and a layout. I was already thinking that it might be a bad idea to drop minivaults on these levels anyway. The reasoning is 1) these level designs (except the chaotic city) are quite structured, at that would mess them up (and reconnecting stuff would make it worse) and 2) all the subvaults would leave plenty of space to place interesting vaults.
User avatar

Dungeon Master

Posts: 291

Joined: Wednesday, 6th June 2012, 18:59

Post Tuesday, 3rd July 2012, 07:51

Re: New Vaults Layout

infiniplex wrote:7. sgrunt's layouts. Do you really make that in a few hours?

I work quickly. :)

infiniplex wrote:And I see another one while I was writing this. I am impressed.

Once I knew how I was going to approach the maze layout, it was very simple to implement... debugging it took most of the time :D

infiniplex wrote:I know that my layout is more sophisticated than sgrunts (connect rooms sideways but not to solid rooms or rooms of another size, room size distribution is chosen separately, I can choose how many of each contents type I want, I can tell if a subvault can cover a wall or not, etc.)

Funny you should mention a few of these things; I just finished making a few more tweaks to layout_vaults_walkways to sometimes connect adjacent rooms instead of connecting to the hallways all the time (see attached). Being able to do that frequently is, I guess, an advantage of having rooms of relatively similar size, as it makes placing the door between them relatively painless.

In principle, with the approach I'm taking here, I should be able to adjust the number of rooms of each type mainly by tinkering with the subvault definitions - I could, for example, define a vaults_walkways_room_monsters, vaults_walkways_room_loot, etc. and have the layouts simply specify a (depth-weighted?) number for each of these. That might become necessary if and when there are significantly more rooms of each type available (in which case individually weighting the rooms would become unwieldy), but the current implementation seems to be working fine.

I also adjusted the number of monsters in the room vaults, as I had originally placed them without thinking of monster bands. I think they have roughly the right amount of monsters now.

infiniplex wrote:8. What does AFAIK stand for?

As Far As I Know.
Attachments
layout_vaults_walkways.des.txt
Walkways layout v3 - now with interconnected rooms.
(7.5 KiB) Downloaded 1 time
vaults_walkways_rooms.des.txt
Room definitions with adjusted number of monsters.
(4.87 KiB) Downloaded 2 times
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Tuesday, 3rd July 2012, 08:15

Re: New Vaults Layout

infiniplex wrote:4. Stairs-only rooms: ???

Sure, why not? They can have 1, 2 or the 3 stairs, be guarded or not.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Dungeon Master

Posts: 1531

Joined: Saturday, 5th March 2011, 06:29

Post Tuesday, 3rd July 2012, 09:30

Re: New Vaults Layout

infiniplex wrote:The wiki page is not revealed truth. It is just whatever someone (in this case mumra) happened to put there. From this, it follows that not everything it says is necessarily a good idea.


I should just chime in here ;)

Of course, the dev wiki is for discussion and ideas, anyone can write there, you should never take anything there as gospel unless it's from an official dev and marked as "implementable"! However in a case like this I doubt you'll ever get a consensus, the best way is to take some ideas and experiment and see what works (which is what I started doing). There was a very polarised response when I initially started sounding this out on IRC, some people loved the layouts and some hated them. In particular amongst the dev team, I remember Wensley being a huge supporter; I think he was helping me set up an online instance for playtesting.

I did code an LUA generator that will already cover most of these layouts, it's done in a generic way so it can attach subvault rooms randomly onto any given base layout, with random-sized doors. Use this or no, your choice :) It still needed some work in some areas, a couple of things I'd like to have done better.

Galehar gave the wrong repo; the main level generator is in this file:
https://gitorious.org/~mumra/crawl/mumra-crawl-2/blobs/86a20faf39371e7230d16b00e7cc45aea1744c17/crawl-ref/source/dat/dlua/vaults.lua

Also this file is what actually use the generator in V levels:
https://gitorious.org/~mumra/crawl/mumra-crawl-2/blobs/86a20faf39371e7230d16b00e7cc45aea1744c17/crawl-ref/source/dat/des/builder/layout_vaults.des

And here are all the subvault rooms it uses:
https://gitorious.org/~mumra/crawl/mumra-crawl-2/blobs/86a20faf39371e7230d16b00e7cc45aea1744c17/crawl-ref/source/dat/des/branches/vaults_new.des

(I'm sure you'll want as many subvaults as possible; really a huge amount are needed if you don't want to notice things repeating all the time!)

If you want any help with these files, let me know. I'm going away for a couple of weeks but after that I could get more involved. Anyway, it's great to see some revived interest in this, good job!

Dungeon Master

Posts: 1531

Joined: Saturday, 5th March 2011, 06:29

Post Tuesday, 3rd July 2012, 09:51

Re: New Vaults Layout

Ok, I just read the thread in more detail. Just a couple more comments on implementation:

I actually got my script so it could read the width and height of the subvault, and then accordingly build an exactly-sized room to place it in. Unfortunately, dgn.reuse_map didn't have a parameter to specify rotation, which meant I couldn't control orientation, so all rooms had to work equally well in any rotation. This could be fixed with some C++ work.

7. Mumra's thoughts: Apparently mumra has more thought on layouts for the Vaults. If you are mumra, what are these?


I have absolutely no idea :) Maybe it was a reference to my idea for implementing it, which I went ahead and did. Or it could be to do with the monster sets, which is really a separate issue. I did have some ideas there but got a somewhat negative response on IRC! One thing that stuck out was having static "sentinel" monsters which once alerted would start casting buffs on other monsters in the vaults.
User avatar

Dungeon Master

Posts: 291

Joined: Wednesday, 6th June 2012, 18:59

Post Tuesday, 3rd July 2012, 18:31

Re: New Vaults Layout

Well, just plugging along with my own little implementations, I've done the following:

- The code for generating a block of rooms has been revised and split out of the walkway layout; it can now generate entrances at the top and bottom of a block in addition to between rooms in the same block, as well as top- or bottom-align the block, as well as horizontal room blocks (i.e. no longer just vertical room blocks).

- Room vaults have been renamed to vaults_layout_room_* instead of vaults_walkways_room_*, as they're used by multiple layouts now.

- Room weights are now handled on a type-of-room basis, as opposed to on a per-subvault basis.

- 7x7 rooms have been added to the set; walkways now has a maximum room size of 7x7.

- New layout: Cross. This divides the level into four 27x24 quadrants (raise your hand if that size sounds familiar) separated and surrounded by width-three hallways; a 7x7 room is placed on each central corner, and the remainder of the space along the central corridor is filled with additional rooms.

Here are the latest .des files for these implementations.

I imagine that I could do the City and Chaotic City implementations fairly easily; an implementation in this framework of the Square Ring layout should also now be relatively straightforward.
Attachments
layout_vaults.des.txt
Latest iteration of the Walkways and Cross layouts.
(18.22 KiB) Downloaded 5 times
layout_vaults_maze.des.txt
Maze layout, adjusted to use the new room definitions.
(4.71 KiB) Downloaded 3 times
vaults_layout_rooms.des.txt
Latest round of room definitions; now with 7x7 rooms!
(8.26 KiB) Downloaded 3 times

Dungeon Master

Posts: 1531

Joined: Saturday, 5th March 2011, 06:29

Post Tuesday, 3rd July 2012, 19:15

Re: New Vaults Layout

@sgrunt: Have you had a look at my LUA? It already handled rooms attached to any wall with the door in any orientation ...
User avatar

Dungeon Master

Posts: 291

Joined: Wednesday, 6th June 2012, 18:59

Post Tuesday, 3rd July 2012, 21:09

Re: New Vaults Layout

mumra wrote:@sgrunt: Have you had a look at my LUA? It already handled rooms attached to any wall with the door in any orientation ...

I've looked through it a little bit now, and perhaps at some point when I'm cleaning up the code I have some more I'll try adapting it for use in this framework.

Anyway, all is basically well here! I've done a bit of code tuning and tweaking, and have successfully implemented the Square Ring, City and Chaotic City layouts described above. This means that my implementations are now a complete set. :D

Right now the Chaotic City layout is fairly boring - it has basically the same feel as the standard layout_chaotic_city with less vaults (the map kind, not the building kind), more open space, and a guarantee of having the stairs in one of the buildings. I suspect this would improve with a greater availability of room layouts, or perhaps larger rooms?

Actually, notwithstanding infiniplex's comments, these layouts in general could really use more room subvaults so that they're more interesting than they're already are. I do think they work to freshen the gameplay of Vaults (Maze in particular feels utterly different than most other things in Crawl), but I think I'll leave that overall assessment to slightly more experienced players.
Attachments
layout_vaults.des.txt
Latest version of the room block layouts - Walkways, Cross, and now Square Ring.
(27.72 KiB) Downloaded 7 times
layout_vaults_cities.des.txt
City and Chaotic City layout.
(8.01 KiB) Downloaded 6 times

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Wednesday, 4th July 2012, 00:25

Re: New Vaults Layout

sgrunt, I tried running your layouts.

Unfortunately, I have 2 major problems. The first is that the 2 city layouts sometimes crashed during generation (a block of gibberish red text with lots of semicolons), followed by an error message saying that it could not place a stairs subvault. The second problem is that the other 4 layouts always crashed crawl in a similar manner. As I was testing them with PLACE:, this meant that I could only stop it by closing the program. In both cases, the size for the subvault it tried to places was invalid. Normally, this meant that it was not square. Occasionally, however (I only say this on the walkways and maze layouts but it was rare there so it might show up elsewhere), one or both of the sizes would be too small. In one case, I saw it try to place a 2x2 subvault. I am using Crawl version 0.10.2, not e.g. trunk. I am not sure if this is significant.

On an entirely different note, you might want to try generating more rooms in the chaotic city layout. It looks kind of empty at times.

I am thinking that I will probably finish my layouts anyway. Perhaps the devs will think one is better than the other, or perhaps they will use both. I probably can adapt mine to allow it to use your subvaults.

To clear up confusion, I have no objection to people making subvaults for sgrunt's layout. I was just worried someone would try to make one for mine.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Wednesday, 4th July 2012, 08:11

Re: New Vaults Layout

infiniplex wrote:I am using Crawl version 0.10.2, not e.g. trunk. I am not sure if this is significant.

It probably is. You should really use trunk when coding new features.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
infiniplex

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Thursday, 5th July 2012, 00:03

Re: New Vaults Layout

As a note, you can force a subvault to orient a certain way by changing its shape.

For example:
  Code:
xxxx
xxxxx
xxxxx
xxxx


could only fit with one (two for flipping) orientation in the following

  Code:
......
.AAAA.
.AAAA.
.AAAA.
.AAAA.
..AA..
......

Dungeon Master

Posts: 1531

Joined: Saturday, 5th March 2011, 06:29

Post Thursday, 5th July 2012, 08:34

Re: New Vaults Layout

infiniplex wrote:As a note, you can force a subvault to orient a certain way by changing its shape.


For a while I was considering this with my implementation, but I actually also wanted rooms that could randomly orient, and it makes it a bit more tricky to work out how to position things correctly. Also relying on all subvaults being a certain shape introduces human error when you're asking vault designers to build new subvaults.

Dungeon Master

Posts: 553

Joined: Wednesday, 22nd December 2010, 10:12

Post Thursday, 5th July 2012, 09:24

Re: New Vaults Layout

mumra wrote:Also relying on all subvaults being a certain shape introduces human error when you're asking vault designers to build new subvaults.

As long as the rules aren't terribly complex, this isn't a big deal. Vaults:8 already has a requirement like this, and it works well.

The important thing for subvault orientation is that you can't use any weird shapes. Do it something like vaults:8, where the subvault is just a rectangle with a missing corner.

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Thursday, 5th July 2012, 18:45

Re: New Vaults Layout

I wasn't thinking of anything to complicated for subvaults. The example what I intended to use for 4x4, for example. To allow the free-rotating vaults into such a system, I was going to make a special relay subvault something like this:

  Code:
SUBST:    = = +x
SUBVAULT: A = ...
MAP
AAAA
AAAA+
AAAA=
AAAA
ENDMAP


It would have a high weight (or a separate tag) that would cause it to be chosen frequently (i.e. most of the time). This would allow most subvaults to rotate freely, but it would still allow subvaults where order mattered (e.g. archers at the back of the room). It would also allow subvaults to place the door differently if they wanted to. For example, a nested subvault would look something like this:

  Code:
AAAAxBBBB
AAAAABBBBB
AAAAABBBBB
AAAAxBBBBx
xxxxxxxxxx
CCCCxDDDDx
CCCCCDDDDD
CCCCCDDDDD
CCCCxDDDD


The real one would be a bit more complex (e.g. the connections between the sub-subvaultrs would have to be randomized), but you get the idea.

I do have two (at the moment) LUA-related questions:
1. Is there a LUA call that will tell me the total depth of a branch? I understand the depth of Vaults may be changing from 8 to 5, and it would be nice to have the progression/convergence/whatever-the-term-is-for-rooms-getting-bigger-deeper update automatically.
2. Is there a way to pass a parameter to a subvault? I would feel silly making 3 subvaults each containing a single stairs so the layout generator can place exactly one of each '{', '[', and '(' stairs. Also, it would mean I would have to make fewer relay subvaults (otherwise they have to be duplicated for each room type e.g. monsters, stairs, empty).

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Thursday, 5th July 2012, 23:33

Re: New Vaults Layout

I (sort of) have though of another LUA question that may also be relevant to sgunt and his layout: Is it possible to detect during map generation that a branch entry (or entries) is to be placed on this level? If so, how do I do it? This is relevant because it would allow a special subvault to be added to contain the branch entry. As is, the branch entry will only be able to place in hallways because of subvault exclusion (I don't know if this applies to vaults with the "can_overwrite" tag).

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Sunday, 8th July 2012, 06:08

Re: New Vaults Layout

I got these answers on the ##crawl-dev IRC channel. I am posting them here in case someone else nees them.

infiniplex wrote:1. Is there a LUA call that will tell me the total depth of a branch? I understand the depth of Vaults may be changing from 8 to 5, and it would be nice to have the progression/convergence/whatever-the-term-is-for-rooms-getting-bigger-deeper update automatically.


dgn.br_depth(you.branch())
This requires a build of Trunk 2012-07-07 or newer.

infiniplex wrote:2. Is there a way to pass a parameter to a subvault? I would feel silly making 3 subvaults each containing a single stairs so the layout generator can place exactly one of each '{', '[', and '(' stairs. Also, it would mean I would have to make fewer relay subvaults (otherwise they have to be duplicated for each room type e.g. monsters, stairs, empty).


No. However, you can check if a subvault has already been placed using the dgn.map_by_tag(subvault_name_as_a_string) function used for Vaults:8.

Dungeon Master

Posts: 553

Joined: Wednesday, 22nd December 2010, 10:12

Post Monday, 9th July 2012, 08:07

Re: New Vaults Layout

infiniplex wrote:No. However, you can check if a subvault has already been placed using the dgn.map_by_tag(subvault_name_as_a_string) function used for Vaults:8.


I was thinking something more like this, actually (note: it's just a quick example, haven't actually tested it)

  Code:
{{
function subvault_place_stair(e)
    if dgn.persist.num_stairs == 0 then
        e.subst("> = }")
    elseif dgn.persist.num_stairs == 1 then
        e.subst("> = )")
    elseif dgn.persist.num_stairs == 2 then
        e.subst("> = ]")
    end
    -- else place a down hatch

    dgn.persist.num_stairs = dgn.persist.num_stairs + 1
end
}}

NAME:   example_layout
: dgn.persist.num_stairs = 0
SUBVAULT: A = example_stair_subvault
SUBVAULT: B = example_stair_subvault
SUBVAULT: C = example_stair_subvault
MAP
.......
.A.B.C.
.......
ENDMAP

NAME:   example_subvault
TAGS:   example_stair_subvault
: subvault_place_stair(_G)
MAP
>
ENDMAP


Lots of ways it could be improved, but you get the idea. You could put the Lua directly in the subvault too, but I don't know if that's convenient for what you're doing.

For this message the author evilmike has received thanks: 2
infiniplex, sgrunt

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Monday, 9th July 2012, 19:32

Re: New Vaults Layout

That is a better idea. I suppose there could be a danger of name conflicts, but a long enough variable name (e.g. dgn.persist.vaults_i_number_down_stairs) will fix that.

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Tuesday, 10th July 2012, 17:41

Re: New Vaults Layout

I just had an idea. Is there any good reason I can't set the stair type before creating the subvault? It would look something like this (also untested):

  Code:
{{
function subvault_place_stair(e)
    e.subst("> = " .. dgn.persist.current_stairs_glyph)
end
}}

NAME:   example_layout
: dgn.persist.current_stairs_glyph = '}'
SUBVAULT: A = example_stair_subvault
: dgn.persist.current_stairs_glyph = ')'
SUBVAULT: B = example_stair_subvault
: dgn.persist.current_stairs_glyph = ']'
SUBVAULT: C = example_stair_subvault
MAP
.......
.A.B.C.
.......
ENDMAP

NAME:   example_subvault
TAGS:   example_stair_subvault
: subvault_place_stair(_G)
MAP
>
ENDMAP


For me, this would be easier then I would not have to place the subvaults in the order I wanted the stairs. I care which stairs is which because my layout on guarantees that at least down stairs is connected to the 3 up stairs. I heard a rumor that the level validator requires that a certain pair of stairs (I assume '{' and '}') is connected. I assume that if there is a chance of other people making subvaults (which I would hope for eventually), the implementation details should be hidden, or at least stuck in a function) if possible.
User avatar

Dungeon Master

Posts: 291

Joined: Wednesday, 6th June 2012, 18:59

Post Thursday, 26th July 2012, 17:24

Re: New Vaults Layout

With my attention no longer elsewhere, and with my desire to not let this discussion die, let me present my latest round of tweaks to my own versions of these layouts.

Highlights:
  • Doors (well, primary room entrances) are now included in the subvault masks; since not all room placements have doors, this necessitates a division between subvaults with doors and subvaults without.
  • Stairs are now not necessarily all in the same room; there's a 33% chance of getting all of the [up|down]stairs in one room, 50% chance of having them split 2-1 between two rooms, and a 17% chance of having each in its own room. (Thanks to evilmike for his suggested approach to stair placement, which is employed here.
  • With some functionality added in 0.11-a0-2998-ge094a25, branch entrances are now incorporated into the layout; they get their own room definitions.
All of the layouts themselves have been merged into one file due to some shared functionality between them (primarily the stair and branch entrance placements). The room definitions are in a separate file, as always.

I hope you like these. :D
Attachments
layout_vaults.des.txt
All of the Vaults layouts, now in one file.
(42.91 KiB) Downloaded 10 times
vaults_layout_rooms.des.txt
Room layout definitions - now with doors, split stairs, and branch entrances.
(30.59 KiB) Downloaded 9 times

For this message the author sgrunt has received thanks:
infiniplex

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Sunday, 29th July 2012, 05:55

Re: New Vaults Layout

Not to feel left out, I will also post the part of my layouts I have translated to LUA so far. I have been calling them layout_vaults_i_??? to avoid name confilicts with sgrunt's layouts.

Here are the city, chaotic city, and the grid maze. The grid maze can generate with hallways between rooms (maze) or with just rooms (grid).

Here are also rooms for sizes 1x1, 4x4, and 7x7. Layouts will crash when the attempt to make larger rooms (remember, it's not done yet).

Not here are layouts for the cross, walkways, and square ring layouts, which I still only have in C++. They will be forthcoming in a week or 2, depending how long it takes me to convert them. I also have C++ layouts for a square ring with a chaotic city inside and a square ring with one of st's giant Vault vaults inside. They (st's vaults) are quite impressive. Or at least quite big, I am not completely sure how impressiveness is judged for vaults.

I do not have rooms for 3 stairs together. This was a design decision in the sense that it seemed like it would take more room subvaults and I already have a lot to make. If people think this is a good idea, I can add them.

I believe I have all the configuration stuff in the layout file already. If someone with too much time on their hands wants to read through it (1400ish lines for all the options and the descriptions of how to use it) and tell me that it is unclear or I left out some option that would be nice to change, I can probably fix it. If not, oh well; its still better-documented than most Crawl vault code. I have a few notes to self at the top of the rooms file. These can be ignored.

sgrunt, I am not using your rooms. This is not because I think there is anything wrong with them; it is just easier for me to make complicated things (like these vaults) if I am controlling everything exactly. When I am done, I will probably make a copy of your rooms file and give all the room vaults the extra tag my generator needs.
Attachments
vaults_i_rooms.des.txt
the rooms for the layouts: sizes 1, 4, 7
(41.2 KiB) Downloaded 4 times
layout_vaults_i.des.txt
the layouts themselves: city, chaotic city, grid maze
(136.09 KiB) Downloaded 2 times

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Sunday, 29th July 2012, 05:57

Re: New Vaults Layout

sgrunt, I have not run your newest layouts yet. I will soon. I did, however, steal your code for finding branch entries. I am guessing you got them to add at least one of those functions. If so, thank you.

EDIT: sgrunt, when I try to run your layouts, they keep trying to place non-existant vaults_layout_room_doored_3x3_??? vaults. Also, it occasionally tries (and fails) to place non-square vaults_layout_room_doored vaults. I have an up-to-date version of Trunk (I downloaded it after your most recent post), so that is not the problem. Do your layouts require some branch version? I did manager to generate what I believe were a city layout and two chaotic city layouts, and they looked good. You should make some room content vaults that have e.g. walls in them. As long as the door and all potential door connection spots are open and connected, there is no danger of ceiling off part of the level. Part of the idea behind these subvaults is to mirror and thus lead into Vaults:8, where the corners have walls.

Return to Game Design Discussion

Who is online

Users browsing this forum: No registered users and 26 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.