Modules

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 are cleared from the world and saved.

Structures are brought to life by something called a dynamic. 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.

Currently, only objective filters, time filters, and flag filters can be used with dynamic structures, as well as filter modifiers.
Other filter types may be supported in the future.

Element Description
<structures> </structures> Element containing all structures and dynamics
Sub-elements
<structure> Defines a block structure that is part of the map
<dynamic> Causes a structure to be placed/removed at some location in reaction to a filter
Structure Attributes
Attribute Description Value Default
id Unique identifier used to reference the structure from other places in the XML. String
region Property Required A single region containing the structure. Cuboid Region
origin A location used as the reference point when specifying destination points for the structure. X,Y,Z Low corner of region bounding box.
air Whether 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/false false
clear Whether to clear the original structure when 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/false true
Dynamic Attributes
Attribute Description Value Default
id Unique identifier used to reference the dynamic from other places in the XML. String
structure id of the structure to place. Structure ID
filter Property Conditions under which the structure is placed.
Only <objective> , <time> , and flag-related filters are currently supported.
Filter <always/>
(structure is permanently placed)
trigger Property Dynamic conditions under which the structure is placed. Dynamic Filter
location Location to place the structure at. The structure's origin will be at this point.
This is an alternative to offset
X,Y,Z
offset Relative position to place the structure at. The structure will be translated by this amount from it's original location.
This is an alternative to location
X,Y,Z 0,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>
            <objective team="blue-team">hill</objective>
        </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>