Simulation Recording and Playback


Related Links

Prepar3D's recording and playback capabilities are useful tools for evaluating your performance. Various simulation states and variables are available for recording and playback. Record and playback support includes simulation variables, local panel parameters, registered properties, and environmental states. It is configurable for user objects and other simulation objects. Additionally, what is recorded can be specified for each individual simulation object, which allows a user to increase the playback fidelity or to minimize the recording file size. The only limit on recorded scenario length is the available space on your hard disk.


Getting Started

Starting, Stopping, and Saving a Recording

Select Start Recording from the Analysis menu. When you are finished recording you should press the ESC key.

After the recording is stopped, a window will open asking to Discard, Resume, or Save the recording file.

In scenarios, the RecordStartAction and RecordStopAction can be used to start and stop recordings. Additionally, the ability to start recording can be mapped to a key press. The associated key event is Recording (Start). Please note that during recording certain menu options and simulation options will be disabled.

Playing a Recording

Under the Analysis menu, select Load Recording.... A dialog box will open that allows the selection of a simulation recording.

A list of saved recordings will be displayed. A recording can be double clicked or the Play button can be clicked to start the playback of a selected file. If the recording has bookmarks, they will be displayed in the lower right panel. Bookmarks can be selected as an alternate starting spot for the recording. When a file begins playing back, a simple Playback Controls interface will be made visible. This interface can be exited if desired. Along with displaying current progress, the Playback Controls allows the user to loop the playback, pause, jump to bookmarks, and change simulation speed. Please note that during playback certain menu options and simulation options will be disabled. This is by design and ensures the playback closely mimics the recording it is based on.


Configuration

Prepar3D.cfg

There are three recording options that can be configured in the Prepar3D.cfg, RecordAITraffic, RecordAirportVehicles, and RecordLeisureBoats. They are booleans that are set in the [Recorder] section.


Section Property Value Function/Description
Recorder RecordAITraffic BOOL Enable the recording of air traffic.
Recorder RecordAirportVehicles BOOL Enable the recording of the default airport vehicles.
Recorder RecordLeisureBoats BOOL Enable the recording of the leisure boats.

Inside Prepar3D.cfg:

...
[Recorder]
RecordAITraffic=True
RecordAirportVehicles=True
RecordLeisureBoats=True
...

DefaultRecordAndPlayback.xml

Located in %APPDATA%\Lockheed Martin\Prepar3D v3, DefaultRecordAndPlayback.xml contains the default properties to record and playback for each SimObject. It contains two RecordAndPlaybackDefinitions. The first definition is for all of the base properties and the second definition is for all native aircraft and helicopter SimObject properties.

<?xml version="1.0" encoding="UTF-8"?>

<SimBase.Document Type="AceXML" version="1,0">
    <Simvar.RecordAndPlaybackDefinition name="Base Properties" id="{72C83459-3F8A-4DE2-AE26-815D164D6179}">
        <Property NameGet="PLANE LATITUDE"             Units="Degrees"            Index="0" ValueThreshold="0.0" Frequency="frame" Type="Number"/>
        ...
    </Simvar.RecordAndPlaybackDefinition>
    <Simvar.RecordAndPlaybackDefinition name="Native SimObject Properties" id="{9F445DDF-600E-4096-B56C-02734E22F36E}">
        <Property NameGet="ROTATION VELOCITY BODY X"   Units="Radians per second" Index="0" ValueThreshold="0.0" Frequency="frame" Type="Number"/>
        ...
    </Simvar.RecordAndPlaybackDefinition>
</SimBase.Document>

RecordAndPlaybackDefinition Properties:

Property Description
NameGet The name of the Simulation Variable, local parameter, or registered property to record and playback. If the property is not settable, it will not be set during playback.
NameSet The name of the Simulation Variable, local parameter, or registered property to playback with the data recorded from the NameGet. If blank, the NameGet will be used. Commonly, this will only be utilized with ISimObject's registered properties.
Index When there is more than one entry of this property, this index indicates which one to record/playback data for. For example, multiple engines.
Frequency The attempted Frequency to record the property. The fastest and most storage intensive option is frame, which will attempt to record the property every frame. Used in combination with the ValueThreshold to limit unnecessary recording of properties.

Available Frequencies:
  • frame
  • 16hz
  • 8hz
  • 4hz
  • 2hz
  • 1sec
  • 5sec
  • 15sec
ValueThreshold The value threshold to trigger a record of the property. For this to be utilized, the Frequency must have been triggered. When the Frequency of the recording is hit, it checks this ValueThreshold. If the ValueThreshold is exceeded, the data will be recorded. A value of 0 will record any change of the property.
Units The units of measure. See Units of Measure for the possible values.
Type The data type of this property.

Available Types:
  • boolean
  • number
  • ordinal

RecordAndPlayback.xml

In addition to the DefaultRecordAndPlayback.xml, a vehicle specific RecordAndPlayback.xml file can be created on a per-SimObject basis. This file must be saved in the SimObject's folder (in the same folder as the aircraft.cfg or sim.cfg file). The GUID that is defined for the RecordAndPlaybackDefinition, in the XML file, must be set in the configuration file under the [GENERAL] section in a RecordAndPlaybackDefinitionGUID property (see example below). It must be a unique GUID for the vehicle (see Generating GUIDs).

Note: Due to the way properties are stored and retrieved, more frequently recorded properties should be listed toward the top of RecordAndPlaybackDefinition list, whereas less frequently recorded properties should be listed toward the bottom.

An example RecordAndPlayback.xml:

<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document Type="AceXML" version="1,0">
    <Simvar.RecordAndPlaybackDefinition id="{5CF91663-39A0-46CE-BEFB-9FC153868941}">
        <Property NameGet="RUDDER TRIM PCT" Units="Percent Over 100" Index="0" ValueThreshold="0.0" Frequency="8hz" Type="Number"/>
    </Simvar.RecordAndPlaybackDefinition>
</SimBase.Document>

Inside aircraft.cfg or sim.cfg:

...
[General]
...
RecordAndPlaybackDefinitionGUID={5CF91663-39A0-46CE-BEFB-9FC153868941}
...


Bookmarks

Bookmarks are selectable starting spots in a recording. They allow the user to jump to various points of a recording during playback. They can be created by using a CreateCheckpointAction with its RecordingBookmark option enabled. While running and recording that scenario, when the CreateCheckpointAction is triggered with the RecordingBookmark option enabled, a bookmark will be created in the recording. The bookmark will then be selectable from the Load Recording interface and from the Playback Controls interface.