Jump to content
The simFlight Network Forums

.FLT | Lvars | Cold & Dark Start Problems


Recommended Posts

Attention Advanced Users of FSX and FSUIPC:

I've got two (2) problems to solve. I'm having difficulty getting a true Cold & Dark start on the default Cessna 172SP Skyhawk (I can get other third-party aircraft to a true C&D condition at start-up). The typical newbie solutions of positioning the aircraft at the airport, shutting down all systems, turning off all switches, knobs, etc., and then saving the flight as default, just don't work. This seems like a more advanced problem.

Problem #1:

When starting FSX and clicking on "Fly Now," the aircraft loads with a partial Cold & Dark condition. By that I mean that everything is the way it should be, except that the "Radio LT/Panel LT BRT (brightness)" switch always loads in the On position, even when the Master Battery switch loads in the Off position. So, the cockpit panel always loads in a lighted condition, which should not be the case - the panel should load Dark with no illumination (all other power related conditions load in the Off setting).

Problem #2:

When starting FSX and clicking on "Fly Now," the "Magnetos/Ignition key always loads in the "Both" position. It should load in the "Off" position, because that's how the flight was last saved. It never loads in the "Off" position, no matter what I do before saving the default flight.

What I've tried thus far:

I've looked at the "Default Flight FSX Cessna 172.FLT" file and noted that everything under the Avionics section is set to "False" as it should be. The same is true with the "Systems.0" section (everything is set to "False" which should load as "Off"). The same is true for the "Switches.0" section (all "False" which should load as "Off"). There is no aircraft systems related section in the .FLT file that has any component loading in the "On" or "Active" condition. Everything is shut down inside the .FLT file.

I'm also using FSUIPC - the latest version. The goal here was to set a key mapping that would turn the ignition switch to the "Off" position after the aircraft loaded. However, using FSUIPC, I noted that there is no FSX Control value for the Magnetos, when you search the FSUIPC documentation on FSX Controls. The only FSX Control having anything to do with the ignition system is called "TOGGLE_MASTER_IGNITION_SWITCH" and it has a value = 66534. However, that's just a two (2) position toggle switch. The aircraft's ignition is a five (5) position switch (Off, Left, Right, Both, Start). So, trying to set a key assignment to use an FSX Control for 66534, does not seem like the right path to follow - though it was a good guess.

I then mapped a key through FSUIPC for "Log Lvars.lua" and began tracking mouse clicks within the Virtual Cockpit of the default Cessna 172SP. Observing the Lvars output window in the VC, I found that there is no Local Variable being picked-up by Log Lvars.lua whenever you click on the "Radio LT/Panel LT BRT," or the "Magnetos/Ignition Key" in the default Cessna 172SP.

When you click on the "Radio LT/Panel LT BRT" (brightness knob), it does move in and out and the panel brightness does fade all the way to a dark panel like it should. However, no Lvar ever comes to screen in the Lvars output window. The same is true for the Magnetos/Ignition switch. When you click on it, the key does move and the aircraft will start. But again, no Lvar is ever returned or captured by Log Lvars.lua. The Log Lvars Log file also shows no trace of those two clicks, yet both of them do work inside the aircraft's VC during the simulation. A bit Bizarre.

So, I am unable to capture the name of each Lvars for Magnetos/Ignition switch and the Radio/Panel brightness knob, so I can set them both to "Off" using an FSUIPC key mapping, or even an FSUIPC Macro - after the default aircraft loads in FSX.

A More Elegant Solution:

Ideally, I'd like to use the more elegant solution of simply entering these two lines somewhere into the .FLT file and then setting their condition to "Off" or "False" (whichever is appropriate). But, I need to know the names of these two Lvars, so that they are read at load-time within the .FLT file and I need to know under which Section within the .FLT file do they belong.

Any ideas on this one from the Experts?

The default Cessna 172SP will load Cold, but not completely Dark and the ignition switch will not load in the "Off" position where it belongs. I see no logical way to set this condition within the panel.cfg and/or the global fsx.cfg files (this does not related to the .air files). The .FLT seems to be the most elegant, adaptable and flexible solution for having multiple aircraft start-up configurations.

Going through FSUIPC and using either a key assignment or a Macro is an after-the-fact way to handle the problem. However, going through the .FLT and setting entries for these two (2) items ("Radio LT/Panel LT BRT" and "Magnetos/Ignition Key") would be a load-time solution that is far better. So, if anybody is aware of the names that are used in the .FLT file for these two problem children, that would be very helpful.

Thanks.

Link to comment
Share on other sites

Problem #1: Resolved (found FSX control value and Lvars name)

Problem #2: Resolved (found FSX control value and Lvars name)

New .FLT file works at load-time and results in 100% Cold & Dark condition.

Assigned LUA to key in FSUIPC. Captured Lvars and Control values (just not with the instructions given on this site).

Used a different control name for panel lights (located in List of FSX Controls.pdf).

Onward and upward.

Link to comment
Share on other sites

.... the "Radio LT/Panel LT BRT (brightness)" switch always loads in the On position, even when the Master Battery switch loads in the Off position. So, the cockpit panel always loads in a lighted condition, which should not be the case - the panel should load Dark with no illumination (all other power related conditions load in the Off setting).

... the "Magnetos/Ignition key always loads in the "Both" position. It should load in the "Off" position, because that's how the flight was last saved. It never loads in the "Off" position, no matter what I do before saving the default flight.

Both of these odd things appear to be true, yes. Must be some function of the specific gauge coding, even a bug possibly.

However, using FSUIPC, I noted that there is no FSX Control value for the Magnetos, when you search the FSUIPC documentation on FSX Controls. The only FSX Control having anything to do with the ignition system is called "TOGGLE_MASTER_IGNITION_SWITCH"

You never saw all of the Magneto controls? How hard did you look? They start with the word "Magneto" so there is really no excuse! Here's a list:

MAGNETO 65586

MAGNETO1_BOTH 65930

MAGNETO1_DECR 66126

MAGNETO1_INCR 66127

MAGNETO1_LEFT 65929

MAGNETO1_OFF 65927

MAGNETO1_RIGHT 65928

MAGNETO1_SET 66400

MAGNETO1_START 65931

MAGNETO2_BOTH 65936

MAGNETO2_DECR 66128

MAGNETO2_INCR 66129

MAGNETO2_LEFT 65935

MAGNETO2_OFF 65933

MAGNETO2_RIGHT 65934

MAGNETO2_SET 66401

MAGNETO2_START 65937

MAGNETO3_BOTH 65942

MAGNETO3_DECR 66130

MAGNETO3_INCR 66131

MAGNETO3_LEFT 65941

MAGNETO3_OFF 65939

MAGNETO3_RIGHT 65940

MAGNETO3_SET 66402

MAGNETO3_START 65943

MAGNETO4_BOTH 65948

MAGNETO4_DECR 66132

MAGNETO4_INCR 66133

MAGNETO4_LEFT 65947

MAGNETO4_OFF 65945

MAGNETO4_RIGHT 65946

MAGNETO4_SET 66403

MAGNETO4_START 65949

MAGNETO_BOTH 66026

MAGNETO_DECR 65634

MAGNETO_INCR 65635

MAGNETO_LEFT 66025

MAGNETO_OFF 66023

MAGNETO_RIGHT 66024

MAGNETO_SET 66028

MAGNETO_START 66027

... But again, no Lvar is ever returned or captured by Log Lvars.lua. The Log Lvars Log file also shows no trace of those two clicks, yet both of them do work inside the aircraft's VC during the simulation. A bit Bizarre.

Not sure why you think it bizarre. It is quite possible to code compete cockpits without ever using L:Vars.

Problem #1: Resolved (found FSX control value and Lvars name)

Problem #2: Resolved (found FSX control value and Lvars name)

Good. Well done.

New .FLT file works at load-time and results in 100% Cold & Dark condition.

Assigned LUA to key in FSUIPC. Captured Lvars and Control values (just not with the instructions given on this site).

And are you going to keep this method a secret rather than share with others?

Regards

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.