OpenGeneral can use a background image to show the map or can set up an internal image made of
tiles (tiled-map) when loading games.
The map image can be read in any of these formats: PNG, JPG, SHP or S16.
When a map picture is defined (not tiled-map) and is missing, OpenGeneral will try to download from a web repository automatically,
and if not possible will set up a tiled-map.
Map pictures normally use a number as the filename (.png/jpg) , because that is the way
Gilestiel's MapFinder stores them in its database.
Gilestiel MapFinder is a terrific map database, hosting all maps made by
map-makers along the years, providing many options to filter maps by country,
type, author, etc..
Every time a map-maker releases a new map, MapFinder is updated so designers and players can be sure that there,
they can find any of the existing maps.
OpenGeneral allows any filename up to 20 chars, but these maps won't be found in MapFinder
Maps for "New" formats (.xscn and .xsav/.xcsv/.xeml)
For new formats all map data is included in scenario/save game data, thus scenario already knows which image (if any) it should be loaded.
Extended Map definition files (.mapx) can be used for designers, including all map data not related with scenario (terrain, roads, ...), but are not used by the game.
How maps are searched...
When game needs to load a .MAP file, it is searched using this sequence:
- EFile's SCENARIO subfolder is searched. So any modified map file can override any standard one
- If not found, Main game's MAP subfolder is searched.
- If not found, and there is a Main game's MAPFILES subfolder then it is searched there.
- If still not found thn it is searched in the Main game SCENARIO subfolder (if it exist).>
- Then game will try to download from Internet, although probably not aevery custom made .MAP file will be found.
- Then game will prompt you to browse and pick one
To load the map image, game searches using this sequence (if not defined as tiled-map):
- EFile's MAP sub-folder is searched, first as PNG and then as JPG
- If not found, EFile's SCENARIO sub-folder is searched, first as PNG and then as JPG
- If not found, Main game's MAP sub-folder is searched, first as PNG and then as JPG
- If not found or cannot be loaded and a number can be figured in the filename, it is searched as PG2's MAP*.shp in Main game's MAP sub-folder
- If yet not found, game tries to download as JPG from OpenGen web repository
- And if yet not found, game sets up as a tiled-map
If you want to be sure that you have all maps required for a campaign, there is an option when picking a campaign to check
only (will get a list of the missing maps) or to check and download from the web repository all missing maps required.
At any time you cannot access OpenGeneral web repository, you can use the list of missing maps to download them manually,
by entering Gilestiel's MapFinder.
Maps can also be made dynamically by using "tilesets". There are 2 versions: Tiles 1.0 and Tiles 2.0.
A "tileset" is the set of files defining the pictures to draw the map dynamically. All png files should be made using same 256 colors palette.
For Tiles 1.0 these files are:
- Hex_tiles.png: has 19 rows (one for each terrain type) and 3 columns (one for each ground condition). each image is 60x50 pixels (width x height)
- Hex_tiles_sides.png: also 19 rows / 3 columns, but image size 30x25 pixels (width x height). 'Sides' are painted to fill tha gaps between some terrains, breaking somehow the repetitive visual pattern when maps include many same terrain adjacent
- Hex_layers.png: has 7 rows / 6 columns with images 60x50 pixels (width x height). It is used to paint, rivers, roads, rails, ports and coastal
For Tiles 2.0 these files are:
- Hex_tiledecors.cfg: a text file including options to configure how the tiled-map should be painted.
See Config Tiles 2.0 for details
This file can define two new concepts:
- 'Adjacency': when a terrain (say a city) is adjacent to other cities, the image to paint will be selected depending how many similar terrain is adjacent: if none; if 1-3; or if 4-6;
- 'Random decorations': instead of using same image for all hexes having a terrain, images will be randomly picked among a set defined for that terrain.
- Hex_tiledecors.png: has 57 rows x 15 columns by default, although can be made with only 12 columns or with more than 15.
Each terrain will pick the image from 1 of 3 consecutive rows (one for each ground condition) using one column depending settings defined.
This is the layout of columns in file and a short reference about how they are used:
'Sides' are painted this way :
- Col#1 (T0) will be used as default tile for every terrain/ground (same than current terrain-tile in current hex_tiles.png).
- Col#4,5,6 (S01,S02,S03) will be used to paint 'sides' if Col#1 is used to paint terrain. (replace Tiles 1.0 'sides', but using a different tile for each side).
- If 'adjacency' is defined in .CFG file:
- Col#1,2,3 (T0,T1,T2) will be used to paint terrain according how many adjacent hexes of same terrain type
- Col#4,5,6 (S01,S02,S03) will be used to paint 'sides' if Col#1 is used
- Col#7,8,9 (S11,S12,S13) will be used to paint sides if Col#2
- Col#10,11,12 (S21,S22,S23) will be used to paint sides if Col#3
- If 'random decorations' is defined in .CFG file and 'adjacency' is not, then
Col#7..last (R1..Last) will be used to paint randomly selected image for terrain
- If both 'random decorations' and 'adjacency' are defined then
Col#13..last (R7..Last) will be used to paint randomly selected image for terrain
- Hex_layers.png: has 7 rows and 6/18 columns, with images 60x50 pixels (width x height), same concept than 1.0 but can include 12 additional columns, to make different layers for different ground condition
Png files can add a number (i.e Hex_tiledecors3.png + Hex_layers3.png for latitude 3 scenarios) to be used only for scenarios using that number latitude (both versions)
OpenGen will use automatically Tiles 2.0 as far as it finds Hex_tiledecors.cfg in the Efile folder OPENGUI and can find also Hex_tiledecors.png either in Efile folder OPENGUI or main OPENGUI folder. So for any efile to use Tiles 2.0 the only requirement would be to have Hex_tiledecors.png in main OPENGUI folder (which is made by installer) and to copy Hex_tiledecors.cfg in the efile folder OPENGUI. To keep using Tiles 1.0 only need assure there is no Hex_tiledecors.cfg in efile's OPENGUI folder.
Tiled-maps are not so beautiful as image based, but they have other advantages:
- Tiled maps are much faster to design than drawing a map picture, and then defining map data.
- Tiled maps always show the true terrain. Map images are sometimes ambiguous regarding the terrain they represent
- Tiled maps shows different aspect according ground condition, and change their look when ground condition changes in game
- Efile designers can make different "tilesets" for different climate zones.
If you want to know how to design a tiled map check How to create a tiled map written by
Csaba Zsadányi-Nagy, who is using tiled-maps for most of his campaigns.
Maps size limits
Maps can be made up to 5400 x 5500 pixels (110 rows by 121 columns), but only maps up to 3150 x 3000 pixels will be available for automatic download
and uploaded to MapFinder. Maps bigger than that should be made as tiled-maps or put into EFolder's MAP subdirectory
and delivery with the campaign pack.
Actually each hex is 45 wide per 50 height due to offset of even/odd columns.
Thus 100 rows (0..99) require 100*50 pixels, while 100 columns (0..99) require 99*45, because first column (#0) doesn't count regarding size in pixels.
And current limit (110 rows by 121 cols) translate to pixels as:
- Width: 120 cols * 45 px = 5400 pixels (showing only 45 pixels for last column)
- Height: 110 rows* 50 px = 5500 pixels