How to add a custom Building for Battlemaps - (Difficult)
Welcome to my Tutorial “How to add a new custom Building for Battlemaps”. Here i will show you how to implement a complete new building without the need to replace a vanilla one.
This Tutorial should work for both ETW and NTW.
If you find Mistakes of found out a new thing, feel free to report them to me and i will update this Tutorial. Be aware that i won’t cover the modeling process or how to work with UU3D (which is needed to export the Models). I think you all are able to find the save button on yourself, or?It’s also not a step by step tutorial, i will only outline the steps which you have to do and where you have to take care.
It’s recommed to have the DB Tables opened while reading so you can have a look on the Names etc.
1.) What you need
- Taw’s Tools - in special the DB packs and unpacks one
- If you are unshure how to work with taw’s tools, here you find good Tutorial by “The Hedge Knight”
- Notepad ++
- UU3D, of course
- The Pack File Manager and optional the DB-Editor
- A model you want to import
2.) Using Taw’s tools on the Models Building Table.
Refer to Hedge Knights Tutorial for basic questions
Usage:
jruby models_buildings_unpack db/models_building_tables/models_building tmp/models_building.txt
jruby models_buildings_pack tmp/models_building.txt db/models_building_tables/models_building_new
3.)How does the DB load the the model?
Needed DB Tables:
- Battlefield_buildings_tables
- Models_building_tables (not editable with PFM or DBE)
- Warscape_rigid_lod_tables (Model path, definitly needed)
- Warscape_rigid_tables (Texture path, definitly needed)
- Warscape_animated_Lod_tables (only if you want a destruct animation)
- Warscape_animated_lod_Tables (only if you want a destruct animation)
DB Tables Connection and Naming Convention:
As you can see in the drawing the battlefield_buildings_table is the one, which connects all other DB’s.
The first Building ID is used as general ID, to which the Building Entries within the Maps refer to.
The second ID is the Model ID, which uses the game to load all model parts together.
The ID has to fit with the one in the models_buildings_ID aswell with the “prefix” of the Model ID within the Warscape Tables.
The subfix piecexy_destructyz tells the game in which part (buildings can consits of many parts wich are destroyed seperate) this is.
Since we have to use the collision mesh of the vanilla buildings i would suggest to follow the architecture of the vanilla buildings.
If it only has one part, only use one part in your model. Example:
Attachment 146473
Attachment 146475
4.) Taw’s Tool
The Game needs an entry within the models_buildings_table to load a model and it’s collision mesh.
Therefore convert the Table with Taw's DB Converter and open it up with Notepad++ to get proper spacing between the lines.
Your Entry should look like this:
Attachment 146474
Make shure that you have exact the same outline of your new entry as the vanilla ones, if not the game will simply crash.
5.) EF - Splines, Cs2 Meshes and other things
EF Splines are used by the game to place soldiers within a garrisonable building.
CS2 Meshes are the collision meshes, where soldiers can walk, where not, where they can be hit etc, also seams that those are placing the fort_cannons.
Usages of both files: If we ever get an converter for the cs2 meshes, we could a) do our own collision meshes and b) making some nice assets like the leuthen church with garrisonable walls, or a proper Hougamont.
6.) What might happen if you make errors and solutions
At the moment the chances to make an error are pretty high, especially within the models_building_table, so here are some problems i encountered which might help you:
- Game chrashes while loading the Map - Error within models_buildings (eg an empty line between entries)
- Map is loading, but asset don’t appear - Most likly an error in your Model ID’s; wrong model path, or you wrong names for buildings; eg not following the model naming convention.
- Model is black - Texture path is wrong, or you don’t have specifed a texture path while exporting a model.
7.) I want to thank:
- Taw for his great tools which opened up this possibilty
- The Hedge Knight for his splendid Tutorial on how to use Taw’s tools on Windows
- Topcat/ T.C for cooperation with the UU3D Developer
- The Creators of the PFM, DB Editor and all those who helped me.
I will post many of the links and attachments as soon as the TWC works fine again, as long i'm sorry
8.) Additional Things and interesting facts
It seams that if you want a prop where Units can walk through, you have to set the type in the battle_buildings table to incidential. What the other types like windmill, townhall are doing is unknown.
Edit: Doesn't seam to work on "large" models...only on small props.
![]()







Reply With Quote








