• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

ModelDef case syntax

Messages
17
Country
unitedkingdom
Hello,
I am trying to understand this syntax in a ModelDef.xml :

0 1 1 0 4 (L:Kx155_COM_status, number) case 1 ==

I can't find the documentatio for the case syntax. Could someone point me at it.
Thanks
 
Messages
440
Country
us-wisconsin
One, of many of the same references in all sims can be found here.
caseCase statement50 40 30 20 10 5 (L:value) caseThe "5" indicates there are five case values, which are selected depending on the evaluation of (L:value).
If the evaluation is equal to or greater than 0, but less than 1, the result is 10. If the evaluation is equal to or greater than 1, but less than 2, the result is 20, and so on.

For a different example, this may help.

In your "case" ( lol ) -
If (L:Kx155_COM_status, number) equals 0, then the resulting value from the case array equals 0, does it equal 1 ? - false
If (L:Kx155_COM_status, number) equals 1, then the resulting value from the case array equals 1, does it equal 1 ? - true
If (L:Kx155_COM_status, number) equals 2, then the resulting value from the case array equals 1, does it equal 1 ? - true
If (L:Kx155_COM_status, number) equals 3, then the resulting value from the case array equals 0, does it equal 1 ? - false

Because the logic table is "grouped" together (trues for COM_status equalling 1 or 2) this could've also been written as :

1) 1 2 (L:Kx155_COM_status, number) rng
-or-
2) (L:Kx155_COM_status, number) 1 == (L:Kx155_COM_status, number) 2 == or
-or-
3) (L:Kx155_COM_status, number) 0 > (L:Kx155_COM_status, number) 2 < and
 
Last edited:
Messages
17
Country
unitedkingdom
Thanks.
I just found it in fsxsdk.chm but was still puzzled by the 1== at the end. All clear now.
 
Top