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 "Total War: Rome Remastered - Modding"

From TWC Wiki
Jump to navigationJump to search
(Campaign Map)
(logo)
Line 1: Line 1:
 +
{{RTW Modding Logo}}
 
'''Good News!  A), [[Total War: Rome Remastered]] is here!  B), it's moddable!'''
 
'''Good News!  A), [[Total War: Rome Remastered]] is here!  B), it's moddable!'''
  

Revision as of 00:15, 21 May 2021

Rome:Total War & Remastered - Modding Index


Good News! A), Total War: Rome Remastered is here! B), it's moddable!

There will probably be some quirks initially, and because it looks sooo much better, there will also be more work involved in getting mod assets to match up.

KNOWN COMMON ISSUES:

  • Crash regenerating map.rwm - RR can write new map.rwn files to : C:\Users\name\AppData\Local\Feral Interactive\Total War ROME REMASTERED\VFS\Local\Rome\WritableMaps as "base_map.rwm", if so, you need to rename it to map.rwm and move it to the appropriate folder. Attempting to generate a new map.rwm whilst there is a base_map.rwm present in the WritableMaps folder will cause an instant CTD on campaign start.
  • Invalid Manifest - 0kb empty .txt files within the mod will cause an error where the game makes the mod manifest but then thinks it is invalid! The vanilla games have some of these files, beware of copying them into mod-folder.

SEE ALSO:

Mod Set-up

NB: Please see below for details of map.rwm generation.

Mods can be uploaded and used from the Steam Workshop, the placing of those mods on your computer will be determined by Steam and your library set-up, for example a mod's file could be in:

D:\Steam\steamapps\workshop\content\885970\2471298638

Mods in development can be placed in the 'Mods' folder either in Local Mods or My Mods, the full path to these folders is normally:

C:\Users\YOURNAME\AppData\Local\Feral Interactive\Total War ROME REMASTERED\Mods\Local Mods\Mods_Name etc.

If you have a small C drive and need to relocate this elsewhere you can use a hard-link on your computer, hopefully, the launcher options will later allow an easier way to change directory locations!

Within either Local Mods or My Mods you will then have a folder for Mod_Name. Within Mod_Name folder you need the mod's data folder a modinfo.json and a filelist.json

modinfo.json

This file you write yourself and it gives the name and description of the mod, a sample format is:

{
	"Description": "Brief description of you mod goes here",
	"Mod Name": "Mod name goes here",
	"Supports Alex": false,
	"Supports BI": false,
	"Supports Rome": true,
	 "Tags": [ ],
	"Visibility": 1,
	"Workshop ID": 0
}

filelist.json

This is referred to as the 'manifest' for the mod. If you don't have one the game will generate it when you try and launch the mod. If you already have one and you've changed ANY of the mod's files, you should delete this file before launch so a new correct version can be generated.

0kb empty .txt files within the mod can cause an error where the game makes the mod manifest but then thinks it is invalid!

Differences to Rome: Total War

For text file and folder structure differences see main article:- File Differences - Rome Remastered

There are numerous small and large changes to the files and file structure of Remastered in comparison to RTW. The changes are centered around:

  • Inclusion of higher resolution graphics and environmental effects
  • Inclusion of all language options within the same base game (instead of replacement)
  • Addition of separate mesh structure for 3D elements of campaign map
  • Addition of merchant agent type
  • 'Duplicate' text files with alternative statistics to suit toggled play-style options
  • New methods to override base files

Textures

RR still uses .tga.dds files (e.g. dds files but with the .tga name appended so that text files actually just ask for .tga)

Some textures are compressed using the LZ4 system, these also have an additional header section which can be ignored. IWTE now has an option that will de-compress a directory of these textures back to their starting .dds state.

Some textures are DX10 type, these you can probably open but not see the correct information, if you have a recent version of Photoshop you can use this plugin to open them. Otherwise, you need to convert them to .tga using the Texconv tool or similar. The easiest way to use this tool is by writing a .bat file (so you don't have to remember the commands each time!), and example .bat would be:

@echo off
texconv.exe -r my_folder\*.dds -ft tga -o my_folder
cmd /k

Fortunately, the game will accept and run happily with non-compressed DXT5 and DXT1 dds textures in the same way as RTW, so you only need to mess about with the above if you need to view or amend some of the existing textures.

RR has introduced a system of Physically Based Rendering for textures, thus the 'normal' textures that have been introduced with RR work slightly differently from the ones in M2TW:

_pbr contain the _n, _s and _m maps  they are rgba textures
r+b = normal
g = roughness
a = metallic
In other places like building textures you will find that the _n, _s, _m are separate

.pvr

A .pvr version of the radar map is used, to open this file download the PVRTexTool or similar.

Campaign Map

One of the areas modders' have been most worried about was whether the game would support completely redesigned maps now that a model mesh system has been introduced for the campaign map. Although this looks like the vanilla shaped map, it's actually partway through porting a version of the Mundus Magnus large map for RTW (originally by ngr).

Showing new map mesh in Rome Remastered

This still needs a lot of work and 'tweaking' but is working as a proof of concept of what should be possible. (WIP map is now released on Steam and IWTE version 21_05_B supports mesh creation)

Relationship to battle maps:

The below picture demonstrates the difference between what you might see on the campaign map and in battle if you don't deliberately align the two:

Showing lack of connection between campaign and battle map views

The left part shows the campaign map on a modified section of mesh. The area shown in green, where the army can move, is controlled by the map_heights.tga, map_ground_types.tga and map.rwm information. Where he would actually appear to stand is controlled by the heightmap .bin file generated from the mesh, so he will walk up that big lump, but he won't go below 0m (sea level), even though the mesh is below the water surface there. The second part of the picture on the right shows what you actually get at that spot in battle, which is based on the map_heights.tga, map_ground_types.tga and map.rwm information, plus interpretation from the vegetation and geography.db files.

Similarities to the original system:

A quick look in the data/world/maps folders will reassure RTW and M2TW modders that the map image and text files they are familiar with are still there. If you have a 'pure map' mod you should be able to use your existing map_heights.tga, descr_strat.txt etc to launch a mod for Remastered without much problem. If the mod has modded units, buildings, ancillaries etc, it will take more unravelling, just as porting a map between different mods would. If you try to copy in all of your mod's files you will probably find either some conflicts, or that you have overwritten new features in Remastered such as the addition of traits and ancillaries to support the new Merchant agent type.

That's the good news... your basic map files are still valid! The basic files drive the campaign map pathfinding, placement of settlements and resources and provide the climate/heights/ground_types information that is translated using the vegetation and geography.db files to make the battle maps.

The not so good news, if you were after a quick result, is that they don't generate the mesh or textures you view on the campaign map! So if you load a map of a different size or shape the areas not covered by the existing mesh, or already on raised land areas, will just appear as sea! They will function, and the trees and settlements will turn up, and your troops will be able to move on the parts supposed to be land... so if you ever wanted to do a mod based in the Everglades, this could be for you.

Screenshot showing area of map without mesh

Revised UI components:

When you scroll into the campaign map or use the tab button, the game display switches to a 2d view with various overlays, the overlays are generated by the game but you will need a large base map underlying them showing your new map outline, the components are as follows:

Large 2D Map:

  • data\world\maps\campaign\imperial_campaign\feral_map.tga.dds - 4080 x 2496 size - these seem to work best if they are completely 'alpha'd out' with a black alpha layer
  • data\world\maps\campaign\imperial_campaign\feral_map_winter.tga.dds - winter version as above

NB: These textures need to be placed in mod-folder\data\world\maps\campaign\imperial_campaign\ for BI mods, they are not read from the \barbarian_invasion\ campaign folder.

Mini Map in 3D view:

  • data\world\maps\campaign\imperial_campaign\feral_radar_map.tga - 1020 x 624 size - again mask out the sea area shape from map_regions.tga
  • data\world\maps\campaign\imperial_campaign\feral_radar_map_winter.tga - winter version as above

Components needed for new mesh map system:

To make things look good you obviously need to make a new or revised mesh!

Main Terrain and Heights: The mesh is actually formed from square chunks which in the vanilla map represent 20x20m squares in each case file, these can be found in:

  • data/terrain/campaign/pieces/ - cas format (will open with IWTW latest version .cas to .dae)
  • data/terrain/campaign/descr_map_tiles.txt - text file lists all the cas pieces and which summer/winter textures they use and which heightmap .bin file they use.
  • data/terrain/campaign/heightmap/ - bin files for functioning heights generated by the game from each of the pieces - NOTE: the game may initially regenerate these in the base folder instead of the mod folder, if so cut and paste them to the mod folder and run the base game without /heightmap/ files so they regenerate too.
  • data/terrain/campaign/textures/ - colour and normal textures for the terrain sections, the cas pieces use conventional uv mapping so although the existing textures are mapped as though projected horizontally, you can alter this. All the land textures with the exception of the farming overlay need to be 'painted' onto each pieces' texture.

Coastline: Gives the surface for the waves/surf effect near the shoreline, and can be found in:

  • data/terrain/campaign/coastline/coastline.cas - model of the surface
  • data/terrain/campaign/descr_map_coastlines.txt - text file which lists the above model

Rivers: These do not automatically appear where the map_features.tga shows them, instead they use a model surface similar to the coastline in:

  • data/terrain/aerial_map/river_mesh.cas - the river model - will only be visible if above the level of the terrain mesh - unfortunately as the game still generates region boundaries with wiggles/bend variety automatically, and doesn't generate the mesh for the rivers, it is currently difficult if not impossible to get rivers and boundaries to align exactly

3D Frame:

  • data/terrain/campaign/frame/ - contains a cas model and textures for the 3d frame that hides the edges of the map

map.rwm

RR does regenerate map.rwm files (assuming the same set-up would load under RTW), you may need to check where they have been regenerated.

If you launch vanilla, or a mod with maps in /base, and delete map.rwm, and the game runs, check if the .rwm has been written where you expect! It may tend to write it to: C:\Users\name\AppData\Local\Feral Interactive\Total War ROME REMASTERED\VFS\Local\Rome\WritableMaps as "base_map.rwm", if so, you need to rename it and move it to the appropriate folder.

Attempting to generate a new .rwm whilst there is a base_map.rwm from another folder in /Users/ will CTD.

You can also use map.rwm files from RTW.

If you copy your map_*.tga files from base into your campaign folder then the map.rwm will be created in that campaign folder within the mod-folder, it is recommended that you use this method and copy that map.rwm into your base folder for custom battle purposes. This will avoid the potential of causing clashes with other mods/vanilla.

Units

Although still .cas files the RR units use the 'type 3' chunk system previously only used for some shoulder pads and minor elements of RTW units using the model_flexi_m system. The main body of the unit can have vertexes weighted variably between any two bones for the lod_0 model. Primary and secondary weapons must still exist within the .cas as a separate mesh and use only one bone.

Only the base .cas name is given for the model in the DMB file the game looks for and needs four model .cas files for each model named:

base_name_lod0.cas
base_name_lod1.cas
base_name_lod2.cas
base_name_lod3.cas

If you haven't got 4 different lod level models, copy the closest one you have and re-name it to suit.

Text Strings and Menu Items

Some of the text displayed in game isn't read from data/text folders, it's from

\Steam\steamapps\common\Total War ROME REMASTERED\Contents\Resources\en.lproj\Localizable_Game.strings - (which is plain text)

these strings can be changed and included in a modfolder @

mod-folder\data\string_overrides\en.strings

example shown is for English the same principle applies on other languages.

Instructions are contained in the readme.txt inside data/string_overrides:

   This folder is used to override strings added to the game by Feral Interactive.
   The original files can be found at "<languageCode>.lproj/Localizable_Game.strings"
   Override files should be named the language code they correspond with and have the file extension, ".strings"
   E.G. English Override: "en.strings"

As an example the text seen on buttons and on the main menu selection items is in the Localizable_Game.strings, however, other parts of the menu text can be found in data/text/menu_english_stm.txt and language variants.