Skip to content

BuildRestrictions

Examples

Example

<BuildRestrictions>
  <BuildRestrictions>
    <PlacementType>
      land
    </PlacementType>
    <Territory>
      own
    </Territory>
    <Category>
      Structure
    </Category>
    <Distance>
      <FromClass>
        CivilCentre
      </FromClass>
      <MaxDistance>
        40
      </MaxDistance>
    </Distance>
  </BuildRestrictions>
</BuildRestrictions>

XML Elements

The following elements can be used within this component:

BuildRestrictions

PlacementType

Specifies the terrain type restriction for this building.

Path: BuildRestrictions/PlacementType

Territory

Specifies territory type restrictions for this building.

Path: BuildRestrictions/Territory

Category

Specifies the category of this building, for satisfying special constraints. Choices include: Academy, ArmyCamp, CivilCentre, Colony, Council, Dock, Embassy, Fortress, GreatTower, ImperialCourt, ImperialMinistry, Kennel, Library, Lighthouse, Monument, Palace, Pillar, PyramidLarge, Stoa, Structure, TempleOfAmun, TempleOfIsis, TempleOfVesta, Theater, Tower, Wall, Wonder, Yakhchal

Type: text

Path: BuildRestrictions/Category

MatchLimit

Specifies how many times this entity can be created during a match.

Type: positive integer (e.g. 1 or 5)

Path: BuildRestrictions/MatchLimit

Distance

Specifies distance restrictions on this building, relative to buildings from the given category.

Path: BuildRestrictions/Distance

FromClass

Path: BuildRestrictions/Distance/FromClass

MinDistance

Type: positive integer (e.g. 1 or 5)

Path: BuildRestrictions/Distance/MinDistance

MaxDistance

Type: positive integer (e.g. 1 or 5)

Path: BuildRestrictions/Distance/MaxDistance

RELAX NG Grammar

<define name="component.BuildRestrictions">
  <element name="BuildRestrictions">
    <interleave>
      <element name="PlacementType">
        <choice>
          <value>
          </value>
          <value>
          </value>
          <value>
          </value>
        </choice>
      </element>
      <element name="Territory">
        <list>
          <oneOrMore>
            <choice>
              <value>
              </value>
              <value>
              </value>
              <value>
              </value>
              <value>
              </value>
            </choice>
          </oneOrMore>
        </list>
      </element>
      <element name="Category"/>
      <optional>
        <element name="MatchLimit">
          <data type="positiveInteger"/>
        </element>
      </optional>
      <optional>
        <element name="Distance">
          <interleave>
            <element name="FromClass">
              <optional>
                <attribute name="context"/>
              </optional>
              <optional>
                <attribute name="comment"/>
              </optional>
              <text/>
            </element>
            <optional>
              <element name="MinDistance">
                <data type="positiveInteger"/>
              </element>
            </optional>
            <optional>
              <element name="MaxDistance">
                <data type="positiveInteger"/>
              </element>
            </optional>
          </interleave>
        </element>
      </optional>
    </interleave>
  </element>
</define>