PDA

View Full Version : Random Military AI Using The FSX-SDK



FAC257
February 1st, 2009, 14:05
Way back since my early FS9 days I've had this theory that the MS TrafficToolBox-SDK could be used to generate random military air traffic that only flew between military air bases.

In the past I've always used the manually created flight plan method to get military traffic up and running. It's a pain in the butt anymore. These days I want to spend as much time as possible flying and as little time as possible screwing around with non-flying flightsim activities.

Just got around to finally putting the idea together. Can't believe it took me this long to finally see if it works. :173go1:

Normally the TTB.exe works off the following basic formula to create a random AI traffic:
fs10.Airports.dat + fs10.AircraftTypes.csv + countries_regions.csv = traffic.bgl

The idea was to create another formula:
fs10.AirportsMilitary.dat + fs10.AircraftTypesMilitary.csv + countries_regions.csv = trafficMilitary.bgl

For the new "fs10.Airports.dat" file I created a new blank file using Notepad and only added the military bases I wanted the aircraft to operate out of. For now, to start with I currently ony have Andrews AFB and MacDill AFB active. Both of which I fly out of regularly and have custom DL'd AFCADS for.

You can copy and paste the info you need for the military bases directly from the original default "fs10.Airports.dat ". The only thing you have to do to make them usable by AI traffic is to add the parking spot list. I used ADE to pull this info out of the airport scenery .bgl file.

The new "military base only" file is named "fs10.AirportsMilitary.dat "

For the new "fs10.AircraftTypes.csv" file I made a copy of the original file and deleted the entire aircraft listing. I kept the info stuff at the top as it makes it easier to add new aircraft when you have all the parameter info handy. This file will only list the military aircraft that are to be AI available. For now to keep it simple I'm using my various USAF CS C-130 fleet and Lionheart's Epic LT in USAF paint.

The new military aircraft fleet file is named "fs10.AircraftTypesMilitary.csv "

I normally generate a completely new random commercial and GA AI traffic file everytime I fly into a new region or when I add a new aircraft to the mix. To make this easier I've got an icon on the desktop that is aimed at the TrafficDatabaseBuilder.exe

The command line for that icon is:
"C:\FSX_SDK\SDK\Environment Kit\Traffic Toolbox SDK\TrafficDatabaseBuilder.exe" /Airports=fs10.Airports.dat /AircraftTypes=fs10.AircraftTypes.csv /Countries=countries_regions.csv /Output=traffic.bgl

I just created a second icon for generating the new random military AI traffic and edited the command line to this:
"C:\FSX_SDK\SDK\Environment Kit\Traffic Toolbox SDK\TrafficDatabaseBuilder.exe" /Airports=fs10.AirportsMilitary.dat /AircraftTypes=fs10.AircraftTypesMilitary.csv /Countries=countries_regions.csv /Output=trafficMiltary.bgl

Using the two icon system I can generate new Commercial/GA or new random Miltitary AI traffic almost instantly with a click of a button. The Commercial/GA file takes about a minute or so to generate. The new Military AI file took about a billionth of a second with only two airbases and about ten aircraft to calculate.

The first time I clicked the Military icon the generation screen came and went so fast I thought the whole plan had failed. :)

With the new miltary oriented .csv, .dat and TTB.exe icon all up and running it's a snap to add new aircraft and airbases.

BTW
After I finish getting all of the Fla miltary base network up and running the next step is go back and repeat this same formula for Vintage Military. That way I could go back and forth between having the airbase network flying only modern or only vintage military aircraft with the push of a button.

Here's a few non-fancy pics of KADW and KMCF with the new AI file running.

JT8D-9A
February 1st, 2009, 14:14
That's a very cool hint. Thanks for sharing it!

VCN-1
February 1st, 2009, 14:41
That is great, I always wanted to populate the bases and was never interested in filling the skies with airliners.

VCN-1