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 "Units: Battle Map - Overview - RTW"

From TWC Wiki
Jump to navigationJump to search
(Text Files)
(Text Files)
Line 41: Line 41:
 
==Text Files==
 
==Text Files==
 
The primary file involved in the definition of units is
 
The primary file involved in the definition of units is
data\export_descr_units.txt (known as EDU) - this contains unit stats and references to other files, the other files are referenced follows:
+
data\'''export_descr_units.txt''' (known as EDU) - this contains unit stats and references to other files, the other files are referenced as follows:
 +
'''FOR INFANTRY:'''
 
     '''type'''            warband archer scythian
 
     '''type'''            warband archer scythian
 
     '''dictionary'''      warband_archer_scythian      ; Chosen Archer Warband
 
     '''dictionary'''      warband_archer_scythian      ; Chosen Archer Warband
Line 56: Line 57:
  
  
 +
'''FOR CAVALRY''', as above except:
 +
    type            barb cavalry dacian
 +
    dictionary      barb_cavalry_dacian      ; Barbarian Cavalry
 +
    category        cavalry
 +
    class            light
 +
    voice_type      Medium_1
 +
    '''soldier'''          barb_cavalry, 27, 0, 1
 +
    '''mount'''            medium horse
 +
    mount_effect    elephant -8, camel -4
 +
    attributes      sea_faring, hide_forest
 +
*'''soldier''' again references descr_model_battle.txt but is only the man sitting on top of the mount (horse etc) this man needs an appropriate skeleton type to sit on, not through horse.
 +
*'''mount''' this references the '''type''' line in data\'''descr_mount.txt''' eg:
 +
    type medium horse
 +
    class horse
 +
    '''model''' horse_medium
 +
    radius 1.5
 +
    x_radius 0.57 ;changed from 0.5 29/4/05
 +
** the model line in descr_mount.txt then references a '''type''' line in descr_model_battle.txt
  
  
 +
'''FOR SIEGE ENGINES:'''
 +
    type            barb ballista dacian
 +
    dictionary      barb_ballistas_dacian      ; Ballistas
 +
    category        siege
 +
    class            missile
 +
    voice_type      Light_1
 +
    '''soldier'''          barb_crew, 12, 2, 0.9
 +
    '''engine'''          ballista
 +
    attributes      sea_faring
 +
*'''soldier''' again references descr_model_battle.txt in this case for the men manning the siege weapon.
 +
*'''engine''' this references the '''type''' line in data\'''descr_engines.txt'''
 +
    type ballista
 +
    culture all
 +
    class ballista
 +
    projectile ballista
  
 
+
    engine_model_group normal
 +
    engine_skeleton ballista
 +
    engine_collision data/models_engine/Ballista_very_low_LOD.CAS
 +
    engine_model data/models_engine/Ballista.cas, 20.0
 +
    engine_model data/models_engine/Ballista_med_lod.CAS, 40.0
 +
    engine_model data/models_engine/Ballista_low_LOD.CAS, 120.0
 +
    engine_model data/models_engine/Ballista_very_low_LOD.CAS, max
 +
in this case there is no reference back to DMB for the engine, the model is defined in descr_engines.txt and the texture is called by the default for the model, there is not sprite for the siege engine itself.
  
 
===Adding New Units===
 
===Adding New Units===

Revision as of 16:22, 21 February 2007

Rome - Total War and Barbarian Invasion allow modification of the units that are used in battle maps. Both the visual appearance and the effectiveness of units in battle can be modified.

This article is 'work in progress' anyone else please feel free to add info. links etc to sub-sections.

Models

Skeletons and Animations

Textures

The texture or skin is a 2D .tga.dds file that 'clothes' the model and gives it its colour and textured effects. The textures also have an alpha channel that can be manipulated to make certain areas of the model invisible - for example the apparent size of a shield can be reduced by reducing the amount of it selected within the alpha channel. The required layout of the texture file is determined from within the model .cas file, if you do not have the software to open .cas files you must follow the same layout as an existing texture file which works for the model you are skinning.

Locations

Texture files in Rome - Total War are within the .pak folders in Rome - Total War\data\packs. To access them you need to unpack the .pak files with Vercingetorix's PAK Extractor see Unpacking Files Step-By-Step you will then find the files in RTW\data\packs\data\models_unit\textures.

NB: changed files will not be read from that location you need to; either create new folder path to RTW\data\models_unit\textures and give new textures different name, referenced in descr_model_battle.txt; or pack the files for new textures to take effect. (not 100% sure on the re-naming would someone please confirm and change / delete this comment)

Texture files in Barbarian Invasion are found simply within Rome - Total War\bi\data\models_unit\textures overwriting the existing files will allow changes to show up in game. Alternatively files with new names may be used if referenced in descr_model_battle.txt

Working with .dds Files

To work with the texture files you either need a graphics program that can incorporate the Nvidia .dds plugins or a .dds converter that converts the files into a format you can open and back. PhotoShop, PhotoShop Elements, Gimp and later versions of PaintShopPro should be able to use the .dds plugins.

When saving .dds files for textures use the settings shown: below:ddsdm3.jpg

Correct save settings are DXT5 ARGB - 2d texture - generate all MIP maps.

Tutorials and Reference

PhotoShop Skinning Tutorial by Halie Satanus

A Beginner's Guide To Skinning by Lentonius

An intermediate guide to skinning by Lentonius

Skinning Tutorial for Coral Photo-Paint by Krusoth

Texture database link listing on TWC

Sprites

Sprites are the reduced quality 3D images that you see when you view a unit from further away in battle . New sprites can be made using a program built into the RTW and BI .exe files by CA. It is possible to include new units without adding sprites - simply do not add a sprite line to descr_model_battle.txt or comment out the existing one. However, too many units without sprites in a battle will significantly reduce performance and may make game unplayable for users with older computers!

You may notice a change in colour of a unit when you zoom out. This occurs when you switch from viewing the model and texture to viewing the sprite. It happens largely because the sprite generation program does not include the units shield in the sprite .tga's, this problem is therefore more acute for units with large distinctively coloured shields.

2D Graphics - Unit Cards

Text Files

The primary file involved in the definition of units is data\export_descr_units.txt (known as EDU) - this contains unit stats and references to other files, the other files are referenced as follows: FOR INFANTRY:

   type             warband archer scythian
   dictionary       warband_archer_scythian      ; Chosen Archer Warband
   category         infantry
   class            missile
   voice_type       Medium_1
   soldier          warband_archer, 40, 0, 1.2
   officer          barb_standard
   attributes       sea_faring, hide_improved_forest, hardy      etc.......
  • type is used to define where unit is recruited, so warband archer scythian would be used in export_descr_buildings.txt, descr_strat.txt, descr_mercenaries.txt and descr_rebel_factions.txt as appropriate.
  • dictionary looks up visible 'in game' text descriptions in data\text\export_units.txt and also the unit cards in data\UI\units\faction and data\UI\unit_info\faction
  • soldier line references the type line in descr_model_battle.txt, this in turn defines the model (.cas), texture and sprite used for the unit.
  • officer again references a type in descr_model_battle.txt, in this case a single man normally used as a standard bearer for the unit, one unit can have up to 0 - 3 officers.


FOR CAVALRY, as above except:

   type             barb cavalry dacian
   dictionary       barb_cavalry_dacian      ; Barbarian Cavalry
   category         cavalry
   class            light
   voice_type       Medium_1
   soldier          barb_cavalry, 27, 0, 1
   mount            medium horse
   mount_effect     elephant -8, camel -4
   attributes       sea_faring, hide_forest
  • soldier again references descr_model_battle.txt but is only the man sitting on top of the mount (horse etc) this man needs an appropriate skeleton type to sit on, not through horse.
  • mount this references the type line in data\descr_mount.txt eg:
   type				medium horse
   class				horse
   model				horse_medium
   radius				1.5
   x_radius			0.57	;changed from 0.5 29/4/05
    • the model line in descr_mount.txt then references a type line in descr_model_battle.txt


FOR SIEGE ENGINES:

   type             barb ballista dacian
   dictionary       barb_ballistas_dacian      ; Ballistas
   category         siege
   class            missile
   voice_type       Light_1
   soldier          barb_crew, 12, 2, 0.9
   engine           ballista
   attributes       sea_faring
  • soldier again references descr_model_battle.txt in this case for the men manning the siege weapon.
  • engine this references the type line in data\descr_engines.txt
   type				ballista
   culture				all
   class				ballista
   projectile			ballista
   engine_model_group	normal
   engine_skeleton		ballista
   engine_collision	data/models_engine/Ballista_very_low_LOD.CAS
   engine_model		data/models_engine/Ballista.cas,				20.0
   engine_model		data/models_engine/Ballista_med_lod.CAS,		40.0
   engine_model		data/models_engine/Ballista_low_LOD.CAS,		120.0
   engine_model		data/models_engine/Ballista_very_low_LOD.CAS,	max

in this case there is no reference back to DMB for the engine, the model is defined in descr_engines.txt and the texture is called by the default for the model, there is not sprite for the siege engine itself.

Adding New Units

Unit Statistics Modification

Formations