Skip to content

Settings Framework

Nicholas edited this page Mar 28, 2017 · 6 revisions

Load Order

This framework allows server admins and mission designers to change the default mod config settings. There are five layers to the settings framework and each layer overwrites the preceding layer. For simplicity, most settings are only adjustable at the CBA Settings layer.

  1. mod config (default settings)
  2. server config
  3. mission config
  4. mission parameters
  5. cba settings

Using CBA Settings

More information on CBA's settings framework is located here.

Community Based Addon's settings system allows server admins and mission designers to tweak DCG's settings ingame. By far, it is the easiest way to adjust a setting.

The CBA Setting's menu can be accessed from the pause menu during a mission via (OPTIONS >> GAME >> CONFIGURE ADDONS) or directly during the briefing screen. DCG will only recognize settings in the server and mission tabs, settings adjusted through the client tab are ignored. Please note, a mission restart is required for a setting change to take effect.

Server Config Setup

Supported types: SCALAR, STRING, BOOL, SIDE, ARRAY, POOL, WORLD

  1. Open the optionals folder in @dcg
  2. Copy dcg_server.pbo to the addons folder in @dcg
  3. Copy the userconfig folder to the root Arma 3 folder
  4. Open serverconfig.hpp in \Arma 3\userconfig\dcg\ and edit the desired values

Mission Config Setup

Supported types: SCALAR, STRING, BOOL, SIDE, ARRAY, POOL, WORLD

  1. Open or create a description.ext for the desired mission
  2. Create a class named dcg_settings
  3. Add a class with the same name as the desired setting
    • A full list of DCG's settings can be exported from the EDEN editor tools menu
class dcg_settings {
    class dcg_main_officerPoolEast {
    	typeName = "POOL";
    	value[] = {
    		{"ALL","O_officer_F"}
    	};
    };
};

Mission Parameters Setup

Supported types: SCALAR, BOOL, SIDE

An overview of ARMA's mission parameters framework is located here.

  1. Create a Params class in the mission's description.ext
  2. Create a class with the same name as the desired setting
  3. Add the required entries as shown in the example below
  • the setting will not work without the dcg_setting entry
class Params {
        class dcg_main_enemySide {
        title = "Enemy Side";
        values[] = {0,2};
        texts[] = {"East", "Independent"};
        default = 0;
        dcg_setting = 1;
        typeName = "SIDE";
    };
};

TypeName Entry

The typeName entry is used in DCG's config-based settings to determine how the mod will process a setting's value.

  • SCALAR

    • value is of type NUMBER
    • simple expressions are allowed
      class dcg_main_baseRadius {
          typeName = "SCALAR";
          value = (worldSize*0.055);
      };
    
  • STRING

    • value is of type STRING
      class dcg_main_baseName {
          typeName = "STRING";
          value = "MOB Dodge";
      };
    
  • BOOL

    • value is of type NUMBER and evaluated to be of type BOOLEAN, 0 (FALSE) or 1 (TRUE)
      class dcg_main_loadData {
          typeName = "BOOL";
          value = 1;
      };
    
  • SIDE

    • value is of type NUMBER, 0 (EAST), 1 (WEST), 2 (RESISTANCE), 3 (CIVILIAN)
      class dcg_main_enemySide {
          typeName = "SIDE";
          value = 0;
      };
    
  • ARRAY

    • value is of type ARRAY
    class dcg_main_init {
        typeName = "ARRAY";
        value[] = {
        	"ALL"
        };
    };
    
  • POOL

    • value is a list of nested arrays containing elements of type STRING
    • the first element of each nested array is a worldName or missionName that the following elements will be used on, this allows mission designers to customize settings per map and per mission
    • duplicate elements are removed
    class dcg_main_unitPoolEast {
        typeName = "POOL";
        value[] = {
            {"ALL","O_soldier_AR_F","O_medic_F"}, // units used on all maps and missions
            {"ALTIS","O_Soldier_AA_F","O_support_MG_F"}, // units used only on Altis
            {"DCG_WEST","O_Soldier_AA_F","O_soldier_M_F"} // units used only in missions named dcg_west
        };
    };
    
  • WORLD

    • value is a list of nested arrays
    • the first element of each nested array is a worldName that the following elements will be used on, this allows mission designers to customize settings per map and per mission
    • duplicate elements are not removed
    class dcg_weather_mapData {
        typeName = "WORLD";
        value[] = {
        	{"ALTIS",0.67,0.65,0.56,0.52,0.44,0.34,0.26,0.27,0.33,0.47,0.54,0.62},
        	{"STRATIS",0.67,0.65,0.56,0.52,0.44,0.34,0.26,0.27,0.33,0.47,0.54,0.62}
        };
    };