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

Messages
60
Country
germany
Thanks but it doesnt work

It's very strange.

I checked the xml, I rebuild from scratch the entire packager and then I tested in by placing it in community to be sure that it was not the dev mode wich could cause some problems
Also I'm very familiar with blender and export and manipulates xml etc..

I gonna try again but this time with a basic cube
Edit: don't work either :/
I joined the default cube test if someone could test it
Thanks
Hi, you have no model.CFG in the model folder.

Copy the attached cube folder in: PackageSources\SimObjects\Misc
Then copy this in your PackageDefinitions xml:
XML:
           <AssetGroup Name="cube">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Misc\cube\</AssetDir>
            <OutputDir>SimObjects\Misc\cube\</OutputDir>
        </AssetGroup>

Then it will work.

Merry christmas!
 

Attachments

  • cube.zip
    2.2 MB · Views: 75
Messages
52
Country
france
Hi, you have no model.CFG in the model folder.

Copy the attached cube folder in: PackageSources\SimObjects\Misc
Then copy this in your PackageDefinitions xml:
XML:
           <AssetGroup Name="cube">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Misc\cube\</AssetDir>
            <OutputDir>SimObjects\Misc\cube\</OutputDir>
        </AssetGroup>

Then it will work.

Merry christmas!

O-M-G

Didn't know that it was a simObject and not a sceneryObject

Thank you so much !

Also, I see FS9 in some xml
You use another software for export your configuration?
I read there is an "ADE" but I couldn't find it for MSFS yet



Also, I try to make multiple conditionnal statements but the RPN is a nightmare
I want an object to be visible only from 20 dec to 31 dec

(E:LOCAL MONTH OF YEAR, Number) 12 == if{
(E:LOCAL DAY OF MONTH, Number) 20 >= if{
(E:LOCAL DAY OF MONTH, Number) 31 <= if{
1
}
} els{
0
}
} els{
0
}

So far I managed to make this code but it won't work.
Can someone tell me where my error(s) is?

Thanks again

I wish you all , all the best and a merry Christmas !
 
Last edited:
Messages
32
Country
germany
Hi,

I am also trying to place a wind direction sign in the tower that shows the wind direction depending on the wind. Unfortunately I get the following message when compiling:

ModelInfoLoader
File: deltatango_windrichtung_04.xml
Error parsing XML: expected =

Error encountered here:
<(E:AMBIENT WIND DIRECTION, Degrees) 310 &gt;= (E
ModelInfoLoader
File: deltatango_windrichtung_22.xml
Error parsing XML: expected =

Error encountered here:
arameter> <(E:AMBIENT WIND DIRECTION, Degrees) 130 &gt;= (E



I have used this code:

<Visibility>
<Parameter>
<code>(E:AMBIENT WIND DIRECTION, Degrees) 310 &gt;= (E:AMBIENT WIND DIRECTION, Degrees) 130 &lt;= and if{ 1 } els{ 0 }</code>
</Parameter>
</Visibility>


What could be wrong?

Greetings

Dirk
 
Messages
116
Country
italy
with the AMBIENT WIND DIRECTION parameter
I've always seen A:
try replacing E with A ;)
 
Messages
32
Country
germany
Perfect, it works:) Many thanks! Maybe please could someone explain what is A and E standing for? Is there anywhere a list with all commands and variables?

I had trouble to show the 04 character, but I changed the "and" command to an "or" command and now it works.

<code>(A:AMBIENT WIND DIRECTION, Degrees) 310 &gt;= (A:AMBIENT WIND DIRECTION, Degrees) 130 &lt;= or if{ 1 } els{ 0 }</code>

I have made two signs. It is the same model with other name and guid. One is 180° turned. Maybe it can used only one model and via animation turn 180°, could this be possible? Unfortunately I am a noob for animation, too. :cool:

Video
 
Messages
116
Country
italy
Of course, you can use one model only and so you have to make an animation

or you can do two models and use the <Visibility> parameter and wind direction as a condition ;)
 
Messages
218
Country
canada
Ah, now I got to figure out how to use all this info for animating hangar doors when close by and closing them when farther away...
 
Messages
162
Country
luxembourg
Hi everyone,

what an interesting thread. I have a library of common objects (ultralights, GA aircraft, gliders, trailers, cars...) that I use for my project and after reading this thread I started to swap this library from Scenery to SimObject and assign visibility conditions.

It all works well when the visibility conditions are not too complex (like certain months of year and no precipitation). However, I struggle to get it work on more complex level.

For instance, have you managed to make a working visibility code for showing a SimObject only during certain months of a year (like March to October) AND certain time of day (like 10:00 to 20:00) AND no precipitation?

I can have these conditions working separately just fine but have no idea how to stitch them together (I am no coder so there we go...).

Separate codes (work well):
(E:ZULU MONTH OF YEAR, number) 3 &gt;= (E:ZULU MONTH OF YEAR, number) 10 &lt;= and
(E:LOCAL TIME, Hours) 10 &gt;= (E:LOCAL TIME, Hours) 20 &lt;= and

I appreciate your help here.
Thanks

Milan
 
Last edited:
Messages
60
Country
germany
Hi everyone,

what an interesting thread. I have a library of common objects (ultralights, GA aircraft, gliders, trailers, cars...) that I use for my project and after reading this thread I started to swap this library from Scenery to SimObject and assign visibility conditions.

It all works well when the visibility conditions are not too complex (like certain months of year and no precipitation). However, I struggle to get it work on more complex level.

For instance, have you managed to make a working visibility code for showing a SimObject only during certain months of a year (like March to October) AND certain time of day (like 10:00 to 20:00) AND no precipitation?

I can have these conditions working separately just fine but have no idea how to stitch them together (I am no coder so there we go...).

Separate codes (work well):
(E:ZULU MONTH OF YEAR, number) 3 &gt;= (E:ZULU MONTH OF YEAR, number) 10 &lt;= and
(E:LOCAL TIME, Hours) 10 &gt;= (E:LOCAL TIME, Hours) 20 &lt;= and

I appreciate your help here.
Thanks

Milan
Hi,

here is an example:
Not showing from 10 a.m. to 6 p.m. and/or when it rains / snows and/or it is dark

XML:
<Component ID="Cylinder" Node="Cylinder">
            <Visibility>
                <Parameter>
                   <Code>(E:LOCAL TIME, Seconds) 36000 &gt;= (E:LOCAL TIME, Seconds) 64800 &lt;= and (A:AMBIENT PRECIP STATE, mask) 3.0 &lt; and (E:Time of Day, enum) 2 &lt; and if{ 1 } els{ 0 } </Code>
                </Parameter>
            </Visibility>
        </Component>
 
Messages
162
Country
luxembourg
Thanks @Steffsim

I also found out today in which way to connect conditions about:
- time of day (dawn, day, dusk, night)
- hours
- month
- precipitation

This code works for a model to be shown from 10am until dawn (incl) but no later than 8pm from March to October and when not raining or snowing:

(E:TIME OF DAY, number) 1 == (E:TIME OF DAY, number) 2 == or (E:ZULU MONTH OF YEAR, number) 3 &gt;= and (E:ZULU MONTH OF YEAR, number) 10 &lt;= and (A:AMBIENT PRECIP STATE, number) 4 &lt; and (E:LOCAL TIME, Hours) 10 &gt;= and (E:LOCAL TIME, Hours) 20 &lt;= and​

I still do not fully get the syntax but it works :)

I also tested conditions for ambient wind strength and visibility / in cloud (to approximate IMC conditions on a field) but found out that while there is a reaction to the conditions, it is not consistent. For example the wind strength depends on direction and does not exactly correspond to the value (in knots) set in the code, and the visibility / in cloud condition seem to work only when the cloud layer is set relative to MSL and not AGL so it does not work with the available weather presets. Interestingly enough, it worked in real weather :oops:
 
Messages
162
Country
luxembourg
Hello all, just a short follow up on visibility conditions.

I turned my static objects library into SimObjects library with associated visibility conditions. The conditions work as intended 👍, however only when being in the vicinity of the SimObject in question.

What I mean is that I have e.g. a glider with visibility condition set as "show only from March till November". I set the sim to February and take off from a different airport and fly towards the airport on which the glider sits on the ground. When I am approaching, the glider normally shows up (actually pops up due to the weird current way of displaying objects rather late) and then, once I get closer, the glider disappears as per the visibility condition.

So it seems the visibility conditions are tested only within a certain distance from the player aircraft / camera.

What is your experience?
And any idea how to avoid such behavior?

I like the visibility conditions since it makes the airport a bit more lively - it looks a little different depending on the month of a year, time of day, precipitation - like there are less cars on the parking lots and less gliders in the morning, then the parking lots fill up, the gliders start to disappear in late afternoon and there are only few cars at night. Same for static ultralights and GA aircraft... but then the issue described above kinda kills the immersion 👎
 
Messages
76
Country
canada
Great info on this thread, I ran into it after trying to kill my scenery file in the winter months and after regular business hours. For the life of me I cant get it to work....it is in my models XML.

Will this not work on scenery files? only Sim Objects? I have tried all code from the original post. No luck! Can someone give me a hand?
Screenshot_8.jpg
 
Messages
76
Country
canada
Well, that answers that lol i had a feeling.

Any way to work around this for now? Stupid question, is there a way to show its a simObject lol?
 
Messages
14
Country
hungary
Well, that answers that lol i had a feeling.

Any way to work around this for now? Stupid question, is there a way to show its a simObject lol?
yesterday I also started to play with <modelbehaviors>, love it already!

you have to add a "simobject" asset into your scenery, setup sim.cfg and model.cfg in models folder(s).
for folder structures I recommend to have a look at "MSFS SDK\Samples\WindsockSample\"


example xml code:

XML:
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{8d9d2120-a6dd-4c30-b0f4-bf67378809cc}" version="1.1">
<LODS>
<LOD MinSize="0" ModelFile="gokart_1.gltf"/>
</LODS>
</ModelInfo>

<ModelBehaviors>
<Component ID="node1" Node="node1">
<Visibility>
<Parameter>
<Code>(E:LOCAL TIME, Seconds) 36000 &gt;= (E:LOCAL TIME, Seconds) 64800 &lt;= and (A:AMBIENT PRECIP STATE, mask) 4.0 &lt; and (A:AMBIENT TEMPERATURE, celsius) 10.0 &gt; and (E:Time of Day, enum) 2 &lt; and if{ 1 } els{ 0 } </Code>
</Parameter>
</Visibility>
</Component>
</ModelBehaviors>


 
Messages
76
Country
canada
@ekre_ Thank you so much for the pointer, it is very much appreciated - nice video! I successfully added another simObject asset group of my model as a Landmark - brought in the sim (with its animations and textures and all, no errors).

Somehow the code is still not eliminating this thing. Super weird. I kinda wish I had an error to show but I don't...Only my models xml below.

What could I be missing here....hmm

I %100 have the model in as a simObject with its animations going. I'm getting warmer!

Screenshot_2.jpg
 
Messages
76
Country
canada
I also turned my model into a simObject but cant seem to make it be dynamic. Did you use Landmark? Misc? what am I missing, my code is on the previous post lol its driving me nuts.


Hello all, just a short follow up on visibility conditions.

I turned my static objects library into SimObjects library with associated visibility conditions. The conditions work as intended 👍, however only when being in the vicinity of the SimObject in question.
👎
 
Messages
57
Country
switzerland
Dear all,

Thank you so much for this thread, I was able to successfully setup conditional visibility for some of my own objects.
The trickiest part is to address the proper object ID and Node (since Arno's MCX alter them after exporting from 3DSMax) and MSFS must apparently be rebooted from fresh for visibility conditions to apply properly after changing the xml code.

My question : can we also apply visibility condition to default ASOBO Simobjects ? For instance place a static aircraft and/or animated pilot, that would only stand there during daytime when the weather is fair.
Has anybody succeeded in this ?

Thanks in advance.
Best regards

Antoine
 
Messages
162
Country
germany
Hello all, just a short follow up on visibility conditions.

I turned my static objects library into SimObjects library with associated visibility conditions. The conditions work as intended 👍, however only when being in the vicinity of the SimObject in question.

What I mean is that I have e.g. a glider with visibility condition set as "show only from March till November". I set the sim to February and take off from a different airport and fly towards the airport on which the glider sits on the ground. When I am approaching, the glider normally shows up (actually pops up due to the weird current way of displaying objects rather late) and then, once I get closer, the glider disappears as per the visibility condition.

So it seems the visibility conditions are tested only within a certain distance from the player aircraft / camera.

What is your experience?
And any idea how to avoid such behavior?

I like the visibility conditions since it makes the airport a bit more lively - it looks a little different depending on the month of a year, time of day, precipitation - like there are less cars on the parking lots and less gliders in the morning, then the parking lots fill up, the gliders start to disappear in late afternoon and there are only few cars at night. Same for static ultralights and GA aircraft... but then the issue described above kinda kills the immersion 👎
Hi,
at least with current SDK and MSFS from today (WU4) the visibilty conditions work very well for me.
Dou you still have this issue? I have an idea for you:
You could use 2 different LODs. The LOD1 (far away) just includes an empty object. So when far away you do not show anything. And on the LOD0 (near LOD) you include the visibility?


Regarding the last question - I would also like to know if anybody knows a solution for this?
My question : can we also apply visibility condition to default ASOBO Simobjects ? For instance place a static aircraft and/or animated pilot, that would only stand there during daytime when the weather is fair.
Has anybody succeeded in this ?

Thanks in advance.
Best regards

Antoine
 
Messages
221
Country
germany
Hello all.

So i wanted to do the same with my parasols (thanks for the idea!). But im running into a problem, not sure if i do something wrong or whats the problem could be.

The first question would be, is the only way to get my node name/id via modelconverterX? Sorry, im new to all this. If yes, im running into the next problem. ModelconverterX doesnt seem to be able to import my model. I get the message that "Expected at least one object with no parent" if i try to import my Blender file.

I also found one post here in the forum but it wasnt answered after the person with issue posted his Blender file. Then i came across another post, where someone couldnt import his PBR textured model into MCX. Mine is PBR-textured as well but shouldnt i be able to simply delete the textures and then import again? Remember, i only need that node-ID (seemingly).

Would be great if someone can give me a clue here.
 
Last edited:
Top