WHAT IS A CUSTOM TILE?
The strat map is divided in squares (tiles), you cant see these squares ingame, but you can edit each one of them in files like map_regions, map_climates etc. (Dont worry you dont need any of them for this matter). each one of them will load a battlemap (when a battle happens there), and its heights/geography will automatically be generated by the engine when the battle goes to the battle map, based in the perviously quoted files.
However, you can create a custom tile and allocate it in a specific position on your battle map. Thats what we did in Third Age Total War for places like THE ARGONATH or the OSGILIATH RIVERCROSSING (check my signature). Then if a battle happens in one of these locations in the stratmap, the battlemap loaded will run your custom tile. This custom tile is nothing but a "settlement", but with no possibility of adding things like gates, walls or the control plaza, and it actually is not a settlement in the stratmap, you cant even select it by clicking on it. Its files are exactly the same from settlements and you can create/edit your custom tile using the IWTE tool, exactly like you do with settlements. That's what I did with The Argonath, used IWTE to edit the terrain and add the statue models.
CREATING YOUR CUSTOM TILE
If your custom tile is just about terrain, trees, vanilla techtree buildings / ambient buildings / settlements, then you can create it directly via battle editor. But if you want to add custom 3d models, then you need first to create them via the IWTE tool. I recmomend that while creating your custom building in IWTE, edit its .worldpkgdesc file to be an ambient one(check a vanilla ambient settlement of any culture as example).
IMPLEMENTING YOUR CUSTOM TILES
Pay attention to the text colors below, they will guide you to avoid confusion.
Once you have your custom building created and ready to be placed in your custom tile, run medieval 2, go in options then battle editor. Click on the map exactly in the coordinates where you want your custom tile implemented. This is not the step where you are actually choosing the location where your custom tile whill show up when implemented in the game, but it is impportant to implement it in the final exact place now as the integration between your "settlement/tile" terrain and the strat map terrain need to fit.
Click next to load the battlemap.
Once the battemap editor is loaded, click place/edit worldpackage tool (sixth button from right to left on the bottom bar), click ambient and navigate to your just created building. Click on it and move the mouse over the terrain, you're now placing your building, choose a location and use "hold shift + mouse movement" to define the height of your building.
WARNING: If you place your tile in a too low or too high height it will result in a bug that will deploy the armies huddled together when you load a battle in the tile and block the entire pathfinding of the map, preventing you from deploying the armies correctly. Adjust the height to a intermediary value to get the tile working normally (you Ill need to do some later test).
After finding the height you want, click with the left mouse button to place the building. Click esc, save it. Close the editor.
Go into the game folders, look for data/world/maps/battle/custom/"name you used to save". There' is your tile, you dont need the text files, just the .wfc one. Rename it to whatever you want and paste it in data/world/maps/campaign/imperial/campaign/custom_tiles, if there is not such folder, then create it.
Now go in data/world/maps/campaign/imperial/campaign and create a text file called "custom_tiles_db" (if there is already such file, then use it).
Open this file, you will see something like this:
Code:
Misty-Mountains_Province 179 216 moria.wfc light fog morning
West-Osgiliath_Province 255 127 osg.wfc clear morning
East-Osgiliath_Province 240 128 pelenor.wfc clear sunrise
Druadain_Province 242 132 rammas_n.wfc clear midday
Anorien_Province 249 127 rammas_e.wfc clear midday
Cardolan_Province 114 235 barrow.wfc clear midday
Nan-Curunir_Province 165 184 isen_fords.wfc clear midday
Helms-Deep_Province 167 158 hornburg_amb.wfc clear midday
East_Emnet_Province 241 169 argonath.wfc clear midday
Lower-Misty-Mountains_Province 181 216 moria_halls.wfc clear night
LETS EDIT IT:
The region names you see are just IDs. In my tests, I found out that you can actually use anything there, any text like "ID-01" of whatever, Im 99% sure that it actually dont need to be a region name. But using region names was what original TATW did, so maybe the original modder had a good reason for doing like this... we never know.
One thing is for sure, YOU CAN'T USE THE SAME ID MORE THAN ONCE. If you use the same ID (province name or not) for 2 or more custom tiles, the log.txt will warn you and this will cause some custom tiles to not load in game and/or crash when accessing custom battles. So always use unique IDs.
So use any text or any region name from data/text/imperial_campaign_regions_and_settlement_names.txt to use here, notice that there are two lines of text for each region in this file, you are looking for the text inside the {} in the first line.
Now you must type the exact coordinates where your custom tile will be located. Go ingame, start a campaign, place your mouse cursor exactly on the point where you want to locate your custom tile, hit " on your keyboard, type show_cursorstat, that shows you the coordinates on where the mouse cursor is located. Now go back to the text file and place this coordinates right after the name of the region you just placed (like you see in the code I posted here).
Now comes the name of the .wfc file, use the same name you used back there.
Then type the weather condition and the time of day.
END OF CUSTOM_TILES_DB EDITING.
-----------------------------------------------------------------------------------------------------------------------------------------------
If you want your custom tile to be available in custom battles, go into data/custom_locations.txt.
Each entry is like that example:
Code:
custom_location Osgiliath Rivercrossing
{
location 255 127
image data/menu/battlefield_pics/custom_rivercrossing.tga
sett_locked yes
climate temperate_deciduous_forest
summer no
}
Where the following colors matches the bits of it:
Name shown on custom battle game menu
Coordinates (the same your placed in the other text file)
The image shown on custom battle menu (create one if you want, and place it in DATA/MENU/BATTLEFIELD_PICS)
yes for preventing loading settlements there, no to allow it.
The rest is self explanatory.
THE HARDCODED LIMIT OF ENTRIES IN THIS FILE IS 69, WICH MEANS YOU CAN ONLY HAVE 69 CUSTOM LOCATIONS, MORE THAN THIS WILL CAUSE CTD OR MALFUNCITION WHEN YOU ACESS CUSTOM BATTLES INGAME.
EDITING AN EXISTING CUSTOM TILE (REVERSE PROCESS)
Lets say you want to take and edit a custom tile from another mod, or edit a custom tile of yours wich map.wfc file is not in the data/world/maps/battle/custom/ folder anymore. Its very simple. Create a new scenario in the battle editor (preferably in the final coordinates where your custom tile will be), when the terain editor is opened, dont do anyting, just save the game with any name. Now go into data/world/maps/battle/custom/ and open the folder with the name you just used to save the scenario. There will be a map.wfc there, leave it as it is. Now go in wherever the custom tile that you want to edit is and rename it to "map.wfc" and use it to replace the map.wfc you just created. Now go again in the battle editor and load the game you just saved. Voila, you will now see the custom tile you want to edit.
THE END.