IMPORTANT TEMPLATES

When working with Model Behaviors, there are a great number of templates that you can use within the different components and input events associated with an aircraft or a SimObject. However, there are some that are considerably more important and more useful than others, due to them being designed for use in a looser, more generic way than the others which may have very specific uses. On this page you can find a brief outline of what we consider to be the most important and useful of these "generic" templates along with the required parameters for each.

 

 

Animation Templates

The templates listed here are used to govern animations and the different types of events that they can be used to trigger. The templates themselves can be found in the following files, where the comments associated with each one explain the required parameters:

<PACKAGES ROOT>\Official\OneStore\fs-base-aircraft-common\ModelBehaviorDefs\Asobo\Generic\Animations.xml
<PACKAGES ROOT>\Official\OneStore\fs-base-aircraft-common\ModelBehaviorDefs\Asobo\Generic\AnimationTriggers.xml

 

ASOBO_GT_Anim

This is the most generic template that is commonly used to configure an animation. It takes an <ANIM_NAME> and either a <ANIM_SIMVAR> and its associated parameters or an <ANIM_CODE>.

 

ASOBO_GT_AnimTriggers_SoundEvent

This template is for generating a <WWISE_EVENT> sound event for a given <ANIM_NAME>.

 

ASOBO_GT_AnimTriggers_SoundEvents_Same

This template is for generating a <WWISE_EVENT> sound event for a given <ANIM_NAME> event at regular interval <COUNT> number of times.

 

ASOBO_GT_AnimTriggers_2SoundEvents

This template is for generating two Wwise events - <WWISE_EVENT_1> and <WWISE_EVENT_2> - for a given <ANIM_NAME> (in different animation directions defined using <DIRECTION_2> and <DIRECTION_2>) for a given <ANIM_NAME>.

 

 

Material Templates

The following template list is for gauges and generating emissive material effects with them. These templates can be found in the following file:

<PACKAGES ROOT>\Official\OneStore\fs-base-aircraft-common\ModelBehaviorDefs\Asobo\Generic\Emissive.xml

 

ASOBO_GT_Component_Emissive_Gauge

This template can create a component with a <NODE_ID> and uses one of the other emissive templates listed below.

 

ASOBO_GT_Emissive_Gauge

This is a simple emissive setup template, taking an <EMISSIVE_CODE>. The template uses a default <FAILURE> to prevent the emissive from working without electrical power. Note that if you set <FAILURE_CIRCUIT> you can specify a specific circuit ID that needs power for the gauge to be emissive.

 

ASOBO_GT_Emissive_Potentiometer

This template uses "ASOBO_GT_Emissive_Gauge", only it modulates the <EMISSIVE_CODE> by the potentiometer value. <POTENTIOMETER> contains the index of the LIGHT POTENTIOMETER SimVar to use, which will be a value between 0 and 1.

 

ASOBO_GT_Emissive_Power_Setting

This template uses "ASOBO_GT_Emissive_Gauge", only it modulates the <EMISSIVE_CODE> by the <SIMVAR_POWER_SETTING> value, which is from 0 to 1.

 

 

VFX Templates

 

This template can be found in the following file:

<PACKAGES ROOT>\Official\OneStore\fs-base-aircraft-common\ModelBehaviorDefs\Asobo\Generic\FX.xml

 

ASOBO_GT_FX

This is the base VFX template. It must be used in a component that specifies a node, and has <FX_GUID> and <FX_CODE> as required parameters.

 

 

Input Templates

The templates in this section are generally used as part of the Input Event system to retrieve user input from cockpit controls. These templates can be found in the following file:

<PACKAGES ROOT>\Official\OneStore\fs-base-aircraft-common\ModelBehaviorDefs\Asobo\Generic\Interactions.xml

 

ASOBO_GT_MouseRect

This is the main input template that is used to setup an interaction box based on the current component node it's created on. There are a great number of parameters that can be used to configure the MouseRect, and we recommend that you study the default parameters listed in the template.

 

ASOBO_GT_Interaction_WheelLeftDrag_Axis

You can use this template to set up an interaction that handles both mouse wheel events and mouse drag events (on a given "AXIS"). This is used for lever interactions and takes several parameters:

  • <DOWN_CODE> for the LMB down check
  • <RELEASE_CODE> for the LMB up check
  • <DRAG_CODE> for LMB dragging when the LMB is held down
  • <POSITIVE_AXIS_CODE> for the wheel up
  • <NEGATIVE_AXIS_CODE> for the wheel down

Usually used with <USE_TRAJECTORY_DRAG_MODE> (true) to make use of (M:DragPercent).

 

ASOBO_GT_Interaction_WheelAndContinuousLeft

You can use this template to set up an interaction that handles both mouse wheel events and mouse drag events along the X axis. This is generally used for knob interactions and has two required parameters: <CLOCKWISE_CODE> (Wheel Up / LMB down and drag right) and <ANTICLOCKWISE_CODE> (Wheel Down / LMB down and drag left).

 

ASOBO_GT_Interaction_WheelAndContinuousLeft_LeftSingle

As with the above template - "ASOBO_GT_Interaction_WheelAndContinuousLeft" - only it has the added parameter <LEFT_SINGLE_CODE> to execute an event on click.

 

ASOBO_GT_Interaction_WheelAndContinuousLeft_LeftSingleTimed

As with the above template - "ASOBO_GT_Interaction_WheelAndContinuousLeft_LeftSingle" - only now the event is split in two, one for the short click and one for the long click. This means the following parameters are required: <SHORT_CLICK_CODE> and <LONG_CLICK_TIME>

 

ASOBO_GT_Interaction_WheelAndContinuousLeft_PushPull

As with the above template - "ASOBO_GT_Interaction_WheelAndContinuousLeft" - only you also have the the two required parameters <CODE_UP> (for a push event) and <CODE_DN> (for a pull event).

 

ASOBO_GT_Interaction_LeftSingle_Code

With this template you can setup an interaction handling a simple click event, with the code to be executed provided in the required <LEFT_SINGLE_CODE> element.

 

ASOBO_GT_Interaction_Tooltip

This template is for inoperative elements and is used to disable the highlighting and lockability of the interactable but keeping an inoperative tooltip when hovered over. The template requires the <NODE_ID> parameter.

 

 

Misc. Templates

These templates can be found in the following files:

<PACKAGES ROOT>\Official\OneStore\fs-base-aircraft-common\ModelBehaviorDefs\Asobo\Generic\Updates.xml
<PACKAGES ROOT>\Official\OneStore\fs-base-aircraft-common\ModelBehaviorDefs\Asobo\Generic\Visibility.xml

 

ASOBO_GT_Update

This template is used to set up an update where if <UPDATE_ONCE> is set to "True", then the update runs once at spawn, otherwise it runs every so often based on the <FREQUENCY> (which is once per second by default). Any code executed must be provided in the <UPDATE_CODE> parameter.

 

ASOBO_GT_Visibility

With this template you can configure the visibility of a component. It takes either a <VISIBILITY_SIMVAR> element and its associated parameters or a <VISIBILITY_CODE> element.