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.

Map regions.tga

From TWC Wiki
Revision as of 11:59, 15 April 2007 by Makanyane (talk | contribs)
Jump to navigationJump to search

The map_regions.tga is the map file that controls the borders of regions and determines city and port locations on the campaign map. Map_regions.tga will be found in the data/world/maps/base folder of a vanilla installation, it may also be placed in the data/world/maps/campaign/campaign_name folder if the other map files are copied there as well.


Map regions.jpg

Fig1. Enlarged section of vanilla BI map_regions.tga


The location of cities is set by a one black (RGB = 0,0,0) pixel. The location of ports is set by one white (RGB = 255,255,255) pixel. There can be only one city and port per region.

The colour of each region must be unique and the correct RGB colour reference for it included in descr_regions.txt.

The blue areas (mainly RGB 41,140,233) not assigned to a region represent the sea areas, please note that they do not actually determine the area of sea that will appear in the campaign map. The coastline shown on map_heights.tga will overrule the one shown on map_regions.tga if there is any mismatch. In RTW and BI (not M2TW) a corrected_regions.tga is generated to show how game has interpreted mis-match.

Editing map_regions.tga

The colour of any added region must be unique and exactly match the RGB value given for the region in descr_regions.txt.

Theoretically you can use any unique colour for a region, though some people have reported difficulties with specific colours. There is no agreed information as to whether any specific colours do not work - it is quite likely though that there could be a problem with using a colour that is very close to another.

When editing the map_regions.tga you must be very careful not to get merged colours - this will result in colours being present in the tga that are not assigned to water, city, port or known region as listed in descr_regions.txt. Merging can occur if you use wrong sort of re-size method, or wrong sort of 'brush'. In PaintShopPro use the 'pixel re-size' method and make sure brush has 'none' as texture setting, 100% opacity, density, and hardness. In PhotoShop use 'nearest neighbour' re-size option and crayon/pencil instead of brush.

If you know how many regions you should have a useful check (available in PaintShopPro and possibly other programs) is to use the 'count colours used' function. Number of colours should equal: number of regions + number of sea colours + city colour + port colour (if you have port pixels) max number of individual colours on map should never exceed 202. If it does you have either got merged colours or too many regions (see below)

Sea Colours

The majority of the sea colour in the vanilla map_regions.tga files is RGB 41,140,233 but the separated areas of sea (Caspian, Red and Dead Seas) have very slightly different colours. Unlike for the regions the sea colours are not referenced in another text file. What game will accept appears to be determined by hard-coding, so use of different colours is subject to experimentation.

It is now thought that the difference in colours is necessary to prevent ships in the smaller separated seas trying to find paths to the larger sea area and getting 'stuck' along the coastline facing the bigger sea area. See here for discussion. However using different colours for the separated sea areas appears to reduce the number of regions you can have. The theoretical maximum number of provinces is 200 but it appears to work that:
total of (different coloured) sea areas + land regions = 200 regions max

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