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.

XML Night Lighting in FSX default gauges???

Featured Replies

Hi all,there is one thing I don't quite understand with FSX's new default XML gauges... First of all, I am no XML gauge designer, but I am still curious about this for a certain reason (see below).Opening up any of these CABs you will find a bunch of bitmaps inside, and many of them with a _night.bmp suffix. But inside the actual XML files I was not able to find any kind of reference to these bitmaps, but they do still work once you activate panel lighting.Basically, the only reason why this bothers me is that I was trying to rewrite certain gauges (in C++) but I just have no clue how to find out if the night bitmaps are loaded or not (that is if panel lights are active or not). Obviously I am not asking about the switch state of panel lights (there is the known TokenVar for that), but for the actual state of the lighting itself - e. g. you could turn up your panel lights during daytime, the switch and TokenVar would sure be in a TRUE or ON state but the panel itself would still show day bitmaps.So that's what I for heaven's sake can't figure out.If you have anything to contribute, do not hesitate to do so. :)Thanks,Etienne

Hi EtienneHave a look here, it was for FS9 and positively it doesn't work for FSX, but it can give you a clue. This is C language.http://forums.avsim.net/dcboard.php?az=sho...ing_type=searchIn XML and for FSX you can check the state of lightning with(P:TIME OF DAY, enum)0- Dawn1- Day2- Dusk3- NightYou can make an invisible XML gauge and send a variable from it to C gauges.Hope this helps.Germ

  • Author

I did know about that post (although it didn't come to my mind for it's been so long) ;), and yes it positively would not work for I would not even have a clue where to look for - global.dll is no longer there. :)I had also tried the XML approach before, not via the actual dedicated XML gauge way but rather using execute_calculator_code, which worked, but also revealed that actual panel lighting does not directly rely on that time of day variable, unfortunately. :(Ok, then I might have to look or wait for a different solution.Still, if some one has a clue about the _night.bmp bitmap thing mentioned above, please share your thoughts if you like. :)Thanks for your quick reply! :)Etienne

Hi Etienne,_night bitmap is called automatically by FSX. For C gauges, I think it has to be at the ressource ID of the day bitmap + 40000 (or maybe +4000)It works in the same way than the ID+500 for the low res bitmaps.hope this helps!

  • Author

I've gotta try, never even thought of that. I will keep you updated. :)Cheers, :-beerchugEtienne :-wave

  • Moderator

>Hi Etienne,>>_night bitmap is called automatically by FSX. For C gauges, I>think it has to be at the ressource ID of the day bitmap +>40000 (or maybe +4000)>>It works in the same way than the ID+500 for the low res>bitmaps.>>hope this helps!IIRC, Susan Ashlock said +40000 for the resource ID...Yep... "Actually, the delta for night images is 40,000 (decimal)."But, to be quite honest, I still prefer to have absolute manual control over the lighting, thank you... ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author

Oh, did she indeed say that (presumably at some 'other place')? ;) I believe I musta overlooked that one big time...>But, to be quite honest, I still prefer to have absolute>manual control over the lighting, thank you... ;)Well, what would I say. ;) But in my case I wanted to replace parts/expand some default panel, which is obviously working their way - i. e. the 'automatic' one which loads night bitmaps when it thinks it is appropriate.Thanks anyways for confirming, you've been of great help! :) Now if only my IDE wasn't messed up on BOTH machines I could just go ahead and give it an immediate shot... *:-*Cheers! :-beerchugEtienne :-wave

  • Author

Argh, I can't believe it is actually that simple and does not even require one single line of code (except for specifing the additional resource... lol).You guys made my day. :-hahNow if I could only find a way to play sounds from within a gauge that simple. *:-*Cheers, :-beerchugEtienne :-wave

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.