Editing DCG

Although many parts of DCG can be edited through the DCG program, all DCG campaign files are text based and can also be edited using NotePad or another text editor.  Instructions for each file are below:

Editing the Campaign File

The campaign file is fully editable with NotePad or any other text editor.  It consists of the campaign date, the end date, and the position of the frontline.  The first  line of the campaign file consist of the date (DD/MM/YYYY).  The second line consists of the end date.  The third line of the file sets which way the front runs as well as which side of the lines the player starts on.  The value of side must always be one of the following (capitalization included): North, South, East, West.  In the example below, the side is "East".  The player's nation begins East of the frontlines which forces the lines to automatically run North to South. 

The side value must be followed by a space and the frontline information which consists of the header and two waypoints.  The front line will always run vertical on the map (whether North to South or East to West) no matter what values are entered and will crash if more than two waypoints are entered.

The frontline must be followed by a space. 

date=07/08/1942
end_date=31/12/1945
side=East

[frontline.0]
waypoint.0=S8* 32.00',E159* 99.99'
waypoint.1=S12* 14.11',E159* 99.99'

Editing the Squadron  File

This file contains data on all squadrons including the player's.   The player's aircraft type must match the name of the plane's CFS2 folder. The update is the date (DD/MM/YYYY) the aircraft type in the line below is available for the squadron.  The second id_type must be set to "none" or an aircraft type.  The player's allegiance must also be set (1 for British, 2 for German, 3 for American, 4 for Japanese) and a base selected.  The base must be in the runways.dcg file or must be a carrier found in the ships.dcg.  Skill is the average skill level of pilots entering the squad (from 0 to 4).  Note: this is not yet activated.

Planes is the number of planes currently in the squad.  The players squadron should never have more than 8 planes nor less than 1. 

[player squadron]
name=VMF-223
type_id=f4f4_wildcat
update=01/01/1944
type_id=f6f3_hellcat
allegiance=3
base=Henderson
skill=1
planes=8

Here is an example of one squadron.  This format must be followed exactly or the program will crash.  Note the lack of spaces before and after equal signs.

[squadron.0]
name=VMF-223
startdt=01/01/1942
allegiance=3
type_id=sbd2_dauntless
update=01/01/1944
type_id=none
base=Henderson
skill=1
planes=8
4 1 000 000 000 Frank Anderson
3 1 000 000 000 Harry Pendergrass
2 0 000 000 000 Mitchell Parks
1 1 000 000 000 Paul Roberts
2 1 000 000 000 Robert Jackson
1 2 000 000 000 Erik Marshall
1 1 000 000 000 Robert Bantry
1 0 000 000 000 Jason Lodge

The first line is the squadron ID.  These should be sequential in the file from 0 to a maximum of 14.  Next is the name of the squadron.  This can be any name you like.

The next line is the date the squadron becomes active in the campaign.  The format must be (DD/MM/YYYY).  Note that all days and months less than '10' must be in the format '0x' (for example, 01/01/1942). 

Allegiance determines which nation the squadron belongs: 3 = American, 4 = Japanese. 

Type_id is the model of the plane.  This name must match the aircraft folder name.  For example, the F4F4 Wildcat folder is f4f4_wildcat.  The update is the date (DD/MM/YYYY) the aircraft type in the line below is available for the squadron.  The second id_type must be set to "none" or an aircraft type. 

Base is the name of the base the squadron is located at.  This name must match one of the bases found in the dcgrways.txt file.

Skill is the average skill level of pilots entering the squad (from 0 to 4).  This value has not yet been activated.

Planes is the number of planes currently in the squad.  A squad should never have more than 8 planes nor less than 0, however, a squadron must always have 8 pilots.  The pilots are listed immediately beneath the plane number.  The format for these are:

skill(0-4) aggression(0-2) unused unused unused first_name last_name.

There must be one blank line between squadrons.  In future releases, the unused (000) categories will be missions flown, as well as planes shot down, and ground/ship targets destroyed should M$ fix a trigger bug....

Editing the Ships file

The ships file is very similar in structure to the squadron file.  Each naval squadron or vehicle unit consists of critical information about the squadron and the names of each ship/tank/truck.  The name is simply an identifier for the task force, for example "Admiral Fletcher" or "TF-1".  The startdt is the earliest date the squadron will appear.  The waypoint value indicates which waypoint in the taskforce's route, the taskforce is currently on.  After the number of ships, each ship is identified by its type and a name.  If the name is "Sunk", the ship will not appear in a mission.  "Sunk" ships are never replaced by the DCG.  They may be replaced by deleting the word "Sunk" and adding a new name.  Vehicles will be replaced and are idenfied by a "commander's" name.

[squadron.0]
name=Admiral Fletcher
startdt=01/10/1942
allegiance=3
skill=1
waypoint=0
ships=8
name=sha_enterprise_cv-6 Enterprise
name=sha_mahan Farenholt
name=sha_mahan Laffey
name=sha_indianapolis San Francisco
name=sha_indianapolis Boise
name=sha_indianapolis Salt Lake City
name=sha_mahan Buchanan
name=sha_mahan McCalla

A taskforce may contain more than one aircraft carrier however the first carrier must be in the first name slot (see example above).  If the player's carrier is sunk, his squadron will be automatically transfered.  IA squadrons will cease to function if their carrier is sunk.  More than two carriers per group is not recommended.

Editing/Importing the Taskforce file
Each naval squadron or vehicle unit in the ships.dcg must have a corresponding entry in the Taskforces.dcg and must appear in the same order.  The name in the ships.dcg should be the taskforce flagship type (if a carrier is in the taskforce, it should be entered here). The family type and category can be copied from the ship's dp file and the allegiance set ("3" for American, "4" for Japanese).  Note: most American ships' dp files have their allegiance as "1".  These should really be "3", however, DCG will recognize them as Allied.  The number after allegiance is the number of waypoints for the squadron (minus waypoint.0).

The easiest way to create an new taskforce file is to create a mission with only the player squadron and the paths of each squadron's flagship (only the flagship!).  Be careful not to run the waypoints too close to land if you don't want the ships to sail over it or too close to the water if you don't want vehicles to be "amphibious". Also, for the taskforce import function to work correctly, each taskforce should be represented by a different ship class or vehicle type.

Run DCG and import the mission using the "taskforce" menu.

[unit_type.0]
name=sha_indianapolis
unit_family=5
category=14
allegiance=3
waypoint=8
[waypoint_path.0]
waypoint.0=S15* 33.44',E167* 14.20'
waypoint.1=S15* 29.17',E167* 19.86'
waypoint.2=S14* 31.86',E167* 8.97'
waypoint.3=S11* 15.85',E164* 47.35'
waypoint.4=S9* 42.65',E161* 3.70'
waypoint.5=S9* 17.66',E160* 16.12'
waypoint.6=S9* 20.01',E160* 4.69'
waypoint.7=S9* 24.71',E160* 36.11'
waypoint.8=S10* 32.33',E162* 50.66'

Editing/Importing the Infrastructure file

Creating and modifying  this file is the simplist of all.  The infrastructure file consists of stationary objects (which may include ships, vehicles, and even aircraft).  Every stationary object is defined by a type and a location.  See example below:

[unit_type.0]
name=veh_50_cal_aa_mount
6

[unit.0]
1
position_lat=S9 26.1943
position_lon=E160 2.5277
position_alt=+56
position_pbh=0.0,0.0,0.0

The first line in the example above is the unit type ID.  The first unit type must be "0", the second "1", etc.  The second line is the name.  This must be the identifier as given by CFS2.  The third line is the number of units of that type.  In this case, there are six. 

There must be a blank line between the number of units and the first unit of that type.  Units must be number sequentially from "0" even units of a different type.  The second line of a unit is the "active" switch: 1 means the target is active, 0 means it is not (and will not appear in the next mission).  Units become inactive when destroyed in a mission and become active after a random period of time.  The next four lines control the units position and facing.

If you wish to add objects to the Guadalcanal beta campaign, simply create a "bare-bones" mission in the CFS2 Mission Builder program, with the stationary objects you would like to see appear in your campaign, save it and then run "Infrastrutures" in the "Import" Menu.  Afterwards, you may wish to manually go through the infrastructure file and change the allegiance of any of the installation types which default to '0' to a specific nationality although this is not necessary. 

Note: in the first mission(s) after importing a new infrastructure file, objects will not necessarily appear.  They will "arrive" randomly over time.  If you want any or all of them to appear at the start of the campaign, you must manually activate them as noted above by switching the "0" to "1".

Editing the Runways.dcg file

The runways.dcg file consists all the active bases ("runways")  in the campaign.  Every runway is defined as per the example below:

[runway.0]
Henderson
startdt=08/12/1942
strip=concrete

Any runway appearing in the runways.dcg file must have a matching entry in the airbase.dat file located in the "Info" folder.  For the "strip" entry, there are three possible types: 

strip=concrete  (Any landbase plane can operate out of it.)
strip=dirt  (Medium and heavy bombers cannot operate out of it.)
strip=sea (Only float and seaplanes can operate out of it.)

Each runway must be separated by a blank line.  Finally, no runway may use the same name as another runway or a location.

Editing the Locations.dcg file

The locations.dcg file consists all user defined locations in the campaign.  These locations will be used by the mission generator as target points, for example, cities, factories, port facilities, and static ground defenses.  Every location is defined as per the example below:

[label.0]
label_text=Tuluga
position_lat=S9* 5.07'
position_lon=E160* 10.12'

Note: all the information for a location can be generated from the CFS2 Mission Builder's "label" command.  It need only be copied and pasted from a mission file into the locations.dcg file and given a sequential number [label.0], [label.1], etc.  In addition, a name must be inserted into to the label text.  Each location must be separated by a blank line.  Finally, no location may use the same name as a runway or other location.

Combat Flight Simulator 2 is a product of Microsoft Corporation.