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

Setting Fuel Flow Order?

Does this sound plausible, given the information above? It seems so to me, but I wanted to check with those who know more before I dive too deep into this as it's new territory for me. My understanding is that I could select a tank, transfer fuel either fore or aft as required, while the rest of the tanks feed fuel to the engines without requirement for adjustment. In fact, would a selector be required at all, if the fuel transfer switch merely governed forward and aft fuel movement between Center1 and Center2?

100% plausible. No need for a physical visual transfer selector, do the logic ("magic") in the background to control it.
XML:
(A:FUEL SELECTED TRANSFER MODE, enum)
(>K:SET_FUEL_TRANSFER_AFT)
(>K:SET_FUEL_TRANSFER_AUTO)
(>K:SET_FUEL_TRANSFER_FORWARD)
(>K:SET_FUEL_TRANSFER_OFF)
 
100% plausible. No need for a physical visual transfer selector, do the logic ("magic") in the background to control it.
XML:
(A:FUEL SELECTED TRANSFER MODE, enum)
(>K:SET_FUEL_TRANSFER_AFT)
(>K:SET_FUEL_TRANSFER_AUTO)
(>K:SET_FUEL_TRANSFER_FORWARD)
(>K:SET_FUEL_TRANSFER_OFF)


Excellent, many thanks! At least I now know that it is indeed achievable. But as Dragonflight points out, I surely would need a selector in order to tell which tank to transfer to and from, correct? This is where the "magic" eludes me, as I don't fully understand the relationship between a custom selector and K events. I do have a custom cockpit door switch that triggers the Exit:2 toggle event, so I assume a similar system would work in this case.

I will start putting some code together to see if it works in principal. My fuel already transfers automatically when all tanks are half-empty, so it's a case of controlling that flow now.
 
I think you actually need Center2 and Center3 for Concorde.

This is what I also understand to be the case. I want my engineer station to have the option to manually control the flow of fuel forward and backwards from the two tanks, should the user wish to do so, and an auto-setting if they don't, all of which is available as K:Set as above.
 
Hi Deano,
Sorry, a bit off topic but will your Concorde also be available for FSX?
 
The easiest way is to ignore all the fuel tanks, set all fuel selectors to "ALL" once, and then write a custom fuel tank/fuel flow scheme. Just divide the calculated fuel load across the tank(s) you have so the aircraft FDE mass is matched.

I have a single tank in the FDE (it's just easier), and I can simulate as many tanks as I wish, however I wish.

Don't bother trying to use the FDE fuel tanks for anything. Make sure they always have a minimum amount so the FDE engines don't quit.

Code:
void SetFuelSelectors()
{
    trigger_key_event(KEY_FUEL_SELECTOR_ALL,0);
    trigger_key_event(KEY_FUEL_SELECTOR_2_ALL,0);
    trigger_key_event(KEY_FUEL_SELECTOR_3_ALL,0);
    trigger_key_event(KEY_FUEL_SELECTOR_4_ALL,0);
}
 
I use the FDE tanks just fine. Including with regards to correct CG. Fuel transfer requires SimConnect to do it well... but even that isn't that difficult.
 
Hi guys, I've been wresting with the above for a while now but haven't been able to get this to work. I suspect it's my inexperience with XML once again that's causing me to miss something. I have three-way switches working well in the airplane, but the same method applied to my fuel-transfer selector switch kills all the animation and the mouse rect
- obviously something I'm missing here that's quite fundamental. Can anybody see what I'm doing wrong?

Code:
<PartInfo>
<Name>Fuel Selector Transfer Switch</Name>
  <AnimLength>50</AnimLength>
<Animation>
<Parameter>
      <Code>
        25 (L:Fuel Selector Transfer Switch, enum) 25 * +
      </Code>
</Parameter>
</Animation>
  <MouseRect>
    <Cursor>Hand</Cursor>
    <MouseFlags>LeftSingle+RightSingle</MouseFlags>
    <CallbackCode>
      (M:Event) 'RightSingle' scmp 0 ==
      if{ (L:Fuel Selector Transfer Switch, enum) -- -1 max (>L:Fuel Selector Transfer Switch, enum) }

      (M:Event) 'LeftSingle' scmp 0 ==
      if{ (L:Fuel Selector Transfer Switch, enum) ++  1 min (>L:Fuel Selector Transfer Switch, enum) }

      (L:Fuel Selector Transfer Switch, enum) -1 ==
      if{ (>K:SET_FUEL_TRANSFER_AFT) }

      (L:Fuel Selector Transfer Switch, enum) 0 ==
      if{ (>K:SET_FUEL_TRANSFER_OFF) }

      (L:Fuel Selector Transfer Switch, enum) 1 ==
      if{ (>K:SET_FUEL_TRANSFER_FORWARD) }
    </CallbackCode>
  </MouseRect>
</PartInfo>
 
switch kills all the animation and the mouse rect
Does it kill all the animations in the whole cockpit / aircraft ?
The above code seems to look good after quite a few views at it.
Perhaps it may lie in the headers at the top of the modeldef.xml? Specifically the GUID (make sure it is not used elsewhere) & animation lengths.
 
Does it kill all the animations in the whole cockpit / aircraft ?
The above code seems to look good after quite a few views at it.
Perhaps it may lie in the headers at the top of the modeldef.xml? Specifically the GUID (make sure it is not used elsewhere) & animation lengths.

Thanks. The rest of the cockpit is fine, just that there is no animation of the three-way-switch, no detection of the mouse - it's just dead. That suggests to me that I am missing a line somewhere or have duplicated something as you suggest, an animation name or perhaps a GUID. I'll have another check. It's good that you think the code looks okay though, that's more than I was expecting! :)

ETA: GUIDs and names all good, nothing there to throw it out.
 
Another partial idea.. I am not a modeller so..
When working with Larry ( LDR ), when there was an animation that just wouldn't work sometime it required a " reset scale " (something like that) modifier in the part hierarchy.
Pls.. Take with a grain of salt. :scratchch
 
Thanks @spokes2112 - I did check the part scale but it's 1-1-1 as it should be, so it's not that. I wonder if my error is elsewhere, some sort of aircraft.cfg problem. I have the settings there;

number_of_tank_selectors = 1
fuel_transfer_pump = 0, 5, 17

I have not modeled in a cockpit tank selector though, as this seemed not to be needed for the purposes of what ( should ) be a simple gauge. I wonder if Dai's mention above of needing tanks Center2 and Center3 to be referenced might be an issue also.
 
Aha!! No of tank selectors - you need one per tank. Not obvious.

There are nine tanks, but only four engines. The number of tanks selectors in the aircraft.cfg must never exceed the number of engines, according to the SDK. I did try it out though, and all engines shut down ( the switch still didn't work ).
 
Okay... so I've just given my fingers a good talking to. I found that I couldn't get my B-314's fuel system to behave until I gave it one selector per engine (not tank!).
 
Thanks Dai, I'd already tried 4 tanks, along with various other combinations, but no joy - the dial won't budge and won't show a tool tip or mouse hand. Something's holding it up but I can't see what. Will keep digging.
 
More ideas,
1) Change the part name ( don't forget header ) to : Fuel_Selector_Transfer_Switch
Not one part name of my master modeldef has any spaces involved. This includes stock FSX codes and project supplements from Larry & Milton.
2) Perhaps it isn't "reset scale", but rather "reset transform", as the modifier needed to get it working. ( ???? again not my thing, relying on poor memory )
3) As a last resort, go basic. Replace the code, save the old, with the following, this will isolate any sim systems and just get down to a basic click spot & animation. It will help by isolating where the problem may lie.
4) I doubt that any system will prevent it from animating because the animation relies on the L:Var only, not the response of the system itself.
XML:
<PartInfo>
<Name>Test_My_Code</Name>
  <AnimLength>50</AnimLength>
<Animation>
<Parameter>
      <Code>
        25 (L:Just a test, enum) 25 * +
      </Code>
</Parameter>
</Animation>
  <MouseRect>
    <Cursor>Hand</Cursor>
    <MouseFlags>LeftSingle+RightSingle</MouseFlags>
    <CallbackCode>
      (M:Event) 'RightSingle' scmp 0 ==
      if{ (L:Just a test, enum) -- -1 max (>L:Just a test, enum) }

      (M:Event) 'LeftSingle' scmp 0 ==
      if{ (L:Just a test, enum) ++ 1 min (>L:Just a test, enum) } 
    </CallbackCode>
  </MouseRect>
</PartInfo>
 
Last edited:
Hi,

It is Reset Scale - Reset Transform removes all animations, as I remember.
 
Back
Top