A Guide To Descr_Model_Battle.txt

By SubRosa

The Descr_Model_Battle.txt file (or DMB for short) is located in the RTW\Data folder, and it is a very important file in editing and creating units. What it does is set the models and textures that every unit uses, even the horses.

Here is an example of what you will see in this file:

type barb_scythian_noblewoman
skeleton fs_hc_archer, fs_hc_swordsman
indiv_range 40
texture scythia, data/models_unit/textures/barb_noblewoman_scythia.tga
model_flexi_m data/models_unit/barb_noblewoman_high.cas, 8
model_flexi_m data/models_unit/barb_noblewoman_med.cas, 15
model_flexi data/models_unit/barb_noblewoman_low.cas, 30
model_flexi data/models_unit/barb_noblewoman_lowest.cas, max
model_sprite scythia, 60.0, data/sprites/scythia_barb_scythian_noblewoman_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f

Now we will break it down line by line.

Type - This is the Soldier Name for the unit found in Export_Descr_Unit.txt.

Skeleton - This is the skeleton(s) associated with the model. The skeletons are listed in Descr_Skeleton.txt. The first skeleton listed is for the primary weapon, and the second for the secondary weapon (if the unit has one).

Models that are used in multiple units may have alternate skeletons. Generals are an example of this rare circumstance. In this case the first skeleton listed is the Infantry skeleton, and the following skeletons must be identified by a keyword. Example:

skeleton fs_dagger
skeleton_horse fs_hc_swordsman
skeleton_elephant fs_forest_elephant_rider
skeleton_chariot fs_chariot_sword
skeleton_camel fs_hc_swordsman

The skeleton is important because it determines what animations the model will use. From standing at ease, to walking, running, fighting, etc... So you want to get the correct skeleton for your unit otherwise it will look very strange. For example, if you use a cavalry skeleton on an infantry unit, it will stand in a crouch with its legs apart, and its feet will not move when it walks forward.

Here is a list of all the skeletons used in the game, including what kind of unit they are for, and an example of a unit in the game that uses it:

fs_chariot_sword chariot, sword Scythed Chariot Crew
fs_chariot_archer chariot, bowBritish Light Chariot Archer
fs_hc_swordsmancavalry, swordHead Hunting Maiden
fs_hc_archercavalry, bowScythian Horse Archer
fs_hc_spearmancavalry, spearBarbarian Cavalry
fs_hc_javelinmancavalry, javelinNumidian Cavalry
fs_semi_fast_archerinfantry, bowArcher Warband
fs_archerinfantry, bowChosen Archer Warband
fs_daggerinfantry, daggerPeasant
fs_semi_fast_daggerinfantry, daggerWardog handler
fs_slow_spearman infantry, spear Poeni Infantry
fs_spearman infantry, spear Barbarian Infantry
fs_semi_fast_spearman infantry, spear Hillmen
fs_javelinman infantry, javelin Hastati
fs_semi_fast_javelinman infantry, javelin Peltast
fs_slinger_new infantry, slinger Mercenary Rhodian Slinger
fs_2handed_berserker infantry, 2-hand club Berserkers
warband_dhaxeinfantry, 2-hand axe Chosen Axemen
fs_slow_swordsmaninfantry, sword Chosen Swordsmen
fs_swordsman infantry, sword Naked Fanatic
fs_semi_fast_swordsman infantry, sword Woad Warriors
fs_forest_elephant_rider elephant Elephant Crew
fs_big_elephant_rider elephant Armored Elephant Crew
fs_standard_bearer infantry Standard Bearer
fs_camel mount Camel
fs_indian_elephant mount War Elephant
fs_african_elephant mount Cataphract Elephant
fs_forest_elephant mount Elephant
fs_indian_giant_elephant mount Cheat Oliphants
fs_fast_horse mount light horse
fs_medium_horse mount medium horse
fs_horse mount heavy horse
fs_cataphract_horse mount Cataphract Horse
fs_dog animal Wardog
fs_pig animal Incendiary Pigs
fs_bird animal crow (not implemented)
fs_deer animal deer (not implemented)

Indiv_range - This is the range in meters at which the game will render each individual soldier in a unit.

Texture - This is the skin that is associated with the model. Where the model is a 3-dimensional wireframe, the skin is the graphic pasted over it. Each model may have multiple textures associated with it. This is done when identical units of multiple factions use the same model. Such as with Barbarian Cavalry for example. Each texture must begin with first the faction owning it, then with the path and name of the texture itself, starting with the Data folder.

While .dds files are used for textures, it is not necessary to have the .dds at the end of the filename here. The game will find it anyway. For example, the actual texture file of the unit at the top is barb_noblewoman_scythia.tga.dds, but it is only necessary to enter barb_noblewoman_scythia.tga here.

Model_flexi_m - This is only used for models with a small number of weighted vertices. You will rarely see this.

Model_flexi_c - This is only used for a flexi model which contains per-vertex colors. Again, it is very rarely used.

Model_flexi - This is by far the most commonly used type of model. What this (and the other model_flexi_x lines) do is specify what model to use with the unit. Each unit will typically have up to four models, and the game swaps from one to the other depending on the level of distance (lod), using lower resolution models when further away to reduce the load on the processor. They are listed from nearest (top) to the farthest (bottom).

As with the texture, the path of the model file must be provided. It is followed by a comma and then a number. The number tells the game the maximum distance to use the model from. Max means the maximum distance.

Model_mesh - (Optional) This is an uncommon line, with a number for the range to use animated mesh frames for the model.

Model_sprite - This is an optional line, telling the game to use a sprite. You can learn more about generating sprites here. The first number listed is the distance at which the sprite will be used. It is then followed by the path and file name of the sprite file. Note that only the .spr file is listed here.

Model_tri - Another optional line, this tells the game to use a triangle rather than a model or sprite. The first number indicates the distance to use the triangle at. It is followed by three floating point numbers in the range 0.0f - 1.0f which indicate colors Red, Green, Blue to use for the triangle.

That is it. Something to watch out for with models and skins is that if a skin is associated with a model in a modeling application such as 3ds Max, the model will always look for that skin and use it, regardless of what you list here. If it cannot find it the game will crash with an error message saying it cannot find the file.