• 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 Panel instrument - Kickstart

Messages
531
Country
france
Hello,

I know I may look ridiculous here, I take this risk :)
I would like to create a panel instrument that would replace an existing one in an existing aircraft. Let's imagine I want to replace the Garmin PFD in the C172 G1000. I know some others developers did it, it is certainly so difficult, but I still don't understand the logic of "replacing" an existing instrument with a new one that is in the Community" folder.
I guess it is done through the declaration in the manifest file, but I don't understand the logic for writing this file content. Is it generated automatically when you create a project in developer mode? If so, how do you specify what you want your project to be?
I obviously tried to find answers in the SDK. Even if it is full of information, I didn't find this information, maybe I missed it or I am too old for this ;)

Anyway, what I would like to have is a very simple sample of an instrument that just displays "Hello World". After this I can do the rest, Hopefully...

Thanks for any help,
Eric
 
Anything you put in the Community folder will overwrite anything in the Official folder. At runtime MSFS combines these separate folders into a single folder. This is how some people are able to make gauges that overwrite default gauges. By setting up their file structure the same as a default gauge and putting it in the Community folder it will virtually overwrite the default. See http://kronzky.info/fs/ for some examples of this in action.

Just a note, I compile my package outside of MSFS by dragging and dropping the xml onto a shortcut to the fspackagetool

Changing the manifest is done with the xml definition in the PackageDefinitions folder. Here is an example of what I am working on at the moment. The AntsAirplanes_Drifter_html_gauges asset group is a simple COPY type and it copies the files into the final package. The files for the gauges (these are HTML gauges) are put into PackageSources/html_ui/Pages/VCockpit/Instruments/Generic/Misc. Because the Generic/Misc is an existing folder in MSFS using copy works fine. I should really create my own folders. In that case I think I will have to change the Type to "INSTRUMENTS" to get MSFS to recognize the new folders as instruments. Simply changing the folder names does not work. See the manifest for the asobo-vcockpits-instruments-a320-neo for an example of how the manifest would need to look.

Code:
<AssetPackage Name="antsairplanes-drifter-a-582" Version="0.1.0">
    <ItemSettings>
        <ContentType>AIRCRAFT</ContentType>
        <Title>Drifter A-582</Title>
        <Manufacturer>Austflight</Manufacturer>
        <Creator>Ant&apos;s Airplanes</Creator>
    </ItemSettings>
    <Flags>
        <VisibleInStore>true</VisibleInStore>
        <CanBeReferenced>true</CanBeReferenced>
    </Flags>
    <AssetGroups>
        <AssetGroup Name="AntsAirplanes_Drifter">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Airplanes\antsairplanes-drifter-a-582\</AssetDir>
            <OutputDir>SimObjects\Airplanes\antsairplanes-drifter-a-582\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="ContentInfo">
            <Type>Copy</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageDefinitions\antsairplanes-drifter-a-582\ContentInfo\</AssetDir>
            <OutputDir>ContentInfo\antsairplanes-drifter-a-582\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="MarketplaceData">
            <Type>Copy</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageDefinitions\antsairplanes-drifter-a-582\MarketplaceData\</AssetDir>
            <OutputDir>MarketplaceData\antsairplanes-drifter-a-582\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="AntsAirplanes_Drifter_html_gauges">
            <Type>Copy</Type>
            <AssetDir>PackageSources\html_ui\</AssetDir>
            <OutputDir>html_ui\</OutputDir>
        </AssetGroup>
    </AssetGroups>
</AssetPackage>

For the simple gauge, I am working on a tutorial. I've managed to create a couple of HTML gauges so far but I really couldn't explain the process. It's not easy. I am, at the moment, trying to make a simple gauge which will demonstrate some of the things you can do, write text, draw etc which should serve as a tutorial/starter gauge. At this particular moment I am trying to figure out the differences between creating a gauge that will run in a browser and one that will run in MSFS. Being able to run the gauge in a browser is vital to formatting and laying out your gauge as working within MSFS to do this is absolute hell.
 
Hi Anthony,

Thank you for your reply.
I had a look at the Kronzy test gauge that looks very interesting as a starting point because it is simple, exactly what I am looking for at this time.
I wanted to understand how he determined the path to the gauge he wanted to replace, that is: html_ui\Pages\VCockpit\Instruments\Generic\Radios\KX155A
So I looked into the C152 panel.cfg and found this for the KX155A gauge: Generic\Radios\KX155A\KX155A.html?index=1
Then I looked into the official packages and found this path: asobo-vcockpit-instruments-generic\html_ui\Pages\VCockpit\Instruments\Generic\Radios\KX155A
OK, but it looks like a guess game, I mean the information in the panel.cfg is not enough to let you find the full path that you must replace. But it is OK, it can be done by spending some time searching. Anyway, I now understand how the path should be determined to replace an existing gauge.

Now I would like to understand how the project is created from scratch, especially how the layout.json and manifest.json files are created. Are they created according to an XML description file that you have to write?
In other words, I would like to know the basic workflow that leads to the creation of a basic gauge such as Kronzy's one when you have nothing to start from.

[EDIT] What bothers me most here is that everything you kindly explained here is not described at all in the SDK, unless I missed it...

Thanks for your help,
Eric
 
Last edited:
Now I would like to understand how the project is created from scratch, especially how the layout.json and manifest.json files are created. Are they created according to an XML description file that you have to write?
Yes. I think. I just tried to compile my gauges only using the xml I posted earlier. The changes I made were to change the CONTENTTYPE to INSTRUMENT and I deleted the SimObject asset group. It compiled, but the manifest says it is an unknown type (the SDK does not say that fspackagetool supports instruments yet. I guess I could edit the manifest it produced and change the content type manually. I'm still learning this stuff and like you say, it's not in the SDK so there's a lot of trial and error here.

layout.json and manifest.json are produced by the fspackagetool (found in FS2020 SDK/Tools/Bin). You need to create the file structure (copy the simpleAirport in the Samples folder and modify it for a gauge instead of an airport, have a look at some of the other samples to get an idea of the formatting). Then you take the project.xml (in the case of the sample it is called AirportProject.xml) and drag and drop it onto fspackagetool to compile. For MSFS html gauges the compilation is mostly just copying files. It probably converts any png files to dds for you too but my gauges are using any graphics files so I can't confirm.

In the case of a gauge file you would put the gauge files into the PackageSources/html_ui/pages/VCocpit/Instruments/ folder. In my case I am using PackageSources/html_ui/pages/VCocpit/Instruments/Generic/Misc. html_ui/pages/VCocpit/Instruments/ is the basic pathway for instruments.

Here is the manifest I produced:

Code:
{
  "dependencies": [],
  "content_type": "UNKNOWN",
  "title": "Drifter A-582",
  "manufacturer": "Austflight",
  "creator": "Ant's Airplanes",
  "package_version": "0.1.0",
  "minimum_game_version": "1.14.6",
  "release_notes": {
    "neutral": {
      "LastUpdate": "",
      "OlderHistory": ""
    }
  }
}
 
What I understand here is that you don't need to use the Project Editor in MSFS developer mode. Am I correct?
In the SDK, I could read this:
It is important to note that many of the files listed in the different sections here can actually be created and edited in Developer Mode within Microsoft Flight Simulator. Many of the editors that are available within the sim when this mode is active will generate the required files for you, and in general we recommend that you use the editors where possible rather than creating or editing the actual files themselves (which can be error prone and more complicated).

This is why I thought I should use the project editor to have the files automatically generated. When I keep reading the SDK, it has a section dedicated to instruments, but it doesn't say anything about the files that must be used. It just describes the panel.cfg format and the C/C++ gauges, useless here... Even worse, the "XML Reference" link, supposed to explain how to write the XML file, leads to an empty page. This is why I appreciate your explanations :)

Anyway, I created a project through the MSFS developer mode, of type "Copy", in which I created a package of type "Instrument" and I had the following XML file generated:

<AssetPackage Name="eric-instrument01" Version="0.1.0">
<ItemSettings>
<ContentType>INSTRUMENTS</ContentType>
<Title/>
<Manufacturer/>
<Creator/>
</ItemSettings>
<Flags>
<VisibleInStore>false</VisibleInStore>
<CanBeReferenced>false</CanBeReferenced>
</Flags>
<AssetGroups>
<AssetGroup Name="ContentInfo">
<Type>ContentInfo</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir>PackageDefinitions\eric-instrument01\ContentInfo</AssetDir>
<OutputDir>ContentInfo\eric-instrument01</OutputDir>
</AssetGroup>
<AssetGroup Name="eric-instrument01">
<Type>Copy</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir/>
<OutputDir/>
</AssetGroup>
</AssetGroups>
</AssetPackage>

I thought this was good, so i ran fspackagetool.exe with this file and... it tried to run MSFS (that was already running), I had this small Steam popup window that says "Preparing to launch Microsoft Flight Simulator", and no file was generated. What a surprise... I think I will need some more time to understand everything here.

[EDIT] I also tried to build the package from the developer mode and I saw errors in the console, as shown here:

1616835196619.png


And no file was generated...
 
Last edited:
Back
Top