Skip to content

Important Structure Properties

Ryandw11 edited this page Mar 19, 2023 · 2 revisions

Important Features

At the top of every structure configuration file are the important properties that all structures must have. They are:

  • Schematic File
  • Structure Probability

Schematic File

Structures are based on World Edit schematics. Every structure needs to have a base schematic that it will paste into the world when the structure spawns. In order for a schematic to be used by CustomStructures, it needs to be placed in the CustomStructures\schematics folder. You can import any World Edit schematic to use, or create a custom one using the /cstruct createSchem command.

To define the schematic used, the global level schematic property is set at the top of the file.

Schematic: 'demo.schem'

Did you know? You can define additional schematics to be pasted in when a structure spawns to create more advanced structures (like dungeons or villages). See SubSchematics for more information.

Compiled Schematics

Compiled schematics speed up the time it takes to spawn a large structure. It works by pre-determining all the positions of the signs in the schematic that would need to be replaced. See how to create them here.

CompiledSchematic: 'demo.cschem'

Note: Compiled schematics should only be used on static structures (structures that don't recursively spawn subscheamtics).

Structure Probability

Structures spawn in CustomStructures based upon their probability. The structure tries to spawn a structure in every new chunk, and probability is one of the factors that determine whether or not a structure spawns. You define the probability using the Probability property.

Probability:
  Numerator: 1
  Denominator: 500

You can think of the probability as a fraction, so the probability above is 1/500. Another way to think of it is that for every 500 new chunks, 1 structure will spawn, making it have a 0.2% chance of spawning.

Remember: Probability is only one of the factors that determines if a structure spawn. Other factors such as biome, block, and structure distance limitations will also influence if a structure spawns. Having tight spawn conditions means that the rarity of your structure will increase exponentially. If you have a structure with tight spawn conditions, consider giving it a higher probability of spawning while also increasing its priority so that it will be picked to spawn over other structures more often.

Structure Priorities

Structures are chosen to be spawn in the order of a special PriorityQueue. The system works in a way so that structures with the lowest probability of spawning, will be tested first. This means that a rare structure will be chosen to spawn instead of a common one if all the conditions are meet. You can also manually define priority levels for a structure. By default all structures have a priority level of 1. The higher the priority level, the more priority it gets when spawning. In the event of a tie in priority level, the structure with the lowest probability is given precedence.
To define a custom priority, just add the Priority field under the probability section.

Probability:
  Numerator: 1
  Denominator: 500
  Priority: 10
Clone this wiki locally