<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tw-modding.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ChaosRobie</id>
	<title>Total War Modding - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://tw-modding.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ChaosRobie"/>
	<link rel="alternate" type="text/html" href="https://tw-modding.com/wiki/Special:Contributions/ChaosRobie"/>
	<updated>2026-05-13T15:32:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Campaign_Map_Making_for_Warhammer_III&amp;diff=1381</id>
		<title>Tutorial:Campaign Map Making for Warhammer III</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Campaign_Map_Making_for_Warhammer_III&amp;diff=1381"/>
		<updated>2026-05-09T00:19:15Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: Created page with &amp;quot;: ''WIP. Just describing the outputs makes it feel incomplete. Missing CAIME layer explanation. Missing Terry project structure. Need to mention db stuff, including start_pos.'' == Introduction == Let's make one thing clear: There is a &amp;quot;logical&amp;quot; map, and there is a &amp;quot;visual&amp;quot; map.  The &amp;quot;logical map&amp;quot; is mostly made in CAIME, which is sort of like an image editor with layers. That's got stuff like regions, where settlements are placed, terrain type that influences how pathfi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;: ''WIP. Just describing the outputs makes it feel incomplete. Missing CAIME layer explanation. Missing Terry project structure. Need to mention db stuff, including start_pos.''&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Let's make one thing clear: There is a &amp;quot;logical&amp;quot; map, and there is a &amp;quot;visual&amp;quot; map.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;logical map&amp;quot; is mostly made in CAIME, which is sort of like an image editor with layers. That's got stuff like regions, where settlements are placed, terrain type that influences how pathfinding is calculated, areas that are impassable by armies, &amp;quot;bridges&amp;quot; that allow armies to cross water without disembarking, and beaches that allow armies to disembark into the sea. All of this is exists in 2d and without any visual component.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;visual map&amp;quot; is mostly made in Terry, which is a 3d map editor. And that's the stuff you can see. Like the ground, mountains, trees, vfx, and props.&lt;br /&gt;
&lt;br /&gt;
You want those visual things to correspond to the stuff in the logical map. For instance, you'd want a mountain placed where there is an impassable area. You can also think about it in the opposite way: you want an impassable area where you placed a mountain. Getting that correspondence is not very easy, since you're using two editors and don't interact directly. It takes planning, reference images, annotations, and working iteratively to get a good outcome.&lt;br /&gt;
&lt;br /&gt;
== Campaign map files and how to make them ==&lt;br /&gt;
The files you'd put in &amp;lt;nowiki&amp;gt;campaign_maps/&amp;lt;campaign map name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== map_data.esf ===&lt;br /&gt;
CAIME creates this from a map.hex file. (Technically BOB.exe doing the processing, but there's some missing thing that CAIME is supplying).&lt;br /&gt;
&lt;br /&gt;
This is created very quickly, less than 15 seconds for even the most complex map.&lt;br /&gt;
&lt;br /&gt;
=== pathfinding.ppd ===&lt;br /&gt;
CAIME creates this, lots of processing and calculation involved. BOB.exe is unable to create this.&lt;br /&gt;
&lt;br /&gt;
This can take quite a while, more than a half hour for large maps with lots of settlements and roads with intersections.&lt;br /&gt;
&lt;br /&gt;
This file is critical, if you adjust ''anything'' in the map data, you will need to recreate this.&lt;br /&gt;
&lt;br /&gt;
=== spd_data.esf and hlp_data.esf ===&lt;br /&gt;
These are both created (at the same time) by giving a special command (using a user scrupt) to the game's .exe before you launch the game. But don't worry those details, because RPFM has a nice interface, there's a checkbox when you do Special Stuff -&amp;gt; Build Startpos.&lt;br /&gt;
&lt;br /&gt;
spd_data.esf is always created very quickly, within a minute. For medium sized maps (Immortal Empires) hlp_data.esf takes 5 minutes. However, for larger maps (Old World), it takes well over an hour.&lt;br /&gt;
&lt;br /&gt;
spd_data.esf is critical, if you adjust ''anything'' in the map data, you will need to recreate it. However, hlp_data.esf is bit less critical. It can be out-of-date, and the game will load without crashing. But pathfinding will be super screwed up, so definitely recreate before you release to the public!&lt;br /&gt;
&lt;br /&gt;
=== trade_routes.ptd ===&lt;br /&gt;
CAIME creates this.&lt;br /&gt;
&lt;br /&gt;
Not critical, it can be left out-of-date without any apparent issue.&lt;br /&gt;
&lt;br /&gt;
=== Lookup maps ===&lt;br /&gt;
CAIME does a .bmp output of the regions, colored based on their colors from the regions db table. You can process it yourself with BOB into these three images:&lt;br /&gt;
* &amp;lt;campaign name&amp;gt;_lookup.dds&lt;br /&gt;
* &amp;lt;campaign name&amp;gt;_lookup.tga&lt;br /&gt;
* &amp;lt;campaign name&amp;gt;_minimap.tga&lt;br /&gt;
&lt;br /&gt;
Not critical, it can be left out-of-date without crashing, but the map overlays will look a bit weird.&lt;br /&gt;
&lt;br /&gt;
==== elector_counts and hef_court ====&lt;br /&gt;
Crop the .bmp output and process it like the normal lookups.&lt;br /&gt;
&lt;br /&gt;
=== camera_heightmap.png ===&lt;br /&gt;
Greyscale 16 bit .png image, but with a special &amp;quot;tEXt&amp;quot; png block that gives the scale.&lt;br /&gt;
&lt;br /&gt;
Terry ''should'' be able to generate this, but it crashes when that is attempted.&lt;br /&gt;
&lt;br /&gt;
You can approximate it by using the map's heightmap, scaling it appropriately, and setting that &amp;quot;tEXt&amp;quot; block to the right value.&lt;br /&gt;
&lt;br /&gt;
There's also &amp;lt;nowiki&amp;gt;camera_sea_level_height_map.png&amp;lt;/nowiki&amp;gt; which is an optional greyscale 16 bit .png image. It does not have that special &amp;quot;tEXt&amp;quot; png block, so not exactly sure how it's scaling works. Vanilla uses this for the Realms of Chaos campaign, in the areas around the Realms of Chaos.&lt;br /&gt;
&lt;br /&gt;
=== borders.pbd ===&lt;br /&gt;
It's in a sub directory, but still very important: &amp;lt;nowiki&amp;gt;/display/borders/borders.pbd&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CAIME can create in seconds.&lt;br /&gt;
&lt;br /&gt;
Not critical, it can be left out-of-date without crashing, but the borders drawn on the terrain will look a bit weird.&lt;br /&gt;
&lt;br /&gt;
=== trees.campaign_tree_list ===&lt;br /&gt;
This is a visual map thing, but it is in the campaign_map folder for some ungodly reason. It's in a sub directory: &amp;lt;nowiki&amp;gt;/display/trees/trees.campaign_tree_list&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BOB creates this from your campaign map Terry project, it uses the heightmap found in your .pack, so you should recreate this anytime you change it.&lt;br /&gt;
&lt;br /&gt;
Put a pin in this.&lt;br /&gt;
&lt;br /&gt;
=== And the rest of the display folder ===&lt;br /&gt;
Everything else in &amp;lt;nowiki&amp;gt;/&amp;lt;campaign map name&amp;gt;/display&amp;lt;/nowiki&amp;gt; (other than borders.pbd and trees.campaign_tree_list) is boiler plate and you should just copy it from a vanilla campaign map.&lt;br /&gt;
&lt;br /&gt;
== More campaign map files and how to make them ==&lt;br /&gt;
The files you'd put in &amp;lt;nowiki&amp;gt;terrain/campaigns/&amp;lt;campaign map name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For all of these, BOB processes them from your Terry project.&lt;br /&gt;
=== Height map ===&lt;br /&gt;
* full_logic_map.compressed_map&lt;br /&gt;
* full_height_map.dds&lt;br /&gt;
Process this first, because the tile map, global tile map, trees, and even global_props depends on it. Also, put it into your .pack (and restart BOB) before you do those other things, because that's where BOB looks for it.&lt;br /&gt;
&lt;br /&gt;
This combines both the sea and land heights from Terry.&lt;br /&gt;
&lt;br /&gt;
=== Tile map ===&lt;br /&gt;
* tile_list.bin&lt;br /&gt;
* tile_mask.dds&lt;br /&gt;
This is mostly just the ground and sea floor. And also coastal cliffs and (visual) roads.&lt;br /&gt;
&lt;br /&gt;
Process this after the height map has been processed, put into your .pack, and BOB restarted.&lt;br /&gt;
&lt;br /&gt;
==== Global tile map ====&lt;br /&gt;
There's actually a second tile map. The main one has the roads/cliffs as invisible. This global one only has the roads and cliffs.&lt;br /&gt;
&lt;br /&gt;
Sub-directory: &amp;lt;nowiki&amp;gt;/global_map/tile_list.bin&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BOB gets this from the main tile map, the one it finds in your .pack. So that means you should process this only after the real tile map has been processed, put into your .pack, and BOB has been restarted.&lt;br /&gt;
&lt;br /&gt;
==== patch_mask.dds ====&lt;br /&gt;
Despite it's name, this isn't doesn't define the &amp;quot;campaign_terrain_patch_areas&amp;quot; from the db (that's what terrain_visibility_mask.dds is). This is like some sort of optimization for the boring land/sea floor tiles, as far as I can tell. Annoyingly, it screws up for maps of a certain dimension, leaving small holes in the terrain around complex, northerly coastlines. The fix is to edit it in a hex editor, duplicating a horizontal line of data.&lt;br /&gt;
&lt;br /&gt;
=== global_props.bin ===&lt;br /&gt;
This file holds almost everything except the trees and ground. It's pretty big, and can take a few minutes to process (up to 10 minutes).&lt;br /&gt;
&lt;br /&gt;
It's also a little weird, because when BOB processes this it peeks at the map.hex file. So make sure that's synced up with the db, or the process will fail. It also means that you'll want to recreate global_props.bin anytime you add or remove a region. If you don't, it's a mixed bag between weird pop-in/pop-out visual glitches, and I recall seeing a crash too.&lt;br /&gt;
&lt;br /&gt;
==== Models folder ====&lt;br /&gt;
An output of processing global_props.bin, all the rivers. What BOB is doing is making each river spline into a bespoke model and outputting it to &amp;lt;nowiki&amp;gt;&amp;lt;campaign map name&amp;gt;/models&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Lighting ====&lt;br /&gt;
Another output of processing global_props.bin, the environment stuff ends up in this subdirectory: &amp;lt;nowiki&amp;gt;&amp;lt;campaign map name&amp;gt;/lighting&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Blend ===&lt;br /&gt;
The &amp;quot;blend&amp;quot; texture is the ground/terrain texture. Both output to the global folder:&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;&amp;lt;campaign map name&amp;gt;/global_map/global_blend.dds&amp;lt;nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;&amp;lt;campaign map name&amp;gt;/global_map/texture_arrays.xml&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== And the the rest ===&lt;br /&gt;
Nothing much to say about these:&lt;br /&gt;
* colour_overlay.dds&lt;br /&gt;
* lf_sea_colour.dds&lt;br /&gt;
* snow_mask.dds&lt;br /&gt;
&lt;br /&gt;
==== shroud_heights.dds ====&lt;br /&gt;
Terry has a &amp;quot;Fill from terrain&amp;quot; for the shroud height layer, just click that and process. Good enough.&lt;br /&gt;
&lt;br /&gt;
==== corruption mask.dds ====&lt;br /&gt;
White = Corruption shows at 1%&lt;br /&gt;
Black = Corruption shows at 100%&lt;br /&gt;
There doesn't seem to be a way to automatically generate this using Terry or BOB. So hand-painting it is (or clever python scripts!).&lt;br /&gt;
For each regions, you want white around settlements, then greys slowly getting darker until the borders are reached.&lt;br /&gt;
&lt;br /&gt;
==== lf_normal.dds ====&lt;br /&gt;
You can export a normal texture from Terry, it's in one of the menus. It'll be in .bmp format, and BOB can convert it to .dds&lt;br /&gt;
&lt;br /&gt;
==== terrain_visibility_mask.dds ====&lt;br /&gt;
Optional. This defines the campaign_terrain_patch_areas, which are used in vanilla to hide/show the Realms of Chaos.&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=1227</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=1227"/>
		<updated>2024-04-03T13:47:14Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Warhammer III guide by ChaosRobie */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit (download through Steam, under the Tools category) as well as [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here]).&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
[[File:Example nonchang complete mod.png|thumb|upright=0.7|A complete look at a mod that changes a settlement's campaign display.]]&lt;br /&gt;
&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
# &amp;lt;code&amp;gt;building_chains&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
== Final words ==&lt;br /&gt;
&lt;br /&gt;
That's it! Open up the game and check out your new settlement. I recommend using the [https://steamcommunity.com/sharedfiles/filedetails/?id=2791241084&amp;amp;searchtext=console Console Commands mod] to make testing easy, use &amp;lt;code&amp;gt;fow off&amp;lt;/code&amp;gt; to disable the fog of war.&lt;br /&gt;
&lt;br /&gt;
Download the Nonchang mod here: [[:File:Example nonchang campaign settlement.pack]].&lt;br /&gt;
&lt;br /&gt;
And get the Terry project used to create the mod here: [[:File:Cth nongchang 01 terry project.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:Example mod nonchang settlement ingame.png|thumb|center|upright=2|The example mod in-game!]]&lt;br /&gt;
&lt;br /&gt;
== Bonus ==&lt;br /&gt;
=== Import vanilla .bmd into Terry ===&lt;br /&gt;
You can't directly load a vanilla prefab .bmd into Terry, but you can run a python script ([https://github.com/robert-d-schultz/Total-War-Modding-Scripts/blob/main/Prefab%20bmd%20file%20to%20Terry%20layer%20file.py this one]) and convert the .bmd into a Terry .layer file. Place that new .layer file in the same directory as an already-created Terry project (.terry file). Then open the .terry file in a text editor and you'll see something like this:&lt;br /&gt;
 &amp;lt;pc type=&amp;quot;QTU::Scene&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;amp;lt;data version=&amp;quot;41&amp;quot;&amp;gt;&lt;br /&gt;
 		&amp;lt;entity id=&amp;quot;188fd378e03f00b&amp;quot; name=&amp;quot;Default&amp;quot;&amp;gt;&lt;br /&gt;
 			&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
 		&amp;lt;/entity&amp;gt;&lt;br /&gt;
 	&amp;amp;lt;/data&amp;gt;&lt;br /&gt;
 &amp;lt;/pc&amp;gt;&lt;br /&gt;
Adjust it, adding your new layer as a new &amp;quot;entity&amp;quot;:&lt;br /&gt;
 &amp;lt;pc type=&amp;quot;QTU::Scene&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;amp;lt;data version=&amp;quot;41&amp;quot;&amp;gt;&lt;br /&gt;
 		&amp;lt;entity id=&amp;quot;188fd378e03f00b&amp;quot; name=&amp;quot;Default&amp;quot;&amp;gt;&lt;br /&gt;
 			&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
 		&amp;lt;/entity&amp;gt;&lt;br /&gt;
 		&amp;lt;entity id=&amp;quot;the_id_string_that_is_in_the_.layer_name&amp;quot; name=&amp;quot;new_layer&amp;quot;&amp;gt;&lt;br /&gt;
 			&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
 		&amp;lt;/entity&amp;gt;&lt;br /&gt;
 	&amp;amp;lt;/data&amp;gt;&lt;br /&gt;
 &amp;lt;/pc&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=1044</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=1044"/>
		<updated>2023-12-26T21:27:14Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Before we begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit (download through Steam, under the Tools category) as well as [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here]).&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
[[File:Example nonchang complete mod.png|thumb|upright=0.7|A complete look at a mod that changes a settlement's campaign display.]]&lt;br /&gt;
&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
# &amp;lt;code&amp;gt;building_chains&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
== Final words ==&lt;br /&gt;
&lt;br /&gt;
That's it! Open up the game and check out your new settlement. I recommend using the [https://steamcommunity.com/sharedfiles/filedetails/?id=2791241084&amp;amp;searchtext=console Console Commands mod] to make testing easy, use &amp;lt;code&amp;gt;fow off&amp;lt;/code&amp;gt; to disable the fog of war.&lt;br /&gt;
&lt;br /&gt;
Download the Nonchang mod here: [[:File:Example nonchang campaign settlement.pack]].&lt;br /&gt;
&lt;br /&gt;
And get the Terry project used to create the mod here: [[:File:Cth nongchang 01 terry project.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:Example mod nonchang settlement ingame.png|thumb|center|upright=2|The example mod in-game!]]&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=724</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=724"/>
		<updated>2023-07-07T00:57:59Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Final words */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here]).&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
[[File:Example nonchang complete mod.png|thumb|upright=0.7|A complete look at a mod that changes a settlement's campaign display.]]&lt;br /&gt;
&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
# &amp;lt;code&amp;gt;building_chains&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
== Final words ==&lt;br /&gt;
&lt;br /&gt;
That's it! Open up the game and check out your new settlement. I recommend using the [https://steamcommunity.com/sharedfiles/filedetails/?id=2791241084&amp;amp;searchtext=console Console Commands mod] to make testing easy, use &amp;lt;code&amp;gt;fow off&amp;lt;/code&amp;gt; to disable the fog of war.&lt;br /&gt;
&lt;br /&gt;
Download the Nonchang mod here: [[:File:Example nonchang campaign settlement.pack]].&lt;br /&gt;
&lt;br /&gt;
And get the Terry project used to create the mod here: [[:File:Cth nongchang 01 terry project.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:Example mod nonchang settlement ingame.png|thumb|center|upright=2|The example mod in-game!]]&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=721</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=721"/>
		<updated>2023-07-07T00:54:43Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Final words */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here]).&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
[[File:Example nonchang complete mod.png|thumb|upright=0.7|A complete look at a mod that changes a settlement's campaign display.]]&lt;br /&gt;
&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
# &amp;lt;code&amp;gt;building_chains&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
== Final words ==&lt;br /&gt;
&lt;br /&gt;
That's it! Open up the game and check out your new settlement. I reccomend using the [https://steamcommunity.com/sharedfiles/filedetails/?id=2791241084&amp;amp;searchtext=console Console Commands mod] to make testing easy, use &amp;lt;code&amp;gt;fow off&amp;lt;/code&amp;gt; to disable the fog of war.&lt;br /&gt;
&lt;br /&gt;
Download the Nonchang mod here: [[:File:Example nonchang campaign settlement.pack]].&lt;br /&gt;
&lt;br /&gt;
And get the Terry project used to create the mod here: [[:File:Cth nongchang 01 terry project.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:Example mod nonchang settlement ingame.png|thumb|center|upright=2|The example mod in-game!]]&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=File:Cth_nongchang_01_terry_project.zip&amp;diff=720</id>
		<title>File:Cth nongchang 01 terry project.zip</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=File:Cth_nongchang_01_terry_project.zip&amp;diff=720"/>
		<updated>2023-07-07T00:54:10Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=File:Example_nonchang_campaign_settlement.pack&amp;diff=719</id>
		<title>File:Example nonchang campaign settlement.pack</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=File:Example_nonchang_campaign_settlement.pack&amp;diff=719"/>
		<updated>2023-07-07T00:52:15Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=718</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=718"/>
		<updated>2023-07-07T00:49:15Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Campaign settlement display */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here]).&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
[[File:Example nonchang complete mod.png|thumb|upright=0.7|A complete look at a mod that changes a settlement's campaign display.]]&lt;br /&gt;
&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
# &amp;lt;code&amp;gt;building_chains&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
== Final words ==&lt;br /&gt;
&lt;br /&gt;
That's it! Open up the game and check out your new settlement. I recomend using the [https://steamcommunity.com/sharedfiles/filedetails/?id=2791241084&amp;amp;searchtext=console Console Commands mod] to make testing easy, use &amp;lt;code&amp;gt;fow off&amp;lt;/code&amp;gt; to disable the fog of war.&lt;br /&gt;
&lt;br /&gt;
[[File:Example mod nonchang settlement ingame.png|thumb|center|upright=2|The example mod in-game!]]&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=717</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=717"/>
		<updated>2023-07-07T00:48:55Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Dummy building chain */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here]).&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
[[File:Example nonchang complete mod.png|thumb|upright=0.7|A complete look at a mod that changes a settlement's campaign display.]]&lt;br /&gt;
&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
# &amp;lt;code&amp;gt;building_chains&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
== Final words ==&lt;br /&gt;
&lt;br /&gt;
That's it! Open up the game and check out your new settlement. I recomend using the [https://steamcommunity.com/sharedfiles/filedetails/?id=2791241084&amp;amp;searchtext=console Console Commands mod] to make testing easy, use &amp;lt;code&amp;gt;fow off&amp;lt;/code&amp;gt; to disable the fog of war.&lt;br /&gt;
&lt;br /&gt;
[[File:Example mod nonchang settlement ingame.png|thumb|center|upright=2|The example mod in-game!]]&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=716</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=716"/>
		<updated>2023-07-07T00:48:19Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Motivation from scripting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here]).&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
[[File:Example nonchang complete mod.png|thumb|upright=0.7|A complete look at a mod that changes a settlement's campaign display.]]&lt;br /&gt;
&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
 building_chains&lt;br /&gt;
 building_levels&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
== Final words ==&lt;br /&gt;
&lt;br /&gt;
That's it! Open up the game and check out your new settlement. I recomend using the [https://steamcommunity.com/sharedfiles/filedetails/?id=2791241084&amp;amp;searchtext=console Console Commands mod] to make testing easy, use &amp;lt;code&amp;gt;fow off&amp;lt;/code&amp;gt; to disable the fog of war.&lt;br /&gt;
&lt;br /&gt;
[[File:Example mod nonchang settlement ingame.png|thumb|center|upright=2|The example mod in-game!]]&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=715</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=715"/>
		<updated>2023-07-07T00:44:50Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here].&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
[[File:Example nonchang complete mod.png|thumb|upright=0.7|A complete look at a mod that changes a settlement's campaign display.]]&lt;br /&gt;
&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
 building_chains&lt;br /&gt;
 building_levels&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
== Final words ==&lt;br /&gt;
&lt;br /&gt;
That's it! Open up the game and check out your new settlement. I recomend using the [https://steamcommunity.com/sharedfiles/filedetails/?id=2791241084&amp;amp;searchtext=console Console Commands mod] to make testing easy, use &amp;lt;code&amp;gt;fow off&amp;lt;/code&amp;gt; to disable the fog of war.&lt;br /&gt;
&lt;br /&gt;
[[File:Example mod nonchang settlement ingame.png|thumb|center|upright=2|The example mod in-game!]]&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=714</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=714"/>
		<updated>2023-07-07T00:40:02Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Database stuff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here].&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
[[File:Example nonchang complete mod.png|thumb|upright=0.7|A complete look at a mod that changes a settlement's campaign display.]]&lt;br /&gt;
&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
 building_chains&lt;br /&gt;
 building_levels&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=File:Example_mod_nonchang_settlement_ingame.png&amp;diff=713</id>
		<title>File:Example mod nonchang settlement ingame.png</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=File:Example_mod_nonchang_settlement_ingame.png&amp;diff=713"/>
		<updated>2023-07-07T00:38:40Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=712</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=712"/>
		<updated>2023-07-07T00:38:15Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Database stuff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here].&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
[[File:Example nonchang complete mod.png|thumb|A complete look at a mod that changes a settlement's campaign display.]]&lt;br /&gt;
&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
 building_chains&lt;br /&gt;
 building_levels&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=File:Example_nonchang_complete_mod.png&amp;diff=711</id>
		<title>File:Example nonchang complete mod.png</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=File:Example_nonchang_complete_mod.png&amp;diff=711"/>
		<updated>2023-07-07T00:37:13Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=710</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=710"/>
		<updated>2023-07-07T00:36:54Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Placing entities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here].&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
 building_chains&lt;br /&gt;
 building_levels&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=709</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=709"/>
		<updated>2023-07-07T00:36:43Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Placing entities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
[[File:Nonchang complete.png|Thumb|A complete settlement prefab in Terry.]]&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here].&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
 building_chains&lt;br /&gt;
 building_levels&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=File:Nonchang_complete.png&amp;diff=708</id>
		<title>File:Nonchang complete.png</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=File:Nonchang_complete.png&amp;diff=708"/>
		<updated>2023-07-07T00:36:00Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=707</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=707"/>
		<updated>2023-07-07T00:35:37Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Finishing up with BOB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
[[File:BOB Button.png|thumb]]&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here].&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
 building_chains&lt;br /&gt;
 building_levels&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=File:BOB_Button.png&amp;diff=706</id>
		<title>File:BOB Button.png</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=File:BOB_Button.png&amp;diff=706"/>
		<updated>2023-07-07T00:32:19Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=705</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=705"/>
		<updated>2023-07-07T00:32:08Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* New campaign prefab project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|upright=0.5|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here].&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
 building_chains&lt;br /&gt;
 building_levels&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=704</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=704"/>
		<updated>2023-07-07T00:30:57Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* New campaign prefab project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
[[File:Project wizard.png|thumb|left|The Project Wizard window.]]&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here].&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
 building_chains&lt;br /&gt;
 building_levels&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=File:Project_wizard.png&amp;diff=703</id>
		<title>File:Project wizard.png</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=File:Project_wizard.png&amp;diff=703"/>
		<updated>2023-07-07T00:30:25Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=702</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=702"/>
		<updated>2023-07-07T00:30:18Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: /* Terry set up */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:First look at prefab area.png|thumb|What you will see upon creating a new campaign prefab. Scary grey square!]]&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here].&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
 building_chains&lt;br /&gt;
 building_levels&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=File:First_look_at_prefab_area.png&amp;diff=701</id>
		<title>File:First look at prefab area.png</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=File:First_look_at_prefab_area.png&amp;diff=701"/>
		<updated>2023-07-07T00:29:28Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
	<entry>
		<id>https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=700</id>
		<title>Tutorial:Custom Campaign Settlement Skins</title>
		<link rel="alternate" type="text/html" href="https://tw-modding.com/index.php?title=Tutorial:Custom_Campaign_Settlement_Skins&amp;diff=700"/>
		<updated>2023-07-07T00:29:04Z</updated>

		<summary type="html">&lt;p&gt;ChaosRobie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Warhammer III guide by ChaosRobie =&lt;br /&gt;
== Before we begin ==&lt;br /&gt;
This guide explains how you can make custom settlement models for the campaign. It will guide you through Terry, the database setup, and some scripting.&lt;br /&gt;
&lt;br /&gt;
You will need the Warhammer III Assembly Kit and [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager].&lt;br /&gt;
&lt;br /&gt;
== The campaign prefab ==&lt;br /&gt;
This first part is all about creating the .bmd files using Terry and BoB.&lt;br /&gt;
=== Assembly Kit folder set up ===&lt;br /&gt;
Create this folder: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within the new folder create a file called &amp;lt;code&amp;gt;rules.bob&amp;lt;/code&amp;gt; and inside put this:&lt;br /&gt;
 [Prefab]&lt;br /&gt;
 	&amp;lt;Files&amp;gt; = ...*.terry&lt;br /&gt;
 	TargetPath = prefabs/campaign&lt;br /&gt;
 	RootFolder = true&lt;br /&gt;
&lt;br /&gt;
To be clear, the file should be at this directory: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\rules.bob&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Terry set up ===&lt;br /&gt;
Open Terry. You can get to it by launching the Assembly Kit through steam and selecting &amp;lt;code&amp;gt;Play Battle Map Editor: Terry&amp;lt;/code&amp;gt;. Or you can launch the .exe directly &amp;lt;code&amp;gt;\assembly_kit\binaries\tweak.modder.x64.exe&amp;lt;/code&amp;gt; and then in the top-left &amp;lt;code&amp;gt;Plugins&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Terry&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== New campaign prefab project ====&lt;br /&gt;
You will be greeted by the &amp;lt;code&amp;gt;Project Wizard&amp;lt;/code&amp;gt; window. It should be on the &amp;lt;code&amp;gt;New&amp;lt;/code&amp;gt; tab.&lt;br /&gt;
&lt;br /&gt;
Click &amp;lt;code&amp;gt;Prefab&amp;lt;/code&amp;gt; (the rightmost symbol, the dotted box one) and change the drop-down box so &amp;lt;code&amp;gt;campaign&amp;lt;/code&amp;gt; is selected. Then &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Your first view of the prefab-creating area will look at it from above and very zoomed out. Zoom in with the Scroll Wheel. Pan with Middle Mouse button. Rotate the camera view with Alt and Middle Mouse button.&lt;br /&gt;
&lt;br /&gt;
==== Terry settings ====&lt;br /&gt;
The default prefab &amp;quot;map&amp;quot; will look like a spooky grey field with dark foreboding lighting. To make it much easier to see what you are doing, we will change some Terry settings.&lt;br /&gt;
&lt;br /&gt;
Go to the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab in the lower right.&lt;br /&gt;
&lt;br /&gt;
Click the three dots on the &amp;lt;code&amp;gt;Environment File&amp;lt;/code&amp;gt; row. It should open the &amp;lt;code&amp;gt;\assembly_kit\working_data\Weather\&amp;lt;/code&amp;gt; folder. Select &amp;lt;code&amp;gt;default_campaign.environment&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;Prefab Terrain Texture&amp;lt;/code&amp;gt; dropdown box to something else, like &amp;lt;code&amp;gt;grass_dry0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Things should look a lot more grassy and sunny with those two changes. Now click &amp;lt;code&amp;gt;Set As Default For Project Type&amp;lt;/code&amp;gt; at the top of the &amp;lt;code&amp;gt;Settings&amp;lt;/code&amp;gt; tab. That will ensure you don't have to redo these two things every time you create a new prefab project.&lt;br /&gt;
&lt;br /&gt;
==== First save ====&lt;br /&gt;
You haven't actually saved your project yet. &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; and save it in that folder you created earlier: &amp;lt;code&amp;gt;\assembly_kit\raw_data\art\prefabs\campaign\&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Placing entities ===&lt;br /&gt;
This is the part where you get creative. You will create your settlement by placing props, vfx, decals, and polygon meshes. Each has a menu you can access from the &amp;lt;code&amp;gt;Entity Creation (Visual)&amp;lt;/code&amp;gt; bar. If the bar is hidden for whatever reason, you can also access the menus from &amp;lt;code&amp;gt;Tools -&amp;gt; Entity Creation (Visual)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
Props are just meshes, .rigid_model_v2 and .wsmodel files. These are things like buildings, trees, and crates. Some props are animated.&lt;br /&gt;
&lt;br /&gt;
==== VFX ====&lt;br /&gt;
Visual effects. Not every VFX listed in the menu will be appropriate for a campaign prefab. For instance, the ones used for some spells or arrow trails are only visible when in motion. The ones with &amp;quot;campaign&amp;quot; or &amp;quot;environment&amp;quot; in their names should be fine.&lt;br /&gt;
&lt;br /&gt;
==== Decals ====&lt;br /&gt;
Decals are flat entities you can place on the ground or even on props.&lt;br /&gt;
&lt;br /&gt;
Note that all decals are also listed in the props menu. But if you place a decal from there, Terry won't recognize it as a decal and you miss-out on some important settings, like limiting if the decal applies to objects or the terrain.&lt;br /&gt;
&lt;br /&gt;
==== Polygon meshes ====&lt;br /&gt;
Shapes that you can freely draw into whatever you want and then apply a material to. The main uses are creating water planes and creating raised platforms that take-on the texture of the terrain below them, basically creating a fake mountain/plateau.&lt;br /&gt;
&lt;br /&gt;
When you click the &amp;lt;code&amp;gt;Polygon Mesh&amp;lt;/code&amp;gt; button, you will first need to place a grid which is basically just the shape's origin. Place it somewhere close to the world origin (0,0,0). Once you click, you will then start to click and place vertices to draw your shape. You complete the shape by clicking on the first vertex you placed.&lt;br /&gt;
&lt;br /&gt;
The polygon mesh will be invisible when you complete it. Find it in the Entity list and give it a material.&lt;br /&gt;
&lt;br /&gt;
For a water plane, there are a bunch you could use, search the box that pops up for &amp;quot;sea&amp;quot; or &amp;quot;water&amp;quot;, but &amp;lt;code&amp;gt;materials/environment/campaign/campaign_water_plane.xml.material&amp;lt;/code&amp;gt; is a good one.&lt;br /&gt;
&lt;br /&gt;
For that fake mountain/plateau thing, use &amp;lt;code&amp;gt;materials/utility/campaign_terrain_global_blend.xml.material&amp;lt;/code&amp;gt;, that one will show whatever the terrain texture is under the plane.&lt;br /&gt;
&lt;br /&gt;
==== Placement guidelines ====&lt;br /&gt;
Place your entities around the 0,0,0 world origin. The best way to find this is to place a prop and then manually set it's coordinates (from the &amp;lt;code&amp;gt;Entity Properties&amp;lt;/code&amp;gt; window, lowerleft) to 0,0,0. That will snap it to where the center of your settlement must be.&lt;br /&gt;
&lt;br /&gt;
Settlements are roughly 2.5 meters in radius. Again, you can manually set the position of some reference props to visualize this boundary. The problems with making your settlement fatter or thinner than that rule of thumb are purely cosmetic. Remember that there is a ring of flags that is placed around an occupied settlement, and there are also sieges to consider.&lt;br /&gt;
&lt;br /&gt;
For rotation, the blue arrow corresponding to the z direction is forwards/backwards. The main window will have a little axis on the bottom left that will show which way is &amp;quot;north&amp;quot;. This &amp;quot;north&amp;quot; direction doesn't always correspond to the &amp;quot;north&amp;quot; direction when your settlement is placed on the campaign map. For instance, port-settlements will have their &amp;quot;north&amp;quot; pointing out to sea. I wouldn't worry too much about the rotation though, since you can always adjust the settlement's rotation from the &amp;lt;code&amp;gt;campaign_map_settlements&amp;lt;/code&amp;gt; db table later.&lt;br /&gt;
&lt;br /&gt;
A scale of &amp;quot;1&amp;quot; is good for most props, but a few would be pretty oversized/undersized at that scale. Campaign settlements are a caricature of the real thing, so I wouldn't worry too much about realistic scales or anything like that.&lt;br /&gt;
&lt;br /&gt;
=== Finishing up with BOB ===&lt;br /&gt;
You don't need to run the BOB exe manually. Just click the &amp;lt;code&amp;gt;Process with BOB&amp;lt;/code&amp;gt; button in Terry, it looks like a globe with a right-facing arrow. Wait a few seconds, you'll see some pop-ups in the lower right corner that'll tell you BOB's status.&lt;br /&gt;
&lt;br /&gt;
This process will create this folder: &amp;lt;code&amp;gt;\assembly_kit\working_data\prefabs\campaign\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go to that directory to find your exported .bmd file. Place the .bmd file(s) in your mod's .pack in this directory: &amp;lt;code&amp;gt;prefabs/campaign/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The db and scripting ==&lt;br /&gt;
We will start with a brief explanation of the scripting, then do the database stuff, and then do the scripting for real. It will make more sense that way.&lt;br /&gt;
=== Motivation from scripting  ===&lt;br /&gt;
Don't worry about writing the script itself yet, but know that to change a settlement's skin, you use this lua function ([https://chadvandy.github.io/tw_modding_resources/WH3/campaign/episodic_scripting.html#function:episodic_scripting:override_building_chain_display see the full documentation here].&lt;br /&gt;
 cm:override_building_chain_display(&lt;br /&gt;
  	string vanilla_building_chain_key,&lt;br /&gt;
  	string override_building_chain_key,&lt;br /&gt;
  	[string region_key]&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;code&amp;gt;vanilla_building_chain_key&amp;lt;/code&amp;gt; corresponds to the building chain that is there when you start a new campaign, while &amp;lt;code&amp;gt;override_building_chain_key&amp;lt;/code&amp;gt; is the building chain (only the display part of it) that will be swapped-in.&lt;br /&gt;
&lt;br /&gt;
This means that our brand new settlement .bmd files that we just made in Terry need to be &amp;quot;connected&amp;quot; to a brand new building chain. This new building chain doesn't actually have to be used in-game, it simply has to exist in the db.&lt;br /&gt;
&lt;br /&gt;
In the following example, I will be creating a special settlement building chain for Nonchang, but I won't actually be using it in any gameplay-related way. In-game, the settlement in that region will remain as the default Cathay major settlement. The new building chain will basically be a dummy that I am only using for it's visual display (which will be the .bmd files I created in Terry). But note that it doesn't ''have'' to be a dummy, you ''could'' set-up a &amp;quot;real&amp;quot; settlement building chain and use that. It all depends on what type of mod you are making. If you're just after the visual change, then a dummy building chain is fine.&lt;br /&gt;
&lt;br /&gt;
=== Database stuff ===&lt;br /&gt;
==== Dummy building chain ====&lt;br /&gt;
The dummy building chain only needs these two tables:&lt;br /&gt;
 building_chains&lt;br /&gt;
 building_levels&lt;br /&gt;
&lt;br /&gt;
Copy-over some vanilla entries and change the keys to something else.&lt;br /&gt;
&lt;br /&gt;
Make sure your building_chain has the same number of levels as the building_chain you will be overriding. In my example, Nonchang is a major settlement so it has five entries in the &amp;lt;code&amp;gt;building_levels&amp;lt;/code&amp;gt; table and then one more for the ruined state, for a total of six. A minor settlement would have three plus one, four total.&lt;br /&gt;
&lt;br /&gt;
If you instead decide to make a real building chain, then you'll need many more tables, including &amp;lt;code&amp;gt;building_chain_availability_sets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;building_effects_junction&amp;lt;/code&amp;gt;. Compiling a full list of the required tables is left as an exercise for the reader.&lt;br /&gt;
&lt;br /&gt;
==== Campaign settlement display ====&lt;br /&gt;
This is the part where you connect your building_chain to the .bmd files you created earlier in Terry. These three are the minimum:&lt;br /&gt;
 campaign_settlement_display_building_model_ids&lt;br /&gt;
 campaign_settlement_display_building_ids&lt;br /&gt;
 campaign_settlement_display_buildings&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_model_ids&amp;lt;/code&amp;gt; is just a list of &amp;quot;building model keys&amp;quot;. Create some new ones, you'll want one for each of your new building chain's levels. You can skip the &amp;quot;ruin&amp;quot; building level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_building_ids&amp;lt;/code&amp;gt; connects the &amp;quot;building model keys&amp;quot; to the building levels of your building chain. There should be one row for each of your new building levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;campaign_settlement_display_buildings&amp;lt;/code&amp;gt; is the main table. It defines which .bmd files are used for each &amp;quot;building model key&amp;quot;. Again, you'll want one row for each of your building levels. Make sure you create a unique key for each row, mash on your number keys or use something like random.org. I won't go over all the columns in the table, but basically you can have different .bmd files for if the settlement is inland or a port, or if it has walls or not. And, of course, each of the rows in your table will correspond to a building level, so you can have different .bmd files as the settlement grows in size. Take a look at the vanilla table to get an idea of what's what.&lt;br /&gt;
&lt;br /&gt;
=== Scripting for real ===&lt;br /&gt;
In your .pack, create a new lua file in: &amp;lt;code&amp;gt;script/campaign/mod/&amp;lt;/code&amp;gt;&lt;br /&gt;
In my example I have &amp;lt;code&amp;gt;script/campaign/mod/example_nonchang_campaign_settlement.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And put something like this in it:&lt;br /&gt;
 --This code will run automatically when you load into a campaign&lt;br /&gt;
 cm:add_first_tick_callback(&lt;br /&gt;
 	function()&lt;br /&gt;
 		--This code only needs to run once at the very start of a campaign&lt;br /&gt;
 		if cm:is_new_game() then&lt;br /&gt;
 			-- Check if it is Immortal Empires, since that's the only campaign with Nonchang&lt;br /&gt;
 			if cm:get_campaign_name() == &amp;quot;main_warhammer&amp;quot; then&lt;br /&gt;
 				--Override the display of the building chain &amp;quot;wh3_main_cth_settlement_major&amp;quot; with the new building chain &amp;quot;example_special_settlement_nonchang&amp;quot;&lt;br /&gt;
 				--And only do this in Nonchang&lt;br /&gt;
 				cm:override_building_chain_display(&amp;quot;wh3_main_cth_settlement_major&amp;quot;, &amp;quot;example_special_settlement_nonchang&amp;quot;, &amp;quot;wh3_main_combi_region_nonchang&amp;quot;)&lt;br /&gt;
 			end&lt;br /&gt;
 		end&lt;br /&gt;
 	end&lt;br /&gt;
 )&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;wh3_main_combi_region_nonchang&amp;lt;/code&amp;gt; corresponds to the region whose settlement I am changing. &amp;lt;code&amp;gt;example_special_settlement_nonchang&amp;lt;/code&amp;gt; is the building chain I created. Look this up in the &amp;lt;code&amp;gt;regions&amp;lt;/code&amp;gt; db table.&lt;br /&gt;
&amp;lt;code&amp;gt;wh3_main_cth_settlement_major&amp;lt;/code&amp;gt; is the building chain that is there at the beginning of a vanilla campaign. If you are running into problems, like the settlement model refuses to change, then this part is likely the problem. Make sure you are putting in the correct building chain! Some settlements don't use a faction's default and have special settlement building chains.&lt;br /&gt;
&lt;br /&gt;
The script will run at the beginning of a campaign and swap out the building chain displays. You will need to adjust the three strings I mention above to fit your mod.&lt;br /&gt;
&lt;br /&gt;
= Warhammer II guide by Maruka =&lt;br /&gt;
&lt;br /&gt;
=== Before we begin ===&lt;br /&gt;
This guide explains how you can make custom settlement skins for the campaign. This is not officially supported by CA, so the process is a little bit awkward. It might look complicated at first, but that’s mostly because I’ve tried to be as thorough as possible in the explanation. If you have any questions you can ask them in the Map Makers discord channel, which you can find [https://discord.gg/NyrXErg here].&lt;br /&gt;
&lt;br /&gt;
You will need [https://github.com/Frodo45127/rpfm/releases Rusted Pack File Manager] for this.&lt;br /&gt;
&lt;br /&gt;
Before we begin, make a folder -somewhere- on your computer called ‘campaign’, in a folder called ‘prefabs’. The location of this folder does not matter, as long as you can find it again.&lt;br /&gt;
&lt;br /&gt;
=== Preparation in Terry ===&lt;br /&gt;
Create a new map in Terry.&lt;br /&gt;
&lt;br /&gt;
If you’d like your settlement to change with each level, you’ll need to create five layers and make each version in one layer, as you can see in the layer panel in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
Before we continue, make five layers (name them 01-05 or something along those lines), and save your map.&lt;br /&gt;
&lt;br /&gt;
Now go to the raw terry files in&lt;br /&gt;
 &amp;lt;code&amp;gt;Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\(yourmap)&amp;lt;/code&amp;gt;&lt;br /&gt;
and open the .terry file of the map, and look for the ECFileLayer.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;&amp;lt;ECFileLayer export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;ECFileLayer = export=&amp;quot;true&amp;quot; bmd_export_type=&amp;quot;catchment_01&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Do this for all five layers.&lt;br /&gt;
&lt;br /&gt;
Save the file, re-open terry &amp;amp; reopen the map. The layers should now have ‘catchment – 01’ or equivalent after their name, as you can see in the pictures in section 2.&lt;br /&gt;
&lt;br /&gt;
=== Making the settlement in Terry ===&lt;br /&gt;
Build your settlement around the origin of the map 0,0,0. Standard CA settlements cover an area of roughly 4×4 units. You can make it larger than that (as we did for the faction capitals), but armies will stand in the settlement skin if you do that.&lt;br /&gt;
&lt;br /&gt;
Each layer will need to contain a copy of the previous levels.&lt;br /&gt;
&lt;br /&gt;
Kislev at level 1:&lt;br /&gt;
&lt;br /&gt;
Kislev at level 5&lt;br /&gt;
&lt;br /&gt;
=== Exporting the prefab ===&lt;br /&gt;
Save, and then export the map.&lt;br /&gt;
&lt;br /&gt;
The description, author, and max players don’t matter. You can close Terry now.&lt;br /&gt;
&lt;br /&gt;
Go to the working data folder and find the exported files, the path is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Total War WARHAMMER II\working_data_terrain\tiles\batle\_assembly_kit\[yourmap]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;[yourmap]&amp;lt;/code&amp;gt; with the key of your map)''&lt;br /&gt;
&lt;br /&gt;
Copy the catchment_01_layer_bmd_data.bin (and 02-05), and paste it into the ‘campaign’ folder which you made earlier.&lt;br /&gt;
&lt;br /&gt;
Rename catchment_01_layer_bmd_data.bin to &amp;lt;code&amp;gt;[nameofyourprefab].bmd&amp;lt;/code&amp;gt;. In the case of Kislev that was gccm_kislev_emp_1.bmd.&lt;br /&gt;
&lt;br /&gt;
That means that we’re changing the extension of the file from BIN to BMD. Your computer might ask you if you’re sure that you want to change the extension. You are sure, so go ahead and change it.&lt;br /&gt;
&lt;br /&gt;
These are the actual prefabs as they show up ingame.&lt;br /&gt;
&lt;br /&gt;
I’ll add more information later if people have questions, for now you can just download [https://steamcommunity.com/sharedfiles/filedetails/?id=1220118747 GCCM: Unique Faction Capitals] and open that in RPFM to see what I did to replace the prefabs.&lt;br /&gt;
[[Category:Needs Formatting]]&lt;br /&gt;
[[Category:Needs Images]]&lt;/div&gt;</summary>
		<author><name>ChaosRobie</name></author>
	</entry>
</feed>