Please register for Total War Access to use the forums. If you're an existing user, your forum details will be merged with Total War Access if you register with the same email or username. For more information please read our FAQ’s here.


A few How To's on Modding MTW and MTW VI

Maeda_ToshiieMaeda_Toshiie Senior MemberSingaporeRegistered Users Posts: 3,601
From the original thread. I am condensing individual posts. This thread serves as a beginner's guide to modding MTW.

The Lord Of Storms (02/08/04)

Greetings Fellow Modders,
Below are a few How to posts I have done over at the Org's Dungeon.
I thought I would compile the info all in one thread for easy reading.
I hope it is of some use Cheers...LOS


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_title::"Early Period Title"
cn_short_title::"Early Period Short Title"

//campaign description: can either be text
//or a label. set predefined accordingly

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

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

Here are some tips from Lord of Storms

How to Declare New Trade Goods in VI

I have gone through the process of adding new trade goods for the Napoleonic Era Mod (just an experiment) and I thought I would share it:

First decide the name of your new trade good. For my experiment I chose Swords. You need to make entries in the following files:
Loc/Eng/Names under heading @{"tradeable good names"}then 2 entries in Loc/Eng/DEFREGSPEC under heading @{"goods names"} and tradeable_goods_intro_tooltips.

Then you need to repeat those same entries into the Loc/Eng/DEFAULT_REGION_SPECIFIC file (why they are similar I dont know; its not important). Then 2 entries in Loc/Eng/TOOLTIPS:
1 under [email protected]{"tradeable_goods_intro_tool_tips"} and 1 under the heading goods_working_tool_tips.

Then you need 2 bifs: 1 in Campmap/Parchments/Icons, and 1 in Textures/Campmap/Goods.

Then of course you need to make 2 entries in the Startpos 1 under DeclareTradeGoods, and 1 under SetTradeablegoods, to assign it to a province or provinces of your choice.

Thats about it I hope I did not leave anything out . If you try it out let me know. Enjoy. P.S. I have recently added Muskets and will be adding Gunpowder as new tradegoods. LOS

How to add Heores to VI, I have added customized heroes to VI for The Lords upcoming Napoleonic Mod, you can see the screenshots of Napoleon and The Duke Of Wellington in the Nap Mod thread in the dungeon. The process is quite simple if you go to Campmap/Names you will see 2 folders The Heroes Default and Vikings Heroes files read the headings they contain some useful info as to the files structure. It starts with the Heroes Name,(you must add heroes name to the Names txt under Hero forenames/surnames using a label[Hero Name ] then {Hero Name }) then date he will appear
(I found if you set the date 20 yrs prior to your campaign hero will show in the 1st year of play)then stats for Command,Dread,Piety,Ac***en,Loyalty then a vice or virtue then type of hero anything can be added ,General,Inquisitor,Spy,Emissary etc.
Then you will see a refrence ID_LIMBO this means the hero will show in a random province belonging to the heroes faction. This can be changed to a specific province if desired as can all the other data listed and lastly you will see usually a -1 this points to the heroes portrait a -1 being random.
But you can specify a portrait also as you will see with the screenies of Napoleon and Wellington.(Portraits must go into your Heores Faction/Religions folder i.e. Catholic/Misc and given an appropriate #) Thats about it if I can help any further just ask P.S. The process seems more stable when overwriting an existing hero and changing the stats to suit your need also at the top of each factions heading you will see a number, example FRENCH {20} this is the maximum allowance of heroes for that faction.


While trying to entertain myself in between working on The Napoloenic Mod for VI, I was experimenting with getting the AI to use The Square as a defensive formation.
Using the info in the MTW formation data files provided by CA, available on the org's download page.
I found that the formations in the historical formations file can be adapted to the AI's special formation file.
I simply cut the desired formation from the historical file, and paste it in the AI special formation file.
The key in getting the AI to choose the new formation, was by changing the priority integer at the heading of the formation data.
My first attempt was with the Square formation, I raised the priority to 2, and started a custom battle
The AI formed into the square right away, you will notice this on the small inset map right away.
Then it seems to break up and regroups to form again .
I purposely waited on my attack to see what the AI would do,
and given the time they formed the MTW version of The Square
more of a 3 sided rectangle.
I attacked using only my Cavalry and charged the infantry
front line of the square, I was dismayed to see that the lines did not hold for very long, but in the face of a Cav charge I expected nothing less.
I then tried to change the compositon of the formation,
I was able to put the Generals Cavalry unit in the center of the Square.
And I was able to add the command line "Hold The Line"
I then tried yet another custom battle to see if the command
would help, alas it did not I did notice now given time between assualts they would always try to regroup and form the square with the generals unit protected in the center.
I then proceeded to experiment with various parameters
and was able to achieve varied results by changing the formation data, Formation unit composition, priority integers and also some tweaks to the unit prod.
Like cav defense bonus for Inf.,Disciplined,perfectly formed etc.just to see the effect.
So while not being a monumental discovery, I think it at least opens up some possibilties.
To try your own experiments just get the CA formation Data
which has some good info on file structure and keywords and parameters.
I eventually added The Block formation to the AI's formation file which was interesting.
The entire defensive force formed into a solid block
with the Generals unit protected to the rear.
When I get more time I will experiment further I thought I
would share my findings with my fellow modders.
Iknow someone will take this info to the next level, and who knows what they will come up with. Have Fun LOS P.S.This will work in both versions of MTW 1.1 and VI as the files are identical and have not changed from the last version. LOS


I know this must have been done before in other Mods, but I have yet to see any topic on the subject, so for those who wish to change the Florin in MTW (I am using VI, But will work in 1.1 also).

Go to Loc/Eng file folder and with the files I list below, using Notepad, open the file then click Edit, Replace, you will get a box with
Find What? enter :Florins
Replace With enter: Monetary unit of your choice.

Now be mindful not to use anything to lenghty or your campign screen will show its abbreviated version only.

so start with Frontend Files
Do as I showed above.
same for ,Changes File,Global File,Tooltip File,**Events File,and Glorygoals File.
**Note: In the events file, look for this entry:
["koku_stp_abbrev_xzy"] {"%d Fr."}
and add an abbreviated form for your monetary unit.

That is it, now some points to note, this will be a global change it will show your new monetary unit in Custom Battle screens, and campaign.
and also when doing the Florin word search watch your headings you dont want to edit the Multiplayer command lines, that include the word Florin, just skip those. simple enough, I have it working fine in the NTW Mod as Francs with no trouble so far ...LOS

Obake Date (02/08/04)[Changing the Battle Music in MTW]

This information was originally posted at totalwar.org by Eat Cold Steel, one of the developers for Creative Assembly. Follow these instructions and you can change the music on the battlefield for any faction!

Find the music you want to play and put them in the Sounds\Music directory. They have to be in wav format. For example if I have 6 pieces of music I want to use called:
My Tension.wav
My Mobilize.wav
My Battle1.wav
My Battle2.wav
My Win.wav
My Lose.wav
Just drop all 5 in that directory. Now open playlist with a text editor, double click and open with notepad. Go down to the first custom space and add in before the first line "My Tension",0 so it look something like:
// custom 1,2 and 3
"My Tension",0
"", 0
"", 0
"", 0

You may want to edit the comment to make it look better
// Shogun music
"My Tension",0
"", 0
// custom 2 and 3
"", 0
"", 0

Now repeat the process with the mobilize section to:
// Shogun music
"My Mobilize",0
"", 0
// custom 2 and 3
"", 0
"", 0

I have 2 pieces of battle music, the game will pick one at random when the fighting start, so:
// Shogun music
"My Battle1",0
"My Battle2",0
"", 0
// custom 2 and 3
"", 0
"", 0

Repeat for win and lose. You can put the same track in more times to weight the random progress, the more it appear in a section the more chance it will be selected. You can have up to 6 tracks for each slot. Finally go into startpos file and change the music for the factions:
SetFactionMusic:: FN_ENGLISH 3
Now you'll get different music when you do battle as the English!

Obake Date (02/09/04)

Here is a detailed "How To" to supplement what LOS posted at the beginning of this thread.

This information was originally written by a patron of these forums by the name of AOD Bradford. I'm not sure how much of this information is still valid as it was written prior to the release of VI, but the vast majority of it should still be fine. Unfortunately Bradford moved on to other endeavors and never completed his guide, but what is here, is the closest thing we have to a "Modding Guide for Newbies". I've also thrown in a few choice posts from others that shed light for modders.

There's a lot here, so give yourself some time, or even consider copying/pasting into whatever program you use and saving it for use offline.

Posted by AOD Bradford during late '02 early '03:

You can find descriptions, instructions on data sets and instructions to programers with regards what they expect "customers" to be able to modify, in the various post localisation files, changes and various "basic text only" files.
Most can be found in the folder;
C :/Program Files/Total War/Medieval Total War/LOC/Eng
(Replace Eng (English) with the reference to your country version of the game.
Warning: changing these files is not as straight forward as the "startpos" files, and any changes will affect ALL campaigns. Please make a backup before you attempt ant modifications here.

A practical Guide to "Mods"..........
Hi all,
There are just so many threads around that all kind of point to the same question, I thought I would take the liberty of kicking off a dedicated thread to Mods....
Please be patient as I am posting in between other things, I will get around to it all, and invite other modders to post hints, tips etc here.
i am assuming no knowledge whatsoever so for those with skills, please forgive my back to basics approach. In addition, I am assuming no de-bugging or professional programs are available to you (although you will need a good .bif editor to make new flags etc. when we get around to this aspect)

Here is Lesson 1 in making Mods....
I will go through the whole process, starting with one of the files that you can make a big impact with straight away.......
The ( Early.txt file )
How to make a NEW faction playable or not as you choose: Part 1
Open the file named "Early.txt" and save it back into the same directory under a different name: (METHOD)
Go to My Computer C :/Program Files /Total War /Medieval /Campmap /Startpos and double click on the file Early.txt
From the top left drop down menu in the text file that notebook has now opened for you, choose "Save as" and select a new file name, I suggest "Mod.txt"
Next, scroll down the file and change the lines indicated to read the text included below in quotes, (i.e. delete the text in the file you are looking at, and replace it with the text below);
Lines 1-3 This is the title that will appear on your game selection list, i.e. You will (after making the changes below) see Early, High, Late, Mod as selectable campaigns to play;
cn_predefined "false"
cn_title "Mod"
cn_short_title "Mod"
Lines 4-6 These define the description for your new campaign. When you select your new campaign to play, the campaign details and descriptions will mirror these entries;
cd_predefined "false"
cd_line "My Mod"
cd_predefined "flase"
OK, now to end post 1, save your file (it is already re-named, so just click on save, then exit..
It is good programming practice to do this after every change, and test your program. This way if a mistake is made, it is easy to go back, as the error will be in a recent change.
Now, run MTW, and make sure the Mod's so far have been successful. After you done that, come back here. I will continue to post.
Oh, and if you never did a mod before, that was your first success!

Creating a NEW faction Part 2
OK, now that you have made the first Mod and have successfully tested it, you will be ready to make more I'm hoping...
Part 2
Locate and open (by double clicking it) your "Mod.txt" file. It is located in the same directory (see part 1)
Line 7
There is no need to alter this line. It can be set to "true" of you dont want this file to show up on custom battle screens.
cd_hidden:: false
The next modifications will affect the Timeline the Technology and how long your Modified Campaign will last.
Line 8
Setstartdate:: 449
This defines the date in which your new Campaign will start. I am going to add Scotland to the game and give them 2 provinces (representing the Picts in the year 449 AD) change your start date to 449. Your campaign will also as a consequence of this modification, last for just over 1,000 turns.
Note, this date can be set to any value as long as it is an integer (whole number.)
Next the technology
Line 8
This effects the starting technology in your campaign. The period must correspond to a date that is the same as, or earlier, than your campaign start date. (see lines 9 through 11)
Setperiod:: EARLY
We don't actually need to change it for this tutorial, as we want our campaign to begin with the lowest possible technology level available.
Line 9
Setearlyperiodstartdate:: 449
What we have done here, is set the date at which the Early period technology becomes available in our new campaign. In this case 449 AD. Once again, you can set this to any value, but the date MUST be earlier or the same as your campaign start date. (per notes on line 8 above)
Line 10
Sethighperiodstartdate:: 850
Line 10 sets the date at which "high period" technology is reached. Set this to 850 as outlined above.
Note: This does not affect your ability to upgrade buildings, but does affect the technology levels available to units. We have changed it to 850 AD so that the feel of the campaign is the same, i.e. technolological advances will be made proportionally to the length of the campaign.
Again, this number can be any you choose, but I have tested this Mod, and it plays well set at 850.
Finally, for this part;
Line 11
Setlateperiodstartdate:: 1275
This will make the High period technology available in 1275 AD, but once again, will not prevent building upgrades etc.
Note: Heirs will appear with Armored Knight units in this period.
OK, now once again, save your file and run the MTW program.
Play 1 turn as any faction, then come back here. You will see turn 1 in your game is the year 449 AD.
Hope this is of interest to people, if not, please post and I'll put the whole thing in a .doc file and send to the .org

A couple of notes........
Before we continuue, let me make a couple of notes;
1) The line numbers I am using are the "executable data lines" in the Mod.txt file.
You will see many lines starting " // " These are the same as REM lines in basic, and are used to let other programmers know what the data represents.
Often there will be several programmers all accessing the same file, and these notes allow them to communicate within the data.
I am ignoring these lines in my tutorial.
2) there is a bug detection utility included with the program. It is essentially, a .dll file that runs as an application extension when you launch MTW.
If you make a serious error, corrupt the file, or add data that the .exe (Main executable file) doesn't recognise, your Mod, will not show up in the campaign selection screen, and the game will still function. (i.e. you will still be able to continue)
note this utility is not global, and can sometimes miss things, especially later, when we move on to editing bifs, and making changes in other files to enable our new faction, but on the whole it is suprisingly efficient.
3) When I (as in pervious posts) ask you to run MTW and play 1 turn, to make sure our Mod is functioning, I am assuming you are selecting "Single Player Mode", "new Campaign", and then selecting the Campaign called "Mod" that now appears in your list of playable campaigns.
Finally, In the text box, under the main map at the Campaign select screen, it now says "My Mod"
You can make your own campaign description to fit this box, by simply changing the words "My Mod" in line 5, to read , well anything you choose.
And thank you for the support guys, I will do my best to talk you through everything, so that you can make your own Mods quickly and effectively.
I know mine are borne of personal preference, and might not suit everybody. I am a veteran gamer, and prefer very difficult games. The Mod we are making here offers a serious challenge that for myself, adds a greater significance to each and every battle.
If you have a problem on any part, or any questions at all, feel free to post them.
If you are an adept Modder yourself, and see any errors, better solutions, point that need clarifying, please, also post. I am convinced that between us we can help open up the possibilities of this game to everyone, and unlock previously undiscovered talent. In a month or so, the .org site might be filled with exciting Mods!

Part 3
OK, Open your Mod.txt file, as before.
The next part of the file looks overwhelming, but is really simple. We are not going to change anything here, but I will explaing what it is and how to modify it.
Each Province in the game, is listed and is followed by a number of other provinces. Line 1 in this section looks like this;
The format is Province forst, followed by neighbours.
In this case, Scotland, has 4 neighbours, Northumbria, The North Sea, The Irish Sea and The North Atlantic.
If you look at the entry for the Northumbria, (the next line) you will see that it has Scotland as a neighbour.
This means you can move between the two, freely.
If you delete Scotland from Northumbrias list of neighbours (line 2) you will be able to move from Scotland to northumbria, but you will not be able to move from Northumbria to Scotland.
Thus, this section tells you where you can move TO, from any given province.
Another example;
If you remove Wessex from the list of neighbours next to Flanders, you will no longer be able to move accross the English Channel from France, but you would be able to move from Wessex to Flanders.
If you removed Flanders, from the list of neighbours for Wessex in addition to the above, then the English channel would be uncrossable (except by naval transport.)
You can add provinces to your map, and I will show you how to do this later. In the meantime, if you wish to experiment with this section, make another copy of the "Mod.txt" file, and do so.
When deleting entries, please delete only the name of the province (unless you are familiar with SDF and TDF formats.) Do not remove any TAB's or Spaces.
Warning: These files are a little untidy, but you cannot convert them to standard TDF format, nor edit in Microsoft (TM) TDF or Excel. In addition, as per the programmer notes, you cannot have more than 15 neighbours for any province.
OK on to the next section......

Part 4
The next section deals with province attributes. It sets the physical border between all the provinces in the game and the conditions that will exist should you try to cross from one province into another.
Please disregard the programmer labels above this section, they are not meant here, to represent everything in this section, but to point out the order of specific data within each line.
it is arranged as follows; (see line 1 of this section in your Mod.txt file.)
The first name ID_NORTH_UMBRIA is the province that you intend to move FROM.
If you have an army in Northumbria and you intend to move it into Scotland, this file sets the conditions for that move.
The next entry on the line, is the target, or destination province. It is where you intend to move TO.
Next come three sets of numbers. The first two tell the program where the physical border exists on the campaign map.
It uses the formay (x,y) Where x, is North/South and y, is East/West.
The lower the numbers, the closer they are to the top left of the map; the higher the number, the closer they are to the bottom right.
For example, position 0000, 0000 is the top left corner of the map.
0000, 9000 would be at the top of the map, but some way to the right (East)
When we add a province to the map, we will have to change these numbers, but for now, feel free to experiment in a copy of the Mod.txt file.
The next number determines wether a specific tile set will be used. It is in the main set to zero, but in some cases, Norway, for example, a mountainous region etc it has a value other than 0.
You will not normally need to change this value in your Mods, but when adding a new province to Norway for example, you will need to add the appropriate value (in this case 13, to the border info) Again, feel free to experiment here and see the effect in your game.
Note: Experiment means, change only one thing, and see what it does to your game. Make a note of any effects, differences and also make a note of what you liked and disliked about the effect. This will help you build up a database, and help you a great deal when making bigger more ambitious mods. Don't try to remember everything.
The next piece of data sets the type of climate any units crossing the border will experience. In this case TEMPERATE. Armies invading Scotland will do so in temperate conditions, as they move Northward.
Again, the programmers have had to invest a lot of time here, making sure that every move, tends toward the final destinations, North to South and East to West. If you look at line 6 in this section, you can see what I mean. Moving from Scotland back into Northumbria, the climate is LUSH, thus it is easier, "climate-wise" to move South rather than North, in this example.
Next comes the type of architecture that is present on entering the province. in this case AT_WESTERN_EUROPEAN will provide buildings and structures of that geographical area.
Again, there is no need to change the values for this Mod but, feel free to experiment.
The next piece of data sets the overall location of the area between the provinces, In this case, it is INLAND, but it can be set to any of the possible options.
Next comes the "Land Lie" Here, you can set the "Lie of the land" as you move between provinces. In this case HLL2MNT.
This sets the border, so that if you were to cross from Northumbria, into Scotland, the "Lie of the Land" would be hilly, becoming mountainous, and you should expect to be attacking Up-hill, should you invade.
Finally, you can specify wether invading accross this border would mean having to cross a river or not.
Phew, that was a long section, but I hope rewarding.
To finish this little section, let me make a couple of notes:
First, I am not making lists of all the options for every change, nor, explaining these options, and what they do. This is largely because the labels have been kept meaningful throughout the pre-Localisation stage, and are all relatively self explanatory.
Second, I am being as basic as I can in all the explanations and Instructions, but I know I am apt to slip into "programer mode" and although I read back my posts, and understand them, It is entirely possible that I have missed something, or have not explained things fully.

Finally for todays Posts
A couple of things to consider from what we have looked at thus far;
Although part 4, deals with conditions when invading a province over a border, it does not set the conditions for a battle INSIDE the province. If you attack a province from multiple destinations, you will not encounter the border conditions you can expect when crossing from only a single province. We will see this later.
Also, beware of making large scale changes to the province connections. The pathe-ing for certain operations is not perfect, and wholesale changes might produce some unexpected events.
Beware also of the balancing issue when Modding. If you were to make for example, the English Channel, uncrossable by Land, England would be made substantially stronger and very difficult to defeat.
Although this might seem more realistic, it would severely disrupt the balance of the game.
That is not to say that you might not like that effect, it is just a friendly reminder that it can happen, and others, should you distribute your Mod, may not enjoy it.
I added Africa in an early mod, and found that the AI used it exclusively because it was a shorter route from Spain to Egypt. It had the unexpected consequence of making the North African coast a virtual fortress without having to defend it too heavily.
I have since changed the borders but, as an example it serves well to illustrate some of the things you might come accross.

(MT's note: Obake's post continues in the next)

Total War Forums, the official forums of the Total War series:

Forum terms and conditions
Technology Discussion Section
How not to assemble a PC

Google-fu, the best skill in solving technical issues.

Faibo waipa!
Post edited by Maeda_Toshiie on


  • Maeda_ToshiieMaeda_Toshiie Senior Member SingaporeRegistered Users Posts: 3,601
    edited July 2010
    Continuation of the original thread (1).

    Continuation of Obake's post below:

    Part 5
    The next three sets of data, deal exclusively with the positioning of Icons on the Campaign map.
    I do not intend to spend a great deal of time with these data sets, as they are relatively self explanatory.
    The first set tells the program where to position a castle inside a province, should one be built.
    Line 1 looks like this;
    SetCastle:: ID_SCOTLAND 7144 4056
    This simply says "In Scotland, If a castle is built, place it at co-ordinates 7144 4056.
    You must have a value for each province in the game. And later we will need to add a line to this section. For now though, experiment by moving the castle for Scotland, North of its current position. (Do this in your copy of the Mod.txt file that we made earlier.)
    Note: When adding or editing a faction, you have to make all the entries in all the relevant files. If any part is missing, the de-bug utility will spot the error, and your campaign will simply not show up as selectable. Thus, once we have familiarised ourselves with the file here "Mod.txt," (Copy of Early.Txt), we will come back and make all the neccessary entries before moving to our next file.
    For those of you that are way ahead at this stage, examine the file named (Eng.txt that can be found in the folder "LOC") The programmer notes there are comprehensive and informative.
    If you are not using the "English" version of the game, you will see a file corresponding to your "Locale"
    OK, next comes the file that specifies where the pieces move TO, when the turn ends. All that sliding about of pieces etc, is controlled here. (At least for the campaign graphics.)
    Again, it takes the form;
    SetOrigin:: ID_SCOTLAND 7448 2992
    Where the Province is followed by the co-ordinates that the playing pieces (Icons) will move TO.
    Experiment, by having the pieces moving to Scotland, end up South (on the campaign map) of the Castle you repositioned above. (Once again, use your copy of Mod.txt to experiment.)
    I'm sure you will agree, (for those that have successfully made the two mods above,) that the ability to make these adjustments opens up some very interesting possibilities for future Mods.
    Finally in this triage, is the file that tells the program where to position a port, should one be built in the province. It takes the form;
    SetPort:: ID_SCOTLAND 7576 3912 2
    Once again, the Province is given first, and is followed by the (x,y) co-ordinates that specify where the port will appear on the map. However, there is a third number. In this case (2).
    This tells the program, which direction the port should face. There are 8 directions numbered (0 to 7) where 0 = North, working around to 7, which is North West.
    If you do not make an entry for a region in this data set, it is assumed by the program that a port cannot be built there.
    (i.e. You would not make and entry here for Switzerland.)
    In our mod, we are going to limit some ports, but we will make these adjustments later. For now experiment with the positioning of ports on the campaign map. I would suggest the rather cluttered Rome province would be an excellent place to start.
    Again, do these experiments in your copy of our Mod.txt file.

    Part 6
    OK, we are about to get to the more "interesting" part of our file, but before we do, there is a line;
    SetNumCastleMapGroups:: 4
    This tells the program how many castle map GROUPS, it can select a map from, should there be a siege (attack on a castle) in your campaign. For now, leave this set to 4.
    This will add more varitey to any siege battles if you are one of those players, who doesn't want to wait 6 years for a Castle to fall, or need to eliminate a province within the 2 year period allowed before ex-communication by the Pope.
    Now, one ot the big data sets:
    The Region Attribute File.
    This file sets all the charactaristics of a region, from its culture, to its base income. Changing the data here will have a profound effect on the campaign, and we will be making substantial changes to it.
    Before we continue, if you are going to be making a lot of 'Mods' or find this data unmanagable, you will need to tidy it up a little. To do this, go to Line 1. It looks like this;
    SetAttributes:: ID_AFRICA "Africa" 0 PAGAN_CULTURE ROCK_DESERT AT_ISL AMIC -1 0 "Africa Castle_xzy" INLAND FLAT NO_RIVER
    If you dont want to tidy this file, please skip the rest of this post.
    To tidy up the data set, place the cursor (by left clicking) at the end of the first data string ID_AFRICA. Press the delete key once. Now place the cursor in front of the next piece of data "Africa" (i.e. before the quote marks. Now press the [DOWN ARROW] key. Press delete until the next line in the data, lines up with your first line.
    Repeat this process for each piece of data and, using only your TAB and DELETE keys, go through the file until everything lines up nicely.
    Warning: There must be at least 1 TAB, or SPACE, between each piece of data in each line.
    If you make an error, during this process, press the CTRL+Z key to undo, the last thing you did until you are back to a stage where you are happy.
    Once you have done this, save the Mod.txt file, and run MTW. As you see, the program works, and you now have a nice neat file.
    Now, on with the Modding...........

    Part 7
    The Province Attribute Data Set
    As I siad, this is a very important data set. Scroll down the file until you see the reference for Scotland. It looks like this;
    We need to change the entry, but before we do, lets look at what we can Modify here.
    Well, the first part SetAttributes:: ID_SCOTLAND
    Is the instruction to set the attributes, for the region "BEFORE" the game begins. There is one entry for each province in the campaign. (In this case Scotland)
    The next piece of information is the "name" that will be used in the campaign when this province is referred to. Usually you will want the name to reflect the province ID, but this is not always the case. Especially when a campaign province might not accurately represent your "Mod".
    Next, comes a number. This is the modifier for rebellion in the province. Set at 0, the province will not object too much to new owners. Any rebellion will contain few opposition forces.
    Set at 6, they will be relentless in their attempts to evict any occupation of their province, and any rebel forces could be substantial.
    As you can see for Scotland, this number is set to 2. Delete the number 2, and replace it with 0. (After all, Scotland will be a playable faction, and we don't want our population rebelling every few turns. In addition, if it did rebel, we certainly don't want to have to put down more than a few rebels.)
    Warning: setting this number above 4, will seriously compromise any attempts to control the province by anyone.
    Next is the culture of the region. We are going to add a Pagan Scotland to our campaign, so we need to change this now. The culture set here, primarily affects the happiness of the province, when compared to the province owner.
    In addition to happiness, the enthusiasm for rebellion, is affected by the culture that is set in this part of the data file.
    Setting the Scottish main province to Pagan, will mean serious opposition should any other faction try to occupy it.
    Go ahead, change CATHOLIC_CULTURE, to read; PAGAN_CULTURE in the line for Scotland.
    Next, comes the "Terrain Type" that you will encounter INSIDE, the region. This will not neccessarily be the terrain you will encounter should you invade from a neighbouring province. (See the section earlier dealing with Border Info) It is the overall Terrain for the province.
    For Scotland, this is set to;
    The terrain type is followed by the Architecture type. Again, this is the overall Architecture for the province. It will decide the "building model set" used should a battle be fought inside the province.
    For Scotland, the type is AT_WESTERN_EUROPEAN. There is no need to change this for our "Mod."
    Next is the flag, that tells the program which "castle group" it should look in when selecting a castle for the province, should a battle require that a castle be present. For Scotland it is set to -1 There is no need to change it, but as with all the data, feel free to experiment with effects.
    Next is probably the most important number in the entire file. It is the one that assignes a value to the province. For Scotland it is set to 190.
    This number represents the number of florins, the owner will receive each turn from the BASIC, UNMODIFIED, province.
    If you add a Farming+20% upgrade, this province will yield 228 Florins.... and so on..
    In addition to the revenue, the AI, uses this number to determine the "Value" of the province when making military decisions. It also affects the balance of the game, the support structure for the military forces in the game and, the rate at which certain units and strategic agents are built. (I will cover this in a later post.)
    Extreme care should be excercised when modifying the base value of a province, as the entire feel of the game can be altered by changing only this single variable.
    For our "Mod" we need to have Scotland able to support "heirs" and so we need to increase its value slightly. Change 190 to read 225. (We can argue that the viking occupation of the region in this time period seriously increased the value of the province as more and more resources were poured into its development.)
    Next is the value that corresponds to the castle name in the province. It is currently set to look up the name from a different data file;
    "Scotland Castle_xzy"
    This looks up the predesignated name associated with the variable. (hence the inclusion of "_xyz".) However, you can insert a name of your own here, or, change the name of the castle in the list of variables found in the file it looks at. This file is calles "Names.txt" and we will be looking at it in a later post.
    The final three pieces of information are specifically for the battle sequence, and determine the type of map that any battle INSIDE the province will take place on.
    In Scotland, these conditions are:
    There are many combinations that can be used, but in the main, they accurately represent the regions for the period.
    Remember when modding these values, that they set the conditions INSIDE, the province, and not, the conditions met when invading from outside.
    Rebels, Sorties from besieged castles, civil war, or battles involving troops from several provinces/armies will use these requisites.
    OK, that was a big one,
    Before I close this post, go to the Northumberland line and change the province income value to 230 and its Rebel faction number from 0 to 1. This province will be Viking controlled in our "Mod."
    Change the Wessex province to have an income value of 360 (This province will be one of 3 provinces that make up the Britons, but for gameplay, the wealth of the britons will be more evenly distributed.)
    The province of Mercia, will be under the control of the Angles, change the Rebel factor for Mercia from 0 to 1.
    Well there is a lot to think about in this post. Again, feel free to experiment with the values. Setting all the revenue values for every province to 75% of their current value (for example) gives an extremely tough, challenging game (if you want to make a "fast Mod")
    The AI, will build less strat units, smaller armies, will upgrade faster, and will defend its higher value provinces very aggressively, to name a few changes that doing this will make.

    Part 8 Custom Maps and Resources
    OK, we are almost to the New Faction Mod's, but before we go there, there are a couple of other data sets to look at.
    Open your Mod.txt file as before, and scroll down until you come to the Special Castle Map section.
    The entries here have been "//" 'd (changed to remark lines [REM]) but the function is active in the MTW.exe file.
    The entry here, shows the format you should use;
    SetCastleMap:: ID_CONSTANTINOPLE 0 "constantinople" etc.
    This command on its own, says; IF a SEIGE is fought in CONSTANTINOPLE AND castle level =0 THEN use map "Constantinople" NOT a random map from the castle group.
    Thus, if you were to create a custom map for Constantinople, and you wanted the program to use this instead of choosing a random castle map from the castle map groups (the 4 we set earlier), you would point to that map here.
    Note: there are 14 possible castle states for each seige. The numbers refer to the level of upgrade of the castle, NOT THE MAP, thus if you wanted your map to be used whatever the state of the castle, you would enter its name next to all 14 options.
    "0" is the worst (basic) castle and "13" the best. You DO NOT need to create 14 maps, but you do have to tell the program to choose it for every castle level if you want your map used exclusively.
    It is the map on which the castle will be placed, and the battle fought that you are adding, not the castle itself.
    Hope that makes sense......
    Underneath this section, comes the region resource data. This section has extremely powerful mod effects, so please make "informed" changes to this part of your campaign.
    Let's examine the first entry;
    SetTradableGoods:: ID_ANJOU SILK LINEN
    There are two possible commands for each region in your campaign. The first, (above,) tells the program that the province ANJOU has two goods that are "Tradable" immediately.
    Tradable goods significantly increase the regions value (Rank of province in game), and income, and allow the building of trade halls, and upgrades. (Regions without tradable goods cannot build these structures)
    As the game progresses, these regions are able to generate a massive amount of Florins.
    The second command entry you can make, is to allocate resources per the second line in this data block;
    SetResources:: ID_ALGERIA GOLD
    This lets the program know, that there are resources in the region, but they need to be mined. (Allows building of mines and upgrades.)
    Again, these significantly, almost miraculously change the campaign you make. The AI is very clever at budgeting, and uses the inherent value of a province, developed or not, to set both its primary strategic objectives and short term tactical goals in the game.
    (Ever wondered why the "A.I." takes out Anjou before Normandy?)
    You can set a region to have;
    NONE (don't make an entry)
    ONE (Make an entry for either Tradable or Resource)
    BOTH (Make an entry for both Tradable and Resource)
    and you can allocate up to 3 goods per entry. Thus 3 Tradeable + 3 Resource per region.
    Well, hoped that little section was useful,

    Part 9 Adding and Changing Factions
    Finally for today, I thought we could make a start on the Factions.
    Before we do, I would like to point out that this process is intense. There are several ways to modify or add factions, and I will be going through them "one step at a time."
    You MUST make ALL the neccessary entries and changes, but I did a "dry run" at the weekend so that I could actually show you the process "in-game."
    That is to say, you will still be able to run MTW and select your "Mod" and see what the changes have done at each stage.
    Please bear with me during this part, as the "teaching method" is not the finished article. (As you will see in the final set of instructions)
    OK, the next set of data is where we start the process.
    You will see a data block that looks similar to this;

    //Active Factions
    //which factions are to appear in the game
    //and which of these factions are playable
    SetActiveFaction:: FN_ALMOHAD FT_MAJOR
    SetActiveFaction:: FN_BYZANTINE FT_MAJOR
    SetActiveFaction:: FN_EGYPTIAN FT_MAJOR
    SetActiveFaction:: FN_ENGLISH FT_MAJOR
    SetActiveFaction:: FN_FRENCH FT_MAJOR
    SetActiveFaction:: FN_GERMAN_HRE FT_MAJOR
    SetActiveFaction:: FN_ITALIAN FT_MAJOR
    SetActiveFaction:: FN_POLISH FT_MAJOR
    SetActiveFaction:: FN_SPANISH FT_MAJOR
    SetActiveFaction:: FN_TURKISH FT_MAJOR
    SetActiveFaction:: FN_DANISH FT_MAJOR

    SetActiveFaction:: FN_HUNGARIAN FT_MAJOR
    SetActiveFaction:: FN_NOVGOROD FT_MINOR
    SetActiveFaction:: FN_PAPIST FT_MINOR
    SetActiveFaction:: FN_SICILIAN FT_MAJOR
    SetActiveFaction:: FN_ARAGONESE FT_MINOR

    Where FN=Faction Name and FT=Faction Type.
    Now, before we start, these names are PRE-DEFINED, i.e. simply changing these names will result in the de-bug utility flagging the campaign as bugged. It will not appear in your Campaign select screen.
    Line one;
    SetActiveFaction:: FN_ALMOHAD FT_MAJOR
    Says, Set FN_ALMOHAD to active, (i.e. include it in the campaign) and Set it to be a MAJOR faction (i.e. It is a playable faction.)
    As an experiment, for the Papist faction, change the word MINOR, to MAJOR, save the file and run MTW.
    As you can see, the Papal States are now Playable. (You cant control the Pope, but you can control the faction.)
    Now, lets go through the "add faction" process...........

    Adding a Known Faction
    Below the line
    SetActiveFaction:: FN_DANISH FT_MAJOR
    in the data block we are looking at:
    Enter a new faction by adding a new line that tells the program that the Swiss are in the game;
    SetActiveFaction:: FN_SWISS FT_MAJOR
    You can add any of the "predefined" factions in this way. (I will explain the difference between these factions and User Defined ones later.)
    Next, you will need to set the amount of cash available to this faction at the start of the game.
    Look at the next data block. Line one, looks like this;
    SetTreasury:: FN_ALMOHAD 10000 8000 6000 4000
    This sets the starting amount (in Florins) for each of the difficulty levels, 10,000 for easy, through to 4,000 for Expert.
    Insert a line to set the Swiss treasury at the start of the game.
    SetTreasury:: FN_SWISS 10000 8000 6000 4000
    Note: I personally prefer a tougher game, so I changed all these values. You can set them to whatever you find best, but reducing them all by 50% leads to a much brighter A.I.
    The next two data blocks, set the Culture and the Religion of your faction. They are already set for ALL the Pre-defined Factions, so you do not need to make any entries, but this is where you would modify them if you chose to do so.
    For now, make sure that the two lines included read;
    Modifying Culture, will affect portraits, buildings and general themes.
    Modifying Religion changes the Ethics of your faction, Papal Influence and who are inherrently friendly, or not, in the Camapign.

    Cont.... Adding a Pre-defined Faction
    Next we need to set the behaviour of the Swiss. The next data set, sets all the behaviour petterns for the factions in the game.
    Insert a line for the Swiss if one is not present, as follows;
    This is the basic behaviour pattern for the faction only. Other factors in the game effect the factions behaviour.
    The next data block deals with the Shields used in the game. There should be an entry for the Swiss, but if there isn't, add this line to this data set;
    SetShieldImage:: FN_SWISS "Swiss_lge" "Swiss_sml"
    The Shield images are kept in the folder :
    C :/Program Files /Total War/ Medieval Total War/ Campmap /Shields.
    if you wish to make shields of your own, i will be showing you how to do this later. They must be stored in standard *.BIF format. The best way to edit them, is to use the STW BIF Reader/Editor, posted on the .org site.
    We will need to make one for Scotland, in the next stage of the "Add faction" post.
    The next data set, is where we assign provinces to the factions in the game. By default, if you do not assign a province to a faction, it is "Rebel Controlled."
    You can test this by simply inserting "//" before any line, and seeing the effect when you play the game, but DON'T test it now. At the moment, our "Mod" will not run correctly.
    We need to assign a province to the Swiss, and for this example, we will give them Switzerland.
    We could just as easily give them Scotland, but that would neccessitate a lot more changes, please bear with me, we will get to Scotland shortly.
    Scroll down to the line shown above, and change it so that the Swiss control this region, it should now read;
    OK, we are almost there, just a couple more steps.

    Now i need you to skip a few data blocks, we will come back to these but for now, scroll down the data until you arrive at the "Place Faction Leader" section.
    Line 1, looks like this;
    SetStartLeader:: FN_ALMOHAD 0 0 1 1 0 1 0 0 0
    This tells the program that the Almohads have a leader, and list his starting stats.
    We have skipped the "Statistic" data block, and rather than go through it here, I will deal with it in a later post. For now, give the Swiss a leader by making an entry in this section as follows; (i.e. type in a new line)
    SetStartLeader:: FN_SWISS 0 0 0 1 1 0 1 0 0
    Immediately below this set, you will notice the "Place leader" instructions. This tells the program, what province the leader starts in. Add a line to place our Swiss leader, in Switzerland.
    Now, In case our leader decides to die within 15 years, we had better give him an heir or two.
    The next data block, assigns heirs. Line 1 looks like this;
    AddHeir:: FN_ALMOHAD 1 13
    This essentially says, Give the Almohad faction a MALE (1) leader THIRTEEN (13) years old.
    This heir will mature in 2 years.
    Ok now go ahead and place two heirs for our Swiss faction as follows;
    AddHeir:: FN_SWISS 1 12
    AddHeir:: FN_SWISS 0 10
    This will give the Swiss, a male heir 3 turns into the game, and a Princess 5 turns in. The leader will be capable of making new heirs from there.
    OK, now before we save and run our "Mod" right at the foot of the file, (i.e. the very last data blocks) there are some strategic units assigned.
    Go to this block now, and examine it. The first line looks like this;
    MakeUnit:: ID_CASTILE Emissary 1074
    Basically, it says, In CASTILE, place an EMISSARY who was born in 1074.
    We need to change all the birth dates of our strategic agents, or they will all die on turn 1. Go ahead and change all the dates to 20 years before our campaign start date.
    OK, now, save the file and run MTW. Select the "Mod" campaign and run it.
    Hey presto! there are the Papal States (playable) and a new faction (The Swiss) also playable.
    Tomorrow, we will look at making a Scotland Faction, and examine the other data blocks in the Mod.txt file. Some of the things you have learnt in this section will be invaluable in that process.

    Other Mod.txt data and Scotland Mod
    OK, we have looked at adding a pre-defined country to a scenario, and this can be done with any of the Factions included in the game. You can add, or remove factions as you wish, but changing a faction, or adding a user defined faction is a little more complex.
    To understand the principle, and what exactly makes up "A Faction," we will examine all the requisites for an existing one, and change it to represent Scotland. This will arm you with all the skills neccessary to create your own additional factions.
    there are eleven spare factions named;
    FN_FREE_01 through FN_FREE_11
    Before we begin this process however, there are some other data files in the Mod.txt (Copy of Early.txt) file that we skipped. You will need to access and change this data for the Scotland Mod, so let's take a closer look before we start.
    Open up your Mod.txt file, and scroll down to the sections we skipped yesterday. The first section is the "Governor Title Data" Line 1, looks like this;
    AddTitle:: ID_SCOTLAND "Title King of Scotland" +1 0 0 +1 0 0 0
    There is a line for each province in the campaign. This tells the program to make available a "Title" that can be assigned to a general to whichever "Faction" controls that province.
    In Scotland, the title is "King of Scotland" but you can change the name by altering the description inside the quote marks. As Scotland will be playable, I suggest changing the title to read "Title First Lord of Scotland" or "Earl of Scotland" or something along those lines as you see fit.
    Next, come seven numbers. These represent the "Stats" or the "Attributes" of the title. (i.e. the effect that awarding this title to a General will have.)
    The numbers represent, from Left to right;
    As you can see, in this campaign, The title King of Scotland, gives LOYALTY +1 and LEADERSHIP +1, Change this now to represent the "New Scotland";
    You can set the values as you wish, but I recommend LOYALTY +2 PIETY +1 AC***EN +1
    Where there are no "Titles" against a province, these are looked up in the Names.txt file. (We will be examining this closely later.)

    The next "Data Set," Faction Office Titles, is an extremely powerful "Mod-Aid"
    Line 1 Looks like this;
    AddOffice:: FN_ALMOHAD royal_palace "Qadi al-Quda" +2 +2 0 0 0 0 0
    This line says; "If a ROYAL PALACE is built by the ALMOHAD FACTION then make available a TITLE that gives LOYALTY+2 AC***EN +2.
    The seven numbers, are arranged in the same order as the Regional Governor stats above.
    As you can see, there are six of these titles altogether, but that does not stop you from either changing the names of the titles, or the statistics, nor from adding more!
    An example might be:- Add the following line:-
    AddOffice:: FN_ENGLISH inn "Keeper of the Mead " +1 0 0 0 0 0 0
    Now, when the English build an inn, the title "Keeper of the Mead" giving LOYALTY +1, will become available.
    The list of buildings in the game can be found in the names.txt file in the LOC folder.
    As you can see, you can make some very interesting mods here. When making changes, or adding titles here for factions, be careful to "balance" the reward, with the difficulty the building is to achieve for that faction.

    Whats in a Faction?
    OK, on that note, lets look at what you need to do to create a faction.
    As I explained earlier, the process is rather involved, and as a teaching method, I intend to change an existing faction. This will allow you to see your changes as you make them, and point out the various files that make up a factions setup. You will then be able to make all the neccessary entries for a new faction, and, more importantly, know what the changes relate to in terms of what you see on screen.
    I am going to choose "FN_NOVGOROD" to work with. You can use any faction you choose but please, don't use one of the FN_FREE_nn labels yet.
    Finally, before we begin, this is IMPORTANT.
    The labels are known to the program (MTW.exe.) They are Fixed, and cannot be altered
    (ummm..... well they can, but DON'T alter them unless you know exactly what you are doing).
    All the translations of these "labels" are done at the "GET DATA" level, where the program looks in various files to return a "name" for the label.
    In other words, the faction title; "FN_NOVGOROD" may as well say "FACTION_A" because the program does not know what "Faction A" is until it reads the data array.
    Hope that makes sense.....
    Please NEVER change a label, only change the "name" associated with it.
    Stage 1
    First, we need to change all the Mod.txt files neccessary for this faction. Open your Mod.txt file and scroll down it;
    (I humbly suggest that you make notes here)
    The first thing we need to change is the reference to Scotland in the "Region Attribute" data set. Change the rebelion factor to 0 and increase the province income from 190 to 250. This will stop rebellions under "normal game cir***stances" and will allow enough income to "develop" the province.
    Now, Scotland is a CATHOLIC province, so scroll down to the "Faction Cultures" data and change FN_NOVGOROD to CATHOLIC.
    You might want Scotland to be Pagan, or any other culture. What is important, is that the culture and religion of your faction are mirrored by the province.
    Note: You can have different cultures for your faction and the province (Naples is a good example in the Early.txt file) but it will lead to unrest and revolt until the two are compatable.
    OK, now change the "Faction Religion" of FN_NOVGOROD to match. i.e. CATHOLIC.
    Next, we need to set a behaviour pattern for our faction. Scroll down to this data block.
    Note: you can choose any CATHOLIC behaviour as you see fit.
    Now, we need a Shield for Scotland. For the moment, leave it pointing to the NOVGOROD shield, but as explained earlier, you can make your own by simply opening an existing one with the *.BIF editor (Download form www.totalwar.org) and making the neccessary changes. Save your new shields as Scotland_lge.bif and Scotland_sml.bif. Then change the mod.txt file to point to them.
    Now, we need to give our faction a province or two.
    Scroll down to the SetRegionOwner:: data and make the following adjustments:-
    Before the line
    place the "REM" indicators "//" This will assign this province to the rebels. This line should now look like this:
    //SetRegionOwner:: ID_NOVGOROD FN_NOVGOROD
    Next, scroll down to the line:
    //SetRegionOwner:: ID_SCOTLAND Scots
    Delete the "//" marks and change Scots to read FN_NOVGORAD
    Your line should now look like this:

    (MT's note: Obake's post continues in the next)

    Total War Forums, the official forums of the Total War series:

    Forum terms and conditions
    Technology Discussion Section
    How not to assemble a PC

    Google-fu, the best skill in solving technical issues.

    Faibo waipa!
  • Maeda_ToshiieMaeda_Toshiie Senior Member SingaporeRegistered Users Posts: 3,601
    edited July 2010
    Continuation of the original thread (2).

    Continuation of Obake's post below:

    Next, scroll down to the Province Titles and change the entry for Scotland. It looks like this:
    AddTitle:: ID_SCOTLAND "Title King of Scotland" +1 0 0 +1 0 0 0
    Change the name, (You are going to be King, so put some nice title for your Scottish province in here) and change the attributes associated with the title as you see fit.
    Now, scroll down to the Addoffice:: section. There are no offices or titles listed for our faction, so, Let's create some.....
    Highlight all 6 SWISS entries, Copy and paste them underneath. (Right Click on the highlighted data, select COPY, then place the cursor under the last entry for the SWISS and again right click and select PASTE.
    You will have a second data set under the SWISS entry that looks like this:
    AddOffice:: FN_SWISS royal_palace "Chamberlain of the Cantons" +2 +2 0 0 0 0 0
    AddOffice:: FN_SWISS constables_palace "Constable of the Cantons" +2 0 0 2 0 0 0
    AddOffice:: FN_SWISS marshals_palace "Marshal of the Cantons" +2 0 0 2 0 0 0
    AddOffice:: FN_SWISS chancellery "Chancellor of the Cantons" +3 1 0 1 0 0 0
    AddOffice:: FN_SWISS admiralty "Admiral of the Cantons" +1 0 0 2 0 0 0
    AddOffice:: FN_SWISS cathedral "Archbishop of Geneva" 0 2 0 0 3 0 0
    Now, change FN_SWISS to read FN_NOVGOROD on all 6 lines, and change the titles to something more appropriate:
    Your data should now look something like this:
    AddOffice:: FN_NOVGOROD royal_palace "Chamberlain of Scotland" +2 +2 0 0 0 0 0
    AddOffice:: FN_NOVGOROD constables_palace "Constable of Scotland" +2 0 0 2 0 0 0
    AddOffice:: FN_NOVGOROD marshals_palace "Marshal of Scotland" +2 0 0 2 0 0 0
    AddOffice:: FN_NOVGOROD chancellery "Chancellor of Scotland" +3 1 0 1 0 0 0
    AddOffice:: FN_NOVGOROD admiralty "Admiral of Scotland" +1 0 0 2 0 0 0
    AddOffice:: FN_NOVGOROD cathedral "Archbishop of Scotland" 0 2 0 0 3 0 0
    Note, you can add other buildings or change the attributes of the titles as you see fit, My entries are used as an example. (See earlier on how to do this.)


    OK, now scroll down to the line:
    There are already leader attributes set for thr NOVGOROD faction, and these remarkably, are what I would have chosen for a Scottish leader. You can change them if you choose. What we do need to do, is to set the leader up in our NEW country.
    Change the province to SCOTLAND.
    Your line should now read:
    Now, immediately below, is the "Addheir" section. As you can see there are heirs already set, and these fit in nicely with our setup so we don't need to change them.
    now, we need to place some buildings in Scotland, (or we will have an almost impossible task if we choose to play them.)
    Place the following entries in the data block:
    MakeBuilding:: ID_SCOTLAND Castle2
    MakeBuilding:: ID_SCOTLAND Improved_Farmland
    MakeBuilding:: ID_SCOTLAND Town_Watch
    Or, place more appropriate buildings as you think.
    There are already appropriate units in Scotland to start with so FINALLY.....
    Go back up the file to the SetActiveFaction:: commands. Change the line:
    SetActiveFaction:: FN_NOVGOROD FT_MINOR
    to be a playable faction. Your line should now say:
    SetActiveFaction:: FN_NOVGOROD FT_MAJOR
    Now, run with me on this.......
    Save the Mod.txt file and run the MTW program.
    Select our "Mod" campaign.
    The first thing you notice, is the Blue Province of Scotland. It is a playable faction, but to choose it, you (at the moment) need to select "People of Novgorod"
    Go ahead, select the faction, but don't press START, lets see what else is missing........
    You will see, the portrait of your King, is some Eastern dude... and his name is definately not Scottish..... The Faction description is definately not one consistant with Scotland either.....
    Go ahead, press START.....
    Oooops! we have other things to change.... the Province is called Scotland, and Hey! we have a cool new title to hand out, but our King is running around with Russian troops, and the program keeps referring to us as "The people of Novgorod"
    OK, exit the MTW program and come back here.................
    I will post how we address all these issues tomorrow, when we will examine the "Localisation files" There is a lot more, as I said earlier to creating a faction than simply changing a line or two....
    On the plus side, you now know everything there is to do in the "Mod.txt" file to modify everything in there and add everything needed (IN THIS FILE ONLY) to add, change or create new factions!!

    Other Files to Modify

    OK, dont't have a great deal of time today but lets make a start on another file.
    Go to c :/Program Files/Total War/Medieval Total War/LOC/Eng
    Now, in front of you are all the "loc" files that were supplied with your game.
    right click on the file called names.txt and choose COPY
    now right click again in the window and choose SAVE
    You should now have a file called "Copy of Names.txt"
    We will be making dome changes in the names.txt file and will need to copy the original data back once this tutorial is complete.
    OK, now open (by double-clicking) the file called "names.txt"
    This is a translation file called up by MTW.exe (Main program) so that the same program can be run in any language.
    Now, fortunately for us, the "data arrays" have been split into component parts for concatanation, which, although a not too efficient method for the program, is excellent for us. Lets examine the data:
    Now, the programer instructions here are very specific, and clear, but, for those that are new let me simplify it.
    The program acts independently of these data files. If you imaging its logic, it knows it has a set of variables, and what the names of those variables are. It doesn't however, know what language you speak, so it looks in these files to see what the variables are called for your campaign.
    The Program variables look like this:
    [VARIABLE] it is a fixed reference inside the program and it is enclosed in [] [Square Brackets]
    Next to it, is the name that will appear in your campaign, i.e. The translation or name that the program will give to the variable. This looks like this:
    {NAME} it is enclosed in {} {Curly Brackets}
    Throughout ALL your mods, you must ONLY change the {NAME}
    If you fail to observe this instruction, your campaign will not function.
    Finally, this file is looked at only once by the program (MTW.exe) What happens essentially, is a command sub-routine tells the program to fill up the DIM's (Dimensional Array's) with the correct names. The program comes to this file, (and others) and "executes" the lines.
    Line 1 - "SetShowTransOn", tells the program that the translation is active for the file.
    Now what do we have in the names.txt file? well, quite a lot......
    Before we examine where all these names fit in MTW, scroll down the file a little until you come to the line:
    @{"The Free01 Leader"}
    This is the first variable for FN_FREE_01
    It sets the Faction Leaders Title. (I can see most of you already heading off to try some things out.......... "Hey! get back here, you aren't ready yet....."
    Now I know, you probably already have an idea of how to add a new faction from scratch, but let me finish off the process, so that you know where in the game, your changes will show up.


    The " @ " command, essentially says "SET something to something else. It tells the program in the case of the line we are looking at, to:
    SET FN_FREE_01 LEADER to read {"Whatever it says inside the curly brackets"}
    Now, four lines above this, is the line:
    @{"The Prince of Novgorod"}
    Change the name here to read
    @{"The King of Scotland"}
    WARNING: Your text MUST be inside quote marks. If you miss out the quote marks, the program will attempt to resolve the data as though it were a number and your campaign will fail.
    Now, scroll down until you come to the faction_xyz data.
    Change the line:
    @{"The people of Novgorod"}
    to read,
    @{"The Scots"}
    Now, another IMPORTANT point to remember. (Hope you are taking notes)
    The Arrays in MTW are pre-defined, you CAN NOT change the order of the data within the file!
    For those of you that might want to do a little more (PLEASE IGNORE IF YOU ARE A BEGINNER)
    a simple array might, in a HLL might look like this:
    DIM x(2,2)
    This would set up a Matrix allocating two variables to be associated with "x" and allocate two variables to each of those; as follows:-
    x 1,1 x 1,2
    x 2,1 x 2,2
    Now assume x is the title of a Faction,
    and the title has 2 parts to it:

    This will look like this:
    or x 1,1 1,2

    Now when the program looks up something to put in this array in the "name.txt" file, it will do so in the order that it comes accross the data.
    for example, a simple loop in the MTW.exe might call for the data:
    dim x$(2,2)

    f=1 to 2
    READ x$(1,f)

    f=1 to 2
    READ x$(f,2)

    DATA "King"
    DATA "Prince"

    DATA "Scotland"
    DATA "Novgorod"
    You can see the resemblence, the program is MTW.exe and the DATA is the Names.txt file
    (this is meant as an illustration only, jic any of u guys wanna get on my case about syntax)
    As you can see, if we were to trade (s***) any two data items in this file, the program would allocate the variable to the WRONG array.
    Instead of the result:
    we would get some garbage output.

    Starting at the top of the file, scroll down and change all the {"Novgorad"} references to {"Scotland"}
    NOTE, an easy way to do this is to press CTRL + F
    now type in Novgorod and click on FIND NEXT,
    change the data and repeat...
    Finally, save the file and run MTW.
    You will now see, that your Faction leader in your campaign is no longer "Prince of the Novgorads" but "King of Scotland"
    I will go through the names.txt file in more detail later, so that you know where you can ADD data.

    First to everyone, there have been so many kind words that I will finish off the tutorial. I am currently writing mods for Neverwinter Nights, Warcraft III and others, as well as paid work, In between I hope to finish off this tutorial.

    To Douglas, and everyone else looking for a short cut to setting up a FN_FREE_01 faction

    The main thing to remember, is that the mtw.exe uses a subroutine to read (look up) the data for a faction before the game starts. This means that ALL the variables for a new faction must be available to this routine or the game will not run properly.

    Add the following:

    Change the startpos/early.txt or mod.txt if you followed my tutorial to include a new faction FN_FREE_01

    Simply copy and paste an existing faction, and then replace all the duplicates with your new faction.

    Next, go to the loc/eng.txt file and change all the data inside curly brackets for FN_FREE_01 to the required names {data}

    Next, Go to the unit file in the main directory. ADD a leader for the 3 periods. (Simply add FN_FREE_01 to the unit you want to set as leader) Yes I know this needs instructions, and I will get around to it, but for those looking for a short-cut and know their way around a little, this is the "broad brush" approach

    This will get you to a stage where the faction is selectable, playable, but will have no leader names, heir info, etc etc. These all need to be addressed, as well as other things that make up a complete faction. I need to refresh my memory on where these files are, as I haven't looked at MTW Mods for a while.

    REMEMBER, whatever you call FN_FREE_01 (example Portugese)... The program only recognises FN_FREE_01. Any variables you set will always refer to this name and not what you called it in the campaign.

    hmmm... that doesn't sound too clear... lemmie put it this way, if you change the faction name of English, to Britons, for example. In your campaign, there will be a playable faction called "The Britons" However, the MTW.exe will always look up the variables for FN_ENGLISH.

    Other answers...

    TDF and CSV refer to data that is arranged in such a way that a TAB or COMMA seperates the different values within a single data string (file). Example.... Right click on the Unit or build text file in the main MTW directory. Now select open with. Next uncheck the box that says "Always open files of this type with." Now select a program capable of reading TDF or CSV files.. Microsoft (C) Excel (TM) is an excellent example.

    Now you see all your data lined up neatly in columns. Don't save the file if you make any changes unless you know exactly what you are doing.

    Remember, in MTW, the program counts the FIRST NULL RETURN (Any space or tab) as the data seperator and in strings with commas counts the comma as a seperator for the Faction reference. (These refer to "boxes" in a simple Dimensional array)

    Imagine it this way: The following data in a 3 x 2 Dimensional array


    Assigns the following:

    FN_ENGLISH 1,1
    FN_FRENCH 1,1
    FN_SPANISH 1,0

    Remember, if you remove data from a column using this method, you MUST NOT leave the cell empty. Place a space or a Tab in the cell that you have deleted. If you make any mistakes, you will get the error message "Unrecognised Unit Type (Cell 2 or similar)"

    Again, adept users, please forgive the approach. I'm sure there are hundreds of other ways to achieve this in a more "streamlined" way but I'm assuming that the majority of people will not be as familiar with single data strings for dimensional arrays.

    Posted by Gil Jaysmith of CA:

    The stats for the initial faction leaders are generated by the game and you probably can't change them. I think the first number affects who you get, but I don't know how. The rest of the numbers in SetStartLeader are to specify the "serial numbers" of the names used for that faction's leaders, i.e. how many Henrys or Urbans or Innocents or whatever you've had. Unfortunately the set of those names is also fixed in the EXE so you can't do a lot with it except play around and see what happens.

    More from AOD Bradford:

    If you are getting unknown faction errors, it is because you have failed to set up all the data correctly. At some point, you have assigned a label to a faction that the program does not recognize.

    You can NEVER change the data labels... only the translation of those labels. Example... If you go to the eng.txt file in the LOC Folder, and change the line containing the faction name translation;

    [ENGLISH] {The English}

    to read

    [ENGLISH] {The Boys in Red}

    Your Mod will have a playable faction called The Boys in Red.... but the Program will still know this faction by its data label.....ENGLISH.

    The faction to set as active is FN_FREE_01 but all references to the faction are simply FREE_01. In the eng.txt file, you will see many references like... The FREE_01 Leader.... (for example) If the data is inside square brackets [ ] that is the actual faction tag and must not be changed. Only change the translation, the stuff inside the { } curly brackets.

    [FREE_01] {The FREE_01}


    [FREE_01] {The Portugese}

    Would set a faction "Portugese" in your Mod. The program will look up all the data associated with FREE_01 and assign it to the Portugese.

    You must add data to the names.txt file also, insert a new block of data immediately below the final data block. Remember to leave at least 1 blank line containing at least 1 Space or 1 Tab. Failing to do this will not stop the program running, nor will it stop you being able to select your new faction, but it will cause the main .exe to fail when you try to take a turn with your new faction.

    Also you MUST assign a leader unit to your faction for the 3 eras by editing the unit_prod file. I'll post a step by step guide hopefully starting next week...

    If you look in the main body of my Modding Notes, you will see how to add your own titles, change existing ones etc

    Basically, copy any Title block (found in C :/Program Files/MTW/Medieval Total War/Campmap/Startpos/Early.txt)

    Now simply replace the faction name to your new/modified faction.)

    To add new titles... simply copy any line, and replace the building/requirement with one of your choice....

    Example, copy the line with Chancellor, change chancellory to read brothel, and change the title description to read "Keeper of the Royal Harim." Now, change the bonuses to whatever, Loyalty+3 in this example.

    Now, when you build a Brothel, the title will be available for assignment, and wil confer a +3 Loyalty bonus to whomever you assign it to.

    I'm not suggesting you actually make this title available, I'm using it to illustrate you can give a title for anything.

    By Westland re making Novgorod available in Early:

    Brian, it´s not so much work. You just have to replace FN_NOVGOROD with FN_RUSSIAN at a few places in the Early.txt file. You could look in the High.txt file to find the right lines.
    These are the changes I made.

    In active factions add Russia (and Burgundy as you can see).

    //Active Factions
    //which factions are to appear in the game
    //and which of these factions are playable
    SetActiveFaction:: FN_ALMOHAD FT_MAJOR
    SetActiveFaction:: FN_BYZANTINE FT_MAJOR
    SetActiveFaction:: FN_EGYPTIAN FT_MAJOR
    SetActiveFaction:: FN_ENGLISH FT_MAJOR
    SetActiveFaction:: FN_FRENCH FT_MAJOR
    SetActiveFaction:: FN_GERMAN_HRE FT_MAJOR
    SetActiveFaction:: FN_ITALIAN FT_MAJOR
    SetActiveFaction:: FN_POLISH FT_MAJOR
    SetActiveFaction:: FN_SPANISH FT_MAJOR
    SetActiveFaction:: FN_TURKISH FT_MAJOR
    SetActiveFaction:: FN_DANISH FT_MAJOR
    SetActiveFaction:: FN_RUSSIAN FT_MAJOR

    SetActiveFaction:: FN_BURGUNDIAN FT_MINOR
    SetActiveFaction:: FN_HUNGARIAN FT_MINOR
    //SetActiveFaction:: FN_NOVGOROD FT_MINOR
    SetActiveFaction:: FN_PAPIST FT_MINOR
    SetActiveFaction:: FN_SICILIAN FT_MINOR

    SetActiveFaction:: FN_ARAGONESE FT_MINOR

    Add this line to starting treasury.
    SetTreasury:: FN_RUSSIAN 10000 8000 6000 4000

    Culture ,religion, behaviour and shield are already defined, so no changes there.

    In region owners I put in these lines.

    SetRegionOwner:: ID_MUSCOVY FN_RUSSIAN

    I gave them Muscovy to make them a bit stronger at the start. But if you do this you should change the region attributes for Muscovy from Pagan into Orthodox culture.

    No changes in region titles and factoin offices.

    In Place Faction Leaders, I copied the lines from High.txt.
    It looks like this now.

    //Place Faction Leaders
    //Place the Leader of each active faction
    //in a country.
    //If the leader of an active faction is
    //not placed, that faction will die out
    //immediately after the first turn is made
    SetStartLeader:: FN_ALMOHAD 0 0 1 1 0 1 0 0 0
    SetStartLeader:: FN_BYZANTINE 0 0 4 7 1 3 10 1 0
    SetStartLeader:: FN_EGYPTIAN 0 0 0 0 1 0 0 0 0
    SetStartLeader:: FN_ENGLISH 0 0 2 0 0 2 1 2 0
    SetStartLeader:: FN_FRENCH 0 5 3 1 1 1 0 0 0
    SetStartLeader:: FN_GERMAN_HRE 0 3 4 2 3 1 1 1 0
    SetStartLeader:: FN_ITALIAN 0 2 3 3 0 9 0 0 0
    SetStartLeader:: FN_POLISH 0 2 2 1 1 0 0 0 0
    SetStartLeader:: FN_RUSSIAN 2 2 1 3 1 1 2 1 0
    SetStartLeader:: FN_SPANISH 0 0 6 2 1 0 0 0 0
    SetStartLeader:: FN_TURKISH 0 0 0 0 0 0 1 1 0

    SetStartLeader:: FN_HUNGARIAN 0 1 1 1 0 1 1 1 0
    SetStartLeader:: FN_NOVGOROD 0 0 0 1 0 0 0 0 0
    SetStartLeader:: FN_PAPIST 0 2 1 8 20 2 1 2 7
    SetStartLeader:: FN_SICILIAN 0 1 0 0 0 0 0 0 0
    SetStartLeader:: FN_DANISH 0 2 3 1 1 2 0 1 0
    SetStartLeader:: FN_ARAGONESE 0 0 0 1 0 0 0 0 0
    SetStartLeader:: FN_BURGUNDIAN 1 0 0 0 2 0 0 0 0
    SetStartLeader:: FN_SWISS 0 0 0 1 0 0 0 0 0

    PlaceLeader:: ID_WESSEX FN_ENGLISH
    PlaceLeader:: ID_VENICE FN_ITALIAN
    PlaceLeader:: ID_POLAND FN_POLISH

    PlaceLeader:: ID_MALTA FN_SICILIAN
    PlaceLeader:: ID_DENMARK FN_DANISH

    AddHeir:: FN_ALMOHAD 1 13
    etc, etc,
    AddHeir:: FN_BURGUNDIAN 0 13
    AddHeir:: FN_BURGUNDIAN 1 12
    AddHeir:: FN_BURGUNDIAN 1 8
    AddHeir:: FN_EGYPTIAN 1 13
    etc, etc,

    AddHeir:: FN_RUSSIAN 0 9
    AddHeir:: FN_RUSSIAN 1 13
    AddHeir:: FN_RUSSIAN 1 8
    etc, etc,
    AddHeir:: FN_ARAGONESE 1 8

    No changes needed in buildings and units.

    The last thing to change are the agents.

    //agents are different. They are single units, and so there is no need to specify
    //their unit size. Instead, the number after the agent type denotes the agent's birth year.

    MakeUnit:: ID_CASTILE Emissary 1074
    MakeUnit:: ID_CONSTANTINOPLE Emissary 1074
    MakeUnit:: ID_BURGUNDY Emissary 1074
    MakeUnit:: ID_EGYPT Emissary 1074
    MakeUnit:: ID_HUNGARY Emissary 1074
    MakeUnit:: ID_ILE_DE_FRANCE Emissary 1074
    MakeUnit:: ID_MOROCCO Emissary 1074
    MakeUnit:: ID_NOVGOROD Emissary 1074
    MakeUnit:: ID_POLAND Emissary 1074
    MakeUnit:: ID_ROME Emissary 1074
    MakeUnit:: ID_RUM Emissary 1074
    MakeUnit:: ID_SICILY Emissary 1074
    MakeUnit:: ID_SWABIA Emissary 1074
    MakeUnit:: ID_VENICE Emissary 1074
    MakeUnit:: ID_WESSEX Emissary 1074

    MakeUnit:: ID_WESSEX Princess 1070
    MakeUnit:: ID_WESSEX Princess 1071
    MakeUnit:: ID_ILE_DE_FRANCE Princess 1072
    MakeUnit:: ID_CASTILE Princess 1069
    MakeUnit:: ID_VENICE Princess 1070
    MakeUnit:: ID_DENMARK Princess 1071
    MakeUnit:: ID_BRANDENBURG Princess 1071
    MakeUnit:: ID_BURGUNDY Princess 1070
    MakeUnit:: ID_POLAND Princess 1068
    MakeUnit:: ID_MUSCOVY Princess 1069
    //MakeUnit:: ID_NOVGOROD Princess 1070
    MakeUnit:: ID_CONSTANTINOPLE Princess 1071
    MakeUnit:: ID_HUNGARY Princess 1072
    MakeUnit:: ID_SICILY Princess 1069

    by Monkeyman from the Org, re-posted here, and now again:

    Everything you ever wanted to know about Foot Knights by A.MonkeyMan(but were afraid to ask, or maybe not I don’t know J)

    Foot knights are not available to build in MTW. Foot knights currently only exist in the following cir***stances-

    1. A Rebel army, particularly faction re-emergences and sometimes catholic rebellions.
    2. Gothic, Chivalric, Crusading and non early royal knights can dismount all the time, by right clicking on them in the phase before the battle when you are asked to choose a formation for your army.
    3. Other mounted units including early royal knights, feudal knights and in fact any other mounted unit without exception; can dismount as the attacker or defender in a siege situation. Feudal knights and early royals give feudal foot knights, ghulams give Saracen inf., gendarmes give chivalric maa etc. (try a few yourself most give archers, spears or peasants).

    Entries do exist on the map to +1 valour foot knight building areas, this is relevant to entries in crusaders_unit_prod11.txt in the MTW directory in program files and possibly links back to a development indecision on the building of foot knights themselves.

    Regarding foot knights in history – foot knights although for the most part less used than as mounted versions are a quite valid unit to exist in medieval warfare. Particularly with the advent of gunpowder and weapons like the billhook, halberd, poleaxe and pike that evened up the contest between heavy cavalry and foot troops foot knights became particularly heavily used and started to outnumber their mounted friends. Examples like the wars of the roses including the battle of Bosworth (1485 where Richard III died) knights were almost exclusively on foot with poleaxes, with a few exceptions. Also the 100 years war saw the English knights on foot by preference. Also to take into consideration is the impracticality of transporting horses over bodies of water (play the Hastings historic battle, most knights are foot mounted despite the Normans bringing as many horses as they no doubt could.

    So given this you say – I want to choose my own rules as to the build ability and use of foot knights. Well here for you is what I know about the modding of such units. Before you start, go to your MTW directory and copy the file crusaders_unit_prod11.txt to a nice safe place. Also do the same for crusader_build_prod13.txt.

    1. I want to make feudal knights (or any other unit) dismountable all the time:

    Go into crudaders_unit_prod11.txt open it in WordPad (or download a excel version of the files and use as they state in their read me, you can probably get one from www.totalwar.org but be aware that this may fail to work with a patched version of the game)

    Search down the entries for the entry for the entry for feudal knights, each entry will probably take two lines and make sure you ignore the entry for feudal foot knights for the time being.

    Once you have found it go right to the end (probably on the second line) and you will find the following –

    "BerberCamel, bedouincamelwarriors" FeudalFootKnights SWORD

    add in the word YES before sword so you get

    "BerberCamel, bedouincamelwarriors" FeudalFootKnightsn YES SWORD

    note that this should be separated from the words around it by a TAB.

    Now save this and start a game of MTW to test if it works. Note that if you get an error message this normally relates to the correctness of what you entered so either restore your backup version (you remembered to do that right) or go into the file again and amend the spacing between each item you edited, most items should have one tab between them, of the nature that each is an entry in a dataset, and two tabs are required if there is no entry for a particular value so pay careful attention to whats thes before you start.

    (MT's note: Obake's post continues in the next)

    Total War Forums, the official forums of the Total War series:

    Forum terms and conditions
    Technology Discussion Section
    How not to assemble a PC

    Google-fu, the best skill in solving technical issues.

    Faibo waipa!
  • Maeda_ToshiieMaeda_Toshiie Senior Member SingaporeRegistered Users Posts: 3,601
    edited July 2010
    Continuation of the original thread (3).

    Continuation of Obake's post below:

    2. I Want to be able to build Foot Knights as a separate unit because I think I should have the option and it will make the game more fun.

    In crusader_unit_prod11.txt find the entry for the relevant foot unit you want to build for example purposes I will edit Chivalric Foot Knights.

    Find the entry for ChivalricFootKnights and find the part that looks like-


    Between “Close to support” and “defender spear”, two tabs after (108.5) (there are three) place the line


    you can do this by typing it as it is here or copying the relevant entry from the mounted knights and removing the need for a horse breeder.

    You should have something like this –


    Save the file and test in MTW. Other thing of note that you might want to change are the line


    Relates to the faction that gets a valour bonus for this unit and the region that gets one. This can be changed but note that each province has only one speciality allowed, if two are given the first occurrence in the unit prod file takes precedence.

    Also of note is the following at the start of the entry

    ChivalricFootKnights INFANTRY 625 8 1 0 80 40 1 PREFERRED

    The first number is the cost of a standard unit so 625 (different in patched version I think). The entry 40 is the standard unit size (ignore the 80 it’s nothing to do with it) this number is multiplied by the unit size in your game so huge 40 * 2 = 80 and the cost is hence multiplied by it too. So for example if you wanted units of 60 knights in standerd costing 1000

    ChivalricFootKnights INFANTRY 1000 8 1 0 80 60 1 PREFERRED

    These would be units of 120 costing 200 in Huge unit sizes.

    3. I want to be able to build Gothic knights and foot knights even though I’m the English because we lack a cool high-tech unit.

    Ok fine, go into crudader_build_prod13.txt. Find the entry for ROYAL_COURT and go to the part (open it with wordpad and it should be only 1 line long):


    Note that this is the end of the factions that can build each level of the royal_court, with each level having different availabilities, ending in level 4 with only german/hre and Italians. Either copy one of the entries for the lower levels and paste it over the final entry or add in ,ENGLISH. Such that you have:


    Save this file and close.

    Now go into crusader_unit_prod11.txt and find the entries for gothic knights and gothic foot knights (make these work as noted in no.2 first remembering they require level 4 buildings) and find the line(s)

    "FULLPLAR, YES, YES" "GERMAN_HRE, ITALIAN" "Missile, Shocktroop, Spear, Cavalry"

    and either replace with ALL_FACTIONS (without "s) or add in as before ,ENGLISH.

    Save this file and test.

    Please note that the simple modding of this game is really quite easy with some patience. Merely of - decide what you want to do, find something that exhibits this behaviour and make an educated guess as to what in the relevant files causes it to do this where the thing you want to change does not.

    Posted by Hermano re adding new units:

    To add a unit you'll have to add and edit some files:

    Add a new Line to your crusaders_unit_prod11.txt, this describes most of the unit, you'll need to name it, this name should be uniqu and easy, you'll write it a few times
    Add a description to \loc\eng\descriptions.txt
    Add names (singular & plural) to \loc\eng\names.txt
    Add the unitname+.bif to \campmap\info_pics\units\_files.txt
    Add the unit and positions (best copy&paste from another fitting unit) to \textures\men\deadpage coords.txt
    Add a lbm file to \battle\UnitIcons\ [unitname.lbm]
    Add a bif image to \campmap\info_pics\units\ [imagename.bif]
    Create a file containing the actionsdata to \textures\men\actionsdiddy\[unitname.txt]
    and \textures\men\actionspage\[unitname.txt]
    Choose the units texture (set in crusaders_unit_prod.txt also)
    for example "Chainhlm" (new textures can't be added yet)
    Add the files [unitname_W.txt] and [unitname_S.txt] (if shield used)
    to the texture\men directory, in this example \textures\men\chainhlm\
    in these files are the numbers of weapons and shield stored, lets take weapon1 and shield 2
    Add folders and files to the \textures\men\items\... folders
    one for the weapon, in this example \textures\men\items\Weapon1\Unitname\
    and \textures\men\items\Shield2\Unitname\
    in these folders all weapon/shield movement files are stored (for example fight.txt)

    that's it

    By Phil HK:

    Hermano forgot one file.

    totalwar\campmap\review_panel\units needs to be added

    If you are adding an archer unit you need to add them to the Projectile stat file

    If you've made it this far, your mind is no doubt bewildered. Don't worry, it'll all sink in. The best thing to do is get your hands dirty by playing around. Just make sure you've backed everything up before you start!


    Obake Date (02/09/04) [Adding new Units]

    Here's an old post by Kekvitrae. I can't remember if I got this off of an old thread here, or one over at the Org, but either way, it's good information.

    To create new units follow these steps:
    1. Open up your unit_prod11.txt file in Notepad and search for a unit that is a close match to what you want to create. To create a new heavy spear chucker, simply find the Bonnachts (found in the Viking's unit_prod11.txt file).
    2. Highlight it all, right down to the beginning of the next unit under it.
    3. Select Copy.
    4. Scroll down to the point where the unit list ends and emptiness begins. If you have word wrap off, it wont be too far down.
    5. On the line under the last unit, hit Paste. You now have an exact copy of the Bonnacht unit in the file. Save the file.
    6. Download and install Gnome's editor from the Org's download tools.
    7. Open up the unit_prod11.txt file with Gnome editor and edit the stats of the new unit (all the way down at the bottom of the list) however you please.
    8. Rename the unit to something other than Bonnacht. Just dont put any spaces in the name. In this example, we'll choose the name SpearChuckers. Save the file.
    9. Open up Windows Explorer and go to your MTW directory. Go to the Battle\UnitIcons\ directory and copy the file Bonnachts.LBM and paste it in a temporary directory.
    10. Rename the file to SpearChuckers.LBM (remember, the file names must match that of the unit name) and move it back into the UnitIcons directory.
    11. Go to the campmap\ directory and do exactly the same thing with Bonnachts.bif files in the Info_Pics\Units\ directory and the Review_Panel\Units\ directory, copying/renaming/moving.
    12. In the Textures\Men\ directory, search every directory in there for references to Bonnachts*.txt and repeat the above. In this example, you should have a SpearChuckers.txt in the ActionsPage\ directory, and a SpearChuckers_W.txt and SpearChuckers_S.txt file in the NewPeasants\ directory.
    13. Because the weapons are hidden from view until they fire, Bonnachts dont require files in the Items\ directory. However, If you choose to create a unit that has their weapons and shields visable at all times in battle, repeat the above by copying and renaming the directories of the unit you are imitating to the unit you are creating. Example: In the ArabInfantry_S.txt file, you will see the number 2. Look in Items\Shields2 (note the 2), and you'll see ArabInfantry directory. Copy and paste it into a temp directory, rename it to your new unit, and move it back. Do exactly the same thing with ArabInfantry_W.txt (which has a 5 in it, so you should look in Items\Weapons5\.
    14. Go back to the root MTW directory and look in the Loc\Eng directory. Open up Names.txt in Notepad. Scroll down (or run a search) until you find this:
    ["Bonnachts_Singular"] {"Bonnacht"}
    ["Bonnachts_Plural"] {"Bonnachts"}
    15. Copy it and paste it at the end of the unit list, just a few more lines down. Rename Bonnanchts_Singular to SpearChuckers_Singular. In fact, rename all four Bonnachts references to SpearChuckers. Again, watch the spelling and capitalization. Save the file.
    16. Open up Descriptions.txt in the same directory with Notepad and run a search for ["Bonnachts_desc"]. Copy the whole line and paste it at the end of the unit list just a few lines down, exactly the same way you did with the Names.txt file.
    17. Rename Bonnachts_desc to SpearChuckers_desc, and then edit the description however you please. Just remember that since the unit description box in the game has to sliding bar, you have to limit the description of the unit. Otherwise the game will cut off the excess part, leaving you with an incomplete description when you view the unit. Save the file.
    18. Open up the DEADPAGE COORDS.txt file with Notepad in the Textures\Men directory.
    19. Run a search for Bonnachts, and highlight and copy that line and the numbers under it, and paste it at the bottom of the list. Rename the now-pasted Bonnachts to SpearChuckers. Save the file.

    Now, with any luck, you will have a new unit, the Spear Chuckers, at your beck and call. Just remember to assign it to a faction by tinkering with the Gnome editor and the unit_prod11.txt file.

    To transfer a building from the VI campaign over to the original campaign (or vice versa), repeat steps 1-7. Open up the VIKINGS_build_prod13.txt, copy the lines relevant to the building you want, open up CRUSADERS_build_prod13.txt and paste the lines in. Then just tinker with the Crusader build_prod13.txt file until you get the right requirements set.

    Kaatar (02/13/04) [More How To's]

    If there are any typos here please tell me so I can edit the post accordingly.

    Let's begin. I highly recommend you get Gnome Editor. It's available here:

    To add new units to a faction:

    Open CUSADERS_UNIT_PROD11 located at C: \ Program Files\Total War\Medieval - Total War.

    Now find the unit you would like to edit, Bulgarian Brigands for example. Now find the factions that use this unit. For the Bulgarian Brigands, this will look like:


    There will be two parts like this for the unit. Simply put in the name of the faction you want to have this unit into the these two parts, the Aragonese for example. The code should now then look like this:


    The Aragonese will now be able to train Bulgarian Brigands.

    Note: If you are editing a unit that you only want one faction to have, the FN_FactionName doesn't need inverted commas (" ") but if you want multiple factions to be able to produce this unit then the faction must be inside inverted commas and separated by commas ( , ).

    How to set a region's owner:

    In the startpos folder located:
    C: \ Program Files\Total War\Medieval - Total War\campmap\startpos
    there will be the three era.txt's (Early.txt, High.txt and Late.txt). I will use Early.txt for example.

    Use the find function to find SetRegionOwner. Here's an extract from the file:
    SetRegionOwner:: ID_ALGERIA FN_ALMOHAD

    SetRegionOwner is the command used to ... set the region owner!

    This is the region which you are giving an owner.

    This is the faction that owns the region.

    If you wanted the English to own Ireland then the code would look like this:
    SetRegionOwner:: ID_IRELAND FN_ENGLISH

    If you want the rebels to own a region, don't specify who owns it, as rebels are the default owner.

    That's how you give regions an owner. :)

    How to make a non-playable faction playable:

    Open one of the era.txt's located here:
    C: \ Program Files\Total War\Medieval - Total War\campmap\startpos
    I'll use Early.txt for the example. In the example I will make The People of Novgorod playable. You could choose the Golden Horde or Papacy or any non-playable faction from any period if you like.

    Use the find function to find "SetActiveFaction" then make the following change.

    Change the "MINOR" in this line to "MAJOR"
    SetActiveFaction:: FN_NOVGOROD FT_MINOR
    so it look like this:
    SetActiveFaction:: FN_NOVGOROD FT_MAJOR

    The People of Novgorod will now be selectable from the Early Period faction selection screen.

    Lord of Storms
    "In some era files and also depending on the version, it is not as simple as switching minor to major, you may have to add the faction to the setactivefaction list, set a starting treasury, Place the leader in a region owned by this faction, and assign the region ownership to the faction as well, be sure to check!"
    Edited the quotation slightly to suit the situation .... sorry LoS :(

    How to add heroes to a faction that already has heroes:

    For the example I'm going to make a German hero called "Fluffy Bunny". :)

    Open DEFUALT_HEROES (or VIKING HEROES if you're adding heroes to the VI campaign) and find the German famous heroes part. This is the part of the file that contains the German heroes stats. Here is one entry:

    //hero name date, c, d, p, a, l, v,
    "Henry", "the Lion", 1129, 3, 4, 3, 4, 4, fearsome1,

    It looks complicated but it's easy to understand once it's broken down.

    //hero name
    Henry", "the Lion",
    The name of the hero. First (fore) name and then last (sur)name.

    The year this hero was born. He will come of age when he 16. When he is 16 he will appear with the first elite unit built. If the hero is of age at the start of a period (Early Period for example) and you choose this period to begin a campaign on, he will be given a unit automatically.

    c = command. This is what your hero's command will be. 3 command = 4 stars. 0 = 1 star. It's always one higher than the number you enter. The exceptions are 8 and 9. If you put these in your hero will have 0 command. 8 seems to the the highest number of stars you can start off with.

    d = dread. This is what your hero's dread will be.

    P = piety. This is what your hero's piety will be.

    a = a***en. This is what your hero's a***en will be.

    l = loyalty. This is what your hero's loyalty will be.

    v = Vice or Virtue. This is what your hero's VnV will be.

    There is also one more part to a heroes entry.

    GENERAL, ID_LIMBO, -1 //of Saxony, father of Otto IV

    Broken down ...

    This is the kind of unit your hero is going to be. The types of heroes available are:

    "Region list the place where the character will appear from, ID_LIMBO means everywhere is possible". If it were ID_WESSEX, the hero could only come from Wessex.

    Sets a portrait for the hero. -1 means random.

    //of Saxony, father of Otto IV
    Comment describing the hero.

    Now you know how it all works. Time to make a hero. I'm adding mine to the Germans. You can add it to any faction you like. Let's start.

    I need to change the 16 to 17 because I'm adding one new hero. So it should look like this:

    Put the information for your hero underneath the current last hero. It makes it easier to keep things neat and easy to see.

    My heroes entry will look like this:
    "Fluffy", "Bunny", 1210, 2, 7, 0, 1, 7, mightywarrior3 GENERAL, ID_LIMBO, -1 //Feared by all!!!

    *Gasping for air* AL .... MOST ..... DONE ....

    Now we just need to reference our heros name in CHANGES.TXT. Open CHANGES.

    At the part of the file that says:
    you need to put in your heroes first name. This is what mine will look like:


    Now you need to put in your heroes last name. That is at this part of the file:
    This is what mine will look like:


    Save changes to both DEFAULT_HEROES (or VIKING_HEROS, whichever one you edited) and CHANGES. Your hero is finished! Beware of the dreaded FLUFFY BUNNY!!!!!!

    : D

    Thorough guide on How To create a new faction:
    (MT's note: dead link ->) http://www.excaliburclan.com/Total%20War/Adding%20new%20faction%20guide.pdf

    Marly (06/16/05) [Crusading]

    To make crusaders (or any other catholic faction) able to crusade: For this example i will use the 'Crusaders' from XL Mod, for other factions merely switch their name and if not using XL open the associated file instead of the ones stated.

    Download gnome editor from totalwar.org download section

    Open up MTW_XL_HIGH_BUILD_PROD13.txt (Program Files, Total war, should be in the first file you come to)

    scroll down to row 34 Which is labelled 'Chapter house'

    then scroll across to column 20 'Faction assossiation'

    This square will look like:

    Now you want to alter it to read:


    Now you can build a chapter house and crusade

    Please note your crusades will only have fanatics in them at this point:

    Boot up gnome editor again, this time open 'MTW_XL_High_unit_Prod11'

    Scroll down to row 91 where you'll find knights templar, scroll across to column 50 it will read:


    Alter it to read:


    and voila your crusades will now have templars

    Do note however these templars arent compatible with the ones you build due to limitations in crusade units etc but they will be compatible with the templars you start the game with

    Same process applies for order foot (row 71)

    Soldat (10/01/05)

    Can anyone recommend an editor for .bif files or any other tools I may find helpful for modding.

    P.S. The info in this thread has been very helpful to me and I'm very grateful for all of the effort put into it.
    Total War Forums, the official forums of the Total War series:

    Forum terms and conditions
    Technology Discussion Section
    How not to assemble a PC

    Google-fu, the best skill in solving technical issues.

    Faibo waipa!
  • Maeda_ToshiieMaeda_Toshiie Senior Member SingaporeRegistered Users Posts: 3,601
    edited July 2010
    Reserved post 1, in case I need to add more to the original.

    (If you notice posts that contain any errors/deviations from the original thread in the old boards, pm me)

    A very belated reply to Soldat's query: The Org hosts tools from CA to unpack bif files into the editable bmp format. I do believe there are should also be tools to repack them for modding purposes. Well if anyone still cares for MTW can try...
    Total War Forums, the official forums of the Total War series:

    Forum terms and conditions
    Technology Discussion Section
    How not to assemble a PC

    Google-fu, the best skill in solving technical issues.

    Faibo waipa!
  • PtolomyPtolomy Member Registered Users Posts: 38
    edited June 2012
    Hey maega if your still active one here i was just wondering can you make more than one modded file?
    A Strong Thirst For Knowledge.
  • IoriYamadaIoriYamada WalesRegistered Users Posts: 792
    edited October 2021
Sign In or Register to comment.