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

Some XML Code Definition questions

Messages
10,163
Country
us-arizona
Hey all,

I would like to know what the definations of the following mean, what they do?

G:Var1.......I see this in the fuel selector code blocks. What does G stand for?

M:X..........This also

Bias..........I see this often. I would like to know what it means, what it does.


Many thanks,



Bill
 
It's in the SDK:

Parameter Stands for... Description
A Aircraft, including helicopters Gets the specified parameter of the aircraft.
C Custom parameter Custom variable created for Flight Simulator.
E Environment Gets environment variables, such as current time.
G Gauge parameter Gets a variable that is local to the gauge
K Key code Variables of this kind are key codes that are sent from gauges to Flight Simulator.
L Local parameter Gets a variable that is defined by the developer
M Mouse parameter Gets the state of the mouse for use in mouse click handlers.
P Program related Gets program variables, such as simulation rate
R Resource strings Retrieves a string from the resource file.

Gauge Parameters (G:)
Parameters of the “G” kind have names from Var1 to Var9. These are used by gauge developers to store and retrieve variables across gauge elements. These values are unitless so do not put unit names after them. The default value of a gauge parameter is 0.
To get a gauge variable:
(G:Var1)
To set a gauge variable (to 5 in this example):
5 (>G:Var1)

NOTE: Unlike L:vars, G:Vars are local to the specific subgauge instance. They are not shared between subgauges. That is why you can't synch 2d and 3d instances of a GPS for example.
=================
Mouse Parameters (M:)
Parameters of the “M” kind are:
• “X” — the X coordinate of the mouse pointer.
• “Y” — the Y coordinate of the mouse pointer.
• “Event” — the string representation of the event which triggered the mouse handler, such as “LeftSingle” or “RightDouble”. The table below gives the full list of mouse events.

=================
Bias: one of the elements of the general animation formula used in 3d modeling scripts used to offset the zero point of a calculation

keyframes = simvar * scale + bias

Perhaps more of this would be less of a mystery if less time was spent playing... LOL!
 
Last edited:
To complete Bill's list there are also S variables accessible through C variables that relate to AI aircraft, for example:
(C:ITrafficInfo:S:AIRSPEED INDICATED,KNOTS) is the equivalent of (A:AIRSPEED INDICATED,KNOTS) for the Selected AI aircraft.

The S variables appear to be a subset of the A variables and concern things needed to get the AI aircraft round its flight path, but do not include things AI do not use like trim or autopilot or engine parameters. For example:
(C:ITrafficInfo:S:GENERAL ENG THROTTLE LEVER POSITION:1,PERCENT) is included, but not the resulting engine readouts used for gauges.

S variables are useful to record when trying to get good AI performance out of aircraft that perform well when flying them in FS but are dogs as AI.

Roy
 
Back
Top