Map grid, when you look at M map view you see the grid and coordinates by default in letters and numbers.
This can be changed and we have long time done it in OFP mods to change the letter/number to a 6-digit military grid system.
class Zoom0 and Zoom1 etc - levels of the zoom.
offsetX - offsets to the lat & long values.
Below here is a six digit military grid config:
Code: Select all
// 6 digit military grid
class Grid
{
offsetX = 0;
offsetY = 25600;
class Zoom1
{
zoomMax = 0.2;
format = "XY";
formatX = "000";
formatY = "000";
stepX = 100;
stepY = -100;
};
class Zoom2
{
zoomMax = 1;
format = "XY";
formatX = "00";
formatY = "00";
stepX = 1000;
stepY = -1000;
};
};
CUSTOM MAP GRID
If you want to make your OFP map (map view, with M key, or mission editor) to have custom zoom levels or letters & digits in the grid coordinates, then you must tweak the island config.cpp to suit the needs or you can use the defaults provided in the Island Config.cpp part of this manual, also the same config.cpp files can be found on the Example_Configs directories.
This is the usual map view we have seen on the OFP mission editing and in game while playing and using M key to view the map. Btw don’t you hate when people call themselves “MAPPERS” when they do missions and call the missions a “MAPS”, heh always gives me laughs when I see these guys! But anyways…
The map grid coordinates tell you where you are in the island terrain, it is essential that these values are correctly setup in the config.cpp so there will be no errors while playing the game. It is possible to setup the config.cpp wrongly to give false readings or at least terribly confusing readings along the fact that the zoom level could be extremely limited.
Zoom Level Resolutions
In the zoom levels there are different resolutions, when these resolutions change you can see the effect on the map grid letters and digits related how the config.cpp has been written. The highest resolution or zoom level is called Zoom0 in the config.cpp, this zoom level allows a string of three characters to name the grid position. The Zoom class with the highest resolution must be the first in the class Grid part, the remaining lower level zoom classes must follow in descending order. There can be as many zoom level classes as needed.
Let’s see the basic zoom levels.
Code: Select all
class Grid
{
offsetX=0;
offsetY=0;
class Zoom1
{
zoomMax=0.200000;
format="XY";
formatX="Aa";
formatY="00";
stepX=128;
stepY=128;
};
class Zoom2
{
zoomMax=1000000015047466219900000000000.000000;
format="XY";
formatX="A";
formatY="0";
stepX=1280;
stepY=1280;
};
};
offsetX and offsetY
Offset of the whole grid system in meters, referred to the (North West) origin.
zoomMax
Point when the resolution switches from one class to the next one. Lowest value on top of the list and highest value in the bottom class. Values higher than 1 have no significant effect. Zoom classes, which do follow a Zoom class with ZoomMax still higher than 1, will be omitted.
format
Defines an orthogonal grid system (XY axis).
formatX and formatY
String to define the grid labels (grid counter). The counter accepts numbers and letters of any length and combinations. Special symbols are allowed as separators. Counter can be set to any start value. CONSTRAINT: The string length from the most upper Zoom class is limited to a number of three, when used with a speaker (else, running program may abort).
stepX and stepY
Defines the resolution (distance between grid lines) measured in meters
(example on how to reverse the northing: stepY = -1 * 100).
Example Four Level Zoom
This is nice and useful example of the four level zoom for map grids. It uses digits in the letters, but you can configure it as you please.
Code: Select all
class Grid
{
offsetX=0;
offsetY=2800;
class Zoom0
{
zoomMax=0.002;
format="XY";
formatX="000";
formatY="000";
stepX=1;
stepY=-1*1;
};
class Zoom1
{
zoomMax=0.02;
format="XY";
formatX="000-";
formatY="000-";
stepX=10;
stepY=-1*10;
};
class Zoom2
{
zoomMax=0.2;
format="XY";
formatX="00--";
formatY="00--";
stepX=100;
stepY=-1*100;
};
class Zoom3
{
zoomMax=2.0;
format="XY";
formatX="0---";
formatY="0---";
stepX=1000;
stepY=-1*1000;
};
};
Map Grid Color
The normal OFP map grid color used for the grid lines and characters & digits is the grayish color. This can be changed from the config.cpp by using the following example.
Code: Select all
colorGrid[]={0,0,1,1};
colorGridMap[]={0,0,1,1};