How to Add A Base to CFS2
By m4ilm4n

This document assumes that the reader has some familiarity with Microsoft's Combat Flight Simulator 2: Pacific Theater.  It also assumes the reader is familiar with basic operations within Microsoft Windows, such as cut and paste, and how to use Notepad.

The author cannot be held responsible for any damage caused by attempting to follow these instructions; in other words, don't say I didn't warn you!

Getting Started

You will need three components to add a base in CFS2:
	1. The base's info as an entry in the airbases.dat file
	2. The base's runway scenery definitions, contained in a .BGL file
	3. The base's Airport and Facilities Data (AFD), contained in a .BGL file

A strong word of caution is most appropriate here. Make sure you have backup copies of your files BEFORE you start editing them. I can’t emphasize this enough, so I’ll say it again. MAKE BACKUPS.

It is important to understand that building scenery is an iterative process; if you plan on getting everything right the first time you’re either way too analytical or in for a rude awakening.  It usually takes me at least three or four builds to get the general idea, then I start the tweaking process. To quote from the film “High Road to China”: “the oxen are slow but the earth is patient”.  Good scenery comes from patient, methodical work.  

Research the Base Info

For the base info, you will need the base's exact coordinates (latitude and longitude), the base name (it should be unique among all base names), the height of the base above sea level, and the compass heading of the runway.  This takes some research but the end result is well worth it.   Use sites like www.mapquest.com, www.nationalgeographic.com, and so forth. 

For example, I used maps obtained from www.terraserver.com to determine the coordinates and rough layout of Ford Island in Pearl Harbor.  I also found on the web a map that showed some details of the island when the attack came.  Lastly, I grabbed some photos from the US Navy Archives web site for third-dimension reference (it's tough to figure out the height of a building from a map).

Another technique is to simply fly there in free flight, then land.  Don't be afraid – unless the game has already placed objects there, there's nothing to run into (no trees, buildings, etc.).  The ground may be sloped, but you need to know that so you can either work around it or flatten it yourself.  Check your altimeter for the height of the terrain.  Check your compass heading, and interpolate which direction the runway(s) should best go.  I like to use the AI SBD modified for player flight for this; it has no virtual cockpit defined so switching to VC provides an unencumbered view of the terrain.

You can even use a world wall map in combination with Mission Builder.  Get the general coordinates from the wall map. Start Mission Builder, and then press the button for New Mission.  Enter the coordinates from the map, and press OK.  Once the scenery loads, you can move the cursor around – and the status window at bottom left gives the exact coordinates.

The following instructions make reference to locations of CFS2 files.  For simplicity, I refer to %cfs2root% as the location of the main CFS2 files. This is usually “c:\program files\Microsoft games\Microsoft combat simulator 2” but it refers to wherever you actually installed the game.
Start the Building Process

The runway and AFD BGL's must be created using a program such as:
•	Flight Simulator Scenery Creator (FSSC) –freeware - http://www.geocities.com/dleung8/fssc
•	Airport - freeware – http://ourworld.cs.com/_ht_a/AirportSupport/index.htm
•	Flight Simulator Design Studio (FSDS) - commercial software – http://www.abacuspub.com
•	MkAFD by Martin Wright – freeware – http://fly.to/mwgfx

I use FSSC, so my examples will reflect this.  Please follow the installation directions accompanying whichever software you choose; if the configuration settings are not correct "unexpected results may occur" (from a Microsoft manual somewhere).

Using FSSC is a lot like using drawing programs such as Visio or PowerPoint.  There are obvious differences, but the general "look and feel" is the same.  I will not attempt to describe here how to do everything in FSSC; it’s own documentation is good for that.  

Start by entering the base's information in the header window. Make sure you enter all information; this is used by CFS2's Advanced Go To function.  When in doubt, make it up - that's why my Ford Island project shows up under the US instead of Oceania (I'll fix that someday).

You create the base objects by right-clicking in the editing window, selecting the object, then dragging and resizing the objects as needed.  You can change the properties of the objects, such as their size and which way they face, on the object's properties page.  I recommend you first place only the runway; you can go back and add other stuff later.

One reason I like FSSC is that you can insert background images. I used this function to insert a map of Ford Island as the background, then fussed around with the background's scale until it pretty much matched the scale of my objects.  It was then just a matter of "tracing" objects to make the scenery layout approach the real thing.

FSSC can generate both an AFD BGL and a runway BGL.  The key to making this work is on the properties page of the runway.  At the bottom of the page is a checkbox for making the runway the base entry point.  This MUST be checked for an AFD file to be generated.

Add the Scenery Files

The scenery files can be added to the CFS2 directory in two ways.

One method is to add them to the default scenery library.  First place the runway BGL into the %cfs2root%\scenedb\runway\scenery folder, and then place the AFD BGL into the %cfs2root%\scenedb\afdfiles\scenery folder.  When CFS2 is next run, it will load the new scenery automatically.

Another method is to place the files in a new folder, such as %cfs2root%\myterrain\scenery. The next time CFS2 is run, this scenery folder must be added to the CFS2 scenery library. From the CFS2 main menu, press "Settings", then press "Scenery Library".  Press "Add area". Simply highlight "myterrain" and press "OK" three times to get back to the main menu.  

The second technique is the preferred method as it keeps the scenery file system more organized, makes it easier to troubleshoot problems, and lessens the chance of accidentally stomping all over original game files.

Add the Base to Mission Builder

Now that the scenery has been added, here’s comes the tricky part - making the base available to the Mission Builder.  We do that by editing the %cfs2root%\info\airbases.dat file using Notepad.

Open Explorer.  Navigate to the %cfs2root\info folder.  Right click on the airbases.dat file, and select "copy".  Right-click elsewhere in the right window again and select “Paste". This creates a backup of the airbases.dat file called "Copy of airbases.dat".

Right-click again on the airbases.dat file, and select "Open with".  Scroll down the list of programs and highlight "notepad".  Before pressing OK, uncheck the box that says "Always use this program to open this file".  

Scroll to the bottom of the file. You should see a section like my Ford Island project below.

[runway.125]
id=8052
name=Ford Island
base_lat=N21 22.00
base_lon=W157 57.88
base_alt=0
heading=020
allegiance=0
units_across=2
takeoff_start_pos=-400,0
takeoff_stop_pos=1600,200
landing_start_pos=5000,350
landing_touchdown_pos=500,0
landing_stop_pos=-250,0

Highlight all the entries of the last airbase, starting from [runway.xxx] and including “landing_stop_pos”, then select "Copy" from the Edit menu. Click once at the end of the last line of the last base; this should be the "landing_stop_pos" line.  Press <return> twice; this adds some blank lines. Place your cursor on one of the blank lines and select "Paste" from the Edit menu.  

Note that each airbase has a unique label called [runway.xxx]; the xxx number is sequential from the top of the file.  Change the number in the runway header [runway.xxx] to be the next number in the runway sequence.  For example, if the last runway number is runway.123, then this new one will be runway.124.  

Each airbase has another unique number for the object ID number. In general, CFS1 bases use 9000-series ID numbers and CFS2 bases use 8000-series ID numbers. Note the last ID number in the file.  Select “Find” from the “Search” menu, and enter the next sequential number in the Find dialog box.  For example, if the last ID number is 8050, then search for 8051.  Make sure you search in both directions.  If it’s not found, you can use this number as the ID number for your new base.  If it is found, try the next number in sequence until you find one that’s available.

Enter the name of this new base, and then enter the latitude, longitude, altitude above sea level, and heading of the runway from your earlier research.  Leave the rest of the items as they are.

Save and close the file.  Your new base is ready to go!
_____________________________________________________________________________
Many thanks to Aviar, Martin Wright, Shiryu, Jorge Alsina, richdrag, AMMace, the gang at CFS2Online and too many others to mention for the information that led to this document.

Copyright 2001 John W. Applegate (m4ilm4n)