Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Cold & Dark Startup script

Featured Replies

Hello everybody!

After going through Yoda´s wonderfull Flight Tutorial of the C90B I was just asking myself if it is possible to do a kind of startup xml-script for the C90 to get her completely cold & dark from the first load.

I would first be talking about the Inverters and the Autoinginition beeing activated from start by now ... every time we have to switch them back to "off" before we can do the startup-procedure ... or is it only my setup here doing these things?

 

Don´t know if and how this could be accomplished, it was just the first thing that came into my mind after completing the tutorial.

 

Just a thought!

Best regards,

 

Avsim-Banner-2.jpg

  • Replies 34
  • Views 13.7k
  • Created
  • Last Reply

Top Posters In This Topic

That would be great indeed! Just the same here, inverters etc. are set to on when the aircraft is loaded up...

Yeah it would be nice to have the EFIS master switch on the pedestal in the off position at cold and dark also.....

For what it is worth....I set up the C90 at KBFI and the turned off all the switches, fuel cut off cut, EFIS off, bleed off, etc,then made this the default, and started FSX............almost all came up as "OFF". except the fuel, EFIS, and bleed...........there may be something in the base program (I don't understand the design), that will not let some tsettings be programmed in the OFF position?? Or it could be an error in my install??.............otherwise it is a "cold and dark" as far as I can see...................B42L8

  • Author

I made a saved flight as default but could not manage to keep the switches in off like it was saved before and if it might ever get saved it will reset when switching the livery ....

Best regards,

 

Avsim-Banner-2.jpg

For what it is worth....I set up the C90 at KBFI and the turned off all the switches, fuel cut off cut, EFIS off, bleed off, etc,then made this the default, and started FSX............almost all came up as "OFF". except the fuel, EFIS, and bleed...........there may be something in the base program (I don't understand the design), that will not let some tsettings be programmed in the OFF position?? Or it could be an error in my install??.............otherwise it is a "cold and dark" as far as I can see...................B42L8

 

FYI, all switches and knobs states (ON/OFF) are represented by two kind of variables: Aircraft and User. Aircraft vars (aka Avars) are managed by FS panel process; when you save a flight their state is (generally) saved with other flight parameters and therefore is retrieved the same when you load that flight again (ie Cold and Dark or whatever). User vars (aka Gvars and Lvars) states are NOT saved with the flight by FS so when that same flight is reloaded, they will default to 0 or OFF. All of cosmetic switches - I mean, switches to functions that are not truly simulated by FS panel engine - are handled by User vars, that's the reason they are coming always in OFF state on a flight load. Some developers do take care of this situation and allow User vars to be saved and retrieved with the same state; but they are the less, unfortunately.

 

Tom

Good info...........I have a real appreciation of all those in the sim wolrd that understand what is the inner works of programming...........we are fortunate to have those among us...................regards, B42L8

  • Author

FYI, all switches and knobs states (ON/OFF) are represented by two kind of variables: Aircraft and User. Aircraft vars (aka Avars) are managed by FS panel process; when you save a flight their state is (generally) saved with other flight parameters and therefore is retrieved the same when you load that flight again (ie Cold and Dark or whatever). User vars (aka Gvars and Lvars) states are NOT saved with the flight by FS so when that same flight is reloaded, they will default to 0 or OFF. All of cosmetic switches - I mean, switches to functions that are not truly simulated by FS panel engine - are handled by User vars, that's the reason they are coming always in OFF state on a flight load. Some developers do take care of this situation and allow User vars to be saved and retrieved with the same state; but they are the less, unfortunately.

 

Tom

 

Thanks Tom for your good explainations! So in other word ... could it be done in a kind of XML-script loaded in the panel.cfg as a gauge to also switch these "other" - VARS to a off position? Just curious ....

Best regards,

 

Avsim-Banner-2.jpg

FYI, all switches and knobs states (ON/OFF) are represented by two kind of variables: Aircraft and User. Aircraft vars (aka Avars) are managed by FS panel process; when you save a flight their state is (generally) saved with other flight parameters and therefore is retrieved the same when you load that flight again (ie Cold and Dark or whatever). User vars (aka Gvars and Lvars) states are NOT saved with the flight by FS so when that same flight is reloaded, they will default to 0 or OFF. All of cosmetic switches - I mean, switches to functions that are not truly simulated by FS panel engine - are handled by User vars, that's the reason they are coming always in OFF state on a flight load. Some developers do take care of this situation and allow User vars to be saved and retrieved with the same state; but they are the less, unfortunately.

 

Tom

 

Good post, thank you, Tom! The only problem are switches set to ON even if you saved the flight with switches set OFF. I.e. the radios: you can switch them all OFF, then Avionics Master OFF. If you save this in a FLT-File and reload the file, then after switching Avionics Master ON all radios are set to ON which is not right.

These switches might be Avars?!

Allways three greens,
Markus

VFR-Flightsimmer.de

Thanks Tom for your good explainations! So in other word ... could it be done in a kind of XML-script loaded in the panel.cfg as a gauge to also switch these "other" - VARS to a off position? Just curious ....

 

Yes, you can program a gauge that handles the state of those LVars at startup; anyway they will start always in the same state they are coded to, despite the situation originally saved on the currently loaded flight (Unless controlled otherwise by developer's code)

 

Good post, thank you, Tom! The only problem are switches set to ON even if you saved the flight with switches set OFF. I.e. the radios: you can switch them all OFF, then Avionics Master OFF. If you save this in a FLT-File and reload the file, then after switching Avionics Master ON all radios are set to ON which is not right.

These switches might be Avars?!

 

Radios ON/OFF in FS depend on Master Avionics state; it means they turn on/off when Master Avionics switch (which is an Avar) is turned on/off. "Shutting" the radios is done by custom code, therefore at startup their state will depend on the Master Avionics state. If MA was saved OFF, when turned ON will turn on the Radios as well (as their "shut" switches are User vars.)

 

Tom

  • Author

Tom,

many thanks again for clarifying!

I just could remember Bert Pieke in the C340 forum providing us a gauge (with xml-code) were we could have the "no-3d-knobs in VC"-option activated from startup, which I still use btw ... I just thought something similar could be done for some of the VC-switches in the C90 if you know the exact variables to play with ... that was the idea behind the topic ... but again, I am no programmer!

Best regards,

 

Avsim-Banner-2.jpg

I own a Duke and this plane has an extra program in which you can choose to start cold and dark. Would be nice to have on King Air as wel.

I believe that there is a way to do it via LUA script run through FSUIPC... There was one made for the PMDG J41 that was awesome... but! Unfortunately, I wouldn't know where to begin on creating something like that or if it's even feasible for the Carenado. Cheers!

 

Bud

Buddy Morgan

 

Specs removed by Admin. See AVSIM Signature policy in Hangar Chat

For those who haven't been up to the task yet yet, you'll find that this should do that trick...

 

Instructions:

1. Go to the Modules folder of your FSX directory (where FSUIPC would be located).

2. Create a new text file in that folder and paste the code found below.

3. Name the file: BE90_cold_dark.lua

4. In FSX, open the FSUIPC menu and assign an unused key combo to "Lua BE90_cold_dark".

 

ipc.sleep(200)
ipc.writeLvar("L:ASD_SWITCH_INVERTER", 0)
ipc.sleep(200)
ipc.control(66701, 0)
ipc.sleep(200)
ipc.writeLvar("L:ASD_SWITCH_ELEV_TRIM",1)
ipc.sleep(200)
ipc.writeLvar("L:ASD_SWITCH_VENT_BLOWER",-1)
ipc.sleep(200)
ipc.writeLvar("L:ASD_SWITCH_RUDDER_BOOST",1)
ipc.sleep(200)
ipc.writeLvar("L:ASD_SWITCH_EFIS_POWER",0)
ipc.sleep(200)
ipc.control(66488, 1)
ipc.sleep(200)
ipc.control(66489, 1)
ipc.sleep(200)
ipc.control(66374)
ipc.sleep(200)
ipc.control(65767,-16383)
ipc.sleep(200)
ipc.control(65778)
ipc.sleep(200)
ipc.control(66535)
ipc.sleep(200)
ipc.display("Cold and dark script complete")
ipc.sleep(3000)

  • Author

OMG!!!

C525B you made our day! That was the exact thing I had in mind!!

THANK YOU Dave , will try atonce I am home!

 

WOW! :Party: :Hug:

Best regards,

 

Avsim-Banner-2.jpg

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.