• 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 v1 Engine Failures in XML gauges?

Messages
10,163
Country
us-arizona
Hey all,

Maybe I should ask this here.

Has anyone figured out ways to create engine failures with XML gauges that over-ride throttle, mixture, etc?

For instance, can you easily create a 2 level failure for carb icing? Can one create over-heating 'with' engine RPM lowering, engine sound lowering, etc? (With using Spoilers, you cannot have changes in RPM, sound, etc).

Can one over-ride throttle and mixture with XML gauges?



Bill
 
As you're developing the planes yourself you can set the FS A: parameter like throttle lever position by a K:*_Set events to mimic the effect of the engine issue, and indicate a custom-generated L: value in the gauges or as lever position in the panel/VC instead of the genuine A: value.

I've added a gauge by which the maximum throttle position is limited. This gauge also (roughly) detects lever position of an external physical throttle quadrant, which could be used to display the same position of the lever in the panel/VC as on the external lever.

E.g. if you want to implement power loss do the following:
- By >K: event set FS internal throttle position to something less than corresponds to the throttle position of the external throttle qaudrant.
- Display throttle lever position in the cockpit/VC with a L: variable at the same position as the external lever.

This can get messy so I'm not sure it's robust enough for a commercial product. Just a suggestion.

I'd guess (without having the skill) that the more robust way would be to use FSUIPC/Simconnect to capture external lever positions ect. and set the FS parameter to mimic engine effects.
 

Attachments

Hey all,

Maybe I should ask this here.

Has anyone figured out ways to create engine failures with XML gauges that over-ride throttle, mixture, etc?

For instance, can you easily create a 2 level failure for carb icing? Can one create over-heating 'with' engine RPM lowering, engine sound lowering, etc? (With using Spoilers, you cannot have changes in RPM, sound, etc).

Can one over-ride throttle and mixture with XML gauges?



Bill

There are different levers for controlling engine failures:

1) You can custom code the XML gauge needles as to show the intended values, though internally the simulator will keep running its vars as usual. This is the simplest way and the only that can be implemented using XML code exclusively. A good option in most cases, has its drawback in others, for example dissociated sounds, fuel consumption, engine responses, etc.

2) When manipulating throttle,mixture and any other function in XML that can be commanded by a controller (joystick) or keyboard key, you'll have to use a C++ event controller to capture those events when in External view. Not difficult to program, but you need at least a bit of C++ knowledge.

3) You can go further an use C++ with Simconnect to manipulate FS's internal variables -many, not all. This would be the best (though most difficult) option, because your instruments -mostly- show what you commanded FS to comply with.


Tom
 
I presume it's the same in FSX. I use the code below to give each engine an individual vibration depending on how many hours they have been running. Eventually the vibration factor will rise to a point where the engine will "malfunction" and need changing i.e. resetting the state.cfg values!
vololiberista
Code:
<!-- Engine Vibration Factors -->
<Element>
      <Select>
         <Value>(A:GENERAL ENG ELAPSED TIME:1, hours) 1000 &gt;
if{ (A:GENERAL ENG ELAPSED TIME:1, hours) 1000 / (>L:vib1,number) (L:vib1,number) 0.075 + (>L:vib1a,number) }
els{ 1.079 (>L:vib1,number) (L:vib1,number) 0.075 + (>L:vib1a,number) }
(A:GENERAL ENG ELAPSED TIME:2, hours) 1000 &gt;
if{ (A:GENERAL ENG ELAPSED TIME:2, hours) 1000 / (>L:vib2,number) (L:vib2,number) 0.045 + (>L:vib2a,number) }
els{ 1.081 (>L:vib2,number) (L:vib2,number) 0.045 + (>L:vib2a,number) }
(A:GENERAL ENG ELAPSED TIME:3, hours) 1000 &gt;
if{ (A:GENERAL ENG ELAPSED TIME:3, hours) 1000 / (>L:vib3,number)  (L:vib3,number) 0.050 + (>L:vib3a,number) }
els{ 1.114 (>L:vib3,number) (L:vib3,number) 0.050 + (>L:vib3a,number) }
(A:GENERAL ENG ELAPSED TIME:4, hours) 1000 &gt;
if{ (A:GENERAL ENG ELAPSED TIME:4, hours) 1000 / (>L:vib4,number) (L:vib4,number) 0.027 + (>L:vib4a,number) }
els{ 1.099 (>L:vib4,number) (L:vib4,number) 0.027 + (>L:vib4a,number) }</Value>
      </Select>
   </Element>
 
Thanks guys....


We need a class on how to make C++ gauges, and a class on how to make things for SimConnect. So many things we could all be doing with our planes..



Bill
 
Back
Top