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.

Difference between revisions of "Descr model battle.txt"

From TWC Wiki
Jump to navigationJump to search
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The descr_model_battle file is important for how an Unit should look like.
+
{{RTW Modding Logo}}
There you can change skins,giving Units a new model.
+
{{DISPLAYTITLE:descr_model_battle.txt}}
 +
The '''descr_model_battle.txt''' file controls how a unit should look on the battle map.
 +
It controls which skins and models are used for each unit.
  
Structure of the descr_model_battle file:
+
The equivalent of this file in M2TW is [[battle_models.modeldb]].
  
type:indicates the new model type
+
==Structure of the descr_model_battle.txt file==
 +
=== An Individual Unit Listing===
 +
'''type''':indicates the new model type
  
skeleton:which animation the Unit will use
+
'''skeleton''':which animation the Unit will use
        but remember:the animation weapon must be the same as the weapons in export_descr_unit
+
:''but remember:the animation weapon must be the same as the weapons in [[export_descr_unit.txt]]
 
indiv_range:indicates at what point we start rendering men individually  even if we can group render       
 
  
texture:at the beginning you need the faction name of the Unit and then you write there the path of the textuer(.tga)file
+
'''indiv_range''':indicates at what point we start rendering men individually even if we can group render
  
models_flexi and models_flexi_m:location of the models of the unit 
+
'''texture''':at the beginning you need the faction name of the Unit and then you write there the path of the texture (.tga) file
  
modles_sprite:Location of the sprites of the Unit     
+
'''models_flexi''' and '''models_flexi_m''':location of the models of the unit
  
 +
'''models_sprite''':Location of the sprites of the unit
  
model_tri:(optional) indicates that this model can be represented by a single triangle
+
'''model_tri''':(optional) indicates that this model can be represented by a single triangle
  
 +
=== Order of Listing ===
 +
The order in which the units are listed in the descr_model_battle.txt is not important, but for reference the order in the RTW [[vanilla]] file is as follows:
  
At the beginning of the file you will find the peaasants of the city view followed by:
+
*Peasants seen in the city view
 +
*Mounts and Animals
 +
*Generals and officers
 +
*Units of each Culture:
 +
**Barbarians
 +
**Carthaginians
 +
**Easterners
 +
**Egyptians
 +
**Greeks
 +
**Romans
 +
**Mercenaries
  
Mounts and Animals
+
==How to edit the file==
 +
===Changing textures(.tga files)===
  
Generals and officers
+
İf you have only a texture file which needs to be changed, go to the texture file of your Unit:
 
 
Units of each Culture:
 
 
 
Barbarians
 
 
 
Carthaginians
 
 
 
Easterners
 
 
 
Egyptians
 
 
 
Greeks
 
 
 
Romans
 
 
 
Mercenaries
 
 
 
How to edit the file:
 
 
 
'''Changing textures(.tga files):'''
 
 
 
İf you have only a texture file which needs to be changed,go to the texture file of your Unit:
 
  
 
Example:
 
Example:
  
type barb_scythian_noblewoman
+
type barb_scythian_noblewoman
 
+
skeleton fs_hc_archer, fs_hc_swordsman
skeleton fs_hc_archer, fs_hc_swordsman
+
indiv_range 40
 
+
'''texture seleucid, data/models_unit/textures/AR_unit_persian_median_cavalry.tga'''
indiv_range 40
+
model_flexi_m data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 8
 
+
model_flexi_m data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 15
'''texture seleucid, data/models_unit/textures/AR_unit_persian_median_cavalry.tga'''
+
model_flexi data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 30
 
+
model_flexi data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, max
model_flexi_m data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 8
+
model_sprite scythia, 60.0, data/sprites/scythia_barb_scythian_noblewoman_sprite.spr
 
+
model_tri 400, 0.5f, 0.5f, 0.5f  
model_flexi_m data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 15
 
 
 
model_flexi data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 30
 
 
 
model_flexi data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, max
 
 
 
model_sprite scythia, 60.0, data/sprites/scythia_barb_scythian_noblewoman_sprite.spr
 
 
 
model_tri 400, 0.5f, 0.5f, 0.5f  
 
  
 
'''And change it to the name of your .tga file:'''
 
'''And change it to the name of your .tga file:'''
  
texture seleucid, data/models_unit/textures/'''your unit.tga'''
+
texture seleucid, data/models_unit/textures/'''your unit.tga'''
  
Dont forget to put the texture file into the textuers folder in data/models_unit/textures
+
NOTE:  Although the actual file name for your texture will be '''your unit.tga.dds''' you must not include the .dds part in the DMB file, it will cause a CTD!
  
But notice that the texture file must match with the model file,if not,you will get an Unit
+
don't forget to put the texture file into the textures folder in data/models_unit/textures
  
like an Alien
+
But notice that the texture file must match with the model file,if not,you will get an Unit like an Alien
  
 
İf there is no texture file,create one
 
İf there is no texture file,create one
Line 86: Line 71:
  
  
'''Now how to change the Unit completely:'''
+
===Now how to change the Unit completely===
 
 
Now you need to change the models and textures.They are marked here black:
 
 
 
type barb_scythian_noblewoman
 
 
 
 
 
skeleton fs_hc_archer, fs_hc_swordsman
 
 
 
indiv_range 40
 
 
 
'''texture seleucid,
 
data/models_unit/textures/AR_unit_persian_median_cavalry.tga
 
 
 
model_flexi_m data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 8
 
 
 
model_flexi_m data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 15
 
 
 
model_flexi data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 30
 
 
 
model_flexi data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, max'''
 
  
model_sprite scythia, 60.0, data/sprites/scythia_barb_scythian_noblewoman_sprite.spr
+
Now you need to change the models and textures.They are marked here bold:
  
model_tri 400, 0.5f, 0.5f, 0.5f  
+
type barb_scythian_noblewoman
 +
skeleton fs_hc_archer, fs_hc_swordsman
 +
indiv_range 40
 +
'''texture seleucid,      data/models_unit/textures/AR_unit_persian_median_cavalry.tga
 +
model_flexi_m data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 8
 +
model_flexi_m data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 15
 +
model_flexi data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, 30
 +
model_flexi data/models_unit/AR_unit_persian_median_cavalry_lod1.cas, max'''
 +
model_sprite scythia, 60.0, data/sprites/scythia_barb_scythian_noblewoman_sprite.spr
 +
model_tri 400, 0.5f, 0.5f, 0.5f  
  
 
Change the model_flexi and models_flexi_m to the model file(.cas) which you want.
 
Change the model_flexi and models_flexi_m to the model file(.cas) which you want.
Line 118: Line 92:
 
'''Change the models and textures to this:'''
 
'''Change the models and textures to this:'''
  
type barb_scythian_noblewoman
+
type barb_scythian_noblewoman
 +
skeleton fs_hc_archer, fs_hc_swordsman
 +
indiv_range 40
 +
'''texture seleucid, data/models_unit/textures/your unit.tga
 +
model_flexi_m data/models_unit/'''your unit.cas''', 8
 +
model_flexi_m data/models_unit/'''your unit.cas''', 15
 +
model_flexi data/models_unit/'''your unit.cas''', 30
 +
model_flexi data/models_unit/'''your unit.cas''', max'''
 +
model_sprite scythia, 60.0, data/sprites/scythia_barb_scythian_noblewoman_sprite.spr
 +
model_tri 400, 0.5f, 0.5f, 0.5f
  
skeleton fs_hc_archer, fs_hc_swordsman
 
  
indiv_range 40
+
If you changed the name to your models(.cas) and your texture(.tga) file then you need to put
 
+
your models into data/models_unit and texture to  data/models_unit/textures folder
'''texture seleucid, data/models_unit/textures/your unit.tga
 
 
 
model_flexi_m data/models_unit/your unit.cas, 8
 
 
 
model_flexi_m data/models_unit/your unit.cas, 15
 
 
 
model_flexi data/models_unit/your unit.cas, 30
 
 
 
model_flexi data/models_unit/your unit.cas, max'''
 
  
model_sprite scythia, 60.0, data/sprites/scythia_barb_scythian_noblewoman_sprite.spr
+
===Note regarding model_flexi_m===
 
+
Some RTW cas models have a few vertexes that are weighted to more than one bone. These cas files must use the model_flexi_m designation otherwise there will be in game problems similar to having un-weighted vertexes.   model_flexi can be used for all cas models where all the vertexes are only weighted to one bone. As per the example above sometimes the more detailed lod levels use multi-weighted verts but the lower levels of the same unit do not.
model_tri 400, 0.5f, 0.5f, 0.5f
 
 
 
 
 
İf you changed the name to your models(.cas) and your texture(.tga) file then you need to put
 
your models into data/models_unit and texture to  data/models_unit/textures folder
 
  
[[Category:Modding]]
+
[[Category:RTW Text Editing & Scripting]]
[[Category:RTWModding]]
+
[[Category:RTW Files]]

Latest revision as of 10:40, 16 March 2021

Rome:Total War & Remastered - Modding Index


The descr_model_battle.txt file controls how a unit should look on the battle map. It controls which skins and models are used for each unit.

The equivalent of this file in M2TW is battle_models.modeldb.

Structure of the descr_model_battle.txt file

An Individual Unit Listing

type:indicates the new model type

skeleton:which animation the Unit will use

but remember:the animation weapon must be the same as the weapons in export_descr_unit.txt

indiv_range:indicates at what point we start rendering men individually even if we can group render

texture:at the beginning you need the faction name of the Unit and then you write there the path of the texture (.tga) file

models_flexi and models_flexi_m:location of the models of the unit

models_sprite:Location of the sprites of the unit

model_tri:(optional) indicates that this model can be represented by a single triangle

Order of Listing

The order in which the units are listed in the descr_model_battle.txt is not important, but for reference the order in the RTW vanilla file is as follows:

  • Peasants seen in the city view
  • Mounts and Animals
  • Generals and officers
  • Units of each Culture:
    • Barbarians
    • Carthaginians
    • Easterners
    • Egyptians
    • Greeks
    • Romans
    • Mercenaries

How to edit the file

Changing textures(.tga files)

İf you have only a texture file which needs to be changed, go to the texture file of your Unit:

Example:

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

And change it to the name of your .tga file:

texture			seleucid, data/models_unit/textures/your unit.tga

NOTE: Although the actual file name for your texture will be your unit.tga.dds you must not include the .dds part in the DMB file, it will cause a CTD!

don't forget to put the texture file into the textures folder in data/models_unit/textures

But notice that the texture file must match with the model file,if not,you will get an Unit like an Alien

İf there is no texture file,create one

This changes the Skin of the Unit now


Now how to change the Unit completely

Now you need to change the models and textures.They are marked here bold:

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

Change the model_flexi and models_flexi_m to the model file(.cas) which you want.

And of course the texture like posted before.

Change the models and textures to this:

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


If you changed the name to your models(.cas) and your texture(.tga) file then you need to put your models into data/models_unit and texture to data/models_unit/textures folder

Note regarding model_flexi_m

Some RTW cas models have a few vertexes that are weighted to more than one bone. These cas files must use the model_flexi_m designation otherwise there will be in game problems similar to having un-weighted vertexes. model_flexi can be used for all cas models where all the vertexes are only weighted to one bone. As per the example above sometimes the more detailed lod levels use multi-weighted verts but the lower levels of the same unit do not.