Skip to main content

Structures

Structures are sets of blocks that can be dynamically copied into the world in response to match events. The original structure is built into the map by the mapmaker and defined in XML with regions. When the match loads, the original structures will be saved and cleared from the world.

Structures are brought to life by the <dynamic> element. This is an XML construct that causes a structure to appear at a specified location in reaction to a given filter. Whenever the filter is in a passing state (when it has a value of ALLOW or ABSTAIN), the structure will appear. When the filter is not passing, (when its value is DENY), the structure will disappear.

Structures are a very powerful feature that can be used to implement an endless variety of custom game mechanics.

Structures Element

ElementDescriptionValue/Children
<structures> </structures>Node containing all structures and dynamics.Structure and Dynamic Elements
Sub-elements
<structure>Defines a block structure that is part of the map.Structure Attributes
<dynamic>Causes a structure to be placed/removed at some location in reaction to a filter.Dynamic Attributes

Structure Attributes

ElementDescriptionValue/ChildrenDefault
idRequiredUnique identifier used to reference this structure from other places in the XML.String
regionPropertyRequiredA single region containing this structure.Cuboid Region
originA location used as the reference point when specifying destination points for the structure.X,Y,ZLow corner of region bounding box
airWhether air blocks should be considered part of the structure. If true, empty blocks in the structure's region will be copied along with it, clearing any blocks at the destination. If false, air blocks are not copied and the structure is mixed in with blocks at the destination.true/falsefalse
clearWhether to clear the original structure as soon the match loads. If true, the structure's region will be filled with air, and players will never see it. If false, the original structure is not modified.true/falsetrue

Dynamic Attributes

ElementDescriptionValue/ChildrenDefault
idUnique identifier used to reference this dynamic from other places in the XML.String
structureThe id of the structure to place.Structure ID
filterPropertyFilter used to determine when a structure is placed when trigger allows.Filteralways (structure is permanently placed)
triggerPropertyRequiredDynamic filter which triggers placement and clearing of structures.Dynamic Filter
locationThe location to place the structure at. The structure's origin will be at this point.
Mutually exclusive with offset.
X,Y,Z
offsetRelative position to place the structure at. The structure will be translated by this amount from its original location.
Mutually exclusive with location.
X,Y,Z0,0,0 (structure placed at its original location)

Examples

<structures>
<!-- Define a 25x2x7 cuboid structure called blue-bridge -->
<!-- The original structure is high in the sky around 0,0 -->
<structure id="blue-bridge" air="false">
<region>
<cuboid min="0,192,0" size="25,2,7"/>
</region>
</structure>

<!-- Define a cylindrical structure called tower, using a close fitting cuboid -->
<!-- The original structure is built in an area outside the map, around 400,400 -->
<structure id="tower" origin="400,64,400">
<region>
<cuboid min="397,64,397" size="6,12,6"/>
</region>
</structure>

<!-- Make blue-bridge appear whenever Blue Team owns the control-point called "hill" -->
<!-- The bridge will appear 128 blocks directly below it's original location -->
<dynamic structure="blue-bridge" offset="0,-128,0">
<filter>
<captured team="blue-team">hill</captured>
</filter>
</dynamic>

<!-- Start the match with a tower at 36,64,0 -->
<!-- After 5 minutes, move the tower to -36,64,0 -->
<!-- After 10 minutes, remove the tower -->
<dynamic structure="tower" location="36,64,0">
<filter>
<not>
<time>5m</time>
</not>
</filter>
</dynamic>

<dynamic structure="tower" location="-36,64,0">
<filter>
<all>
<time>5m</time>
<not>
<time>10m</time>
</not>
</all>
</filter>
</dynamic>
</structures>