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

MSFS Pilot figures

So the NodesToHide action doesn't work, that's for sure.
Makes sense because the camera.cfg would probably look into the behaviour files to gather the node. so...
I apologise. I appear to have misled you.

NodesToHide, despite the name, doesn't work with nodes. It is actually L:variables that are in the list. When the camera is used those L:vars will be set to true otherwise they are set to false. You will need to have a visibility condition in the model behaviour file to read the status of the L:var and then hide the part.

It has been a while since I worked on NodesToHide and I had forgotten exactly how they work (I have a terrible memory so I usually forget about half of what I learn which is why I make posts on FSDeveloper, so I can refer to them later). Here is a post I made at the time:


Here is my complicated code for pilot visibility. Note how I am checking if it is a user aircraft, camera state, payload station weight, the XMLVAR from the NodesToHide in cameras.cfg and my own L: var on whether or not the pilot is visible:
Code:
            <UseTemplate Name="ASOBO_GT_Visibility">
                <VISIBILITY_CODE>
                    (A:IS USER SIM,bool)
                    if{
                        (A:CAMERA STATE,number) 2 !=
                        if{
                            (A:PAYLOAD STATION WEIGHT:1, pounds) 0 &lt;= if{ 0 } els{ (L:Drifter_Prefs_Pilot,bool) ! }
                        }
                        els{
                            (L:XMLVAR_PilotHidden) (A:PAYLOAD STATION WEIGHT:1, pounds) 0 &lt;= || if{ 0 } els{ (L:Drifter_Prefs_Pilot,bool) ! }               
                        }
                    }
                    els{
                        (A:GENERAL ENG COMBUSTION:1,bool)                   
                    }
                </VISIBILITY_CODE>
            </UseTemplate>
 
The easiest way to add the pilot models is using multiple cockpit LOD models. The options section in model.cfg controls that.

[model.options]
withExterior_showInterior=true
withExterior_showInterior_hideFirstLod=true
withInterior_forceFirstLod=true
withInterior_showExterior=true

You need to export a second LOD that has the PILOT_0 and PILOT_1 nodes. These nodes can be empties and placed right on the seats. Keep the scale at 1 but you can apply some rotation to get the models to sit in the seats nicely.

The LOD0, which is the cockpit you see with interior camera views would not have these nodes. With the above model options, it shows the LOD1 in external view and the pilots appear.

If you want to make the visibility dynamic based on payload weight, you could add the behavior code similar to what Anthony31 posted above.

If you also want to see a copilot model next to you while you're in the cockpit, you would add the copilot node to the LOD0 model.

This is the visibility behavior I used for pilot and copilot. I have click spots so you can make either of the models visible while you're inside and that is what the Lvar is for. But you can simply use the payload weight as the conditional.

XML:
                <Component ID="PILOT_0" Node="PILOT_0">
                    <!-- pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:PILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>
                <Component ID="PILOT_1" Node="PILOT_1">
                    <!-- co-pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:COPILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>
 
The easiest way to add the pilot models is using multiple cockpit LOD models. The options section in model.cfg controls that.

[model.options]
withExterior_showInterior=true
withExterior_showInterior_hideFirstLod=true
withInterior_forceFirstLod=true
withInterior_showExterior=true

You need to export a second LOD that has the PILOT_0 and PILOT_1 nodes. These nodes can be empties and placed right on the seats. Keep the scale at 1 but you can apply some rotation to get the models to sit in the seats nicely.

The LOD0, which is the cockpit you see with interior camera views would not have these nodes. With the above model options, it shows the LOD1 in external view and the pilots appear.

If you want to make the visibility dynamic based on payload weight, you could add the behavior code similar to what Anthony31 posted above.

If you also want to see a copilot model next to you while you're in the cockpit, you would add the copilot node to the LOD0 model.

This is the visibility behavior I used for pilot and copilot. I have click spots so you can make either of the models visible while you're inside and that is what the Lvar is for. But you can simply use the payload weight as the conditional.

XML:
                <Component ID="PILOT_0" Node="PILOT_0">
                    <!-- pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:PILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>
                <Component ID="PILOT_1" Node="PILOT_1">
                    <!-- co-pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:COPILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>

This is the smartest and most useful code I've seen lately, thank you so much! Works like a charm!
Maybe there is a similar code for passengers? So there's a name for passengers instead of PILOT_VIS or COPILOT_VIS...maybe PASSENGER1_VIS or something?
 
The easiest way to add the pilot models is using multiple cockpit LOD models. The options section in model.cfg controls that.

[model.options]
withExterior_showInterior=true
withExterior_showInterior_hideFirstLod=true
withInterior_forceFirstLod=true
withInterior_showExterior=true

You need to export a second LOD that has the PILOT_0 and PILOT_1 nodes. These nodes can be empties and placed right on the seats. Keep the scale at 1 but you can apply some rotation to get the models to sit in the seats nicely.

The LOD0, which is the cockpit you see with interior camera views would not have these nodes. With the above model options, it shows the LOD1 in external view and the pilots appear.

If you want to make the visibility dynamic based on payload weight, you could add the behavior code similar to what Anthony31 posted above.

If you also want to see a copilot model next to you while you're in the cockpit, you would add the copilot node to the LOD0 model.

This is the visibility behavior I used for pilot and copilot. I have click spots so you can make either of the models visible while you're inside and that is what the Lvar is for. But you can simply use the payload weight as the conditional.

XML:
                <Component ID="PILOT_0" Node="PILOT_0">
                    <!-- pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:PILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>
                <Component ID="PILOT_1" Node="PILOT_1">
                    <!-- co-pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:COPILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>
Hello Sal 1800
excellent explanation. My Pou Du Ciel model(http://oldpat.e-monsite.com/pages/microsoft-flightsimulator-2020/hm-293-pou-du-ciel.html) has a pilot and it no longer appears in the interior model.
I've been trying to get it to go away for a while.
Thanks again
 
On the other hand now in exterior view, I no longer see the interior
Does somebody have an idea?
My model.cfg:
[template.options]
; If true, when showing the exterior also show the interior model (default is false)
withExterior_showInterior=true
; if true, when showing the interior with the exterior, exclude interior.lod.0 (false by default); only has effect when withExterior_showInterior is true
withExterior_showInterior_hideFirstLod=true
; When displaying inside, force showing lod0 (true by default)
withInterior_forceFirstLod=true
; When showing the interior, also show the exterior model (false by default)
withInterior_showExterior=true

[models]
exterior=HM293_EXT.xml
interior=HM293_INT.xml
 
Hi
The solution:
; ----------------------------------------------------------------------------------->
; UPDATE YOUR EXTERIOR AND INTERIOR NAMES AND ENSURE THEY MATCH YOUR .xml FILE NAMES
; ----------------------------------------------------------------------------------->

; Reference LOD implementation, please keep these comments (for now).

[model.options]
; if true, when showing the exterior, also show the interior model (default false)
withExterior_showInterior=true
; if true, when showing the interior with the exterior, exclude interior.lod.0 (default false); only has an effect when withExterior_showInterior is true
withExterior_showInterior_hideFirstLod=false
; when showing the interior, force showing lod0 (default true)
withInterior_forceFirstLod=true
; when showing the interior, also show the exterior model (default false)
withInterior_showExterior=true

[models]
exterior=HM293_EXT.xml
interior=HM293_INT.xml
And now i see the cockpit and the pilot with exterior and i don't see the pilot in interior model
:)

Best regards :)
Oldpat
 
The easiest way to add the pilot models is using multiple cockpit LOD models. The options section in model.cfg controls that.

[model.options]
withExterior_showInterior=true
withExterior_showInterior_hideFirstLod=true
withInterior_forceFirstLod=true
withInterior_showExterior=true

You need to export a second LOD that has the PILOT_0 and PILOT_1 nodes. These nodes can be empties and placed right on the seats. Keep the scale at 1 but you can apply some rotation to get the models to sit in the seats nicely.

The LOD0, which is the cockpit you see with interior camera views would not have these nodes. With the above model options, it shows the LOD1 in external view and the pilots appear.

If you want to make the visibility dynamic based on payload weight, you could add the behavior code similar to what Anthony31 posted above.

If you also want to see a copilot model next to you while you're in the cockpit, you would add the copilot node to the LOD0 model.

This is the visibility behavior I used for pilot and copilot. I have click spots so you can make either of the models visible while you're inside and that is what the Lvar is for. But you can simply use the payload weight as the conditional.

XML:
                <Component ID="PILOT_0" Node="PILOT_0">
                    <!-- pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:PILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>
                <Component ID="PILOT_1" Node="PILOT_1">
                    <!-- co-pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:COPILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>
i try that on the caproni c22j. i want a copilot on in
The easiest way to add the pilot models is using multiple cockpit LOD models. The options section in model.cfg controls that.

[model.options]
withExterior_showInterior=true
withExterior_showInterior_hideFirstLod=true
withInterior_forceFirstLod=true
withInterior_showExterior=true

You need to export a second LOD that has the PILOT_0 and PILOT_1 nodes. These nodes can be empties and placed right on the seats. Keep the scale at 1 but you can apply some rotation to get the models to sit in the seats nicely.

The LOD0, which is the cockpit you see with interior camera views would not have these nodes. With the above model options, it shows the LOD1 in external view and the pilots appear.

If you want to make the visibility dynamic based on payload weight, you could add the behavior code similar to what Anthony31 posted above.

If you also want to see a copilot model next to you while you're in the cockpit, you would add the copilot node to the LOD0 model.

This is the visibility behavior I used for pilot and copilot. I have click spots so you can make either of the models visible while you're inside and that is what the Lvar is for. But you can simply use the payload weight as the conditional.

XML:
                <Component ID="PILOT_0" Node="PILOT_0">
                    <!-- pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:PILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>
                <Component ID="PILOT_1" Node="PILOT_1">
                    <!-- co-pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:COPILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>[/CODE
[/QUOTE]

The easiest way to add the pilot models is using multiple cockpit LOD models. The options section in model.cfg controls that.

[model.options]
withExterior_showInterior=true
withExterior_showInterior_hideFirstLod=true
withInterior_forceFirstLod=true
withInterior_showExterior=true

You need to export a second LOD that has the PILOT_0 and PILOT_1 nodes. These nodes can be empties and placed right on the seats. Keep the scale at 1 but you can apply some rotation to get the models to sit in the seats nicely.

The LOD0, which is the cockpit you see with interior camera views would not have these nodes. With the above model options, it shows the LOD1 in external view and the pilots appear.

If you want to make the visibility dynamic based on payload weight, you could add the behavior code similar to what Anthony31 posted above.

If you also want to see a copilot model next to you while you're in the cockpit, you would add the copilot node to the LOD0 model.

This is the visibility behavior I used for pilot and copilot. I have click spots so you can make either of the models visible while you're inside and that is what the Lvar is for. But you can simply use the payload weight as the conditional.

XML:
                <Component ID="PILOT_0" Node="PILOT_0">
                    <!-- pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:PILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:1, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>
                <Component ID="PILOT_1" Node="PILOT_1">
                    <!-- co-pilot visibility -->
                    <UseTemplate Name="ASOBO_GT_Visibility">
                        <VISIBILITY_CODE>(L:COPILOT_VIS, Bool) (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and (A:CAMERA STATE, Enum) 2 != or (A:PAYLOAD STATION WEIGHT:2, pound) 20 &gt; and</VISIBILITY_CODE>
                    </UseTemplate>
                </Component>
i try this on the caproni c22j. i want to see a copilot model next to me while im in the cockpit and it doesn't work, any ideas?
 
i try SAL1800 way on the caproni c22j. i want to see a copilot model next to me while im in the cockpit and it doesn't work, any ideas?
 
I had a pilot visible using the LOD method, but it is no longer visible.
Pilot is visible in Project Editor, but not visible in the exported aircraft.
Any ideas what would make the pilot figure disappear?
 
Last edited:
After long trial and error I seddled for this code here
It shows the copilot when in any cockpit view except in copilot view obviously, and it shows the pilot when in copilot view.

XML:
<!-- Pilot Visibility -->
        <Component ID="PILOT_0" Node="PILOT_0">
            <UseTemplate Name="ASOBO_GT_Visibility">
                <VISIBILITY_CODE>
                    (A:PLANE IN PARKING STATE, bool) ! <!--Hides pilot in menu and hangar-->
                    (A:PAYLOAD STATION WEIGHT:1, Pounds) 20 &gt;
                    and
                    (A:CAMERA STATE, number) 2 == (A:CAMERA VIEW TYPE AND INDEX:0, Enum) 1 == (A:CAMERA VIEW TYPE AND INDEX:1, Enum) 4 == and and <!--shows pilot when in cockpit/pilot/copilot sub view-->
                    (A:CAMERA STATE, number) 2 != or <!--shows pilot when not in cockpit view-->
                    and
                </VISIBILITY_CODE>
            </UseTemplate>
        </Component>

        <!-- Copilot Visibility -->
        <Component ID="PILOT_1" Node="PILOT_1">
            <UseTemplate Name="ASOBO_GT_Visibility">
                <VISIBILITY_CODE>
                    (A:PLANE IN PARKING STATE, bool) ! <!--Hides copilot in menu and hangar-->
                    (A:PAYLOAD STATION WEIGHT:2, Pounds) 20 &gt;
                    and
                    (A:CAMERA STATE, number) 2 == (A:CAMERA VIEW TYPE AND INDEX:0, Enum) 1 == (A:CAMERA VIEW TYPE AND INDEX:1, Enum) 4 != and and <!--shows copilot when in cockpit/pilot view but hides when in cockpit/pilot/copilot subview-->
                    (A:CAMERA STATE, number) 2 != or <!--shows copilot when not in interior view-->
                    (A:CAMERA VIEW TYPE AND INDEX:0, Enum) 2 == <!--Shows copilot when in cockpit/instrument view-->
                    or
                    (A:CAMERA VIEW TYPE AND INDEX:0, Enum) 3 == or <!--Shows copilot when in cockpit/quick view-->
                    and
                </VISIBILITY_CODE>
            </UseTemplate>
        </Component>

If you want more options such as hiding the crew when cold and dark in a parking spot, add "ATC ON PARKING SPOT, bool" along with the usual engine combustion voodoo to the evaluation.
 
You can also use in CAMERA.cfg a new parameter in order to visualize parts only with defined camera.
The new parameter which appears in the last SDK (0.18.0) was: VarToggle
The Camera Definition Properties page has been updated to change the deprecated NodesToHide parameter to VarToggle.

Originally this parameter was for defining a node that would be hidden when the camera being defined was active, however now it functions as a simple toggle for local variables. You supply one (or more) L: Vars and then when the camera is active the variable will be toggled to 1 (TRUE) and when it is deactivated it will be toggled to 0 (FALSE).

This is useful, in particular when using different model behaviours - for example using the visibility template to to hide the yoke when a specific camera that is viewing an instrument.

Note that this toggle of the L: var will only happen if it's value is less than one when the camera is selected. If it is already 1 (or greater) then the toggle will not happen, and that includes it being set to 0 on switching away from the camera.

The default value is "", and you may supply multiple L: vars in a single string by separating them with a space.
Using an LVar associated to your part and added after VarToogle parameter in the appropriated camera it's possible to obtain the wanted result with less code XML that you have used.
 
Last edited:
Ah, thank you Lagaffe!
Last time I played with the camera.cfg was when nodestohide was a thing IIRC, what I never got to work.
Will give the VarToggle a shot.
 
Hello,
If someone has ideas ...
I have some difficulties to make appear the pilot in my plane (GAS Stearman) when it is used in AI by the simulator. Strange thing, the copilot appears but not the pilot.
We saw this when a user used our aircraft with Touching Cloud "AirShow" program. Everything was perfect with the Stearman used to fly but the same aircraft used as Ai had no pilot.
If somebody has knowledge on how Asobo/Microsoft manages AI aircraft, I’m listening to you, I could read the SDK ... not much is there !
 
Last edited:
Back
Top