# Creating Or Replacing An Airport In this brief tutorial we'll take you through the steps required to either: - create a new, custom airport - replace an existing airport with one of your own {{% tagged "internal" %}} {{< callout context="note" title="NOTE" icon="outline/bulb" >}} If you are wanting to download and edit an airport from the World Hub, then you should follow the procedure outlined on the [Setting Up World Hub](../../../worldhub/setting-up/) page, not the one explained on this page. {{< /callout >}} {{% /tagged %}} Before getting started, you should open Microsoft Flight Simulator 2024 and then start a free flight (the aircraft and destination you choose are irrelevant to this tutorial). Once in the simulator, you'll need to enable [Developer Mode](../../../introduction/sdk-overview/#h1) before continuing. Once in Developer Mode, you will need to create a New Project. This can be done by going to the [File](../../../devmode/menus/file/) menu and selecting **New Project**, or you can open the Project Editor (from the [Tools](../../../devmode/menus/tools/) menu) and then select **New Project** from the [Project](../../../devmode/editors/project-editor/menus/project/) menu. Give the new project a name and select a location to save it to, then click the {{< button "Package" />}} button to open the following **Package Wizard** window. Here you should select the **Airport** option: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_wizard.png" alt="Adding Package Information For An Airport" >}} After that you click the {{< button "Next" />}} button and then give the package a name and display title, before clicking {{< button "Next" />}} again. {{< callout context="caution" title="IMPORTANT!" icon="outline/alert-triangle" >}} When creating scenery, the user aircraft **must be located near or within the zone being edited** otherwise you may find that placed assets won't be displayed. {{< /callout >}} ### Creating A New Airport The Airport Wizard will show you different options depending on whether you want to create a custom airport or override an existing airport. For a custom airport it will look like this: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_custom.png" alt="The Airport Wizard For A Custom Airport" >}} Here you want to ensure that you have selected **Create An Airport Anywhere**, and then give the following details: - **New Airport ICAO**: This is the 4-8 character {{< glossterm >}}icao_code{{< /glossterm >}} for the airport. This should be unique and not be used by any existing airport (a message will be shown if the ICAO is invalid). - **Airport Name**: The name that you want the airport to have. - **Latitude** and **Longitude**: The position within the world of the airport. Note that you can click the {{< button "Copy Current Position" />}} button to use the position of the aircraft in the world as the center point for the airport you are creating.   Once you have given the details, you can click on the {{< button "Create Airport" />}} button. The new asset group for the airport will be added to the package and at this point you should **save** the project. Then you can select the "scenery" asset group and load it into [The Scenery Editor](../../../devmode/editors/scenery-editor/the-scenery-editor/) by clicking the {{< button "Load In Editor" />}} button in the **Inspector**: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_load.png" alt="The Airport Asset Group In The Project Editor" >}} This will open the scenery editor, and in the Content List of the editor, you will see the new airport group listed. You can then **double-click**{{< mouse-press >}} on the airport itself and the simulation will pan to an overhead view of the airport in the world: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_new.png" alt="The New Airport In The World" >}} The airport is shown in the world as a blue circular area, and the circle shows the currently set boundary for the airport. You can add airport scenery elements within this boundary to have them be considered part of the airport. {{< callout context="note" title="NOTE" icon="outline/bulb" >}} If the Scenery Editor doesn't open, you can open it from the {{< link "../../devmode/menus/tools/" >}}Tools Menu{{< /link >}} at the top of the screen. {{< /callout >}} You can now start [Adding Objects To The Airport](creating-or-replacing-an-airport/#AddingObjects). ### Replacing An Existing Airport When you want to overwrite an existing airport the Airport Wizard will look like this: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_replace.png" alt="The Airport Wizard For Replacing An Airport" >}} Here you need to click on the field labeled {{< button "Selected Airport To Override" />}}. This will open another window where you can input an {{< glossterm >}}icao_code{{< /glossterm >}} and get filtered options that match: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_icaofilter.png" alt="The ICAO Selection Window" >}} Once you have the airport you want to replace (in this case **MYNN**, for Lynden Pindling International), click the {{< button "Select ICAO" />}} button to add this to the Airport Wizard. The rest of the details for the airport will be filled in automatically, and so you can then press the {{< button "Create Airport" />}} button.   The new asset group for the airport will be added to the package and at this point you should **save** the project. Then you can then select the "scenery" asset group and load it into [The Scenery Editor](../../../devmode/editors/scenery-editor/the-scenery-editor/) by clicking the {{< button "Load In Editor" />}} button in the **Inspector**: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_loadnassau.png" alt="The Airport Asset Group In The Project Editor" >}} This will open the scenery editor, and in the Content List of the editor, you will see the new airport group listed. You can then **double-click**{{< mouse-press >}} on the airport itself and the simulation will pan to an overhead view of the airport in the world: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_nassau.png" alt="The Airport In The Scenery Editor" >}} {{< callout context="note" title="NOTE" icon="outline/bulb" >}} If the Scenery Editor doesn't open, you can open it from the {{< link "../../devmode/menus/tools/" >}}Tools Menu{{< /link >}} at the top of the screen. {{< /callout >}}   #### Exclude Elements In order to be able to replace an airport in Microsoft Flight Simulator 2024, it is necessary to exclude the 3D models and other things that are already present inside the simulation for the airport, including {{< glossterm >}}tin{{< /glossterm >}} and vegetation. We'll do this using [Polygon Objects](../../../devmode/editors/scenery-editor/objects/polygon-objects/) to define the boundaries of the elements that we want to remove.   To add a polygon shape, you need to go to the **Objects** menu and select "Polygon" from the drop down **Object Type** list, then click on the {{< button "Add" />}}: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_addpolygon.png" alt="Adding A Polygon Shape Object" >}} This will add the polygon shape to the sim world, however, in the Scenery Editor you'll see it's marked in red, and that's because we haven't added any points to the polygon yet (it needs a *minimum* of 3 points). For that, simply hold down the {{< input "Ctrl" />}} key and then *left*-mouse click{{< mouse-press >}} on the terrain in the sim world to place a point. You want to outline the entire airport, as illustrated in the image below: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_outline.png" alt="Illustration Of The Polygon Outline" >}} To end the polygon definition, simply hit the {{< input "Enter" />}} key. The line will go from red to purple, as shown above.   You now need to set the properties for the polygon, and in this case we want it to exclude all the buildings that are applicable, as well as all the vegetation. For that, in the **Properties** window, select **Buildings**: **Exclude All**, then the other **Exclude** options for roads, lights, etc..., and finally check **Vegetation** and set the all the vegetation sliders to 0: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_excludeall.png" alt="Exclude All Buildings And Vegetation" >}} This will remove all the 3D elements from the defined polygon area: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_poly_gone.png" alt="Airport With No 3D Buildings Or Vegetation" >}} {{< callout context="note" title="NOTE" icon="outline/bulb" >}} Some airports and areas will have special "developer buildings" on them that won't be removed using the polygon tool. To remove them use [ExclusionRectangle Objects](../../../devmode/editors/scenery-editor/objects/exclusionrectangle-objects/), creating them from the **Objects** editor the same way as you created the polygon object, and then placing it over the developer building to be removed. {{< /callout >}} You should now save this part of the scenery to your `PackageSources` folder (click on the {{< button "Save Scenery" />}} button in the Scenery editor) and make sure to give it a *unique* name, for example `nassau-override-scenery-poly`. ### Adding Objects To The Airport You can now start to add different elements into the airport, like [Runway Objects](../../../devmode/editors/scenery-editor/objects/runway-objects/), [Apron Objects](../../../devmode/editors/scenery-editor/objects/apron-objects/), [Windsock Objects](../../../devmode/editors/scenery-editor/objects/windsock-objects/) and any other of the available [Scenery Objects](../../../devmode/editors/scenery-editor/scenery-types/) that are required. You can get full details on how this can be achieved from the section on [Adding An Element To The Scene](../../../devmode/editors/scenery-editor/using-the-scenery-editor/#adding-an-element-to-the-scene). ### Build The Package With all that done, you can now build the package which will include it in the simulation. This is done using the {{< button "Build All In Project" />}} button in the **Project Editor** window: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Replace_Airport/tutorial_airport_build.png" alt="Build The Override Airport Package" >}}