Skip to content

VisualActor

Examples

Example 1

<VisualActor>
  <Actor>
    units/hellenes/infantry_spearman_b.xml
  </Actor>
</VisualActor>

Example 2

<VisualActor>
  <Actor>
    structures/hellenes/barracks.xml
  </Actor>
  <FoundationActor>
    structures/fndn_4x4.xml
  </FoundationActor>
</VisualActor>

XML Elements

The following elements can be used within this component:

VisualActor

Actor

Filename of the actor to be used for this unit

Type: text

Path: VisualActor/Actor

FoundationActor

Filename of the actor to be used the foundation while this unit is being constructed

Type: text

Path: VisualActor/FoundationActor

Foundation

Used internally; if present, the unit will be rendered as a foundation

Path: VisualActor/Foundation

ConstructionPreview

If present, the unit should have a construction preview

Path: VisualActor/ConstructionPreview

ActorOnly

Used internally; if present, the unit will only be rendered if the user has high enough graphical settings.

Path: VisualActor/ActorOnly

SilhouetteDisplay

Type: boolean (true or false)

Path: VisualActor/SilhouetteDisplay

SilhouetteOccluder

Type: boolean (true or false)

Path: VisualActor/SilhouetteOccluder

SelectionShape

Path: VisualActor/SelectionShape

Bounds

Determines the selection box based on the model bounds

Path: VisualActor/SelectionShape/Bounds

Footprint

Determines the selection box based on the entity Footprint component

Path: VisualActor/SelectionShape/Footprint

Box

Sets the selection shape to a box of specified dimensions

Path: VisualActor/SelectionShape/Box

Cylinder

Sets the selection shape to a cylinder of specified dimensions

Path: VisualActor/SelectionShape/Cylinder

VisibleInAtlasOnly

Type: boolean (true or false)

Path: VisualActor/VisibleInAtlasOnly

ShadowsCast

Type: boolean (true or false)

Path: VisualActor/ShadowsCast

ShadowsReceive

Type: boolean (true or false)

Path: VisualActor/ShadowsReceive

RELAX NG Grammar

<define name="component.VisualActor">
  <element name="VisualActor">
    <interleave>
      <element name="Actor"/>
      <optional>
        <element name="FoundationActor"/>
      </optional>
      <optional>
        <element name="Foundation">
          <empty/>
        </element>
      </optional>
      <optional>
        <element name="ConstructionPreview">
          <empty/>
        </element>
      </optional>
      <optional>
        <element name="ActorOnly">
          <empty/>
        </element>
      </optional>
      <element name="SilhouetteDisplay">
        <data type="boolean"/>
      </element>
      <element name="SilhouetteOccluder">
        <data type="boolean"/>
      </element>
      <optional>
        <element name="SelectionShape">
          <choice>
            <element name="Bounds">
              <empty/>
            </element>
            <element name="Footprint">
              <empty/>
            </element>
            <element name="Box">
              <attribute name="width">
                <data type="decimal">
                  <param name="minExclusive">
                  </param>
                </data>
              </attribute>
              <attribute name="height">
                <data type="decimal">
                  <param name="minExclusive">
                  </param>
                </data>
              </attribute>
              <attribute name="depth">
                <data type="decimal">
                  <param name="minExclusive">
                  </param>
                </data>
              </attribute>
            </element>
            <element name="Cylinder">
              <attribute name="radius">
                <data type="decimal">
                  <param name="minExclusive">
                  </param>
                </data>
              </attribute>
              <attribute name="height">
                <data type="decimal">
                  <param name="minExclusive">
                  </param>
                </data>
              </attribute>
            </element>
          </choice>
        </element>
      </optional>
      <element name="VisibleInAtlasOnly">
        <data type="boolean"/>
      </element>
      <optional>
        <element name="ShadowsCast">
          <data type="boolean"/>
        </element>
      </optional>
      <optional>
        <element name="ShadowsReceive">
          <data type="boolean"/>
        </element>
      </optional>
    </interleave>
  </element>
</define>