Difference between revisions of "Unit Mod Config Standardisation"

From ALiVE Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
== Structure ==
 
== Structure ==
  
To assist unit modders to enable your units to be easily used by ALiVE - and other modders in the future. We get a lot of requests for getting x unit mod to work with ALiVE's placement and AI command setup. To make this easy for us (and others) can I ask that you implement the following config settings. If we could get these done as a community standard it would interoperability between mods much easier.
+
To assist unit modders to enable your units to be easily used by ALiVE (and other modders in the future). We get a lot of requests for getting x unit mod to work with ALiVE's placement and AI command setup. To make this easy for us (and others) can I ask that you implement the following config settings. If we could get these done as a community standard it would interoperability between mods much easier.
  
Obviously making configs is a bit of a dark art, but if in doubt people should follow what BIS have in theirs.. so lets look at a config that works - BLU_F..
+
Obviously making configs is a bit of a dark art but if in doubt people should follow what BIS have in theirs: this is a vanilla config that works - BLU_F
  
  
Line 40: Line 40:
  
  
Please don't make custom CfgGroups categories, try to fit your units in one of Armored,Infantry,Mechanised,Motorized,SpecOps,Support if at all possible.
+
{{note}} Do not make custom CfgGroups categories. Only use Armored, Infantry, Mechanized, Motorized, SpecOps, Support (note the US spelling).  Use Group Names for your customisation and so your unique mod shows up in the editor list.  Changing category names will likely cause problems for ALiVE and other mods that rely on them.
 +
 
  
 
== Config Sample ==
 
== Config Sample ==
  
Here is an example config we used to get the OPFOR Guerilla faction to work. Note that we are using a stringtable to define group names.
+
Here is an example config we used to get the OPFOR Guerilla faction to work. Note that we are using a stringtable to define group names for flexibility.
  
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">

Latest revision as of 06:15, 5 February 2015

Structure

To assist unit modders to enable your units to be easily used by ALiVE (and other modders in the future). We get a lot of requests for getting x unit mod to work with ALiVE's placement and AI command setup. To make this easy for us (and others) can I ask that you implement the following config settings. If we could get these done as a community standard it would interoperability between mods much easier.

Obviously making configs is a bit of a dark art but if in doubt people should follow what BIS have in theirs: this is a vanilla config that works - BLU_F


CfgFactionClasses

  • BLU_F
    • displayName = "NATO";
    • flag = "\a3\Data_f\Flags\flag_nato_co.paa";
    • icon = "\a3\Data_f\cfgFactionClasses_BLU_ca.paa";
    • priority = 1;
    • side = 1; // Important that this side number matches the side in the CfgGroups


Now lets look at the group definitions for BLU_F faction in CfgGroups


CfgGroups

  • West // Note side number 1 == West
    • BLU_F // Note faction name matches the name in CfgFactionClasses
      • Armored // Note all these group categories are using standard naming convention
      • Infantry
        • BUS_InfSquad
          • faction = "BLU_F";
          • name = "Rifle Squad";
          • side = 1; // Note this is important
      • Mechanized
      • Motorized
      • SpecOps
      • Support
      • Air


Onebit note.png Note: Do not make custom CfgGroups categories. Only use Armored, Infantry, Mechanized, Motorized, SpecOps, Support (note the US spelling). Use Group Names for your customisation and so your unique mod shows up in the editor list. Changing category names will likely cause problems for ALiVE and other mods that rely on them.


Config Sample

Here is an example config we used to get the OPFOR Guerilla faction to work. Note that we are using a stringtable to define group names for flexibility.

class CfgGroups
{
    class East
    {
        class OPF_G_F
        {
            name = "OPFIA";
            class Infantry
            {
                name = "Infantry";
                class ORG_InfSentry
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_InfSentry0";  // name = "Sentry";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.3;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_GL_F";
                        rank = "CORPORAL";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_F";
                        rank = "PRIVATE";
                        position[] = {5,-5,0};
                    };
                };
                class ORG_InfSquad
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_InfSquad0";  // name = "Rifle Squad";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.3;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_SL_F";
                        rank = "SERGEANT";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_TL_F";
                        rank = "SERGEANT";
                        position[] = {5,-5,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_AR_F";
                        rank = "CORPORAL";
                        position[] = {-5,-5,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_LAT_F";
                        rank = "PRIVATE";
                        position[] = {10,-10,0};
                    };
                    class Unit4
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_A_F";
                        rank = "PRIVATE";
                        position[] = {-10,-10,0};
                    };
                    class Unit5
                    {
                        side = 0;
                        vehicle = "O_G_medic_F";
                        rank = "CORPORAL";
                        position[] = {15,-15,0};
                    };
                    class Unit6
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_F";
                        rank = "PRIVATE";
                        position[] = {-15,-15,0};
                    };
                    class Unit7
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_F";
                        rank = "PRIVATE";
                        position[] = {20,-20,0};
                    };
                };
                class ORG_InfSquad_Weapons
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_InfSquad_Weapons0";  // name = "Weapons Squad";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.3;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_SL_F";
                        rank = "SERGEANT";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_AR_F";
                        rank = "SERGEANT";
                        position[] = {5,-5,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_AR_F";
                        rank = "CORPORAL";
                        position[] = {-5,-5,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_LAT_F";
                        rank = "SERGEANT";
                        position[] = {10,-10,0};
                    };
                    class Unit4
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_LAT_F";
                        rank = "CORPORAL";
                        position[] = {-10,-10,0};
                    };
                    class Unit5
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_F";
                        rank = "PRIVATE";
                        position[] = {-15,-15,0};
                    };
                    class Unit6
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_A_F";
                        rank = "PRIVATE";
                        position[] = {15,-15,0};
                    };
                    class Unit7
                    {
                        side = 0;
                        vehicle = "O_G_medic_F";
                        rank = "PRIVATE";
                        position[] = {20,-20,0};
                    };
                };
                class ORG_InfTeam
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_InfTeam0";  // name = "Fire Team";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.3;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_TL_F";
                        rank = "SERGEANT";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_AR_F";
                        rank = "CORPORAL";
                        position[] = {5,-5,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_GL_F";
                        rank = "PRIVATE";
                        position[] = {-5,-5,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_LAT_F";
                        rank = "PRIVATE";
                        position[] = {10,-10,0};
                    };
                };    
                class ORG_InfTeam_AA
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_InfTeam_AA0";  // name = "Air-defense Team";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.3;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_TL_F";
                        rank = "SERGEANT";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_AR_F";
                        rank = "CORPORAL";
                        position[] = {5,-5,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_LAT_F";
                        rank = "PRIVATE";
                        position[] = {-5,-5,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_A_F";
                        rank = "PRIVATE";
                        position[] = {10,-10,0};
                    };
                };
                class ORG_InfTeam_AT
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_InfTeam_AT0";  // name = "Anti-armor Team";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.3;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_TL_F";
                        rank = "SERGEANT";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_LAT_F";
                        rank = "CORPORAL";
                        position[] = {5,-5,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_LAT_F";
                        rank = "PRIVATE";
                        position[] = {-5,-5,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_A_F";
                        rank = "PRIVATE";
                        position[] = {10,-10,0};
                    };
                };
                class ORG_InfWepTeam
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_InfWepTeam0";  // name = "Weapons Team";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.3;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_TL_F";
                        rank = "SERGEANT";
                        position[] = {0,5,0};
                    };
                    class Unit1 // TODO - Should be Heavy MG
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_AR_F";
                        rank = "CORPORAL";
                        position[] = {3,0,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_LAT_F";
                        rank = "PRIVATE";
                        position[] = {5,0,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_F";
                        rank = "PRIVATE";
                        position[] = {7,0,0};
                    };
                };
                class ORG_InfSupTeam
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_InfSupTeam0"; // name = "Support Team";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.3;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_TL_F";
                        rank = "SERGEANT";
                        position[] = {0,5,0};
                    };
                    class Unit1 // TODO - Should be Heavy AT
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_LAT_F";
                        rank = "CORPORAL";
                        position[] = {3,0,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_medic_F";
                        rank = "PRIVATE";
                        position[] = {5,0,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_M_F";
                        rank = "PRIVATE";
                        position[] = {7,0,0};
                    };
                };
                class ORG_InfHQ
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_InfHQ0";  // name = "Infantry HQ";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_SL_F";
                        rank = "LIEUTENANT";
                        position[] = {0,5,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_TL_F";
                        rank = "SERGEANT";
                        position[] = {3,0,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_medic_F";
                        rank = "CORPORAL";
                        position[] = {5,0,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_engineer_F";
                        rank = "PRIVATE";
                        position[] = {7,0,0};
                    };
                    class Unit4
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_F";
                        rank = "PRIVATE";
                        position[] = {9,0,0};
                    };
                };
                class ORG_ReconSentry
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_ReconSentry0"; // name = "Recon Sentry";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_F";
                        rank = "CORPORAL";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_F";
                        rank = "PRIVATE";
                        position[] = {5,-5,0};
                    };
                };
            };
            class Motorized
            {
                name = "Motorized Infantry";
                class ORG_MotInf_Team
                {
                    name = "$STR_A3_CfgGroups_East_OPF_F_Motorized_MTP_ORG_MotInf_Team0"; // name = "Motorized Patrol";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.2;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_TL_F";
                        rank = "SERGEANT";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Offroad_01_F";
                        rank = "SERGEANT";
                        position[] = {0,-10,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_AR_F";
                        rank = "CORPORAL";
                        position[] = {5,-5,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_LAT_F";
                        rank = "CORPORAL";
                        position[] = {-5,-5,0};
                    };
                    class Unit4
                    {
                        side = 0;
                        vehicle = "O_G_medic_F";
                        rank = "CORPORAL";
                        position[] = {10,-10,0};
                    };
                    class Unit5
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_F";
                        rank = "CORPORAL";
                        position[] = {-10,-10,0};
                    };
                };
                class ORG_Technicals
                {
                    name = "$STR_A3_CfgGroups_East_OPF_F_Motorized_MTP_ORG_Technicals0"; // name = "Technicals";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.2;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Offroad_01_armed_F";
                        rank = "SERGEANT";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Offroad_01_armed_F";
                        rank = "SERGEANT";
                        position[] = {10,-10,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_Offroad_01_armed_F";
                        rank = "CORPORAL";
                        position[] = {-10,-10,0};
                    };
                };
            };
            class Support
            {
                name = "Support Infantry";
                class ORG_Support_CLS
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_Support_CLS0";  // name = "Support Team (CLS)";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.1;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_TL_F";
                        rank = "SERGEANT";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_AR_F";
                        rank = "CORPORAL";
                        position[] = {5,-5,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_medic_F";
                        rank = "PRIVATE";
                        position[] = {-5,-5,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_medic_F";
                        rank = "PRIVATE";
                        position[] = {10,-10,0};
                    };
                };
                class ORG_Support_ENG
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_Support_ENG0";  // name = "Support Team (Engineer)";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.1;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_TL_F";
                        rank = "SERGEANT";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_F";
                        rank = "CORPORAL";
                        position[] = {5,-5,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_engineer_F";
                        rank = "PRIVATE";
                        position[] = {-5,-5,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_engineer_F";
                        rank = "PRIVATE";
                        position[] = {10,-10,0};
                    };
                };
                class ORG_Support_EOD
                {
                    name = "$STR_A3_CfgGroups_East_OPF_G_F_Infantry_ORG_Support_EOD0";  // name = "Support Team (EOD)";
                    side = 0;
                    faction = "OPF_G_F";
                    rarityGroup = 0.1;
                    class Unit0
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_TL_F";
                        rank = "SERGEANT";
                        position[] = {0,0,0};
                    };
                    class Unit1
                    {
                        side = 0;
                        vehicle = "O_G_Soldier_F";
                        rank = "CORPORAL";
                        position[] = {5,-5,0};
                    };
                    class Unit2
                    {
                        side = 0;
                        vehicle = "O_G_engineer_F";
                        rank = "PRIVATE";
                        position[] = {-5,-5,0};
                    };
                    class Unit3
                    {
                        side = 0;
                        vehicle = "O_G_engineer_F";
                        rank = "PRIVATE";
                        position[] = {10,-10,0};
                    };
                };
            };
        };
    };
};