Understanding the Prepar3D SDK

The Prepar3D Software Development Kit (SDK) is the official toolkit provided by Lockheed Martin for creating custom content within the Prepar3D flight simulation platform. It encompasses a comprehensive set of APIs, libraries, sample projects, and documentation designed to enable developers to build everything from aircraft and scenery to advanced systems simulations. Unlike third-party tools, the native SDK ensures full compatibility with the simulation engine, including physics, rendering, and AI behaviors. The SDK is divided into several key components: the SimObject API for creating dynamic objects, the Scenery API for terrain and 3D models, and the UI API for custom panels and interfaces. Understanding these components is the first step toward producing production-ready content that integrates seamlessly with the simulation environment.

The SDK also includes utility tools such as the ModelConverterX (for format conversions), the BGL Compiler for scenery, and the Terrain SDK for elevation modification. These tools reduce the need for external software and streamline the workflow from design to in-sim deployment. By leveraging the native SDK, developers gain access to undocumented features and performance optimizations that are not available through generic third-party plugins. This makes it the recommended path for both hobbyists and professional studios aiming to release high-quality add-ons for Prepar3D.

Getting Started with the SDK

To begin working with the Prepar3D SDK, you must first download the appropriate version from the official Prepar3D developer portal. The SDK is version-specific—matching the exact build of Prepar3D you intend to target. For example, if you are running Prepar3D v5.3, you must install the SDK version v5.3.0. Using mismatched versions can lead to runtime errors and missing functions. The installation process is straightforward: run the installer and choose a location with sufficient disk space (at least 10 GB is recommended for sample projects and intermediate builds).

Once installed, take time to explore the folder structure. The Samples directory contains fully functional projects for aircraft, scenery, and vehicles. These are invaluable starting points because they illustrate the correct use of configuration files, model definitions, and XML scripts. The Documentation folder includes the complete API reference, release notes, and a step-by-step tutorial on creating a simple aircraft. It is strongly advised to read the "Getting Started" guide before writing any code, as it covers the build environment prerequisites and common pitfalls.

System Requirements

Developing with the Prepar3D SDK requires a capable machine. Minimum specifications include a 64-bit processor, 16 GB of RAM, and a dedicated GPU with at least 4 GB of VRAM. For 3D modeling and texture compilation, a multi-core CPU (6+ cores) and an SSD are highly beneficial. Operating system support extends from Windows 10 to Windows 11. While the SDK is designed to work with Visual Studio 2019 or 2022 (Community edition is sufficient), some tools like the SimDirector also rely on the .NET Framework 4.8. Ensure you have the latest Windows updates installed to avoid compatibility issues.

Setting Up Your Development Environment

A proper development environment is critical for efficient work. Start by installing Visual Studio 2022 Community Edition (free) with the Desktop development with C++ workload. During installation, select the Windows 10 SDK and the Spectre-mitigated libraries if you plan to use advanced security features. After Visual Studio is set up, clone or copy a sample project from the SDK’s Samples folder to a working directory. Open the solution file (.sln) and verify that the project includes the proper include paths and library directories. Typically, you need to add $(SDK_ROOT)\Utilities\SimConnect\SDK\managed for managed code projects or $(SDK_ROOT)\Utilities\SimObject API\SDK\include for native code. Also configure the output directory to build directly into your Prepar3D installation's SimObjects or Addon Scenery folders to speed up testing.

Configuring Project Properties

In Visual Studio, navigate to Project Properties > C/C++ > General > Additional Include Directories. Add the SDK’s header file paths. Then go to Linker > Input > Additional Dependencies and include the required .lib files (e.g., SimConnect.lib for SimConnect, SimProp.lib for property-based systems). Ensure the build configuration matches your target (x64 for all modern Prepar3D versions). It is also wise to set the DEBUG preprocessor definition during development to enable verbose logging. After building, use the generated DLL or executable in the appropriate module folder.

Creating Custom Aircraft

The heart of many Prepar3D add-ons is custom aircraft. The SDK provides a structured approach to defining airframes, systems, and visual models. Unlike simple repaints, a full custom aircraft involves three major components: the 3D model (interior and exterior), the system logic (engines, hydraulics, avionics), and the configuration files that tie everything together.

Modeling the Aircraft

Start by creating the 3D model using a tool like Blender (free) or Autodesk 3ds Max (professional). Export your model in the .X (DirectX) format or the newer .glTF format if your SDK version supports it. The model must be UV-unwrapped and use PBR (Physically Based Rendering) textures for realistic lighting. The SDK includes a ModelConverterX tool that can translate common formats into Prepar3D’s native .MDL files. When creating animations (e.g., landing gear retraction, control surfaces), name your parts according to the naming conventions found in the SDK documentation. Use Axis_ prefixes for moving parts and Attach points for lights and effects. A single model file can contain multiple LOD (Level of Detail) versions—create at least three LODs to maintain performance.

Defining Aircraft Parameters

The aircraft.cfg file is the core configuration file that describes the aircraft to Prepar3D. It is located in the aircraft’s folder under SimObjects\Airplanes. This file defines flight dynamics, engine specifications, contact points, and avionics. Use the sample projects as templates: copy the structure and modify values for your own design. Key sections include [General] (type, category), [piston_engine] or [turbine_engine] (power curves), and [airplane_geometry] (wingspan, length, CG). In addition to aircraft.cfg, you will need a panel.cfg file that registers the virtual cockpit gauges, and a sound.cfg that maps engine sounds to specific RPM ranges. For advanced system simulation (e.g., pressurization, electrical bus logic), create an XML script file named systems.cfg or use the SimObject API in C++.

Scripting Systems Behaviors

Prepar3D offers two primary ways to script custom systems: XML gauges and the SimObject API (C++/C#). XML is simpler for basic logic like instrument displays and switch interactions, but for complex behaviors like fly-by-wire control laws or custom autopilot modes, the SimObject API gives you direct access to the simulation engine’s internal state. A typical pattern is to implement an ISimObject interface that listens for key events (e.g., SIMCONNECT_RECV_EVENT) and writes to simulation variables. Always unload your module properly to prevent crashes when exiting the simulation. Test each script incrementally in the SimDirector tool to visualize variable changes in real time.

Creating Custom Scenery

Scenery creation allows you to populate the virtual world with custom airports, buildings, vehicles, and terrain. The SDK’s Scenery API uses BGL (Binary 3D Library) files that compile XML descriptions into the sim’s native format. Start by modeling your objects in a 3D application, then export to .MDL using the same process as aircraft. Then write an XML placement file that includes the model’s GUID (globally unique identifier) and the geographic coordinates. Use the SDK’s BGLComp.exe tool to compile the XML into a .bgl file. Place the resulting .bgl and any texture .dds files into an Addon Scenery folder structure (scenery for objects, texture for images). Activate the folder via Prepar3D’s Scenery Library menu.

Optimizing Scenery Performance

To keep frame rates high, follow these guidelines: use LODs (at least 50, 30, and 10 meters radii), minimize draw calls by merging separate objects into one mesh where possible, and compress textures to DXT5 or BC7. Also, avoid placing high-detail models near runways unless essential. The SDK includes a Terrain SDK for flattening airports or creating elevation changes—use terrain add-ons sparingly because they affect load times. Regularly test your scenery on a system with average specs to ensure broad compatibility.

Integrating Custom Content into Prepar3D

After developing your custom modules, they must be placed in the correct directories. For aircraft, copy the entire aircraft folder to SimObjects\Airplanes. For scenery, follow the standard add-on structure. For modules compiled as .dll files via the SimObject API, place them in Modules folder (create it if missing) and register them in the dll.xml file. The format is an XML list with the Name, Path, and Disabled elements. After placing files, launch Prepar3D to verify that the content appears without errors. Check the Prepar3D.log file in the application root folder for any loading failures. If the content does not show, ensure that the folder names, GUIDs, and configuration syntax are correct. Using the SimConnect diagnostic tool (included in the SDK) can help debug communication issues.

Testing and Debugging

Thorough testing is essential before publishing any add-on. Create a test scenario in each environment (day, night, dynamic lighting, rain, snow) to identify visual glitches or performance drops. Use the Developer Console (Shift+Z) to monitor FPS, memory usage, and variable values. For SDK-specific debugging, enable verbose logging by setting a registry key (see SDK documentation). If your add-on behaves unexpectedly, isolate the issue: test with a clean Prepar3D installation (no other add-ons) to rule out conflicts. The Avsim developer forum is an excellent resource for common issues and community solutions.

Best Practices and Tips

  • Always back up your files before making significant changes. Version control (e.g., Git) is highly recommended even for small projects.
  • Study the sample projects thoroughly. They are written by Lockheed Martin and represent the most optimized patterns.
  • Test your content in multiple scenarios: from light GA to heavy jet, under various weather conditions and complex traffic environments.
  • Stay updated with the latest SDK releases and documentation. Lockheed Martin occasionally deprecates old APIs and introduces new features.
  • Optimize early. Profile your code after each major milestone rather than delaying performance tuning to the end.
  • Use the std::string and std::vector with care in C++ modules; avoid frequent heap allocations inside simulation loops.
  • Leverage community tools like ModelConverterX, AI Traffic Toolbox, and the Prepar3D SDK Forum for tips and code snippets.
  • Document your code and configuration files – you will thank yourself when revisiting the project months later.

Advanced Topics

Once you are comfortable with basic aircraft and scenery development, explore deeper capabilities offered by the SDK. AI traffic creation can be expanded using the SimObject API to design custom traffic patterns or ground handling behaviors. Weather customization via the Weather API allows scripted dynamic weather sequences for training scenarios. The UI API lets you create custom pop-up windows, menus, and in-sim tutorials using WPF or WinForms. Additionally, the networking SDK enables distributed simulation setups where multiple Prepar3D instances can share data, useful for multi-crew training or large-scale air combat simulations. Each of these areas has its own sample projects and dedicated documentation chapters.

Troubleshooting Common Issues

Even experienced developers run into problems. The most common are: Model not displaying – verify that the .mdl file is in the correct folder and that the texture paths are relative. Crash on module load – check the Event Viewer for exception code; often it's a missing DLL dependency (e.g., C++ redistributables). Gauge not responding – ensure the XML syntax is valid and that the gauge’s name attribute matches the entry in panel.cfg. Scenery out of place – verify the coordinates and that you are using the correct geodetic datum (WGS84). For persistent issues, clean rebuild, reinstall the SDK, and retest with the simplest sample. Use the Prepar3D Developer Forum (linked above) for peer support.

Conclusion

Mastering the Prepar3D native SDK opens the door to creating professional-grade flight simulation content that can be shared with a global community of enthusiasts and professionals. By systematically following the steps outlined here—understanding the SDK, setting up your environment, building custom aircraft or scenery, integrating and testing—you will develop the skills needed to produce robust, immersive add-ons. Remember that the journey does not end with your first release; continue learning from the ever-evolving SDK updates, community contributions, and your own experiments. With patience and practice, you can transform your vision into a functional, polished product that enhances the Prepar3D experience for everyone. Start small, build incrementally, and always refer to the official documentation as your primary guide.