EECH

NEWS

UTILS

DOWNLOADS

MAPS

LINKS

Utils

This guide is written by Starhoy
(formatting edited by RobFox)

Guide to Map Bin EDitor (BED)

Last revised: 14 April 2001

    Table of contents:

  1. Introduction
  2. Campaign Structure
  3. Tutorial - Creating a simple campaign with BED
  4. Hints and tricks

Introduction

Campaign creation for EECH is not something new, the first new campaign was modified Lebanon, made by CEP}I{AHT for second =RAF= vs PRIDE war, many months ago, and the first campaign for EEAH map was Cuban "skirmish" by Spawnbob. With extensive Dave Lomas' help, there are few mysteries remaining in EECH campaign engine.

Not a long time ago CEP}I{AHT told me about his idea to create skirmishes for EEAH maps. My own idea was to make balanced campaigns for multiplayer on EEAH maps - and I started to work on it. I was surprised, how flexible the game engine is and how well it adapts to new situations that can be created but new skirmishes were still out of question, because file that describes map population, .bin file, was too difficult to change with hex editor. Here CEP}I{AHT remembered that RobFox wrote some version of editor for the bin file long ago, and contacted him in a hope to get some sources. It was an excellent move that brought us much more than we could ever dream of .

This guide's goal is to make creation of campaigns in Enemy Engaged as simple as it is now possible with the BED - a wonderful new editor by RobFox. The editor is constantly improving, so the guide will be always obsolete, I hope.

Starshoy

back to top

Campaign Structure

The BED made the most difficult part of campaign editing - changes in the .bin file a quick and comfortable task. However, with any editor, only following elements are modifiable in campaigns and skirmishes:

  1. You may change what sectors of the map belong to whom initially. During campaign itself it will be changed, depending on your success.

  2. You may add, remove or move FARPs, SAMs, carriers, airbases and other objects (called keysites). Of those FARPs and military bases should be moved very carefully, and Airbases probably not at all.

  3. You may change briefing, reserves, regeneration speed and exact composition of aircraft on bases and carriers (not on FARPs)

You cannot create new map, edit landscape. Changes in weapons or AI are not related to campaign editing.

Campaigns and skirmishes are located in subdirectories under root directory, normally named Razorworks, in the following path:
    razorworks\common\maps\mapN,
where N is a number of the map, as follows:

  1. Thailand
  2. Cuba
  3. Georgia
  4. Taiwan
  5. Lebanon
  6. Yemen

Generally speaking you can name the subdirectories as you wish, but in original game they are named camp01 and skirm01-skirm06. I named my campaigns camp02, etc, and skirmishes RAFskirm01, etc. In order not to overwrite somebody else's skirmishes and campaigns, I'd recommend to use some prefix of yours. I think, I plan to rename my campaigns accordingly.

Campaigns and skirmishes subdirectories contain the following files:

.scr looks like a legacy file. I don't know what it does and it does not seem necessary at all. I think you can omit it, or copy it from camp01, or just refer to camp01 dir.

.chc (for instance, Georgia.chc, Lebanon.chc) is, in a sense, the main campaign file, as it refers to other files. Generally, the file may be located in any subdirectory of mapN directory, you can even put several of them in one dir. Other files can be located anywhere at all, as they are listed in .chc, but I of course would recommend to put all campaign files together, as Razorworks did.

.chc is a text file, it contains campaign briefing, description of carriers and airbases for each side and an exact composition of aircrafts there. It also describes number of units in reserve and regeneration speed of them, and some other details. There is no difference between .chc and .skr that I know of, except .chc will produce engagements listed under campaigns menu, while .skr - under skirmishes menu. I freely renamed them, or even created copies of one campaign with these two file types. In this case it appeared in both places.

.sid is a graphic file in format compatible with Photoshop .psd. You can (but don't need anymore) to edit it with graphics editor. It consists of two layers, only one of them, completely composed of Blue and Red pixels is actually used. Each pixel corresponds to one map sector and defines who will be an owner of the objects placed there. Here is how it looks:

Photoshop

.bin is the most complex file, which was very difficult to edit before RobFox created the BED. It contains coordinates and descriptions of objects populating the map. There are 4 categories, listed there:

  1. KEYSITE TEMPLATES. Every of the templates describe one site, located on the map. The site may be a block of the city, a port, a military base, etc. Description consists of template type and a set of 3D objects composing it. For instance, military base may consist of about 30 3D objects, such as fences, radar domes, bunkers, etc. The most important template characteristic is it's type, as campaign engine will regard the same set of 3D objects it as a military base, a civilian building or a power station depending on type. Here is a full list of template types:
  2.  Code  Type  Comments
    1-14 Decorative
     1  SPACE  Trees, Parking spaces, etc.
     2  HOUSING  
     3  OFFICE  
     4  OFFICE  
     5  CULTURAL  
     6  CHURCH  
     7  OUTSKIRTS  
     8  not used  
     9  not used  
     10  PORTSE  Ships, Barrels, Cranes
     11  PORTNW  same as PORTSE
     12  MILITARY  Barracks, fences, towers.
     13  FARM  
     14  OIL  Pipelines, refineries, depots
    15-20 Key Objects - can be mission or campaign targets
     15  KEY POWER  "Power Plant" in briefings
     16  KEY RADIO  "Transmitter"
     17  KEY INDUSTRY  "Factory"
     18  KEY PORT  "Port"
     19  KEY MILITARY  "Military Base"
     20  KEY OIL  "Refinery"
    21-30 Decorative
     21  CONSTRUCTION  Frame, Crane
     22  RUIN  Temple, Castle
     23  WATER  Water Tower
     24-30  ROAD,ROADBASE  Sidewalks, Shops, Houses
  3. KEYSITES - An element of the list consists of template number and co-ordinates.
  4. AIRBASES - An element of the list consists of object type (i.e. RUSSIAN_AIRPORT09. AMERICAN_FARP04) and coordinates.
  5. SAMs - coordinates only. Will create a pair of SAM/AAA.

When the campaign is loaded, the game engine will read chc/skr, and then bin and sid file referenced there. It will assign sectors to Red and Blue in accordance with layout in SID file. It then will populate them with corresponding units as follows:

  1. For every SAM in bin, a pair of SAM/AAA will be created - in accordance with sector they will become Vulcan / Chaparral or their Russian counterparts.
  2. Each side's FARPs will be populated with helicopters in accordance with this sequence:
    1. Recon-Attack and Assault
    2. Recon-Attack and Attack
    3. Attack and Assault
    4. Recon-Attack only
    5. repeat step 1
  3. Every FARP or Airbase located at sea became a carrier - if it is also listed in chc file, otherwise it is ignored. Helicopter groups for carriers and escort ships should be also listed there.
  4. Airbases with their helicopters and planes should be listed in chc too. If not listed, the airbase will likely to be activated later nevertheless, but it cannot became a campaign objective.
  5. In the end the game assigns up to five campaign goals for the following objects:
back to top

Tutorial. Creating a simple campaign with BED.

The best way to learn the editor is to create something with it. Here is an example of creation a small skirmish on Cuba Map. 

First of all, go to \Razorworks\common\maps\map2 and copy camp01 directory under new name, for instance Newskirm01. The directory should contain 4 files that I mentioned above - Cuba.chc, Cuba.bin, Cuba. sid and Cuba.scr

Then call BED. Go to Options->Change Map and Select map #2

A map of Cuba will appear:

MapCuba

The map is nice but empty. Now we want to populate it. To do so we need to load Cuba.bin file in our newly created directory. Go to File->Load , and select \Razorworks\common\maps\map2\Newskirm01\Cuba.bin . Nothing will change at first, but when we check Keysites,Airbases and SAMs boxes, we'll see that the map is now densely populated.

BinLoaded

May be too densely, in fact. To find a nice place for a skirmish we are interested in FARPs and Airbases, so let us turn off the rest. You can also change the shape and color of these 3 categories in accordance with your taste. It can be done with Options->Setting menu.

Config

So now we can clearly see all FARPs, bases and carriers. I like for the skirmish the area highlighted on a picture below - it has 4 FARPs that can be distributed between 2 factions, and some hills, which will offer protection.

TheArea

Let us zoom in the area. To do so we will first center the map around the area by Shift/Click ing on it. Then we use the Zoom tool.

ZoomIn

Now it is time to distribute sectors between factions. First we need to load SID file. Go to File->Load Faction Assignment and select \Razorworks\common\maps\map2\Newskirm01\Cuba.sid

The BED will switch from Show Heights to Show Factions mode and the map will become all Red and BLue. Every sector can be given to another faction by Alt/Click ing on it. To paint large areas of map, change "Sectors" value in the toolbar to the right of the map. 0 means only clicked sector, 1 - 1 adjacent sector on every side (3x3 rectangle), and so on.  When done, we should Save Faction Assignment in the same file.

RedBlue

Let us Zoom Out now to the most general view by clicking at Globe icon and switch back to Heights view. We need to remove a lot of objects not used in our skirmish. First of all, let us remove all SAMs - we'll place those that we need with ease later.  To do so, we click on SAMs  button, select all of them in the list by using Shift and press Delete button:

DeleteSAM

It is possible to use the same method to remove FARPs and Airbases, but we don't want to delete the 4 that we need for the skirmish. Mass-destruction is still possible, because in all Razorwork's maps FARPs and airbases in the bin go sequentially from bottom to top, but there is another way to select an object that we want to delete or move. When we Control/Click on a place in a map, the nearest object will be selected. It can be then deleted. If we want to move it to another place, we can press Place button and click where we want it, but I never would recommend moving aribases at all, and even moving FARPs this way is very dangerous, because the new place should be absolutely flat. 

SelectFARP

Now we need to create some objectives for the campaign - as FARPs cannot be campaign goals. Cuba is EEAH map, and default campaigns have only Carriers and Airbases usable as goals. But we do not have this limitation. We can create a new template, give it a type of Oil Refinery or Power Plant (or Military Base, but these also require a flat place, otherwise insertion mission may stuck) - and add 3D objects that we want. I actually did it for skirmishes in Caucasus and you can do it too, but it is a very big and slow work. There is much easier way now - you can import templates from other maps. Suppose, I want to add oil depots and other structures like that from Lebanon map. In this case I Save all our work in Cuba.bin, load Lebanon.bin instead, go to Keysite templates list and select several Oil structures. Then I Export Templates to some external file. 

Export

Now let us return back to Cuba. After we Import Templates from the file we exported them to, we can see Lebanon OIl templates in the list of Keysite Templates.

NewKeysite

We have only two things left to do with bin file. We need to add oil refineries that we imported and add some SAMs to protect them. Both of these tasks are easy to perform in BED, but it is highly unlikely that you'll place them right in the first attempt. Keysites may be placed nearly everywhere but they will only look good on a reasonably flat place, and you have to find this place and may be move them later. SAMs do not require a flat place but cannot be located in forests, so you'll need to experiment. As of placing itself, it is very easy. When in Keysites menu, click on Add button, confirm keysite creation (don't worry about co-ordinates) and then press Place and click on the map where you want it to be located. Do the same for SAMs.

Addkeysite

Save everything. We've done with bin editing, but when we'll likely return to it later to slightly move SAMs and Oil depots. Now we need to make some changes in our chc/skr file.

First of all, we are making skirmish, so let us rename it to Cuba.skr. Now, open it:

The header looks like:

////////////////////////////////////////////////////////////////////////////////
:START
////////////////////////////////////////////////////////////////////////////////
:TITLE Cuban Crisis
////////////////////////////////////////////////////////////////////////////////

:SHORT_TEXT_START
Campaign Cuba Text
:TEXT_END

Change the :TITLE to something new and unique, otherwise it won't appear in the menu (or will replace an original with the same name). With :SHORT_TEXT_START you can actually make some internationalization, and I might explain it later, but for now you can just write any text you want. My header looked like that after changes:

////////////////////////////////////////////////////////////////////////////////
:START
////////////////////////////////////////////////////////////////////////////////
:TITLE =RAF= Cuban Skirmish 1
////////////////////////////////////////////////////////////////////////////////

:SHORT_TEXT_START
Destroy enemy oil depot!
:TEXT_END

Next section:

:CAMPAIGN_DATA
:FILENAME ..\COMMON\MAPS\MAP2\CAMP01\CUBA.SID
:FILENAME ..\COMMON\MAPS\MAP2\CAMP01\CUBA.BIN

:MAP_X_SIZE 120
:MAP_Z_SIZE 64
:MAP_SECTOR_SIZE 4096

:FACTION
:SIDE SIDE_BLUE_FORCE
:COLOUR COL_BLUE

:FACTION
:SIDE SIDE_RED_FORCE
:COLOUR COL_RED

:END

:CAMPAIGN_REQUIRES_APACHE_HAVOC 1

Filenames should be changed, other parts not to be touched. For skirmishes a window, restricting the area may be added. My file looked like this after changes:

:CAMPAIGN_DATA
:FILENAME ..\COMMON\MAPS\MAP2\RAFskirm01\CUBA.SID
:FILENAME ..\COMMON\MAPS\MAP2\RAFskirm01\CUBA.BIN

:MAP_X_SIZE 120
:MAP_Z_SIZE 64
:MAP_SECTOR_SIZE 4096

:MAP_X_MIN 320000
:MAP_Z_MIN 65000
:MAP_X_MAX 370000
:MAP_Z_MAX 120000


:FACTION
:SIDE SIDE_BLUE_FORCE
:COLOUR COL_BLUE

:FACTION
:SIDE SIDE_RED_FORCE
:COLOUR COL_RED

:END

:CAMPAIGN_REQUIRES_APACHE_HAVOC 1

 

To calculate X (horizontal) and Z (vertical) co-ordinates, get Map sectors and multiply them by 4096.  X you can take from BED, it shows it, but Z in bin file is different, as it goes from to to bottom, not from bottom to top like in chc. 

Next section describes hardware reserves for the Blue side (there is similar section for the Red side below)

////////////////////////////////////////////////////////////////////////////////
:FACTION
:SIDE SIDE_BLUE_FORCE
:COLOUR COL_BLUE
:ATTITUDE FORCE_ATTITUDE_DESTRUCTIVE
////////////////////////////////////////////////////////////////////////////////

:HARDWARE_RESERVES
:TYPE ARMED_FIXED_WING
:COUNT 10
:TYPE UNARMED_FIXED_WING
:COUNT 10
:TYPE ARMED_HELICOPTER
:COUNT 10
:TYPE UNARMED_HELICOPTER
:COUNT 10
:TYPE ARMED_ROUTED_VEHICLE
:COUNT 10
:TYPE UNARMED_ROUTED_VEHICLE
:COUNT 10
:TYPE ARMED_SHIP_VEHICLE
:COUNT 10
:TYPE UNARMED_SHIP_VEHICLE
:COUNT 1

///////////////////////////////////////////
:REGEN_FREQUENCY 180
:FRONTLINE_FORCES 10
///////////////////////////////////////////

The section describes how many of units of every type you have in reserve. In case of losses they would be regenerating every 180 sec for every regenerator available, until reserves are exausted. In this particular skirmish though we do not have regenerators, so it is not relevant. I never changed FRONTLINE_FORCES, but if I remeber correctly, it defines a size of  your ground groups.

After that we have descriptions of airbases and carriers, for instance:

////////////////////////////////////////////////////////////////////////////////
:KEYSITE KEYSITE_ANCHORAGE
:NAME USS TARAWA
:TYPE LANDING_HELICOPTER
:AMMO_SUPPLIES 100
:FUEL_SUPPLIES 100
/////////////////////////////////////////////

:CREATE_MEMBERS
:GROUP GROUP_ASSAULT_SHIP
:MEMBER VEHICLE_TARAWA_CLASS
:COUNT 1
:MOBILE_KEYSITE
:FORMATION_COMPONENT AIRCRAFT_CARRIER_GROUP

///////////////////////////////////////////

:CREATE_GROUP
:GROUP GROUP_RECON_HELICOPTER
:TYPE HELICOPTER_LIGHT_RECON_GROUP
// 2 members

:CREATE_GROUP
:GROUP GROUP_MARINE_ATTACK_HELICOPTER
:TYPE HELICOPTER_MARINE_ATTACK_GROUP_A
// 2 members

:CREATE_GROUP
:GROUP GROUP_MARINE_ATTACK_HELICOPTER
:TYPE HELICOPTER_MARINE_ATTACK_GROUP_B
// 2 members

:CREATE_GROUP
:GROUP GROUP_MARINE_ATTACK_HELICOPTER
:TYPE HELICOPTER_MARINE_ATTACK_GROUP_C
// 2 members

///////////////////////////////////////////

:CREATE_GROUP
:GROUP GROUP_FRIGATE
:TYPE FRIGATE_GROUP
// 2 members

:CREATE_GROUP
:GROUP GROUP_LANDING_CRAFT
:TYPE LANDING_GROUP
// 3 members

In this skirmish you should completely remove all these descriptions, as we deleted all carriers and bases. Otherwise if you change frontline and ownership of the base or a ship, you should move description of airbases to corresponding camp and replace description of carriers with corresponding enemy carriers . Pay attention that carrier names always should appear in the same order: 

USS TARAWA
USS SAIPAN
USS PELELIU
USS NASSAU
USS BELLEAU WOOD
USS ENTERPRISE

BODRY
ZHARKY
LADNY
SVIREPY
LEGKY
SILNY

Carriers with numbers higher than 6 are no name carriers, but we'll probably change it when some version of eechmods patch will be ready.  

The following section starting with 

////////////////////////////////////////////////////////////////////////////////
// Order Of Battle 
////////////////////////////////////////////////////////////////////////////////

allows you to personalize you troops somewhat, but is otherwise no interesting and probably should not be changed.

 And the last section

////////////////////////////////////////////////////////////////////////////////
General campaign flags
////////////////////////////////////////////////////////////////////////////////

:CALL :FILENAME ..\common\maps\map2\camp01\cuba.scr

////////////////////////////////////////////////////////////////////////////////
:END
////////////////////////////////////////////////////////////////////////////////

can be kept unchanged too, but I think you can remove reference to 

:CALL :FILENAME ..\common\maps\map2\camp01\cuba.scr

altogether, if you wish.

You skirmish is ready, you can start it and look in what strange places you put these oil tanks.

back to top

Hints and tricks.

Random observations and hints:

back to top