The Cathedral of Attnam

Changes

Jump to navigation Jump to search
179 bytes added ,  12:21, 30 April 2016
== Dungeon script hierarchy ==
The dungeon script file follows a definite structure. However, this may be hard to see since certain keywords can be used over and over again. For example to re-define default values in a certain portion of the script, the keyword <code>RoomDefault </code> might be encountered at the <code>LevelDefault </code> stage or simply the <code>Level </code> stage.
Each dungeon has default parameters specified within <code>LevelDefault </code> and <code>RoomDefault</code>. This is where the general look and feel of the dungeon can be uniformly specified with only a few commands. These defaults can be overridden at any point in the script, within that dungeon.
Each level is explicitly catalogued by level number. LevelDefaults <code>LevelDefault</code> can be overridden to change the look and feel of just one particular level if desired.
Rooms are described in the "<code>Level" </code> portion of the script, since rooms are contained on levels in the same way levels are contained in dungeons. Default specs for rooms (<code>RoomDefault</code>) can be overridden. This can either be done within each level, affecting only the specifications for rooms generated on that level, or it may be done on a per-room basis. Rooms can be rigidly specified, with special "script maps" <code>GTerrainMap</code>, <code>OTerrainMap</code>, <code>ItemMap </code> and <code>CharacterMap </code> listed, showing which types to be generated.
Squares can be defined within rooms, or within a level somewhere. On a square may be placed any amount of items, or a particular ground-terrain or over-terrain, such as stairs or a fountain.
Each room and square can be made to appear randomly within a level, in a random position, and/or within a random sub-area of a level (handled by <code>BoundedRandom</code>), and/or on a random member of a subset of levels (handled by <code>RandomLevel</code>).
[[File:DungeonHierarchies.png|400px]]
158

edits

Navigation menu