Empires Terrain: Difference between revisions
No edit summary |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= | = Empires Map and Terrain = | ||
== Creating a Scenario == | == Creating a Scenario == | ||
To create a new scenario, click Editor from | To create a new scenario, click Editor from Options Screen and then the quill (Create a brand new campaign) button from the scenario selection screen. Enter the scenario folder name and display name for the scenario. | ||
To use an existing map for this scenario, click Use map: <New Map> and choose a [[#BAM|BAM]] file. | To use an existing map for this scenario, click Use map: <New Map> and choose a [[#BAM|BAM]] file. | ||
Line 13: | Line 12: | ||
* Logical Map Width - this is how large the map will appear to be in game, it is independent of the resolution of the map textures | * Logical Map Width - this is how large the map will appear to be in game, it is independent of the resolution of the map textures | ||
* Logical Map Height - may be set smaller than the width to create a non-square map, the upper portion of the map textures will be used | * Logical Map Height - may be set smaller than the width to create a non-square map, the upper portion of the map textures will be used | ||
* Import Borders from SVG (Advanced) - optionally specify an SVG file that contains border polygons to create initial borders. Note: SVG importing ONLY supports a list of polygons indicating a list of bordered regions. There are many other ways a map could be constructed and saved in | * Import Borders from SVG (Advanced) - optionally specify an SVG file that contains border polygons to create initial borders. Note: SVG importing ONLY supports a list of polygons indicating a list of bordered regions. There are many other ways a map could be constructed and saved in an SVG that will not be imported, if you are planning to use SVG importing, be sure that your software and approach results in this particular format. | ||
If you have not imported borders, or wish to edit borders, choose Border mode from the upper left palette in the editor and follow the directions below the palette. | If you have not imported borders, or wish to edit borders, choose Border mode from the upper left palette in the editor and follow the directions below the palette. | ||
Line 19: | Line 18: | ||
Before a map can be played, you will also need to associate the bordered regions with entries in an existing Regions.CSV file located in the Data folder in either the current scenario folder or the game folder. Switch to the Region mode from the palette. When you select a region, the Region Properties panel will be displayed. To associate the region to a row in the table, select the row by name from the Template list. You may also need to add or remove connections between regions to allow movement on the map (importing an SVG automatically creates connections between regions which share two or more consecutive border points). This is also edited in the Region mode under Connections in the Region Properties panel. The anchor points within a region can also be edited, the meanings of the anchors are specified by script and can be used to indicate city location, army locations, etc. | Before a map can be played, you will also need to associate the bordered regions with entries in an existing Regions.CSV file located in the Data folder in either the current scenario folder or the game folder. Switch to the Region mode from the palette. When you select a region, the Region Properties panel will be displayed. To associate the region to a row in the table, select the row by name from the Template list. You may also need to add or remove connections between regions to allow movement on the map (importing an SVG automatically creates connections between regions which share two or more consecutive border points). This is also edited in the Region mode under Connections in the Region Properties panel. The anchor points within a region can also be edited, the meanings of the anchors are specified by script and can be used to indicate city location, army locations, etc. | ||
The Unit | The Unit mode and Scenario Properties modes of the editor are read-only modes displaying properties set by other CSV or script files. | ||
== Files == | == Files == | ||
Line 32: | Line 31: | ||
=== Map Image === | === Map Image === | ||
The map image is the base texture for the map and may be in any supported image format. The RGB channels of this texture determine the | The map image is the base texture for the map and may be in any supported image format. The RGB channels of this texture determine the color of the terrain (land and water). If the [[#Detail_Map|terrain detail shader]] is used, the alpha channel is used to indicate which regions of the map are treated as land and which are treated as water. Alpha 0 is water, alpha max is land. If a smoother transition is required, providing intermediate alpha values will fade out water or terrain detail effects. | ||
=== Height Map Image === | === Height Map Image === | ||
Line 39: | Line 38: | ||
=== Normal Map === | === Normal Map === | ||
Optional. Normal map applied over the entire map. The filename is based on the map image filename <map_image>_N.ext. It may be in any supported image format. | Optional. Normal map applied over the entire map. The filename is based on the map image filename <map_image>_N.ext. It may be in any supported image format. | ||
=== Detail Map === | === Detail Map === | ||
Line 59: | Line 55: | ||
Optional. Detail textures blended with the [[#Map_Image|global map image]] and [[#Normal_Map|global normal map]] to provide additional terrain detail at high zoom levels without requiring a massive map images. They are named detail0.tga to detail7.tga and detail0_N.tga to detail7_N.tga. Only tga format is supported. The detail textures are treated as greyscale images (only the red channel is used) and are tiled over the map image based on the [[#Detail_Map|detail map texture]] on land areas of the map. | Optional. Detail textures blended with the [[#Map_Image|global map image]] and [[#Normal_Map|global normal map]] to provide additional terrain detail at high zoom levels without requiring a massive map images. They are named detail0.tga to detail7.tga and detail0_N.tga to detail7_N.tga. Only tga format is supported. The detail textures are treated as greyscale images (only the red channel is used) and are tiled over the map image based on the [[#Detail_Map|detail map texture]] on land areas of the map. | ||
== | === Alternate Weather Image === | ||
To support very high resolution textures, the Map Image, Normal Map, Specular Map, and Height Map Images may be sliced into multiple tiles. The naming of these files is based on the untiled filename. The top-left corner has the same name as the untiled filename, the remaining files have the x and y coordinates appended with _x_y. For example, if the BAM specifies a map image texture of "map.dds", the 2x2 tiled versions are: | Optional. An alternate weather texture substituted for the [[#Map_Image|global map image]] based on gameplay values. The filename is based on the map image filename <map_image>_Weather.ext. | ||
=== CAMPAIGNVIEW.TXT === | |||
This file is located one level higher, in the shared or scenario Data folder. Refer to Data/CAMPAIGNVIEW.TXT in the game installation for reference. It allows several cosmetic changes to how the map is presented: | |||
* ZOOM: default camera zoom distance | |||
* ZOOMINLIMIT: closest camera zoom distance | |||
* ZOOMLIMIT: farthest camera zoom distance | |||
* CAMERAPITCH: camera pitch at the default zoom distance | |||
* CAMERAPITCHMIN: camera pitch at the closest zoom distance | |||
* CAMERAPITCHMAX: camera pitch at the farthest zoom distance, overrides CAMERAOVERHEAD | |||
* CAMERAOVERHEAD: zoom distance to set the camera to be looking straight down, if CAMERAPITCHMAX is NOT specified | |||
* FARPLANE: max draw distance | |||
* CLEARCOLOUR: clear color in hex behind the map | |||
* TERRAINSHADOW: non-0 to enable shadows cast by the terrain (useful if the Map Image doesn't contain prebaked shadows) | |||
* TERRAINSHINE: glossiness of the map (0 to 1) | |||
* OVERLAYWEIGHT: the strength of the map overlays (0 to 1) | |||
* BANNERSCALE: the scale of the army banners on the map | |||
* BANNEROFFSET: the distance (x and y) of the army banners from the army model | |||
* BARRERSTEP: the distance (x and y) between banners at the same anchor point | |||
* WORLDLIGHT: controls an ambient light (AMBIENT) and directional light (DIRECTION and COLOUR) for the map | |||
* CLOUD#: controls a layer of cloud shown over the map | |||
** COUNT: the number of clouds | |||
** MIN_HEIGHT: the bottom of the cloud layer | |||
** MAX_HEIGHT: the top of the cloud layer | |||
** SIZE: average size of each cloud | |||
** SPEED: average rotation speed of each cloud | |||
** VARIATION: amount of variation between clouds (0 to 1) | |||
** UNIFORM: if 0, the clouds are more dense near the edges of the map | |||
** TEXTURE: the texture containing the cloud images | |||
** ATLAS_SIZE: the number of images in TEXTURE to select from, vertically and horizontally (ie 2 means TEXTURE is a 2 x 2 atlas) | |||
* DECORATION#: specifies the name file (FILE), size (SIZE), position (ANCHOR), and spin speed and direction (SPIN) of the 'decorations' shown on the map using SetRegionDecoration (ex objective markers) | |||
* ROADS | |||
** ANCHOR: which anchor point within the regions the road network goes through | |||
** SIZE: the width of the roads in the road network overlay | |||
** REQUIRED_TRANSPORT: the minimum TRANSPORT level in a pair of connected regions required to draw a road in the network overlay | |||
* CITIES | |||
** ANCHOR: which anchor point within the regions the city is drawn at | |||
** SIZE: the scale for the city models | |||
== Slicing == | |||
Experimental. To support very high resolution textures, the Map Image, Normal Map, Specular Map, and Height Map Images may be sliced into multiple tiles. The naming of these files is based on the untiled filename. The top-left corner has the same name as the untiled filename, the remaining files have the x and y coordinates appended with _x_y. For example, if the BAM specifies a map image texture of "map.dds", the 2x2 tiled versions are: | |||
* map.dds: top left (0,0) | * map.dds: top left (0,0) | ||
* map_0_1.dds: lower left (0,1) | * map_0_1.dds: lower left (0,1) | ||
Line 66: | Line 102: | ||
* map_1_1.dds: lower right (1,1) | * map_1_1.dds: lower right (1,1) | ||
If | If slicing is used, Map Image, Normal Map, Specular Map, and Alternate Weather Image must all use the same number of tiles. Height Map Image tiling is independent. |
Latest revision as of 20:56, 8 July 2019
Empires Map and Terrain
Creating a Scenario
To create a new scenario, click Editor from Options Screen and then the quill (Create a brand new campaign) button from the scenario selection screen. Enter the scenario folder name and display name for the scenario.
To use an existing map for this scenario, click Use map: <New Map> and choose a BAM file.
To create a new map, specify the following:
- Map Image
- Height Map Image
- Height Scale - a multiplier applied to the height map values
- Logical Map Width - this is how large the map will appear to be in game, it is independent of the resolution of the map textures
- Logical Map Height - may be set smaller than the width to create a non-square map, the upper portion of the map textures will be used
- Import Borders from SVG (Advanced) - optionally specify an SVG file that contains border polygons to create initial borders. Note: SVG importing ONLY supports a list of polygons indicating a list of bordered regions. There are many other ways a map could be constructed and saved in an SVG that will not be imported, if you are planning to use SVG importing, be sure that your software and approach results in this particular format.
If you have not imported borders, or wish to edit borders, choose Border mode from the upper left palette in the editor and follow the directions below the palette.
Before a map can be played, you will also need to associate the bordered regions with entries in an existing Regions.CSV file located in the Data folder in either the current scenario folder or the game folder. Switch to the Region mode from the palette. When you select a region, the Region Properties panel will be displayed. To associate the region to a row in the table, select the row by name from the Template list. You may also need to add or remove connections between regions to allow movement on the map (importing an SVG automatically creates connections between regions which share two or more consecutive border points). This is also edited in the Region mode under Connections in the Region Properties panel. The anchor points within a region can also be edited, the meanings of the anchors are specified by script and can be used to indicate city location, army locations, etc.
The Unit mode and Scenario Properties modes of the editor are read-only modes displaying properties set by other CSV or script files.
Files
Unless otherwise specified, all map related files are located in either the Data/Maps folder within the current scenario folder (highest priority) or in the Data/Maps folder of the game folder (in which case they may be shared by multiple scenarios).
SCENARIO.TXT
Each scenario requires a SCENARIO.TXT file in its root folder. This file contains an entry which specifies which BAM file to use as the map for the scenario. It is created automatically when a scenario is created in the editor, and may be edited manually if required.
BAM
The BAM file contains the map data. It is created automatically by the editor. Some fields in the [MAP] chunk of the file corresponding to the new map settings in Scenario Creation may be safely edited by hand. Otherwise, the editor will normally be used to edit this file.
Map Image
The map image is the base texture for the map and may be in any supported image format. The RGB channels of this texture determine the color of the terrain (land and water). If the terrain detail shader is used, the alpha channel is used to indicate which regions of the map are treated as land and which are treated as water. Alpha 0 is water, alpha max is land. If a smoother transition is required, providing intermediate alpha values will fade out water or terrain detail effects.
Height Map Image
The height map image is used to determine the height values for the terrain. It may be either a 32 bit TGA file (height is taken from the blue channel) or a RAW file.
Normal Map
Optional. Normal map applied over the entire map. The filename is based on the map image filename <map_image>_N.ext. It may be in any supported image format.
Detail Map
Optional, requires a normal and specular map. A map of the terrain detail textures to be applied over the entire map. The filename is based on the map image filename <map_image>_D.ext. It may be in any supported image format (although good results may require an uncompressed format). The red channel of the texture is used to indicate which of 8 detail textures to use.
- detail0: Red values 0 to 17 / 255
- detail1: Red values 18 to 53 / 255
- detail2: Red values 54 to 91 / 255
- detail3: Red values 92 to 127 / 255
- detail4: Red values 128 to 163 / 255
- detail5: Red values 164 to 201 / 255
- detail6: Red values 202 to 237 / 255
- detail7: Red values 238 to 255 / 255
For best results and performance, detail0 - detail3 should be exactly the same resolution and detail4 - detail7 should be exactly the same resolution.
Detail Textures
Optional. Detail textures blended with the global map image and global normal map to provide additional terrain detail at high zoom levels without requiring a massive map images. They are named detail0.tga to detail7.tga and detail0_N.tga to detail7_N.tga. Only tga format is supported. The detail textures are treated as greyscale images (only the red channel is used) and are tiled over the map image based on the detail map texture on land areas of the map.
Alternate Weather Image
Optional. An alternate weather texture substituted for the global map image based on gameplay values. The filename is based on the map image filename <map_image>_Weather.ext.
CAMPAIGNVIEW.TXT
This file is located one level higher, in the shared or scenario Data folder. Refer to Data/CAMPAIGNVIEW.TXT in the game installation for reference. It allows several cosmetic changes to how the map is presented:
- ZOOM: default camera zoom distance
- ZOOMINLIMIT: closest camera zoom distance
- ZOOMLIMIT: farthest camera zoom distance
- CAMERAPITCH: camera pitch at the default zoom distance
- CAMERAPITCHMIN: camera pitch at the closest zoom distance
- CAMERAPITCHMAX: camera pitch at the farthest zoom distance, overrides CAMERAOVERHEAD
- CAMERAOVERHEAD: zoom distance to set the camera to be looking straight down, if CAMERAPITCHMAX is NOT specified
- FARPLANE: max draw distance
- CLEARCOLOUR: clear color in hex behind the map
- TERRAINSHADOW: non-0 to enable shadows cast by the terrain (useful if the Map Image doesn't contain prebaked shadows)
- TERRAINSHINE: glossiness of the map (0 to 1)
- OVERLAYWEIGHT: the strength of the map overlays (0 to 1)
- BANNERSCALE: the scale of the army banners on the map
- BANNEROFFSET: the distance (x and y) of the army banners from the army model
- BARRERSTEP: the distance (x and y) between banners at the same anchor point
- WORLDLIGHT: controls an ambient light (AMBIENT) and directional light (DIRECTION and COLOUR) for the map
- CLOUD#: controls a layer of cloud shown over the map
- COUNT: the number of clouds
- MIN_HEIGHT: the bottom of the cloud layer
- MAX_HEIGHT: the top of the cloud layer
- SIZE: average size of each cloud
- SPEED: average rotation speed of each cloud
- VARIATION: amount of variation between clouds (0 to 1)
- UNIFORM: if 0, the clouds are more dense near the edges of the map
- TEXTURE: the texture containing the cloud images
- ATLAS_SIZE: the number of images in TEXTURE to select from, vertically and horizontally (ie 2 means TEXTURE is a 2 x 2 atlas)
- DECORATION#: specifies the name file (FILE), size (SIZE), position (ANCHOR), and spin speed and direction (SPIN) of the 'decorations' shown on the map using SetRegionDecoration (ex objective markers)
- ROADS
- ANCHOR: which anchor point within the regions the road network goes through
- SIZE: the width of the roads in the road network overlay
- REQUIRED_TRANSPORT: the minimum TRANSPORT level in a pair of connected regions required to draw a road in the network overlay
- CITIES
- ANCHOR: which anchor point within the regions the city is drawn at
- SIZE: the scale for the city models
Slicing
Experimental. To support very high resolution textures, the Map Image, Normal Map, Specular Map, and Height Map Images may be sliced into multiple tiles. The naming of these files is based on the untiled filename. The top-left corner has the same name as the untiled filename, the remaining files have the x and y coordinates appended with _x_y. For example, if the BAM specifies a map image texture of "map.dds", the 2x2 tiled versions are:
- map.dds: top left (0,0)
- map_0_1.dds: lower left (0,1)
- map_1_0.dds: upper right (1,0)
- map_1_1.dds: lower right (1,1)
If slicing is used, Map Image, Normal Map, Specular Map, and Alternate Weather Image must all use the same number of tiles. Height Map Image tiling is independent.