a working example of an effects xml file
Here's a working example of an XML file used in the Panel section of an aircraft to control some effects. This one makes engine smoke when the aircraft is travelling greater than 25kts, at altitudes below 30,000ft, and when the throttle is greater than 80%. The first Element switches the smoke on, the second Element switches it off.
<Gauge Name="Engine1 Smoke">
<Element>
<Select>
<Value>
(A:AIRSPEED INDICATED,knots) 25 > (A:INDICATED ALTITUDE,feet) 30000 < (A:GENERAL ENG1 THROTTLE LEVER POSITION,percent) 80 > (A:SMOKE ENABLE,bool) 0 == ; && && && if{ (>K:SMOKE_ON) }
</Value>
</Select>
</Element>
<Element>
<Select>
<Value>
(A:GENERAL ENG1 THROTTLE LEVER POSITION,percent) 80 < (A:INDICATED ALTITUDE,feet) 30000 > || (A:AIRSPEED INDICATED,knots) 25 < || (A:SMOKE ENABLE,bool) 1 == ; && if{ (>K:SMOKE_OFF) }
</Value>
</Select>
</Element>
</Gauge>
The above code could be saved as a file called, for example, "engine_smoke.xml".
This engine_smoke.xml file could then be included in a CAB file, which I have called in this example, "voodoo_c130.cab". You can use an open source utility called TUGzip to create CAB files. The CAB file can contain several XML files such as this. If you wish, the cab file can reside in the Panel folder of the aircraft you are working on (it could also go in the main FSX Gauges folder, but I prefer to keep them in the Panel folder for add on aircraft so I can uninstall them more easily if I wish to later).
In the PANEL.CFG file in the Panel folder you would create an entry for the xml gauge. Here's an extract from the [Window00] section of the Panel.cfg file in this working example. The smoke effect is attached to gauge62. The format is:
"gauge number = cab file ! embedded xml file, screen coordinates of the gauge".
gauge59=L_Registration!AtcReg, 547,230,39,18
gauge60=ALPHA_C-5!ENGINE LIGHTS, 277,435,86,34
gauge61=ALPHA_C-5!STALL OVERSPEED, 372,444,80,12
gauge62=voodoo_c130!engine_smoke, 1,1,1,1
gauge63=voodoo_c130!GS, 566,269,36,18
gauge64=voodoo_c130!engine_boost, 1,1,1,1
I hope this gives you one idea of how you can make make a gauge work to control an aircraft effect. Check out the SDK for all the Simulation Variables you can use in XML gauges.
The Reverse Polish Notation is tricky to do but there's a tool in the SDK called the Infix2Postfix Tool that (claims) can help you to figure the logic out.