• 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.

Condition variable options

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Many scenery and aircraft objects contain some conditional code. For example a bit of the object that is only shown when certain conditions are met. To be able to process such conditions on import of pre-FSX objects MCX needs to know what the value of the variables in these conditions is. So when such conditions are found in the object, you will get a form where you can enter the value of the variables found in the object. See screenshot of this form you can see below.

image-2.png


Sometimes it can be annoying to get this additional form where you need to enter the values. Therefore ModelConverterX has different modes to work with these variables. You can set them in the options. I have now added a new option to this setting. The possible values are:

  • AlwaysTrue: the value of the variable is not checked, the condition is always true.
  • AlwaysFalse: the value of the variable is not checked, the condition is always false.
  • VisibilityCondition: the value of the variable is not checked, a FSX style visibility is made and used to represent the condition.
  • UserSpecified: the form mentioned above is shown where the user can enter the values of the variables. Then using these values it is checked if the condition is true or false.
  • DefaultValues (new): This one works like UserSpecified, but instead of showing the form it uses the default values for the different variables. This are the values that are shown in the form initially as well.
image-1.png


Continue reading...
 

tgibson

Resource contributor
Messages
11,327
Country
us-california
Hi,

Thanks for that addition. I do have a question - since you appear to know if the number entered results in a true or false result, what would really make this easier would be if the form asked for true or false - i.e. do you want the object visible or not. I do realize that some objects may have multiple choices (the props are one example - still, slow, and blurred) so there may need to be some thought put into how this could be displayed and the choice entered.

If this is impractical, even having the numerical choices displayed would make things much easier, rather than the slow trial and error I have to use now.

For example:

Prop 0, 5000, 10000 (these are not exact numbers)
Gear 0, 100

etc.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi Tom,

I understand what you mean, I'm not sure how easy it would be to implement however. At the moment the form is shown I I only check which variables are used, I don't yet check their ranges. Maybe that's something I can add.
 

tgibson

Resource contributor
Messages
11,327
Country
us-california
That’s OK, I was thinking you knew the ranges at that point. It doesn’t take too long to discover the needed values.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
When I scan for the variables I can probably also remember the ranges. I'll give it a try later.
 

tgibson

Resource contributor
Messages
11,327
Country
us-california
Thanks. Perhaps you could display something in the tool tips? That way the box itself does not need to be changed.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi Tom,

I made a quick first implementation. If you hover on the name of the variable, the tooltip will show all SCASM commands in which the variable is used. I'll try to polish it up a bit more later, e.g. remove duplicate ranges, etc. But this should help already.

1549744687452.png
 

tgibson

Resource contributor
Messages
11,327
Country
us-california
Hi,

Excellent! That will be a big help. If I might ask what is B6 in that window? Is that the variable for Eng. 2 RPM?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Yes, B6 is the internal variable of prop1_still. I'll try to make the message a bit cleaner.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
I have just changed the formatting a bit, so that it is more clear and no duplicates are shown. It will be in the next development release.

1549827956232.png
 
Top