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

Adding SimObjects

Messages
20
Country
denmark
Hi, im trying to make a working clock for msfs2020, i saw a thread on one which was a simobject. But how do the project folder structure has to look like, and where to export the object to?:)
 
Hi there

first thing first, this explanation won't be possible without the knowledge of the King on Kings of animations here, mr Christian Bahr, his Bahrometrix are wonderful

Basically, in your PackageSources folder, you should add the following:

PackageSources\
---- SimObjects\
------- Landmarks\
---------- yourObjectName\
-------------
model\
----------------- model.cfg
----------------- yourObjectName.xml
----------------- yourObjectName.gltf
----------------- yourObjectName.bin
-----------------

------------- texture\
------------- sim.cfg

and in your PackageDefinitions.xml
Code:
<AssetGroup Name="simobject1">
                    <Type>SimObject</Type>
                    <Flags>
                        <FSXCompatibility>false</FSXCompatibility>
                    </Flags>
                <AssetDir>PackageSources\SimObjects\Landmarks\yourObjectName\</AssetDir>
                <OutputDir>SimObjects\Landmarks\yourObjectName\</OutputDir>
</AssetGroup>


All the magic happens in the yourObjectName.xml


Attached you can find a full msfs project with a basic SimObjects and its source files (in blender) - not a clock, i have already shared my digital clock here, somewhere :p

In this example, i used the <Visibility> tag to show meshes in certain conditions:
the kids are playing from 8 am to 6pm , and from 6pm to 8am they rest on the bench with their ball
the ball is also animated with basic keyframe (here i'm playing with visibility, you can also use keyframe animations to show/hide meshes, you will be using them to drive your
clock!)

Code:
<Component ID="playersPlaying" Node="playersPlaying">
            <Visibility>
              <Parameter>
        <Code>(E:LOCAL TIME, Seconds) 28800 &gt; (E:LOCAL TIME, Seconds) 64800 &lt; and if{ 1 } els{ 0 }</Code>
              </Parameter>
            </Visibility>
          </Component>

this line of code infact, can be translated as:
if
local time, in seconds
is greater that 28800 seconds (28800/60 minutes per hour/60 seconds per minute = 8am)
and
local time, in seconds
is greater than 64800 seconds ((64800/60 minutes per hour/60 seconds per minute = 8am)
then
set the visibility ot the playerPlayin mesh to true ( {1} in the code)
else
set the visibility ot the playerPlayin mesh to false ( { 0 } in the code)


there is also an umbrella that opens up only with rain (or other precipitations)
Code:
<Component ID="closedUmbrella" Node="closedUmbrella">
            <Visibility>
              <Parameter>
        <Code>(A:AMBIENT PRECIP STATE, mask) 3.0 &gt; if{ 1 } els{ 0 }</Code>
              </Parameter>
            </Visibility>
          </Component>

translation

if
the state of the precipitation
is greater than 3 (because we know that rain is 4 and snow is 8, don't we?)
then
set the visibility ot the closedUmbrella mesh to true ( {1} in the code)
else
set the visibility ot the closedUmbrella mesh to false ( {0} in the code)


sim variables and their units are described here


example.jpg



i recorded a sample video to show the simojbect in action


 

Attachments

Hi there

first thing first, this explanation won't be possible without the knowledge of the King on Kings of animations here, mr Christian Bahr, his Bahrometrix are wonderful

Basically, in your PackageSources folder, you should add the following:

PackageSources\
---- SimObjects\
------- Landmarks\
---------- yourObjectName\
-------------
model\
----------------- model.cfg
----------------- yourObjectName.xml
----------------- yourObjectName.gltf
----------------- yourObjectName.bin
-----------------

------------- texture\
------------- sim.cfg

and in your PackageDefinitions.xml
Code:
<AssetGroup Name="simobject1">
                    <Type>SimObject</Type>
                    <Flags>
                        <FSXCompatibility>false</FSXCompatibility>
                    </Flags>
                <AssetDir>PackageSources\SimObjects\Landmarks\yourObjectName\</AssetDir>
                <OutputDir>SimObjects\Landmarks\yourObjectName\</OutputDir>
</AssetGroup>


All the magic happens in the yourObjectName.xml


Attached you can find a full msfs project with a basic SimObjects and its source files (in blender) - not a clock, i have already shared my digital clock here, somewhere :p

In this example, i used the <Visibility> tag to show meshes in certain conditions:
the kids are playing from 8 am to 6pm , and from 6pm to 8am they rest on the bench with their ball
the ball is also animated with basic keyframe (here i'm playing with visibility, you can also use keyframe animations to show/hide meshes, you will be using them to drive your
clock!)

Code:
<Component ID="playersPlaying" Node="playersPlaying">
            <Visibility>
              <Parameter>
        <Code>(E:LOCAL TIME, Seconds) 28800 &gt; (E:LOCAL TIME, Seconds) 64800 &lt; and if{ 1 } els{ 0 }</Code>
              </Parameter>
            </Visibility>
          </Component>

this line of code infact, can be translated as:
if
local time, in seconds
is greater that 28800 seconds (28800/60 minutes per hour/60 seconds per minute = 8am)
and
local time, in seconds
is greater than 64800 seconds ((64800/60 minutes per hour/60 seconds per minute = 8am)
then
set the visibility ot the playerPlayin mesh to true ( {1} in the code)
else
set the visibility ot the playerPlayin mesh to false ( { 0 } in the code)


there is also an umbrella that opens up only with rain (or other precipitations)
Code:
<Component ID="closedUmbrella" Node="closedUmbrella">
            <Visibility>
              <Parameter>
        <Code>(A:AMBIENT PRECIP STATE, mask) 3.0 &gt; if{ 1 } els{ 0 }</Code>
              </Parameter>
            </Visibility>
          </Component>

translation

if
the state of the precipitation
is greater than 3 (because we know that rain is 4 and snow is 8, don't we?)
then
set the visibility ot the closedUmbrella mesh to true ( {1} in the code)
else
set the visibility ot the closedUmbrella mesh to false ( {0} in the code)


sim variables and their units are described here


View attachment 77624


i recorded a sample video to show the simojbect in action


Thanks alot mate.
I have now made the file structure, now i need to add those .CFG files. How do i do that, and what to type in there.
You can see the code in the "Object" xml file, can there be space between the words or does it have to be one word? for example (Aalborg Cathedral or AalborgCathedral)?

Thanks for your help!
 

Attachments

  • 1.PNG
    1.PNG
    72.3 KB · Views: 253
  • 2.PNG
    2.PNG
    199.1 KB · Views: 253
  • 3.PNG
    3.PNG
    132 KB · Views: 270
In the post above i have included a full project , wich includes also the model.cfg and the sim.cfg, Just Copy them in the righ Place and modify according to yourObjectName.xml

Also, in the sdk docs there are full examples of Simobjects

And in your previous post i wrote about my Digital Clock Simobjects, you can download the scenery and look into the Simobjects code


I would avoid any spaces inside folders and file naming, the compiler has proven to not like them at times
Anyway, using spaces in file naming in a coding environment is Always been "looking for errors", so, yeah, no reason to use them!

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
In the post above i have included a full project , wich includes also the model.cfg and the sim.cfg, Just Copy them in the righ Place and modify according to yourObjectName.xml

Also, in the sdk docs there are full examples of Simobjects

And in your previous post i wrote about my Digital Clock Simobjects, you can download the scenery and look into the Simobjects code


I would avoid any spaces inside folders and file naming, the compiler has proven to not like them at times
Anyway, using spaces in file naming in a coding environment is Always been "looking for errors", so, yeah, no reason to use them!

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
Thanks, i have managed to get it working:
Thank you for your help :)
 

Attachments

  • 1.PNG
    1.PNG
    1.2 MB · Views: 232
Last edited:
Hello Federico,
Once again, thanks for your explanations. I did transform my 'pirogue' in NTTE scenery as a SIMOBJECT and now, it's appearing only between 08:00 an 18:00.
SO, ... so happy for understanding the SimObjects thanks to you 👏
 
In the post above i have included a full project , wich includes also the model.cfg and the sim.cfg, Just Copy them in the righ Place and modify according to yourObjectName.xml

Also, in the sdk docs there are full examples of Simobjects

And in your previous post i wrote about my Digital Clock Simobjects, you can download the scenery and look into the Simobjects code


I would avoid any spaces inside folders and file naming, the compiler has proven to not like them at times
Anyway, using spaces in file naming in a coding environment is Always been "looking for errors", so, yeah, no reason to use them!

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
Im trying to get mulitple simobjects in my project, I saw another post where you wrote that you could have diffrent objects in 1 simobject. I have tried that, but i cget an error. thats says the output directory is wrong. What should the ouput be when theres mulitple objects?
 
Last edited:
i'm adding a new asset group each simobject type, dunno if is the right way but it works, so...
some sample code in the packageDefinitions
Code:
<AssetGroup Name="mamu_flag_1">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Landmarks\mamu_flag_1\</AssetDir>
            <OutputDir>SimObjects\Landmarks\mamu_flag_1\</OutputDir>
        </AssetGroup>
<AssetGroup Name="mamu_digital_clock">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Landmarks\mamu_digital_clock\</AssetDir>
            <OutputDir>SimObjects\Landmarks\mamu_digital_clock\</OutputDir>
        </AssetGroup>
    <AssetGroup Name="mamu_manica_arancio">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Landmarks\MAMU_WINDSOCK_ARANCIO\</AssetDir>
            <OutputDir>SimObjects\Landmarks\MAMU_WINDSOCK_ARANCIO\</OutputDir>
</AssetGroup>
 
Hello,

Really happy for you TL-Creation. hope seeing your scenery on the net soon ;)

Federico, do you know how to control the start of the animation when it's time to see it in the sim ?
ex : Do your trains start moving at the begining of the railway in your scene ?
in my scenery, my canoe doesnt start near the beach as I would like.

much details about my question here :


Thanks.
 
Hello,

Really happy for you TL-Creation. hope seeing your scenery on the net soon ;)

Federico, do you know how to control the start of the animation when it's time to see it in the sim ?
ex : Do your trains start moving at the begining of the railway in your scene ?
in my scenery, my canoe doesnt start near the beach as I would like.

much details about my question here :


Thanks.
Actually i don't known I Easy way to do that :/
Fact: Animations start as soon as your flight Is loaded
All my animations to date are "looping" (the trains, the drone, all the cable cars and gondolas etc)
Most likely, as soon as the Script Editor will be available, we Will be able to use WorlScripts to easy animate scenery objects (there Is some point to point code there, i saw them somewhere, but since It Is not documented i wouldn't play with that)

@Christian Bahr has a way to trigger animations with a wasm module, maybe he can help :)



Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Hello @mamu and @TL-Creation ,

When you add other simobjects how do you handle SIM.CFG files?
you have one sim.cfg for each simobject directory ?
or do you also add all the objects in the same sim.cfg ? and if so, where do you put the file ?

since I have added a second simobject, grouped in PackageDefinitions.xlm nothings goes on. I don't see anymore my canoe (pirogue).
hum ... what do I do wrong ?
Thanks ;)
 
Look 4 posts above, i use multiple Simobjects asset groups!

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
@mamu

Yes, I understand multiple Simobjects asset groups. here is my code with PIROGUE and VAHINE_1

XML:
<AssetPackage Name="captainfr-airport-ntte-tetiaroa" Version="0.1.0">
    <ItemSettings>
        <ContentType>SCENERY</ContentType>
        <Title>Tetiaroa</Title>
        <Manufacturer/>
        <Creator>captainfrag</Creator>
    </ItemSettings>
    <Flags>
        <VisibleInStore>false</VisibleInStore>
        <CanBeReferenced>false</CanBeReferenced>
    </Flags>
    <AssetGroups>
        <AssetGroup Name="ContentInfo">
            <Type>Copy</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageDefinitions\captainfr-airport-ntte-tetiaroa\ContentInfo\</AssetDir>
            <OutputDir>ContentInfo\captainfr-airport-ntte-tetiaroa\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="mymodellib">
            <Type>ArtProj</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\modelLib\</AssetDir>
            <OutputDir>scenery\mycompany\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="scenery">
            <Type>BGL</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\scene\</AssetDir>
            <OutputDir>scenery\mycompany\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="simobject1">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Landmarks\pirogue\</AssetDir>
            <OutputDir>SimObjects\Landmarks\pirogue\</OutputDir>
        </AssetGroup>
       <AssetGroup Name="simobject2">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Landmarks\vahine_1\</AssetDir>
            <OutputDir>SimObjects\Landmarks\vahine_1\</OutputDir>
        </AssetGroup>
    </AssetGroups>
</AssetPackage>

do you have one folder for each simobject (I think so regarding to your code 5 posts above)

PackageSources\
---- SimObjects\
------- Landmarks\
---------- yourObjectName1\
-------------
model\
----------------- model.cfg
----------------- yourObjectName1.xml
----------------- yourObjectName1.gltf
----------------- yourObjectName1.bin
-----------------

------------- texture\
------------- sim.cfg

---------- yourObjectName2\
-------------
model\
----------------- model.cfg
----------------- yourObjectName2.xml
----------------- yourObjectName2.gltf
----------------- yourObjectName2.bin
-----------------

------------- texture\
------------- sim.cfg


---------- yourObjectName3\
-------------
model\
----------------- model.cfg
----------------- yourObjectName3.xml
----------------- yourObjectName3.gltf
----------------- yourObjectName3.bin
-----------------

------------- texture\
------------- sim.cfg


and how do you write your sim.cfg ? always [fltsim.0] not .1, .2 and so on ?

XML:
[VERSION]
Major=1
Minor=0

[fltsim.0]
title=yourObjectName1
model=
texture=

[General]
category=StaticObject


Thansk ;)
 
exactly, each different model, a different folder with is sim.cfg and the other files, and of course fltsim.0 (the other flsim could be used if you have variations of the same model, like different flags or cars with different color or stuff like that,
but a folder structure for every object is fine)
Asobo recommends unique name (the title) for Simbobjects (and, really, for anything in the sim !), so you can call them captainfr_pyrogue and captainfr_vahine_1

some other tips for you:
you need to make some modifications to your packagedefinitions (and of course change the folder name
Asset type Artproj is no longer valid, you must use ModelLib.
As per Asobo reccomendations, you should rename your ModelLib folder with something unique, and i recommend the same for your scene output folder

Code:
<AssetPackage Name="captainfr-airport-ntte-tetiaroa" Version="0.1.0">
    <ItemSettings>
        <ContentType>SCENERY</ContentType>
        <Title>Tetiaroa</Title>
        <Manufacturer/>
        <Creator>captainfrag</Creator>
    </ItemSettings>
    <Flags>
        <VisibleInStore>false</VisibleInStore>
        <CanBeReferenced>false</CanBeReferenced>
    </Flags>
    <AssetGroups>
        <AssetGroup Name="ContentInfo">
            <Type>Copy</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageDefinitions\captainfr-airport-ntte-tetiaroa\ContentInfo\</AssetDir>
            <OutputDir>ContentInfo\captainfr-airport-ntte-tetiaroa\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="mymodellib">
            <Type>ModelLib</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\captainfr-ntte-modelLib\</AssetDir>
            <OutputDir>scenery\captainfr-aiport-ntte-tetiaroa\scenery\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="scenery">
            <Type>BGL</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\scene\</AssetDir>
            <OutputDir>scenery\captainfr-airport-ntte-tetiaroa\scenery\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="simobject1">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Landmarks\captainfr-pirogue\</AssetDir>
            <OutputDir>SimObjects\Landmarks\captainfr-pirogue\</OutputDir>
        </AssetGroup>
       <AssetGroup Name="simobject2">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Landmarks\captainfr-vahine_1\</AssetDir>
            <OutputDir>SimObjects\Landmarks\captainfr-vahine_1\</OutputDir>
        </AssetGroup>
    </AssetGroups>
</AssetPackage>
 
Back
Top