Hytale Modding
World GenerationTechnical Hytale Generator

Patterns

Validates a world location based on its Material composition and other criteria.

Official Hytale Documentation
All content on this section is provided by Hypixel Studios Canada Inc. and is presented without any substantial changes, aside from visual design adjustments by the HytaleModding Team.

BlockType

Checks against the block's Material.

Parameters:

NameDescription
Materialblock Material.

BlockSet

Checks if the block's Material belongs to the BlockSet.

Parameters:

NameDescription
BlockSetBlockSet slot.

Offset

Offsets the child Pattern by the given vector.

Parameters:

NameDescription
PatternPattern slot.
Offset3D integer vector. The direction to offset the child Pattern in.

Floor

Checks if there is a floor below the position. The Origin validates the position and the Floor validates right under the position. For a simple Floor configuration use BlockType or BlockSet Patterns in those slots.

Example of Floor

Parameters:

NameDescription
FloorPattern slot. Validates the block under the Origin position.
OriginPattern slot. Validates the block at the Origin position.

Ceiling

Checks if there is a ceiling above the world position. The Origin validates the position and the Ceiling validates right above the position. For a simple Ceiling configuration use BlockType or BlockSet Patterns in those slots.

Example of Ceiling

Parameters:

NameDescription
CeilingPattern slot. Validates the coordinate above the Origin position.
OriginPattern slot. Validates the coordinate at the Origin position.

Wall

Checks if there is a wall next to the world position. For a simple Wall configuration use BlockType or BlockSet Patterns in those slots. You can specify which directions are valid for the wall using the N, S, E, W string values.

The size of the wall can be 1x1 blocks or larger.

Parameters:

NameDescription
WallPattern slot. Validates the coordinate next to the Origin position.
OriginPattern slot. Validates the coordinate at the Origin position.
Directionslist of string directional values: "N", "S", "E" or "W".
RequireAllDirectionsBoolean. If true then all the directions you put in the list need to validate for the Pattern to validate a position. Otherwise only one of the list directions needs to validate.

Surface

Validates if presented with a surface. A surface is a transition from one set of materials to another. For example, a soil floor to place a large tree on would be a soil surface in an air medium. The surface’s facing, the surface’s area, the medium’s area and the transition gap are configurable.

The surface can face 6 orthogonal directions: up, down, north, south, east and west. A surface’s facing direction is determined by its Facings. Furthermore, you can specify more than one facing and use the RequireAllFacings parameter. When a surface faces up, the medium is at the origin and the surface is below the origin. See the diagram below that shows a side-view of an up-facing surface..

Example of Surface facing up

The minimum area required by the surface and medium materials is determined by the SurfaceRadius and the MediumRadius values. A radius of 0.0 would result in an area of 1x1 block, while an area of 2.0 would result in a disc of a 5 block diameter. The diagram below shows that relationship with a top-down view of an up-facing surface.

Example of Surface and Medium area

You can make the surface detection less strict by configuring a gap between the medium and the surface. That gap would allow some roughness in between the medium and the surface. The diagrams below show how that works.

Example of Surface Gap 0

Example of Surface Gap 1

Example of Surface Gap 2

Example of Surface Gap 3

Example of Surface Gap 4

Parameters:

NameDescription
SurfacePattern slot. Validates every block of the surface.
MediumPattern slot. Validates every block of the medium.
SurfaceRadiuspositive decimal number greater or equal to 0.0. Determines the size of the surface area.
MediumRadiuspositive decimal number greater or equal to 0.0. Determines the size of the medium area.
SurfaceGapinteger greater or equal to 0.
MediumGapinteger greater or equal to 0.
Facingslist of string facing values: "N", "S", "E", "W", "U", "D".
RequireAllFacingsBoolean. If true then the Pattern will only validate if all Facings validate.

Gap

Validates if presented with a gap. In this context a gap is some sort of space between two anchors. You must define the space’s valid material type with the GapPattern parameter and the anchors’ valid material types with the AnchorPattern parameter. The GapSize is measured in blocks and represents the distance between the two anchors. The AnchorSize is also measured in blocks and represents the size of the “wall” that is checked when validating the anchors. You can use the DepthUp and DepthDown parameters to ensure that there is enough space under and/or above the Gap’s origin. The diagram below shows the underlying structure of the Gap Pattern.

Example of Gap Pattern

Below is a block-build of the diagram above to show the blocks that a typical Gap Pattern would check. The grey blocks would be checked by the GapPattern and the black blocks would be checked by the AnchorPattern..

Example of Gap Pattern blocks

Setting an AnchorRoughness higher than 0.0 allows non-flat walls to validate as anchors. You should try increasing this value if you don’t get enough matches. The value of this field is also measured in blocks, and is used to trim the ends of the gap check. The diagram below shows that.

Example of Anchor Roughness

Parameters:

NameDescription
GapSizedecimal number greater or equal to 0.0. Determines the distance in blocks between the two anchors forming the gap.
AnchorSizedecimal number greater or equal to 0.0. Determines the size in blocks of the anchor. See the diagrams above for a visual representation.
AnchorRoughnessdecimal number greater or equal to 0.0. Determines how strict the anchor checking is, higher values means less strict. A good strating point is 1.
DepthDowninteger greater or equal to 0. Determines the depth of the gap downward in blocks starting at the origin.
DepthUpinteger greater or equal to 0. Determines the depth of the gap upward in blocks starting at the origin.
Angleslist of decimal numbers representing angles in degree. An angle of 0 is the Z axis, and angle of 90 is the X axis.
GapPatternPattern slot used to validate every block of the gap and depths.
AnchorPatternPattern slot used to validate every block of the acnhors.

Cuboid

Defines a cuboid region relative to the Pattern’s origin. The region is anchored by Min and Max inclusive points. This is similar to the shape of a creative Selection Tool. The SubPattern is tested against every position inside the cuboid. The Cuboid Pattern validates only if all the inner positions are validated by the SubPattern.

Below is a 2D representation of this 3D Cuboid Pattern.

Example of Cuboid Pattern

Parameters:

NameDescription
Mininclusive minimum point of the cuboid relative to the Pattern's origin.
Maxinclusive minimum point of the cuboid relative to the Pattern's origin.
SubPatternPattern slot. The Cuboid uses this Pattern to validate the positions inside itself.

And

Logical operation that validates only if all the Patterns in its list also validate.

Parameters:

NameDescription
Patternslist of Pattern asset slots.

Or

Logical operation that validates if at least one of the Patterns in its list validates.

Parameters:

NameDescription
Patternslist of Pattern asset slots.

Not

Logical operation that validates only where the nested Pattern does not validate.

Parameters:

NameDescription
PatternPattern asset slot.

FieldFunction

This Pattern validates only if the provided Density field at the position is within the specified delimiters. In combination with an And and Or pattern, this Pattern provides more control over the valid positions.

Important: because this Pattern queries a noise field, it can be expensive if placed high in the hierarchy. I recommend setting your Pattern structure such that this Pattern is the last to be tested.The diagram below shows examples of that.

Example of FieldFunction Pattern usage

In the green box, the FieldFunction Pattern runs only on positions with a floor. In the red box, the FieldFunction Pattern runs on every position. The difference between the two scenarios is significant.

Parameters:

NameDescription
FieldFunctionslot for a noise function RootNode.
Delimiterslist of noise value delimiters:
Mindecimal number. Lower inclusive bound of the delimiter.
Maxdecimal number. Higher exclusive bound of the delimiter.

Imported

Imports an exported Pattern.

Parameters:

NameDescription
Namestring. The exported Pattern.