Model Config: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(→‎Animation sources: adding the '"isempty" animation controller.)
(table layout)
Line 130: Line 130:
''Controller names marked by * are freely defined by vehicle turret configs. The values here show the names commonly used for ArmA vehicles.''
''Controller names marked by * are freely defined by vehicle turret configs. The values here show the names commonly used for ArmA vehicles.''


{| border="1" align="center"
{| class="bikitable"
|-  
|-  
! style="color: rgb(0, 0, 102);" | Name || style="color: rgb(0, 0, 102);" | Description || style="color: rgb(0, 0, 102);" | Simulation Classes
! Name !! Description !! Simulation Classes
|-  
|-  
| align="center" width=150px height=25|
| altBaro
| align="center" width=150px height=25|
| The baro altitude.
| align="center" width=150px height=25|
| Aircraft
|-  
|-  
| align="center" width=150px|altBaro
| altRadar
| align="center" width=150px|The baro altitude.
| The radar altitude.
| align="center" width=150px|Aircraft
| Aircraft
|-  
|-  
| align="center" width=150px|altRadar
| cyclicAside
| align="center" width=150px|The radar altitude.
| rotor mast machinery (or rotor) animations based on cyclic controls
| align="center" width=150px|Aircraft
| Helicopter
|-  
|-  
| align="center" width=150px|cyclicAside
| cyclicForward
| align="center" width=150px|rotor mast machinery (or rotor) animations based on cyclic controls
| rotor mast machinery (or rotor) animations based on cyclic controls
| align="center" width=150px|Helicopter
| Helicopter
|-  
|-  
| align="center" width=150px|cyclicForward
| gear
| align="center" width=150px|rotor mast machinery (or rotor) animations based on cyclic controls
| The vehicle's gear.
| align="center" width=150px|Helicopter
| Aircraft
|-  
|-  
| align="center" width=150px|gear
| horizonBank
| align="center" width=150px|The vehicle's gear.
| The banking angle of the vehicle.
| align="center" width=150px|Aircraft
| Aircraft
|-  
|-  
| align="center" width=150px|horizonBank
| horizonDive
| align="center" width=150px|The banking angle of the vehicle.
| The diving angle of the vehicle.
| align="center" width=150px|Aircraft
| Aircraft
|-  
|-  
| align="center" width=150px|horizonDive
| vertSpeed
| align="center" width=150px|The diving angle of the vehicle.
| The vertical speed.
| align="center" width=150px|Aircraft
| Aircraft
|-  
|-  
| align="center" width=150px|vertSpeed
| aileron
| align="center" width=150px|The vertical speed.
| The main aileron control surfaces.
| align="center" width=150px|Aircraft
| Airplane
|-  
|-  
| align="center" width=150px|aileron
| aileronB
| align="center" width=150px|The main aileron control surfaces.
| The bottom speed brake as opening ailerons.
| align="center" width=150px|Airplane
| Airplane
|-  
|-  
| align="center" width=150px|aileronB
| aileronT
| align="center" width=150px|The bottom speed brake as opening ailerons.
| The top speed brake as opening ailerons.
| align="center" width=150px|Airplane
| Airplane
|-  
|-  
| align="center" width=150px|aileronT
| aoa
| align="center" width=150px|The top speed brake as opening ailerons.
| The Angle Of Attack.
| align="center" width=150px|Airplane
| Airplane
|-  
|-  
| align="center" width=150px|aoa
| elevator
| align="center" width=150px|The Angle Of Attack.
| The elevators.
| align="center" width=150px|Airplane
| Airplane
|-  
|-  
| align="center" width=150px|elevator
| flap
| align="center" width=150px|The elevators.
| The flaps.
| align="center" width=150px|Airplane
| Airplane
|-  
|-  
| align="center" width=150px|flap
| rotor
| align="center" width=150px|The flaps.
| The rotors.
| align="center" width=150px|Airplane
| Airplane
|-  
|-  
| align="center" width=150px|rotor
| rudder
| align="center" width=150px|The rotors.
| The rudder.
| align="center" width=150px|Airplane
| Airplane
|-  
|-  
| align="center" width=150px|rudder
| speedBrake
| align="center" width=150px|The rudder.
| The speed brake.
| align="center" width=150px|Airplane
| Airplane
|-  
|-  
| align="center" width=150px|speedBrake
| direction
| align="center" width=150px|The speed brake.
| The orientation of the vehicle.
| align="center" width=150px|Airplane
| Any
|-  
|-  
| align="center" width=150px|direction
| fuel
| align="center" width=150px|The orientation of the vehicle.
| The fuel level.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|fuel
| oil
| align="center" width=150px|The fuel level.
| IndicatorOilTemp
| align="center" width=150px|Any
| ?
|-  
|-  
| align="center" width=150px|oil
| gmeter
| align="center" width=150px|IndicatorOilTemp
| The G-forces.
| align="center" width=150px|?
| Any
|-  
|-  
| align="center" width=150px|gmeter
| rpm
| align="center" width=150px|The G-forces.
| The rpm of the vehicle. Used in rpm indicators.
| align="center" width=150px|Any
| Any(except Ship)
|-  
|-  
| align="center" width=150px|rpm
| speed
| align="center" width=150px|The rpm of the vehicle. Used in rpm indicators.
| The speed of the vehicle. Used in speed indicators. (WARNING: 'maxValue' and 'minValue' should be in meters per second)
| align="center" width=150px|Any(except Ship)
| Any
|-  
|-  
| align="center" width=150px|speed
| time
| align="center" width=150px|The speed of the vehicle. Used in speed indicators. (WARNING: 'maxValue' and 'minValue' should be in meters per second)
| Timer-based input.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|time
| <div id="clockHour">clockHour</div>
| align="center" width=150px|Timer-based input.
| The current time in hours.
| align="center" width=150px|Any
| Any (including e.g. Weapon)
|-  
|-  
| align="center" width=150px|<div id="clockHour">clockHour</div>
| clockMinute
| align="center" width=150px|The current time in hours.
| The current time in minutes. Derived from [[#clockHour|clockHour]].
| align="center" width=150px|Any (including e.g. Weapon)
| Any (including e.g. Weapon)
|-  
|-  
| align="center" width=150px|clockMinute
| clockSecond
| align="center" width=150px|The current time in minutes. Derived from [[#clockHour|clockHour]].
| The current time in seconds. Moves discreetly every second and independently from [[#clockHour|clockHour]].
| align="center" width=150px|Any (including e.g. Weapon)
| Any (including e.g. Weapon)
|-  
|-  
| align="center" width=150px|clockSecond
| damage
| align="center" width=150px|The current time in seconds. Moves discreetly every second and independently from [[#clockHour|clockHour]].
| Current damage level (0=healthy, 1=destroyed)
| align="center" width=150px|Any (including e.g. Weapon)
| Any
|-  
|-  
| align="center" width=150px|damage
| user
| align="center" width=150px|Current damage level (0=healthy, 1=destroyed)
| User defined (script driven) animation
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|user
| direct
| align="center" width=150px|User defined (script driven) animation
| Like user, but immediate, no smooth transition.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|direct
| pedals
| align="center" width=150px|Like user, but immediate, no smooth transition.
| The pedals.
| align="center" width=150px|Any
| Bicycle
|-  
|-  
| align="center" width=150px|pedals
| damper
| align="center" width=150px|The pedals.
| The suspension of the vehicle. Currently only works with type [[#translationY|translationY]].
| align="center" width=150px|Bicycle
| Car, Tank, Aircraft, Motorcycle
|-  
|-  
| align="center" width=150px|damper
| FrontDamper
| align="center" width=150px|The suspension of the vehicle. Currently only works with type [[#translationY|translationY]].
| The suspension of the front wheels of the vehicle.
| align="center" width=150px|Car, Tank, Aircraft, Motorcycle
| Car?
|-  
|-  
| align="center" width=150px|FrontDamper
| BackDamper
| align="center" width=150px|The suspension of the front wheels of the vehicle.
| The suspension of the back wheels of the vehicle.
| align="center" width=150px|Car?
| Car?
|-  
|-  
| align="center" width=150px|BackDamper
| drivingWheel
| align="center" width=150px|The suspension of the back wheels of the vehicle.
| The orientation of the steering wheel. Used for the steering wheel and steered wheels.
| align="center" width=150px|Car?
| Car, Ship, Motorcycle
|-  
|-  
| align="center" width=150px|drivingWheel
| *mainGun
| align="center" width=150px|The orientation of the steering wheel. Used for the steering wheel and steered wheels.
| The main gun.
| align="center" width=150px|Car, Ship, Motorcycle
| Car, Tank, Helicopter, Ship
|-  
|-  
| align="center" width=150px|*mainGun
| *mainTurret
| align="center" width=150px|The main gun.
| The main turret.
| align="center" width=150px|Car, Tank, Helicopter, Ship
| Car, Tank, Helicopter, Ship
|-  
|-  
| align="center" width=150px|*mainTurret
| wheel
| align="center" width=150px|The main turret.
| Normal wheels that turn based on moving forward.
| align="center" width=150px|Car, Tank, Helicopter, Ship
| Car, Airplane, Motorcycle
|-  
|-  
| align="center" width=150px|wheel
| noseWheelTurn
| align="center" width=150px|Normal wheels that turn based on moving forward.
|  
| align="center" width=150px|Car, Airplane, Motorcycle
| Airplane
|-  
|-  
| align="center" width=150px|noseWheelTurn
| compassArrow
| align="center" width=150px|
| The arrow.
| align="center" width=150px|Airplane
| Compass
|-  
|-  
| align="center" width=150px|compassArrow
| compassCover
| align="center" width=150px|The arrow.
| The cover.
| align="center" width=150px|Compass
| Compass
|-  
|-  
| align="center" width=150px|compassCover
| compassPointer
| align="center" width=150px|The cover.
| The pointer.
| align="center" width=150px|Compass
| Compass
|-  
|-  
| align="center" width=150px|compassPointer
| rotorH
| align="center" width=150px|The pointer.
| The 'horizontal' rotor.
| align="center" width=150px|Compass
| Helicopter
|-  
|-  
| align="center" width=150px|rotorH
| rotorV
| align="center" width=150px|The 'horizontal' rotor.
| The 'vertical' rotor.
| align="center" width=150px|Helicopter
| Helicopter
|-  
|-  
| align="center" width=150px|rotorV
| rotorHDive
| align="center" width=150px|The 'vertical' rotor.
| Tilt of the 'horizontal' rotor.
| align="center" width=150px|Helicopter
| Helicopter
|-  
|-  
| align="center" width=150px|rotorHDive
| rotorVDive
| align="center" width=150px|Tilt of the 'horizontal' rotor.
| Tilt of the 'vertical' rotor.
| align="center" width=150px|Helicopter
| Helicopter
|-  
|-  
| align="center" width=150px|rotorVDive
| support
| align="center" width=150px|Tilt of the 'vertical' rotor.
| The support stand.
| align="center" width=150px|Helicopter
| Motorcycle
|-  
|-  
| align="center" width=150px|support
| *hatchCommander
| align="center" width=150px|The support stand.
| The commander hatch.
| align="center" width=150px|Motorcycle
| Tank
|-  
|-  
| align="center" width=150px|*hatchCommander
| hatchDriver
| align="center" width=150px|The commander hatch.
| The driver hatch.
| align="center" width=150px|Tank
| Tank
|-  
|-  
| align="center" width=150px|hatchDriver
| *hatchGunner
| align="center" width=150px|The driver hatch.
| The gunner hatch.
| align="center" width=150px|Tank
| Tank
|-  
|-  
| align="center" width=150px|*hatchGunner
| *obsGun
| align="center" width=150px|The gunner hatch.
| The observer or commander gun.
| align="center" width=150px|Tank
| Tank
|-  
|-  
| align="center" width=150px|*obsGun
| *obsTurret
| align="center" width=150px|The observer or commander gun.
| The observer or commander turret.
| align="center" width=150px|Tank
| Tank
|-  
|-  
| align="center" width=150px|*obsTurret
| reload
| align="center" width=150px|The observer or commander turret.
| The movement when reloading.
| align="center" width=150px|Tank
| Weapon
|-  
|-  
| align="center" width=150px|reload
| revolving
| align="center" width=150px|The movement when reloading.
| The movement when firing.
| align="center" width=150px|Weapon
| Weapon
|-  
|-  
| align="center" width=150px|revolving
| isempty
| align="center" width=150px|The movement when firing.
| The animation to hold the bolt open when the weapon is empty.
| align="center" width=150px|Weapon
| Weapon
|-  
|-  
| align="center" width=150px|isempty
| turretDir
| align="center" width=150px|The animation to hold the bolt open when the weapon is empty.
| The orientation of the turret.
| align="center" width=150px|Weapon
| Tank
|-  
|-  
| align="center" width=150px|turretDir
| wheelL
| align="center" width=150px|The orientation of the turret.
| The left track wheels.
| align="center" width=150px|Tank
| Tank
|-  
|-  
| align="center" width=150px|wheelL
| wheelR
| align="center" width=150px|The left track wheels.
| The right track wheels.
| align="center" width=150px|Tank
| Tank
|-  
|-  
| align="center" width=150px|wheelR
| scudLauncher
| align="center" width=150px|The right track wheels.
| Phase of scudlaunch.
| align="center" width=150px|Tank
| Scud
|-  
|-  
| align="center" width=150px|scudLauncher
| flag
| align="center" width=150px|Phase of scudlaunch.
| Runs from 0 to 1 as flag is taken from flagpole.
| align="center" width=150px|Scud
| Flagcarrier
|-  
|-  
| align="center" width=150px|flag
| airspeedIndicatorRTD || speed / maxSpeed || RTD helicopter
| align="center" width=150px|Runs from 0 to 1 as flag is taken from flagpole.
|-
| align="center" width=150px|Flagcarrier
| altBaroRTD || altitude in meters || RTD helicopter
|-
| vertSpeedRTD || vertical speed / max speed || RTD helicopter
|-
| attitudeBankRTD || radians || RTD helicopter
|-
| attitudeDiveRTD || radians || RTD helicopter
|-
| skidRTD || speed / helicopter >> maxSpeed || RTD helicopter
|-
| altRadarRTD || altitude above ground in meters || RTD helicopter
|-
| rpm1RTD || engine 1 rmp / designed max rpm || RTD helicopter
|-
| rpm2RTD || engine 2 rmp / designed max rpm || RTD helicopter
|-
| rpm3RTD || engine 3 rmp / designed max rpm || RTD helicopter
|-
| temp1RTD || engine 1 temperature / helicopter >> DamagePropertiesRTD >> maxEngineTemperature || RTD helicopter
|-
| temp2RTD || engine 2 temperature / helicopter >> DamagePropertiesRTD >> maxEngineTemperature || RTD helicopter
|-
| temp3RTD || engine 3 temperature / helicopter >> DamagePropertiesRTD >> maxEngineTemperature || RTD helicopter
|-
| torqueRTD || torque / helicopter >> DamagePropertiesRTD >> maxTorque || RTD helicopter
|-
| mainRotorRPMRTD || Main Rotor RPM / designed max RPM || RTD helicopter
|-
| tailRotorRPMRTD || Tail Rotor RPM / designed max RPM || RTD helicopter
|-
| collectiveRTD || collective (0, -1) || RTD helicopter
|-
| rudderRTD || Pedals (-1, 1) || RTD helicopter
|-
| throttleRTD1 || (0, 1) || RTD helicopter
|-
| throttleRTD2 || (0, 1) || RTD helicopter
|-
| throttleRTD3 || (0, 1) || RTD helicopter
|-
| torqueEng1RTD || (0, 1) || RTD helicopter
|-
| torqueEng2RTD || (0, 1) || RTD helicopter
|-
| torqueEng3RTD || (0, 1) || RTD helicopter
|}
|}
<table style="width: 75%; margin-left: auto; margin-right: auto; border-style: solid; border-width: 2px; padding: 2pt; text-align: center;">
  <tr>
      <td>airspeedIndicatorRTD</td> <td> speed / maxSpeed</td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>altBaroRTD</td> <td> altitude in meters</td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>vertSpeedRTD</td> <td> vertical speed / max speed</td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>attitudeBankRTD</td> <td>radians</td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>attitudeDiveRTD</td> <td>radians</td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>skidRTD</td> <td>speed / helicopter >> maxSpeed</td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>altRadarRTD</td> <td>  altitude above ground in meters</td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>rpm1RTD</td><td>engine 1 rmp / designed max rpm </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>rpm2RTD</td><td>engine 2 rmp / designed max rpm </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>rpm3RTD</td><td>engine 3 rmp / designed max rpm </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>temp1RTD</td><td> engine 1 temperature / helicopter >> DamagePropertiesRTD >> maxEngineTemperature </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>temp2RTD</td><td> engine 2 temperature / helicopter >> DamagePropertiesRTD >> maxEngineTemperature </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>temp3RTD</td><td> engine 3 temperature / helicopter >> DamagePropertiesRTD >> maxEngineTemperature </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>torqueRTD</td><td> torque / helicopter >> DamagePropertiesRTD >> maxTorque </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>mainRotorRPMRTD</td><td> Main Rotor RPM / designed max RPM  </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>tailRotorRPMRTD</td><td> Tail Rotor RPM / designed max RPM </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>collectiveRTD</td><td> collective (0, -1) </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>rudderRTD</td><td> Pedals (-1, 1) </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>throttleRTD1</td><td> (0, 1) </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>throttleRTD2</td><td> (0, 1) </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>throttleRTD3</td><td> (0, 1) </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>torqueEng1RTD</td><td> (0, 1) </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>torqueEng2RTD</td><td> (0, 1) </td> <td>RTD helicopter</td>
  </tr>
  <tr>
      <td>torqueEng3RTD</td><td> (0, 1) </td> <td>RTD helicopter</td>
  </tr>
</table>


=====Animation types=====
=====Animation types=====
Line 458: Line 428:




{| border="1" align="center"
{| class="bikitable"
|-  
|-  
! style="color: rgb(0, 0, 102);" | Type || style="color: rgb(0, 0, 102);" | Description
! Type !! Description
|-  
|-  
| align="center" width=150px height=25|
| rotation
| align="center" width=150px height=25|
| Circular motion.
|-  
|-  
| align="center" width=150px|rotation
| rotationX
| align="center" width=150px|Circular motion.
| Idem, but locked to the X axis.
|-  
|-  
| align="center" width=150px|rotationX
| rotationY
| align="center" width=150px|Idem, but locked to the X axis.
| Idem, but locked to the Y axis.
|-  
|-  
| align="center" width=150px|rotationY
| rotationZ
| align="center" width=150px|Idem, but locked to the Y axis.
| Idem, but locked to the Z axis.
|-  
|-  
| align="center" width=150px|rotationZ
| translation
| align="center" width=150px|Idem, but locked to the Z axis.
| Motion along one axis.
|-  
|-  
| align="center" width=150px|translation
| translationX
| align="center" width=150px|Motion along one axis.
| Idem, but locked to the X axis.
|-  
|-  
| align="center" width=150px|translationX
| <div id="translationY">translationY</div>
| align="center" width=150px|Idem, but locked to the X axis.
| Idem, but locked to the Y axis.
|-  
|-  
| align="center" width=150px|<div id="translationY">translationY</div>
| translationZ
| align="center" width=150px|Idem, but locked to the Y axis.
| Idem, but locked to the Z axis.
|-  
|-  
| align="center" width=150px|translationZ
| hide
| align="center" width=150px|Idem, but locked to the Z axis.
| Hide once given threshold is reached
|-  
|-  
| align="center" width=150px|hide
| direct
| align="center" width=150px|Hide once given threshold is reached
| Rotation and/or translation (without using selection in model as axis)
|-
| align="center" width=150px|direct
| align="center" width=150px|Rotation and/or translation (without using selection in model as axis)
|}
|}


Line 503: Line 470:




{| border="1" align="center"
{| class="bikitable"
|-
! style="color: rgb(0, 0, 102);" | Property || style="color: rgb(0, 0, 102);" | Description || style="color: rgb(0, 0, 102);" | Animation Type
|-  
|-  
| align="center" width=150px height=25|
! Property !! Description !! Animation Type
| align="center" width=150px height=25|
| align="center" width=150px height=25|
|-  
|-  
| align="center" width=150px|source
| source
| align="center" width=150px|Controller used for input.
| Controller used for input.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|selection
| selection
| align="center" width=150px|Skeleton bone.
| Skeleton bone.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|<div id="axis">axis</div>
| <div id="axis">axis</div>
| align="center" width=150px|Model axis.
| Model axis.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|<div id="begin">begin</div>
| <div id="begin">begin</div>
| align="center" width=150px|Starting point of an oriented model axis.<br />This can be used in combination with [[#end|end]] instead of [[#axis|axis]].
| Starting point of an oriented model axis.<br />This can be used in combination with [[#end|end]] instead of [[#axis|axis]].
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|<div id="end">end</div>
| <div id="end">end</div>
| align="center" width=150px|Ending point of an oriented model axis.<br />This can be used in combination with [[#begin|begin]] instead of [[#axis|axis]].
| Ending point of an oriented model axis.<br />This can be used in combination with [[#begin|begin]] instead of [[#axis|axis]].
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|memory
| memory
| align="center" width=150px|Optional (default is true). Axis in memory level or not?
| Optional (default is true). Axis in memory level or not?
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|animPeriod
| animPeriod
| align="center" width=150px|Time in seconds for one animation cycle.<br />Only used by ''user'' controllers.
| Time in seconds for one animation cycle.<br />Only used by ''user'' controllers.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|minValue
| minValue
| align="center" width=150px|Minimum value of the motion range. i.e. Controller input when the animation phase is 0.
| Minimum value of the motion range. i.e. Controller input when the animation phase is 0.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|maxValue
| maxValue
| align="center" width=150px|Maxmimum value of the motion range. i.e. Controller input when the animation phase is 1.
| Maxmimum value of the motion range. i.e. Controller input when the animation phase is 1.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|minPhase
| minPhase
| align="center" width=150px|Minimum phase of the animation.i.e.<br />Animation phase when the controller value is 0.
| Minimum phase of the animation.i.e.<br />Animation phase when the controller value is 0.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|maxPhase
| maxPhase
| align="center" width=150px|Maxmimum value of the motion range.i.e.<br />Animation phase when the controller value is 1.
| Maxmimum value of the motion range.i.e.<br />Animation phase when the controller value is 1.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|sourceAddress
| sourceAddress
| align="center" width=150px|Does the animation loop or not? This can be any of three different values: clamp (default), loop or mirror.
| Does the animation loop or not? This can be any of three different values: clamp (default), loop or mirror.
| align="center" width=150px|Any
| Any
|-  
|-  
| align="center" width=150px|angle0
| angle0
| align="center" width=150px|Starting angle of this animation, where the animation phase is 0.
| Starting angle of this animation, where the animation phase is 0.
| align="center" width=150px|Rotations
| Rotations
|-  
|-  
| align="center" width=150px|angle1
| angle1
| align="center" width=150px|Ending angle of this animation, where the animation phase is 1.
| Ending angle of this animation, where the animation phase is 1.
| align="center" width=150px|Rotations
| Rotations
|-  
|-  
| align="center" width=150px|offset0
| offset0
| align="center" width=150px|Starting offset of this animation, where the animation phase is 1.
| Starting offset of this animation, where the animation phase is 1.
| align="center" width=150px|Translations
| Translations
|-  
|-  
| align="center" width=150px|offset1
| offset1
| align="center" width=150px|Ending offset of this animation, where the animation phase is 1.
| Ending offset of this animation, where the animation phase is 1.
| align="center" width=150px|Translations
| Translations
|-  
|-  
| align="center" width=150px|hideValue
| hideValue
| align="center" width=150px|Threshold for hiding
| Threshold for hiding
| align="center" width=150px|Hide
| Hide
|-  
|-  
| align="center" width=150px|axisPos[]
| axisPos[]
| align="center" width=150px|Position of axis in model space
| Position of axis in model space
| align="center" width=150px|Direct
| Direct
|-  
|-  
| align="center" width=150px|axisDir[]
| axisDir[]
| align="center" width=150px|Direction of axis (vector)
| Direction of axis (vector)
| align="center" width=150px|Direct
| Direct
|-  
|-  
| align="center" width=150px|angle
| angle
| align="center" width=150px|Angle of rotation in degrees!
| Angle of rotation in degrees!
| align="center" width=150px|Direct
| Direct
|-  
|-  
| align="center" width=150px|axisOffset
| axisOffset
| align="center" width=150px|Used for translation
| Used for translation
| align="center" width=150px|Direct
| Direct
|}
|}



Revision as of 14:24, 21 May 2014

Description

The model configuration file (model cfg for short) is the interface between a (P3D) model and the program.
It is a look-up table which is processed during the binarization process, to tell the program what the various sections of the model are, which skeleton it uses and how it is animated.

This system is more flexible than the one previously used, because all the information is stored for the model and not for the object class in the main configuration file. This means that several object classes can use the same model and don't have to define the animations for this model seperately.

A goal of the system is to seperate the configuration of models into a designer and an artist part.
This is done by the introduction of a class AnimationSources in the main configuration file (the designer part) and the continuing use of the class Animations in the model cfg (the artist part).

Most models will be able to inherit definitions from basic definitions on higher levels in the data hierarchy. An example hierarchy is described and illustrated below.

p:\ofp2\vehicles\model.cfg - Defines a class Default.
p:\ofp2\vehicles\land\wheeled\model.cfg - Defines a class Car.
p:\ofp2\vehicles\land\wheeled\landrover\model.cfg - Defines a class LandRover.

p:\ofp2\vehicles\land\wheeled\landrover\lr6x6_3 - In the model is a property config=LandRover (this feature is not implemented and may never be).
p:\ofp2\vehicles\land\wheeled\landrover\lr6x6_mg240 - Has a LR6x6_MG240.cfg, which inherits from class LandRover and adds definitions for a turret.


Sample tree hierarchy


Notes

At this stage the file is parsed during the binarization of a model and animations can be played in the program with user actions. Eventually they can be previewed using the Buldozer viewer.

The model cfg follows a set of naming conventions. There can be several model cfg files, named by default model.cfg, named after the folder name or named after a specific model. In the case that both a model.cfg and <foldername>.cfg are present, only the latter is parsed. The <modelname>.cfg is parsed alongside of the other model cfg files and therefore the model can be seen as an additional level in the hierarchy.

When we have an example folder called humr with a model called hmmwv.p3d, we can use the following names: model.cfg or humr.cfg and next to that a hmmwv.cfg.

In the future a model may support a named property called config, which tells the model which class in the model cfg to use. There is some doubt whether this feature will be implemented though.

There are model cfg files that do not relate directly to a specific model, but are used for the generic base class definitions, such as class Default.

The functionality of the animations has been extended, allowing to do in scripting what was done before using RTM animations. In addition, animation controllers were introduced, which allow for the control of different animations at the same time. This opens up possibilities like having several turrets on a tank.

The model cfg and main configuration file (where classes cfgModels, cfgSkeletons and Animations were previously defined) operate together to smooth the change from the old to the new system. When a model cfg and the main configuration file both define the same model, the model cfg takes precedence.


Segments

cfgModels

This segment defines all properties of each model. The class names correspond to the model name.
Here you define which sections the model has, which skeleton it uses and its animations.

//Declare base classes
class CarAnimations 
{
   class IndicatorSpeed;
};

class CfgModels
{
   class Car; //Declare base class.

   class Vodnik: Car 
   {
      sectionsInherit = "Car"; //Inherit all sections from class Car.
                               //Add new section.
      sections[] =
      {
         "section1"
      };
      skeletonName = "Vodnik"; //Use the Vodnik skeleton.
		
      class Animations: CarAnimations //Inherit from generic animations.
      {
         class IndicatorSpeed: IndicatorSpeed //Redefine the maximum value
         {                                    //for the speed indicator.
            maxValue = 40;
         };
      };
   };
};


cfgSkeletons

This segment defines the skeleton for the model and the bones that it uses.

class CfgSkeletons 
{ 
   class Car; //Define base class.

   class Vodnik: Car
   {
      skeletonInherit = "Car"; //Inherit all bones from class Car.
      skeletonBones[] =        //Add two new bones. The movement
      {                        //of bone2 is linked to bone1.
         "bone1", ""
         "bone2", "bone1"
      };
      pivotsModel = ""; // Location of pivot points (local axes) for hierarchical animation. (A2 only)
   };
};

Animations

This segment is part of class cfgModels and defines all animations used by the model.

class Animations 
{
   class FrontWheelR
   {
      type = "rotationX"; //The type of animation.
      source = "wheel";   //The controller that provides input.
      selection = "pravy predni"; //The name of the skeleton bone used.
      axis = "";                  //The name of the axis in the model.
      memory = true; //Is the axis defined in the memory level of the
                     //model or not?
      sourceAddress = "loop"; //Does the animation loop or not?
      minValue = 0; //The minimum value of the motion range.
                    //i.e. The controller input when animation phase is 0.
      maxValue = 1; //The maximum value of the motion range.
                    //i.e. The controller input when animation phase is 1.
      angle0 = 0;   //The starting angle of this animation, where the
                    //animation phase is 0.
      angle1 = "rad -360"; //The ending angle of this animation,
   };                      //where the animation phase is 1.
};


Animation sources

source= is the controller that provides the data to the animation phase. It is declared in in cfgModels.ModelName.class Animations{...}. Inbuilt controllers are listed below. Custom controllers (source=user) can be constructed in config.cpp using cfgVehicles.ModelName.class AnimationSources{...} together with cfgVehicles.ModelName.class UserActions{...}

Controller names marked by * are freely defined by vehicle turret configs. The values here show the names commonly used for ArmA vehicles.

Name Description Simulation Classes
altBaro The baro altitude. Aircraft
altRadar The radar altitude. Aircraft
cyclicAside rotor mast machinery (or rotor) animations based on cyclic controls Helicopter
cyclicForward rotor mast machinery (or rotor) animations based on cyclic controls Helicopter
gear The vehicle's gear. Aircraft
horizonBank The banking angle of the vehicle. Aircraft
horizonDive The diving angle of the vehicle. Aircraft
vertSpeed The vertical speed. Aircraft
aileron The main aileron control surfaces. Airplane
aileronB The bottom speed brake as opening ailerons. Airplane
aileronT The top speed brake as opening ailerons. Airplane
aoa The Angle Of Attack. Airplane
elevator The elevators. Airplane
flap The flaps. Airplane
rotor The rotors. Airplane
rudder The rudder. Airplane
speedBrake The speed brake. Airplane
direction The orientation of the vehicle. Any
fuel The fuel level. Any
oil IndicatorOilTemp ?
gmeter The G-forces. Any
rpm The rpm of the vehicle. Used in rpm indicators. Any(except Ship)
speed The speed of the vehicle. Used in speed indicators. (WARNING: 'maxValue' and 'minValue' should be in meters per second) Any
time Timer-based input. Any
clockHour
The current time in hours. Any (including e.g. Weapon)
clockMinute The current time in minutes. Derived from clockHour. Any (including e.g. Weapon)
clockSecond The current time in seconds. Moves discreetly every second and independently from clockHour. Any (including e.g. Weapon)
damage Current damage level (0=healthy, 1=destroyed) Any
user User defined (script driven) animation Any
direct Like user, but immediate, no smooth transition. Any
pedals The pedals. Bicycle
damper The suspension of the vehicle. Currently only works with type translationY. Car, Tank, Aircraft, Motorcycle
FrontDamper The suspension of the front wheels of the vehicle. Car?
BackDamper The suspension of the back wheels of the vehicle. Car?
drivingWheel The orientation of the steering wheel. Used for the steering wheel and steered wheels. Car, Ship, Motorcycle
*mainGun The main gun. Car, Tank, Helicopter, Ship
*mainTurret The main turret. Car, Tank, Helicopter, Ship
wheel Normal wheels that turn based on moving forward. Car, Airplane, Motorcycle
noseWheelTurn Airplane
compassArrow The arrow. Compass
compassCover The cover. Compass
compassPointer The pointer. Compass
rotorH The 'horizontal' rotor. Helicopter
rotorV The 'vertical' rotor. Helicopter
rotorHDive Tilt of the 'horizontal' rotor. Helicopter
rotorVDive Tilt of the 'vertical' rotor. Helicopter
support The support stand. Motorcycle
*hatchCommander The commander hatch. Tank
hatchDriver The driver hatch. Tank
*hatchGunner The gunner hatch. Tank
*obsGun The observer or commander gun. Tank
*obsTurret The observer or commander turret. Tank
reload The movement when reloading. Weapon
revolving The movement when firing. Weapon
isempty The animation to hold the bolt open when the weapon is empty. Weapon
turretDir The orientation of the turret. Tank
wheelL The left track wheels. Tank
wheelR The right track wheels. Tank
scudLauncher Phase of scudlaunch. Scud
flag Runs from 0 to 1 as flag is taken from flagpole. Flagcarrier
airspeedIndicatorRTD speed / maxSpeed RTD helicopter
altBaroRTD altitude in meters RTD helicopter
vertSpeedRTD vertical speed / max speed RTD helicopter
attitudeBankRTD radians RTD helicopter
attitudeDiveRTD radians RTD helicopter
skidRTD speed / helicopter >> maxSpeed RTD helicopter
altRadarRTD altitude above ground in meters RTD helicopter
rpm1RTD engine 1 rmp / designed max rpm RTD helicopter
rpm2RTD engine 2 rmp / designed max rpm RTD helicopter
rpm3RTD engine 3 rmp / designed max rpm RTD helicopter
temp1RTD engine 1 temperature / helicopter >> DamagePropertiesRTD >> maxEngineTemperature RTD helicopter
temp2RTD engine 2 temperature / helicopter >> DamagePropertiesRTD >> maxEngineTemperature RTD helicopter
temp3RTD engine 3 temperature / helicopter >> DamagePropertiesRTD >> maxEngineTemperature RTD helicopter
torqueRTD torque / helicopter >> DamagePropertiesRTD >> maxTorque RTD helicopter
mainRotorRPMRTD Main Rotor RPM / designed max RPM RTD helicopter
tailRotorRPMRTD Tail Rotor RPM / designed max RPM RTD helicopter
collectiveRTD collective (0, -1) RTD helicopter
rudderRTD Pedals (-1, 1) RTD helicopter
throttleRTD1 (0, 1) RTD helicopter
throttleRTD2 (0, 1) RTD helicopter
throttleRTD3 (0, 1) RTD helicopter
torqueEng1RTD (0, 1) RTD helicopter
torqueEng2RTD (0, 1) RTD helicopter
torqueEng3RTD (0, 1) RTD helicopter
Animation types

This table outlines the Animation Types you can use for an animation class.


Type Description
rotation Circular motion.
rotationX Idem, but locked to the X axis.
rotationY Idem, but locked to the Y axis.
rotationZ Idem, but locked to the Z axis.
translation Motion along one axis.
translationX Idem, but locked to the X axis.
translationY
Idem, but locked to the Y axis.
translationZ Idem, but locked to the Z axis.
hide Hide once given threshold is reached
direct Rotation and/or translation (without using selection in model as axis)
Animation Properties

This table outlines the properties (or entries) that each defined animation class expects to be present based on the animation type that is specified.

Eg. If you specify a an animation type of 'rotationX' you must specify the animation properties 'angle0' and 'angle1'.


Property Description Animation Type
source Controller used for input. Any
selection Skeleton bone. Any
axis
Model axis. Any
begin
Starting point of an oriented model axis.
This can be used in combination with end instead of axis.
Any
end
Ending point of an oriented model axis.
This can be used in combination with begin instead of axis.
Any
memory Optional (default is true). Axis in memory level or not? Any
animPeriod Time in seconds for one animation cycle.
Only used by user controllers.
Any
minValue Minimum value of the motion range. i.e. Controller input when the animation phase is 0. Any
maxValue Maxmimum value of the motion range. i.e. Controller input when the animation phase is 1. Any
minPhase Minimum phase of the animation.i.e.
Animation phase when the controller value is 0.
Any
maxPhase Maxmimum value of the motion range.i.e.
Animation phase when the controller value is 1.
Any
sourceAddress Does the animation loop or not? This can be any of three different values: clamp (default), loop or mirror. Any
angle0 Starting angle of this animation, where the animation phase is 0. Rotations
angle1 Ending angle of this animation, where the animation phase is 1. Rotations
offset0 Starting offset of this animation, where the animation phase is 1. Translations
offset1 Ending offset of this animation, where the animation phase is 1. Translations
hideValue Threshold for hiding Hide
axisPos[] Position of axis in model space Direct
axisDir[] Direction of axis (vector) Direct
angle Angle of rotation in degrees! Direct
axisOffset Used for translation Direct

AnimationSources

This is not part of the model cfg, but part of the main configuration file. This class allows you to define new user controllers or modify selected properties of existing controllers.

Defining custom controllers makes it possible to use one custom controller for several different animations. If an animation does not define the source parameter, the program looks for a custom controller defined in this class with the same name.

It is also possible to override an existing controller using this class, but be extremely careful in this case. The custom controller will hide the original one, leaving the latter inaccessible. Overriding is done using the :: notation in the source parameter as can be seen in the third example.


class AnimationSources
{
   class MachineGun
   {
      source = "reload"; //The controller used for the definition of
                         //this controller.
      weapon = MachineGun25W; //In the specific case of using the reload
   };                         //controller, the weapon class name.
};
class AnimationSources
{
   //Used by animations called Door1, which don't define the source
   //parameter or by animations that define source = Door1;.
   class Door1 
   {
      source = "user"; //The controller is defined as a user animation.
      animPeriod = 1;  //The animation period used for this controller.
      initPhase=1;     //Initial phase when object is created.
   };
};
class AnimationSources
{
   class wheel
   {
      source = "::wheel"; //Overriding the existing wheel controller.
   };
};

config.cpp model.cfg relationship

Below is the class name relationship between the two for a user, (or modified), source. Poetic licence used

class cfgModels
{
 class NameOfP3d
 {
  class Animations
  {
   class ModelClassName
   {
    selection=BoneName;
    source=AnimClassName; //optional
    source=user;          //optional. default AnimClassName==ModelClassName
   };
  };
 };
};
class cfgvehicles
{
 class ModelName
 {
   class AnimationSources
   {
    class AnimClassName
    {
     AnimPeriod=1;             // mandatory. in seconds. 
     source = "user";          // optional. default=user
     InitPhase=1;              // optional (default =0)
     weapon = WeaponClassName; // only for source=reload;
    };
  };
  class UserActions
  {
    class MeaninglessName
    {
      ......
      onlyforplayer = true/false;        //mandatory
      this animate ['ModelClassName',1];
    };
  };
 };
};
  • most constructions avoid confusion: AnimClassName==ModelClassName==BoneName
  • the word 'user' in both cfg and cpp appears to be, a) redundant, b) the default

Example

You can find a howto for the CfgModels (a working attack helicopter) here as well as a howto on cfgModels & cfgSkeletons with additional description and examples here.