Scenery creators: please move or rename your modelLib.BGL

So do I understand it correctly that either the name of the scenery (from myairport to uniqueairport-blabla) or the path to the BGL files should be changed?

I also have doubts.
I’m kind of a hoarder and tend to fill up my Community folder with hundreds of sceneries and have not yet encountered any CTDs or other issues with addons. And I’m pretty sure many of my installed addons have these default path and file names. Same with renaming the scenery folders in the Community folder (used to do it to have a searchable system among all the random sceneries, because devs tend to give absolutely bs names of their sceneries). FS does not give a ■■■■ about folder names either, it can be whatever.

1 Like

Would this perhaps cause CTD on approach?

Would you mind sharing your custom sample project?

Is there anyway to define the modellib.bgl filename in the sim?

1 Like

Keeping this active. The only way I’ve found to do it is to manually change the file name and the layout.json…

If you rename the library folder in PackageSources to something more appropriate, and edit the PackageDefinitions xml file, then rebuilding will create a BGL file with this name.

OK, just to be clear for us technically clueless?

AddonName/scenery/global/scenery/modelLib.BGL is a problem.

AddonName/scenery/global/modelLib.BGL is OK?

AddonName/scenery/Microsoft/modelLib.BGL is OK

AddonName/scenery/global/scenery/AddonName_modelLib.BGL is OK??

Well sort of.

You can manually change the file name and then run one of the json updater utilities you can download.

If the modelLib.BGL is identical in every addon it will be fine.

If they are different it is possible the first one the game comes across will be loaded and some addons will get the wrong assets.

Has anything official ever come out about this, though personally have lots of add-ons with Just ModelLib.bgl and have less than a handfull of sim CTD’s since release. Surely by now they would have added something in the SDk docs by now explaining how to change it.

What are people’s experiences with ModelLibChanger?? I only rarely get a CTD, but I have tons of random addons and I’d like to feel confident they are not causing problems.

But when I run ModelLibChanger 0.9.4.1 it list a lot of “file count difference” and seems like it’s going to rebuild the json files for a lot of add on that are from credible devs and I have no reason to think are a problem. I only want to fix the modelLib.bgl issues. This app give no option about which to fix or not? I don’t like making changes I don’t understand nor think I need. I have backed up my entire 40+ GB community folder, but I still don’t want to deal with cleaning a mess up if this “experimental” utility messes up countless add ons that are not giving me any troubles as far as I know?

1 Like

ModelLibChanger simply changes all ModelLib.bgl name and then scans the files in each folder in Community and rewrites the layout.json - for every folder.

1 Like

Are you sure that’s all it does? It lists a bunch of add ons and mentions the renaming the ModelLib.bgl, but just as many add ons are listed, without a mention of the modelLib, but does mention the file count in the json and offers to correct that?

I was able to figure out how to choose which add ons to fix by simply selecting them. So I left them all alone unless it mentioned the modelLib name.

All seems well, nothing bad has happened! I few out of one airport it renamed the modelLib for and it seemed unharmed.

Yeah I didn’t like that it rewrote the layout.json, as a developer, so I preferred not to use it…

Although it DID find something that I missed, so :man_shrugging:

It probably won’t harm it, but sometimes there are files present that the developer doesn’t want the sim to know are there…

Yeah, I didn’t want to change anything other than what I was trying to fix! But seems no harm was done by renaming all the modelLibs it pointed out.

This issue came out several months ago, when some users reported conflicts between sceneries and/or missing objects, so we asked Asobo about this, and they confirmed which cases can be considered conflicts and which aren’t so:


CASE 1

Scenery A installed in Community\SceneryA with a modelLib-SceneryA.BGL located in the following folder inside its package: scenery\MyCompany-SceneryA\modelLib-SceneryA.BGL

Scenery B installed in Community\SceneryB with a modelLib-SceneryB.BGL located in the following folder inside its package: scenery\MyCompany-SceneryB\modelLib-SceneryB.BGL

THIS IS THE BEST SOLUTION, because by giving both the pathname and the filename unique names, it’s very unlikely we’ll end up with a name clash.


CASE 2

Scenery A installed in Community\SceneryA with a modelLib-SceneryA.BGL located in the following folder inside its package: scenery\global\modelLib-SceneryA.BGL

Scenery B installed in Community\SceneryB with a modelLib-SceneryB.BGL located in the following folder inside its package: scenery\global\modelLib-SceneryB.BGL

This is NOT a conflict, although some care should be taken on the filename, to be sure it’s not used by something else.


CASE 3

Scenery A installed in Community\SceneryA with a modelLib.BGL located in the following folder inside its package: scenery\MyCompany-SceneryA\modelLib.BGL

Scenery B installed in Community\SceneryB with a modelLib.BGL located in the following folder inside its package: scenery\MyCompany-SceneryB\modelLib.BGL

This is NOT a conflict, since the pathname is different so, even if the filename is the same, it doesn’t matter.


CASE 4

Scenery A installed in Community\SceneryA with a modelLib.BGL located in the following folder inside its package: scenery\global\modelLib.BGL

Scenery B installed in Community\SceneryB with a modelLib.BGL located in the following folder inside its package: scenery\global\modelLib.BGL

THIS IS A CONFLICT, because both the pathname and the filename are identical so, depending on the scenery loading order, objects from either A or B might show, so it better be fixed.

How to fix conflicts depends if you are users of the scenery, or developers:

USERS

Rename the modelLib.BGL file inside the package AND update the layout.json file with the new name, or use utilities to do that.

DEVELOPERS

Edit the <OutputDir> path in the .XML file in the Package Definitions folder of your project, and replace the path, for example changing it from Scenery\Global\Scenery\ to Scenery\MyCompany-MyScenery, and rebuild the project.

This will only affect the pathname ( which is enough to prevent conflicts ), because the filename of the resulting .BGL is controlled by the name of the folder in the PackageSources which contains the source .GLTF/.XML files for the models so, if you also want an unique filename, you must also rename the PackageSources\modelLib folder in your project AND edit the path in the <AssetDir> tag to match the new folder name.

GUID Conflicts - Developers

Even if your pathname and filename are unique, there’s still a chance for a conflict, which might be caused by GUIDs reused by you or other developers. Every 3D object in the sim must have an unique GUID, a common error is to copy the .XML file of the SDK sample and changing the name of the .GLTF without generating a new GUID for it.

One of the easiest way to generate GUIDs is using this free app on the Windows Store:

Be sure the .XML file located in the same folder of the .GLTF file has a unique GUID and, if you changed it, be sure you also changed it in the airport .XML source file to match, the Rebuild the project.

8 Likes

There still are a lot of airport designers using modelLib.BGL.
For those of you who have MSFS Addons Linker, there is an automatic filename updater that takes care of this.

2 Likes

Correct. The community folder names don’t matter at all. What is within the Scenery or SimObject folders all must be unique (and then correctly referenced in the layout.json)

2 Likes

So with Sim Update 5.

If you export your scenery and rename the modellib.BGL none of your model assets will load in.

You may want to test this on your end if this same result happens. If this happens, change it back to ‘modellib.’