Load Time File Structure in MSFS 2020 - Using Base Files In Your Mod

Hey all, there’s a lot of confusion on how MSFS 2020 actually loads files from the Community folder, so I thought I would share my extensive investigation into it and hopefully explain some of the weird happenings that occur when mods are installed. I’m not very good at writing guides, but I hope this is semi-understandable.

Files Are Merged On Load Time
So, you would think that the game would load each file in community separately and enable you to reference things inside your mod folder. However, this is not what actually occurs. TL;DR Your mod folder is not self contained. If you overwrite any base game files, the base game files become inaccessible after load for ANY mod and ANY base game plane.

For the sake of an example, I will use an add-on aircraft. This is how the sim loads that object…

  1. The aircraft’s folder, the one inside SimObjects > Airplanes, is merged with all other aircraft folders from the basegame. This is good in the case of FBW, where they can name their folder Asobo_A320_NEO and the game will automatically overwrite the base game aircraft with any files they have. However, once this occurs, there is no way to access the base game A320 cockpit, for example. The game now thinks that the FBW cockpit IS the A320 cockpit.
  2. Any folders inside your mod folder are merged with the in game files. Say you have a ModelBehaviorDefs inside your mod folder. This will be merged with the base game ModelBehaviorDefs. If you have overwritten any base game files, those will be referenced across the board by ANY mod or base game plane.

Now, this is good in some cases and bad in others. For example, lets say someone wanted to access a texture from the base-game A320. If a mod in community has overwritten it, then they can no longer access the base-game file. They could load that base-game file inside their own community folder, but then the mod that overwrote it would use that (depending on which is loaded last).

TL;DR You can not have two files with the same name and same folder structure anywhere in community, if you do, the game will just use the one that was loaded last. It loads things in alphabetical order.

How did I find all this out?
I have been working on the A321-200, which relies on the A320 cockpit. Originally, we were copying the cockpit model into our mod folder, but then the game will use that and not an updated base-game or for example FBW’s model for the A320. That’s an issue.

How did we fix it? We fixed it by using a magical thing called fallbacks and aliases. This is a holdover from FSX (I think, I’ve seen it on FSX forums and that’s how I learned to use it), but it works beautifully.

Using Fallbacks To Avoid Issues
To avoid issues, if you want to reference something from the basegame in your mod – reference it through a fallback or alias. Textures use fallbacks, which are widely used. An example from our A321 is below. The key is fallback.7, which references the basegame A320 NEO for the textures (remember if this has been overwritten by a mod, as A32nx does, it will grab those as the game thinks they are the base game files…

Texture.cfg
[fltsim]
fallback.1=..\..\..\..\Scenery\Global\texture
fallback.2=..\..\..\..\..\..\Scenery\Global\texture
fallback.3=..\..\..\..\texture\DetailMap
fallback.4=..\..\..\..\texture\Glass
fallback.5=..\..\..\..\texture\Interiors
fallback.6=..\..\..\..\texture
fallback.7=..\..\Asobo_A320_NEO\texture

If you want to reference Panel or Sound, you use an alias, and example is below. The same rule applies for overwrites…

Panel.cfg
[fltsim]
alias=Asobo_A320_NEO\panel

As for the model.cfg, here is an example…

model.cfg
[model.options]
withExterior_showInterior=false
withExterior_showInterior_hideFirstLod=false
withInterior_forceFirstLod=true
withInterior_showExterior=false

[models]
exterior=Airbus_A321.mdl
interior=../../Asobo_A320_NEO/model/A320_NEO_INTERIOR.xml

The only thing this does not work for are files like aircraft.cfg, systems.cfg, etc. If I find a solution I will definitely let you know.

The beauty of this solution is that our mod can use any version of the A320 cockpit, whether Asobo updates the base-game one, or a mod that overwrites it. yes, sometimes cockpit.cfg or systems.cfg need to be updated, but this solution helps to enable the mod to be much more versatile when updates come along.

If you have questions, I am available anytime in the Project Mega Pack Discord. I will most likely not be too active here on the forum, but I wanted to let this complex and what was to me an unexpected system be known so mod devs can produce even better content. Thanks all!

10 Likes