Condition variable options

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#1
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.



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.


Continue reading...
 
#2
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
#3
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.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#5
When I scan for the variables I can probably also remember the ranges. I'll give it a try later.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#7
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
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#9
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
#11
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