The way settlements look is defined by the files in the "settlements" folder. Such files are easily editable, but can be very confusing at first. For this tutorial, you will need:
http://www.chmaas.handshake.de/delph...vi32/xvi32.htm - A hex editor
http://www.statman.info/conversions/hexadecimal.html - A hex converter
And an unpacked copy of Medieval II Total War. In the Medieval II Total War/data/settlements folder, there are many different types of files. However, the most important type of file is the .worldpkgdesc file. This allows you to shuffle around settlements between different cultures. Navigate to your Medieval II Total War/data/settlements/north_european/settlements/village folder to begin. Open up the north_european_village_a.worldpkgdesc file with the hex editor. It should look like this:
Note that there are two halves to the viewing window - the right half shows what the file would look like in notepad, the left half shows what the file looks like in hex (a series of letters and numbers instead of regular characters). Confusing, huh? For clarity, I have divided the file into some sections:
The red section is the internal name of the settlement. This is the name that you will use in other text files to refer to it (it is rarely used). The orange segment is the location of the .world file. This defines what the settlement looks like. The yellow section tells you what culture uses the settlement. The green section tells you in what environment the settlement is found (forest, desert, etc). Finally, the blue segment tells you what type of settlement it is. Ignore the black boxes for now. So, for example, using the information provided in this file we can tell that the settlement defined here is called north_european_village_A, uses the .world file (that is, has it's layout and buildings defined by the file) settlements/north_european/settlements/village/north_european_village_A.world, is used by the North European culture (England, Scotland, France, Holy Roman Empire, and Denmark), can be found in any environment, and is a village. That's very nice and all, but how do you edit it? This is where the black boxes come in. These black boxes are called indicator boxes, and they are used in reading the file. When the computer reads this file, it doesn't see the file with the words in it like we do, and with all the meanings spelled out. It just sees text. It doesn't know when one word ends and the next begins. This is what the indicator boxes are for. They tell the game how many characters are in each word (for example, they tell the game that there are 7 characters in the word village). If you are familiar with the battle_models.modelsdb file, then these indicator boxes serve the exact same function as the numbers at the beginning of each line. Let me give an example. Look on the left side of the window, the hex side. In the yellow section of the file, do you see the indicator box that says "11" in it? Now look on the right side of the window. Do you see the indicator box in the yellow section that has what looks like a left-pointing arrow in it? The two are actually the same. Editing something on one side of the window edits it on the other side as well. (If you don't see what I'm saying, replace the "11" with a "12" by selecting the indicator box on the left side and typing in "12". You should see the left-pointing arrow turn into an up-and-down pointing arrow. If you are using Windows XP, these special symbols may all look like rectangles on the right side. Don't worry about that; your changes are having an effect even if the symbol continues to be a rectangle). Since the left side is in hex, take the number 11 and run it through the online converter (the second link at the beginning of the tutorial). 11 in hex is really 17. What is the next word after that indicator box? northern_european. How many characters does northern_european have (including the underscore)? It has 17 characters. If, for example, I wanted to change the culture to middle_eastern, which has 14 characters, I would have to replace the 11 in the indicator box with a 0E to reflect the decreased number of characters. Otherwise, the game will crash. Confusing? You bet. Annoying? Definitely. But that's the way it is. Now lets try editing the file. I'll start by giving you your options for each category:
Name: use anything you want
World file: use any world file in the data/settlements folder.
Culture:
northern_european
southern_european
eastern_european
greek
middle_eastern
mesoamerican
any
Environment:
generic
(the rest are guesses, as I have never used this feature and do not know if it works)
mediterranean
sandy_desert
rocky_desert
unused1
steppe
temperate_deciduous_forest
temperate_coniferous_forest
unused2
highland
alpine
tropical
semi_arid
Type (there are many options, but these are the ones you'll probably be using):
village
town
large_town
city
large_city
huge_city
default_fort (Fort)
wooden_fort (Motte and Bailey)
stone_keep (Wooden Castle)
castle
large_castle (Fortress)
fortress (Citadel)
Let's do an example. If you wanted to make the East European village look like a north_european fort, this is what you'd do:
Note how I changed the indicator boxes to reflect the new number of characters. I would save this file anywhere in the settlements folder - it doesn't matter where, so long as it's in the settlements folder.
What's new in Kingdoms?
Kingdoms introduces a new line, the faction line, that lets you make specific factions have specific settlements. For an example, look in your Medieval II Total War/mods/teutonic/data/settlements/north_european/castles/castle folder and open tc_castle_a.worldpkgdesc file.
How do I make this settlement appear in custom battles?
This is a really interesting question, because using the exact same method and typing the exact same thing will only work some of the time. The best way I have found is to use the "faction" line in Kingdoms. Make a seperate worldpkgdesc file for every faction in a culture (continuing with our village example, we would make a worldpkgdesc file for all the east_european factions - Poland, Russia, and Hungary). Name the files whatever you want (make sure that the names in the red box are different!). Set the faction to whichever faction you are using for this culture (so I would set one's faction to russia, one's to poland, and one's to hungary). Set the culture to any. That works about half of the time. Note that this method will only work if you use every faction in a culture, and if the culture has at least two, or preferably three, factions.
I hope that this tutorial was clear and helped you to understand how to edit settlements!
Mythic_Commodore