CFS Mission Editor

CopyRight Keith Bedford December 1999

Get the latest version (and more Cfs tools) from my Web site

Introduction

CfsMe is a stand-alone FreeWare Mission Editor for MS Combat Flight Simulator.

You should download the Microsoft Mission editor for its documentation, the various fields on CfsMe forms are as defined in the documentation. However CfsMe maps onto the structure of the mission file rather than the 'tabs' used by the Ms Editor so the location of fields varies.
CfsMe does NOT (yet) support the Ground Layouts used to locate groups of ground units by the MS editor, you have to do it manually.

These instructions should be enough to get you started, but you WILL need the MS documentation. Any problems, email me at the above address.

Installation

Copy the supplied CfsMe.exe, Cfsme.dll, vbasm.dll and CfsMe.ini files to a directory in your path. The Visual Basic runtime file VBRUN300.DLL is required, many people will have this file already, if not is is easily downloadable from the net (eg from here).
The CfsmeDLL.zip does not need to be extracted unless you wish to see the DLL source.
Copy the coastline file (map.txt) to a suitable directory and edit CfsMe.ini (cfsme section) as necessary to point to
 
your Cfs Directory cfsdir= This is for your convenience in finding Mission and Campaign folders
the map.txt file map= This file contains the Coastline data
your 'print to' file printfile= Print Buttons will append to this file

As of version 0.9 binary maps are supported, due to the size of the files they are downloadable seperately from here Unzip the map you require and edit CfsMe.ini as above ([cfsme]map=)
NameContentSource
HiEurope.dat Very High Resolution map of NW Europe Crusty(Via Claude Vermonet)
LoWorld.dat Low Resolution map of the World Ted Wright (NAV)
LoEurope.dat Low Resolution map of NW Europe, Norway & N Africa Ted Wright (NAV)

You do not need to have CFS installed on the PC and CfsMe will run under Windows NT, 98, 95 or 3.1.
On Windows NT long-file names are only partly supported.

Execution

Either You can edit missions whilst inside CFS - just Alt-TAB out to the desktop, make your changes, Alt-Tab back to CFS and test them.

Modifying an Existing Mission

Either copy the mission file to a new name or back it up first!
Run CfsMe and select the mission file to be modified using the filesystem select controls on the opening screen if necessary. Note long-file-names may be displayed in 8.3 format on some platforms, however the Mission Title is also displayed (at the top of the form) as you browse which should aid selection. Click the buttons on the left to modify the various parts of the mission file. To add new units etc just scroll past the last existing unit and start filling in the blanks.

Creating a new Mission

See the Tutorial for creating your first mission.

 Run CfsMe and click the New Mission button, enter the name of the new mission which will be created in the current directory. Click the buttons on the left to create the various parts of the mission file, each of which will initially be empty.

I suggest inspecting a couple of existing missions first to see how they are constructed.

Mission

This is the summary/overview screen, modify as required, click Save and then Close. Double-click on the Aircraft field to see the definition of the current aircraft.

Printing Summary

A summary of the Mission can be printed to the Print file by clicking Print

Units

This screen is used to define all units, air and ground, moving and stationary. Modify as required, click Save and then select a new unit or Close.
I suggest defining the Unit types you will be using (below) first, then you can select them from the Name drop-down list.
Once you have defined a Unit, just click Duplicate to create further units (with ascending Ids)
Double-click on the Type Id field to see the definition of that Unit Type (as below).
See the Map form for an easy way of entering Unit positions.

Unit Types

Every unit type used in Units above must be defined here. E.g if four Spitfires, units 1001 to 1004 were defined with type id 3052, then a Unit Type entry for id 3052 is required.
For aircraft the Name field MUST be a folder name within the CFS Aircraft subdirectory. The Name Drop-down list is pre-loaded with all the aircraft definitions stored in the CfsMe.ini file to make this easy.
You can add imported aircraft to the .ini file and they will appear here.
Modify as required, click Save and then select a new unit type or Close.

Waypoint Paths

Each formation may follow a waypoint path (of at least two waypoints). Modify each waypoint and path as required and click Save. Click Close when all paths are complete.
The entries in the Settings field are :
Action, Map, Latitude, Longitude, Altitude, ?, ?, ?, Speed, ?, CAP
The ? fields are unused.

The ETA for each waypoint and time & heading for the next leg are calculated and displayed as you step through the waypoints. This should enable you to synchronise multiple formations, however do not rely on this facility as CFS does not always cooperate!
Note also there seems to be a bug in CFS that jumps you forward an hour whilst crossing the English channel. This is presumably related to Daylight Saving time and probably occurs elsewhere also.
If you change a waypoint return to waypoint 0 and step through to see the effect on timings.

Importing Waypoints

A set of waypoints can be defined on the map form and imported into the Waypoints form by selecting the Waypoint Path and the first waypoint to be set and then clicking Import. The current and successive Waypoints will be updated/created. Remember to set the Waypoint Path ID & click Save.

Printing Waypoint Paths

The complete set of Waypoint Paths (including ETA at each Waypoint and Time & Heading for the next leg) can be printed to the Print file by clicking Print.

Formations

A group of units (eg the four Spitfires created above) that will move together. Modify as required, click Save and then select a new formation or Close. Double-click on the Waypoint Path Id field to see the related Waypoints. Double-click on a Unit field to see the related Unit.
Select a formation type from the drop-down list and you can then quickly build a formation just by double-clicking on empty units. Hint Double-click unit 0 first, then change its id (first field) to the required unit, now new units will automatically be based on that unit id. ie if unit 0 (of the formation) is id 1000, unit 10 will be id 1010. Make sure you have defined the units themselves (Tip use the Unit Duplicate button).

Double-click on the TakeOff or Landing field to see the related Runway.

Formations can now have a Name, this is just for your covenience editting Missions and is ignored by CFS.

Runways

Defines runways that will be used for take-off or landing. Modify as required, click Save and then select a new runway or Close.

Map

Click the Map button - the current Map (as selected on the Mission form) will be displayed, airfields, waypoints, landmarks & ground units are shown.
Depending on the coastline map defined in your CfsMe.ini file, coastlines may be shown. Unfortunately the low-resolution coastline data isn't completely accurate and CFS is less accurate than the high-resolution coastline - so dont rely on it when positioning ships and coastal units etc, check them afterwards!
Runways will be drawn (if show ground units selected) either approximately (based on runway position and heading) or as defined in the CfsMe.ini file in the runway definition.
<Id>=<Name>,<Lat>,<Long>,<alt>,<rotation>[, <TLLat>,<TLLong>,<TRLat>,<TRLong>, <BRLat>,<BRLong>,<BLLat>,<BLLong>]
The four co-ordinate pairs are plotted clockwise on the map (TopLeft, TopRight, BottomRight,BottomLeft).
e.g.
9059=Tangmere,10000,N50 50.89,W0 42.27,88,333,1,N50 51.37,W0 42.68,N50 51.38,W0 42.61,N50 51.37,W0 42.68
Use slew mode+co-ordinate display to find the exact coordinates you need if you wish to edit the .ini file yourself.

Move the cross-hair cursor across the map and the current Lat-Long co-ordinates are displayed in the title bar.

The larger map files take a substantial time to load, the program will attempt to store the data in memory which speeds things up significantly. You may have to zoom in to your operational area before this is succesfull!

To Zoom-In

Press the left button & hold it down whilst moving the mouse right & down to rubber-band the desired area. Release the mouse-button & you are prompted 'Zoom to selected area'. Click Yes.

Waypoints on the Map

Point the mouse at the required waypoint position and click the right mouse button, the waypoint will be marked and a line drawn from the previous waypoint (if any). A maximum of 10 waypoints are allowed in a path(CFS objects to more). The other Waypoint values are taken from the values displayed in the Waypoint frame to the right of the map, ensure these are correct before creating a waypoint.

The current waypoint path can be erased with the Waypoints->Clear menu.

Note by default only friendly waypoints are shown (so as not to spoil the surprise when 'viewing' a mission before flying it. When creating missions tick Waypoints->See Enemy to see all waypoints.

Friendly Waypoints are in light blue, the Players path in thick dark blue and the enemy in red.

Click Waypoints->See Id to get the Waypoint Id (& name if defined) displayed/printed.

Importing Waypoints

Once a set of waypoints are defined on the map they can be imported into the Waypoints form by selecting the Waypoint Path and the first waypoint to be set and then clicking Import. The current and successive Waypoints will be updated/created. Until you do this your new waypoints exist only on the map. Remember to set the Waypoint Path ID & click Save.

Importing Waypoints into Excel

Once a waypoint path is defined on the map it can be imported into the MS Excel Editor with Waypoints->Export Path, switching to Excel, selecting the cells to receive the first field of the first waypoint and select Edit->Paste.

Creating Ground Units on the Map

Select 'Create Ground Units', a Unit form will be loaded - scroll through to the first unused unit OR the unit you wish to replace (note you will be prompted for confirmation before overwriting existing coordinates).
Point the mouse at the required unit position and click the right mouse button - a new unit is marked & the coordinates put into the current unit on the Unit form (make any other changes required & click save. Scroll to the next unit & repeat.......
You can also use (Unit) Duplicate to create a set of similar objects and overwrite the coordinates.

Friendly Ground Units are in blue, enemy in red. If displaying a map takes a long time on your system set Ground Unit colours off.

Click View->Ground Unit Details to get the Ground Unit name displayed/printed.

Use the landmarks facility below to define target areas to aid in the placement of ground-units.

Redisplaying the Map

The View->Refresh menu item redisplays the map and includes your new waypoint path. Now you can enter the next set of waypoints.

Zoom Back

The View->Zoom Back menu item redisplays the map at the previous size.

Zoom Reset

The View->Zoom Reset menu item redisplays the map at the original size.

Printing

File->Print will print the current map to your default printer (NOT the Print file).

Landmarks

A new category in the CfsMe.ini file, they are displayed on the map and are intended to represent Targets and fixed features of the landscape. Currently only a few entries are included, please send me any suggestions for inclusion. Format:
<Name=<Lat>,<>;Long>[,<alt>] Optionally a 'border' can be defined that will be drawn on the map screen and may be used to define the limits of a target area and aid in laying-out units in the target area.
<Name>=<Lat>,<Long>,[<alt>], <TLLat>,<TLLong>,<TRLat>,<TRLong>, <BRLat>,<BRLong>,<BLLat>,<BLLong>
The four co-ordinate pairs are plotted clockwise on the map (TopLeft, TopRight, BottomRight,BottomLeft).
e.g.
ResCentre=N61 0.4385,E6 21.1647,0,N61 1.7007,E6 22.48,N61 0.5202,E6 24.5729,N60 59.7875,E6 23.04,N61 0.247,E6 20.1874
Use slew mode+co-ordinate display to find the exact coordinates you need if you wish to edit the .ini file yourself.

Click View->Ground Unit Details to get the border displayed/printed.

Tips

To get a log file detailing CFS errors loading missions ensure the combatfs.cfg file includes:
[PREFS]
LOG_FILE=ERROR.LOG
Press the [Error Log] button to view the file.

History

0.97 17th December 1999

0.92 30th April 1999

Runway outlines and Ground layout borders, better support for waypoints and ground-units.
Bug-fixes (eg NT support, leading zeros on co-ordinates), a few small bells & whistles and probably a few new bugs.

0.90 1st April 1999

Thanks to the prompting of Claude Vermonet now supports binary coastline maps, including a low-resolution map of the World and a very high resolution map of NW Europe. Due to the size these are downloadable seperately.
Supports long-file names via vbasm.dll (courtesy SoftCircuits Programming)

0.86 26th March 1999

Calculates Time & Heading between Waypoints.
This facility utilises the Cfsme.dll file which uses a few lines of code from Ted Wrights NAV program. The source for the DLL and the GNU Public License are included in CfsMeDLL.zip.

A Print file can be defined in the .ini file, several forms have Print buttons that append to this file.
You can then edit and physically print the file as you require.

0.85 15th March 1999

MS Excel Editor integration, Bug-fix & Map improvements

0.83 5th March 1999

Bug-fix & improved Map with Coastlines, Graphical waypoints & units facilities

0.81 26th February 1999

Bug-fix & improved Map & Graphical waypoints facilities

0.8 24th February 1999

Added Map & Graphical waypoints facilities

0.71 11th February 1999

Bug-fix where runways created incorrectly

 0.7 10th February 1999

Bug-fix where allegiance was not always set for unit_types.

0.6 5th February 1999

Enhanced support for formations - select formation type from drop-down list, double-click on empty element to fill it. Duplicate button on Units form.
More drop-down lists, includes Anders Martinssons latest unit descriptions, bug-fixes

0.5 29th January 1999

Multiple similar windows (e.g cut & paste between formations), includes Anders Martinssons unit descriptions, bug-fixes

0.4 26th January 1999

Combo boxes (drop down lists) used for several fields to explain contents.
BUG:Do not use spaces in cfsdir .ini file value.

0.3 22nd January 1999

Changing Mission:Map, Unit Types: Type Id and Runway:Id automatically loads the correct defaults for those ids.
Unit Types:Name is a drop down list containing all units (as defined by MS), click one to change the current unit type.
Unit: Name is a drop-down list of all Unit types in the current mission (if you add/change a type, you have to close and reload the unit form to see it in the list)
The cfsme.ini file contains all this info and should be in the same directory as the program
You can add imported planes to the ini file with notepad.

0.2 18th January 1999

First General release.
Now some cross-referencing between screens.
Fixes problems in Beta. Still no help, validation or verification.

0.1 11th January 1999

Beta. No help, validation, verification or cross-referencing between screens.

New missions created in CfsMe.exe directory!

Distribution

This program is FreeWare and may be distributed non-commercially freely, but must NOT be charged for.
Please contact the Author if you wish to distribute the software in any commercial manner.