Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Battle models.modeldb

From TWC Wiki
Jump to navigationJump to search
M2TW Modding Index


The battle_models.modeldb file controls how a unit should look on the battle map in M2TW. It controls which skins and models are used for each unit. The file is located in data/unit_models - that folder is visible after unpacking

The equivalent of this file in RTW is descr_model_battle.txt.

Converting to editable format

The vanilla battle_models.modeldb is a remarkably unfriendly document to try and edit as all lines run into one large block of undifferentiated text. Various modders have issued formatted versions of the original file to make modifying it easier. See:

has various validating and balancing functions for export_descr_unit.txt and battle_models.modeldb, etc.
makes the modeldb file a lot easier to edit - also includes a syntax checker

If using a re-formatted version of the file please check it is for the version / patch of M2TW you are using!

What are all the strange numbers?

This file requires a number count for the number of sub-sections that exist in the section below and also a count of the number of characters in each line. So as an example from a formatted file:

14 musketeers_ug1        (14=number of characters in unit's name line)
1 4                      (1=section designation  4=number of model lines in section below)
58 unit_models/_Units/RN_Light_Lmail/musketeers_ug1_lod0.mesh 121  (58=number of characters in line*)
58 unit_models/_Units/RN_Light_Lmail/musketeers_ug1_lod1.mesh 900 
58 unit_models/_Units/RN_Light_Lmail/musketeers_ug1_lod2.mesh 2500 
58 unit_models/_Units/RN_Light_Lmail/musketeers_ug1_lod3.mesh 6400 
4         (4=number of factions in section below)
5 spain   (5=number of characters in faction name)
71 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_spain.texture (71=characters in line)
72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
.....
*excludes count of characters in distance factor at end of model line

See Tutorial by KnightErrant for a more complete explanation.

YOU can help us improve this Wiki! ~ Look for ways to help and editing advice. ~ If you need further advice, please post here.