Renamiing factions isnt exactly hard, just tedious, and you have to do things perfectly the first time around. There are 19 files that you have to change:
MAKE A BACKUP OF YOUR ENTIRE MOD FOLDER!
Spoiler Alert, click show to read:
Copy all of those files from your vanilla M2TW into the proper folders in your ModBasics folder. Some of these we have already used, do not over write your modded files with vanilla files. If you do, then hopefully you backed up your entire ModBasics folder before you started this.
I suggest you open all the files in the same folder at once, so you know exactly where you are at. If you are using Notepad++ then you will have a tab for each file, and you can just cycle through them one at a time. Open all 12 files in the data folder.
The Search/Replace feature in Notepad++ is one of the best I have ever used. Get used to how it works. Of special interest to us are the Match Whole Word and Match Case options. When you are replacing words, often there are similar words that the default Windows notepad will overwrite and this ends up causing problems. For example we are going to rename England. If you do a search and replace on the string "england" in descr_banners_new.xml you will get several results. Some will be capitalized, some will not, some will be inside other strings like "Faction_banner_england.texture". If we do a replace all on those, then it will make some changes we do not want to make. Using the Match Case and Match Whole Word options will prevent this from happening.
descr_banners_new.xml:
Do a search for the word England. You will get find this this for the first entry:
You can see how this works. The Faction="England" tells the game which faction to look for, and then england is also used in the name of the texture. If we change both, then the texture will not show up in the game as we are not editing textures yet. If we just change the faction name, then our new faction will have Englands banner textures. This is what we want to do. In a real mod environment you would go ahead and do exactly what we are doing now, then when one of your team members creates the new banner textures you come back to this file and point the faction to the new banner.<Texture Faction="England" DiffuseMap="banners\test_banner\test_textures\test_banner_all.texture" TranslucencyMap="banners\test_banner\test_textures\test_banner_all_trans.texture"/>
Do a Replace All and replace England with a new faction name. I am going to use Disneyland as there will be no confusion if we have to go back and search for errors later. Make sure the two options are enabled, Match Whole Word and Match Case. I had 14 entries.
descr_character.txt
All we are doing here is changing the faction name. Notice that the factions are not capitalized. Replace england with your new faction name. I had 10 entries.
descr_lbc_db.txt
Only 1 entry here.
descr_model_strat.txt
This defines the stratmap models for various characters. Again all we want to change are the faction entries, when you make a real mod you can come back and change the model names where needed. I had 21 entries.
descr_names.txt
Only 1 entry.
descr_offmap_models.txt
Only 1 entry.
descr_sm_factions.txt
This is where your factions are created. There is a hardcoded limit of 31 factions. Notice all the options that are controlled from this file. Religion, culture, strat map border colors, names of logos and others. Pay special attention to the line that says standard_index. We will not be using this, but this tells the game which image to use from the files in data/banners. There is 1 entry to change here.
export_descr_character_traits.txt
What we are looking for here is any trait that relates to England. Some will be capitalized, some will not, some will be parts of other words, some will not.
england = 3 entries
England = 0 entries
england as part of another word = 13, mostly trigger names
England as part of another word = 8 entries, mostly trait names
export_descr_buildings.txt
Lots of changes here, which is why Replace All is so handy. There were 210 entries.
export_descr_ancillaries.txt
Similar to export_descr_character_traits.txt.
england = 5 entries
England = 0 entries
England as part of another word = 5 entries
england as part of another word = 0 entries
export_descr_units.txt
There are 87 entries.
export_descr_guilds.txt
There are 6 entries.
descr_regions.txt
There are 6 entries.
descr_sounds_music_types.txt
This file is read only. Make sure you change that first. There are 2 entries.
descr_strat.txt
There are 32 entries.
descr_win_conditions.txt
There is 1 entry.
campaign_descriptions.txt
This file has to be converted using Alpaca's converter first. What we are looking for here are the entries in the brackets that are all capitalized. We have to change those to our new faction name. The text outside the brackets is what shows up in the game. Feel free to write your own description if you wish. Good ones get some rep
expanded.txt
This one is a bit tricky as there are several different ways you have to check things, and also the unit descriptions will say English not England, so you have to get those too. You can also write some of your own descriptions here if you want. I suggest doing them in this order:
ENGLAND = 1 entry
ENGLAND as part of another word = 48 entries
England = 6 entries
English = 35 entries
At this point you can start and run the game, but you will notice a few things missing. On the faction selection screen there will be no faction symbol but when you mouse over the spot it should be you will get a description of your new faction. There is no unit image, the map showing your starting positions is wrong.
Spoiler Alert, click show to read:
When you are in game, certain character portraits and various other items do not show up. Unit cards will all be peasants, stuff like that.
Spoiler Alert, click show to read:
This is actually quite useful as it is a constant reminder of what needs to be finished on your mod. To get this stuff to show up you need to create all the artwork and name it properly. As this is not an art class we will just copy and rename the vanilla England files.
In the imperial_campaign folder, rename map_england.tga to your new faction name.
Inside your menu folder create a folder named symbols. Inside the symbols folder create the following folders:
fe_faction_units
fe_buttons_24
fe_buttons_48
fe_symbols_80
Inside all of those folders on your vanilla installation you will find file names that have _england as part of their name. Copy all of those files into the same folders in your ModBasics folder, and replace _england with your faction name. This will get all of your symbols to show up properly in game.
Inside your ModBasics\data folder create a folder named ui
Inside the ui folder create these folders:
captain banners - create a folder named dead inside this one
units
unit_info
From the vanilla captain banners folder copy all the files that have _england as part of the file name into your new folder, and then rename them.
From the vanilla units folder, copy the entire england folder into your mod folder and rename it to your new faction.
From the vanilla unit_info folder copy the entire england folder into your mod folder and rename it to your new faction.
The screenshots I want to see for this lesson:
Faction selection screen with working icon, moused over your new faction.
Bring up the army roster by right clicking on Army, I want to see the captains cards, not pink squares.
Mouse over one of your cities so the description pops up and shows your new faction name.
Your Diplomacy screen which should show your new faction name.
A Unit/character recruitment window which should show the proper unit cards.