Jump to content
Sign in to follow this  
taro8

Changing group composition using config?

Recommended Posts

Hi. I want to edit NATO groups in order to change composition of any group that is spawned. namely I want to make sure that every rifle squad has a UAV operator in it. Im looking for the config's I have unpacked till now, but I cant seem to find it anywhere.

 

Could someone tell me what and where exactly should I be looking?

Share this post


Link to post
Share on other sites

so you are looking to copy / change or edit the config for the spawning in the editor, i would believe it may be in the editor, i am not near my computer at this time so I cannot check myself, but id start there

Share this post


Link to post
Share on other sites

so you are looking to copy / change or edit the config for the spawning in the editor, i would believe it may be in the editor, i am not near my computer at this time so I cannot check myself, but id start there

 

I specifically stated I want to do this via configs and pbo, so every dynamically spawned rifle squad has the composition I want them to. Of course I can just add UAV operator to squad I placed in the editor, but this is not what Im after.

 

I actually found the cfgroups part I needed, but I cant get my changes to work. I put this in my config.hpp (with currently it edits NATO soldiers to give them new gear).

class CfgGroups {
	class West {
		name = "$STR_A3_CfgGroups_West0";
		side = TWest;
		
		class BLU_F {
			name = "$STR_A3_CfgGroups_West_BLU_F0";
			
			class Infantry {
				name = "$STR_A3_CfgGroups_West_BLU_F_Infantry0";
				
				class BUS_InfSquad {
					name = "$STR_A3_CfgGroups_West_BLU_F_Infantry_BUS_InfSquad0";
					side = TWest;
					faction = BLU_F;
					icon = "\A3\ui_f\data\map\markers\nato\b_inf.paa";
					
					class Unit0 {
						side = TWest;
						vehicle = "B_soldier_SL_F";
						rank = SERGEANT;
						position[] = {0, 0, 0};
					};
					
					class Unit1 {
						side = TWest;
						vehicle = "B_soldier_F";
						rank = PRIVATE;
						position[] = {5, -5, 0};
					};
					
					class Unit2 {
						side = TWest;
						vehicle = "B_soldier_LAT_F";
						rank = CORPORAL;
						position[] = {-5, -5, 0};
					};
					
					class Unit3 {
						side = TWest;
						vehicle = "B_soldier_M_F";
						rank = PRIVATE;
						position[] = {10, -10, 0};
					};
					
					class Unit4 {
						side = TWest;
						vehicle = "B_soldier_TL_F";
						rank = SERGEANT;
						position[] = {-10, -10, 0};
					};
					
					class Unit5 {
						side = TWest;
						vehicle = "B_soldier_AR_F";
						rank = CORPORAL;
						position[] = {15, -15, 0};
					};
					
					class Unit6 {
						side = TWest;
						vehicle = "B_soldier_A_F";
						rank = PRIVATE;
						position[] = {-15, -15, 0};
					};
					
					class Unit7 {
						side = TWest;
						vehicle = "B_medic_F";
						rank = PRIVATE;
						position[] = {20, -20, 0};
					};
					
					class Unit8 {
						side = TWest;
						vehicle = "B_soldier_UAV_F";
						rank = CORPORAL;
						position[] = {-20, -20, 0};
					};
				};
				
				class BUS_InfSquad_Weapons {
					name = "$STR_A3_CfgGroups_West_BLU_F_Infantry_BUS_InfSquad_Weapons0";
					side = TWest;
					faction = BLU_F;
					icon = "\A3\ui_f\data\map\markers\nato\b_inf.paa";
					
					class Unit0 {
						side = TWest;
						vehicle = "B_soldier_SL_F";
						rank = SERGEANT;
						position[] = {0, 0, 0};
					};
					
					class Unit1 {
						side = TWest;
						vehicle = "B_soldier_AR_F";
						rank = PRIVATE;
						position[] = {5, -5, 0};
					};
					
					class Unit2 {
						side = TWest;
						vehicle = "B_soldier_GL_F";
						rank = CORPORAL;
						position[] = {-5, -5, 0};
					};
					
					class Unit3 {
						side = TWest;
						vehicle = "B_soldier_M_F";
						rank = SERGEANT;
						position[] = {10, -10, 0};
					};
					
					class Unit4 {
						side = TWest;
						vehicle = "B_soldier_AT_F";
						rank = CORPORAL;
						position[] = {-10, -10, 0};
					};
					
					class Unit6 {
						side = TWest;
						vehicle = "B_soldier_AAT_F";
						rank = PRIVATE;
						position[] = {15, -15, 0};
					};
					
					class Unit5 {
						side = TWest;
						vehicle = "B_soldier_A_F";
						rank = PRIVATE;
						position[] = {-15, -15, 0};
					};
					
					class Unit7 {
						side = TWest;
						vehicle = "B_medic_F";
						rank = PRIVATE;
						position[] = {20, -20, 0};
					};
					
					class Unit8 {
						side = TWest;
						vehicle = "B_soldier_UAV_F";
						rank = CORPORAL;
						position[] = {-20, -20, 0};
					};
				};
			};
		};
	};
};

However in the game when I put down these squads Arma just randomly grabs units, for me it places OPFOR fighter jets instead of soldiers. Its just weird, the icons are for infantry, but classname and the unit itself is a modded jet (its not the jet mod fault, it worked correctly before).

Share this post


Link to post
Share on other sites

I tried your code and it worked like a charm. (You don't even need to copy the whole content of those group classes, e.g. BUS_InfSquad – you can just declare that UAV soldier you have there; see the code example below.) What confuses me a bit is "I put this in my config.hpp" – perhaps just a typo, but to be sure: it should be config.cpp. Anyways, this part seems okay, so the issue is elsewhere.

class CfgGroups
{
	class West
	{
		class BLU_F
		{
			class Infantry
			{
				class BUS_InfSquad
				{
					class Unit8
					{
						side = TWest;
						vehicle = "B_soldier_UAV_F";
						rank = CORPORAL;
						position[] = {-20, -20, 0};
					};
				};
			};
		};
	};
};

Share this post


Link to post
Share on other sites

Weird, I tried your code and what happened was that NATO Rifle Squad had a OPFOR plane in it. I just dont get it, maybe I have bad setup for config.cpp (it was cpp, I was messing around with userconfigs so hpp was just stuck in my head).

Share this post


Link to post
Share on other sites

Could you please try the following things?

  • Execute this command: null = createVehicle ["B_soldier_UAV_F", position player, [], 0, "NONE"]; from the game's console.
  • Try the same command with all other addons disabled.
  • Try your or my (doesn't really matter which) cfgGroups code with all other addons disabled.

What happens in each case?

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  

×