View Full Version : Suppress the users flight from AI
04-24-2006, 05:47 PM
Dear Microsoft developers,
I know I'm very late on this one, but eventually this small change can still make it into FSX.
In FS9, when someone has real world or Virtual Airline AI traffic schedules installed and flies one of the schedules, the AI plane of the same flight is still generated, resulting in 2 aircraft with the same callsign. Please add to the AI logic to suppress or remove an AI aircraft if its atc_airline and flight number are identical to the current user aircraft setting.
04-25-2006, 12:05 AM
So this would mean:
FS would have to recongnize that you are flying the same flight BEFORE you start FS. Why? Because all traffic bgls are loaded during the start of FS.
Then the traffic file would need to be decompiled.
Then the one plan would need to be suppressed.
Then the traffic file would need to be recompiled.
How about when the flight was finished? Do this all again to re-activate the flight?
Wouldn't be easier to change the callsign of your plane from the aircraft screen?
Hope this helps,
http://sales.hifisim.com/pub-download/asv6-banner-development.jpg http://sales.hifisim.com/pub-download/asv6-banner-proud.jpg [hr][link:www.jdtllc.com|http://www.jdtllc.com/images/rcv4bannersupporter.jpg]
04-25-2006, 01:08 AM
I must agree with Jimbo here.
Flight time: 2 hours in a Cessna 172, registration ZK-ETU at Nelson Aero Club in New Zealand
04-25-2006, 10:31 AM
How come that I can open the traffic toolbox and "zap" an AI aircraft I don't like without decompiling, editing and recompiling the traffic.bgl? I can do this only while FS9 is running. Why? Because the traffic toolbox is communicating with the running simulation.
Since I can do this interactively by looking at the ttbox aircraf list, finding my airline and flight number (which are also known to the simulation), one could write an add-on that does this, interacting with the simulator via the same API the ttbox does, doing some string comparision and calling the delete-aircraft method. I am sure this functionality could easily be integrated into add-ons like AISmooth or AI-Separation. Existing utilities which would be entirely impossible if tampering with AI would require the hoops you want to jump. Downside of this implementation is that the AI would first be generated by the simulation, then a second later or so deleted by the add-on. So doing it by suppression inside the simulation would be the preferred way.
Don't make it more complicated than it is.
04-26-2006, 12:24 AM
Indeed, it would certainly be possible to do precisely what you suggest, if there were such an API... :P
04-26-2006, 03:55 AM
>Indeed, it would certainly be possible to do precisely what
>you suggest, if there were such an API... :P
If an external program or dynamically linked add-on (like AISmooth, AI-Separation or the traffic toolbox) can produce a list of existing AI aircraft, delete an AI aircraft or modify its behaviour, then there is an existing API to do that.
I must be really missing something here. Are you telling me no such API exists, despite the fact that existing applications use it?
And even if ... lets assume for a moment that said API does not exist. The traffic toolbox does display a list of AI aircraft including their atc_airline and flight number. This data is coming from somewhere inside the simulation. A simple string matching algorithm can find a conflicting AI aircraft since the users atc_airline and flight number are known to the simulation too. You don't think that the simulation itself could at this point invoke the code, that is called by the traffic toolbox's delete functionality? Which gets us back to the non-existent API, the traffic toolbox is apparently using.
Want to continue maintaining there is no such API? I didn't ask for a documented API. I asked to implement the functionality right inside the simulation. You come across like someone who knows about interfacing with FS. I have a Masters in CS and earn my living by coding database core engine crap in C, so you can take the high road explaining to me why you think my wish is so difficult to implement.
04-26-2006, 07:30 AM
He's right about TrafficToolbox, you can see the list of planes and delete one, I've done it before with annoying little Cessna's that get in my way when I'm trying to land.
Nothing worse than an AI Cessna doing bump'n'goes given permission to be in front of you going so slow he's behind you when you're in a Jet at 120+ KIAS.
04-26-2006, 02:45 PM
Yes, this would be very doable in FSX I'm sure. However, having an AI plane "wink out" when you load a certain plane (or change your flight number) might generate some support calls to MS, something I assume they avoid.
I like the idea, though. I fly using real timetables, so I often have to delete the same flight in the AI traffic.
04-26-2006, 03:05 PM
>Want to continue maintaining there is no such API? I didn't
>ask for a documented API. I asked to implement the
>functionality right inside the simulation. You come across
>like someone who knows about interfacing with FS. I have a
>Masters in CS and earn my living by coding database core
>engine crap in C, so you can take the high road explaining to
>me why you think my wish is so difficult to implement.
Jan, you are working under several false assumptions.
First, since you mention 'bona fides,' I'll add here that I too have an MS in CompSci from the University of Florida, Gainesville. In fact, I taught undergraduate courses there during my post-grad years. Now that I am retired, I earn my living doing 3d modeling and gauges/systems programming for FS (see my signature block). I daresay that it's indeed possible that I know a thing or two about "interfacing with FS."
Secondly, the feature set for FSX is already closed. Your suggestion is an excellent one, and I for one am with you 100% on this issue. I'll use all of what little influence I may have to make sure that it is added to the next iteration.
Finally, the add-on utilities you mention (such as AI-Smooth) only work because the author took the time to ascertain through hours of patient trial-and-error the specific pointers being used. This is precisely what Pete Dawson has done with FSUIPC. Each iteration of FS has required going back to the drawing board to spend yet more hours determining the new pointers.
There may well be some form of "API" that is used by the MS/FS "Traffic Toolbox," but if so it is strictly for use by the folks at ACES. However, I sincerely doubt that they would invest time to create an API for internal use only. That would be silly, since they already know the pointers required! ;) In fact, the "Traffic Toolbox" was originally created as a "tool" for their own development efforts, and was only released to the public as an afterthought.
The question should be, would I like to see AI included in the SDK? Of course! I'd like to see a lot more exposed in the SDK. At the moment, several crucial things are missing (or simply don't work!) from the GPS interface. For example, it is impossible to load a flightplan programmatically from within a gauge. Between myself and two of my fellow programmers, we've managed to almost fully exploit the sim's gps.dll in C++/GDI+, but are having to spend an inordinate amount of time implementing the last few features necessary to have a fully functional FMS/FMC/GPS that uses the internal FS database, instead of relying on a 'custom,' external database.
When I visited ACES some months ago, I learned that much of the stuff in the fs9gauges.h file was left in place more by accident than design. They added it only because it was needed for them to program the gps.dll, trafficinfo.dll and a handful of other modules that were needed to support the default, XML-based GPS. They never envisioned anyone using the "leftbehind functions" to build a C++ GPS! ;)
After long discussions between myself and the Lead Panel Programmer at ACES (Susan A.*), I sincerely hope that the forthcoming SDKs will feature a more robust, richly-featured interface, but also am pragmatic enough to realize that it isn't likely to happen this time around... :-(
*Bless Susan's heart for showing me how I could use ConvertStringToProperty to obtain the pointer(s) needed, since they will definitely be changing in FSX.
04-26-2006, 05:40 PM
I didn't mean to be rude.
I was wondering if the documented FSUIPC functionality to delete AI aircraft by writing the TCAS_DATA with an empty atc id actually would do the trick or if that is only meant for traffic info from external sources, formerly created that way. I don't have a full FSUIPC license and buying one just to find out that it eventually doesn't work is not what I intend to do.
Unfortunately the trafficinfo.dll only provides methods to query the traffic. It would be cool to write a gauge that silently slaughters the AI clones. I played around with gauge programming in C (nothing fancy, just enought to know how these widgets are done). And I would be able to get it that far that I have the FS internal AI aircraft ID ... and there I'm stuck. If only I could figure out how the ttbox actually does the delete ;-)
04-26-2006, 07:30 PM
I forget which one it is, but one of the SDKs for FS-2004, when you download and install it, it puts a new menu in the program, where you can launch an AI map. Then you switch to the map, you can select a plane and delete it. Probably the AI SDK but I don't know for sure off the top of my head.
04-26-2006, 07:56 PM
THAT is the traffic toolbox SDK I am talking about the whole time. Not only can you delete an AI aircraft with the map, there is also a list form that tells you the status of every aircraft, with a double click you can zoom in, you can even send it events to let it change course and the like. And of course, you can delete it from there as well.
All I need to know is how does the traffic toolbox do that delete?
04-27-2006, 02:49 PM
>I didn't mean to be rude.
>I was wondering if the documented FSUIPC functionality to
>delete AI aircraft by writing the TCAS_DATA with an empty atc
>id actually would do the trick or if that is only meant for
>traffic info from external sources, formerly created that way.
>I don't have a full FSUIPC license and buying one just to find
>out that it eventually doesn't work is not what I intend to
From my read of the FSUIPC SDK, this would only "delete" externally supplied AI aircraft, not the ones internal to the sim's AI engine.
04-27-2006, 02:50 PM
>THAT is the traffic toolbox SDK I am talking about the whole
>time. Not only can you delete an AI aircraft with the map,
>there is also a list form that tells you the status of every
>aircraft, with a double click you can zoom in, you can even
>send it events to let it change course and the like. And of
>course, you can delete it from there as well.
Moreover, you can actually "take command" of the AI aircraft and "fly it" as though it were your own... ;)
04-27-2006, 03:33 PM
How do you do all this fancy stuff with the Toolbox? All I know how to do is bring up the map...I guess I'll have to sit down and RTFM...
>>this would only "delete" externally supplied AI aircraft, not the ones internal to the sim's AI engine.
But isn't all AI traffic generated by the traffic bgl files? I didn't think any of it was truly internal to the AI engine.
04-27-2006, 04:58 PM
Put FS into window mode, tools->traffic->explorer (I think) and then right click on any AI aircraft.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.