Type: Assembly Brain
Level: 3 star (not in gallery)
Description: The Dungeon Generator randomly generates a dungeon complex using 6 building assemblies. It also populates the building with coins, weapons and goblin enemies. The building does not have a roof. Kode is contained within 5 logic cubes. As a complex brain I will not be writing it out.
Although it is a very interesting piece of koding, it is not particularly practical to use it in a game. Sometimes the random generator will create a starting room with no exits, making the rest of the dungeon inaccessible. Sometimes it will not build anything at all, especially if you have used the World Wizard. You have no control where the dungeon will sit, as the orientation is random. So you could create a dungeon in the air, or over water or in a mountain. It also takes up a lot of space. At over one thousand props it also also incredibly resource heavy.
page 1 @init (41 lines)
page 2 @Main (29 lines)
page 3 @Create Hallway (45 lines)
Page 4 @Create Room (31 lines)
Page 5 @Configuration (153 lines)
Page 6 @Roll Weights (6 lines)
Page 7 @Evaluate Position (14 lines)
Page 8 @Create Passage (32 lines)
Page 9 @Populate (9 lines)
logic cubes for positioning (3 lines)
Creating a roof
Place a dungeon floor-square and attach another to it at ceiling height. Make it a template. Attach more ceilings to all the dungeon part assemblies. Note that the doors are slightly shorter than the walls so will need to add a piece on top of the doorways.
Using IWP. Select the floor tile and replace all instances of the floor tile in the logic cube brain
page @Create Hallway line 3
page @Create Room lines 10, 23
page @Create Passage line 3
You may need to adjust the position of your ceiling tiles to create a seamless ceiling.
Removing the objects and enemies
the page @populate contains the kode that places the coins, sword, and Goblin bruisers. You can delete line 2 to remove all of them, or alter or remove each individual line as required.
Using different assemblies
Although technically this brain can be used to create any randomised layout of assemblies it is very difficult to get them all to line up, and you may find it takes more time than it is worth. If you want to attempt it, page@init defines all the build objects (apart from the floor). Just make your new parts following the shapes laid out in the dungeon pieces and replace the dungeon pieces in the kode.