A small CLI utility to inspect, fix, list, find, and package Microsoft Flight Simulator livery packages. Supports five main operations: extract, fix, pack, list, and find.
- .NET Framework 4.7.2
MSFSLayoutGenerator.exe(the specific version included with this repository/package) available onPATHor in the working directory (used to regeneratelayout.jsonduringfix)
- Open the solution in Visual Studio or build with MSBuild/
dotnet buildfor the project targeting .NET Framework 4.7.2. - The compiled executable is
liveryfixer.exein thebinoutput folder.
- Arguments use the form
--key value. - The program expects keys to be provided lowercase and without spaces (for example,
--sourcedirnot--Source Dir). - If a key is not provided on the command line the program will prompt for it interactively.
Common keys
--options <path>— Load an options JSON file. If omitted the program will use default options.--operation <extract|fix|pack|list|find>— Select the operation to run instead of typing it interactively.--sourcedir <path>— Source directory used byextract,fix,pack, andfindoperations.--outputdir <path>— Output directory used byextractandpackoperations.--outputfile <path>— Output file used by thelistoperation.
If a value contains spaces, quote it: "C:\My Liveries".
Interactive
liveryfixer.exe
# respond to prompts: Operation:, Source Dir:, Output Dir: etc.
Non-interactive
# Extract all .zip files recursively into an output directory
liveryfixer.exe --operation extract --sourcedir "C:\path\to\zips" --outputdir "C:\path\to\out"
# Fix liveries under a directory using options.json
liveryfixer.exe --operation fix --sourcedir "C:\path\to\liveries" --options "C:\path\to\options.json"
# Pack detected livery packages into .zip files (and optionally extract thumbnails)
liveryfixer.exe --operation pack --sourcedir "C:\path\to\liveries" --outputdir "C:\path\to\outputzips"
# Create a JSON file listing detected liveries
liveryfixer.exe --operation list --sourcedir "C:\path\to\liveries" --outputfile "C:\path\to\liveries.json"
# Enter an interactive registration lookup session
liveryfixer.exe --operation find --sourcedir "C:\path\to\liveries"
- Recursively finds
.zipfiles under the providedSource Dirand extracts each into the providedOutput Dir. - Extraction is executed in parallel.
- Scans each immediate subfolder of
Source Dirand treats folders containing bothlayout.jsonandmanifest.jsonas livery packages. - Validates
manifest.jsonhascontent_typeequal toliveryand readscreatorandtitle. - Looks under
SimObjects\Airplanesfor aircraft folders, parsesaircraft.cfg(usingCfgFile) and anytexture.cfgfiles to build an internal model of packages, groups, and liveries. - Runs a sequence of fix/inspection routines (see list below) and prints results to the console.
- Attempts to regenerate
layout.jsonfor each package by invokingMSFSLayoutGenerator.exe <path-to-layout.json>and prints any output or errors. The generator must be the specificMSFSLayoutGenerator.exedistributed with this package to ensure compatible output.
Fix/inspection routines executed by fix (in order):
CheckRegistrations— Detects missing or duplicate registrations across all liveries.ListTypes— Groups liveries byui_typeand prints their paths.VerifyICAOs— Checks that each livery has anicao_airlinevalue.FixTextureFallbacks— Adds/removes texture fallback entries intexture.cfgbased on options (and writes updatedtexture.cfgwhen changes are made).RenameFolders— Optionally renames package folders based on their contained liveries andOptionssettings.ListCreators— Groups and prints liveries bycreatorfrommanifest.json.FixManifests— Applies configured creator name corrections tomanifest.jsonfiles.
All routines print actions taken or detected errors to the console.
- Identifies valid livery packages under
Source Dir(same detection logic asfix) and creates a.ziparchive for each detected package intoOutput Dir. - Packing runs in parallel over the list of detected packages (not raw top-level folders).
- Optionally extracts
thumbnail.jpgfrom the first livery texture folder and copies it beside the generated.zipas<packageName>.jpgwhenextractThumbnailWhenPackingis enabled in the options.
- Scans
Source Dirfor valid livery packages and writes a JSON array of detected packages to the providedOutput File. - The JSON output contains the internal
LiveryPackagemodel (title, path, creator, groups, liveries, and texture fallback lists).
- Starts an interactive prompt to search liveries by registration.
- Requires
Source Dirpointing to the root folder containing livery packages. The tool will build its internal package list and then prompt repeatedly for aRegistration:value. - Enter a registration (e.g.
N12345) to search. Matching liveries are printed with package title and livery path. - Enter
quitto exit thefindloop. - When a match is found the tool attempts to open the livery folder using
Process.Start(<livery folder path>)(on Windows this opens File Explorer). This may fail on non-Windows platforms or restricted environments.
You can pass an options JSON file with --options to control behavior. Fields (and defaults) are:
renamePackage(bool, default:true) — enable or disable automatic package renaming duringRenameFolders.packagePathPrefix(string, default: empty) — prefix to apply when renaming package folders.requiredTextureFallbacksByType(object) — dictionary keyed by liveryui_type(or empty string for defaults) with arrays of required fallback paths.unneededTextureFallbacksByType(object) — dictionary keyed by liveryui_type(or empty string) with arrays of fallbacks to remove.creatorNameCorrections(object) — mapping of incorrect creator names to corrected names used byFixManifests.extractThumbnailWhenPacking(bool, default:false) — whentrue, the pack operation will try to copythumbnail.jpgfrom the first detected texture folder of the package into theOutput Diralongside the generated.zip(named<package>.jpg).
Example options.json
{
"renamePackage": true,
"packagePathPrefix": "",
"requiredTextureFallbacksByType": {
"": ["CommonTextures\\base"],
"airliner": ["AirlinerFallbacks\\common"]
},
"unneededTextureFallbacksByType": {
"": ["old_fallback"]
},
"creatorNameCorrections": {
"old_creator": "Correct Creator Name"
},
"extractThumbnailWhenPacking": false
}The program will create a default Options instance if loading the JSON file fails.
CfgFileis a lightweight INI/CFG parser used to parseaircraft.cfgandtexture.cfgsections and lines.LiveryPackage.GetLiveryPackagesbuilds the internal model used by the fix routines andlistoutput.- The application is intentionally conservative: it prints errors and actions rather than silently overwriting many things.
- Ensure the specific
MSFSLayoutGenerator.exeincluded with this repository/package is reachable forfixto regeneratelayout.jsonsuccessfully. - The
findoperation attempts to open livery folders with the system default application; this works best on Windows whereProcess.Start(path)opens File Explorer. - Provide command-line keys in lowercase without spaces to avoid interactive prompts being required.
- Review console output for details about what the tool changed or detected.
Open issues or PRs in the project repository for bugs, feature requests, or improvements.