Campaign Description.ext: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (removed weaponPool from campaign class and added more parameters)
m (Some wiki formatting)
 
(29 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{note|this page is about '''Campaign Description.ext'''. For the mission version, please go to [[Description.ext]].}}
{{TOC|side}}
A campaign's '''Description.ext''' is the entry point to load a campaign's information; the campaign title, author and overview picture, the missions tree, everything displayed from the Campaigns screen is defined in it.


== Description ==
It must be well written to ensure a good campaign experience, as the flow of missions is defined in this file (a.k.a which mission should be played on which ending).
A campaign description.ext is the entry point to load campaign informations. It must '''not''' be confused with mission [[Description.ext]].
This config file can be accessed through [[campaignConfigFile]].
The campaign title, author and overview picture, the missions tree, everything displayed from the Campaigns screen will be loaded from it.


It is important to be well written to ensure a good campaign experience.
A campaign file (''myCampaign.pbo'') should not depend on any external resources to work but eventual mods!
The flow of missions is defined in this file (aka which mission should be played on which ending).


A campaign file (''myCampaign.pbo'') should need no other file to work (beside base game files and required mods)!
{{Feature|important|A wrongly formatted campaign's Description.ext can crash your game!}}


{{Important|A wrongly formatted Campaign Description.ext can crash your game!}}
{{Feature|informative|
* This page is about a campaign's Description.ext. For the mission version, please go to [[Description.ext]].
* For a tutorial on how to create a multiplayer campaign, see [[Arma 3: Multiplayer Campaign Creation]].
}}




== Directory structure ==
== Campaign Directory Structure ==
 
A campaign structure is the following:
A campaign structure is the following:
  myCampaignMainDirectory
  myCampaignDirectory
  myCampaignMainDirectory\description.ext
  myCampaignDirectory\'''description.ext'''
  myCampaignMainDirectory\mission'''s'''
  myCampaignDirectory\mission'''s'''
  myCampaignMainDirectory\mission'''s'''\mission01.VR
  myCampaignDirectory\mission'''s'''\mission01.VR
  myCampaignMainDirectory\mission'''s'''\mission02.VR
  myCampaignDirectory\mission'''s'''\mission02.VR
  (…)
  ...
 
Other files may appear at the root of myCampaignDirectory for sharing resources between missions, or storing the campaign overview image for example.
No files should appear in myCampaignDirectory\mission'''s''', only mission directories. Mission names do not matter nor impact the missions flow.
''Zmission.VR'' will not load after ''Amission.VR'' for example. The order is, again, defined in the '''description.ext''' file.
 
{{Feature|informative|You may have to manually create the '''''arma3rootDir''\Campaigns''' directory.}}


Other files may appear at the root of myCampaignMainDirectory for sharing resources between missions, or storing the campaign overview image for example.
No files should appear in myCampaignMainDirectory\mission'''s''' , only mission directories
Missions name doesn't matter nor impact the missions flow. ''Zmission.VR'' will '''not''' load after ''Amission.VR'' – the order is, again, defined in description.ext.


{{note|You may have to manually create '''''arma3rootDir''\Campaigns'''}}
== Missions Flow ==


== Missions flow ==
Missions flow structure is defined as follows:
Missions flow structure is defined as follows:
# The parent class is Campaign, nothing else.
* The parent class is Campaign, nothing else.
# Campaign is filled with chapters
* Campaign is filled with chapters
# Chapters are filled with missions and defined endings
* Chapters are filled with missions and defined endings
# Missions are filled with endings.
* Missions are filled with endings.


{{Important|Campaign cannot contain missions directly!}}
{{Feature|important|Campaign class cannot contain mission classes directly!}}


A campaign contains one to many chapters, and '''must''' define a parameter named '''firstBattle''' pointing to its first chapter.
* A campaign contains one to many chapters, and '''must''' define a parameter named '''firstBattle''' pointing to its first chapter.
A chapter contains one to many missions, and '''must''' define a parameter named '''firstMission''' pointing to its first mission.
* A chapter contains one to many missions, and '''must''' define a parameter named '''firstMission''' pointing to its first mission.
A mission must define its endings. A mission with an empty defined ending will follow its chapter ending.
* A mission must define its endings. A mission with an empty defined ending will follow its chapter ending.


=== Campaign ===


=== Campaign ===
This is the main class for missions flow definition. It is defined as follows:
This is the main class for missions flow definition. It is defined as follows:
class Campaign {{codecomment|// this is a reference class and the name '''cannot''' be customised}}
<syntaxhighlight lang="cpp">
{
class Campaign // this is a reference class, the name cannot be customised
'''firstBattle = Chapter1;''' {{codecomment|// which chapter should be loaded first. '''MUST''' be declared!}}
{
firstBattle = Chapter1; // which chapter should be loaded first. MUST be declared!
name = "my great campaign"; {{codecomment|// before Arma 3}}
briefingName = "my Arma 3 campaign"; {{codecomment|// Arma 3 - if undefined, an error popup will appear}}
author = "Username"; {{codecomment|// Arma 3 - if undefined, "by unknown community author" will replace author's name}}
overviewPicture = "overview.paa";
overviewText = $STR_A3_StageAOverview;
disableMP = 1; {{codecomment|// Arma 2 - if set to 1, forces the campaign as SinglePlayer}}
enableHub = 1; {{codecomment|// TBD - has to do with coming back to a "base"}}
(…)
};


name = "my great campaign"; // before Arma 3
briefingName = "my Arma 3 campaign"; // since Arma 3 - if undefined, an error popup will appear
author = "Username"; // since Arma 3 - if undefined, "by unknown community author" will replace author's name
overviewPicture = "overview.paa";
overviewText = "$STR_A3_StageAOverview";
disableMP = 1; // since Arma 2 - if set to 1, forces the campaign as SinglePlayer
enableHub = 1; // TBD - has to do with coming back to a "base"
// ...
};
</syntaxhighlight>


=== Chapters ===
=== Chapters ===
A chapter is defined inside [[#Campaign|Campaign]] block.
A chapter is defined inside [[#Campaign|Campaign]] block.
Multiple chapters can exist inside Campaign block. A chapter is defined as follows:
Multiple chapters can exist inside Campaign block. A chapter is defined as follows:
class Chapter1 {{codecomment|// name can be customised here - it will be used as reference, in firstBattle for example}}
<syntaxhighlight lang="cpp">
{
class Chapter1 // name can be customised here - it will be used as reference, in Campaign's {{hl|firstBattle}} for example
'''firstMission = Mission1;''' {{codecomment|// which mission should be loaded first. '''MUST''' be declared!}}
{
name = "My first chapter"; {{codecomment|// chapter name. Has no in-game impact}}
firstMission = Mission1; // which mission should be loaded first. MUST be declared!
cutscene = Chapter1Cutscene.VR; {{codecomment|// '''missions''' sub-directory. A cutscene is of course optional but the parameter '''MUST''' be declared ''(cutscene <nowiki>=</nowiki> ;)''}}
name = "My first chapter"; // chapter name. Has no in-game impact
end1 = ;
cutscene = Chapter1Cutscene.VR; // in the *missions* sub-directory. A cutscene is of course optional but the parameter MUST be declared (cutscene = ;)
(…)
end1 = ;
};
// ...
};
</syntaxhighlight>


There can be multiple chapters in a campaign, but this is optional. Campaign missions can very well be contained within a single chapter.
There can be multiple chapters in a campaign, but this is optional. Campaign missions can very well be contained within a single chapter.
Chapters are used for campaign organisation as well as adding some transition cutscenes.
Chapters are used for campaign organisation as well as adding some transition cutscenes.


=== Missions ===


=== Missions ===
A mission is defined inside [[#Chapters|a chapter]] and must target one of the '''missions''' sub-directories.
A mission is defined inside [[#Chapters|a chapter]] and must target one of the '''missions''' sub-directories.
Multiple missions can be inside a chapter. A Chapter is defined as follows:
Multiple missions can be inside a chapter. A mission is defined as follows:
class myMission1 {{codecomment|// name, such as chapter one, can be customised}}
<syntaxhighlight lang="cpp">
{
class myMission1 // name can be customised too
end1 = myMission2;
{
end2 = myMission3a;
end1 = myMission2; // next mission's classname
end3 = myMission3b;
end2 = myMission3a;
end4 = myMission2;
end3 = myMission3b;
end5 = ;
end4 = myMission2;
end6 = ;
end5 = ;
lost = myMission1;
end6 = ;
lost = myMission1;
template = myMissionDirectory.VR; {{codecomment|// '''missions''' sub-directory}}
 
};
template = myMissionDirectory.VR; // the mission directory itself, placed in the /missions/ sub-directory
};
</syntaxhighlight>
 
{{Feature|informative|Mission directories that are not declared anywhere in description.ext (such as mission or cutscene) are simply ignored.}}
 
{{ArgTitle|4|cutscene|{{GVI|ofp|1.00}}}}
Define a cutscene mission directory that will be played before the mission. The cutscene won't appear in missions list in the campaign screen.
 
{{ArgTitle|4|end1-6, lost|{{GVI|ofp|1.00}}}}
These ''end%'' and ''lost'' parameters are used to define which mission is next. An empty ending (<syntaxhighlight lang="cpp" inline>end1 = ;</syntaxhighlight>) will end the current chapter.
{{Feature|arma3|
''end1-6'' and ''lost'' are '''optional''' in {{arma3}}.
Since custom ending names can be used in {{arma3}} now (<sqf inline>"myCustomEnd" call BIS_fnc_endMission;</sqf> for example)
you can use your own custom name here (e.g <syntaxhighlight lang="cpp" inline>myCustomEnd = nextMission;</syntaxhighlight>).
}}
 
{{ArgTitle|4|endDefault|{{GVI|arma3|1.00}}}}
Fallback value in case an undefined ending is used, avoiding the game to crash.
<syntaxhighlight lang="cpp">
endDefault = ; // valid
</syntaxhighlight>
 
{{ArgTitle|4|repeat|{{GVI|arma3|1.00}}}}
''Allow mission to repeat?''
<syntaxhighlight lang="cpp">
repeat = 1; // 0: disabled - 1: enabled. Default: 0
</syntaxhighlight>
 
{{ArgTitle|4|isHub|{{GVI|arma3|1.00}}}}
Define a mission to be hub. May have to do with '''CfgHubs'''.
<syntaxhighlight lang="cpp">
isHub = 1; // 0: disabled - 1: enabled. Default: 0
</syntaxhighlight>
 
 
== Description.fsm ==
 
Since {{arma3}}, an [[FSM]] (compiled with "campaignFSMA3.cfg" FSM config) can be included in a chapter (here named "Missions"):
<spoiler text="Show Example">
<syntaxhighlight lang="cpp">
// East Wind's Description.ext
 
weaponPool = 1;
 
class Campaign
{
name = "$STR_A3_CampaignName";
firstBattle = Missions;
disableMP = 1;
enableHub = 1;
 
briefingName = "$STR_A3_CampaignName";
author = "$STR_A3_Bohemia_Interactive";
overviewPicture = "a3\Missions_F_EPA\data\img\Campaign_overview_CA.paa";
overviewText = "$STR_A3_StageAOverview";
 
class MissionDefault
{
lives = -1;
 
lost = ;
end1 = ;
end2 = ;
end3 = ;
end4 = ;
end5 = ;
end6 = ;
};
 
class Missions
{
name = "The Beginning";
cutscene = ;
firstMission = A_in;
end1 = ;
end2 = ;
end3 = ;
end4 = ;
end5 = ;
end6 = ;
lost = ;
 
/*#define _DISABLE_DESCRIPTION 1*/
 
#define _CAMPAIGN 1
 
#include "description.fsm" // here is the FSM
};
};
</syntaxhighlight>
</spoiler>
{{Feature|informative|
FSM information found in description.fsm:
'''PROJECT SPLENDID'''<br>
'''CAMPAIGN FSM'''
* State names are mission classes
* Condition names can be anything (even empty)
* Condition "conditions" field can contain code which has to return true in order to make the mission available.<br><!--
-->Other missions' classes can be used as variables.<br><!--
-->Empty field returns true by default
}}
 
The FSM entry point (titled "A_in1") contains the following data:
<syntaxhighlight lang="cpp">
endDefault = A_in2;
noWeaponPool = 1;
isIntro = 1;
</syntaxhighlight>
 
These are usual config entries that could be found in a normal config. Other possible values found:
<syntaxhighlight lang="cpp">
isHub = 1;
isHubMission = 1;
isOutro = 1;
isSkirmish = 1;
repeat = 1;
</syntaxhighlight>
 
 
== Root Parameters ==
 
{{Feature|important|Additional root parameters must be placed '''outside''' the [[#Campaign|Campaign class]] to be effective!}}
 
{{ArgTitle|4|directory|{{GVI|arma3|1.00}}}}
Define the campaign directory, used when campaign is part of an addon.
<syntaxhighlight lang="cpp">
directory = "A3\Missions_F_EPA\Campaign";
</syntaxhighlight>


{{note|Mission directories that are not declared anywhere in description.ext (as mission or cutscene) are simply ignored.}}
{{ArgTitle|4|filterGroup|{{GVI|arma3|1.00}}}}
''Usage unknown.''
<syntaxhighlight lang="cpp">
filterGroup = 3;
</syntaxhighlight>


{{ArgTitle|4|weaponPool|{{GVI|ofpr|1.75}}}}
A campaign automatically enables [[:Category:Command Group: Weapon Pool|weapon pool]].
This parameter allows equipment transferred from one campaign mission to the next to be available during the briefing in the gear menu.
<syntaxhighlight lang="cpp">
weaponPool = 1; // 0: disabled - 1: enabled. Default: 0
</syntaxhighlight>


== Additional settings ==


=== weaponPool ===
== Full Example ==
''weaponPool = 1;'' {{codecomment|// 0: disabled, 1: enabled - since OFP:R v1.75: allows weapon pool to be used in mission briefing}}


<spoiler text="See full example">
<syntaxhighlight lang="cpp">
/*
"MissionDefault", "NoEndings" etc. are arbitrary class names. MissionDefault is Bohemia standard name for missions parent class.
Left to itself, simply inheriting the mission default means you will exit the game at the end of mission/chapter (and will be done on last(s) mission(s).


== Full example ==
An end that is used but not defined (e.g "end6") WILL crash the game.
{{codecomment|/*
*/
'''MissionDefault''', '''NoEndings''' etc. are arbitrary. '''MissionDefault''' is an accepted de-facto standard name for missions to inherit.
class NoEndings
Left to itself, simply inheriting the mission default means you will exit the game at the end of mission/chapter.
{
Indeed the last chapter (if any) last mission does exactly this.
// Arma 3
But, almost all classes that inherit '''MissionDefault''' will modify some or most of those mission defaults.
endDefault = ;
The intent is to stop tedious typing for every mission. '''An end that is used but not defined (e.g "end6") will crash the game.'''}}
 
*/
// pre-Arma 3
class NoEndings
end1 = ;
{
end2 = ;
end1 = ;
end3 = ;
end2 = ;
end4 = ;
end3 = ;
end5 = ;
end4 = ;
end6 = ;
end5 = ;
lost = ;
end6 = ;
};
lost = ;
 
};
class MissionDefault : NoEndings
{
class MissionDefault : NoEndings
lives = -1; // this sets your "lives" to none - old OFP setting where you would lose a "life" every time you retried the mission, never used
{  
noAward =  1; // TBD
lives = -1; {{codecomment|// this sets your "lives" to none - old OFP setting where you would lose a "life" every time you retried the mission, never used}}
cutscene = ; // mandatory definition
noAward =  1; {{codecomment|// TBD}}
};
cutscene = ; {{codecomment|// mandatory definition}}
 
};
// additional parameters go here
weaponPool = 1;
''weaponPool = 1;'' {{codecomment|// since OFP:R v1.75: allows weapon pool to be used in mission briefing}}
 
class Campaign
class Campaign
{
{
name = "My Great Campaign"; // before Arma 3
  name = "My Great Campaign"; {{codecomment|// < Arma 3}}
briefingName = "My Great Campaign"; // since Arma 3
  briefingName = "My Great Campaign"; {{codecomment|// Arma 3}}
author = "John Doe";
firstBattle = Chapter1;
overviewText = "You are a soldier on an island. Try killing the enemies and not dying to survive.";
 
class Chapter1 : NoEndings
firstBattle = Chapter1;
{
disableMP = 0; // this campaign is multiplayer-compatible
firstMission = Chapter1_Mission1;
 
end1 = Chapter2; {{codecomment|// other endings are defined by inheritance from NoEndings}}
class Chapter1 : NoEndings
{
class Chapter1_Mission1 : MissionDefault
firstMission = Chapter1_Mission1;
{
end1 = Chapter2; // other endings are defined by inheritance from NoEndings
end1 = Chapter1_Mission2; {{codecomment|// other endings are defined by inheritance from MissionDefault, inheriting from NoEndings}}
 
end2 = ; {{codecomment|// end2 will end Chapter 1, therefore going to Chapter 2}}
class Chapter1_Mission1 : MissionDefault
template = C1M1.VR;
{
};
end1 = Chapter1_Mission2; // other endings are defined by inheritance from MissionDefault, inheriting from NoEndings
class Chapter1_Mission2 : MissionDefault
end2 = ; // end2 will end Chapter 1, therefore going to Chapter 2
{
template = C1M1.VR;
end1 = ; {{codecomment|// not defining the ending will use the Chapter ending corresponding to end1: ''Chapter2'' here}}
};
 
template = C1M2.VR;
class Chapter1_Mission2 : MissionDefault
};
{
};
end1 = ; // not defining the ending will use the Chapter ending corresponding to end1: Chapter2 here
template = C1M2.VR;
class Chapter2 : NoEndings
};
{
};
firstMission = Chapter2_Mission1;
 
end1 = LastChapter;
class Chapter2 : NoEndings
{
{{codecomment|// this mission is named Chapter2_Mission1 for clarity purpose,
firstMission = Chapter2_Mission1;
// but both Chapter1_Mission1 and Chapter2_Mission1 could have been named Mission1 as game engine respects Chapter hierarchy.
end1 = LastChapter;
// do not, however, name two missions the same '''in the same chapter'''}}
 
class Chapter2_Mission1 : MissionDefault
// this mission is named Chapter2_Mission1 for clarity purpose,
{
// but both Chapter1_Mission1 and Chapter2_Mission1 could have been named Mission1 as game engine respects Chapter hierarchy.
end1 = ; {{codecomment|// not defining the ending will use the Chapter ending corresponding to end1: ''LastChapter'' here}}
// do not, however, name two missions the same -in the same chapter-
class Chapter2_Mission1 : MissionDefault
template = C2M1.VR;
{
};
end1 = ; // not defining the ending will use the Chapter ending corresponding to end1: LastChapter here
};
template = C2M1.VR;
};
class LastChapter : NoEndings
};
{
 
firstMission = Chapter3_Mission1;
class LastChapter : NoEndings
{{codecomment|// no endings provided: because of NoEndings inheritence this is the same as writing
{
// end1 <nowiki>=</nowiki> ;
firstMission = Chapter3_Mission1;
// end2 <nowiki>=</nowiki> ;
// no endings provided: because of NoEndings inheritance this is the same as writing 'endDefault = ;'
// end3 <nowiki>=</nowiki> ;
class Chapter3_Mission1
// end4 <nowiki>=</nowiki> ;
{
// end5 <nowiki>=</nowiki> ;
// not defining the ending will use the Chapter ending corresponding to end1: NOTHING here, closing the campaign
// end6 <nowiki>=</nowiki> ;
template = C3M1.VR;
// lost <nowiki>=</nowiki> ;}}
};
class Chapter3_Mission1
};
{
};
{{codecomment|// not defining the ending will use the Chapter ending corresponding to end1: '''NOTHING''' here, closing the campaign}}
</syntaxhighlight>
template = C3M1.VR;
</spoiler>
};
};
};




== Recommendations ==
== Recommendations ==
If you don't know for sure what you are doing, follow these advices:
 
If you do not know for sure what you are doing, follow these advices:
* try and make all the missions work stand-alone, then place them all in the '''Missions''' directory
* try and make all the missions work stand-alone, then place them all in the '''Missions''' directory
* don't force yourself to use many chapters. They are useful to organise properly a lot of missions, but if your campaign doesn't have many, don't oversplit it.
* do not force yourself to use many chapters. Chapters are useful to organise a lot of missions, but if your campaign does not have many, do not oversplit it.
* you can test your campaign structure by allowing file patching (in Arma 3 launcher, or ''arma3.exe -filePatching'') and placing your campaign in the ''campaign'''s''''' directory
* you can test your campaign structure by allowing file patching (in [[Arma 3: Launcher|{{arma3}} launcher]], or ''arma3.exe -filePatching'') and placing your campaign in the ''campaign'''s''''' directory.
 


[[Category:Operation Flashpoint: Editing]]
[[Category:Mission Editing]]
[[Category:ArmA: Mission Editing]]
[[Category:ArmA 2: Editing]]
[[Category:Arma 3: Editing]]
[[Category:Mission Editor]]

Latest revision as of 16:13, 10 June 2023

A campaign's Description.ext is the entry point to load a campaign's information; the campaign title, author and overview picture, the missions tree, everything displayed from the Campaigns screen is defined in it.

It must be well written to ensure a good campaign experience, as the flow of missions is defined in this file (a.k.a which mission should be played on which ending). This config file can be accessed through campaignConfigFile.

A campaign file (myCampaign.pbo) should not depend on any external resources to work but eventual mods!

A wrongly formatted campaign's Description.ext can crash your game!


Campaign Directory Structure

A campaign structure is the following:

myCampaignDirectory
myCampaignDirectory\description.ext
myCampaignDirectory\missions
myCampaignDirectory\missions\mission01.VR
myCampaignDirectory\missions\mission02.VR
...

Other files may appear at the root of myCampaignDirectory for sharing resources between missions, or storing the campaign overview image for example. No files should appear in myCampaignDirectory\missions, only mission directories. Mission names do not matter nor impact the missions flow. Zmission.VR will not load after Amission.VR for example. The order is, again, defined in the description.ext file.

You may have to manually create the arma3rootDir\Campaigns directory.


Missions Flow

Missions flow structure is defined as follows:

  • The parent class is Campaign, nothing else.
  • Campaign is filled with chapters
  • Chapters are filled with missions and defined endings
  • Missions are filled with endings.
Campaign class cannot contain mission classes directly!
  • A campaign contains one to many chapters, and must define a parameter named firstBattle pointing to its first chapter.
  • A chapter contains one to many missions, and must define a parameter named firstMission pointing to its first mission.
  • A mission must define its endings. A mission with an empty defined ending will follow its chapter ending.

Campaign

This is the main class for missions flow definition. It is defined as follows:

class Campaign // this is a reference class, the name cannot be customised
{
	firstBattle	= Chapter1;						// which chapter should be loaded first. MUST be declared!

	name			= "my great campaign";		// before Arma 3
	briefingName	= "my Arma 3 campaign";		// since Arma 3 - if undefined, an error popup will appear
	author			= "Username";				// since Arma 3 - if undefined, "by unknown community author" will replace author's name
	overviewPicture	= "overview.paa";
	overviewText	= "$STR_A3_StageAOverview";
	disableMP		= 1;						// since Arma 2 - if set to 1, forces the campaign as SinglePlayer
	enableHub		= 1;						// TBD - has to do with coming back to a "base"
	// ...
};

Chapters

A chapter is defined inside Campaign block. Multiple chapters can exist inside Campaign block. A chapter is defined as follows:

class Chapter1 // name can be customised here - it will be used as reference, in Campaign's {{hl|firstBattle}} for example
{
	firstMission	= Mission1;				// which mission should be loaded first. MUST be declared!
	name			= "My first chapter";	// chapter name. Has no in-game impact
	cutscene		= Chapter1Cutscene.VR;	// in the *missions* sub-directory. A cutscene is of course optional but the parameter MUST be declared (cutscene = ;)
	end1			= ;
	// ...
};

There can be multiple chapters in a campaign, but this is optional. Campaign missions can very well be contained within a single chapter. Chapters are used for campaign organisation as well as adding some transition cutscenes.

Missions

A mission is defined inside a chapter and must target one of the missions sub-directories. Multiple missions can be inside a chapter. A mission is defined as follows:

class myMission1 // name can be customised too
{
	end1 = myMission2; // next mission's classname
	end2 = myMission3a;
	end3 = myMission3b;
	end4 = myMission2;
	end5 = ;
	end6 = ;
	lost = myMission1;

	template = myMissionDirectory.VR; // the mission directory itself, placed in the /missions/ sub-directory
};
Mission directories that are not declared anywhere in description.ext (such as mission or cutscene) are simply ignored.

cutscene

Define a cutscene mission directory that will be played before the mission. The cutscene won't appear in missions list in the campaign screen.

end1-6, lost

These end% and lost parameters are used to define which mission is next. An empty ending (end1 = ;) will end the current chapter.

Arma 3
end1-6 and lost are optional in Arma 3.

Since custom ending names can be used in Arma 3 now ("myCustomEnd" call BIS_fnc_endMission; for example)

you can use your own custom name here (e.g myCustomEnd = nextMission;).

endDefault

Fallback value in case an undefined ending is used, avoiding the game to crash.

endDefault = ; // valid

repeat

Allow mission to repeat?

repeat = 1; // 0: disabled - 1: enabled. Default: 0

isHub

Define a mission to be hub. May have to do with CfgHubs.

isHub = 1; // 0: disabled - 1: enabled. Default: 0


Description.fsm

Since Arma 3, an FSM (compiled with "campaignFSMA3.cfg" FSM config) can be included in a chapter (here named "Missions"):

// East Wind's Description.ext

weaponPool = 1;

class Campaign
{
	name = "$STR_A3_CampaignName";
	firstBattle = Missions;
	disableMP = 1;
	enableHub = 1;

	briefingName = "$STR_A3_CampaignName";
	author = "$STR_A3_Bohemia_Interactive";
	overviewPicture = "a3\Missions_F_EPA\data\img\Campaign_overview_CA.paa";
	overviewText = "$STR_A3_StageAOverview";

	class MissionDefault
	{
		lives = -1;

		lost = ;
		end1 = ;
		end2 = ;
		end3 = ;
		end4 = ;
		end5 = ;
		end6 = ;
	};

	class Missions
	{
		name = "The Beginning";
		cutscene = ;
		firstMission = A_in;
		end1 = ;
		end2 = ;
		end3 = ;
		end4 = ;
		end5 = ;
		end6 = ;
		lost = ;

		/*#define _DISABLE_DESCRIPTION	1*/

		#define _CAMPAIGN 1

		#include "description.fsm" // here is the FSM
	};
};
↑ Back to spoiler's top

FSM information found in description.fsm:

PROJECT SPLENDID
CAMPAIGN FSM

  • State names are mission classes
  • Condition names can be anything (even empty)
  • Condition "conditions" field can contain code which has to return true in order to make the mission available.
    Other missions' classes can be used as variables.
    Empty field returns true by default

The FSM entry point (titled "A_in1") contains the following data:

endDefault = A_in2;
noWeaponPool = 1;
isIntro = 1;

These are usual config entries that could be found in a normal config. Other possible values found:

isHub = 1;
isHubMission = 1;
isOutro = 1;
isSkirmish = 1;
repeat = 1;


Root Parameters

Additional root parameters must be placed outside the Campaign class to be effective!

directory

Define the campaign directory, used when campaign is part of an addon.

directory = "A3\Missions_F_EPA\Campaign";

filterGroup

Usage unknown.

filterGroup = 3;

weaponPool

A campaign automatically enables weapon pool. This parameter allows equipment transferred from one campaign mission to the next to be available during the briefing in the gear menu.

weaponPool = 1; // 0: disabled - 1: enabled. Default: 0


Full Example

/*
	"MissionDefault", "NoEndings" etc. are arbitrary class names. MissionDefault is Bohemia standard name for missions parent class.
	Left to itself, simply inheriting the mission default means you will exit the game at the end of mission/chapter (and will be done on last(s) mission(s).

	An end that is used but not defined (e.g "end6") WILL crash the game.
*/
class NoEndings
{
	// Arma 3
	endDefault = ;

	// pre-Arma 3
	end1 = ;
	end2 = ;
	end3 = ;
	end4 = ;
	end5 = ;
	end6 = ;
	lost = ;
};

class MissionDefault : NoEndings
{
	lives		= -1;	// this sets your "lives" to none - old OFP setting where you would lose a "life" every time you retried the mission, never used
	noAward		=  1;	// TBD
	cutscene	= ;		// mandatory definition
};

// additional parameters go here
weaponPool		= 1;

class Campaign
{
	name			= "My Great Campaign";	// before Arma 3
	briefingName	= "My Great Campaign";	// since Arma 3
	author			= "John Doe";
	overviewText	= "You are a soldier on an island. Try killing the enemies and not dying to survive.";

	firstBattle	= Chapter1;
	disableMP	= 0; // this campaign is multiplayer-compatible

	class Chapter1 : NoEndings
	{
		firstMission = Chapter1_Mission1;
		end1 = Chapter2; // other endings are defined by inheritance from NoEndings

		class Chapter1_Mission1 : MissionDefault
		{
			end1 = Chapter1_Mission2;	// other endings are defined by inheritance from MissionDefault, inheriting from NoEndings
			end2 = ;					// end2 will end Chapter 1, therefore going to Chapter 2
			template = C1M1.VR;
		};

		class Chapter1_Mission2 : MissionDefault
		{
			end1 = ; // not defining the ending will use the Chapter ending corresponding to end1: Chapter2 here
			template = C1M2.VR;
		};
	};

	class Chapter2 : NoEndings
	{
		firstMission = Chapter2_Mission1;
		end1 = LastChapter;

		// this mission is named Chapter2_Mission1 for clarity purpose,
		// but both Chapter1_Mission1 and Chapter2_Mission1 could have been named Mission1 as game engine respects Chapter hierarchy.
		// do not, however, name two missions the same -in the same chapter-
		class Chapter2_Mission1 : MissionDefault
		{
			end1 = ; // not defining the ending will use the Chapter ending corresponding to end1: LastChapter here
			template = C2M1.VR;
		};
	};

	class LastChapter : NoEndings
	{
		firstMission = Chapter3_Mission1;
		// no endings provided: because of NoEndings inheritance this is the same as writing 'endDefault = ;'
		class Chapter3_Mission1
		{
			// not defining the ending will use the Chapter ending corresponding to end1: NOTHING here, closing the campaign
			template = C3M1.VR;
		};
	};
};
↑ Back to spoiler's top


Recommendations

If you do not know for sure what you are doing, follow these advices:

  • try and make all the missions work stand-alone, then place them all in the Missions directory
  • do not force yourself to use many chapters. Chapters are useful to organise a lot of missions, but if your campaign does not have many, do not oversplit it.
  • you can test your campaign structure by allowing file patching (in Arma 3 launcher, or arma3.exe -filePatching) and placing your campaign in the campaigns directory.