MISSION DEFINITIONS

NOTE: This page is currently a work in progress and will be updated in a future SDK release.

 

The <mission_name>.xml file goes in the main mission folder beside the other files and folders required for the mission type, and is used to define the entire mission. This file is formatted using XML and can be edited by using any text editor. The general format for the file is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document Type="MissionFile" version="1,0" id="Name_of_Mission">
    <Title>Mission Name</Title>
    <Filename>MissionName.xml</Filename>
    <WorldBase.Flight InstanceId="{GUID_HERE}">
        <SimMission.Mission[TYPE] InstanceId="{GUID_HERE}" id="[MISSION_NAME]">
            <Descr>DESCRIPTION_HERE</Descr>
            <Legs>
                <Leg>
                    <Descr>From Airport 1 to Airport 2</Descr>
                    <AirportLandingTriggerEnd UniqueRefId="{GUID_HERE}"/>
                    <SubLegs>
                        <SubLeg>
                            <!-- Sub leg data here -->
                        </SubLeg>
                    <!-- Further sub legs here -->
                    </SubLegs>
                </Leg>
                <!-- Further legs here -->
            </Legs>
            <Objectives>
                <Objective UniqueRefId="{37569C05-B09F-493B-A2C3-2BF1A8215E2E}">
                    <!-- Objective data -->
                </Objective>
            </Objectives>
            <OnFinishedActions>
                <!-- On mission finish data here -->
            </OnFinishedActions>
        </SimMission.Mission[TYPE]>
        <SimMission.AirportCalculator InstanceId="{GUID_HERE}">
            <!-- Calculator data -->
        </SimMission.AirportCalculator>
        <!-- Further airport calculators here, one for each airport -->
        <SimMission.Goal InstanceId="{GUID_HERE}">
            <!-- Mission goal data -->
        </SimMission.Goal>
        <SimMission.GoalResolutionAction InstanceId="{GUID_HERE}">
            <!-- Mission resolution data -->
        </SimMission.GoalResolutionAction>
        <!-- Further goal resolution elements here-->
        <!-- Flow, Trigger and Calculator elements here -->
    </WorldBase.Flight>
</SimBase.Document>

Here you must include the <SimBase.Document> element and it's type needs to be "Mission File". You would then add the <WorldBase.Flight> element and everything for the mission within that element. Below you can find information on the different sections used in the <mission>.xml file as well as what parameters and values are expected within them.

 

Something to take into account when working with these files is that the number/name/coordinates of the way points need to be the exact same as those in the accompanying PLN and FLT files or it wont work (the simulation will not give details why its not working, but bear in mind that this can be a cause).

 

 

<SimBase.Document>

This is the main parent element that is used to contain the mission data. This element should have the <Title>, <Filename>, and <WorldBase.Flight> elements, as well as the following attributes:

 

Attribute Description Type Required
type The type of SimBase file. Should always be "MissionFile" for mission XML. String Yes
version The file version. Float No
id The unique ID for the mission, as a GUID enclosed in {}. String Yes

 

<Title>

This element is used within the <SimBase.Document> to give the mission a title, usually the title is the kind of mission that is being defined, eg: Bushtrip, Landing Challenge, etc... This string can be localized.

 

<Filename>

This element simply contains the name of the file (including the extension) of the mission file that is being defined.

 

 

<WorldBase.Flight>

This is the main container element for all other <SimMission.[type]> elements. This element has the following attribute:

 

Attribute Description Type Required
InstanceId The unique ID for the mission, as a GUID enclosed in {}. String Yes

 

 

<WorldBase.PreloadedLibraryObject>

 

 

<SimMission.FlowStateAction>

Flowstates are used to define the different parts of a mission or freeflight such as the introduction, the aircraft approach, or a flyby of a POI. Within flow states, you have "flow events" which are the special actions that control specific in-sim actions, and flowstates can also be used to start animated intros and and outros using RTC Cameras. For full information on this element and the sub-element it uses, please see the following page:

 

 

<SimMission.FlowStateWise>

This element is used to fire a global Wwise switch. It is a container element for the following sub-elements: <Descr><ConditionalElementName><GroupName><Immediate>.

 

This element has the following attributes:

 

Attribute Description Type Required
InstanceId The unique ID for the Wwise flow state, as a GUID enclosed in {}. String Yes
VRDependency When set to TRUE, this sets the Wwise flow state as being VR dependent. Default is FALSE. Bool No

 

<GroupName>

This is a sub-element of either <SimMission.FlowStateWise> or <SimMission.FlowSwitchWwise>. It has no attributes and is used to define the Wwise group name to be associated with the flow state.

 

<ConditionalElementName>

This is a container element with no attributes that is used to associate some RPN code with a Wwise element name, used as a sub-element of <SimMission.FlowStateWise> or <SimMission.FlowSwitchWwise>. This element requires the following sub-elements: <ReversePolishCondition>, <ElementName>.

 

<ElementName>

This sub-element is used to define the name of the Wwise element to be associated with the flow event or RPN code. This element has no attributes and is a sub element of the following: <SimMission.FlowStateWise><SimMission.FlowSwitchWwise><ConditionalElementName>.

 

<ReversePolishCondition>

This element is used to contain an RPN condition. This element has no attributes and is a sub element of <ConditionalElementName>.

 

 

<SimMission.FlowEventAction>

This main element is used to fire off a flow event action. It requires the following sub-elements: <Descr>, <FlowEvents><Immediate>. This element has the following attributes:

 

Attribute Description Type Required
InstanceId The unique ID for the flow event action, as a GUID enclosed in {}. String Yes
VRDependency When set to TRUE, this sets the flow event action as being VR dependent. Default is FALSE. Bool No

 

 

<SimMission.FlowSwitchWwise>

This element is used to fire a Wwise switch. It is a container element for the following sub-elements: <Descr><ConditionalElementName><GroupName><Immediate>.

 

This element has the following attributes:

 

Attribute Description Type Required
InstanceId The unique ID for the Wwise flow state, as a GUID enclosed in {}. String Yes

 

 

<SimMission.Tutorial>

This element is used to contain the logic required to create a "tutorial" or "flight training" mission. You can find full details on this element and the sub-elements it can use from the following page:

 

 

<SimMission.DialogAction>

This main element is used to display and play some dialogue in the main mission adventure window. You can find full details on this element and the sub-elements it can use from the following page:

 

 

<SimMission.FocusInstrumentAction>

This element permits you to set up an action to focus on a specific instrument. For full details, please see the following page:

 

 

<SimMission.AITakeControlsAction>

 

 

<SimMission.MissionBushTrip>

 

 

<SimMission.Goal>

 

 

<SimMission.GoalResolutionAction>

 

 

<SimMission.SubGoal>

 

 

<SimMission.SubGoalResolutionAction>

 

 

<SimMission.ObjectActivationAction>

 

 

<SimMission.EventTriggerAction>

 

 

<SimMission.TimerTrigger>

 

 

<Actions>

This container element is used to define one or more <SimMission.ObjectReference /> elements as the action(s) to be performed when a <SimMission.TimerTrigger> has been triggered. This element may have the following sub-elements: <SimMission.ObjectReference />, <Immediate>, <CurrentActionIndex>.

 

This element has the following attributes:

Attribute Description Type Required
id The ID of the actions list. String No

 

 

 

<SimMission.TimerTriggerFlowStateAction>

 

 

<SimMission.TriggersFiredTrigger>

 

 

<OnFiredActions>

This container element is a sub-element of the <SimMission.TriggersFiredTrigger> element and is used to define one or more actions that execute when the trigger is fired. The element contain one or more <SimMission.ObjectReference /> elements as well as <Immediate> and <CurrentActionIndex> elements. It can also have the following attribute:

 

Attribute Description Type Required
id The ID of the on-fired actions list. String No

 

 

<SimMission.PropertyTrigger>

 

 

<SimMission.ProximityTrigger>

 

 

<WhileInsideActions>

This container element is a sub-element of the <SimMission.ProximityTrigger> element and is used to define one or more actions that execute while the user is inside the trigger. The element contain one or more <SimMission.ObjectReference /> elements as well as <Immediate> and <CurrentActionIndex> elements. It can also have the following attribute:

 

Attribute Description Type Required
id The ID of the inside actions list. String No

 

 

<SimMission.ObjectInteractionTrigger>

This element can be used to define a trigger that will be fired when the user interacts with an object. For full information on this element and the sub-elements and attributes it requires, please see the following page:

 

 

<SimMission.CockpitInteractionTrigger>

This element can be used to define a trigger that will be fired when the user interacts with an item within the context of the cockpit. This element has the following attributes:

 

Attribute Description Type Required
InstanceId The unique ID for the trigger, as a GUID enclosed in {}. String Yes
VRDependency When set to TRUE, this sets the trigger as being VR dependent. Default is FALSE. Bool No

 

This element can also contain any of the following sub-elements, sometimes multiple times: <Descr>, <Activated>, <DefaultActivated>, <Latched>, <OneShot>, <OnInteractionActions>, <NodeIdList>, <InteractionLock>.

 

<NodeIdList>

This is a container element that can contain one or more <NodeId> sub-elements, identifying the node(s) which should be checked for the cockpit trigger to fire. The element has no attributes and is used by the main <SimMission.CockpitInteractionTrigger> element.

 

<NodeId>

This sub-element is used to identify the node (or nodes if more than one of these sub-elements is included) that should be processed as part of a cockpit interaction trigger. The node ID should be given as a string, and this element has no attributes and is a sub-element of <NodeIdList>.

 

<InteractionLock>

This element has no attributes and is a sub-element of <SimMission.CockpitInteractionTrigger>. It can be used to "lock" an interaction when set to TRUE or "unlock" an interaction when set to FALSE.

 

 

<SimMission.CameraTargetTrigger>

This element can be used to define a trigger that will be fired when something is focused in the camera frustrum. For full information on this element and the sub-elements and attributes it requires, please see the following page:

 

 

<SimMission.NodeDistanceTrigger>

 

 

<SimMission.RectangleArea>

 

 

<SimMission.CylinderArea>

 

 

<SimMission.PointOfInterest>

 

 

<SimMission.FadeToColorAction>

 

 

<SimMission.RequestTeleportAction>

 

 

<SimMission.ResetTimerAction>

 

 

<SimMission.TrackerSimVar>

 

 

<SimMission.AirportCalculator>

 

 

<SimMission.Calculator>

This is a container element that is used to hold any calculations required for the mission. You can find the information related to this element and it's sub-elements from the following page:

 

 

<SimMission.Evaluator>

 

 

 

<SimMission.ObjectReference />

This element is used to reference some other "object" within the mission or the simulation, for example an RTC camera sequencer. The element is self closing and has the following attributes:

 

Attribute Description Type Required
id The ID string that is used to identify the object. String Yes
InstanceId The unique ID for the trigger, as a GUID enclosed in {}. String Yes

 

 

Shared Elements

All the elements listed below are shared elements that are used as sub-elements of multiple "main" elements.

 

 

<Descr>

This sub-element is used in the following main elements to give a short descriptive string of what the element is for. The contents of this element are purely for organisational purposes and will not be visible to the user when the mission is being flown. This sub-element can be used by the following main elements: <SimMission.FlowStateWise><SimMission.FlowStateAction>, <SimMission.Tutorial>, <SimMission.ObjectInteractionTrigger>, <SimMission.CockpitInteractionTrigger>, <SimMission.CameraTargetTrigger><SimMission.FlowEventAction><SimMission.DialogAction>

 

 

<Activated>

This sets whether the main element this is included within is active or not, and requires either True or False as the input value. This element has no attributes and is a sub-element of the following main elements: <SimMission.Calculator>, <SimMission.ObjectInteractionTrigger>, <SimMission.CockpitInteractionTrigger>, <SimMission.CameraTargetTrigger>,

 

 

<DefaultActivated>

This element is used within the following main elements: <SimMission.ObjectInteractionTrigger>, <SimMission.CockpitInteractionTrigger>, <SimMission.CameraTargetTrigger>. It is used to set the default state of the "activated" flag for the main trigger element, which can be either TRUE or FALSE. The element has no attributes.

 

 

<ObjectReferenceList>

This element is used to list one or more <SimMission.ObjectReference /> sub-elements. The element has no attributes and can be used by the following main elements:

 

 

<ObjectReference />

This self closing sub-element is used to reference another object element within the mission flow. You need to supply the unique ID for the element, and this sub-element is used by the following main elements: <ObjectReferenceList>, <SimMission.FlowStateAction>, <StartActions>, <SpawnActions>, <TeleportActions>, <IntroActions>, , <EndChecklistActions>, <OnEnterActions>, <OnExitActions>, (calculator) <Actions>, (trigger) <Actions>, <AttachedWorldObject>,

 

This sub-element has the following parameters:

Attribute Description Type Required
id The unique identifier of the object element reference. String Yes
InstanceId The unique ID for the reference state action, as a GUID enclosed in {}. String Yes

 

 

<TargetPlayer>

This sub-element defines the target object for a given action. It has no attributes and requires a GUID for the target (see the table below). This sub-element is used by the following main elements: <SimMission.DialogAction>

 

GUID Description
{8B7615FA-BBBF-4baa-B959-5EF4F59BB575} Local User
{D09ADD85-4CA8-4be9-939C-4544BA259DA2} All Players
{9A82F89B-F271-4285-AE90-1F733945D975} Trigger
{D2764AC8-FBB3-4b9b-9721-3C3EA0CB402B} All Players except Trigger

 

 

<FlowEvents>

This is a container element for one or more <FlowEvent /> sub-element. It has no attributes and can be used by the following main elements: <SimMission.FlowEventAction>.

 

 

<FlowEvent />

Flow events are self-closing sub-elements triggered by one of the following main elements: <TeleportFlowEvents>, <SpawnFlowEvents>, <IntroFlowEvents>, <StartFlowEvents>, <EndFlowEvents>, <FlowEvents>.

 

Each FlowEvent added to any element has an ID which defines what the event should do, and you can have multiple FlowEvents in a single parent element.

 

The element has the following attribute:

 

Attribute Description Type Required
id The identifier for the FlowEvent that tells the simulation what to do. See the table below for available inputs. String Yes

 

The ID attribute can be any one of the following values:

 

FlowEvent ID Description Use Cases
ATC_MUTE   General
ATC_STOP  
ATC_RESUME  
PAUSE_SIM Pause the sim (actual pause, not live pause).
UNPAUSE_SIM Unpause the sim.
SET_CAMERA_COCKPIT Set the camera to the inside cockpit view.
SHOW_NAVLOG  
LAUNCH_REPLAY Used to start replay by the user.
START_REPLAY Used to start replay for plane movement in the intro's of landing challenges.
STOP_WATCH_STARTED  
STOP_WATCH_RESETED  
ENTER_CURSOR_MODE  
EXIT_CURSOR_MODE  
BUSHTRIP_LEG_COMPLETED  
ASK_CONTINUE_TO_FREE_FLIGHT  
AI_SET_LANDING_STATE Force landing state.
UNACTIVATE_PUSHBACK  
SHOW_HUD   User Interface
HIDE_HUD  
SHOW_MISSION_STARTUP Show briefing at the beginning of the flight. Briefings
HIDE_MISSION_STARTUP Hide the mission startup and end the briefing.
END_BRIEFING End the briefing.
SHOW_LOADING Show the loading screen. Loading
HIDE_LOADING Hide the loading screen.
SHOW_PAUSEMENU Show the pause menu. Pause
HIDE_PAUSEMENU Hide the pause menu.
RESUMEFROMPAUSE Resume the game.
RENO_MENU_SHOW   Reno Races
START_RENO_RACE_INGAME_DIALOG  
SHOW_RENO_RTC_HUD  
HIDE_RENO_RTC_HUD  
[panel]_FORCE_DISABLED Disable the given UI panel so that the user can't select it.

UI Panels.

Available panels are:

  1. PANEL_CAMERA
  2. PANEL_ATC
  3. PANEL_CONTROLS
  4. PANEL_CHECKLIST
  5. PANEL_FUEL_PAYLOAD
  6. PANEL_GAME_NAVLOG
  7. PANEL_VFR_MAP
  8. PANEL_TELEPORT
  9. PANEL_REPLAY
  10. PANEL_COPILOT
  11. PANEL_OBJECTIVES
[panel]_FORCE_ENABLED Enable the given UI panel permitting user interaction once more.
[panel]_SHOW Show (open) the given UI panel.
[panel]_FORCE_SHOW  
[panel]_HIDE Hide (close) the given UI panel
[panel]_TOGGLE Toggle the given UI panel open/closed.

 

 

<Immediate>

 

 

This element is used by the following main elements: <SimMission.FlowStateWise>, <SimMission.FocusInstrumentAction>, <SimMission.FlowEventAction><SimMission.DialogAction>

 

 

<Text>

 

 

<SuccessText>

 

 

 

<FailText>

 

 

 

<AbortedText>

 

 

 

<Skippable>

This element can be either TRUE or FALSE and, if TRUE, it will permit the animation ot dialog to be skipped by the player. It has no attributes and is used by the following main elements: <SimMission.DialogAction>

 

 

<ImagePath>

 

 

 

<OnEnterActions>

This container element is a sub-element of the <SimMission.ProximityTrigger>, <SimMission.CameraTargetTrigger>, and <SimMission.NodeDistanceTrigger> elements and is used to define one or more actions that should be taken when the user aircraft enters within range of the trigger. The element contain one or more <SimMission.ObjectReference /> elements as well as <Immediate> and <CurrentActionIndex> elements. It can also have the following attribute:

 

Attribute Description Type Required
id The ID of the state end actions list. String No

 

 

<OnExitActions>

This container element is a sub-element of the <SimMission.ProximityTrigger>, <SimMission.CameraTargetTrigger>, and <SimMission.NodeDistanceTrigger> elements and is used to define one or more actions that should be taken when the user aircraft exits the range of the trigger. The element contain one or more <SimMission.ObjectReference /> elements as well as <Immediate> and <CurrentActionIndex> elements. It can also have the following attribute:

 

Attribute Description Type Required
id The ID of the state end actions list. String No

 

 

<OnInteractionActions>

This container element is a sub-element of the <SimMission.ObjectInteractionTrigger> and <SimMission.CockpitInteractionTrigger> elements and is used to define one or more actions that execute when the user interacts with the trigger in some way. The element contain one or more <SimMission.ObjectReference /> elements as well as <Immediate> and <CurrentActionIndex> elements. It can also have the following attribute:

 

Attribute Description Type Required
id The ID of the interaction actions list. String No

 

 

<CrashActions>

This sub-element defines the actions that execute when the state ends due to a crash, and is used by the following main elements: <SimMission.FlowStateAction><SimMission.DialogAction>. The element can be used within any one of the following main elements: . It can also contain the following sub-elements:

 

This element has the following parameters

 

Attribute Description Type Required
id The identifier for the FlowEvent that tells the simulation what to do. See the table below for available inputs. String Yes

 

 

<EndActions>

This container element is used to define one or more <SimMission.ObjectReference /> elements as the action(s) to be triggered when the container action ends, ege: the end of a flow state or a dialogue. This element may have the following sub-elements: <SimMission.ObjectReference /><Immediate><CurrentActionIndex>.

 

This element has the following attribute:

Attribute Description Type Required
id The ID of the state end actions list. String No

 

 

<Objectives>

 

 

<Objective>

 

 

 

<CurrentActionIndex>

This element defines the index of the current flow action to be played. Default value is -1. The element has no attributes and is used by the following main elements: <CrashActions>, <OnEnterActions>, <OnExitActions>, <SpawnActions>, <TeleportActions>, <IntroActions>, <StartActions>, , <EndChecklistActions>, <OnInteractionActions>,

 

 

<AttachedWorldPosition>

This element is used within the following main elements: <SimMission.ObjectInteractionTrigger>, <SimMission.CameraTargetTrigger>. It is a container element that is used to define the position within the world for the object or trigger or other item. As such it requires the following sub-elements: <AltitudeIsAGL>, <IsOnGround>, <WorldPosition>, <LocalOffsetXYZ>, <LocalOrientation>, and <Orientation>.

 

 

<AttachedWorldObject>

This element is used within the following main elements: <SimMission.ObjectInteractionTrigger>, <SimMission.CameraTargetTrigger>. It is a container element used to assign an object to a node within the world. As such it requires the following sub-elements: <SimMission.ObjectReference />, <OffsetXYZ>, <NodeName>, <AltitudeIsAGL>, <IsOnGround>, <OrientationType> and <Orientation>.

 

<OffsetXYZ>

This element has no attributes and is a sub-element of <AttachedWorldObject>. It is used to set the offset position of the object being defined from the attachment node. The information given to the element is a comma separated list of three items, x-offset, y-offset and z-offset.

 

<NodeName>

This element has no attributes and is a sub-element of <AttachedWorldObject>. It requires a string that is the name of a node for the object to be attached to. If not supplied the node will default to the root node inside the hierarchy.

 

<OrientationType>

This element has no attributes and is a sub-element of <AttachedWorldObject>. It sets the way that the <Orientation> values should be applied to the object item. It can be any one of the following strings:

  • ORIENTATION_TYPE_DEFAULT
  • ORIENTATION_TYPE_COMPOSITE
  • ORIENTATION_TYPE_ABSOLUTE

 

 

<InitWorldPosition>

This element is used within the following main elements: <SimMission.ObjectInteractionTrigger>, <SimMission.CameraTargetTrigger>. It is a container element with no attributes that is used to define the initial position within the world for the object or trigger or other item. As such it requires the following sub-elements: <AltitudeIsAGL>, <IsOnGround>, <WorldPosition>, <LocalOffsetXYZ>, <LocalOrientation>, and <Orientation>.

 

 

<InitRelativeToWorldObject>

This element is used within the following main elements: <SimMission.ObjectInteractionTrigger>, <SimMission.CameraTargetTrigger>. It is a container element with no attributes that is used to define the initial position within the world relative to a specific world object. As such it requires the following sub-elements: <SimMission.ObjectReference />, <OffsetXYZ>, <NodeName>, <AltitudeIsAGL>, <IsOnGround> and <Orientation>

 

 

<RelativePosition>

This element is used within the following main elements: <SimMission.ObjectInteractionTrigger>, <SimMission.CameraTargetTrigger>. It is a container element with no attributes that is used to define the initial position within the world relative to a specific world object. As such it requires the following sub-elements: <OffsetXYZ>, <AltitudeIsAGL> and <Orientation>.

 

 

<AltitudeIsAGL>

This element has no attributes and is a sub-element of the following elements: <AttachedWorldPosition>, <InitWorldPosition>. It simply sets whether the altitude for the item is calculated based on AGL (TRUE) or based on MSL (FALSE). This should be set to TRUE or FALSE.

 

 

<IsOnGround>

This element has no attributes and is a sub-element of the following elements: <AttachedWorldPosition>, <InitWorldPosition>. It is used to set whether the item is snapped to the ground or not. This should be set to TRUE or FALSE.

 

 

<WorldPosition>

This element has no attributes and is a sub-element of the following elements: <AttachedWorldPosition>, <InitWorldPosition>. It is used to set the position and the altitude for the item being defined. The information given to this element is a comma separated list of three items, the latitude, longitude and altitude, and it should be formatted exactly like the following example using Degrees/Minutes/Seconds for the lat/long and ft for the altitude:

<WorldPosition>N48° 52' 25.85",E2° 17' 42.37",+000050.60</WorldPosition>

Note that the altitude may be ignored if the <IsOnGround> element is available and set to TRUE.

 

 

<Orientation>

This element has no attributes and is a sub-element of the following elements: <AttachedWorldPosition>, <InitWorldPosition>. It is used to set the orientation of the item being defined. The information given to the element is a comma separated list of three items, the pitch, bank and heading, relative to the world space.

 

 

<LocalOffsetXYZ>

This element has no attributes and is a sub-element of the following elements: <AttachedWorldPosition>, <InitWorldPosition>. It is used to set the offset position of the object being defined from the main element node. The information given to the element is a comma separated list of three items, x-offset, y-offset and z-offset.

 

 

<LocalOrientation>

This element has no attributes and is a sub-element of the following elements: <AttachedWorldPosition>, <InitWorldPosition>. It is used to set the offset position of the object being defined from the main element node. The information given to the element is a comma separated list of three items, the pitch, bank and heading, relative to the orientation of the node it is attached to.

 

<Latched>

This element is used within the following main elements: <SimMission.ObjectInteractionTrigger>, <SimMission.CockpitInteractionTrigger>, <SimMission.CameraTargetTrigger>. It is used to tell if the trigger has fired or not, where TRUE means it has fired and FALSE means it hasn't.

 

 

<OneShot>

This element is used within the following main elements: <SimMission.ObjectInteractionTrigger>, <SimMission.CockpitInteractionTrigger>, <SimMission.CameraTargetTrigger>. When set to TRUE the main trigger element will only be fired once. If set to FALSE then the trigger may be fired multiple times, whenever the appropriate criteria is met.