CfgWorlds: Island class & others

Most islands set up the island class (the class which is named after the island) by stubbing the DefaultWorld class, having CAWorld inherit from DefaultWorld, and then having the island class inherit from CAWorld. Given that CA is BIS' "namespace" (or whatever you wish to call it), I don't know if it's a good idea to have custom islands inherit from it, but it shouldn't matter.

This is how it looks in the config:

class CfgWorlds {
    class DefaultClutter {
        scaleMin = 0.9;
        scaleMax = 1.4;
    };
   
    class DefaultWorld;
    class CAWorld : DefaultWorld {};
    class SampleMap : CAWorld {

DefaultClutter is usually stubbed here, it is used later in the clutter section. Chernarus does some things different from SampleMap, namely defining the Weather class under DefaultWorld and defining a series of classes relating to lighting, clutter, and weather under CAWorld when inheriting from DefaultWorld.

After that come the contents of the island class, which are usually the most important, user-serviceable values (these are taken from Chernarus, obviously):

  access = 3;
  worldId = 4;
  cutscenes[] = {"ChernarusIntro1"};
  description = "$STR_DN_CHERNARUS";
  icon = "";
  worldName = "\ca\chernarus\chernarus.wrp";
  pictureMap = "";
  pictureShot = "\ca\chernarus\data\ui_selectisland_chernarus_ca.paa";
  plateFormat = "ML$ - #####";
  plateLetters = "ABCDEGHIKLMNOPRSTVXZ";
  longitude = 30;
  latitude = -45;

access is, I believe, set to 3 here for "ReadOnlyVerified", as in the definitions from SampleMap, but I don't know what this does.

worldId sounds simple enough but I don't know what logic BI uses to number their islands, nor whether this has any practical effects.

cutscenes[] are, as far as I know the demos which play behind the main menu when that island is loaded.

description is self-explanatory, I believe this is the name shown in the island list for this island. In Chernarus' case it points to a value in a stringtable somewhere for localization purposes.

icon is left empty for Chernarus but I have seen custom islands using them for branding, they will show up by the island name in the ingame island list.

worldName is important, this should always point to the .wrp file for the island.

pictureMap I'm not sure about, it may be a legacy variable from OFP(?).

pictureShot is the banner which is displayed when selecting the island in the ingame island list.

plateFormat I am also not sure about, I am guessing plate implies a relation to maps or the tiles generated from the satellite/texture mask images, but this might also be just an internal, irrelevant variable.

plateLetters is almost certainly related to the above, no idea what this does.

longitude and latitude determine the "real world" position of the island, I assume this is used to calculate the position of stars on the skybox, the sun and moon's paths (and consequently sunrise and sunset times), and possibly tides. According to the SampleMap notes, for longitude, positive is east; for latitude, positive is south.

After these variables comes the Grid class, which defines the ingame map grid.

        class Grid : Grid
        {
            offsetX = 0;
            offsetY = -15360;
            class Zoom1
            {
                zoomMax = 0.5;
                format = "XY";
                formatX = "Aa";
                formatY = "00";
                stepX = 200;
                stepY = 200;
            };
            class Zoom2
            {
                zoomMax = 1e30;
                format = "XY";
                formatX = "A";
                formatY = "0";
                stepX = 2000;
                stepY = 2000;
            };
        };

offsetX and offsetY are fairly easy to understand, these presumably define the grid's offset relative to the map edges.

The Zoom1 and Zoom2 classes, I believe, are related to the two different grids shown ingame - the 1km and 100m grids (or in this case, 2km and 200m grids, it looks like). I should be able to explain this better once I can track down the relevant threads. Takistan and Chernarus also have a Zoom3 class which kicks in when the map view spans the whole map; it has grid lines at 10km intervals.

Next are the default settings for this island in the editor, these are self-explanatory.

        startTime = 8:30;
        startDate = 01/05/1985;
        startWeather = 0.1;
        startFog = 0.0;
        forecastWeather = 0.3;
        forecastFog = 0.0;

The values for weather and fog are presumably the same as the ones you can set in the editor via the mission condition sliders.

A couple of positions follow.

        seagullPos[] = {1272.842,150.000,14034.962};
        //default center position
        centerPosition[] = {2500,2500,300};

seagullPos[] should be the position where seagulls spawn when a player joins a server with no JIP enabled. I don't know if actually works like this, but it's a good idea to set this to be over a landmass of some sort as it's rather annoying to join as a seagull and be at a corner of the map, usually over the ocean and with no idea where to go.

centerPosition[] should be the position which the editor will focus on when starting up; it might possibly be used for other things as the "default" position, I'm not sure.

After that, there is the ILS definition(s) and a few classes with no obvious purpose.

        // landing place - airport
        ilsPosition[] ={2545,3000};
        ilsDirection[] ={0,0.08,1};
        ilsTaxiIn[]= {2495,2725, 2495,2850,  2508,2860, 2508,3000, 2520,3010, 2545,3000};
        ilsTaxiOff[]= {2545,2445,2520,2425,2495,2445,2495,2725};
        drawTaxiway=false;
    class ReplaceObjects {};
    // sound sources
    class Sounds
    {
        sounds[]={};
    };
    class Animation
    {
      vehicles[]={};
    }; // default - no film

Check this thread for information on setting up runways with ILS, and this resource at OFPEC (check here for the zip with the ilsDirection.xls calculator). See below for what an example ILS setup looks like when plotted on the map.

Apart from that not much of the rest looks useful. I don't know what ReplaceObjects does and Sounds and Animation are probably required by the engine as they are basically stubs here.

Note that on Chernarus and Takistan another class is defined here, SecondaryAirports (right before ReplaceObjects):

  class SecondaryAirports
  {
   class ChernarusAirstrip1
   {
    ilsPosition[] = {12461,12585};
    ilsDirection[] = {0.9396,0.08,-0.342};
    ilsTaxiIn[] = {12125.9,12669.3,12435.5,12562.1,12442,12561,12447,12564,12453.3,12575.2,12454.3,12581,12451.4,12586};
    ilsTaxiOff[] = {12204.4,12681.9,11812.1,12824.1,11804.1,12824.4,11797.8,12818.8,11790.9,12801.5,11790.6,12793.6,11796.6,12788.6,12125.9,12669.3};
    drawTaxiway = 0;
   };
   class ChernarusAirstrip2
   {
    ilsPosition[] = {5223,2220.5};
    ilsDirection[] = {0.866,0.08,-0.5};
    ilsTaxiIn[] = {5009.9,2374.2,5240.3,2243.2,5243.3,2238.4,5242.7,2232.1,5235.9,2221.1,5229.7,2216.6,5221.5,2217.3};
    ilsTaxiOff[] = {5070,2308,4640.8,2551.9,4638.3,2557,4639.3,2563.3,4646.5,2573.9,4651.3,2578.5,4658.5,2577.9,5009.9,2374.2};
    drawTaxiway = 0;
   };
  };

This how the above points from ChernarusAirstrip1 (Krasnostav airfield) look like plotted on the map. Numbers represent the points' place in the array, starting at 0.

ilsTaxiOn, ilsPosition

ilsTaxiOff

These arrays of points basically define a course, starting on the taxiway and going to the center of the runway in the case of ilsTaxiOn, and starting on the runway and going to the taxiway in the case of ilsTaxiOff.