PDA

View Full Version : Campaign



Duke John
05-03-2004, 12:23
Chapter 2: Campaign

Foreword
This chapter will be a different from the rest as it will be more like a grand tutorial as opposed to explaining different elements.
Below you can follow step-by-step how you can add an expansion to the game. As explained in the introduction, an expansion adds new features to the game without affecting the original game. At the end I will explain how you can take this a step further and make it conversion.

Expansions are the basis of a conversion or an extensive add-on. I would advise against using this method if you only change little things and use the original campaignmap. The reason for this is that this method results in a far larger (MB) mod as opposed to a basic mod.

Cheers, Duke John

Contents
2.1 Making a basic campaign

[/list]2.2 Adding an expansion

[/list]2.3 Customizing the campaign

[/list][/list]

Duke John
05-03-2004, 12:24
2.1 Adding a basic campaign
Original author: Lord of Storms
Original article: Help me with Creating Units (http://www.totalwar.org/cgi-bin/forum/ikonboard.cgi?act=ST;f=26;t=13313)


To be edited and formatted.

The Mod txt file or modified era file is the foundation of all mods, this is a very simple how to on creating a basic mod txt file.
I will be using the Early txt file as an example. You may choose any era file to start your mod.
Go to My ComputerC:/Program Files/Total War/Medieval Total War/Campmap/Startpos.
Double click on the Early txt file to open it.
In the top left corner, click on File to open the drop down list of options.Choose Save as and select a new file name.
You can use any name for this file I will use Mod.txt
Enter your txt file name and click on Save.
Now we have a basic Mod txt file to start working in.
Now scroll down the file to this heading.

//========================================
//campaign name: can either be text or a
//label. Set predefined accordingly
//========================================
cn_predefined::true
cn_title::Early Period Title
cn_short_title::Early Period Short Title

//========================================
//campaign description: can either be text
//or a label. set predefined accordingly
//========================================
cd_predefined::true
cd_line::Era_Description_EARLY
cd_predefined::true

//========================================
//hidden: set to true or false
//true means it won't show up on custom battle screens
//========================================
cd_hidden::false

For our Mod txt file to function we must make some changes.
Change cd_predefined:: true to cd_predefined::false
The cn_title is the mod name and will appear on the period select screen. you may choose any title you wish.
cn_title:: Mod (Be sure to use the quotation marks)
cn_short_title::Mod {Be sure to use the quotation marks)
The next lines define the description of your campaign, when you choose your mod from the period select, the description you enter here will show at the bottom of the screen.
Change cd_predefined::true to cd_predefined::false
cd_line::My_new_Mod what you enter here will be on the era background descriptions.
cd_predefined:: false (note: this line is for version 1.0 and 1.1 it is not used in 2.0
cd_hidden:: false the header explains that this is used to make your mod txt appear on the custom battle menu or not.
After you have made these changes double check everything then save. Now start MTW and when you reach the period select screen you will see your Mod as one of the choices.
Note: sometimes the Mod title will be at the bottom of the list be sure to scroll through the choices to make sure your title is there. If you followed these steps you should now have a working Mod txt file , from which you will be able to build your Mod. LOS

Duke John
05-03-2004, 13:03
2.2 Making an expansion
Original author: Barocca
Original article: Adding a new expansion to VI (http://www.totalwar.org/cgi-bin/forum/ikonboard.cgi?act=ST;f=26;t=12901)

2.2.1 Some notes beforehand
In this chapter it is assumed that your expansion will be called Mod. Most likely you want a different name for your mod. Files and folders will be typed in [i]italic. Scripting code will be typed in Courier. I assume that you are looking into the MTW installation folder. So when I type \Textures I mean c:\Program Files\Medieval\Textures if you installed M:TW into c:\Program Files\Medieval.

2.2.2 Making the initial setup
The quickest way to make an expansion is by copying Viking Invasion campaignfiles and renaming them to your campaign name, in this tutorial it will be Mod.

Folders/Directories

Copy/Paste the following folder:
\Battle\Flags\Vikings
and rename it to
\Battle\Flags\Mod

Copy/Paste the following folder:
\campmap\GameEnd\Vikings
and rename it to
\campmap\GameEnd\Mod

Copy/Paste the following folder:
campmap\Portraits\Vikings
and rename it to
\campmap\Protraits\Mod

Copy/Paste the following folder:
campmap\pieces\Vikings
and rename it to
campmap\pieces\Mod

Copy/Paste the following folder:
campmap\pieces\Units\Christian\Shields\Vikings
and rename it to
campmap\pieces\Units\Christian\Shields\Mod

Copy/Paste the following folder:
campmap\pieces\Units\Muslim\Shields\Vikings
and rename it to
campmap\pieces\Units\Muslim\Shields\Mod

Copy/Paste the following folder:
Textures\campmap\Vikings
and rename it to
Textures\campamp\Mod

Seperate files

Copy/Paste the following file:
\Loc\Eng\viking_faction_specific.TXT
and rename it to
\Loc\Eng\mod_faction_specific.TXT

Copy/Paste the following file:
\Loc\Eng\viking_region_specific.TXT
and rename it to
\Loc\Eng\mod_region_specific.TXT

Copy/Paste the following file:
\campmap\names\viking_heroes.txt
and rename it to
\campmap\names\mod_heroes.txt

Copy/Paste the following file:
\campmap\startpos\Viking.txt
and rename it to
\campmap\startpos\Mod.txt

Copy/Paste the following file:
\Viking_build_prod.txt
and rename it to
Mod_build_prod.txt

Copy/Paste the following file:
Viking_unit_prod.txt
and rename it to
Mod_unit_prod.txt


2.2.2 Adjusting the files
Before you have a workable expansion you need to adjust some text files. In the changes you will also my own personal comments (a comment start with // , the program doesn't look at what follows). I included these as I think that they are clearer than the original. You may include them or not.
Since this forum does not support tabs I strongly advise against copying the below scripting code and pasting it into the text files. You really should copy/edit existing line and take extreme care with the tabs and spacing One of the most common mistakes made are done by accidently deleting a tab.

Campaignfile
Open \campmap\startpos\Mod.txt with your text editor.

Find the following://========================================
//campaign name: can either be text or a
//label. Set predefined accordingly
//========================================
cn_predefined::true
cn_title::Viking Period Title
cn_short_title::Viking Period Short Title

//========================================
//campaign description: can either be text
//or a label. set predefined accordingly
//========================================
cd_predefined::true
cd_line::Era_description_VIKING[/list]And change it into:// ******************************************************************
// * Campaign name: can either be text or a label. Set predefined accordingly
// ******************************************************************
cn_predefined::false
cn_title::Mod title
cn_short_title::Mod

// ******************************************************************
// * Campaign description: can either be text or a label. Set predefined accordingly
// ******************************************************************
cd_predefined::false
cd_line::Description to be added.[/list]
Find the following:// Do not specify the full path,
// only requires the name of the subdirectory off textures\campmap.

SetMapTexturesSubdir:: vikings[/list]And change it into:// ******************************************************************
// * Set the sub-directory where this gametype's map files can be found.
// * Do not specify the full path, only requires the name of the subdirectory off
// * textures\campmap.
// ******************************************************************

SetMapTexturesSubdir:: mod[/list]
Find the following://all Prodfiles must be stored in the Medieval root folder

Prodfiles:: UNITPROD vikings_unit_prod.txt BUILDINGPROD vikings_build_prod.txt[/list]And change it into:// ******************************************************************
// * Production files to be used for this campaign.
// * These files are located in the root directory of the installation.
// ******************************************************************

Prodfiles:: UNITPROD mod_unit_prod.txt BUILDINGPROD mod_build_prod.txt[/list]

Find the following://========================================
//Set the region specific string file for this startpos
//========================================

RegionSpecificFile:: viking_region_specific.txt[/list]
And change it into:// * Override function for the portraits.
// * New Portraits folder should be located in:
// * \campmap\Portraits\Mod\
// ******************************************************************

PortraitsOverride:: FN_07 Vikings[/list]

Find the following://========================================
//Set the names and hero file for this startpos
//========================================

SetNameData:: campmap\\names\\viking_heroes.txt[/list]
And change it into:// ******************************************************************
// * Set the names and hero file for this startpos
// ******************************************************************

SetNameData:: campmap\\names\\mod_heroes.txt[/list]

Find the following://========================================
//Set the region specific string file for this startpos
//========================================

RegionSpecificFile:: viking_region_specific.txt[/list]
And change it into:// ******************************************************************
// * Set the region specific string file for this startpos
// ******************************************************************

RegionSpecificFile:: mod_region_specific.txt[/list]

Find the following://========================================
//Set the faction specific string file for this startpos
//========================================

FactionSpecificFile:: viking_faction_specific.txt[/list]
And change it into:// ******************************************************************
// * Set the faction specific string file for this startpos
// ******************************************************************

FactionSpecificFile:: mod_faction_specific.txt[/list]


2.1.3 Customizing the campaign

Duke John
05-03-2004, 13:04
2.3 Customizing the campaign

2.3.1 Campaign title

Predefined
Open your Campaign.txt with a text-editor. You can edit the campaign titles below the following comment://========================================
//campaign name: can either be text or a
//label. Set predefined accordingly
//========================================
cn_predefined::true
cn_title::Campaign Title Tag
cn_short_title::Campaign Short Title Tag[/list]Where:true - is a flag to make M:TW know that you want to use predefined titles.
Campaign Title Tag -
Campaign Short Title Tag - [/list]

Not predefined
Open your Campaign.txt with a text-editor. You can edit the campaign titles below the following comment://========================================
//campaign name: can either be text or a
//label. Set predefined accordingly
//========================================
cn_predefined::false
cn_title::Campaign Title
cn_short_title::Campaign Short Title[/list]Where:false - is a flag to make M:TW know that you do not want to use predefined titles.
Campaign Title - is the campaign title that is shown when selecting the era you want to play in.
Campaign Short Title - is the short campaign title. Shouldn't be longer then 6 letters.[/list]

2.3.2 Campaign dates
Original authors: dunno (http://www.totalwar.org/cgi-bin/forum/ikonboard.cgi?act=Profile;CODE=03;MID=100-2011)
Original article: Playing to later dates (http://www.totalwar.org/cgi-bin/forum/ikonboard.cgi?act=ST;f=26;t=16182)

Setting ending date of the campaign
Not readily available in Early, High, Late campaigns but can be freely added.SetGameEndDate:: 1066[/list]

Duke John
06-26-2004, 14:33
VikingHorde has edited the original regowner table so that is becomes a lot easier to adjust the Homelands. Homelands are used for Glorious Achievements.

regowner_table formatted by Viking Horde (http://www.totalwar.org/Downloads/Mtw_Uploads/MTWupload/regowner_table_formatted_VikingHorde.zip)

Many thanks to VikingHorde http://www.totalwar.org/forum/non-cgi/emoticons/medievalcheers.gif