bolox
02-26-2012, 11:39 AM
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.
http://forum.1cpublishing.eu/showpost.php?p=326974&postcount=3
This shows the edits needed in the main “campaigns.ini” file, in bold
Notes-in red text
[Main]
campaign_gb
campaign_de
campaign_501 campaign name
[campaign_gb]
folder campaign_gb
title Cliffs Of Dover
image Poster.bmp
[campaign_de]
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.
Campaign.mis
This is really simple :
[PARTS]
core.100
bob.100
[MAIN]
MAP Land$English_Channel_1940
BattleArea 150000 100000 100000 150000 1000
TIME 12
WeatherIndex 0
CloudsHeight 0
BreezeActivity 0
ThermalActivity 0
[splines]
[CustomChiefs]
[Stationary]
[Buildings]
[BuildingsLinks]
appears to be all you need. I just copied one from another campaign.
Campaign.ini
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:-
[Battles]
"1"
"2"
"3"
"4"
"5"
……..
"24"
"25"
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.
[1]
<Name>
MainIntro
<Description>
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”
<Slide>
Campaign.jpg pic which appears in campaign ‘start’ screen
<Caption>
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…
Briefings
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
Missions
Not a lot to add here, Heinkill’s dummies guide covers most things
http://simhq.com/forum/ubbthreads.php/topics/3423371/IL2_Cliffs_of_Dover_Full_Missi.html#Post3423371
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?
Scripting
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.
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.
http://forum.1cpublishing.eu/showpost.php?p=326974&postcount=3
This shows the edits needed in the main “campaigns.ini” file, in bold
Notes-in red text
[Main]
campaign_gb
campaign_de
campaign_501 campaign name
[campaign_gb]
folder campaign_gb
title Cliffs Of Dover
image Poster.bmp
[campaign_de]
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.
Campaign.mis
This is really simple :
[PARTS]
core.100
bob.100
[MAIN]
MAP Land$English_Channel_1940
BattleArea 150000 100000 100000 150000 1000
TIME 12
WeatherIndex 0
CloudsHeight 0
BreezeActivity 0
ThermalActivity 0
[splines]
[CustomChiefs]
[Stationary]
[Buildings]
[BuildingsLinks]
appears to be all you need. I just copied one from another campaign.
Campaign.ini
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:-
[Battles]
"1"
"2"
"3"
"4"
"5"
……..
"24"
"25"
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.
[1]
<Name>
MainIntro
<Description>
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”
<Slide>
Campaign.jpg pic which appears in campaign ‘start’ screen
<Caption>
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…
Briefings
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
Missions
Not a lot to add here, Heinkill’s dummies guide covers most things
http://simhq.com/forum/ubbthreads.php/topics/3423371/IL2_Cliffs_of_Dover_Full_Missi.html#Post3423371
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?
Scripting
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.