RDNWiki: DOWMissionEditor/Tutorials/RdnTutorialCampaignFile ...

RDN Wiki Home | Page Index | Recent Changes | Recently Commented | Users | Registration | Login:  Password:  

Campaign File Tutorial


Contents

Introduction


Welcome to the first SCAR & Dawn of War Mission Editor (ME) tutorial. This tutorial is setup as an introduction to the SCAR scripting system and to the Warhammer 40,000: Dawn of War Mission Editor. It is separated into various smaller tutorials that will guide you along in the creation of a fairly basic mission. In essence this tutorial will teach you what is necessary to create a Dawn of War single player campaign. While we will not be creating a full map and mission, we will be creating a prototype mission that will be fully playable (if somewhat short), and include many of the scripting elements found in the single player game.


Before you begin this tutorial, it may be a good idea for you to read the Lua reference manual, while it is a little dry it will give you an idea of what LUA (and hence SCAR) are capable of. The LUA reference manual can be found at this URL: http://www.lua.org/manual/5.0/


We are going to be creating an Eldar single mission mini-campaign that contains a sequence or two.


By following this tutorial along, you will gain enough knowledge to go off and create your own custom single player campaigns that recreate the frontline combat feel of the Warhammer universe. Many of the things that you learn in this tutorial can also be applied to the creation of multiplayer games.


Setting up the Campaign File


The first thing you'll want to do if you want to create a single player campaign is create the campaign file (which is actually just a LUA file, but with a different file extension). This campaign file outlines what missions are in your campaign, which missions include briefings is what allows your custom Campaign to be played from the Single player menu in Dawn of War. Basically, what you have to do is create a text file and rename it to have a .camp extension (note that as previously stated, while a LUA file, this file needs to have a .camp extension in order for the game engine to recognize it), for instance My Campaign.camp, and place it in your /W40k/Data/Scenarios/SP folder. The campaign file, is composed of several parts, each of which is describes in detail below (as well as the DOW Campaign file docs).


Go ahead and create a ME.camp file now and place it in your /W40k/Data/Scenarios/SP folder. This file will remain blank at the moment.


Name & ModName

The Name and ModName variables must be present in your .camp file and describe both the name of the campaign that is displayed in game, as well as the “mod” that the map is designed for.


The Name variable determines what the name of the campaign that will appear in game. For example, if we wanted to call our campaign “My Eldar Campaign” we'd have the following:


Name = "My Eldar Campaign"

Which would look something like the following in game:


Following this we need to define the ModName variable, which should in almost all instances be set to “w40k”. Note that without this variable, the game will not display your campaign on the campaign selection screen.


ModName = "w40k";

MissionVideoFolder


Following this we need to define the MissionVideoFolder variable, which determines the name of the sub-folder in the /W40k/Movies/ folder where our campaign's briefing movies are retrieved from. You can leave this empty, unless you're planning on creating a set of movies to go along with your campaign. Hence we have:


MissionVideoFolder = "";

Note that while this variable may be empty, it needs to be defined.

Also note that missions in the campaign video folder will be played in order according to their name, and are not associated with a given mission through the campaign file, at least not in a direct way. Basically the first mission will trigger the first video according to its name, where the first video associated with mission 1 is M01. the second one M02, and so on..


Missions Table


Finally comes the biggest part of our campaign, listing out the missions that are part of our campaign. While our campaign files contains only a single mission, adding more missions to the campaign is trivial.


The Missions in a campaign are defined in the Missions lua table. Our single mission can be defined as follows.


Missions =
{
	{
		name = "My Mission Name",
		mission_file = "MyMission",
		skiptonextmission = 0,
		mission_audio = "MyMission-Audio",
		mission_music = "ambient_ingame_01",
		mission_music_volume = 75,
		mission_description = "description displayed on top of screen",
		mission_facts = 
		{
			"Paragraph1.",
			"Paragraph2.",
		}
	},
}

The above should be fairly self-explanatory. Our mission is defined by a set of variables that determine what sounds get played, what makes up the mission and so forth. Note that the use of commas to separate table cell entries is very important, be especially careful when placing these.. Here's the actual meaning of each of the variables:
name : This is the name of the mission that gets displayed on the campaign mission screen.
mission_file : This is the name of the filename associated with the campaign.
skiptonextmission : This is a quick debugging command that allows you to skip over the mission if you're working on a mission that happens to follow it.
mission_audio : This is the folder that contains the speech events associated with the mission briefing. This can be omitted.
mission_music : This determines what music will be played during the briefing. Music files that can be played are located in he \W40k\Data_Sound\<quality>\Sound\Music directory, where <quality> is either High medium or low.
mission_music_volume : This determines the volume of the music played during the briefing
mission_facts : This is a set of strings, each of which are considered a paragraph in the mission overview screen. Note that each string must be on one line and there is no text formatting that you can use, only block paragraphs are supported at the moment.

So now that we know what each of these variable denotes, let us fill it out for our example first Eldar mission info info, which ends up looking something like this:


Missions =
{
	{
		name = "Eldar Mission 1",
		mission_file = "ME01",
		skiptonextmission = 0,
		--mission_audio = "MS02-Briefing",
		mission_music = "ambient_ingame_01",
		mission_music_volume = 75,
		mission_description = "Eldar Mission 1",
		mission_facts = 
		{
			"The Space Marines have fortified a vital position, and are holding strong. We have been able to infiltrate the area with a small force and the marines are unaware of our presence. Build up a force and eliminate them.",
			"Be swift! Marine reinforcements are on the way and will arrive in 15 minutes",
		}
	},
}

Hence, our complete ME.camp file, up to this point, looks like the following:

-- Campaign

Name = "My Eldar Campaign"

ModName = "w40k"

-- the name of the sub-folder in  /Movies/ where 
-- this campaign's briefing movies are retrieved from
MissionVideoFolder = ""

Missions =
{
	{
        	name = "Eldar Mission 1",
		mission_file = "ME01",
		skiptonextmission = 0,
		--mission_audio = "MS02-Briefing",
		mission_music = "ambient_ingame_01",
		mission_music_volume = 75,
		mission_description = "Eldar Mission 1",
		mission_facts = 
		{
			"The Space Marines have fortified a vital position, and are holding strong. We have been able to infiltrate the area with a small force and the marines are unaware of our presence. Build up a force and eliminate them.",
			"Be swift! Marine reinforcements are on the way and will arrive in 15 minutes",
		}
	},
}

One thing to note is the use of --, which in lua (and thus in scar) denotes a comment. In general, it's a good idea to comment anything that you're doing that is unclear in order to allow other people that look at your scar scripts to understand what your intentions were and how you accomplished them.

Conclusions


This concludes the Campaign File tutorial. As you have seen the campaign file is fairly basic, but flexible enough so that it allows you to easily tie together a set of missions into a coherent campaign. If you want more information the campaign file, please take a look at the associated RDN campaign doc file.


Of course, we really don't have a mission yet, and no campaign to speak of. The next tutorial will teach you how to create a map, and tie it in with the campaign interface.

Links


Mission Editor Tutorials
Mission Editor
Home

End of Page

Referring pages: DOWMissionEditor/Tutorials
FAQ

There are no files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]