Military AI Works • Aircraft lights Entries in the .CFG file: Explained
Page 1 of 1

Aircraft lights Entries in the .CFG file: Explained

Posted: 21 Nov 2008, 19:35
by swimeye
Hi!

How does the coordinate system in the aircraft.cfg works for the aircraft ligths?. Which parameter do i use to move the light up or down or front or back for ecample?

Thanks for any input.

Posted: 21 Nov 2008, 21:29
by MIKE JG
Here's the light section from the standard HTAI F-16: (I'm explaining this from an AI aircraft standpoint)

[lights]

//Types: 1=beacon, 2=strobe, 3=navigation, 4=cockpit, 5=landing 6=taxi

light.0 = 2, -19.70, 0.00, 11.45, fx_f16_strobeh
light.1 = 3, 10.70, -2.30, -1.50, fx_f16_navredm
light.2 = 3, 10.70, 2.30, -1.50, fx_f16_navgrem
light.3 = 3, -18.60, 0.00, 3.37, fx_f16_navwhih
light.4 = 3, -7.00, -15.00, 0.60, fx_f16_navredm
light.5 = 3, -7.00, 15.00, 0.60, fx_f16_navgrem
light.6 = 3, -12.70, -3.20, 0.87, fx_f16_navwhih
light.7 = 3, -12.70, 3.20, 0.87, fx_f16_navwhih
light.8 = 3, 5.00, -0.00, 2.85, fx_f16_navwhih
light.9 = 3, 5.00, -0.00, -2.85, fx_f16_navwhih
light.10 = 2, -18.40, 0.00, -0.15, fx_f16_ab

This is the breakdown.

For the first part in green, the "light.0" part:
-AFAIK, you can have no more than 19 total entries in the lights section starting with "light.0" through "light.18".
-You can skip a number in the sequence but they must be in numerical order
-It does not matter what light effect comes first

For the "=2" section in cyan color:
-This section defines what type the light effect will be. The line just under the [Lights] declaratoin does not need to be in the section however many designers place that in there, commented out with the "\\" to remind themselves what each light definition is.
- #1 is for the beacon and will come on any time the engines are running
- #2 is for strobe lights and will only come on once the aircraft has been cleared onto the runway. They will turn off once the aircraft has cleared the runway after landing.
- #3 is for the nave lights and come on from the begining of the "preparing" mode to just after engine shut down until the AI goes into sleep mode.
- #4 is for cockpit ambient lighting and comes on during the designated nightime hours.
- #5 is for landing lights which come on when the aircraft has been cleared onto the runway for takeoff and remain on until the aircraft reaches 10,000 ft. When descending back down through 10,000 ft. they appear again until after the aircraft clears the runway upon landing.
- #6 is for a taxi light and comes on during the designated nighttime hours and wil extinguish when the aircraft reaches the runway.

You can define any effect with any one of those numbers. However it does not make sense to define a landing light effect as a nav light effect because of the conditional way in which each opperates. However for example you can define a smoke effect as a strobe light (2) or beacon (3) and have smoke coming from the engines based on those light conditions.


The next three numbers are the Z, X, and Y coordinates based off of the center point of the model.
- All of the coordinates can be positive or negative depending on how the model was designed. Generally if you think about an aircraft, anything below the longitudinal centerline will be a negative value for the Y coordinate. The lateral coordinate, the X value usually has a negative value for effects on the left side and a positive value for effects on the right hand side. The Z coordinate can go either way, it just depends on how the model was oriented when it was compiled.

The final part in orange is the actual effect that you wish to use. Again AFAIK, you can use any effect from your FS9/Effects folder on any model. So if you want the forest fire effect attached to the model, go for it.
A more practical example besides the normal light effects are engine smoke effects and afterburner effects. Again these can be listed, placed and defined using the light system. The afterburner effect that comes with the HTAI F-16 is a simple effect that is a timed event. I don't recall exactly but I believe the effect, which is always defined as a number 2 (strobe) starts 10 seconds after the strobe light conditions are met and lasts for 30 seconds after that. That is why if the aircraft has to wait in position, the afterburner effects get out of sync.

Good luck.

Posted: 22 Nov 2008, 00:16
by Graham King
Mike, nice tutorial. I did not know about type 6, taxi lights, so I have learnt something new as well as the landing lights going out above 10, 000 feet.

If I remember correctly I think Henry's afterburner effect lasts for 45 seconds.

Posted: 22 Nov 2008, 10:27
by swimeye
Thank you very much. Explains so much more than i really wanted to know so this is really appreciated. Now i know so much more than before. Thanks again for such goodwill. :D

Posted: 08 Apr 2009, 10:22
by FlyEF
MIKE JG wrote: ...
[lights]

//Types: 1=beacon, 2=strobe, 3=navigation, 4=cockpit, 5=landing 6=taxi
...
The SDK's (FS2004 and FSX) say there are 10 Types:
Switches (first element of each line):
1 – Beacon
2 – Strobe
3 – Navigation or Position
4 – Cockpit
5 – Landing
6 – Taxi
7 – Recognition
8 – Wing
9 – Logo
10 – Cabin

But I don't know the times coming on.

Regards

Horst

Re:

Posted: 10 Dec 2009, 19:20
by MIKE JG
This is for AI aircraft only, user aircraft may differ:

1 – Beacon-on any time engine is "on"
2 – Strobe-on from time aircraft is cleared onto the runway until it taxis clear of the runway upon landing
3 – Navigation or Position-"on 15 minutes prior to flight plan departure time to 15 minutes after arrival
4 – Cockpit -?
5 – Landing-on when aircraft is cleared for takeoff, stays on until A/C reaches 10,000ft. Comes back on at and below 10,000ft till taxiing clear of runway
6 – Taxi-on when aircraft begins taxi to runway or after landing when taxiing to spot
7 – Recognition-?
8 – Wing?
9 – Logo?
10 – Cabin?

The last four may not have a trigger for AI use.

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 14 Dec 2009, 00:46
by Sloeber
Recognition works....
I use that for Smoke Effects.... It comes on when the aircraft has had pushback...

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 14 Dec 2009, 01:01
by MIKE JG
Good to know, thanks!

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 09 Feb 2010, 04:14
by Rotorhead
Where does it show the position in of the Taxi/Landing lights. On most models like the Hornet, I want to replace the stock light with Shockwave lights, but I can't find an entry for the Taxi/Landing light anywhere:

[LIGHTS]
//Types: 1=beacon, 2=strobe, 3=navigation, 4=cockpit, 5=landing

light.0= 2, -12.30, -17.85, 0.90, fx_shockwave_navred ,
light.1= 2, -13.70, -13.80, 0.70, fx_shockwave_navred ,
light.2= 3, -4.10, -4.00, 1.45, fx_shockwave_navred ,
light.3= 2, -12.30, 17.80, 0.90, fx_shockwave_navgre ,
light.4= 2, -13.70, 13.72, 0.70, fx_shockwave_navgre ,
light.5= 3, -4.20, 4.00, 1.45, fx_shockwave_navgre ,
light.6 = 1, -23.77, -5.60, 7.95, fx_shockwave_beacon ,
light.7 = 1, -23.74, 5.60, 7.95, fx_shockwave_beacon ,
light.8 = 3, -27.52, 5.48, 9.10, fx_shockwave_navwhi ,
light.9 = 2, -28.25, -1.55, 0.90, fx_nbai_hornet_ab ,
light.10 = 2,-28.25, 1.55, 0.90, fx_nbai_hornet_ab ,

No type 5 light anywhere, but it still comes on? Anyone know the answer...

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 09 Feb 2010, 07:33
by Firebird
If there is no effect specified for a light and yet there is still a light showing then it has been hard coded into the model. If you haven't got a tool like ACM to help you then it can be a bit of a task to try and work out the exact position but once you do you can then add your own landing light entry to show at the same position.
You will still have the built in one but you will add the shockwave one.

I hope this makes sense.

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 30 Sep 2013, 08:57
by swp53
Hi, Rotrohead
I have not looked at adding the shockwave lights to the MRTT/KC-30A yet but as a starting point you could use the positions from the TFS A330-200 and adjust to suit as Firebird said.

light.10 = 5, 32, 11, -4, Fx_shockwave_landing_light_narrow
light.11 = 5, 32, -11, -4, Fx_shockwave_landing_light_narrow
light.12 = 6, 75, 1, -9, Fx_shockwave_landing_light_narrow
light.13 = 6, 75, -1, -9, Fx_shockwave_landing_light_narrow

longitudinal, lateral, vertical distance from reference datum
Steve

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 05 Apr 2016, 14:11
by asdro
Is there a chance to modify the taxi light cone in FS9? I want to make it much smaller, which would look much more realistic

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 05 Apr 2016, 14:45
by col1948
@asdro, are you talking about lights that look like balloons? I have those on a few aircraft, I hate them.

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 05 Apr 2016, 19:36
by Firebird
The default ones you might be able to play around with, if you know what you are doing, as they are effects and you can modify them. Maybe a simpler solution is to buy the shockwave lights package. They are very good.

However, if the effects are NOT mentioned in your aircraft.cfg then they are built in to the model and then you are stuck with them much in the same way that people moan about the modelled aircraft lights.

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 06 Apr 2016, 08:16
by col1948
@Firebird, Please accept my sincere apologies if you think I was moaning about the big balloon lights, I meant no offense.
I respect the work of the model makers, I think they do an outstanding job, I wish I had those skills.
I did find out one of the causes of the big nav lights is most cases the model is from fs2000/2002 and has been used in FS2004.
It can be remedied but from what I have read it is a bit of a job, so hardly worth the effort when most times an better newer model for FS2004 can be found.

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 06 Apr 2016, 09:37
by Firebird
No offense was taken.
I was merely explaining that if a modeller uses no built in lights and only uses entries in the aircraft.cfg then he can pretty much do anything you like and can get the lights quite accurate using effects.
If he uses built in lights in the mdl then he has no control over them. You can't assign an effect to them. The most often that you see these are when the model or part of the model moves around an axis. By this I mean lights on folding wings. The lights on the parts that fold have to be built in as the effect listed in the aircraft.cfg will stay static in relation to the models centre point. Landing lights on undercarriage are another case.
Where we tend to get this mostly in our helos as we use xml to simulate a vertical take off therefore we can't use effect lights, we have to use the built in lights that you can't change.

Going back to your original post, if there is an entry in the aircraft.cfg for taxi lights then you can change it for any light effect that you like. If there is no entry then you can't change it you and the modeller are stuck with default lights.

I hope that makes things clearer.

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 08 Apr 2016, 01:58
by pslinger
The article explaining how aircraft lights work is excellent and timely. I have been experimenting with Shockwave lights. The one thing I did notice in FSX is when I'm in the virtual cockpit and have either the taxi or landing lights on, some aircraft the lights will illuminate the taxiway or runway and in other aircraft they don't. Is there a file that is read to illuminate the runway or taxiway? If there is a file what do I need to do to link or activate the file? I'm new at this so my knowledge of the inner workings of FSX effects is limited. Thanks in advance.

Paul

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 17 Jul 2021, 21:41
by jgowing
I know this is an old thread, but there's always more to learn.

I wanted to use some xml code to place a pilot in the cockpit when the beacon light comes on. I think I'm right in saying that for this to work, the aircraft type in the cfg file cannot be 1, so, even for a piston engined aircraft, you might have to set the aircraft type as 5 (turboprop).

Now the naive question: do other parameters then have to match? In other words, does the piston engine section of the cfg have to be replaced by a turboprop one to match the selected aircraft type? I have a piston engined project that flew nicely until I added the pilot and therefore tweaked the cfg. Now it taxies out to the runway but doesn't take off. When I tried adding turboprop parameters it did cartwheels.

Jon G

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 18 Jul 2021, 05:57
by John Young
For the Shackleton, I used a turboprop engine configuration. It is far more flexible to have the beacon light enabled for the variety of xml I needed.

If you want to stick with a piston engine, try changing your xml code for the pilot to trigger from the "Nav" lights rather than the beacon.

John

Re: Aircraft lights Entries in the .CFG file: Explained

Posted: 18 Jul 2021, 07:15
by jgowing
Thanks Jon, I'll investigate further.

Jon G