plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

In the upcoming flighting, we've changed the behaviour of the content.xml file. If your addon uses this file, please read this article!

Please take a moment to read the platform’s guidelines before you get started!


question

mamudesign avatar image
mamudesign asked Nocturne commented

Effects documentation error


<FX_CODE>1 0 &gt;<FX_CODE>


in the online sdk documentatation, this code Is used several times, but if you look closely, It lacks of a foundametal / to close the tag

Docs are and Easy fix, but my suggestion Is to make sure in your loading process (Blue progress bar) to discard wrong models or throw some kind of obvious prompt, because using the code above in a Simobject model.xml stops the loading process at 100% progress without entering the main screen (the One with the big squares, the map etc)


Just my two cents



documentation
3 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Thank you for pointing this out. The XML examples will be fixed to show the correct opening/closing tags in the next SDK update.
1 Like 1 ·

just as a further proposal - use

<FX_CODE>1</FX_CODE>

instead, to not confuse novice users


0 Likes 0 ·

Actually, i think It Is a nice idea instructing the user that you can put some code there and give an example of some code, writing Just 1 there makes the We noobs think that Is some sort of magic code rather than an expression the should return true to show the effect


I would have written the whole example in this way

Minimal code to spawn an effect:


And than explain the code tag by tag


<Behaviours>
 <Include ModelBehaviorFile="Asobo\Generic\FX.xml"/>
  <Component ID="effects_container">
    <Component ID="Your_spawn1" Node="node_or_mesh_in_your_model">
      <UseTemplate Name="ASOBO_GT_FX">
        <FX_CODE>1 0 &gt;</FX_CODE>
<!-- 1 Is greater than 0 so return true (spawn the effect-->
        <FX_GUID>{EFFECT GUID}</FX_GUID>
      </UseTemplate>
    </Component>
  </Component>
</Behaviours>


0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.