ANI

From Dragon Age Toolset Wiki
Jump to: navigation, search

Animation sequence: holds single animation sequence. These are created via external Tools. See Article: 3rd party extensions

Models ,which are animatable, will be animated with a animation sequence. See Article: Model

ani.xml schema

See [1] for information on the RELAX NG 1.0 XML schema format. For a free converter/verifier, see [2].

<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <start>
    <element name="Animation">
      <optional>
        <attribute name="Additive">
          <data type="NCName"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="IgnoreScale">
          <data type="NCName"/>
        </attribute>
      </optional>
      <attribute name="Length">
        <data type="decimal"/>
      </attribute>
      <attribute name="Name">
        <data type="NCName"/>
      </attribute>
      <optional>
        <attribute name="Override">
          <data type="NCName"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="QuaternionCompressedSize">
          <data type="integer"/>
        </attribute>
      </optional>
      <optional>
        <element name="Meta">
          <element name="CombatRange">
            <attribute name="Value">
              <data type="decimal"/>
            </attribute>
          </element>
          <optional>
            <element name="GOBAnim">
              <attribute name="Value">
                <data type="integer"/>
              </attribute>
            </element>
          </optional>
        </element>
      </optional>
      <zeroOrMore>
        <element name="AnimationNode">
          <attribute name="Elements">
            <data type="integer"/>
          </attribute>
          <attribute name="ExportName">
            <data type="NMTOKEN"/>
          </attribute>
          <attribute name="Source">
            <data type="NCName"/>
          </attribute>
          <attribute name="SourceType">
            <data type="NCName"/>
          </attribute>
          <attribute name="Target">
            <data type="NCName"/>
          </attribute>
          <element name="KeyFrame">
            <text/>
          </element>
        </element>
      </zeroOrMore>
    </element>
  </start>
</grammar>

Example .ANI.xml File

<?xml version="1.0" encoding="UTF-8"?>
<Animation Length="decimal" Name="string">
<!-- Attributes:
		Length is the length of the animation in seconds
		Name is the name of the animation
-->
<!-- Optional Attributes: 
	Additive="string" -- True or False (additive or rigid)
	IgnoreScale="string" -- probably True or False
	Override="string" -- True or False
	QuaternionCompressedSize="int" -- size of compressed quaternion in bits (32 or 64)
-->
	
	<!-- Optional Element -->
	<Meta>
		<CombatRange Value="decimal"/>
		<!-- Optional Element -->
		<GOBAnim Value="int"/> 1 or 0, enables "GAD" Transform (allows free horizontal movement of the actor), requires GOB transformation and rotation values
	</Meta>
	
	<!-- 0 or more of these, obviously having at least one would be usefull... It appears that each bone or node (not nodemeshes) gets one -->
	<AnimationNode Elements="int" ExportName="?string?" Source="string" Target="string" SourceType="string">
	<!-- Attributes:
		Element refers to the number of elements in the data type. eg: 3 for a vector, 4 for a quaternion
		ExportName is the name the node will take on export
		Source is the type of the source 
		Target is the type of the target
		SourceType seems to always be "KeyFrame"
	-->
	<!-- Notes:
		For the Source and Target I have seen "Vector", "Quaternion", "Float32" and "Color4" with Elements="3", Elements="4", 
			Elements="1" and Elements="4" respectively
		Vector was used for position info, Quaternion for rotation info, Float32 and Color4 for vfx info like birthrate, alpha and colour
	-->
		<KeyFrame>
			data <!-- starts with <![CDATA[ followed with lines of the format "time ntuple" where time is the time in seconds of the
						keyframe and ntuple is the components of the source type (the 3 elements in a vector or 4 elements in a quaternion or 1 element in a float)
						Therefore there will be Element+1 numbers per line
						ends with ]]>
				 -->
		</KeyFrame>
	</AnimationNode>
</Animation>