Skip to content

Structure Configuration

Ryandw11 edited this page Mar 20, 2023 · 4 revisions

This page is for CustomStructure 1.9.0 and above (the most recent version of the plugin). Click here for the older structure configuration formatting guide.


Creating a New Structure

To create a new structure from in-game all you need to do is run the following command:

/cstructure create {name} {schematic}

See this page for how to create a schematic.

You can also create structures manually by placing the file StructureName.yml in the CustomStructures\structures folder (where StructureName is the name of your structure). Don't forget to add your structure to the config.yml file to enable it when using this method.

Configuring a Structure

There two ways structures are configured:

  1. Using the structure configuration file.
  2. In-Game using structure signs in schematics.

Both are methods are used together to create a coherent a structure.

Structure Configuration Files

Structure configuration files are YAML files which are used to define the properties of a structure. These files are located in the CustomStructures\structures folder. The configuration file is split up into the following format:

StructurePropertySection:
   Property1: 20
   Property2: true
   Property3:
     - Item1
     - Item2

Structure Property Sections are sections that group together related structure properties. Each Property Section is given its own page on the wiki, so to learn more about a specific section, you will need to visit the section specific page. Each Section and Property is given a Quick Reference section, which allows you to quickly see the following information about a property:

  1. If the property/section is required.
  2. What type of value a property holds.
  3. What is the default value of a property or default behavior of a section.

Structure Property Sections

Plugin Defined Structure Property Sections

Developers of other plugins can define custom property sections which can be used. These custom structure property sections are used in the same way as the built-in ones. An example of a plugin define property section is the one provided by the CSCustomBiome addon.
See the Developer API page for more information on how to create one.

Sign Configuration

Sign configurations are used to place objects within structures. These objects include NPCs, Mobs, SubSchematics, and more. Sign configurations work by placing signs with a specific prefix on the first line in a schematic. Those signs are then replaced and the specified functionality is triggered. Sign configurations also work in placed SubSchematics, not just in the main schematic.

Sign Configurations

  • Mob Signs
    • Spawn vanilla mobs or mobs from the MythicMobs plugin.
  • SubSchematics
    • Spawn SubSchematics in your structure. (Includes structure configuration portion).
  • NPC Signs
    • Spawn custom NPCs from the Citizens2 plugin.
  • Command Signs
    • Run commands when a structure is placed.

Custom Sign Configurations

Developers can define custom sign configurations in their plugins that will be handled by CustomStructures.
See the Developer API page for more information.

Clone this wiki locally