Author Topic: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)  (Read 11550 times)

0 Members and 1 Guest are viewing this topic.

Offline VAGVAG

  • Senior Captain
  • ******
  • Posts: 905
Here goes a rough guide. I don't have time to support this topic, I may answer some questions. If you follow this guide, do it at your own risk, or else don't. Wait for OCI.

Note that the planes don't look good at night. I manipulated models and lightmaps (I didn't have permission, I did it for my own use, I will not share) to reduce the effect.

Firstly you need to deactivate default traffic. Go here:
(your msfs folder)\Official\OneStore\fs-base-ai-traffic. Open layout.json with notepad and delete this

    {
      "path": "scenery/world/traffic/trafficAircraft.bgl",
      "size": 38992829,
      "date": 132449093750000000
    },



I use a small program called plane converter.
https://github.com/klasbj/planeconverter
According to the .readme :
 “This application will take an old Microsoft Flight Simulator X (FSX) and convert the file structure to the newer Microsoft Flight Simulator 2020 (MSFS) format
•   Note: currently this does not convert any specific files, just creates and updates the MSFS's JSON files to read the older aircraft files. You likely will need to update the textures and gauges to make the plane functional.”

This program is in raw format you need to compile it yourself. I used visual studio. Perhaps there are other programs that can do it. FS developer site is your friend.

Ok, now the structure.
Hint: check how core files are structured by Microsoft/Asobo and do the same. That’s what I did, plus I did some mixing with the OCI file structure. It works fine.
My layout (you can give another name, check pic 1):
D:\MSFS\Community\AI TRAFFIC
Inside ai traffic:
D:\MSFS\Community\AI TRAFFIC\Effects(old effect files don’t seem to work unfortunately)
D:\MSFS\Community\AI TRAFFIC\Scenery\WORLD\TRAFFIC (your good old .bgl traffic files in fsx format)
D:\MSFS\Community\AI TRAFFIC\SimObjects\Airplanes (fsx models only or native gltf - fs9 and p3d models:CTD)
D:\MSFS\Community\AI TRAFFIC\SimObjects\Texture (common textures like props and lightmaps)
D:\MSFS\Community\AI TRAFFIC\Sound\AI (if you have custom ai sounds)
layout.json (lists every single file inside my ai traffic folder and needs updating everytime you change something)
It is structured like this:
{
  "content": [
    {
      "path": "manifest.json",
      "size": 291,
      "date": 132517656000000000
    },
    {
      "path": "Effects/fx_f16_navgrem.fx",
      "size": 4638,
      "date": 132517656000000000
    },
    {
      "path": "Effects/fx_f16_navredm.fx",
      "size": 4637,
      "date": 132517656000000000
    },
    {
      "path": "Effects/fx_f16_navwhih.fx",
      "size": 3057,
      "date": 132517656000000000
    },
    {
      "path": "Effects/fx_FAIB_A320S_beacon.fx",
      "size": 4676,
      "date": 132517656000000000
    },
    {
      "path": "Effects/fx_FAIB_A320S_navgre.fx",
      "size": 5892,
      "date": 132517656000000000
    },
    {
      "path": "Effects/fx_FAIB_A320S_navred.fx",
      "size": 5893,
      "date": 132517656000000000
    },
    {
      "path": "Effects/fx_FAIB_A320S_navwhi.fx",
      "size": 4712,
      "date": 132517656000000000
    },
    {
      "path": "Effects/fx_FAIB_A320S_strobe.fx",
      "size": 4563,
      "date": 132517656000000000
    },
.
.
.
and so on..

manifest.json(this is what is read by the sim)
The structure is this:
{
  "dependencies": [],
  "content_type": "CORE",
  "title": "AI Traffic",
  "manufacturer": "",
  "creator": "",
  "package_version": "0.1.0",
  "minimum_game_version": "1.9.5",
  "release_notes": {
    "neutral": {
      "LastUpdate": "",
      "OlderHistory": ""
    }
  }
}
I keep the layout updated using planeconverter. It does that automatically.

My airplanes folder looks like this: check pic2 all are fsx models, few conversions are done by me for my personal use and I am not allowed to share them (don’t even ask) , the others by Jay, Graham and the rest-sorry for not mentioning their names, and others by the modellers themselves. The old aia models for fsx are available at avsim.

In pic3 is a sample of an aircraft folder (aia erj190-lineage 1000).  Yes you need one model folder per texture folder. Imagine doing this for the faib 737-800. For fsx models every single folder should contain the model and the model.cfg. For native msfs models (gltf), the model.cfg should be enough-still experimenting.

In pic4 is a sample of a texture folder. Every texture has a corresponding .json file. This contains information like this:

{"Version":2,"SourceFileDate":132494328000000000,"Flags":["FL_BITMAP_COMPRESSION","FL_BITMAP_MIPMAP"],"HasTransp":true}

The texture.cfg points to the common texture folder
for e.g.

[fltsim]
fallback.1=.\.\.\texture

Everytime you change something inside your ai traffic folder you need to change layout.json (pic1). Use planeconverter, or another program if you don't know how to compile it, or wait for oci (recommended).OCI will do for you in a few hours what took me days to do.
« Last Edit: December 08, 2020, 10:37:19 AM by VAGVAG »
My repaints here: https://flyingcarpet75.com/

Offline unc1rlm

  • Command Captain
  • *******
  • Posts: 1319
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #1 on: December 08, 2020, 09:25:02 AM »
Thanks VAGVAG: One question..in the texture folder..what creates the dds.json file..? MSFSLayoutGenerator-master?

Thanks for your hard work!!

Stay Safe!!

BobM.

Offline VAGVAG

  • Senior Captain
  • ******
  • Posts: 905
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #2 on: December 08, 2020, 10:24:20 AM »
Thanks VAGVAG: One question..in the texture folder..what creates the dds.json file..? MSFSLayoutGenerator-master?

Thanks for your hard work!!

Stay Safe!!

BobM.

I use planeconverter. Generates every .json file automatically. You have to insert every airplane (e.g faib-737-800) folder seperately  in the program. Then you take the extracted updated aircraft folder, you place it inside your Airplanes folder, and then update the whole layout.json of your ai traffic with the same program as noted above. That is why an automated procedure like OCI is needed. Maybe there are other more efficient programs, that skip some stages of this procedure. I have no intention to search. Already this is too much for me. Mainting AI current, is a tedious task, as it is now. Maybe in the future, if the sdk is updated to a final form.

edit. ok, if I have to add one texture, I just copy the json files from another texture folder. It is likely that for fsx models the json files are not needed. Still investigating this, but for native gltf, they should be mandatory. In any case you still have to manually add a model folder corresponding to your new texture, and change every single fltsim.x input in your aircraft.cfg , and update your ai traffic layout.json. 

edit no 2: planeconverter is not a complete program. The maker provides only the core files. You need visual studio to compile the files and make a ready-to-use program.
« Last Edit: December 08, 2020, 02:44:55 PM by VAGVAG »
My repaints here: https://flyingcarpet75.com/

Offline mottoth

  • Command Captain
  • *******
  • Posts: 1049
  • Amadeus guru
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #3 on: December 08, 2020, 11:45:47 AM »
Many thanks for taking the time to put this together.
Regards, Yohann.

Offline VAGVAG

  • Senior Captain
  • ******
  • Posts: 905
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #4 on: December 08, 2020, 02:52:46 PM »
You are welcome Yohann. By the way check the following:

https://www.fsdeveloper.com/forum/threads/how-to-insert-a-fsx-aircraft-in-msfs.448639/

It provides information on how to compile planeconverter.

This is also useful:

https://forums.flightsimulator.com/t/fsx-import-showcase/165910

This program may also be useful:
MSFS Legacy Importer at nexusmods:

https://www.nexusmods.com/microsoftflightsimulator/mods/117

« Last Edit: December 08, 2020, 02:54:53 PM by VAGVAG »
My repaints here: https://flyingcarpet75.com/

Offline mottoth

  • Command Captain
  • *******
  • Posts: 1049
  • Amadeus guru
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #5 on: December 08, 2020, 04:54:09 PM »
Something's unclear for me about Aircraft folders.
Should I set them up as this:



or as that, with extra sub folders:
Regards, Yohann.

Offline Jan Martin

  • AIG Modeller
  • Turbine Captain
  • ****
  • Posts: 653
  • FS Addon Designer
    • Jan's Websites
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #6 on: December 08, 2020, 06:03:49 PM »
Ok, I made a rough tutorial, because I don't like people to think that information is being withheld. No conspiracies here.
Thank you very much VAGVAG, it is highly appreciated!
 
Now I still have to find out what to do with the traffic BGL files; and I'm wondering whether I alsco could use FS2004 BGL's? I'm such a desperated dreamer . . .

Offline Kaiii3

  • AIG Technic
  • Command Captain
  • *****
  • Posts: 6327
    • Kai's AFD Studio
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #7 on: December 08, 2020, 06:18:52 PM »
Ok, I made a rough tutorial, because I don't like people to think that information is being withheld. No conspiracies here.
Thank you very much VAGVAG, it is highly appreciated!
 
Now I still have to find out what to do with the traffic BGL files; and I'm wondering whether I alsco could use FS2004 BGL's? I'm such a desperated dreamer . . .

convert them to FSX format and you can use them

Offline VAGVAG

  • Senior Captain
  • ******
  • Posts: 905
My repaints here: https://flyingcarpet75.com/

Offline Jan Martin

  • AIG Modeller
  • Turbine Captain
  • ****
  • Posts: 653
  • FS Addon Designer
    • Jan's Websites
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #9 on: December 08, 2020, 07:13:12 PM »
convert them to FSX format and you can use them
OK, thank you, will try it

Offline unc1rlm

  • Command Captain
  • *******
  • Posts: 1319
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #10 on: December 08, 2020, 10:23:01 PM »
Thanks for the update..will try your method.. learning... can you post an expanded view of say one aircraft in your Community folder..simobject on down to see whats in the final folder.   Just have never seen the dds.json anywhere in my stuff....I tried the planeconverter but I could never get the exe in the bin folder to show up to build....been using the msfs legacy program but the texture converter doesn't work so I use texture Manager...

have a great day..be safe!!!! and Wear Your Mask :)

BobM.

Offline VAGVAG

  • Senior Captain
  • ******
  • Posts: 905
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #11 on: December 09, 2020, 09:14:08 AM »
Thanks for the update..will try your method.. learning.. can you post an expanded view of say one aircraft in your Community folder..simobject on down to see whats in the final folder.   Just have never seen the dds.json anywhere in my stuff...I tried the planeconverter but I could never get the exe in the bin folder to show up to build...been using the msfs legacy program but the texture converter doesn't work so I use texture Manager..

have a great day..be safe!!!! and Wear Your Mask :)

BobM.


Check initial post

D:\MSFS\Community\AI TRAFFIC\SimObjects\Airplanes"
In pic4 is a sample of a texture folder. Every texture has a corresponding .json file. This contains information like this:
{"Version":2,"SourceFileDate":132494328000000000,"Flags":["FL_BITMAP_COMPRESSION","FL_BITMAP_MIPMAP"],"HasTransp":true}

Then check pictures 2 and 3 at the initial post, and check my previous answer to mottoth, his picture in particular.

As far as planeconverter, if you managed to compile it, the .exe file is inside "netcoreap3.1" folder. But you could try without the .json files inside the texture folders. It is likely that they are not needed if you have fsx models.

I posted some links a couple of posts above (reply #4). Maybe you will find something useful.

Have a nice day!
My repaints here: https://flyingcarpet75.com/

Offline unc1rlm

  • Command Captain
  • *******
  • Posts: 1319
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #12 on: December 09, 2020, 12:12:51 PM »
Thanks VAGVAG.. After using planeconverter...Because this is an ai and not a flyable plane...the aircraft cfg is left as it has always looked but using msfs legacy converter..it converts the aircraft cfg to the new format...if it is left as the default fsx style..will msfs see it or no?  AIFP see the plane model ok.

Can you post a pic of whats in the folder simobjects showing 'system...ai cfg, aircraft cfg etc....all I have is this..is that right?   Pic 1 is planeconverter in community and Pic 2 is MSFS Legacy installer in Community.. For an ai only for MSFS to see it...which one..make sense?

BobM.

UPDATE: I found the exe...there is a folder in the bin called "release" and it was in there and not in the debug folder as shown in installation stuff...will try that and see what happens>>>>
It also created the texture...json file...let me see what happens now..
« Last Edit: December 09, 2020, 04:55:21 PM by unc1rlm »

Offline VAGVAG

  • Senior Captain
  • ******
  • Posts: 905
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #13 on: December 09, 2020, 07:17:02 PM »
In my opinion it is best if you leave the aircraft.cfg as it is if you use fsx models. It will work if you change to the new format (with multiple cfg files) even if you use fsx models, but I think you have to delete "sim=." from every [fltsim.x] input. I will check and report because I am not 100% sure. Maybe this will change the ai behaviour, which right now is awful.  If you check the pictures in my first post you can see the structure inside erj-190-lineage-1000. Here is a sample of a [fltsim.] input

[fltsim.6]
title=Al Jaber Aviation EMB-190 Lineage 1000 A6-AJH
sim=aia_emb190
model=GAJ-Al Jaber Aviation_A6-AJH
texture=GAJ-Al Jaber Aviation_A6-AJH
atc_airline=Al Jaber Aviation
ui_manufacturer=Embraer
ui_type=ERJ-190 Lineage 1000
ui_variation=Al Jaber Aviation
isAirTraffic=1
isUserSelectable=0
icao_airline=BBJ
atc_parking_codes=BBJ
atc_parking_types=GATE
My repaints here: https://flyingcarpet75.com/

Offline unc1rlm

  • Command Captain
  • *******
  • Posts: 1319
Re: AI Traffic in MSFS (Some kind of rough tutorial - the risk is all yours)
« Reply #14 on: December 11, 2020, 12:44:30 PM »
Ok..Need some help here.. I have a 757-200.. I have 4 airlines I am using AAL/SWA/DAL/UAL....test site Atlanta.. I have copied the appropriate model for that texture file and renamed the model accordingly....I have updated the layout jsn however when I go into AIFP to substitute the aircraft..I only have United showing in the selection window....is there anything in the ai cfg (trial3) that is wrong..Something with the title name/sim name ..using an air file..FSX model..

maybe this will help me and someone else..lol...

Thanks,
BobM.