Jump to content
Sign in to follow this  
arjay

Public service announcment: CfgFactionClasses and CfgGroups configs interoperability

Recommended Posts

Hi all,

I'm one of the ALiVE mod devs, and I would like 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..

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

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.

Thanks guys. If I could be so bold as to request this gets stickied by the mods?

ARJay

Share this post


Link to post
Share on other sites

Good post there ARJay.

Building on from what he says; you can create new factions very easily by defining only a few things. For example:

class CfgFactionClasses
{
class Horde_OPF_F
{
	displayname = "Antagonists";
	icon = "\a3\Data_f\cfgFactionClasses_OPF_ca.paa";
	priority = 1;
	side = 0;
};
class Horde_IND_F
{
	displayname = "Protagonists";
	icon = "\a3\Data_f\cfgFactionClasses_IND_ca.paa";
	priority = 1;
	side = 2;
};
};

The config entries above represent two new factions. Just put your own displayname and texture path to the icon (I used the existing icons in the examples).

I think priority is where it appears in the drop-down menu when you select a faction in the editor. I could be wrong though. In any case you can leave it as 1 if you like.

The side is as follows:

0 = East

1= West

2 = Resistance

3 = Civilian

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for that example Das, following on from you here is an example CfgGroups config we used to setup OPF Guerilla units using the existing classes.

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};
				};
			};
		};
	};
};
};

*Note we are using a stringtable to define names of groups name

Edited by ARJay

Share this post


Link to post
Share on other sites

Since everyone wants Massi's Africans in game, how would one need to edit the following to make it compatible? Presumably this could be done very easily by making a 3rd-party config?

class CfgFactionClasses
{
access = "ReadAndCreate";
class mas_afr_rebl_b
{
	displayName = "UN Security Forces";
	priority = 2;
	side = 1;
	icon = "\mas_afr_rebl_c\cfgfaction_mas_afr_blu_ca.paa";
};
class mas_afr_rebl_i
{
	displayName = "African Governatives Forces";
	priority = 2;
	side = 2;
	icon = "\mas_afr_rebl_c\cfgfaction_mas_afr_ind_ca.paa";
};
class mas_afr_rebl_o
{
	displayName = "African Rebel Forces";
	priority = 2;
	side = 0;
	icon = "\mas_afr_rebl_c\cfgfaction_mas_afr_opf_ca.paa";
};
class mas_afr_rebl_c
{
	displayName = "African Civilians";
	priority = 2;
	side = 3;
	icon = "\mas_afr_rebl_c\cfgfaction_mas_afr_civ_ca.paa";
};
};

Is it simply a case of changing this (and of course the groups) to:

class CfgFactionClasses
{
access = "ReadAndCreate";
class BLU_F
{
	displayName = "UN Security Forces";
	priority = 2;
	side = 1;
	icon = "\mas_afr_rebl_c\cfgfaction_mas_afr_blu_ca.paa";
};
class IND_F
{
	displayName = "African Governatives Forces";
	priority = 2;
	side = 2;
	icon = "\mas_afr_rebl_c\cfgfaction_mas_afr_ind_ca.paa";
};
class OPF_F
{
	displayName = "African Rebel Forces";
	priority = 2;
	side = 0;
	icon = "\mas_afr_rebl_c\cfgfaction_mas_afr_opf_ca.paa";
};
class mas_afr_rebl_c  // <-What should this be?
{
	displayName = "African Civilians";
	priority = 2;
	side = 3;
	icon = "\mas_afr_rebl_c\cfgfaction_mas_afr_civ_ca.paa";
};
};

What are acceptable class names? What are unacceptable class names?

Edited by Drongo69

Share this post


Link to post
Share on other sites

I can't believe there isn't a feedback tracker to establish this as a sort of standard already. This is essential for intricate mission making.

---------- Post added at 06:31 PM ---------- Previous post was at 06:22 PM ----------

On a tangent, as suggested in another thread, it is obvious that a sort of "translator" would be useful for mission makers in particular. Select the unit and translate it to a compatible configuration on a mission per mission basis. This would be useful in particular for the addons that the author has abandoned or otherwise has not corrected. I'm not script savvy... how difficult would it be to do something like that?

Share this post


Link to post
Share on other sites

Hi,

Nice job with alive. I think its too interesting can use African Conflict or other mod units with alive. I Hate bug head units of arma 3. Now im placing african conflict units with editor and profiling they. Please when you can give us instructions to make it work with african conflict units.

Thanks

Share this post


Link to post
Share on other sites
Hi,

Nice job with alive. I think its too interesting can use African Conflict or other mod units with alive. I Hate bug head units of arma 3. Now im placing african conflict units with editor and profiling they. Please when you can give us instructions to make it work with african conflict units.

Thanks

Our next release will include some additions to fix these issues that are with some of the mods configs, so therefore will work with ALiVE.

Share this post


Link to post
Share on other sites

Hello everyone! I was wondering if anyone figured this out yet? I have an ALIVE mission all setup and just waiting for the africanconflict units to be added :)

Share this post


Link to post
Share on other sites

Not only helping Alive to work better, It will also help all missions/addons dynamically reading addons to work better :)

Share this post


Link to post
Share on other sites

Bumping this, Mods, can we get this stickied please?

Share this post


Link to post
Share on other sites

Great thread, but I'm afraid a community convention won't really solve the problem.

I just had a look at the ALIVE code (great stuff btw. :cool:), and really, the "staticData.sqf" file is telling (been there, done that - yay :().

For as long as we have to define our own typelists, blacklists, mappings and what not to effectively/semantically query the configfile, we're basically screwed (or doomed to continuous, tedious manual work; it really sucks to compose these typelists, and then another dlc/mod comes along... UGH).

BIS really needs to extend the config such that it can be easily queried (in a meaningful way). What we need are official categories/types (boolean or indeed lists) which are then used as additional attribute for all kind of things.

Given a structure/building, we need to ask: isCivilian?, isMilitary?, isFunctionalX (fuel, power, ...)?, ... and - the other way around - we need an easy way to query for such things (preferrably without having to manually inspect all classes, say under CfgVehicles. Trying to encode such meaning (by convention; e.g. the role suffixes R, AT, AR, AAR, SL, TL, ... for units) into the classname is not going to work...).

As for factions; what unit is the default rifleman/machinegunner/medic/....? What is the default rifle of faction X? What sniper-rifle do they use? What AT-launcher? What's their MBT? Have you ever tried to extract such information from the configfile?

Well... good luck. :rolleyes:

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×