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

P3D v2 Token Variables and Simulation Variables

Messages
1,361
Country
canada
I'm a bit confused on how to use token variables, because I don't think they work in XML gagues, any more, if ever. I see xml gauges out there where people have used as an example -

(A:RECIP_ENGINE1_CHT_DEGR,rankine) < --- this returns zero

rather than

(A:RECIP ENG CYLINDER HEAD TEMPERATURE:index, rankine) <--- this returns a correct number

Is this left over FS9 code that used to work? Just an FYI P3D v2 does not.

So all you commercial guys out there - lots of work to get older models to work "right" in P3D v2.:twocents:
Or am I using the token variables incorrectly?
 
Ron, RECIP_ENGINE1_CHT_DEGR is a "token variable" that is C only. Unless you are going to create C gauges, you can completely ignore the SimObject SDK/Panel and Gauge Resources/Token Variables document!

XML use "simulation variables" (hint: these have no underscore characters in their names)

Look only in the Core Utilities Kit/Variables/Simulation Variables for XML A:sim vars.
Look only in the Core Utilities Kit/Variables/Event IDs/String Name for XML K: commands.
 
Thanks Bill,

Yes I just noticed the missing underscores. I now getting things to work as they should, fuel flow, pressure, oil temp, pressure, cht etc.
 
Bill I never use the "RECIP" in my code writing but i noticed i have used a few in my older model def codes. They seem to work fine. Can this cause an issue?

Yes I just noticed the missing underscores
"UNDERSCORES" are used for Event ID's and Variables like this example do not use them!:yikes:

(A:RECIP ENG CYLINDER HEAD TEMPERATURE:index, rankine) <--- this returns a correct number

ENG 1
(A:ENG CYLINDER HEAD TEMPERATURE:1,Celsius) <--- this returns a correct number in Celcius for ENG1.
ENG 2
(A:ENG CYLINDER HEAD TEMPERATURE:2,Fahrenheit) <--- this returns a correct number Fahrenheit for ENG2.
 
That's one of my main 'bitches' with the SDK(s). There are just too many 'duplicated' variables.
 
I agree Bill there are too many repeats...
Bill what is this variable used for when creating airspeed gauges?

AIRSPEED TRUE CALIBRATE ....( Angle of True calibration scale on airspeed indicator ) ...Degrees

Never used it and just wondering when it would be used!
 
Last edited:
I haven't got a clue myself! "Angle of true calibration scale on airspeed indicator" is nothing more than an essentially vacuous statement.

On reflection though, it may very well be a variable that can be used to keep the TAS wheel calibrated on any ASI that has such a wheel. See: http://en.wikipedia.org/wiki/Airspeed_indicator

512px-True_airspeed_indicator-FAA.SVG.png
 
On reflection though, it may very well be a variable that can be used to keep the TAS wheel calibrated on any ASI that has such a wheel

and building on that, see the stock Baron XML airspeed indicator for an example of its use. Used in conjunction with events TRUE_AIRSPEED_CAL_DEC and _INC
 
Last edited:
Makes you wish they had college courses on this stuff locally, doesnt it Ron.

Imagine looking up in the local University catalog;
24423.....C++ Gauge Code for FSX/P3D Developers, 101, requires Lab 23245r
28756.....XML Gauge Coding for FSX/P3D in FS2004 format, 102, requires Lab 78424c
 
Makes you wish they had college courses on this stuff locally, doesnt it Ron.

Imagine looking up in the local University catalog;
24423.....C++ Gauge Code for FSX/P3D Developers, 101, requires Lab 23245r
28756.....XML Gauge Coding for FSX/P3D in FS2004 format, 102, requires Lab 78424c

What was needed was actual Tech Writers for the documentation of FSX. The SDK generates more questions than it answers and appears to have been written by amateurs, or after the
fact, by coders!

Paul
 
As I remember there *was* a guy in charge of writing the FSX SDK, but he didn't seem to make many changes to the actual wording of the details from the coders so we could understand it...
 
What was needed was actual Tech Writers for the documentation of FSX. The SDK generates more questions than it answers and appears to have been written by amateurs, or after the
fact, by coders!

Paul

Man, I remember those days.... :S Just getting plexiglass to work was a nightmare. Later when they provided us with samples (or was that Prepar3d) for materials to go by that really helped us out. there must be like 100 to 200 different sliders and ticks to set on one Material.

Its really nice to see new exporters and SDK data being improved at P3D. That has been a real blessing for us developers.
 
Thanks for the info on that code i most likely do not need and good to know the Baron has a sample.
That would be cool if someone sat down and added more info to all the variable descriptions in the SDK.
I bet it would only take a few days if someone did that. But i am sure nobody is going to do it!:yikes:
 
Back
Top