• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS20 How to insert a FSX aircraft in MSFS

Lagaffe

Resource contributor
Messages
986
Country
france
Reference: https://forums.flightsimulator.com/t/fsx-import-showcase/165910

Prerequisite
You need to know how to use an IDE and compile under VS 2019, it's essential!
I advise you to read the SDK at least once to understand the philosophy of this new simulator. This reading allows you to better understand how the conversions work.

You must download:
- the sources of the program PlaneConverter written by klasbj ( source file of the converter )
- a Visual Studio 2019, the personal version is very suitable
- .NET Core 3.1 SDK on https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=netcore31 to choose according to your x86 or x64 architecture

To compile PlaneConverter, start the IDE, load the project data (the file *.sln from the downloaded sources) and run a Build to generate both the executable and the standalone package.
Sorry but the author doesn't provide a binary, just the sources. I don't feel I have the right to distribute his generated package.
On the other hand in the klasbj's sources, the path where is generated the plane converted is hard-coded : D:\MSFS\Packages\Community so if it does not correspond to your installation, you will have to modify it before the convert step.
The generated package is a directory with the 4 or 5 essential files, it doesn't need to be installed, it's a portable application, just place it where you want and launch the executable.

For a conversion, first choose the aircraft to be packaged: a piston FSX aircraft with 2 MDLs (outside and inside model 3D) if possible with DDS textures, 3D gauges only and no DLL.
This is the state of my knowledge at the moment, it may evolve.

So we copy the directory of this plane in a temporary directory, and remove the superfluous if necessary. Only the essential is kept.
A good test that works for sure is the P-51D Racer from FSX. So if it doesn't work for you, it's a pale one! so check its copy again.
This said, it is a Microsoft plane so it cannot be re-distributed. You can only distribute your own planes or those of people who gave you the green light!

For the P-51, we keep:
- the header directory named P51_Racer
|_ the file aircraft.cfg and the air file match, it's all at the first level
|_ the Model directory with the 2 MDLs and the model.cfg
|_ the Panel directory with the panel.cfg and the CAB files (*)
|_ the Sound directory with wav and sound.cfg
|_ the texture directory with the DDS files and the texture.cfg if there is one
|_ the Texture.1 directory with the DDS files and the texture.cfg if there is one
and the aircraft.cfg file is cleaned of textures that will not be used (Texture.2, etc).
The goal is to make an aircraft reduced to a livery and without embellishments. The soundai directory is not kept!

Once the tree structure is cleaned up, we launch the PlaneConverter executable:
The window that appears has two tabs, each with a button to be used.

- A first tab Update layout.json to generate the layout.json file after filling in the input field with the full path to your working directory:
e.g. T:\P51_Racer

- A second tab Copy and package SimObject to generate the final package and fill the intermediate json files.
In this one, there are several fields to fill:
- Source SimObject the path of your source directory
- Target: the path in which you want to have the generated package (it is now auto-filled with D:\MSFS\Packages\Community)
- Package name : a description of the gender package
- Title: a title like P51D Racer
- Manufacturer : Microsoft in this case but you can put whatever you want
- Creator: here I think it's explicit, your name
- Version: Version to follow the evolutions ....
Finally we click on Convert and we wait a little ... about thirty seconds if the plane is not too big.

In the text fields, avoid _ and accents, no frills, no frills in the text fields.

You can now retrieve a directory in D:\MSFS\Packages\Community that will contain everything you need.
This directory under Community will have to be copied into your MSFS Community directory, then you will have to test it.

Better keep the work tree (the one in T:\) to be able to come back and modify in case of problem and repeat the test.

This program automatically generates the manifest.json and layout.json files (see SDK).
For the scenes, the generated tree structure is not the same but I think we can make a fork and by modifying the sources, we should be able to make a SceneryConverter ...
I will see that in the coming days.

I remind, this program is the work of klasbj from the forum https://forums.flightsimulator.com and not mine.
It is only a user manual not a tutorial, there are still things to improve, even defects but in 1 afternoon it allowed me to generate 8 planes of mine which can fly under MSFS.

Good luck !
 
For sceneries, and to create automaticly layout.json file, I have write this little script Python to make the job.
I can run with Python 3.8.5. Tested on my last airplan ported from FSX.
Just copy and past in a text file, rename the extension in *.py and run it with IDLE (Python Editor)

import os
import json
import sys

def check_prerequisites():
if sys.version_info[0] < 3 or sys.version_info[1] < 6:
raise Exception("Must be using Python 3.6 or later")

def build_layout(project_dir):
layout_entries = []
for root, _, files in os.walk(project_dir):
for filename in files:
filepath = os.path.join(root, filename)
if not filepath.endswith(".json") and not filepath.endswith(".py"):
rel_dir = os.path.relpath(root)
rel_file = str(os.path.join(rel_dir, filename))
if rel_file[0] == '.':
rel_file = rel_file[2:]
print(" -- Processing " + rel_file)
entry = {}
entry["path"] = rel_file.replace('\\', '/')
entry["size"] = os.path.getsize(filepath)
entry["date"] = "132402817714110148"
layout_entries.append(entry)
layout_entries.sort(key=lambda e: e["path"])
return layout_entries

if __name__ == "__main__":
check_prerequisites()
cwd = os.getcwd()
layout_content = build_layout(cwd)
layout_json = {
"content": layout_content
}
with open("layout.json", "w") as outfile:
json.dump(layout_json, outfile, indent=4)
 
Since patch 1.8.3.0, it was not possible to switch to the VC of an FSX aircraft that has been ported to MSFS. Flying with the outside model is not a problem as long as you do not try to switch into the cockpit.

If you are able to edit .mdl files in ModelConverterX, you can remove all mouse rectangle assignments from the interior model.
Using the Object Heirarchy view, highlighting all of the elements, and set the Mouse Rectangle field to None.
Then export it back out, delete any related CVT folder that may be present, and you should be good to go.

I just tested this with P-51D Racer aircraft and I can fly again with it!
 
Back
Top