VFX COMMON XML PROPERTIES

On this page you can find a list of all the common XML element tags that are used by the various Visual Effects Templates, and that can also be used when creating your own templates using the ASOBO_VFX_Template helper (see here for more information: VFX Templates)

 

 

<FX_NAME>

This element is used to define the name of the VFX that is being created in the template. For example:

<FX_NAME>MY_SPECIAL_EFFECT</FX_NAME>

 

 

<FX_GUID>

This is what is used to identify the VFX, using a GUID. This GUID can be found as the InstanceID attribute value of the <VisualVffect.VisualEffect> element in the Visual Effect XML asset source file. It must have the following format: {XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}. For example:

<FX_GUID>7E68323C-E75D-4F5B-988E-65DD4956F6BA</FX_GUID>

 

 

<FX_CODE>

This element is used to give the default Reverse Polish Notation (RPN) code expression to be evaluated by the simulator to spawn/de-spawn the effect. The given code must return TRUE (1) for the VFX to be spawned, and when the code returns FALSE (0) the VFX will be stopped. For example:

<FX_CODE>(A:GENERAL ENG COMBUSTION:1, Bool) 0 &gt;</FX_CODE>

 

 

<FX_CONTACT_POINT_ID_N>

This element is used to give the name (or index) of the Contact Point you want to attach the effect to. For each contact point, starting at N=0, increment N by 1, without skipping any values. To give the name of a contact point (the recommended method of identifying the point, using an index number is only for legacy aircraft) you should format it as follows: 'CONTACT_POINT_NAME'_n. Note that if no contact point is supplied for an effect, the default value is considered as -1. For example:

<FX_CODE>(A:GENERAL ENG COMBUSTION:1, Bool) 0 &gt;</FX_CODE>

 

 

<FX_NODE>

This element is used to define a model node from a glTF file which makes up a part of the model. This node will then be used as the the attach point for the effect, meaning that if the node is part of an animated helper then the effect will move along with the part the node belongs to. For example:

<FX_NODE>FX_afterburner_right</FX_NODE>

 

 

<FX_OFFSET_X>, <FX_OFFSET_Y>, <FX_OFFSET_Z>

These element tags define an offset in the coordinate space defined for the Visual Effect, in meters, along the X, Y and Z axis. If these parameters are supplied with no <FX_NODE> element or <FX_CONTACT_POINT_ID_N> element, the offset will be relative to the Datum Reference Point, otherwise it will be relative to the node or contact point that was given. If not supplied, the default value for all three elements is 0. For example:

<FX_OFFSET_X>0.00</FX_OFFSET_X>
<FX_OFFSET_Y>-0.3</FX_OFFSET_Y>
<FX_OFFSET_Z>1.25</FX_OFFSET_Z>

 

  

<FX_ROTATION_OFFSET_P>, <FX_ROTATION_OFFSET_B>, <FX_ROTATION_OFFSET_H>

These element tags define a rotation angle, in degrees, in local space along the pitch (X), bank (Y) or heading (Z) axis. If not supplied, the default value for all three elements is 0. For example:

<FX_ROTATION_OFFSET_P>0.00</FX_ROTATION_OFFSET_P>
<FX_ROTATION_OFFSET_B>90</FX_ROTATION_OFFSET_B>
<FX_ROTATION_OFFSET_H>12.5</FX_ROTATION_OFFSET_H>

 

 

<ENABLE_SURFACE_TYPE_N>

The element tag is used to enumerate the different surface types over which your VFX may spawn. For each surface type that you add, starting at N=0, increment N by 1, without skipping any values. Note that by including at least 1 surface type element in the VFX definition, all other surface types are implicitly disabled. For example, if you wanted a landing VFX to only spawn on dirt, sand, or gravel, you would have something like the following:

<ENABLE_SURFACE_TYPE_0>DUST</ENABLE_SURFACE_TYPE_0>
<ENABLE_SURFACE_TYPE_1>SAND</ENABLE_SURFACE_TYPE_1>
<ENABLE_SURFACE_TYPE_2>GRAVEL</ENABLE_SURFACE_TYPE_2>

Available surfaces are as follows:

String:

  1. "CONCRETE"
  2. "GRASS"
  3. "WATER"
  4. "GRASS_BUMPY"
  5. "ASPHALT"
  6. "SHORT_GRASS"
  7. "LONG_GRASS"
  8. "HARD_TURF"
  9. "SNOW"
  10. "ICE"
  11. "URBAN"
  12. "FOREST"
  13. "DIRT"
  14. "CORAL"
  15. "GRAVEL"
  16. "OIL_TREATED"
  17. "STEEL_MATS"
  18. "BITUMINUS"
  19. "BRICK"
  20. "MACADAM"
  21. "PLANKS"
  22. "SAND"
  23. "SHALE"
  24. "TARMAC"
  25. "WRIGHT_FLYER_TRACK"

 

 

<DISABLE_SURFACE_TYPE_N>

The element tag is used to enumerate the different surface types over which your VFX cannot be spawned. For each surface type that you add, starting at N=0, increment N by 1, without skipping any values. Any unlisted surface types means that the VFX will be spawned on them, but not the ones listed. For example, if you wanted a prevent VFX from spawning on grass, you would have something like the following:

<DISABLE_SURFACE_TYPE_0>GRASS</DISABLE_SURFACE_TYPE_0>
<DISABLE_SURFACE_TYPE_1>GRASS_BUMPY</DISABLE_SURFACE_TYPE_1>
<DISABLE_SURFACE_TYPE_2>SHORT_GRASS</DISABLE_SURFACE_TYPE_2>
<DISABLE_SURFACE_TYPE_3>LONG_GRASS</DISABLE_SURFACE_TYPE_3>

See the <ENABLE_SURFACE_TYPE_N> element for a list of all possible surface types.

 

 

<OVERRIDE_SURFACE_TYPE_N>

This element tag is used to enumerate over which surface types the "base" visual effect defined in the <FX_GUID> node will be replaced by another. For each surface type that you add, starting at N=0, increment N by 1, without skipping any values, and each surface type will also require a corresponding <OVERRIDE_FX_SURFACE_TYPE_GUID_N> element to define the effect that should be used instead of the base effect. For example, if you wanted a override the base VFX when the aircraft is on a grassy surface, you would have something like the following:

<OVERRIDE_SURFACE_TYPE_0>GRASS</OVERRIDE_SURFACE_TYPE_0>
<OVERRIDE_SURFACE_TYPE_1>SHORT_GRASS</OVERRIDE_SURFACE_TYPE_1>
<OVERRIDE_FX_SURFACE_TYPE_GUID_0>{4ECCFB30-736D-4944-8AA1-FCFCB74BBE84}</OVERRIDE_FX_SURFACE_TYPE_GUID_0>
<OVERRIDE_FX_SURFACE_TYPE_GUID_1>{4ECCFB30-736D-4944-8AA1-FCFCB74BBE84}</OVERRIDE_FX_SURFACE_TYPE_GUID_1>

See the <ENABLE_SURFACE_TYPE_N> element for a list of all possible surface types.

 

 

<OVERRIDE_FX_SURFACE_TYPE_GUID_N>

This element tag is used to enumerate over the different visual effects that will override the "base" VFX defined in the <FX_GUID> node. This element goes along with the <OVERRIDE_FX_SURFACE_TYPE_N> element, and there must be one GUID defined for each surface type override that you add. For example, if you wanted a override the base VFX when the aircraft is on a grassy surface, you would have something like the following:

<OVERRIDE_SURFACE_TYPE_0>GRASS</OVERRIDE_SURFACE_TYPE_0>
<OVERRIDE_SURFACE_TYPE_1>SHORT_GRASS</OVERRIDE_SURFACE_TYPE_1>
<OVERRIDE_FX_SURFACE_TYPE_GUID_0>{4ECCFB30-736D-4944-8AA1-FCFCB74BBE84}</OVERRIDE_FX_SURFACE_TYPE_GUID_0>
<OVERRIDE_FX_SURFACE_TYPE_GUID_1>{4ECCFB30-736D-4944-8AA1-FCFCB74BBE84}</OVERRIDE_FX_SURFACE_TYPE_GUID_1

 

 

<FX_GRAPH_PARAM_N>

This element is used to define a custom parameter and an accompanying value (or RPN code) that will be used in the GraphParameter node of the referenced visual effect. For each graph parameter that you add, starting at N=0, you will need to increment N by 1, without skipping any values. For example:

<FX_GRAPH_PARAM_0>red, (L:GraphParamRed) (A:GROUND VELOCITY, knots) 80 / *</FX_GRAPH_PARAM_0>
<FX_GRAPH_PARAM_1>green, (L:GraphParamGreen) (A:PLANE ALT ABOVE GROUND, feet) 300 / *</FX_GRAPH_PARAM_1>
<FX_GRAPH_PARAM_2>blue, (L:GraphParamBlue) (A:GEAR IS ON GROUND:1, bool) *</FX_GRAPH_PARAM_2>
<FX_GRAPH_PARAM_3>alpha, (L:GraphParamAlpha) (A:GEAR IS ON GROUND:0, bool) *</FX_GRAPH_PARAM_3>

 

 

<TEMPLATE_N>

This element is used to define a template that should be used within the context of another template. What other nodes you include with this will depend on how the other template(s) are setup. To see an example of this element being used, please see here: