DESIGN HOW-TO We will take one of the design files that come with the program, and which are largely self-explanatory, and add extra comments to it. Here goes: XX this is a comment XX the first letter of every line determines what data are expected XX background must be OPEN or CLOSED, openings must be of "Direction"-type XX for openings you can enter NO SO EA WE NW SW NE SE, any number of them is OK XX dimX dimY background joinDist tunnelJoinDist opening1 opening 2 ... D 100 100 CLOSED 12 18 NO WE EA XX enter rectangles this way XX startX startY endX endY type XX for possible types see the DungeonMaker.h file R 86 44 99 56 G_CLOSED R 87 45 98 55 IR_OPEN R 86 49 86 51 H_DOOR XX later rectangles overwrite earlier ones XX in this manner you can build rooms: XX first lay down a G_CLOSED = "guaranteed-closed" rectangle XX then inside that another IR_OPEN = "inside-room-open" rect XX and finally a horizontal or vertical door (H_DOOR or V_DOOR) XX (vertical V_DOORs extend in the x-direction, XX doors may need different graphics depending on their orientation R 89 50 89 50 MOB3 R 91 47 91 47 MOB2 R 91 53 91 53 MOB2 R 95 49 96 51 TREAS3 XX the following parameters are very important, for the Builders born in XX earlier generations will tend to dominate (=fill) the map XX probabilities that a baby Crawler will be born after i generations XX indices above 10 are illegal, enter integer values for all 11 indices XX i = 0 1 2 3 4 5 6 7 8 9 10 BC 0 70 0 20 0 10 0 0 0 0 0 XX values must add up to 100 XX probabilities that a baby Roomie will be born after i generations XX indices above 10 are illegal, enter integer values for all 11 indices XX i = 0 1 2 3 4 5 6 7 8 9 10 BR 0 0 50 50 0 0 0 0 0 0 0 XX values must add up to 100 XX probabilities that a baby Tunneler will be born after i generations XX (applicable only for those Tunnelers who are not larger than their parents - XX - for those larger than their parents, use sizeUpGenDelay) XX indices above 10 are illegal, enter integer values for all 11 indices XX i = 0 1 2 3 4 5 6 7 8 9 10 BT 0 0 100 0 0 0 0 0 0 0 0 XX values must add up to 100 XX probabilities that a baby Tunneler of generation gen will have a tunnelWidth 1 size larger than its parent XX sizeUpProb - end with -1 to repeat last value XX gen = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ZU 0 0 0 0 0 100 100 30 -1 XX probabilities that a baby Tunneler of generation gen will have a tunnelWidth 1 size smaller than its parent XX sizeDownProb - end with -1 to repeat last value XX gen = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ZD 0 0 50 100 100 0 0 70 -1 XX for every generation, 100 - (sizeUpProb(gen) + sizeDownProb(gen) = probability that size remains the same, XX and this value must be >= 0 XX in this example tunnels first get narrower, then rapidly larger in generation 5 XX this ensures that larger tunnels are far from the entrance XX actually, the dungeon is too small to let that happen XX after generation 6 there is a random element, tunnels can get larger or smaller XX probability that a Tunneler will make an anteroom when changing direction or spawning XX tunnelWidth = 0 1 2 3 4 5 6 7 8 ... F 20 30 0 0 100 XX value 100 ends the input and repeats for larger tunnels XX here we have anterooms only on narrow tunnels XX these parameters are important for the appearance of the dungeon XX joinPreference for generations of Tunneler, end with -1 to repeat last value XX gen = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 J 0 0 10 100 100 -1 XX not all that important, read the code if you're very interested XX Roomsizes and maximum numbers of rooms - first in Labyrinth - - - then in dungeon XX minSize medSize larSize maxSize numSmlL numMedL numLarL numSmlD numMedD numLarD T 20 40 80 150 20 5 1 50 15 2 XX small rooms are from 20 to 39 squares large, the biggest rooms are 150 squares large XX probabilities to use a room of a certain size depending on tunnelWidth XX the first line is for rooms coming out sideways from the tunnel, the second for rooms at branching sites XX tW=0 SM MD LG tW=1 SM MD LG tW=2 SM MD LG tW=3 SM MD LG tW=4 SM MD LG tW=5 SM MD LG GS 100 0 0 50 50 0 0 100 0 0 0 100 GB 100 0 0 0 100 0 0 0 100 XX input ends when LG is at 100, then repeats at 100% large rooms XX all probabilities should add up to 100 XX very important - use this to make sure that larger rooms are on larger tunnels XX stepLength for generations of Crawler, end with 0 to repeat last value XX gen = 0 1 2 3 4 5 6 7 8 9 10 S 3 3 3 3 3 3 0 XX how many tiles are laid down in one step, very important for design XX corridorWidth for generations of Crawler, end with 0 to repeat last value XX gen = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 C 15 15 7 7 3 3 2 2 1 0 XX the most important parameter when designing labyrinths XX maxAge for generations of Crawler, end with 0 to repeat last value XX gen = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 AC 20 10 10 10 10 10 10 10 10 10 30 3 15 10 5 20 10 6 15 10 7 20 20 20 20 10 20 5 20 5 0 XX used in fine-tuning while observing labyrinth creation per generation with the XX command line parameter "dungeonmaker -d" - very important, takes long to tune XX maxAge for generations of Tunneler, end with 0 to repeat last value XX gen = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 AT 5 12 12 15 15 15 15 15 15 20 30 10 15 10 3 20 10 5 15 10 5 20 20 20 20 10 20 5 20 5 0 XX the same as above for Crawlers applies here XX miscellaneous parameters: XX mutator noHeadingProb patience sizeUpGenDelay columnsInTunnels crawlersInTunnels roomAspectRatio genSpeedUpOnAnteRoom M 20 40 90 0 0 0 0.4 4 XX seedCrawlersInTunnels tunnelCrawlerGeneration showMovie storeMovie randSeed crawlersInAnterooms N 0 -1 1 0 1016029093 0 XX mutator changes Crawler and Tunneler parameters between generations, XX less change with smaller mutator XX noHeadingProb = probability a Builder can go anywhere, particularly also XX head in the opposite direction from its spawning direction XX higher patience = rooms get built later or not at all (in dungeon) XX sizeUpGenDelay is very important for design, generational delay for XX Tunnelers that make wider tunnels than their parents. Overrides normal XX generational delays. XX columnsInTunnels can be 0 or 1, value 1 places ornamental columns in large tunnels XX crawlersInTunnels can be 0 or 1, value 0 prevents seeding of Crawlers in tunnels XX roomAspectRatio <= length/width and width/length of rooms must be larger than this XX genSpeedUpOnAnteRoom: the normal generational delay is divided by this value XX to give the actual generational delay - to prevent anterooms without XX tunnels branching off them, an ugly sight if too frequent XX seedCrawlersInTunnels = number of Crawlers seeded in Tunnels if XX crawlersInTunnels == 1 XX tunnelCrawlerGeneration = the generation when these seed Crawlers are XX introduced; -1 means after all other Builders have died out XX showMovie can be 0 or 1, value 1 causes the dungeon creation being shown XX while it actually happens - neccesary for design work with "dungeonmaker -d" XX storeMovie can be 0 or 1, value 1 causes the movie to be stored in a special XX data structure and only shown after the creation process is finished. XX if both storeMovie and showMovie are 0, the finished map will be shown XX after dungeon creation XX randSeed is the default random seed that will be used when this design file XX is first used in a program run. XX crawlersInAnteRooms can be 0 or 1, a value of 1 allows Crawlers that are seeded XX in tunnels to also be seeded in anterooms XX Randomly distributed Crawlers starting from the edge of the map, heading inwards, 99 stops it XX Give the number per 1000 squares of outer wall (e.g. 5 would have a random Crawler every 200 squares) XX Per generation 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 K 0 99 XX these are the randCrawlers, very important for labyrinths, this short XX input only makes sense for a very small labyrinth XX Probability profile for all RandCrawlers (irrespective of generation) XX Expected value and variance for the genetic variables XX sSSP sDSP tSSP tDSP cDP PR 0 20 0 80 20 XX sSSP = straightSingleSpawnProb = probability to spawn a single baby when moving straight on XX sDSP = straightDoubleSpawnProb XX t as the first letter <==> probabilities when the Crawler turns (=changes direction) XX cDP = changeDirProb <==> probability that the Crawler changes direction XX at the end of one step XX Probability profile for all Crawlers that are seeded in Tunnels XX Expected value and variance for the variables XX maxAge sL sSSP sDSP tSSP tDSP cDP closedProb PT 5 7 0 0 0 0 0 100 XX as above, plus: maxAge = number of steps the Crawler can make before being killed off XX sL = stepLength, number of squares covered in one step XX closedProb = probability that the Crawler will try to connect with a wall XX at the end of its life XX Parameters for "last-chance-Tunnelers" that are created when a Tunneler runs out of room XX roomLeftProb roomRightProb changeDirProb straightSpawnProb turnSpawnProb generationalDelay PU 100 100 40 30 80 7 XX WallCrawlers entered here, singles and pairs XX locX locY dir intDir dorm maxAge gen sL op cW sSSP sDSP tSSP tDSP cDP WS 40 50 SO SO 0 20 1 3 1 1 0 30 0 80 10 WP1 20 70 NO NO 0 20 5 3 2 1 50 50 0 100 40 WP2 20 70 SO SO 0 50 5 3 2 1 50 50 0 100 40 XX this actually makes no sense since the background is closed and all these XX Crawlers will be immediately deleted; anyway for explanation purposes: XX locX , locY = start position of the Crawler, this square will not be filles XX dir = initial heading of the Crawler XX intDir = intended direction for this Crawler XX if the intended direction is NO, SO, EA, or WE, the actual direction XX can vary from the intended direction by zero or +-90 degrees XX for the intermediate intended directions SW, NW, NE, SE varaition can be XX +- 45 degrees XX dorm = dormancy, this Crawler will only become active when those with 0 dormancy XX have already made dorm steps XX maxAge: this Crawler will be deleted after having made at most maxAge steps XX gen = the generation in which this Crawler will be bron XX sL = stepLength, number of squares covered in one step XX op can be 0 or 1, 0 means the Crawler is "closed", i.e. it will try to connect XX with an existing closed square XX 1 means it is open and will always leave an opening at the end of its run, XX must be used with Crawler pairs, and means one of the pair will XX randomly be chosed to be open, the other closed XX Crawler pairs must also be entered with the code letters WP1 and WP2 as XX in the above example XX cW = corridorWidth, the number of squares this Crawler leaves open between XX the squares it fills and those that are already filled XX for the other parameters see above with randCrawlers XX Tunnelers entered here: XX locX locY dir intDir dorm maxAge gen sL tW sDSP tDSP cDP mRRP mRLP jP U 2 50 SO SO 0 7 0 7 1 40 80 40 100 100 100 U 86 50 NO NO 0 12 0 3 1 40 60 40 100 100 100 U 50 2 EA EA 0 12 0 3 1 0 50 60 100 100 100 U 50 97 WE WE 0 12 0 3 1 0 50 60 100 100 100 XX Tunnelers use the same parameters as Crawlers, except: XX tW = tunnelWidth XX mRRP = makeRoomsRightProb, for rooms to the right of where the Tunneler goes XX mRLP = makeRoomsLeftprob XX jP == joinProbability, high values make this Tunneler prefer to join XX another tunnel or open space, with low values it prefers to end its run XX by building a room XX MOBs and treasure follows below - input ended by negative number XX MOBs in the labyrinth - index = category - E1 in rooms, E2 in the open XX groupSize gSVariance 0 1 2 3 4 5 6 7 E1 5 3 -1 XX 0 1 2 3 4 5 6 7 E2 -1 XX MOBs in the dungeon - H1 in rooms, H2 in tunnels and anterooms XX groupSize gSVariance 0 1 2 3 4 5 6 7 H1 4 4 0 50 30 5 2 -1 XX anteRoomProb 0 1 2 3 4 5 6 7 H2 80 0 50 0 5 2 -1 XX should all be clear, anteRoomProb decides how often MOBs are placed in XX anterooms as opposed to regular tunnels XX Treasure - I1 in labyrinth, I2 in dungeon XX groupSize gSVariance 0 1 2 3 4 5 6 7 I1 1 2 -1 I2 0 2 3 3 2 2 1 -1 XX if there's any more questions, search the DungeonMaker.cpp file for the XX symbol you want more info on, and check the code XX if that doesn't do the trick, ask me at peteralifegames.com