PDA

View Full Version : AI editing



Smashing Time
May 21st, 2011, 07:02
Is there a simple tool to change or add your aircraft to be used as AI traffic when creating a flight?

:kilroy:

FAC257
May 21st, 2011, 09:01
The easiest way I have found for creating custom AI traffic is to use the TrafficDataBase Builder that comes as part of the FSX SDK. I started using it for FS9 and it still works the same way.

The info on the TDBB is towards the bottom of this info page.
http://msdn.microsoft.com/en-us/library/cc526965.aspx

As usual with the FSX SDK, when you read the instructions it makes things look a lot harder than it really is.

Basically I have an Excel spreadsheet that has all of the aircraft that I think I might want to see flying as AI. One of the columns is a simple Yes or No. The Yes or No means, "Yes" you might see it flying and "No" means it won't get used as AI.

I have an icon on my desktop for the aircraft spreadsheet and one that runs the SDK TrafficDataBaseBuilder. It takes only a couple of minutes to change the available AI aircraft and then about 90 seconds for the Builder to create the new AI traffic file.

It's such a quick and easy no-brainer that I'll sometimes change the entire AI fleet on each flight if I'm moving from region to region.

I've tried at least one or two AI traffic utilities, but keep coming back to the SDK method. Once you have it setup, its easier, faster and you have more control over what is going on.

I have also taken this basic concept a step farther and created an entirely seperate spreadsheet and icon that only routes military type aircraft to military bases.

I'll throw every new aircraft I get into the AI spreadsheet just for the heck of it. Then I'll wait until I catch one taking off and landing to make sure it acts correctly. If it doesn't, then it just get unlisted on the sheet.

One of the things I like about Carenado aircraft is that they almost all make really great looking AI traffic. I've pulled practically all of the default GA traffic out and have Carenados doing most of that work. I just recently had to pull the new Carenado 208 out of the lineup as it isn't balanced correctly for AI duty. Everytime I catch it sitting somewhere it's nose wheel is up in the air. :)

FAC

guzler
May 21st, 2011, 11:09
I use AI Flight Planner,

Very easy to use and also easy to modify existing flight plans and drop different aircraft in:

http://members.shaw.ca/aifp/

Smashing Time
May 21st, 2011, 11:25
Thanks gents, I'll check those out. :salute:

FAC257
May 21st, 2011, 13:56
I use both.

AI FlightPlanner is an excellent tool. I use it when I am trying to create a specific set of flight plans for a specific set of aircraft to and from specific airports.

I use the FSX SDK TDBB to create an entire new AI traffic file using all of the airports and all of the aircraft I have listed as a go.

The difference:
With AI FlightPlanner it takes me about 15-20 minutes to create the flight plan file for 6-8 aircraft between 2 airport destinations.

I just used AI FlightPlanner to check the last FSX SDK TDBB AI traffic file I created. The TDBB created 35,067 flight plans using 31 aircraft flying to every AI usable airport in FSX. That file only takes about 5 minutes to create using the SDK method. If I don't change the aircraft listing and just want new routes, it only takes about 90 seconds to create those 35,000 flight plans with a simple click of the icon.

FAC

Smashing Time
May 21st, 2011, 14:33
Thanks FAC :cool:

FAC257
May 21st, 2011, 15:23
The only two things you need for the TDBB method is a copy of Excel and the FSX SDK loaded on your system to set it up like I have it.

If need any help just yell. :)

FAC

PHo17
May 22nd, 2011, 00:28
The easiest way I have found for creating custom AI traffic is to use the TrafficDataBase Builder that comes as part of the FSX SDK. I started using it for FS9 and it still works the same way.

The info on the TDBB is towards the bottom of this info page.
http://msdn.microsoft.com/en-us/library/cc526965.aspx
...

FAC

Everything seems to be like in that info, but ... this may be a stupid question ... how do you launch those programs in dll files? I don't find any exe-file for that. I have never made any AI with SDKs.

Pekka

FAC257
May 22nd, 2011, 02:50
The actual .exe that you need to run is called "TrafficDatabaseBuilder.exe" and is located in the SDK "Environment Kit\Traffic Toolbox SDK" folder.

If you can't see the .exe on the end of the file name you may have the box "Hide extentions for known file types" in "Folder Options" checked. Uncheck that box and the ".exe" will be visible.

You can check that you have the right file by just double clicking on it to get it to run. Don't worry about having it run and changing anything. First off it probably won't get past the opening screen and even if it does the harmless file it creates will appear in the Traffic Toolbox SDK folder and will not be installed into FSX.

When you double click on the TrafficDatabaseBuilder.exe file you should get a pop-up screen that looks like this:
38528

It will probably only appear for a brief moment and then disappear. That is normal but at least you will know that you are working with the correct file.

The goal is to get it to open up and stay there while it generates the thousands of flight plans.

When that happens it will look like this:
38527

Once you have that file located and can at least get this pop-up box to show up for a second, you will know you are on the right track.

Before going any further, let me know if you can get this pop-up box to look at least like the first picture.

FAC

PHo17
May 22nd, 2011, 06:46
The actual .exe that you need to run is called
...

Once you have that file located and can at least get this pop-up box to show up for a second, you will know you are on the right track.

Before going any further, let me know if you can get this pop-up box to look at least like the first picture.

FAC

Well, some window will appear for a second or so, but what then? I don't see any change in that folder.

Pekka

FAC257
May 22nd, 2011, 07:16
The next step is to create an icon that tells the TrafficDatabaseBuilder.exe file where all the correct info is.

1. Right click on the TrafficDatabaseBuilder.exe and create a shortcut

2. Once you have the shortcut created then right click on the shortcut and from the menu choose "Properties".

3. On the Properties screen in the "Target:" box you need to copy and paste the data line below. The only thing that you should have to change are the locations before "SDK\Environment Kit\Traffic Toolbox SDK". The first location section needs to match where you have the SDK installed on your system.

-------------------------------

"D:\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

--------------------------------

Make sure you have the quotation mark at the very start of the line after you change things to match your location. Without that quotation mark the line won't work.

If you think you have the info correctly in the Target line hit the "Apply" button on the Properties menu and then close it.

From this point on you want to run the TrafficDatabaseBuilder.exe from the shortcut.

Try it out. The worst that can happen is that the same black box appears for a second and then disappears again. At this point it is usually that you have some part of your SDK location wrong in the Target line.

When you have it right, the black box will stay up and start cranking out flight plans.

When it's done you will find a new file called "traffic.bgl" in the Traffic Toolbox SDK folder.

Once you get that file to appear, the hard part is over.

If you find that it does not work and you can't get it to run correctly, copy and paste the data line that you came up with into your next post so I can take a look.

Getting the correct data line in the Target box is where I think a lot of folks give up. :)

--------------------------------
Added:
Here's a shot of the TrafficDatabaseBuilder.exe shortcut Properties box with that data line (blue) pasted in.

38542


FAC

PHo17
May 25th, 2011, 08:52
Thanks FAC! I made the shortcut as you told, but the window just splashes - nothing else happen - no files created.

My path is as follows:

"E:\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.e. the same as yours - only the drive letter is different.

Pekka

Edit:

Sorry that I haven't been able to answer earlier. I use FSX Acceleration SP2 and I let the SDK pagage installation make it's default path (above) on drive E:

FAC257
May 25th, 2011, 13:37
No problem, I was just standing by in case you had another question. :)

The first thing that comes to mind is at the very begining of the location you have in that line.

Double check that "FSX_SDK" is actually where your SDK installed into. That location is not a default path. That's a custom folder that I create for the SDK installation. Unless you also changed that during your installation, your info between the "E:\" and "SDK\Environment Kit" could be different.

One easy way to check is to open up that Properties screen of the icon that you created. Check the path info in the "Start in" box below the "Target:" box. The start of the path should be identical in both boxes.

The second thing I see that will definitely shut the process down is a missing space.

The part of your data line below is missing the space between ".dat" and "/AircraftTypes="

Yours:
Airports=fs10.Airports.dat/AircraftTypes=

Change to:
Airports=fs10.Airports.dat /AircraftTypes=

Double check your install path and put that space in and I think it might fire up for you.

FAC

PHo17
May 26th, 2011, 06:57
...
Double check that "FSX_SDK" is actually where your SDK installed into. That location is not a default path. That's a custom folder that I create for the SDK installation. Unless you also changed that during your installation, your info between the "E:\" and "SDK\Environment Kit" could be different.
...


Well, then I have accidentally choosed exactly the same name for the folder as you.



...
The second thing I see that will definitely shut the process down is a missing space.

The part of your data line below is missing the space between ".dat" and "/AircraftTypes="

Yours:
Airports=fs10.Airports.dat/AircraftTypes=

Change to:
Airports=fs10.Airports.dat /AircraftTypes=

Double check your install path and put that space in and I think it might fire up for you.

FACThat was it! "One space is so little step for a man's fingers, but very much for a program" :icon_lol:

Now it works.

Thanks FAC!

Pekka

PHo17
May 26th, 2011, 08:08
More stupid questions: How I can get those other traffic tools (Traffic Settings, Traffic Explorer, Traffic Map, and Dump Airport List) run?

Pekka

Dave Torkington
May 26th, 2011, 09:12
More stupid questions: How I can get those other traffic tools (Traffic Settings, Traffic Explorer, Traffic Map, and Dump Airport List) run?

Pekka

Hi Pekka,

There's no such thing as a stupid question [so I keep telling myself] :icon_lol:

You can get the other tools activated easily, provided your SDK is configured correctly.

Here's a link to the FSDeveloper site Wiki for FSDeveloper SDK Installation (http://www.fsdeveloper.com/wiki/index.php?title=SDK_Installation_%28FSX%29).

Please read carefully to check that your SDK has been installed correctly. If so, then go to the 'Troubleshooting' section [link is at the botttom].

Hope you get it working :salute:

Dave.

FAC257
May 26th, 2011, 15:28
More stupid questions: How I can get those other traffic tools (Traffic Settings, Traffic Explorer, Traffic Map, and Dump Airport List) run?

Pekka

Dave is right, there are no stupid questions. :)

That's great that you got the icon link to start running. Now you are ready to start adding and controling the actual aircraft that are flying.

The traffic.bgl file that you hopefully created when you got the program to work is just the existing default FSX aircraft that you are already seeing. It's another version of the trafficAircraft.bgl file that is in your FSX\Scenery\World\Scenery folder.

Before doing anything else I would suggest making a copy of your original trafficAircraft.bgl file just in case. That way you can play around with the new file you created and not have to worry about a disaster. :)

If you get to the point where you want to start playing around with the aircraft in that file, just let me know.

Getting the other programs that you mentioned to work is very easy as long as your FSX SDK is installed correctly. Take a look at the info Dave linked to as a first step. Most of the time, the problem is having the installation path correctly entered in the dll.xml file.

You should already have the correct path info to work with when you got that AI Traffic icon to run. I'm guessing your FSX SDK is probably already installed correctly if you got this first part to work. :)

FAC

FAC257
May 26th, 2011, 15:51
Here's a shot of the next step. The fun part. :)

38845

This is the batch of aircraft I have flying at the moment.

FAC

PHo17
May 27th, 2011, 09:08
Thank you all for help!

Pekka