Text file entries
The M2TW version of the RTW descr_model_battle.txt file is the unit_models/battle_models.modeldb file.
This file is compiled by CA's optimisation process from a bunch of .xml files that control the model (mesh) used, skins (texture), sprites (spr) and attachments (texture) - it is therefore not designed to be edited and so looks a mess. But it can be manually edited (I changed the file name of a texture and it used the alternate texture instead).
This is what was written by CA staffer Caliban:
https://forums.totalwar.org/vb/showthread.php?t=74083
This is an example .xml file:Quote:
export\unit_models\battle_models.battleXml - A standard xml format file that references the different type of unit setups. When this file is built (coverter process), it goes through the list of individual xml unit configs for each unit listed ( Export\unit_models\_Units\XML ), builds lods and pieces, and copies to the corrosponding data\unit_models\_units\ folder that is specified in the unit .xml config.
The individual unit xml files contain the unit type, its bonemap reference (list of bones in order from the skeleton), attachments, mesh lods (.gr2 from 3dsmax7) , torch params, diffuse normal and sprite textures for each faction and the associated skeletons (mounts and weapon types).
*note that we use \export\ folders for source artwork and configs which are then built and to the corrosponding \data\ folder. When the battle_models.battleXml file is processed, it creates the data\unit_modelsbattle_models.modelDB database file as well as processes all the individual unit xml setups contained within.
The Attachments (and where they live)
export\unit_models\battle_models.battleXml
export\unit_models\_Units\XML\Border_Horse.xml (this folder contains all the unit types and their individual .xml files)
export\unit_models\_Units\EN_Peasant_Padded\textures\EN_Peasant_Padded_England.tga (original .tga from the source folder, this is the border horse rider)
data\unit_models\_Units\EN_Peasant_Padded\textures\EN_Peasant_Padded_england.texture (the converted result. very similar to .dds, contains mip-map levels much like a .dds)
border_horse.xml
And this is how it might look in battle_models.modeldbCode:<Model>
<Type>Border_Horse</Type>
<BoneMap>unit_models\BoneMaps\soldier_bone_map_new.xml</BoneMap>
<AttachmentSet>unit_models\AttachmentSets\Final Kite.attSetXML</AttachmentSet>
<AttachmentGroups>
<Group>Cav Spear</Group>
<Group>Sword Secondary</Group>
</AttachmentGroups>
<Meshes>
<Mesh>
<FileName>unit_models\_Units\EN_Peasant_Padded\EN_padded_basic_lod0.gr2</FileName>
<Distance>11</Distance>
</Mesh>
<Mesh>
<FileName>unit_models\_Units\EN_Peasant_Padded\EN_padded_basic_lod1.gr2</FileName>
<Distance>30</Distance>
</Mesh>
<Mesh>
<FileName>unit_models\_Units\EN_Peasant_Padded\EN_padded_basic_lod2.gr2</FileName>
<Distance>50</Distance>
</Mesh>
<Mesh>
<FileName>unit_models\_Units\EN_Peasant_Padded\EN_padded_basic_lod3.gr2</FileName>
<Distance>80</Distance>
</Mesh>
</Meshes>
<Torch>
<Bone>bone_lhand</Bone>
<OffsetX>-0.09</OffsetX>
<OffsetY>0.0</OffsetY>
<OffsetZ>0.0</OffsetZ>
<WorldOffsetX>-0.35</WorldOffsetX>
<WorldOffsetY>0.8</WorldOffsetY>
<WorldOffsetZ>0.6</WorldOffsetZ>
</Torch>
<Textures>
<Texture>
<Diffuse>unit_models\_Units\EN_Peasant_Padded\textures\EN_Peasant_Padded_scotland.tga</Diffuse>
<Normal>unit_models\_Units\EN_Peasant_Padded\textures\EN_Peasant_Padded_normal.tga</Normal>
<Sprite>unit_sprites\scotland_Border_Horse_sprite.spr</Sprite>
<Faction>scotland</Faction>
</Texture>
<Texture>
<Diffuse>unit_models\_Units\EN_Peasant_Padded\textures\EN_Peasant_Padded_rebels.tga</Diffuse>
<Normal>unit_models\_Units\EN_Peasant_Padded\textures\EN_Peasant_Padded_normal.tga</Normal>
<Sprite>unit_sprites\slave_Border_Horse_sprite.spr</Sprite>
<Faction>slave</Faction>
</Texture>
</Textures>
<Skeletons>
<Skeleton>
<Mount>Horse</Mount>
<Primary>MTW2_HR_Spear</Primary>
<Secondary>MTW2_HR_Non_Shield</Secondary>
<PrimaryAttachment>MTW2_HR_spear_Primary</PrimaryAttachment>
<SecondaryAttachment>MTW2_Sword_Primary</SecondaryAttachment>
</Skeleton>
</Skeletons>
</Model>
An analysis of this text was posted by BrandonM here:Code:12 border_horse 1 4 59 unit_models/_Units/EN_Peasant_Padded/border_horse_lod0.mesh 121 59 unit_models/_Units/EN_Peasant_Padded/border_horse_lod1.mesh 900 59 unit_models/_Units/EN_Peasant_Padded/border_horse_lod2.mesh 2500 59 unit_models/_Units/EN_Peasant_Padded/border_horse_lod3.mesh 6400 2 8 scotland 80 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_scotland.texture 78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture 45 unit_sprites/scotland_Border_Horse_sprite.spr 5 slave 78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_rebels.texture 78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture 42 unit_sprites/slave_Border_Horse_sprite.spr 2 8 scotland 59 unit_models/AttachmentSets/Final Kite_scotland_diff.texture 59 unit_models/AttachmentSets/Final Kite_scotland_norm.texture 0 5 slave 56 unit_models/AttachmentSets/Final Kite_slave_diff.texture 56 unit_models/AttachmentSets/Final Kite_slave_norm.texture 0 1 5 Horse 13 MTW2_HR_Spear 18 MTW2_HR_Non_Shield 1 21 MTW2_HR_spear_Primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
http://www.twcenter.net/forums/showthread.php?t=73604
Code:25 dismounted_feudal_knights 1 4 (Number of characters in the name) (Name of Entry used in EDU) (??Scale??) (Number of Mesh Entries)
69 unit_models/_Units/EN_Lmail_Hmail/dismounted_feudal_knights_lod0.mesh 121 (Number of Characters in mesh path/name)(Mesh)(LOD distance)
69 unit_models/_Units/EN_Lmail_Hmail/dismounted_feudal_knights_lod1.mesh 900
69 unit_models/_Units/EN_Lmail_Hmail/dismounted_feudal_knights_lod2.mesh 2500
69 unit_models/_Units/EN_Lmail_Hmail/dismounted_feudal_knights_lod3.mesh 6400
(Model Texturing Section)
11 (Number of Faction Entries)
7 england (Length of Faction Name) (Faction Name)
73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_england.texture (Length of Texture Path/Name) (Path to Faction Texture)
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture (This is the normal map texture)
57 unit_sprites/england_Dismounted_Feudal_Knights_sprite.spr (this is the sprite for this faction)
8 scotland
74 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_scotland.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
58 unit_sprites/scotland_Dismounted_Feudal_Knights_sprite.spr
6 france
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_france.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
56 unit_sprites/france_Dismounted_Feudal_Knights_sprite.spr
3 hre
69 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hre.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
53 unit_sprites/hre_Dismounted_Feudal_Knights_sprite.spr
7 denmark
73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_denmark.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
57 unit_sprites/denmark_Dismounted_Feudal_Knights_sprite.spr
5 spain
71 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_spain.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
55 unit_sprites/spain_Dismounted_Feudal_Knights_sprite.spr
8 portugal
74 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_portugal.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
58 unit_sprites/portugal_Dismounted_Feudal_Knights_sprite.spr
5 milan
71 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_milan.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
55 unit_sprites/milan_Dismounted_Feudal_Knights_sprite.spr
6 venice
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_venice.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
56 unit_sprites/venice_Dismounted_Feudal_Knights_sprite.spr
12 papal_states
78 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_papal_states.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
62 unit_sprites/papal_states_Dismounted_Feudal_Knights_sprite.spr
7 hungary
73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hungary.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
57 unit_sprites/hungary_Dismounted_Feudal_Knights_sprite.spr
(Attachment Texture Section)
11 (Number of Faction Entries)
7 england (Length of Faction Name) (Faction Name)
60 unit_models/AttachmentSets/Final Heater_england_diff.texture (Length of Texture Path/Name) (Texture)
60 unit_models/AttachmentSets/Final Heater_england_norm.texture (normal map)
0 (Declares end of this faction's entries)
8 scotland
61 unit_models/AttachmentSets/Final Heater_scotland_diff.texture
61 unit_models/AttachmentSets/Final Heater_scotland_norm.texture 0
6 france
59 unit_models/AttachmentSets/Final Heater_france_diff.texture
59 unit_models/AttachmentSets/Final Heater_france_norm.texture 0
3 hre
56 unit_models/AttachmentSets/Final Heater_hre_diff.texture
56 unit_models/AttachmentSets/Final Heater_hre_norm.texture 0
7 denmark
60 unit_models/AttachmentSets/Final Heater_denmark_diff.texture
60 unit_models/AttachmentSets/Final Heater_denmark_norm.texture 0
5 spain
58 unit_models/AttachmentSets/Final Heater_spain_diff.texture
58 unit_models/AttachmentSets/Final Heater_spain_norm.texture 0
8 portugal
61 unit_models/AttachmentSets/Final Heater_portugal_diff.texture
61 unit_models/AttachmentSets/Final Heater_portugal_norm.texture 0
5 milan
58 unit_models/AttachmentSets/Final Heater_milan_diff.texture
58 unit_models/AttachmentSets/Final Heater_milan_norm.texture 0
6 venice
59 unit_models/AttachmentSets/Final Heater_venice_diff.texture
59 unit_models/AttachmentSets/Final Heater_venice_norm.texture 0
12 papal_states
65 unit_models/AttachmentSets/Final Heater_papal_states_diff.texture
65 unit_models/AttachmentSets/Final Heater_papal_states_norm.texture 0
7 hungary
60 unit_models/AttachmentSets/Final Heater_hungary_diff.texture
60 unit_models/AttachmentSets/Final Heater_hungary_norm.texture 0
(Attachments)
1 (Number of Mount types?)
4 None (lengh of entry) (Mount Name)
14 MTW2_Swordsman
0 (Number of somethings)
2 (Number of Attachments?)
18 MTW2_Sword_Primary
14 fs_test_shield
0
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 (??? End of This Entry or Beginning of Next)
Quote:
Originally Posted by BrandonM