# Navigation Services XML Properties The `.xml` file is used to define the *states*, *behaviours* and *tasks* that will make up the service being defined. In general, you will have one file per service. For example if you have an aircraft that has a skydiving activity then you may have two different navigation service files: - one file for the skydivers - another file for the pilot and copilot   This file is formatted using [XML](../../devmode/editors/project-editor/file-formats/xml-files/) and can be edited by using any text editor. The general format for the file is as follows: ``` xml ``` When creating these files we recommend that you follow an established naming convention that is used by the files included in the default packages for Microsoft Flight Simulator 2024. This convention requires that the different named elements in the file are prefixed as follows: - `CS_` → Navigation State (Cabin State) - `BS_` → Behaviour State - `TN_` → Task Name For example: ``` xml ``` As a continuation to this naming convention, we strongly suggest that each file also has a `CS_INIT` state for the navigation service and a `BS_INIT` state for the behaviours. These would be the state and behaviour that are first in the {{< glossterm >}}fsm{{< /glossterm >}} when the navigation service file is first initialised.     ### <SimBase.Document> This is the main parent element that is used to contain the navigation service data. This element should have the following sub-elements: 1. `` 2. ``   This element has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `type` | The type of SimBase file. Should always be "MissionFile". | String | Yes | | `version` | The file version. | Float | No | | `id` | The unique ID for the navigation service. This can be a [GUID](../mission-xml-files/mission-xml-properties/#) enclosed in `{}`, or a name string (alpha-numeric characters and under-scores "\_", only). You can find more information on GUID's here: [GUIDs](../../introduction/using-the-sdk/#GUIDs) | String | Yes | {{< /table-wrapper >}}     ### <CabinService.ServiceStateList> This is is a container element that is used to list the different states within the navigation service {{< glossterm >}}fsm{{< /glossterm >}}. It has no attributes and requires one or more of the following sub-element: 1. ``   The following shows a complete example of a navigation service state list definition in an XML file: ``` xml ```     ### <ServiceState> This element is a sub-element of `` and is used to define a single state within the navigation service {{< glossterm >}}fsm{{< /glossterm >}}. It must contain *at least* one of the following sub-element (but may contain more): 1. ``   Note that by default the first `` defined will be the "start" state of the navigation service {{< glossterm >}}fsm{{< /glossterm >}}, used when the object is first initialised. See the `` section for an example of use.   This element has the following attributes:  
AttributeDescriptionTypeRequired
nameThe name of the state. If this is the first state in the FSM, then it should be named CS_INIT, otherwise use CS_<name>.StringYes
StateChangeThis is the name of a <ServiceState> to move to at the end of the service state being defined currently. Note that this will only change the state for the navigation Service FSM, which may conflict with the <AvailableTask> of the associated behaviour, which is something to be aware of.StringNo
RecomputeInteractiveObjectsLinks

This should be set to "True" if you want to recompute all of the interactive objects links on the first frame of the state.

Default value is "False".

BooleanNo
EFBEnabled

If this is set to "True" then the EFB is allowed to change the behaviours in this state.

Default value is "False".

BooleanNo
EFBDefaultStateBoarding

If this is set to "True", the EFB will call this state if boarding is forced while being in a state that currently is not boarding.

Default value is "False".

BooleanNo
EFBPostBoarding

If this is set to "True", the EFB is allowed to move the behaviours in this state, as they are already boarded.

Default value is "False".

BooleanNo
    #### <Task/> This is a self-closing sub-element of `` which is used to define a task to be performed when the navigation service {{< glossterm >}}fsm{{< /glossterm >}} reaches the state that holds the task(s). You may have multiple `` elements per state. See the `` section for an example of use.   The element has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|:--------:| | `TaskName` | The name of the task. You should use the use `TN_` naming convention for this attribute. | String | Yes | | `ParamBehaviourName` | This is the `name` attribute of the `` that is to be used to perform the task. | String | Yes | | `Count` | This corresponds to the number of behaviours that have to do the task before it can be validated. Note that, by default, a navigation state requires *all* behaviours to do a given task before it is considered "validated" (completed). When a task is not validated, it can block the change to a new service state. This may be avoided by either using 0 for the count, or by "forcing" the state change using the `` element in the mission definition. | Integer | No | {{< /table-wrapper >}}     ### <CabinService.BehaviourList> This is is a container element that is used to list the different behaviours that can be used within the tasks defined in the various navigation service {{< glossterm >}}fsm{{< /glossterm >}} states. It has no attributes and requires one or more of the following sub-element: 1. ``   The following shows a simple example of a behaviour state definition in an XML file: ``` xml CS_SIT ```     ### <Behaviour> This element is a sub-element of `` and is used to define a group of behaviours that will be used by actors. It must contain one of the following sub-element: 1. ``   See the `` section for an example of use. This element has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|----------------------------|--------|:--------:| | `name` | The name of the behaviour. | String | Yes | {{< /table-wrapper >}}     ### <BehaviourStateList> This is is a child of the `` element and acts as a container element for one or more of the following element: 1. ``   Within this element you can define all the different states for the actor behaviour {{< glossterm >}}fsm{{< /glossterm >}}. See the `` section for an example of use.     ### <BehaviourState> This is a sub-element of the `` and is used to define a single actor behaviour. This element has the following sub-elements: 1. `` 2. `` 3. `` 4. `` 5. ``   This element has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `name` | The name of the behaviour state. You should use the use `BS_` naming convention for this attribute. | String | Yes | | `UseMassInstancing` | When set to "true", the object with this behaviour will be added to the "Mass Instancing" group, which means that it will stop being updated when it is far from the camera. If omitted, it will default to "true". | String | No | {{< /table-wrapper >}}   Below is a simple example of this element being used: ``` xml CS_RESET ```     #### <LinkedCabinStateList> This is a sub-element of `` and has no attributes. It is a container element for one or more of the following element: 1. ``   ##### <LinkedCabinState> This is a sub-element of `` and has no attributes. For this element you are expected to supply a navigation Service state name (as defined in ``). This state will be used when a navigation State change has been forced. ``` xml CS_RESET ``` The normal behaviour when a state change happens is that a new group of tasks will become available, as defined in the ``. When a behaviour has finished the current tasks, it will then look into this list of possible next tasks, and if one of these tasks is available, it will be performed and (usually) launch a state change to get to a new behaviour state for the task. However, when you force the navigation state change, you will want to bypass these available tasks, as they will not be relevant for the forced state, which is when the `` element is comes in. When a state change is forced, all behaviours will switch to the behaviour flagged as the first one for the new navigation state after a skip using this element.     #### <OnFirstFrame> This child element of `` is a container element for a ``, where the sequence defines what should happen on the very first frame of the behaviour *after* the behaviour state has been changed to the one containing the `` element. The element has no attributes, and below you can see an example of how it would look in the XML: ``` xml ```     #### <OnLastFrame> This child element of `` is a container element for a ``, where the sequence defines what should happen on the very *last* frame of the behaviour *before* the behaviour state changes to the next one. The element has no attributes, and below you can see an example of how it would look in the XML: ``` xml ```     #### <OnSkipFrame> This child element of `` is a container element for a ``, where the sequence defines what should happen *before* the very first frame of the behaviour state (so before the `` element is triggered) just *after* a behaviour state has been skipped to the one containing the `` element. {{< callout context="note" title="NOTE" icon="outline/bulb" >}} the `` element will still be triggered, just that it will be triggered after the `` element. {{< /callout >}} The element has no attributes, and below you can see an example of how it would look in the XML: ``` xml ```     #### <AvailableTaskList> This is a sub-element of `` and has no attributes. It is a container element for one or more of the following element: 1. ``     ##### <AvailableTask> This element is a sub-element of `` and is used to define a task that is available as part of the behaviour state. The task being defined is named using the attribute listed below, and the sequence of events that will comprise the task itself are defined using the following sub-element: 1. ``   This element has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |------------|------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `TaskName` | The task name for the navigation service behaviour. You should use the use `TN_` naming convention for this attribute. | String | Yes | {{< /table-wrapper >}}   Example of how it would look in the XML: ``` xml ```     ### <Sequence> This is a container sub-element which defines a sequence of events that should be followed when the sequence is called. The timing of the sequence will depend on the parent element where the sequence has been placed, which can be one of the following: 1. `` 2. `` 3. `` 4. ``   The element itself can contain any of the following sub-elements: 1. `` 2. `` 3. `` 4. `` 5. `` 6. `` 7. `` 8. `` 9. `` (Required) 10. `` 11. `` 12. `` 13. ``   The `` element may also have the following attributes:  
AttributeDescriptionTypeRequired
StateChangeThis attribute can be used to force a behaviour state state change. The supplied string should be the name of a <BehaviourState> element.StringNo
ProbabilityThis attribute can be used to provide a probability that the sequence will be chosen. Value should be a Percent Over 100, and the sum of all supplied sequence probabilities for the task should be 1.0.FloatNo
DisplayModelEntryThis attribute can be used to change the model that is being displayed. Fore example, this can be used to switch models if you have a service worker with a headset when inside the aircraft but want to have them without the headset when outside the aircraft. If this attribute is omitted then the default model will be used.

String:

  1. "Interior"
  2. "Exterior"
No
RequireLOD0

When set to "True", the SimObject will have it's LOD0 pre-loaded before being displayed.

Default value is "False".

BooleanNo
SetHighQualityForRTCRenderFlag

When set to "True", the SimObject will be flagged for high-quality rendering. Only used for objects used in RTCs.

Default value is "False".

BooleanNo
RecomputeInteractiveObjectsLinksAction

Recomputes the links between this object and the navigation service in which it's an interactor.

Default value is "False".

BooleanNo
    #### <RegisterForInteractionVolume /> This is a self-closing element used in a `` to register the navigation service as one which can interact with any *interactive volumes*. Objects registered in this way are the *only* ones that can interact with a node (assuming the node has the [interactiveVolumeConstraint](../cfg-files/navigation_graph.cfg/#interactiveVolumeConstraint) defined as "RegisterOnly").   This element has the following parameters:  
AttributeDescriptionTypeRequired
NodeTagThis is the tag of the node to search for with the interaction volume. Note that if multiple nodes have this tag, then the first node with this tag will be used.StringYes
RegisterId

This is an ID string for the registration, which can be used with <UnregisterFromInteractionVolume> so it can deregister specific interactions when necessary.

Default is "".

StringNo
    #### <UnregisterFromInteractionVolume /> This is a self-closing element used in a `` to deregister the navigation service from being able to interact with any *interactive volumes*.   This element has the following parameter:  
AttributeDescriptionTypeRequired
RegisterId

This is the string that identifies the interaction that is to be deregistered from the interaction manager as capable of using an interaction volume.

Default is "".

StringNo
    #### <AttachToAircraft /> This is a self-closing element used in a ``. It has no attributes and simply tells the simulation that the object behaviour has been attached to the aircraft. Attached objects will have two effects: 1. Should the aircraft move, the attached object will move along with it. 2. The weight of the object will be added to the weight of the aircraft and affect its physics, such that if a heavy object (for example cargo) is placed in the left side of the aircraft, the aircraft will "sag" to the left. Weight is based on the values set in the `sim.cfg` file for the [Simple Object](../modular-simobjects/simobjects/simple-objects/) or the [Procedural Character](../modular-simobjects/simobjects/procedural-characters/) associated with the behaviour.     #### <DetachFromAircraft> This element is used in a ``. It tells the simulation that the object behaviour has been detached from the aircraft. Detaching an object will mean that the weight of the object will no longer be considered by the aircraft physics, and it's weight will be removed from the total aircraft weight. Weight is based on the values set in the `sim.cfg` file for the [Simple Object](../modular-simobjects/simobjects/simple-objects/) or the [Procedural Character](../modular-simobjects/simobjects/procedural-characters/) associated with the behaviour.   This element has the following parameter:  
AttributeDescriptionTypeRequired
StayInCabinService

This is used to define whether to keep object in the navigation service ("True") or not ("False"). If not kept in the navigation service, it will not listen to new tasks.

Default is "False".

BooleanNo
    #### <TaxiAIMoveToDestination /> This is a self-closing element used in a ``. It has no attributes and simply tells the simulation that the behaviour object should move along the taxiway to the stored destination using the **Taxiway AI ** as part of the sequence. Note that this will require that the [Apron Services XML](../environment/airports-and-facilities/apron-services/apron-services-overview/) has been correctly set up and the object has been linked to **Apron Control**.     #### <InteractWithNode> This element used in a `` and allows the behaviour object to interact with the current graph node. Using this element will generate a check to see if an interaction with the name `InteractionName` is available, and if it exists it will call the associated XML. For more information, please see here: - [Service Interaction XML Properties](interaction-xml-properties/)   This element has the following attributes:  
AttributeDescriptionTypeRequired
InteractionName The interaction to perform on the current graph node, as defined in the Interaction XML.StringYes
Remotely

By default the behaviour object should be on the graph node to perform the interaction, but you can perform the interaction remotely by setting this attribute to "TRUE".

Default is "FALSE".

BooleanNo
    #### <MoveToGraphNode> This element used in a `` and is used to tell the behaviour object to move to a selected graph node. The exact node that the behaviour object moves to will depend on the combination of `InteractionName`, `NodeTag` and `NodeOrder` attributes.   This element can have one or more `` sub-elements to define the nodes through which the object should move to get to the final node in the node step list. If this sub-element is used, then the following attributes do not need to be included: 1. `NodeTag` 2. `NodeOrder` 3. `InteractionName` 4. `CheckNodeReserved`   This element has the following attributes:  
AttributeDescriptionTypeRequired
InteractionName

The interaction used to select the graph node to move to, as defined in the Interaction XML. The interaction XML may contain multiple nodes, so the node that is chosen will depend on the NodeOrder attribute.

Default is "".

NOTE: This is not used when the element has one or more <NodeStep> sub-element.

StringNo
NodeTag

The interactive node tag to move to, as defined in the Interaction XML. Multiple nodes may share a tag, so the node that is chosen will depend on the NodeOrder attribute.

Default is "".

NOTE: This is not used when the element has one or more <NodeStep> sub-element.

StringNo
NodeTagsToExclude

One or more interactive node tags to exclude from movement (as defined in the Interaction XML), given as a comma seperated list.

Default is "".

StringNo
MaxSpeed

The maximum speed of movement, given in ft per second (note that this can't be negative). If this is omited then the value set in the sim.cfg file max_speed_mph / max_speed_knots parameters will be used, and if one of those doesn't exist then it will be the default value.

Default is 3.28084 (approx: 1m per second).

FloatNo
MaxSpeedAlways

When set to "True", the object will always move at the given maximum speed, otherwise it will move at a variable speed, which will never exceed the maximum speed.

Default is "False".

BooleanNo
MoveStraight

Sets whether to move straight to the given node ("TRUE") or whether to follow the defined path ("FALSE").

Default is "FALSE".

BooleanNo
NodeOrder

This attribute defines the way that nodes will be parsed to find the node that the behaviour object should move to. The nodes that will be used are defined using the InteractionName and/or the NodeTag attributes.

Default is "Random".

NOTE: This is not used when the element has one or more <NodeStep> sub-element.

Enum:

  1. "Random" - Choose a random node to move to
  2. "Ascending" - Choose the next node in ascending order by ID
  3. "Descending" - Choose the next node in descending order by ID
  4. "Distance" - Choose the nearest node based on distance to the behaviour object.
  5. "Distance_Reverse" - Choose the furthest node based on distance from the behaviour object.
  6. "Placement_Config" - Look at the placement config priority.
No
Ratio

This value is used to modify the maximum speed (as defined in the sim.CFG file) at which the behaviour object will move. For example, if the speed is set to 2m per second, and you set the ratio tio 0.5, the maximum speed of the object will be 1m per second.

Default is 1.0.

FloatNo
TeleportOnSkip

When this is set to "TRUE" the behaviour object will "teleport" to the selected node if the sequence is cancelled by a skip. If set to "FALSE", then it will continuing to move along the path, regardless of the skip.

Default is "FALSE".

BooleanNo
WaitAvailableToMove

When this is set to "TRUE" the behaviour object will wait to move to a node if no free node is available. If set to "FALSE", and no node is available, it will check HideOnNodeNotFound.

Default value is "FALSE".

BooleanNo
HideOnNodeNotFound

When this is set to "TRUE" the behaviour object will be hidden if no node with the expected name is available, and then teleport to the node the instant one becomes available. If set to "FALSE", the behaviour object will simply do nothing and be static and visible until a node is available.

NOTE: While DevMode is enabled, this attribute does nothing and models will always be visible.

Default is "TRUE".

BooleanNo
CheckNodeReserved

When this is set to "True" the simulation will check to see if a node matching the supplied tags is reserved or not. A reserved node is one where an object is already moving to it, but has not arrived yet.

Default value is "False".

NOTE: This is not used when the element has one or more <NodeStep> sub-element.

BooleanNo
    ##### <NodeStep> This element used in a `` to define one of the "steps" (nodes) for the object to move to. You can have multiple of these elements within the parent, and the object will move between them.   This element has the following attributes:  
AttributeDescriptionTypeRequired
InteractionName

The interaction used to select the graph node to move to, as defined in the Interaction XML. The interaction XML may contain multiple nodes, so the node that is chosen will depend on the NodeOrder attribute.

Default is "".

StringNo
NodeTag

The interactive node tag to move to, as defined in the Interaction XML. Multiple nodes may share a tag, so the node that is chosen will depend on the NodeOrder attribute.

Default is "".

StringNo
NodeOrder

This attribute defines the way that nodes will be parsed to find the node that the behaviour object should move to. The nodes that will be used are defined using the InteractionName and/or the NodeTag attributes.

Default is "Random".

Enum:

  1. "Random" - Choose a random node to move to
  2. "Ascending" - Choose the next node in ascending order by ID
  3. "Descending" - Choose the next node in descending order by ID
  4. "Distance" - Choose the nearest node based on distance to the behaviour object.
  5. "Distance_Reverse" - Choose the furthest node based on distance from the behaviour object.
  6. "Placement_Config" - Look at the placement config priority.
No
CheckNodeReserved

When this is set to "True" the simulation will check to see if a node matching the supplied tags is reserved or not. A reserved node is one where an object is already moving to it, but has not arrived yet.

Default value is "False".

BooleanNo
    #### <TeleportToGraphNode> This element used in a `` and is used to tell the behaviour object to teleport directly to a selected graph node. The exact node that the behaviour object teleports to will depend on the combination of `InteractionName`, `NodeTag` and `NodeOrder` attributes.   This element has the following attributes:  
AttributeDescriptionTypeRequired
InteractionName

The interaction used to select the graph node to move to, as defined in the Interaction XML. The interaction XML may contain multiple nodes, so the node that is chosen will depend on the NodeOrder attribute.

Default is "".

StringNo
NodeTag

The interactive node tag to move to, as defined in the Interaction XML. Multiple nodes may share a tag, so the node that is chosen will depend on the NodeOrder attribute.

Default is "".

StringYes
NodeOrder

This attribute defines the way that nodes will be parsed to find the node that the behaviour object should move to. The nodes that will be used are defined using the InteractionName and/or the NodeTag attributes.

Default is "Random".

Enum:

  1. "Random" - Choose a random node to move to
  2. "Ascending" - Choose the next node in ascending order by ID
  3. "Descending" - Choose the next node in descending order by ID
  4. "Distance" - Choose the nearest node based on distance to the behaviour object.
  5. "Distance_Reverse" - Choose the furthest node based on distance from the behaviour object.
  6. "Placement_Config" - Look at the placement config priority.
No
HideOnNodeNotFound

When this is set to "TRUE" the behaviour object will be hidden if no node with the expected name is available, and then teleport to the node the instant one becomes available. If set to "FALSE", the behaviour object will simply do nothing and be static and visible until a node is available.

NOTE: While DevMode is enabled, this attribute does nothing and models will always be visible.

Default is "TRUE".

BooleanNo
TeleportWhenNodeAvailable

When set to "True", and if no nodes matching the required tags are available, the object will wait until a node is available to teleport to it. When this is set to "False", it will check HideOnNodeNotFound.

Default value is "True".

BooleanNo
CheckNodeReserved

When this is set to "True" the simulation will check to see if a node matching the supplied tags is reserved or not. A reserved node is one where an object is already moving to it, but has not arrived yet.

Default value is "True".

BooleanNo
    #### <NotifyTaskComplete> This element required by a `` and is used to tell the `` {{< glossterm >}}fsm{{< /glossterm >}} that the given task has been completed. This element has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |------------|-------------------------------------------------|--------|:--------:| | `TaskName` | The name of the task to set as being completed. | String | Yes | {{< /table-wrapper >}}     #### <PlayAnimation> This element used in a `` and is used to tell the behaviour object to play its animation. The sequence will then wait until the animation has been completed before continuing on to the next action in the sequence. This element has the following attributes:  
AttributeDescriptionTypeRequired
Name

The name of the animation to use.

StringYes
Layer

The name of the layer that the animation is on. If this could be any layer, then you should use "Base".

Default is "Base".

StringNo
Force

If set to "TRUE", the animation will play even if a transition exists to another state. If "FALSE" then it will not.

Default is "FALSE".

BooleanNo
    #### <SetAlpha> This element used in a `` and is used to set the transparency of the behaviour object. This element has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|---------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `Ratio` | The alpha value to use for the behaviour object, expressed as a {{< glossterm >}}percent_over_100{{< /glossterm >}}. | String | Yes | {{< /table-wrapper >}}     #### <SetHighQualityForRTCRenderFlag /> This element used in a `` and is used to set whether RTC's should use a high quality render or not. It is a self-closing element and has the folloing attribute:  
AttributeDescriptionTypeRequired
AddHightQualityForRTCRenderFlag

When this is set to "True", a render flag is set to use high quality settings on the container for the RTC.

The default value is "False".

BooleanNo
    #### <RequireLOD0 /> This element used in a `` and is used to tell the simulation to pre-load LOD0 for the container. This element has no attributes and only needs to be included in the sequence definition for it to be active.    
AttributeDescriptionTypeRequired
AddHightQualityForRTCRenderFlag

When this is set to "True", a render flag is set to use high quality settings on the container for the RTC.

The default value is "False".

BooleanNo
    ### <CabinService.RegisterInteractorsToCabinServiceAction> This is a sub-element of `` and is not usually included as part of the navigation service XML, but instead as part of the [mission XML](../mission-xml-files/mission-xml-properties/) file. It is used to register an interactive object with the navigation service controller and flag it as interactive for a specific navigation service. This element requires the following sub-elements: 1. `` 2. `` 3. `` 4. ``   This element has the following parameters:   {{< table-wrapper >}} | 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](../mission-xml-files/mission-xml-properties/#) enclosed in {}. You can find more information on GUID's here: [GUIDs](../../introduction/using-the-sdk/#GUIDs) | String | Yes | {{< /table-wrapper >}}   Example of how it would look in the XML: ``` xml Register Generator as interactive to loadworker service LoadWorkerService POWER_GENERATOR_ACCESS ```     #### <CabinName> This sub-element of `` has no attributes and is used to define the navigation service to link the interaction with.     #### <Interactor> This sub-element of `` has no attributes and is used to define the interactive object to assign as the interactor in the navigation service. It requires the following sub-elements: 1. `` 2. ``     ### <NodeTag> This element is used to supply the tag associated with one or more nodes that should be considered by the calling navigation service or calculator. It is used in the following elements: 1. `` 2. `` 3. `` 4. ``