Difference between revisions of "Creating New Campaign Map in Rome Remastered"
(→Functional Map Components: added note about size limit lift) |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{Rome Remastered Modding}} |
The underlying map structure in [[Total War: Rome Remastered]] is exactly the same as for the original game and can still be changed via text file and tga image alterations, however, the visual element of the campaign map is now provided by a separate 3D mesh and textures. | The underlying map structure in [[Total War: Rome Remastered]] is exactly the same as for the original game and can still be changed via text file and tga image alterations, however, the visual element of the campaign map is now provided by a separate 3D mesh and textures. | ||
Line 5: | Line 5: | ||
'''Options for creating a new 3d map mesh include:''' | '''Options for creating a new 3d map mesh include:''' | ||
*Feral's tool for sectioning and converting a mesh created in Blender see [https://github.com/FeralInteractive/romeremastered/blob/main/tools/CampaignMapTool/CampaignMapTool.md here] | *Feral's tool for sectioning and converting a mesh created in Blender see [https://github.com/FeralInteractive/romeremastered/blob/main/tools/CampaignMapTool/CampaignMapTool.md here] | ||
− | *IWTE which will generate mesh pieces and their textures from map_.tga files and ground_type | + | *IWTE which will generate mesh pieces and their textures from map_.tga files and ground_type textures see [[IWTE_-_Rome_Remastered_Functions#Campaign_Mesh_Generation| here]] |
Line 11: | Line 11: | ||
*For differences between Remastered files and RTW see [[File Differences - Rome Remastered]] | *For differences between Remastered files and RTW see [[File Differences - Rome Remastered]] | ||
*For detail on changes needed to port existing maps see [[Porting a Mod to Rome Remastered#Mapping / Campaign Differences|Porting a Mod to Rome Remastered, Mapping/Campaign Differences]] | *For detail on changes needed to port existing maps see [[Porting a Mod to Rome Remastered#Mapping / Campaign Differences|Porting a Mod to Rome Remastered, Mapping/Campaign Differences]] | ||
− | + | ||
{{IWTE}} | {{IWTE}} | ||
==Map Structure== | ==Map Structure== | ||
Line 53: | Line 53: | ||
**[[map_heights.hgt]] - not required but see notes below | **[[map_heights.hgt]] - not required but see notes below | ||
**[[map_heights.tga]] - 2 x map_regions size '''+1''' | **[[map_heights.tga]] - 2 x map_regions size '''+1''' | ||
− | **[[map_regions.tga]] - sets the size for other files | + | **[[map_regions.tga]] - sets the size for other files - the original games limit of 510 pixels max does not apply - largest working map to date has 1020 width |
**map_roughness.tga - 2 x map_regions size - required but doesn't appear to be used | **map_roughness.tga - 2 x map_regions size - required but doesn't appear to be used | ||
**map_trade_routes.tga - map_regions size - required but doesn't appear to be used | **map_trade_routes.tga - map_regions size - required but doesn't appear to be used | ||
Line 89: | Line 89: | ||
[[File:RR-mesh-components.jpg|300px|cas model components of a Rome Remastered 3D map]] | [[File:RR-mesh-components.jpg|300px|cas model components of a Rome Remastered 3D map]] | ||
− | Cas components can be converted to other formats for editing in Blender or 3dsMax, IWTE supports .cas to .dae functions, | + | Cas components can be converted to other formats for editing in Blender or 3dsMax, [[IWTE]] supports .cas to .dae functions, Feral's [https://github.com/FeralInteractive/romeremastered/tree/main/tools/CasPacker CasPacker tool] provides .cas to .fbx functions. Please be aware that these may operate at different scales/orientations so use the same tool for import and export. |
===Main Map Mesh=== | ===Main Map Mesh=== | ||
Line 95: | Line 95: | ||
====Text Files and Folder Structure==== | ====Text Files and Folder Structure==== | ||
− | + | For a mesh to be read from a mod folder some components and the text files must be in: | |
− | *'''data/terrain/campaign/CAMPAIGN_NAME/''' - where CAMPAIGN_NAME matches the name of your campaign folder in data/world/maps/campaign, so for a BI mod this would be barbarian_invasion, for Rome it would be imperial_campaign etc. | + | *'''data/terrain/campaign/CAMPAIGN_NAME/''' - where CAMPAIGN_NAME matches the name of your campaign folder in data/world/maps/campaign, so for a BI mod this would be barbarian_invasion, for Rome it would be imperial_campaign etc. The CAMPAIGN_NAME must be defined at '''"folder":'''in the mod's descr_campaigns.txt. |
*'''data/terrain/campaign/CAMPAIGN_NAME/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/CAMPAIGN_NAME/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/CAMPAIGN_NAME/descr_map_coastlines.txt ''' - text file lists cas file/s used for the surf coastline mesh | *'''data/terrain/campaign/CAMPAIGN_NAME/descr_map_coastlines.txt ''' - text file lists cas file/s used for the surf coastline mesh |
Latest revision as of 00:02, 8 September 2022
|
The underlying map structure in Total War: Rome Remastered is exactly the same as for the original game and can still be changed via text file and tga image alterations, however, the visual element of the campaign map is now provided by a separate 3D mesh and textures.
Options for creating a new 3d map mesh include:
- Feral's tool for sectioning and converting a mesh created in Blender see here
- IWTE which will generate mesh pieces and their textures from map_.tga files and ground_type textures see here
For general information see Total War: Rome Remastered - Modding
- For differences between Remastered files and RTW see File Differences - Rome Remastered
- For detail on changes needed to port existing maps see Porting a Mod to Rome Remastered, Mapping/Campaign Differences
IWTE |
---|
Useful Reference: |
Map Structure
Functional Map
The Rome Remastered map system uses the old RTW base map_*.tga and text file system to generate the functional map, this original system still controls:
- Coordinates of settlements and ports and starting position of characters and agents
- Region boundaries
- Which areas are sea, accessible land, or blocked land (deep forest/mountains)
- Locations of features, such as cliffs, volcanos and rivers, so far as they effect events and movement on the map.
- Heights, ground_types and climates as used to generate battle-maps at each coordinate (modified by the geography.db).
Visible 3D Campaign Map
The visible 3D campaign map is created separately and is NOT automatically generated or changed by changing the base map files, it has no effect on the battle-maps generated from a battle on the campaign map. The 3D campaign map comprises:
- Cas mesh pieces and textures
- Heightmap bin files generated from the mesh pieces (used to set heights for display of cas models)
- Cas models for trees, settlements and resources (as in original RTW)
- Cas model and textures for the frame
- Cas model for the coastline (uses the surf texture and has a wave motion applied)
- Cas model for the rivers (has a moving 'water' texture applied)
It is possible to load a functional map with a non-matched 3D map, however, this will be confusing to the player, and too large an area of additional map, including trees/settlements etc that need placement, without the appropriate heightmap bins generated from the mesh appears to cause an errorless CTD on loading.
2D map overview
Additionally, there is a 2D map overview section, which is displayed with the map fitted to screen size, the base images for it are the feral_map tga files in the campaign folder. The game generates overlays for this map view based on the game state and the functional map (e.g. boundaries are from map_regions.tga)
Functional Map Components
Any base map that loads under RTW should be capable of loading under RR including using the map.rwm from RTW. For general advice on making a Rome Total War map see the Mapping Index.
The files involved are basically the same as for RTW:
- In data/world/maps/base:
- descr_terrain.txt - must include width and height of map_regions.tga
- descr_regions.txt
- descr_disasters.txt - can be blank but leave comments in to avoid 0kb file breaking filelist manifest
- map_climates.tga - 2 x map_regions size +1
- map_FE.tga - variable size
- map_features.tga - map_regions size
- map_ground_types.tga - 2 x map_regions size +1
- map_heights.hgt - not required but see notes below
- map_heights.tga - 2 x map_regions size +1
- map_regions.tga - sets the size for other files - the original games limit of 510 pixels max does not apply - largest working map to date has 1020 width
- map_roughness.tga - 2 x map_regions size - required but doesn't appear to be used
- map_trade_routes.tga - map_regions size - required but doesn't appear to be used
- water_surface.tga - 256 x 256 - does not appear to be used in Remastered
- map.rwm - generated by the game if a map is loaded that does not have one
- In data/world/campaign/campaign_name:
- descr_events.txt - can be blank but leave comments in to avoid 0kb file breaking filelist manifest
- descr_mercenaries.txt
- descr_strat.txt - (a version of this file is also placed in data\original_overrides\resource_quantity\world\maps\campaign\imperial_campaign and is used if the user toggles resource setting to original)
- descr_win_conditions.txt
- feral_radar_map.tga and feral_radar_map_winter.tga - 1024 x 624
- description files and leader pictures
For provincial campaigns, or if desired to have different campaign map to custom battle maps you can copy the base folder files into the campaign folder.
- In data/text
- campaign_name_regions_and_settlement_names.txt - alternate language versions of this file will be required if different region/settlement names are used in the mod versus vanilla campaign
Differences from RTW
descr_strat.txt
The default descr_strat.txt used for 'remastered' settings has a quantity value specified for each resource, e.g.
resource marble, 3, 56, 62
which would give you one visible model but 3x the resource value to a merchant. This value is before the x/y coordinates so you need to add 1, here if you only want a single resource.
descr_win_conditions.txt
For hold_regions condition, the Settlement name must be used NOT the Region Name
map_heights.hgt
This is the same as in RTW, in case you've forgotten, you don't need to use a .hgt file the game will generate a map.rwm from just map_heights.tga, but the .hgt file can provided finer detail. However, if your map is the same size as the vanilla map in data/world/maps/base - then you either need your own .hgt file, or you will have to delete the base games' .hgt file - otherwise the game will just use that information instead of your map_heights.tga
3D Mesh Components
The components of the 3D mesh are .cas model files, the image below shows parts from the vanilla map including: the frame; some of the main mesh cas tile pieces; the coastline mesh; and the river mesh (highlighted).
Cas components can be converted to other formats for editing in Blender or 3dsMax, IWTE supports .cas to .dae functions, Feral's CasPacker tool provides .cas to .fbx functions. Please be aware that these may operate at different scales/orientations so use the same tool for import and export.
Main Map Mesh
The main map mesh comprises most of what you see in the 3D campaign map, its components are as follows:
Text Files and Folder Structure
For a mesh to be read from a mod folder some components and the text files must be in:
- data/terrain/campaign/CAMPAIGN_NAME/ - where CAMPAIGN_NAME matches the name of your campaign folder in data/world/maps/campaign, so for a BI mod this would be barbarian_invasion, for Rome it would be imperial_campaign etc. The CAMPAIGN_NAME must be defined at "folder":in the mod's descr_campaigns.txt.
- data/terrain/campaign/CAMPAIGN_NAME/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/CAMPAIGN_NAME/descr_map_coastlines.txt - text file lists cas file/s used for the surf coastline mesh
Campaign cas pieces
The pieces are in .cas format the location is specified in descr_map_tiles.txt.
The mesh is formed from these pieces joined together, the pieces should be rectangular and all at the same size. These mesh pieces are not automatically generated by the game so will not correspond with any changes made to the mapping .tga files unless you adapt them.
IWTE now provides a function to make appropriately contoured campaign cas pieces from your map_*.tga files, see IWTE - Rome Remastered Functions for details.
The vanilla pieces are numbered from 001 starting in the bottom right corner, 013 is in bottom left, 014 above 001 in next row starting on the right etc.
Heightmap bins
The .bin files are a list of heights relating to each mesh .cas piece in binary format. The location is specified in descr_map_tiles.txt. Typically they are in:
- data/terrain/campaign/CAMPAIGN_NAME/heightmap/
The game generates .bin files based on the height information in the mesh piece .cas files. This data is used to set the height of settlement, tree and resource models on the campaign map, and to set the 'ground level' that armies and agents stand on. Each heightmap .bin file generated comprises 40,401 float values representing height points, no x/y coordinates are given, so it is assumed that these are spread evenly over the cas piece area in a pre-set manner. Feral have confirmed that for the heightmap bin files to work properly all the mesh pieces must be rectangular and of exactly the same size.
Using a data\terrain\campaign\descr_map_tiles.txt file with differently named .cas and .bin files requested than exist either in the original game or mod-folder will trigger the game to write new .bin files, you need to provide the empty /heightmap folder or they can end up being written to your main game folder instead of the mod-folder!
Map Textures
File names and folder locations are specified in descr_map_tiles.txt. The textures do not need to be in separate folders per tile, if they are named with an appropriate system they can be placed in the same folder.
The textures provide individual colour and normal textures for each of the cas pieces, the cas pieces use conventional uv mapping so although the existing textures are mapped as though projected horizontally, you could theoretically alter this. All the land textures with the exception of the farming overlay need to be 'painted' onto each pieces' texture.
The textures used are .dds files, if they are supplied with mip-maps then the game changes which mip-map level it starts at according to the graphics quality settings as shown below. So for the 'low' quality setting with a 2048x 2048 sized dds file with mip-maps you will only ever see the 256 sized map, however closely you try to zoom in.
Game Engine Applied Textures
Region boundaries set by map_regions.tga are applied by the engine to the mesh surface partly using the routes/shape of rivers as generated by map_features.tga and using the overlay tile models specified in descr_aerial_map_tile_models.txt.
The farming overlay for fertile land is also applied in areas determined by the game engine.
Coastline
- data/terrain/campaign/CAMPAIGN_NAME/coastline/coastline.cas - typical location and name, but defined in descr_map_coastlines.txt
The coastline model gives the surface used for the waves/surf effect near the shoreline. data\terrain\aerial_map\sea\surf2b.tga.dds gives the colour and alpha effect for the wave but the movement of the wave appears to be hard-coded.
The wave effect will be visible on the coastline model even in areas where it is below the level of the terrain mesh. It is possible to have more than one coastline.cas mesh loaded if more are listed in the text file.
Rivers
- data/terrain/campaign/CAMPAIGN_NAME/river_mesh.cas - hardcoded name and location
This is the model used to display the rippling water surface of the rivers. It is not automatically generated by the game and will not change to suit your map_features.tga changes. Unfortunately, as the game does still use map_features.tga information to generate the region boundaries (with wide wiggles/bends), it is currently difficult if not impossible to get rivers and boundaries to align exactly. Altering descr_aerial_map_tile_models.txt to force the game to use the simpler 'straight' sections for line elements can reduce the anomaly.
The parts of the river cas model will only be visible if above the level of the terrain mesh.
3D Frame
- data/terrain/campaign/CAMPAIGN_NAME/frame - contains a cas model and textures for the 3d frame that hides the edges of the map, the textures are called from names within the .cas model, not from a text file.
Strat Models
These operate as in RTW with separate models for trees, resources and settlements, placed either by descr_strat.txt, map_regions.tga or according to ground type.
2D View Components
Large 2D Map
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:
- data\world\maps\campaign\imperial_campaign\feral_map.tga.dds - 4080 x 2496 size - seems to work best if 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.
The 'frame' seen in this view does not use the same textures as your model frame, this view uses parts of the textures in
- data/ui/culture/shared_new_extruded_0 and _1.tga
Mini Map
The mini map visible on the 3D View screen is based on:
- data\world\maps\campaign\imperial_campaign\feral_radar_map.tga - 1020 x 624 size
- data\world\maps\campaign\imperial_campaign\feral_radar_map_winter.tga - winter version as above