Many people is asking about how to transfer custom settlements implemented in some sub-mod to another one.
Here we go:
The settlement files are mostly located in
data/settlements.
Each settlement has its folder, you can see
the seven files inside it plus a folder called
/maps, wich comtains .texture files for paiting the settlement ground with tile, mud and farms.
Copy the entire settlement folder and paste it inside your
data/settlements folder in your mod.
Now, open
IWTE, go in
Worldfiles tab and click
Edit worldpackage button. Navigate to where you pasted the settlement folder in your mod, open the folder and double click the .worldpackage file.
You should see something this:
This example is for my Erebor of course.
The really impportant boxes for you now are the
Pkg Path, the
Type, the
Faction and the
Culture ones.
In
Pkg Path, place the path for the place where you allocated the settlement folder in your mod.
In
Type, put the level you want to use for this settlement in your mod.
In
Faction, choose a faction for it. (Remember that then each settlement of this category (huge city in the example) for this faction, will read your custom settlement. So imagine that in TATW moors is a playable faction, eveytime I upgrade a settlement to huge city it will be a Erebor! So you must choose a non playable faction, a free not used slot. You could also do like we did in TATW, preventing specific cultures to build huge cities, like we did with the moors (dwarves) wich are southern_european. So Erebor uses the huge_city slot from moors but they can't upgrade any city to huge, so there will be only 1 Erebor, they will not be able to go arround building erebors on the campaign map.
Open desc_sm_factions.txt inside
/data folder in your mod, and check for wich culture the faction you placed in the .worldpackage belongs. Put this culture in the
Culture box.
Its finished, Click ok. go inside the settlement folder, there is now 2 .worldpackage files, delete the original one (the one with a smaller name), and rename the new one (the one with a bigger name) to have the same name from the original. You can also delete the text file created there.
Now you must edit the
descr_strat.txt file inside
data/world/maps/campaign/imperial_campaign folder so the region where you want your custom settlement located will match your edited .worldpackage file.
In
descr_strat.txt, navigate to the region you want to have your settlement. In my sub-mod for TATW, it looks like this:
Code:
settlement
{
level huge_city
region Erebor_Province
year_founded 0
population 5236
plan_set default_set
faction_creator moors
building
{
type hinterland_info_building3 info_Erebor
}
building
{
type core_building huge_stone_wall
}
.
.
.
}
Notice the
level and the
faction_creator, they must match the info you putted in the .worldpackage file.
The
type core_building must match the
level. You can easly check another examples in this descr_strat.txt file to see wich entry corresponds to the level you're using. Be careful to not confuse castle types with city types as they share the same
level names.
OK you're done.
Now go into
/data/world/maps/base and delete
map.rw. Start your mod, start a new campaign and go check if things are working.
There is also many things related with 3d unique models for your settlement on camapign map, and hidden resources that prevent your unique settlement beeing upgraded in the campaign and then changing it to another settlement but this is not a matter for this small tutorial here. By checking the files in TATW you can learn by example about these things.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Now you will learn how to acess custom settlements directly in custom battles, this will not directly teach you how to organize your mod in therms of what custom settlements will be present in custom battles but just allow you to use any of them in a quick way, however, the process is the same for all things related with this, so I belive at the end you will be able to organize your mod the way you want. I will use as example how you can quickly do it in TATW. Here we go:
1- With IWTE, open the 3 main files in mods/Third age.../data/settlements/south_european/huge city (it actually can be any settlement but remember that each one has a size for siege towers and walls so keep in mind that you must choose one that fits the size of your settlement's walls).
2- In IWTE, "worldfiles" tab, click "update reference paths". Copy the text lines on the boxes (paste them on a notepad file or such). Click cancel.
3- Copy the name of the files in this folder (southern_european_huge_city or such, do not copy the extension of the file, just its name). Also paste it in some notepad file.
4- Delete all these files inside this southern european huge city folder., EXCEPT THE .WORLDPACKAGE ONE.
5- Copy the files from your custom settlement folder EXCEPT THE .WORLDPACKAGE ONE and paste them in this southern european huge city folder.
6- Change the name of all these files you pasted to the name you just got from the previous vanilla ones, wich is southern_european_huge_city.
7- Repeat step 1 but now for the new files you just changed the name. In IWTE "worldfiles" tab, click "update reference paths", change the lines to the ones you previously copied into a notepad file as I said. CLICK OK. Click on SAVE 3 BINARY FILES.
8- Go into the folder and delete the old files, rename the new ones that emerged to match its names (the new ones will probably be generated with a "-1" on the end of its name, just rename it to look exactly like the old ones you just deleted, so replacing them, if no new file emerged then it already replaced the current ones, dont do anything with them, its already done).
4- Open TATW (the game itself), go into custom battles, select any place with no symbol on the front of the name (that symbol with crosses swords). Select, DWARVES and HUGE CITY (or the size you had choose previously). load the battle. It will not show the correct masks on the ground (farms and path etc...) but that makes absolutelly no difference for testing your settlement.