These are just some notes I'm making for myself in the course of getting familiar with the code. If you are not me, you can ignore them. Level Stuff: * Key files include mklev.c sp_lev.c dungeon.c mkmaze.c mkroom.c * Still figuring out the relationship between add_room/add_subroom versus makerooms/create_room * makelevel notices if there haven't been any levels created already (based on wiz1_level.dlevel) and in that case calls init_dungeons() before proceeding. * makelevel calls oinit(lev), which currently only sets the level-dependent probabilities for the various gemstones. Could this also be made to adjust object probabilities per branch? * The second argument to makemaz is "minefill" when creating Mines filler levels (caverns). Other possible values include the empty string (used in Gehennom among other places) and, umm, maybe some other possibilities. (If I read the code in makelevel correctly, each quest has its own value, and the rogue level may have another.) * makelevel (in mklev.c) appears to be the key level-making function. It does one of three things: + calls makemaz and returns; makemaz must do everything + calls makeroguerooms and sort_rooms, does stair placement, then skips down and does branch placement, puts things in the rooms (monsters, traps, random objects). + calls makerooms and sort_rooms, does stair placement, calls makecorridors and make_niches, possibly creates a vault, maybe turns some of the rooms into special rooms (shops, throne rooms, leprechaun halls, zoos, temples, beehives, gravehards, antholes, barracks, swamps, or cockatrice nests), does branch placement, puts things in the rooms (monsters, traps, fountains, sinks, altars, graves, statues, boxes/chests, graffiti, and random objects). HOWEVER, makelevel does not do everything. It is itself called by mklev, which also does some other stuff, e.g., mklev calls mineralize and set_wall_state. Also, it is mklevl that decides whether to load bones or create a level from scratch, apparently. * In addition to gold and gems, mineralize also places kelp. It would be a logical place for inserting other similar things: rocks, for example. * topologize sets the room number on every tile in a room to be that room's number. In light of this, I'm not sure why pos_to_room is necessary.