Jump to content
Sign in to follow this  
Yazp

ARMA 2 OA Config Some Input after End of File

Recommended Posts

Hello all, Here is my code:

class CfgPatches
{
class HAZARESTAN
{
	units[] = { "HAZARA_Rifleman", "HAZARA_Soldier_Light", "HAZARA_Soldier_GL", "HAZARA_Soldier_Militia", "HAZARA_Soldier_Sniper", "HAZARA_Soldier_Spotter" };
	weapons[] = { "CAWeapons", "CACharacters" };
	requiredVersion = 1.54;
};
};

class CfgFactionClasses //Faction config
{
class HAZARA_FAC //Faction Calling Name
{
	priority = 2;
	displayName = "Royal Hazarestani Armed Forces";
	side = 2;
};
};

class CfgVehicleClasses //Unit types Men, Air, Armor, ect
{
class HAZARA_Men
{
	displayName = "Men";
};
class HAZARA_Armor
{
	displayName = "Royal Hazarestani Armored Corps";
};
};

class CfgVehicles //All units go here
{
class SoldierWB; //External class

class HAZARA_Soldier_Base : SoldierWB 
{
	identityTypes = {"Head_CDF", "CDF_Glasses"};
	faceType = "Man";
	side = 1;
	faction = "HAZARA_FAC";
	genericNames = "IranMen";
	vehicleClass = "Men";
	portrait = "\Ca\characters\data\portraits\comBarHead_bluFor_cdf_ca";
	model = "\ca\characters2\Blufor\Soldier";
	picture = "\Ca\characters\data\Ico\i_null_CA.paa";
	icon = "\Ca\characters2\data\icon\i_soldier_CA.paa";
	accuracy = 2.000000;
	camouflage = 1.400000;
	minFireTime = 10;
	scope = 1;
	cost = 40000;
	languages = {"TK", "EN"};
};
class HAZARA_Soldier : HAZARA_Soldier_Base
{
	model = "\ca\characters2\Blufor\Soldier";
	scope = 2;
	accuracy = 3.900000;
	displayName = "Rifleman";
	weapons [] = { "VIL_AMD", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };
	magazines [] = { "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "HandGrenade_West" };
	respawnWeapons [] = { "VIL_AMD", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };
	respawnMagazines [] = { "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "HandGrenade_West" };
};

class HAZARA_Soldier_Light : HAZARA_Soldier_Base {
	model = "\ca\characters2\Blufor\Soldier_Light";
	scope = 2;
	accuracy = 3.900000;
	displayName = "Soldier Light";
	weapons [] = { "VIL_AKM", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };
	magazines [] = { "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "HandGrenade_West" };
	respawnWeapons [] = { "VIL_AKM", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };
	respawnMagazines [] = { "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "30Rnd_762x39_AK47 ", "HandGrenade_West" };
};

class HAZARA_Soldier_GL : HAZARA_Soldier_Base {
	model = "\ca\characters2\Blufor\Soldier_GL";
	scope = 2;
	accuracy = 3.900000;
	displayName = "Grenadier";
	cost = 50000;
	weapons [] = { "AK_74_GL", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };
	magazines [] = { "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "1Rnd_HE_GP25", "1Rnd_HE_GP25", "1Rnd_HE_GP25", "1Rnd_HE_GP25", "1Rnd_HE_GP25", "1Rnd_HE_GP25", "1Rnd_HE_GP25", "1Rnd_HE_GP25" };
	respawnWeapons [] = { "AK_74_GL", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };
	respawnMagazines [] = { "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "1Rnd_HE_GP25", "1Rnd_HE_GP25", "1Rnd_HE_GP25", "1Rnd_HE_GP25" };
};

class HAZARA_Soldier_Militia : HAZARA_Soldier_Base {
	model = "\ca\characters2\Blufor\Soldier_Guard";
	accuracy = 3.900000;
	scope = 2;
	displayName = "Millitiaman";
	weapons [] = { "AK_47_S", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };

	class HitPoints : HitPoints {

		class HitHead : HitHead {
			armor = 0.600000;
		};
	}:
	magazines [] = { "30Rnd_762x39_AK47", "30Rnd_762x39_AK47", "30Rnd_762x39_AK47", "30Rnd_762x39_AK47", "30Rnd_762x39_AK47", "30Rnd_762x39_AK47", "HandGrenade_East", "HandGrenade_East" };
	respawnWeapons [] = { "AK_47_S", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };
	respawnmagazines [] = { "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "HandGrenade_East" };
};

class HAZARA_Soldier_Medic : HAZARA_Soldier_Base {
	 model = "\ca\characters2\Blufor\Soldier";
	 scope = 2;
	 displayName = "Paramedic";
	 picture = "\Ca\characters\data\Ico\i_Med_CA.paa";
	 Icon = "\Ca\characters2\data\icon\i_medic_CA.paa";
	 TextPlural = "$STR_DN_Medics";
	 TextSingular = "$STR_DN_Medic";
	 nameSound = "veh_Medic";
	 attendant = 1;
 	 accuracy = 3.700000;
	 cost = 60000;
	 weaponSlots = "1	 + 	4	 + 8 * 		256	 + 2 * 	4096	 + 	2	 + 4*	16  + 12*131072";
	 weapons [] = { "VIL_AK_74M", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };
	 magazines [] = { "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "HandGrenade_East", "SmokeShellOrange" };
	 respawnWeapons [] = { "VIL_AK_74M", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };
	 respawnMagazines [] = { "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "30Rnd_545x39_AK", "HandGrenade_East", "SmokeShellOrange" };
};

class HAZARA_Soldier_Sniper : HAZARA_Soldier_Base {
	displayName = "Sniper";
	scope = 2;
	accuracy = 3.900000;
	camouflage = 0.500000;
	threat = { 1, 0.500000, 0.100000 };
	cost = 250000;
	TextPlural = "$STR_DN_Snipers";
	TextSingular = "$STR_DN_Sniper";
	nameSound = "veh_Sniper";
	model = "\ca\characters2\Ghillie_Overall";
	portrait = "\Ca\characters\data\portraits\comBarHead_common_sniper_ca";

	class HitPoints : HitPoints {

		class HitHead : HitHead {
			armor = 0.600000;
		};
	};

	weapons [] = { "SVD", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "Binocular" };
	magazines [] = { "10Rnd_762x54_SVD", "10Rnd_762x54_SVD", "10Rnd_762x54_SVD", "10Rnd_762x54_SVD", "10Rnd_762x54_SVD", "10Rnd_762x54_SVD", "10Rnd_762x54_SVD", "10Rnd_762x54_SVD", "HandGrenade_East", "HandGrenade_East", "SmokeShell", "SmokeShellOrange" };
	respawnWeapons [] = { "SVD", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "Binocular" };
	respawnMagazines [] = { "10Rnd_762x54_SVD", "10Rnd_762x54_SVD", "10Rnd_762x54_SVD", "10Rnd_762x54_SVD", "HandGrenade_East", "SmokeShellOrange" };
	hiddenSelections [] = { "Camo" };
	hiddenSelectionsTextures [] = { "\ca\characters2\data\ghillie_overall1_co.paa" };
};

class HAZARA_Soldier_Spotter : HAZARA_Soldier_Base {
	displayName = "Spotter";
	portrait = "\Ca\characters\data\portraits\comBarHead_common_sniper_ca";
	scope = 2;
	accuracy = 3.900000;
	camouflage = 0.500000;
	threat = { 1, 0.500000, 0.100000 };
	cost = 150000;
	model = "\ca\characters2\Ghillie_Overall";

	class HitPoints : HitPoints {

		class HitHead : HitHead {
			armor = 0.600000;
		};
	};
		weapons [] = { "AKS_74_UN_kobra", "Binocular", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };
		magazines [] = { "30Rnd_545x39_AKSD", "30Rnd_545x39_AKSD", "30Rnd_545x39_AKSD", "30Rnd_545x39_AKSD", "30Rnd_545x39_AKSD", "30Rnd_545x39_AKSD", "HandGrenade_East", "HandGrenade_East", "SmokeShellOrange", "SmokeShell" };
		respawnWeapons [] = { "AKS_74_UN_kobra", "Binocular", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio" };
		respawnMagazines [] = { "30Rnd_545x39_AKSD", "30Rnd_545x39_AKSD", "30Rnd_545x39_AKSD", "30Rnd_545x39_AKSD", "HandGrenade_East", "SmokeShell" };
		hiddenSelections [] = { "Camo" };
		hiddenSelectionsTextures [] = { "\ca\characters2\data\ghillie_overall1_co.paa" };
	};
};

I've spent 2 and a half hours on trying to get this simple piece of config working. Can someone help?

Share this post


Link to post
Share on other sites

Are you getting error messages and if so what do they say? I also see you dont have requiredAddons defined in CfgPatches >> HAZARESTAN. Sometimes it helps to run apply addons after the base arma 2 configs are applied.

...Why do you have CfgPatches names here:

[color="#B22222"]weapons[] = { "CAWeapons", "CACharacters" };[/color]

weapons[] is supposed to have the class names of weapons added in your addon, not CfgPatches class names. "CAWeapons", "CACharacters" are supposed to go in requiredAddons[]:

[color="#008000"]requiredAddons[] = {"CAWeapons", "CACharacters"};[/color]

So finally try this:

class CfgPatches
{
class HAZARESTAN
{
	units[] = { "HAZARA_Rifleman", "HAZARA_Soldier_Light", "HAZARA_Soldier_GL", "HAZARA_Soldier_Militia", "HAZARA_Soldier_Sniper", "HAZARA_Soldier_Spotter" };
	weapons[] = {};
	[b]requiredAddons[] = { "CAWeapons", "CACharacters" };[/b]
	requiredVersion = 1.54;
};
};

Edited by Benargee

Share this post


Link to post
Share on other sites
Are you getting error messages and if so what do they say? I also see you dont have requiredAddons defined in CfgPatches >> HAZARESTAN. Sometimes it helps to run apply addons after the base arma 2 configs are applied.

...Why do you have CfgPatches names here:

[color="#B22222"]weapons[] = { "CAWeapons", "CACharacters" };[/color]

Thanks for the fix man

weapons[] is supposed to have the class names of weapons added in your addon, not CfgPatches class names. "CAWeapons", "CACharacters" are supposed to go in requiredAddons[]:

[color="#008000"]requiredAddons[] = {"CAWeapons", "CACharacters"};[/color]

So finally try this:

class CfgPatches
{
class HAZARESTAN
{
	units[] = { "HAZARA_Rifleman", "HAZARA_Soldier_Light", "HAZARA_Soldier_GL", "HAZARA_Soldier_Militia", "HAZARA_Soldier_Sniper", "HAZARA_Soldier_Spotter" };
	weapons[] = {};
	[b]requiredAddons[] = { "CAWeapons", "CACharacters" };[/b]
	requiredVersion = 1.54;
};
};

xD fixed this a long time ago, Thanks for the help anyways!

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  

×