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 "IWTE - Rome Remastered Functions"

From TWC Wiki
Jump to navigationJump to search
(iwte template)
Line 2: Line 2:
 
{{IWTE}}
 
{{IWTE}}
 
{{TOC right}}
 
{{TOC right}}
Article about IWTE functions used for [[Total War: Rome Remastered - Modding]] for version '''IWTE_v21_05_B''' onwards.
+
Article about IWTE functions used for [[Total War: Rome Remastered - Modding]] for version '''IWTE_v21_07_A''' onwards, and Rome Remastered from version 2.0.2 onwards.
  
 
*IWTE download [https://www.twcenter.net/forums/downloads.php?do=file&id=2741 here] - please use the latest version, early versions do not have this functionality.
 
*IWTE download [https://www.twcenter.net/forums/downloads.php?do=file&id=2741 here] - please use the latest version, early versions do not have this functionality.
Line 8: Line 8:
  
 
==Campaign Mesh Generation==
 
==Campaign Mesh Generation==
To generate a basic mesh from your base folder map_*.tga files use the '''"Rome Remastered"''' button in the top menu bar,
+
===Task File Launch (includes textures)===
then '''"Create Map Mesh"''', select the folder that contains your:
+
 
 +
A minimal task file could look like:
 +
<task_id>                                  create_map_pieces                           
 +
<directory_in>                              C:/IWTERomeRemastered/pkhmap                 
 +
<directory_out>                            C:/IWTERomeRemastered/pkhmap/pieces           
 +
<directory_out_increment>                  no                                               
 +
 
 +
The optimal number of pieces a map can be split into will vary with the size and shape of the map and the amount of detail, in terms of closely spaced shore lines and mountain ranges.  (trying to have large mesh pieces on a complex map is likely to exceed the number of polys that can be written to one .cas file)
 +
 
 +
The vanilla map has 104 tiles in a grid of 13x8 20m squares,  we've generated a mesh for the Mundus Magnus map with similar proportions to a grid of 13x8 30m squares, as that seems to work well for a default, the default value is to use 13 squares wide, and the number of squares vertically is calculated from that.
 +
 
 +
The game requires all map mesh pieces to be the same size (or it messes up the heightmap bin files), whilst they could technically be rectangular, IWTE enforces '''square''' tiles so they tie up with square dds texture files.  For certain size and shape of maps this may mean you get a large border area on the right-hand side or top of the map.
 +
 
 +
===Using button to launch (no textures or options)===
 +
You can generate a basic mesh from your base folder map_*.tga files use the '''"Rome Remastered"''' button in the top menu bar,then '''"Create Map Mesh"''', select the folder that contains your:
 
*map_regions.tga
 
*map_regions.tga
 
*map_heights.tga
 
*map_heights.tga
Line 16: Line 30:
 
*map_features.tga
 
*map_features.tga
 
Then select any existing folder for output.  Now wait a while...  if all goes well you'll have a set of mesh piece .cas files to be used in game and some guide tga files showing you which sections of heights/climates/ground_types have been used:
 
Then select any existing folder for output.  Now wait a while...  if all goes well you'll have a set of mesh piece .cas files to be used in game and some guide tga files showing you which sections of heights/climates/ground_types have been used:
 
+
This method is largely deprecated in favour of the task file method which allows more options
[[File:Pieces-folder-view.jpg|300px|view of pieces and tga files in folder]]
 
  
 
Copy the .cas files to this folder:
 
Copy the .cas files to this folder:
Line 24: Line 37:
 
Make a copy of ''descr_map_tiles.txt'' and add it to your modfolder in:
 
Make a copy of ''descr_map_tiles.txt'' and add it to your modfolder in:
 
:''modfolder\data\terrain\campaign''
 
:''modfolder\data\terrain\campaign''
You will need entries in descr_map_tiles.txt for all the tile pieces you are going to use.  Currently due to a bug that should be resolved by Feral soon...  you also need to have a minimum of 104 pieces for Rome or BI maps!
+
You will need entries in descr_map_tiles.txt for all the tile pieces you are going to use.   
 
   
 
   
 
NOTE:  Rivers and surf coastline meshes are currently not created.  Wilddog hopes to be able to add rivers in the near future; this will change the meshes generated to include dips for the rivers, therefore we recommend not spending too much time manually adjusting meshes created at the moment!
 
NOTE:  Rivers and surf coastline meshes are currently not created.  Wilddog hopes to be able to add rivers in the near future; this will change the meshes generated to include dips for the rivers, therefore we recommend not spending too much time manually adjusting meshes created at the moment!
Line 34: Line 47:
 
*Try using 0,0,248 coloured blue for most of sea depth.  Do not use 255, IWTE (and old RTW game) take this to be approximately 0m depth which will confuse it's attempts to define a coastline!
 
*Try using 0,0,248 coloured blue for most of sea depth.  Do not use 255, IWTE (and old RTW game) take this to be approximately 0m depth which will confuse it's attempts to define a coastline!
  
===Task File and Options===
 
If you make a map mesh using the button IWTE will also generate you a task file so you can refine and/or repeat the process easily.  This file will be in ''iwte_tasks'' sub-folder where the IWTE.exe is located.
 
  
A minimal task file could look like:
 
<task_id>                                  create_map_pieces                           
 
<directory_in>                              C:/IWTERomeRemastered/pkhmap                 
 
<directory_out>                            C:/IWTERomeRemastered/pkhmap/pieces           
 
<directory_out_increment>                  no                                               
 
  
The optimal number of pieces a map can be split into will vary with the size and shape of the map and the amount of detail, in terms of closely spaced shore lines and mountain ranges.  (trying to have large mesh pieces on a complex map is likely to exceed the number of polys that can be written to one .cas file)
+
==Unit Models (including 2 bone weighting)==
 +
'''See main article [[IWTE_-_Units_in_Blender#Export_and_Import_RTW_Units_.26_RTW.2FM2TW_Strat_Characters|IWTE - Units in Blender (RTW)]]'''
  
The vanilla map has 104 tiles in a grid of 13x8 20m squares, we've generated a mesh for the Mundus Magnus map with similar proportions to a grid of 13x8 30m squares, as that seems to work well for a default, the default value is to use 13 squares wide, and the number of squares vertically is calculated from that.
+
The process shown for import/export of RTW units will also work for Rome Remastered, IWTE will now support the weighting of one vert to two bones throughout the body (not weapon) sections of cas models as used for the _lod0 versions of RR units.  You will need to 'limit_weights' in Blender/Max to make _lod1 and below versions which only use single bone weighting.  IWTE does NOT automate the process of making lower lods.
  
We had hoped to make the number of tiles horizontally adjustable, but numbers other than 13 seem to break the heightmap.bin process currently.
 
 
The game requires all map mesh pieces to be the same size (or it messes up the heightmap bin files), whilst they could technically be rectangular, IWTE enforces square tiles so they tie up easily with square dds texture files.  For certain size and shape of maps this may mean you get a large border area on the right-hand side or top of the map.
 
  
 
==Texture Conversion==
 
==Texture Conversion==
Line 61: Line 65:
 
  #<directory_out_increment>    no                      #yes or no whether to increment the directory name (default is yes)
 
  #<directory_out_increment>    no                      #yes or no whether to increment the directory name (default is yes)
 
Remove the comment if you want to use <all_subdirectories> - note though that if files in the subdirectories have the same names they will just overwrite each other!
 
Remove the comment if you want to use <all_subdirectories> - note though that if files in the subdirectories have the same names they will just overwrite each other!
 
==Unit Models (including 2 bone weighting)==
 
'''See main article [[IWTE_-_Units_in_Blender#Export_and_Import_RTW_Units_.26_RTW.2FM2TW_Strat_Characters|IWTE - Units in Blender (RTW)]]'''
 
 
The process shown for import/export of RTW units will also work for Rome Remastered, IWTE will now support the weighting of one vert to two bones throughout the body (not weapon) sections of cas models as used for the _lod0 versions of RR units.  You will need to 'limit_weights' in Blender/Max to make _lod1 and below versions which only use single bone weighting.  IWTE does NOT automate the process of making lower lods.
 
 
 
 
[[Category:RTW Modding]]
 
[[Category:RTW Modding]]

Revision as of 05:44, 25 July 2021

Rome:Total War & Remastered - Modding Index


IWTE
IWTE main page

Useful Reference:


Article about IWTE functions used for Total War: Rome Remastered - Modding for version IWTE_v21_07_A onwards, and Rome Remastered from version 2.0.2 onwards.

  • IWTE download here - please use the latest version, early versions do not have this functionality.


Campaign Mesh Generation

Task File Launch (includes textures)

A minimal task file could look like:

<task_id>                                   create_map_pieces                            
<directory_in>                              C:/IWTERomeRemastered/pkhmap                  
<directory_out>                             C:/IWTERomeRemastered/pkhmap/pieces            
<directory_out_increment>                   no                                                

The optimal number of pieces a map can be split into will vary with the size and shape of the map and the amount of detail, in terms of closely spaced shore lines and mountain ranges. (trying to have large mesh pieces on a complex map is likely to exceed the number of polys that can be written to one .cas file)

The vanilla map has 104 tiles in a grid of 13x8 20m squares, we've generated a mesh for the Mundus Magnus map with similar proportions to a grid of 13x8 30m squares, as that seems to work well for a default, the default value is to use 13 squares wide, and the number of squares vertically is calculated from that.

The game requires all map mesh pieces to be the same size (or it messes up the heightmap bin files), whilst they could technically be rectangular, IWTE enforces square tiles so they tie up with square dds texture files. For certain size and shape of maps this may mean you get a large border area on the right-hand side or top of the map.

Using button to launch (no textures or options)

You can generate a basic mesh from your base folder map_*.tga files use the "Rome Remastered" button in the top menu bar,then "Create Map Mesh", select the folder that contains your:

  • map_regions.tga
  • map_heights.tga
  • map_ground_types.tga
  • map_climates.tga
  • map_features.tga

Then select any existing folder for output. Now wait a while... if all goes well you'll have a set of mesh piece .cas files to be used in game and some guide tga files showing you which sections of heights/climates/ground_types have been used: This method is largely deprecated in favour of the task file method which allows more options

Copy the .cas files to this folder:

modfolder\data\terrain\campaign\pieces

Make a copy of descr_map_tiles.txt and add it to your modfolder in:

modfolder\data\terrain\campaign

You will need entries in descr_map_tiles.txt for all the tile pieces you are going to use.

NOTE: Rivers and surf coastline meshes are currently not created. Wilddog hopes to be able to add rivers in the near future; this will change the meshes generated to include dips for the rivers, therefore we recommend not spending too much time manually adjusting meshes created at the moment!

TIPS:

  • You don't have to use exactly the same tga files that are used in game, you can adapt them if you want slightly different effects in the mesh
  • IWTE expects the land parts of the heights tga to be pure greyscale, slightly off greyscale heights may not work, and/or may produce unexpected results
  • Heavily 'carved' coasts made using dark blue colours to achieve sea depth to avoid visible triangles in RTW/M2TW may not work well as that actual depth will now be visible through the transparent sea surface
  • Try using 0,0,248 coloured blue for most of sea depth. Do not use 255, IWTE (and old RTW game) take this to be approximately 0m depth which will confuse it's attempts to define a coastline!


Unit Models (including 2 bone weighting)

See main article IWTE - Units in Blender (RTW)

The process shown for import/export of RTW units will also work for Rome Remastered, IWTE will now support the weighting of one vert to two bones throughout the body (not weapon) sections of cas models as used for the _lod0 versions of RR units. You will need to 'limit_weights' in Blender/Max to make _lod1 and below versions which only use single bone weighting. IWTE does NOT automate the process of making lower lods.


Texture Conversion

Some of the Remastered textures, e.g. the campaign map tile textures are compressed using LZ4 - IWTE will decompress these to readable format. Use the "Rome Remastered" button and then "DDS Extraction" button, select the folder where your compressed textures are, then select the folder you want the new ones saved to.

You can also use a task file instead of selecting folders, an example would be:

<task_id>                             rrdds_extract_to_dds_directory                           # 
<directory_in>      "C:\Steam\steamapps\common\Total War ROME REMASTERED\Contents\Resources\Data\data\terrain\campaign\textures\026" 
<directory_out>     "C:\RomeRemastered\textures\new026"
#<all_subdirectories> yes
#<directory_out_increment>    no                      #yes or no whether to increment the directory name (default is yes)

Remove the comment if you want to use <all_subdirectories> - note though that if files in the subdirectories have the same names they will just overwrite each other!