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.

IWTE - Rome Remastered Functions

From TWC Wiki
Revision as of 08:59, 25 July 2021 by Makanyane (talk | contribs)
Jump to navigationJump to search
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

IWTE will now produce .cas components and textures for a Rome Remastered campaign map mesh.

Task File Launch (includes textures)

The task file allows certain components to be switched on or off. If you have a very large/complex mod you may find certain components exceed the 65K limit that can be written to a single .cas, if so you can turn off generation of the problem element e.g. coastline, to get the other components out.

Textures are currently generated as 2048x2048 .tga files. These will need to be converted to .dds files for use in game, we recommend NOT including mip-maps for the Albedo textures to avoid blurring at lower in-game graphics settings.

A full task file for mesh, components and texture generation is shown below, obviously change the paths to where your files are located!:

<task_id>                             create_map_pieces                         

<directory_out>                      "C:\IWTE\MapMesh\output"                            #directory where all created files be put
<directory_out_increment>             no                                                        #yes or no whether to increment the directory name (default is yes to prevent accidental overwriting)

#switch options Please note texttures take a long time to create and will take a lot of memory.
<map_pieces_longest_dimension>        13                                                          #at the moment square tiles only will be produced
<create_albedo_textures>        yes                                                                 #albedo textures are to be produced.. Warning, slow takes several minutes.
<create_normal_textures>        yes                                                                #albedo textures are to be produced.. Warning, slow takes several minutes.
<create_full_dae>               yes                                                                #albedo textures are to be produced.. Warning, slow takes several minutes.
<create_river_mesh_cas>         yes                                                                #create the river mesh cas file
<create_coastline_cas>          yes                                                                #create coastline cas file
<create_pieces_cas>             yes                                                                #create piece cas files

<slope_darken_factor>             0.95                                                              #higher value increases slope darkening/greying
<normals_multiplier>             10                                                             #higher value increases normals intensity
<tint_factor>                     0.3                                                             #0 to 1 ratio for tints v textures

#Main map files to use.
<map_heights_tga>                    "C:\IWTE\MapMesh\map-files\map_heights.tga"         
<map_regions_tga>                    "C:\IWTE\MapMesh\map-files\map_regions.tga"         
<map_ground_types_tga>               "C:\IWTE\MapMesh\map-files\map_ground_types.tga"     
<map_climates_tga>                   "C:\IWTE\MapMesh\map-files\map_climates.tga" 
<map_features_tga>                   "C:\IWTE\MapMesh\map-files\map_features.tga" 

#default groundtype TGAs
<default_fertility_low>                "C:\IWTE\MapMesh\base-textures\default_climate\fertility_low.tga"
<default_fertility_medium>             "C:\IWTE\MapMesh\base-textures\default_climate\fertility_medium.tga"
<default_fertility_high>               "C:\IWTE\MapMesh\base-textures\default_climate\fertility_high.tga"
<default_wilderness>                 "C:\IWTE\MapMesh\base-textures\default_climate\wilderness.tga"
<default_mountains_high>             "C:\IWTE\MapMesh\base-textures\default_climate\mountains_high.tga"
<default_mountains_low>              "C:\IWTE\MapMesh\base-textures\default_climate\mountains_low.tga"
<default_hills>                      "C:\IWTE\MapMesh\base-textures\default_climate\hills.tga"
<default_forest_dense>               "C:\IWTE\MapMesh\base-textures\default_climate\forest_dense.tga"
<default_forest_sparse>              "C:\IWTE\MapMesh\base-textures\default_climate\forest_sparse.tga"
<default_swamp>                      "C:\IWTE\MapMesh\base-textures\default_climate\swamp.tga"
<default_ocean>                      "C:\IWTE\MapMesh\base-textures\default_climate\sea.tga"
<default_sea_deep>                   "C:\IWTE\MapMesh\base-textures\default_climate\sea.tga"
<default_sea_shallow>                "C:\IWTE\MapMesh\base-textures\default_climate\sea.tga"
<default_beach>                      "C:\IWTE\MapMesh\base-textures\default_climate\beach.tga"

#directory paths containing the TGA data for each climate missing ones will use default - names within the diectory must match default names in the tags above
<mediterranean_gt_dir>                       "C:\IWTE\MapMesh\base-textures\med"			#236 0 140
<sandy_desert_gt_dir>                        "C:\IWTE\MapMesh\base-textures\sandy_desert"	#102 45 145
<rocky_desert_gt_dir>                        "C:\IWTE\MapMesh\base-textures\rocky_desert"	#146 39 143
<temperate_grassland_fertile_gt_dir>         "C:\IWTE\MapMesh\base-textures\fertile"		#237 20 91 (unused1 in M2)
<temperate_grassland_infertile_gt_dir>       "C:\IWTE\MapMesh\base-textures\infertile"		#237 28 36 (steppe in M2)
<temperate_forest_open_gt_dir>               "C:\IWTE\MapMesh\base-textures\open"		#242 101 34 (temperate_deciduous_forest in M2)
<temperate_forest_deep_gt_dir>               "C:\IWTE\MapMesh\base-textures\deep"		#247 148 29 (temperate_coniferous_forest in M2)
<swamp_gt_dir>                               "C:\IWTE\MapMesh\base-textures\swamp"		#255 242 0 (unused2 in M2)
<highland_gt_dir>                            "C:\IWTE\MapMesh\base-textures\highland"		#141 198 63
<alpine_gt_dir>                              "C:\IWTE\MapMesh\base-textures\alpine"		#57 181 74
<sub_arctic_gt_dir>                          "C:\IWTE\MapMesh\base-textures\artic" 		#0 166 81
<semi_arid_gt_dir>                           "C:\IWTE\MapMesh\base-textures\semi_arid"		#0 114 188

#climate tints - choose from the combinations arid, warm_dry, warm_humid, cold_humid, polar, winter
<default_tint>                            warm_humid
<mediterranean_tint>                      warm_dry                                                                                     
<sandy_desert_tint>                       arid                                                   
<rocky_desert_tint>                       arid                                                 
<temperate_grassland_fertile_tint>        warm_humid                                             
<temperate_grassland_infertile_tint>      warm_dry                                               
<temperate_forest_open_tint>              warm_humid                                              
<temperate_forest_deep_tint>              cold_humid                                            
<swamp_tint>                              warm_humid                                           
<highland_tint>                           cold_humid                                             
<alpine_tint>                             warm_humid                                                   
<sub_arctic_tint>                         polar                                                       
<semi_arid_tint>                          warm_dry     
                                            

<map_pieces_longest_dimension>

This sets the number of tiles the longest side of map_regions.tga will be split into, the number of tiles on the short dimension will be determined automatically so the tiles are square. 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.

Main map files to use

These should be similar to the map files your mod actually uses in data/world/maps/base or campaign.

map_regions and map_features MUST be the same size as your actual files!

map_heights, map_ground_types and map_climates can be either 2x map regions size +1 pixel (i.e. as used in game) or 4x map regions size +1 pixel - please note this is 1 pixel different from just doubling the scale of the in-game tga files! Also note there is no point using the large scale unless you are going to refine them to utilise the higher density, increasing the size without refining them will result in a worse result than letting IWTE interpolate between values.

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!

YOU can help us improve this Wiki! ~ Look for ways to help and editing advice. ~ If you need further advice, please post here.