CfgWorlds: Names

The Names class is usually at the bottom of CfgWorlds and defines several things: town names, toponyms and icons displayed on the ingame map, and BIS_fnc_locations areas (which I believe are used to help AI understand the map better). These areas can also be defined in Visitor 3, via the "named areas" feature.

In the BISampleMap the contents of this class are #included from a .hpp file. This file is generated by Visitor 3 when exporting the .wrp, and the .hpp file is named after the PEW filename. It should be #included into the Names class to work properly. Geographical names can be placed in V3 with the "Key points" feature (F4). Unfortunately, the Visitor 3 distribution is missing a critical file for this feature to be functional, KPtypes.dat. Check here for the solution to this problem. You must create a file, KPtypes.dat, in the Visitor 3 folder with the following contents:

Hill
BorderCrossing
VegetationBroadleaf
VegetationFir
VegetationPalm
VegetationVineyard
NameMarine
NameCityCapital
NameCity
NameVillage
NameLocal
RockArea
ViewPoint

This will allow you to use the "Key points" feature to place names directly in V3.

The following is a snippet from the Chernarus config.

  class Names
  {
   class city_Chernogorsk
   {
    name = "$STR_LOCATION_CHERNOGORSK";
    position[] = {6731.21,2554.13};
    type = "NameCityCapital";
    speech[] = {"Chernogorsk"};
    radiusA = 300.0;
    radiusB = 300.0;
    angle = 0.0;
   };
};

This defines the map label for Chernogorsk. Each entry under the Names class is a different name, area or symbol.

name is the name that will be shown on the map. In the case of Chernogorsk, it points to a stringtable entry. I was surprised to find that Unicode is actually supported here (though the entire config must be encoded in Unicode), and the ingame font is remarkably complete, including grave and acute accented letters, macrons, etc. See below for a few examples.

position[] is obviously the 3D position of this point.

type is the type of entry this is. There are a series of these, and this can be anything from city names to vegetation icons and BIS_fnc_locations areas (which do not display on the map). These (except for the BIS_fnc_locations areas) are defined in ui.pbo\ca\ui\config.bin. See the bottom of this page for a list, and how to add custom map icons.

speech[] is the sound associated with this entry. These are defined in dubbing.pbo\ca\dubbing\config.bin, but are unlikely to be of any use in custom islands.

radiusA and radiusB are presumably how far this area extends from the center point. This is probably only useful for BIS_fnc_locations areas.

angle is self-explanatory, though the purpose of this is not obvious. Read the threads linked below for speculation on whether this applies to BIS_fnc_locations areas.

See also this page, this thread, this other thread and these wiki pages for more information on BIS_fnc_locations areas.

To add custom map icons, all that is needed is to add an entry to the CfgLocationTypes class in the island config.bin. For instance:

class CfgLocationTypes
{
 class TestIcon
 {
  name = "";
  drawStyle = "icon";
  texture = "testIsland\data\icons\testIcon.paa";
  color[] = {0.05,0.4,0.8,0.8};
  font = "Zeppelin33Italic";
  size = 16;
  shadow = 0;
  textSize = 0.05;
  importance = 1;
 };
};

These attributes should all be fairly easy to understand. "texture" would be the path to your icon, for instance a 256x256px .paa file. The icons found in ui.pbo\ca\ui\data are monochrome, so I assume the color attribute tints them. The classes defined inside CfgLocationTypes can then be used in Names just like all the others. It seems UTF-8 encoded configs will work fine, so you can have accented characters in place names as long as the ingame font has them. Thanks to Mondkalb and his Celle island for helping me figure this out.

List of CfgLocationTypes

Mount
Name
NameMarine : Name
NameCityCapital : Name
NameLocal : Name
Hill : Name
ViewPoint : Hill
RockArea : Hill
BorderCrossing : Hill
VegetationBroadleaf : Hill
VegetationFir : Hill
VegetationPalm : Hill
VegetationVineyard : Hill
Strategic : Name
CityCenter : Strategic
fakeTown : Name

Example names with diacritics, viewed in the ingame map. Persian, Greek and French toponyms with macrons, graves and acutes.