1C Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official 1C Company forum > 1C Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Thread Tools Display Modes
Old 02-26-2012, 12:39 PM
bolox bolox is offline
Approved Member
Join Date: May 2008
Posts: 351
Default Campaign Building For Dummies

This is an attempt to collate some of the things I’ve found out in the course of building a campaign.
These are very much empirical findings and may change due to further knowledge/patches.
If you know better/have new info PLEASE TELL US.
Most of what I’ve learned is by ‘pulling apart’ the work of others, the built in RAF campaign is quite instructive in different methods (partic scripts).
Dig around in the files, it might help get aquainted with how stuff works.

For the purposes of explanation I’ve used my 501 sqn campaign to illustrate points.

What is a campaign?

At it’s simplest a campaign is a series of missions, but being a MG game it has its quirks as to how to do this. This link may be useful to understand the file structure.
This shows the edits needed in the main “campaigns.ini” file, in bold
Notes-in red text

campaign_501 campaign name

folder campaign_gb
title Cliffs Of Dover
image Poster.bmp

folder campaign_de
title Adler Angriff
image Poster.bmp

[campaign_501] campaign name- same as [Main]
folder campaign_501 folder your campaign is stored in
title campaign_501 title of campaign- the campaign_ doesn’t appear in name
image waiting.bmp campaign selection pic

So, assuming you have your missions you need to create a folder in //….steamapps/…/parts/…/campaign/ folder and name it- in my case I used “campaign_501”
All your mission files/briefings, scripts go in here.
There are also 3 other files necessary to make/modify, a campaign.mis file, a campaign.ini file and a campaign briefing file.

This is really simple :

  MAP Land$English_Channel_1940
  BattleArea 150000 100000 100000 150000 1000
  TIME 12
  WeatherIndex 0
  CloudsHeight 0
  BreezeActivity 0
  ThermalActivity 0
appears to be all you need. I just copied one from another campaign.

This is the file that orders how the missions are played. It appears to be just a list of mission names enclosed in “ ” quotes. Mine looks like this:-

Again I ‘borrowed’ the file from another campaign and hen edited my mission names in.
At the moment I’m not sure how to do the ‘branching missions’

Campaign briefing

Things start to get a little complicated here. This is the file that contains your campaign descriptions and links to any media used.(atm sound in briefings doesn’t appear to work so I am only mentioning pics). It’s another text file and can be split into parts, each with a specific purpose.

July 25, 1940
You are a Sgt pilot with 501 Sqn,… // text shown in campaign selection screen- description of campaign.
This text also appears on lhs having selected campaign (start screen). The main campaign selection pic is defined in the main “campaigns.ini”

Campaign.jpg pic which appears in campaign ‘start’ screen
501 Sqn at Gravesend
July - September 1940//your text underneath pic on rhs of ‘start’ screen.

A general note- pics can be .bmp, .jpg, or .gif(animated doesn’t work)- those tested so far.
Text can be as long or short as you want, scroll bar appears automatically if needed.

So, now we have a ‘working’ campaign it’s probably a good point to look at the actual missions themselves…


Personally I find it easier to edit the briefing files in notepad, rather than in fmb, -but use what works for you.
The file is again split into sections by [] with numbers in each section. The ordering of the numbers doesn’t appear to matter.
I find it useful to ‘template’ the briefing file (partic if using same pics in sections) and then fill in the text by copy/paste etc. Really up to you to arrange this how you want to fit the ‘style’ of your campaign.

The [Intro] section appears at the ‘pre mission selection’ stage
The [Regular] section appears having selected the misson
I’ve usually used the [Mission] briefing to appear just before you fly (select this in fmb as players plane briefing in properties).
Then there are the success and failure sections.
So that’s 5 possible ways to impart information to the player


Not a lot to add here, Heinkill’s dummies guide covers most things

I would like to point out that playing with the skill levels individually seems to help shape the combat. The most ‘important’ appears to be visibility- keep this at average and the AI will not ‘notice’ enemy E/A until they are in a (3D) radius of ~ 1km. This can be very relevant if there is a height difference between airgroups.
Advanced flying is the other major one- keeping this below veteran level reduces the crazy barrel rolling. The rest are self explanatory, play around with levels for individual planes, partic in ‘target’ bomber groups?


The bit I know very little about!
It is also not strictly necessary- see campaign_de
The bit that is trickier than IL2 is the mission success- we now have to use scripts to do this. For campaigns you have to use something like: -
//$reference Campaign.dll
using System;
using System.Collections;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;

public class Mission : maddox.game.campaign.Mission 
// your code here
rather than the ‘normally’ used “A.Mission” class for multiplayer/single mission scripts. It would appear that A.Mission is ‘the same’ as campaign.Mission but doesn’t include the campaign success=true method. (and if someone who really knows want’s to correct this please do!).
This last bit is the bit that tells the game you’ve completed your mission- you just have to choose how this occurs!!
I’ve used 3 basic methods:
Success on landing(and crash landing)
Success on spawn
Success on passing through a ‘trigger’
Variations/combinations of these are of course possible(indeed the possibilities are huge-if you know what you are doing!!)

Scripting also gives the opportunity to ‘pass messages’ to players at certain times in the mission.
If nothing else the “GpHudLog” feature is extremely useful in testing to show when/if triggers are activated.
There is also a “SayToGroup” method to play ‘speech’ to player. I can forsee this being quite used in the future.( triggered radar vectors perhaps?)

Well, hope some of this helps,
Happy building/flying.
Reply With Quote
Old 02-26-2012, 10:21 PM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Senior Member
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143

There is a much better way of making campaigns. This method is far more powerful and flexible (and it won't get overwritten with every update). Here's a quick overview.

I. Be sure to have Visual Studio installed.

II. Download this example campaign that naryv posted. As far as I know, this is exactly the code that is used for the stock campaigns.

III. In the example campaign, open the Visual Studio solution at parts/tst/src/Campaign/TstCapaign.sln. Under "Solution Explorer" on the right, expand both "References" folders. Some of these will probably have errors. Right click on the "References" folder. Navigate to Steam/steamapps/common/il-2 sturmovik cliffs of dover/parts/core and add the references that are showing errors.

IV. Now, we will modify the code to work with our campaign. First, change the namespace at the top of both TstCampaign.cs and TstMission.cs to something like yourname.campaign. Next, go to lines 178 and 179 in TstCampaign.cs. Change USER_PATH and PATH to more appropriate values. USER_PATH is where the campaigns state files will be saved. make this something like "$user/mission/yourname/campaign/". PATH is where your campaigns.ini file will be placed. Make it something like "$home/parts/yourname/campaign/".

V. Save all of the files you've modified and press F6. This will compile the code. Hopefully, you don't get errors. The compiled .dlls can be found in TstCampaign/parts/tst/src/Campaign/TstCampaign/bin/debug and TstCampaign/parts/tst/src/Campaign/TstCampaign/bin/debug. You will need to modify the script files for your missions to user your new .dlls. This is very simple. There is an example of this in naryv's campaign.

VI. Open the xml file in TstCampaign/AddIns using Visual Studio. Change name="TstCampaign" to the name of your campaign. Change type="tst.campaign.Campaigns" to match your campaign. Using our previous example, we would make it type="yourname.campaign.Campaigns". Change path="$home/parts/tst/TstCampaign.dll" to the location where your newly compiled .dlls will be stored. Something like path="$home/parts/yourname/yourCampaign.dll". Be sure that the name of your .dll matches the name in your xml file. Change text="Tst Campaign" to the name you want your campaign to appear under in the main menu.

VII. After saving the xml file, we now have everything we need. To install your campaign, all you have to do is copy your xml file into Steam/steamapps/common/il-2 sturmovik cliffs of dover/AddIns. Then, put the two .dll files you compiled into the appropriate directory in "parts". In our example, we would put them into parts/yourname. Now, take the campaigns.ini file and folder containing the missions and put them into the folder you specified in the TstCampaign code. In our example, this was parts/yourname/campaign/. After putting everything together, you should be able to start Cliffs of Dover and see your campaigns in the menu.

That was a very brief overview of how to set up a basic campaign. There are many many more possibilities, but I don't have time to write a full guide
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 04:01 AM.

Based on a design by: Miner Skinz.com

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2007 1C Company. All rights reserved.