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

XMLTools attaching objects

Messages
440
Country
us-wisconsin
I already have a working scenario* for making this work, just looking into a more "SDK" type way of doing this. :stirthepo

*(<Visibility>in the .mdl, SIMVARS:_payload Station Weight, effects for weapons/drops)

Tried this with no luck, any insights? Even some SimConnect snippets would help even though I don't know how to write the code - XMLTools is my new friend. :D Thanks Tom!

The strings are actual sim object titles in \misc.

Code:
(G:Var4) 0 == if{
'500lb bomb' (>C:SIMVARS:Droppable Objects Type:3, string) <!-- No luck -->
'500lb bomb' (>C:SIMVARS:Payload Station Object:3, string) <!-- No luck -->
10 (>C:SIMVARS:Payload Station Num Simobjects:3, number) <!-- Not in SIMVars Ref, but tried anyway -->
 0 (>G:Var4) }

--------------------------------------------------------------------------
Aircraft.cfg -
[weight_and_balance]
station_load.0 = 200, -4.70, 0.05, 3.30
station_load.1 = 0, 0, 0, 0.0
station_load.2 = 0,  -1.09251639,    -11.17450698,    -0.11154822
station_load.3 = 0,  -1.09251639,    -10.0393398,    -0.22637727
station_load.4 = 0,  -0.99409149,    -8.63842539,    -1.19094129

station_name.0="Pilot"
station_name.1="User Specific"
station_name.2="500lb bomb"
station_name.3="500lb bomb"
station_name.4="500lb bomb"
 
Hi Roman,

Are you calling SIMVARS inside the modeldef file (ie in <Visibility>) ?
Remember that Custom (C : ) vars are not supported there, only valid in panel gauges.

Tom
 
Hi Tom,
No, there is no C: in the .mdl, just trying the "proper, SDK" way to load objects through a logic .xml w/XMLTools. Maybe it just doesn't work -
Because of Simconnect’s operation characteristics, some settable (A:_)variables might not perform as expected when updated with custom values, principally those that depend on forward calculations from other variables.

Thanks for your wonderful module!
 
Roman,

Did you try displaying (C:SIMVARS: Droppable Objects Type:3, string) or likewise within a standard gauge, with <FormattedText> ? I mean to check that the string is indeed saved to the var.

BTW, only var names listed in SIMVars_reference.txt are the ones supported.

Tom
 
Tom,

Returns 500. ? Seems like the data type is swapped somewhere.



Code:
<Update>
(G:Var4) 0 == if{
'500lb bomb' (>C:SIMVARS: Droppable Objects Type:1, string)
1 (>G:Var4)
 }
</Update>

<Element Name="TEST">
<Position X="84" Y="200"/>
<FormattedText X="150" Y="50" Luminous="Yes" Length="20" Font="Arial Narrow" FontSize="17" FontWeight="1600" Color="%('Red' '#EBEBD9' (A:TOTAL WEIGHT, pounds) (A:MAX GROSS WEIGHT, pounds) &gt; ?)"  BackgroundColor="#000000" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="Yes">
<String>%((C:SIMVARS:Droppable Objects Type:1, string))%!s!%</String>
</FormattedText>
</Element>
 

Attachments

  • Image2.jpg
    Image2.jpg
    1,022 bytes · Views: 343
Back
Top