Zirog Random Dungeon Generator (ZRDG or ZRG) is a dungeon generator, that uses external objects (Serialized by google's Gson ZedBlockArrays) that contains array of blocks and required conditions for spawning this object.
Introduction
All generators, that i have seen was based on either entire structure copy\paste or either randomizing position of constant rooms. I dont realy want to call this methods as "Random generation" and i wanted to see some more random generation. So i used my previous experience in making random generation from my old C# Unity addon ( ZedRndGen in unity assets store ). I reimplemented most of this functions in minecraft (I had no experience in coding java, so it tooke me 2 days to setup devEnv and implementing tutorial item, lol).
Current functions for now:
Generation of non straight corridor;Adding some more corridors orthogonal to generated one;Generating staircases (Vertical and horisontal, but vertical not even tested);Generating rooms;Applying zones and tilesets to generated corridors and rooms;Generating appereance of generated structure;Generation of objects inside of structure;Rectangular and Hexagonal paterns;
So as said this generation is made to be more random than, i.e. vanilla minecraft's stronghold generator.
All of this cogs are rotating around abstract object "ZedStatCube" or "StructureSegment". This segment is a cube of certain size (in theory size can be any. All is limited to size of a MC block; In practice only 5 and 6 blocks length are supported). Size of a segments represents count of blocks (So 5 sized segment is a 5x5x5 cube of MC blocks). Segments placed side by side to make a beatifull line.
At first only "Main corridor" is generated and then new corridors are added to it like branching tree. Then rooms added like leaves.
When all segments generated and ordered begins generation of real blocks (Minecraft ones).
If segment has no neighbor it will generate WallObject (or Floor\CeilingObject if no segment under or above).
Wall\Floor\CeilingObjects are stored as different file (as above "external object"). They have array of blocks to place, offset, maximum and minimum distance to a floor and\or ceiling, allowence to be generated in hexagonal\rectangular paterns.
AdditionalObjects (like some random chests, columns, monster spawners, decorative) generated inside of segments. AdditionalObjects have sizes (like 0x0x0(in segments) for a torch cuz it occupies only wall it placed on or 2x1x2(in ssegments) for a EndPortal cuz it occupies aprox 10x6x10 blocks).
tl;dr
In the end not only corridors and rooms itself generated randomly, but content is random too.
Using ingame
For generation itself there is 2 options.
Using Commands (see Commands section) and using [testingzrg:zrggen] item (Right mouse button).
Items generates structure in coords (xyz:0 140 0) for a client only (Thus interacting with blocks or reentering world will cause all to disappear (Useful for debugging cuz you dont need to clean entire world))
Commands will generate structure using given external file for generation settings and on given coords.
Also as said above generator uses external files for generation. Anyone can make tiles and destribute them. Commands are used.
tl;dr
Clientside and Serverside generation are posible, but only manual.
Commands
All commands starts with /zrg
Commands are:
Positions (look at required block when executing command):
hpos1 - set first position
hpos2 - set second position
hposcenter - set center position
hposair - set block to interpret as air
Actions:
Copy
Save [String:TileSetName] [Integer:SegmentSize] [String:ObjectType] [String:ObjectName] true
Generate [String:GenerationSettings] Server [Boolean:useHexagonalPatern] [X] [Y] [Z]
Spawn
When saving or loading:
As file path will be used:
[MinecraftFolder]/ZedRandomGenerator/Tilesets/[TileSetName]/[SegmentSize]/[ObjectType]/[ObjectName].jzba
so executing command:
/zrg save generic 5 wall brickWall true
will save your current copied (by command /zrg copy in region defined by points hpos1 and hpos2 (in any order) ) blocks in:
[MinecraftFolder]/ZedRandomGenerator/Tilesets/generic/5/wall/ as a brickWall.jzba file.
True in the end means "Use Google's Gson serialization (saving) methods" (False is only for debug for now).
/zrg load does similar thing, but it loads blocks from file into clipboard.
/zrg hposcenter defines offset for a object. Due to random size of objects center of blocks array can be missaligned with generator's meanings of a center, so this is used (see below for more info)
/zrg hposair used to define block, that will be replaced by air during "Paste" in world. Air blocks saved as NULL's so the wont replace any blocks.
If you want to makre Window not as "wall object", but as a "Object placed on a wall" (i.e. when tou want 2x2 window or some like hole in wall or roof\floor) you want some blocks of walls to be replaced with air. Pick some block, that not used in your object and define it as Air block by this command. Thus you have not be woried by clipping some walls by your picking wrong points when copying.
/zrg rotate and /zrg mirror used to manipulate blocks in clipboard.
/zrg spawn spawns object in clipboard.
/zrg copy copies all blocks (except air) in your region defined by points hpos1 and hpos2 and remembers current hposcenter offset. After copy you should set hposcenter again.
/zrg generate loads file [MinecraftFolder]/ZedRandomGenerator/Tilesets/[GenerationSettings].zgen and reads all parameters in it and then generates structure begining in point set by [X][Y][Z].
You can make your generation settings by editing\copying\downloading other's .zgen files. See Editing Parameters for more info.
Objects
Generator uses multiple different objects when making structure.
Wall - stored in /wall/ folder in TileSets used to make a wall for a Segment's side, that has no neighbor.
Floor - stored in /floor/ folder and used to make a floor for a Segment, that generated as a bottom (all corridors has floor).
Ceiling - stored in /ceiling/ folder and used to make ceiling for a segment, that sah no segment above or segment above is generated as bottom (so each segment right under corridos will have ceilings generated)
Railings - stored in /railing/ generated when bottom segment, that has no ceiling contacts non bottom segment (so when corridor goes thru center of a room's wall it will have floor and railings instead of walls)
Windows - stored in /window/ generated when bottom segment WITH ceiling contacts non bottom segment
Seams - stored in /seam/ generated when bottom corridor segment wtih ceiling contacts bottom non corridor segment (So when corridor goes into room it will generate Seam like a door)
Staircase - stored in /staircase/ generated when horizontal Staircase segments are generated (when corridors goes up or down by 1 segment)
Ladder - stored in /ladder/ generated when vertical Staircase segments are generated (whe ncorridors goes up or down more than by 1 segment)
Objects - stored in /obj/ generated with given %chance for each segment. Could be generated on floors, walls, ceilings.
Walls, Objects affected by a FloorDist and CeilingDist parameters, that defines ther minimum and maximum distance to floor\ceiling (i.e. you don want to generate chest 5 blocks above ground or generate support column not touching floor)
When saving objects should be faced north (negative Z)
Center (Hposcenter) for floor\ceiling\objects on the floor is center of a segment's floor.
Center for others - see pic:
tl;dr
there is alot of different objects
Editing Parameters
ZRG and it's objects has many parameters. All parameters stored in .zgen for a generator or .jzba for objects files. Those files are camouflaged Json files, so use Notepad (or Notepad++) to edit.
Generator:
Integer:CorridorCount - count of corners in initial main corridor;
Integer:BlockSize - size of a segment in MC blocks. Right now only 5 is tested and debugged. only 5 and 6 are supported.
Vector3d:corridorLength - x as minimum and y as maximum length of a generated corridors;
float:chanceOfStaircase - 0.0...1.0 chance of generating staircase on each corridor segment;
float:chanceOfWallObject - 0.0...1.0 chance of generating Object on a wall on each corridor segment;
float:chanceOfFloorObject - 0.0...1.0 chance of generating Object on a floor on each corridor segment;
float:chanceOfCeilingObject - 0.0...1.0 chance of generating Object on a ceiling on each corridor segment;
float:chanceOfRoom - 0.0...1.0 chance of generating room on each corridor segment;
float:chanceOfSideCorridor - 0.0...1.0 chance of generating orthogonal corridor ob each corridor segment (recursion alert. 1.0 will cause Space-n-Time to tear appart)
boolean:allowSideCorridors - allow generation of side corridors;
boolean:allowVerticalLadders - allow generation of vertical ladders (more than 1 up or down);
boolean:allowHorizontalLadders - allow generation of horizontal staircases (1 up or down);
boolean:allowLaddersDown - allow ladders\staircases go down;
boolean:allowLaddersUp- allow ladders\staircases go up;
boolean:allowRooms - allow generation of rooms;
Vector3d:minRoomSize - stores minimum width, height, length of a room as X Y and Z;
Vector3d:maxRoomSize - stores maximum width, height, length of a room as X Y and Z;
long:GenerationSeed - seed for a generation. if zero - will be used random seed;
StringArray:RoomTileSets - preset tilesets to use for a rooms. If empty - tilesets folder will be scaned for avaliable tilesests;
StringArray:CorridorTileSets - preset tilesets to use. If empty for a staircases and corridors - tilesets folder will be scaned for avaliable tilesests;
Objects
Vector3d:CntOff - center offset for a object. See Objects for explain;
boolean:allowSlopes - hexagonal patern has diagonal walls. If true - this wall\railing\window\staircase object will be shifted (i.e. straight wall will become diagonal);
boolean:isSlope - means this object is already shifted to fit diagonal places. Will not be generated in rectangular patern;
Vector3d:ObjSize - size of a object in segments ( X - ammound of segments required to fit to the right, Y - above, Z - in facing direction)(If you want some like barier, that goes from wall you should use like (1,1,2) size)
boolean:allowHex - allow this object to be generated in hexagonal patern;
boolean:allowRect - allow this object to be generated in rectangular patern;
boolean:isFloorObject - this object will be spawned on floor and could be rotated by 90,180,270 degs by generator to fit in place;
boolean:isCeilingObject - this object will be spawned on ceiling and could be rotated by 90,180,270 degs by generator to fit in place;
boolean:isWallObject - this object will be spawned on a wall.
Vector3d:FloorDist - minimum and maximum distance to floor as X and Y (like a 6 block high chandelier should not touch a floor or ches should not be generated 5 block above ground);
Vector3d:CeilingDist - minimum and maximum distance to ceiling as X and Y;
Current functions for now:
Generation of non straight corridor;Adding some more corridors orthogonal to generated one;Generating staircases (Vertical and horisontal, but vertical not even tested);Generating rooms;Applying zones and tilesets to generated corridors and rooms;Generating appereance of generated structure;Generation of objects inside of structure;Rectangular and Hexagonal paterns;
Download
AdfLy
Direct GoogleDrive
Req:
Minecraft 1.11.2
Forge (built with recomended 1.11.2)
Generation concept
So as said this generation is made to be more random than, i.e. vanilla minecraft's stronghold generator.
All of this cogs are rotating around abstract object "ZedStatCube" or "StructureSegment". This segment is a cube of certain size (in theory size can be any. All is limited to size of a MC block; In practice only 5 and 6 blocks length are supported). Size of a segments represents count of blocks (So 5 sized segment is a 5x5x5 cube of MC blocks). Segments placed side by side to make a beatifull line.
At first only "Main corridor" is generated and then new corridors are added to it like branching tree. Then rooms added like leaves.
When all segments generated and ordered begins generation of real blocks (Minecraft ones).
If segment has no neighbor it will generate WallObject (or Floor\CeilingObject if no segment under or above).
Wall\Floor\CeilingObjects are stored as different file (as above "external object"). They have array of blocks to place, offset, maximum and minimum distance to a floor and\or ceiling, allowence to be generated in hexagonal\rectangular paterns.
AdditionalObjects (like some random chests, columns, monster spawners, decorative) generated inside of segments. AdditionalObjects have sizes (like 0x0x0(in segments) for a torch cuz it occupies only wall it placed on or 2x1x2(in ssegments) for a EndPortal cuz it occupies aprox 10x6x10 blocks).
tl;dr
In the end not only corridors and rooms itself generated randomly, but content is random too.
Using ingame
For generation itself there is 2 options.
Using Commands (see Commands section) and using [testingzrg:zrggen] item (Right mouse button).
Items generates structure in coords (xyz:0 140 0) for a client only (Thus interacting with blocks or reentering world will cause all to disappear (Useful for debugging cuz you dont need to clean entire world))
Commands will generate structure using given external file for generation settings and on given coords.
Also as said above generator uses external files for generation. Anyone can make tiles and destribute them. Commands are used.
tl;dr
Clientside and Serverside generation are posible, but only manual.
Commands
All commands starts with /zrg
Commands are:
Positions (look at required block when executing command):
Actions:
When saving or loading:
As file path will be used:
[MinecraftFolder]/ZedRandomGenerator/Tilesets/[TileSetName]/[SegmentSize]/[ObjectType]/[ObjectName].jzba
so executing command:
/zrg save generic 5 wall brickWall true
will save your current copied (by command /zrg copy in region defined by points hpos1 and hpos2 (in any order) ) blocks in:
[MinecraftFolder]/ZedRandomGenerator/Tilesets/generic/5/wall/ as a brickWall.jzba file.
True in the end means "Use Google's Gson serialization (saving) methods" (False is only for debug for now).
/zrg load does similar thing, but it loads blocks from file into clipboard.
/zrg hposcenter defines offset for a object. Due to random size of objects center of blocks array can be missaligned with generator's meanings of a center, so this is used (see below for more info)
/zrg hposair used to define block, that will be replaced by air during "Paste" in world. Air blocks saved as NULL's so the wont replace any blocks.
If you want to makre Window not as "wall object", but as a "Object placed on a wall" (i.e. when tou want 2x2 window or some like hole in wall or roof\floor) you want some blocks of walls to be replaced with air. Pick some block, that not used in your object and define it as Air block by this command. Thus you have not be woried by clipping some walls by your picking wrong points when copying.
/zrg rotate and /zrg mirror used to manipulate blocks in clipboard.
/zrg spawn spawns object in clipboard.
/zrg copy copies all blocks (except air) in your region defined by points hpos1 and hpos2 and remembers current hposcenter offset. After copy you should set hposcenter again.
/zrg generate loads file [MinecraftFolder]/ZedRandomGenerator/Tilesets/[GenerationSettings].zgen and reads all parameters in it and then generates structure begining in point set by [X][Y][Z].
You can make your generation settings by editing\copying\downloading other's .zgen files. See Editing Parameters for more info.
Objects
Generator uses multiple different objects when making structure.
Walls, Objects affected by a FloorDist and CeilingDist parameters, that defines ther minimum and maximum distance to floor\ceiling (i.e. you don want to generate chest 5 blocks above ground or generate support column not touching floor)
When saving objects should be faced north (negative Z)
Center (Hposcenter) for floor\ceiling\objects on the floor is center of a segment's floor.
Center for others - see pic:
tl;dr
there is alot of different objects
Editing Parameters
ZRG and it's objects has many parameters. All parameters stored in .zgen for a generator or .jzba for objects files. Those files are camouflaged Json files, so use Notepad (or Notepad++) to edit.
Generator:
Objects
tl;dr
20 vars for generator and 11 vars for objects.
No pics - no clicks