Total War: WARHAMMER II

Total War: WARHAMMER II

Not enough ratings
[Map making] How to make custom prefabs
By Maruka
This is a guide on how to make custom prefabs in the map making tool Terry.
   
Award
Favorite
Favorited
Unfavorite
0. Before we begin
This guide explains how you can make your own prefabs for use in map making. 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 here.[discord.io]

You will need Pack File Manager 5.0 for this, you can find it here:
https://sourceforge.net/projects/packfilemanager/files/Release/

I use Sublime Text 3 for editing the terry files, but you can use any text editor (such as notepad). If you do use Sublime Text 3 you'll get the syntax highlighting which you see in the example images of the terry file. You can find Sublime Text 3 here:https://www.sublimetext.com/3

Before we begin, make a folder -somewhere- on your computer called 'prefabs'. The location of this folder does not matter, as long as you can find it again.
1. Preperation in Terry
Make a new map in Terry, and position your prefab around the origin of the map (0,0,0), in the Default layer.

If you have existing work that you would like to transform into a prefab you can copy it from an old map to a new map by grouping it, copying it (ctrl+c), then opening a new map and pasting (ctrl+v).

Delete the reference sub-layer and save the map. For the purpose of this tutorial I will be making a prefab out of one of my Kislevite walls, so I'll name mine ksl_wall_straight_20_b. That will also be the name of the prefab, which will be relevant later.

2. Making the prefab show up in Terry
Go to the terry files for your map, these can be found in: (replace [yourmap] with the key of your map):

Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\[yourmap]

Copy the .layer file and the .terry file to:

Total War WARHAMMER II\assembly_kit\raw_data\art\prefabs\battle\[anewfolder]

This will determine where you find the prefab in Terry.

Now open the .terry file that you just pasted.

Leave the first 2 lines alone, these will look like this (your id will be different). Don't touch those.
<?xml version="1.0" encoding="UTF-8"?> <project version="20" id="15fb14883190092">

If you look in your terry file, there will be one section with the QTU::Scene. This has an entity id, note this ID down somewhere.

Then replace everything below the first two lines with the following code:
<pc type="QTU::TerryPrefab"> <data database="battle"/> </pc> <pc type="QTU::Scene"> <data version="27"> <entity id="youridgoeshere" name="catchment"> <ECFileLayer export="true" bmd_export_type=""/> </entity> </data> </pc> <pc type="QTU::Terrain"/> <pc type="Terry::ProjectEnvironment"/> </project>

and replace the 'youridgoeshere' with the ID from your original terry file.

Example, this becomes:


This:


The only things that will be different between your file and my example are the ids.
3. Exporting the prefab
Go back to the raw Terry files in

Total War WARHAMMER II\assembly_kit\raw_data\terrain\tiles\battle\_assembly_kit\[yourmap]

and open the .terry file of the map, and look for the ECFileLayer.

Change

<ECFileLayer export="true" bmd_export_type=""/>

to

<ECFileLayer export="true" bmd_export_type="catchment_01"/>

It should now look something like this:


Save the file, then re-open the map it in Terry. The Default layer should now have - catchment_01 behind it's name, as you can see here:


After opening the map, group your prefab and subtract 142 from the y value of the prefab. Then ungroup. Save, and then export the map.

The description, author, and max players don't matter. You can close Terry now.

Go to the working data folder and find the exported files, the path is (replace [yourmap] with the key of your map):

Total War WARHAMMER II\assembly_kit\working_data\terrain\tiles\battle\_assembly_kit\[yourmap]

Copy the catchment_01_layer_bmd_data.bin, and paste it into the 'prefabs' folder which you made earlier.

Rename catchment_01_layer_bmd_data.bin to [nameofyourprefab].bmd. In my case that was ksl_wall_straight_20_b.bmd, which is also the name I used when I saved the map.
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.

This file is the actual prefab, the terry files which we prepared in step 2 are only used to display the prefab in Terry.
4. Adding the prefab to the game files
All of the files are now done, but the prefab will not work yet.

Open Pack File Manager, and create a new mod (File>My Mods>New). Name it whatever you want, and save it wherever you want. You don't need to add any files from any other pack files.

Next, change the pack type to movie. To do this, go to File>Change Pack Type>Movie

Now right click on the root of your new pack file, and click 'add>directory'.


Paste the directory of your prefabs folder and press okay. You should now see the name of your prefab BMD file in green. Save your pack file.

Now install your new mod by going File>My Mods>Install [nameofyourmod]


That's it! Now you can re-open Terry and enjoy your new prefab!
Notes
You now have an extra 'movie' pack file in your data folder. This will cause incompatibility issues if you're planning on playing multiplayer battles/campaigns. The only way to resolve those issues is to either give your friend the same file, or to remove it from your data folder. If you remove it from your data folder you'll have to re-add it every time that you want to use the custom prefabs in Terry.

Why should I care about prefabs
As a map maker: It will help you create unique looks for your maps more easily, and more quickly.
As a user: It will help map makers create unique looks for their maps more easily, and more quickly.

It also makes it easier to share. If you would like to share your custom prefabs it would be easiest to join the map makers discord channel.
GCCM Prefab competition

As a conclusion, I would like to note that we have launched the second GCCM competition, which is a custom prefab competition.

The rules of the competition are simple:
  • use the map making tool Terry to make five custom prefabs.

For this competition you won't need to actually make your prefabs into functional prefabs as detailed in this guide. It is enough to put them in seperate layers and hand it in like that.

You can read more about the competition here.[www.patreon.com]