Jump to content
Sign in to follow this  
bigringantics

Setting Up Custom Faction Addon

Recommended Posts

Hello all,

I apologize in advance for the newbie question, I'm pretty green to editing and there's a lot to figure out here. I'm trying to find a way to create a custom faction using gear from various addons and the vanilla game. I'm not looking to do retextures or other models, I'm just trying to save time placing units and such without having to use a script every time I put a unit down to have him in the right camo and holding the right weapon. Can anybody help me get this worked out? Thanks!

Share this post


Link to post
Share on other sites

Do you want an entirely new side like NATO/CSAT/INDEP or do just want one of the factions within either NATO/CSAT/INDEP?

Share this post


Link to post
Share on other sites

I have the same question. I want an entirely new side like NATO/USARMY and so on. I have also found some code by searching the Forums

class CfgFactionClasses
{
class USARMY
{
 displayName = "US";
 priority = 1;
 side = 5;
};
};

So my question is, where do i have to add this code? I cant add it with the Editor. So do i have to Change some files?

It would be great if anybody of you could help me. Thanks :)

Share this post


Link to post
Share on other sites

I just want a new set of units within NATO, kind of like the difference between NATO/FIA. Both BLUFOR but separate factions.

Share this post


Link to post
Share on other sites

First off, install bohemia's developer tools. http://downloads.bistudio.com/Tools/BI_Editing_Tools_2_5_1.zip

Your going to want to make a folder dedicated to your mod and make a file named Config.cpp and in that file you paste that code you found. Once you have a completed config.cpp use binPBO to pack it into a PBO file by setting the directory of the mod to the folder you created before. Next make a folder that starts with @. Example: @MYFIRSTMOD. Within that folder make another folder named "addons" w/o the quotation marks and put the pbo you binarized (Packed into a PBO) in there. Now run the game with the mod enabled and when you go into the editor you will see it under the blufor section.

To find the the classnames of items you may want to use this page may be very useful to you. https://community.bistudio.com/wiki/Arma_3_Assets

Here is an example of a Config.cpp you can use.

enum {
 //  = 2,	// Error parsing: Empty enum name
DESTRUCTENGINE = 2,
DESTRUCTDEFAULT = 6,
DESTRUCTWRECK = 7,
DESTRUCTTREE = 3,
DESTRUCTTENT = 4,
STABILIZEDINAXISX = 1,
STABILIZEDINAXESXYZ = 4,
STABILIZEDINAXISY = 2,
STABILIZEDINAXESBOTH = 3,
DESTRUCTNO = 0,
STABILIZEDINAXESNONE = 0,
DESTRUCTMAN = 5,
DESTRUCTBUILDING = 1,
};
class CfgPatches {
class unit_config {
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Characters_F_BLUFOR"};
};
};
class CfgFactionClasses
{
class a_units
{
	displayName = "ARMY";
	author = "YOURNAME";
	icon = "Directory to faction Icon"; // Needs to be 16x16 in resolution and it needs to be in the form of a PAA.
	priority = 2;
	side = 1; // Blufor
};
};
class CfgVehicleClasses
{
class army_units
{
	displayName = "Army Battalion"; // Rename to what you want the sub group of the faction will be. You can have multiple subfactions (VehicleClasses) as long as the class name of the VehicleClass is different.
};
};
class CfgVehicles {
class B_Soldier_base_F;
   class Army_Squadleader : B_Soldier_base_F {
	_generalMacro = "Army_Squadleader"; 
	scope = 2;
	displayName = "Squad Leader"; // In-game name of unit
	faction = a_units; // Puts unit under new faction
	vehicleClass = "army_units"; // Puts unit in the vehicleclass
	icon = "iconManLeader";
	nakedUniform = "U_BasicBody";  
	uniformClass = "U_B_CombatUniform_mcam";  // Uniform Class
	backpack = "B_AssaultPack_khk"; // Backpack Class
	linkedItems[] = {"V_PlateCarrier3_rgr", "H_HelmetB_light", "NVGoggles", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"}; // Item's added to the unit. 
	respawnLinkedItems[] = {"V_PlateCarrier3_rgr", "H_HelmetB_light", "NVGoggles", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"}; // Item's added to the unit. Should be identical to the linkedItems section.
	weapons[] = {"arifle_MX_F","Binocular"}; // Weapons added to the unit.
	respawnweapons[] = {"arifle_MX_F","Binocular"}; // Weapons added to the unit. Should be identical to the linkedItems secti
	magazines[] = {"30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","HandGrenade","HandGrenade",};
	Respawnmagazines[] = {"30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","HandGrenade","HandGrenade",};
	};
};

Share this post


Link to post
Share on other sites

Done! Thanks so much Teeha

---------- Post added at 00:04 ---------- Previous post was at 23:31 ----------

EDIT: Is there any way to set a unit's identity in Config.cpp or does that have to be done in a script or in the init field in the editor? Also, how do you add weapons attachments?

Edited by bigringantics

Share this post


Link to post
Share on other sites

It works for me too. Thank you Theea :)

Also, how do you add weapons attachments?

You can add weapon attachments by changing the code.

weapons[] = [color="#0000CD"]{"arifle_MX_F","[/color]Binocular"}; // Weapons added to the unit.
respawnweapons[] = [color="#0000CD"]{"arifle_MX_F","[/color]Binocular"}; // Weapons added to the unit. Should be identical to the linkedItems section

The "arifle_MX_F" hasn't a scope, compressor or something else but the "arifle_MX_Holo_pointer_F " for example has a scope and a pointer. So now you just have to change the Name of the weapon in the Code. You can find all weapons which come with Arma 3 at the Website Theea posted (I cannot post this link, because I am new at this Forum :( )

If you want a single attachment which is in the inventory but not applied on the weapon you have to change this part of the code:

linkedItems[] = {"V_PlateCarrier3_rgr", "H_HelmetB_light", "NVGoggles", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
respawnLinkedItems[] = {"V_PlateCarrier3_rgr", "H_HelmetB_light", "NVGoggles", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "[color="#0000FF"]optic_Aco[/color]"};

and add a "optic_Aco" or something else. You can also find all items, attachments,... on the Website.

I think this should work for you

I have another question too. Like i said this code works for me but how can i add a complete new side like Blufor, Opfor Independant,... not only a faction? I have tried to change the code a bit but it doesnt work. It would be great if anybody could help me :)

Share this post


Link to post
Share on other sites

By the unit's identity, do you mean their class name? Their in-game player name (Example: John Dalton)? Or what they appear as in the editor? And no prob :)

Share this post


Link to post
Share on other sites

And now i have another Problem. I want to dress the People from this new faction like civilians, but they should be Blufor. I dont want them to wear an uniform they should wear a T-Shirt etc. instead. Is there anyway to do this? I have tried to Change the code but it doesnt work.

Here is the part of the Code:

class CfgPatches {
class unit_config {
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Characters_F_BLUFOR", [color="#0000FF"]"A3_Characters_F_Civil"[/color] };
};
};
class CfgFactionClasses
{
class a_units
{
	displayName = "ARMY";
	author = "YOURNAME";
	icon = "Directory to faction Icon"; // Needs to be 16x16 in resolution and it needs to be in the form of a PAA.
	priority = 2;
	side = 1; // Blufor
};
};
class CfgVehicleClasses
{
class army_units
{
	displayName = "Army Battalion"; // Rename to what you want the sub group of the faction will be. You can have multiple subfactions (VehicleClasses) as long as the class name of the VehicleClass is different.
};
};
class CfgVehicles {
class B_Soldier_base_F;
   class Army_Squadleader : B_Soldier_base_F {
	_generalMacro = "Army_Squadleader"; 
	scope = 2;
	displayName = "Squad Leader"; // In-game name of unit
	faction = a_units; // Puts unit under new faction
	vehicleClass = "army_units"; // Puts unit in the vehicleclass
	icon = "iconManLeader";
	nakedUniform = "U_BasicBody";  
	uniformClass = [color="#0000FF"]"C_man_p_beggar_F_euro [/color]";  // Uniform Class

I have marked blue what ive changed. Maybe someone could help me

Share this post


Link to post
Share on other sites

By identity I mean their in-game name, speaker, face, etc. as usually defined in the description.ext. Another snag I ran into, what are the options for the unit's map icons? There's a section in the code that looks something like:

icon = "iconManLeader";

Which, obviously, makes his icon on the map a leader icon with the slash through it. But what would I put there if I want an autorifleman, or a medic, or an AT rifleman? I've done some experimenting and Googling and so far I've just gotten the map symbol to disappear.

Thanks again for all the help

Edited by bigringantics

Share this post


Link to post
Share on other sites

I'm not sure where the documentation about those icons are but I think that they normally go by what you want them to be so an example would be "iconManMedic". Voltagez, the reason why that isn't working is because that isn't a uniform class it's a unit class. If you want the uniform that the unit you put in there has the class name should be "U_C_Poloshirt_blue". Sorry for the late update! Wasn't able to be near my computer for awhile.

Share this post


Link to post
Share on other sites

Hey Teeha,

I've got a small question since this is a pretty fresh topic and you seem to know what you're talking about :P Anyhow, I'm currently in the process of converting standard units to use custom weapons (for ease with certain scripts such as DAC), however I've run into a bit of a problem. Certain units do not seem to accept these new configurations, whilst the majority do. The regular Rifleman will accept the new config and work fine, however a Squad Leader won't. Here's currently what I have in my config, with the majority of the classes cut out (it's literally the entirety of OPFOR so it'd create unnecessary length):

class CfgPatches {
   class unit_config {
       units[] = {};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {"A3_Characters_F_BLUFOR"};
   };
};
class CfgVehicles {
   class TEC_O_Soldier_F {
       magazines[] = {"hlc_30Rnd_545x39_B_AK","hlc_30Rnd_545x39_B_AK","hlc_30Rnd_545x39_B_AK","hlc_30Rnd_545x39_B_AK","hlc_30Rnd_545x39_B_AK","hlc_30Rnd_545x39_B_AK","16Rnd_9x21_Mag","16Rnd_9x21_Mag"};
       weapons[] = {"hlc_rifle_ak74","hgun_rook40_F","Throw","Put"};
   };
   class TEC_O_Officer_C_F {
       magazines[] = {"hlc_30Rnd_545x39_B_AK","hlc_30Rnd_545x39_B_AK","hlc_30Rnd_545x39_B_AK","hlc_30Rnd_545x39_B_AK","hlc_30Rnd_545x39_B_AK","hlc_30Rnd_545x39_B_AK","16Rnd_9x21_Mag","16Rnd_9x21_Mag"};
       weapons[] = {"hlc_rifle_aks74","hgun_rook40_F","Binocular","Throw","Put"};
   };
};

I stole the CfgPatches from one of your earlier posts, as it doesn't work without, but I'm unaware of how significant it actually is. The TEC_O_Soldier_F in this example works just fine, but the Officer doesn't. At first I was thinking I'd need to copy weapons exactly (1 primary weapon, 1 sidearm, Binoculars and throw and put), but that didn't seem to fix it. Neither did adding hand grenades and smokes from the original loadout. I've actually already run out of ideas, and I'd like to hear if you have any. If it helps, there's no run-time errors and spelling errors have been fixed. This particular config is using the Alternative CSAT, but the class names are also correct.

Share this post


Link to post
Share on other sites

Well, i've never done this before but what it looks like is you have the Officer class name incorrect. Try having the class name being "TEC_O_Officer_F" rather than what you have there because there isn't a default unit that has a class name of "O_Officer_C_F". It may or may not work but it's worth a shot. :)

--Edit--

Do any other units apart from the officer not work?

Edited by Teeha

Share this post


Link to post
Share on other sites

Yeah the classname's correct. TEC_O_Officer_C_F is just the Combat © version of the Officer. Pretty much all the units with C in their name don't work, in addition to _SL, _TL and _GL versions. An additional note, they have proper magazines added to the magazines array but weapons are left standard, surprisingly with proper ammo.

Literally the ONLY problem right now is that neither class that's affected get their guns added - magazines get added properly, but not guns. The array is fine, no errors are thrown in and even the class is fine as magazines clearly get added. I have zero idea what could cause this.

Further testing shows that anything inbetween the main unit name (Medic, for example) will partially break their config. For instance TEC_O_Soldier_F will work, but TEC_O_Officer_C_F won't. Same with _SL, _TL, _GL as mentioned previosly. Still no closer as to why it's happening.

http://pastebin.com/tkZibVJn

Pastebin if you want to take a look at the config as a whole, marked broken units with a comment. Formatting is a bit off but is alright in the actual cpp file.

Edited by tryteyker

Share this post


Link to post
Share on other sites

Try putting the _C in front of the O_Officer_F rather than in it. So something like TEC_C_O_Officer_F may work. Give that a shot and see if it wants to work that way.

Share this post


Link to post
Share on other sites

I am doing the same thing and everything is going ok, except I need to add attachments to my weapon, but I am using the RH M4 pack so the weapons dont come with attachments on them, therefore I cannot use the method stated on the page before. Anyone know how to place attachment on the weapons. Thank you

Share this post


Link to post
Share on other sites

Do you want to have a new weapon with the attachments on it? So if you were in VAS it would show let's say "M4A1 with EOTech"? If so, here is a config you can do that with.

enum {
OrdinalEnum = 2,
destructengine = 2,
destructdefault = 6,
destructwreck = 7,
destructtree = 3,
destructtent = 4,
stabilizedinaxisx = 1,
stabilizedinaxesxyz = 4,
stabilizedinaxisy = 2,
stabilizedinaxesboth = 3,
destructno = 0,
stabilizedinaxesnone = 0,
destructman = 5,
destructbuilding = 1
};

class CfgPatches
{
class weapon_cfg
{
	requiredaddons[] = {"A3_Weapons_F"};
	requiredversion = 1.0;
	units[] = {};
	weapons[] = {};
	magazines[] = {};
};
};

class CfgWeapons
{
class CLASSNAME OF WEAPON;
class CLASSNAME OF WEAPON2;

class CLASSNAME OF NEW WEAPON: CLASSNAME OF WEAPON
{
	displayName = "IN GAME NAME";
	class LinkedItems
	{
		class LinkedItemsOptic
		{
			slot = "CowsSlot";
			item = "OPTIC CLASSNAME HERE";
		};
		class LinkedItemsMuzzle
		{
			slot = "MuzzleSlot";
			item = "MUZZLE ATTACHMENT CLASSNAME HERE";
		};
		class LinkedItemsAcc
		{
			slot = "PointerSlot";
			item = "IR POINTER/FLASHLIGHT CLASSNAME HERE";
		};
	};
};
class CLASSNAME OF NEW WEAPON2: CLASSNAME OF WEAPON2
{
	displayName = "IN GAME NAME";
	class LinkedItems
	{
		class LinkedItemsOptic
		{
			slot = "CowsSlot";
			item = "OPTIC CLASSNAME HERE";
		};
		class LinkedItemsMuzzle
		{
			slot = "MuzzleSlot";
			item = "MUZZLE ATTACHMENT CLASSNAME HERE";
		};
		class LinkedItemsAcc
		{
			slot = "PointerSlot";
			item = "IR POINTER/FLASHLIGHT CLASSNAME HERE";
		};
	};
};
};

Replace the CLASSNAME OF WEAPON with the classname of the weapon you wish to add attachments and if you want to make more than just two weapons w/ attachments you can just copy and paste the primary portion but make sure to also add the class at the beginning as well.

Share this post


Link to post
Share on other sites
Do you want to have a new weapon with the attachments on it? So if you were in VAS it would show let's say "M4A1 with EOTech"? If so, here is a config you can do that with.

enum {
OrdinalEnum = 2,
destructengine = 2,
destructdefault = 6,
destructwreck = 7,
destructtree = 3,
destructtent = 4,
stabilizedinaxisx = 1,
stabilizedinaxesxyz = 4,
stabilizedinaxisy = 2,
stabilizedinaxesboth = 3,
destructno = 0,
stabilizedinaxesnone = 0,
destructman = 5,
destructbuilding = 1
};

class CfgPatches
{
class weapon_cfg
{
	requiredaddons[] = {"A3_Weapons_F"};
	requiredversion = 1.0;
	units[] = {};
	weapons[] = {};
	magazines[] = {};
};
};

class CfgWeapons
{
class CLASSNAME OF WEAPON;
class CLASSNAME OF WEAPON2;

class CLASSNAME OF NEW WEAPON: CLASSNAME OF WEAPON
{
	displayName = "IN GAME NAME";
	class LinkedItems
	{
		class LinkedItemsOptic
		{
			slot = "CowsSlot";
			item = "OPTIC CLASSNAME HERE";
		};
		class LinkedItemsMuzzle
		{
			slot = "MuzzleSlot";
			item = "MUZZLE ATTACHMENT CLASSNAME HERE";
		};
		class LinkedItemsAcc
		{
			slot = "PointerSlot";
			item = "IR POINTER/FLASHLIGHT CLASSNAME HERE";
		};
	};
};
class CLASSNAME OF NEW WEAPON2: CLASSNAME OF WEAPON2
{
	displayName = "IN GAME NAME";
	class LinkedItems
	{
		class LinkedItemsOptic
		{
			slot = "CowsSlot";
			item = "OPTIC CLASSNAME HERE";
		};
		class LinkedItemsMuzzle
		{
			slot = "MuzzleSlot";
			item = "MUZZLE ATTACHMENT CLASSNAME HERE";
		};
		class LinkedItemsAcc
		{
			slot = "PointerSlot";
			item = "IR POINTER/FLASHLIGHT CLASSNAME HERE";
		};
	};
};
};

Replace the CLASSNAME OF WEAPON with the classname of the weapon you wish to add attachments and if you want to make more than just two weapons w/ attachments you can just copy and paste the primary portion but make sure to also add the class at the beginning as well.

Thanks Teeha, I am now having problems, but I am getting no errors, would I be able to give you what I have and could you have a look through it and tell me if you see anything wrong. Any help would be much appreciated.

--Edit--

Fixed it, was missing a semicolon at the end of a line :|

Thanks for the weapon help tho.

--2nd Edit--

I wasnt looking to create another weapon, but just add attachments to a weapon. So for instance I have an M4A1, in the RH pack, and I want to have the player spawn with just the normal M4A1, but with lets say a laster pointer. So I dont want to create a new weapon, just want the player to spawn with attachments on the weapon.

Edited by MarcusCunningham

Share this post


Link to post
Share on other sites

Well if you only want to do it one time or for just a mission you're making the easiest way would to just script it in the init of the unit.

You could use this:

this addPrimaryWeaponItem "RH_peq2";

That would add the RH PEQ2 IR Laser to the primary weapon of the unit. If you would also like to add a scope and/or suppressor you could copy and paste that code except replace the "RH_peq2" with the class name of that optic/suppressor. After you set that up for one unit you could copy and paste it in the init of all of the other unit's you wish to have the attachments on.

---------- Post added at 08:24 PM ---------- Previous post was at 08:22 PM ----------

Tryteyker, did you ever get things working?

Share this post


Link to post
Share on other sites

I didnt want to have to add anything to the players init, but I wanted the player to spawn with attachments, is the only way to do this through creating a new weapon with those attachments?

Share this post


Link to post
Share on other sites

If you just want to plop down a unit and want it to have the exact weapons you designated, you're going to have to make a new unit (Unless RH has unit's as well but I don't believe he does). Is there a reason you don't want anything in the init? Because unless you're doing this on a regular basis with those exact weapon layouts that will be the easiest way.

Share this post


Link to post
Share on other sites

Yeah I will just make a new weapon with those attachments, and yeah I am doing this on a regular basis (for my community) so I dont want to have to add anything to the players init. Thanks for the help again.

Share this post


Link to post
Share on other sites

If you are doing it for a community and will be doing it on a regular basis, the best way (Not necessarily the easiest way but it's not too hard) would be making a unit or set of units w/ the weapons. Ill edit this soon with a config that includes a working unit with a weapon w/ the weapon attachments. Just give me a little while so I can test it and make sure it works.

Share this post


Link to post
Share on other sites

Here we go, new faction and all.

enum {
 //  = 2,	// Error parsing: Empty enum name
DESTRUCTENGINE = 2,
DESTRUCTDEFAULT = 6,
DESTRUCTWRECK = 7,
DESTRUCTTREE = 3,
DESTRUCTTENT = 4,
STABILIZEDINAXISX = 1,
STABILIZEDINAXESXYZ = 4,
STABILIZEDINAXISY = 2,
STABILIZEDINAXESBOTH = 3,
DESTRUCTNO = 0,
STABILIZEDINAXESNONE = 0,
DESTRUCTMAN = 5,
DESTRUCTBUILDING = 1,
};
class CfgPatches {
class unit_config {
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Characters_F_BLUFOR"};
};
};
class CfgFactionClasses
{
class c_units
{
	displayName = "NEW FACTION NAME HERE";
	author = "MarcusCunningham";
	priority = 2;
	side = 1;
};
};
class CfgVehicleClasses
{
class m_units
{
	displayName = "Men";
};
};
class CfgVehicles {
class B_Soldier_base_F;

class c_SquadLeader : B_Soldier_base_F {
	_generalMacro = "c_SquadLeader"; 
	scope = 2;
	displayName = "Squad Leader";
	faction = c_units;
	vehicleClass = "m_units";
	icon = "iconManLeader";
	nakedUniform = "U_BasicBody";  
	uniformClass = "U_B_CombatUniform_mcam";
	backpack = "B_AssaultPack_khk";
	linkedItems[] = {"V_PlateCarrier3_rgr", "H_HelmetB_light", "NVGoggles", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	respawnLinkedItems[] = {"V_PlateCarrier3_rgr", "H_HelmetB_light", "NVGoggles", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	weapons[] = {"c_RH_M4A1_ris_eosd","Binocular"};
	respawnweapons[] = {"c_RH_M4A1_ris_eosd","Binocular"};
	magazines[] = {"30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade","HandGrenade","SmokeShell","SmokeShell","SmokeShell"};
	Respawnmagazines[] = {"30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade","HandGrenade","SmokeShell","SmokeShell","SmokeShell"};
	};
class c_Rifleman : B_Soldier_base_F {
	_generalMacro = "c_SquadLeader"; 
	scope = 2;
	displayName = "Rifleman";
	faction = c_units;
	vehicleClass = "m_units";
	nakedUniform = "U_BasicBody";  
	uniformClass = "U_B_CombatUniform_mcam";
	backpack = "B_AssaultPack_khk";
	linkedItems[] = {"V_PlateCarrier3_rgr", "H_HelmetB_light", "NVGoggles", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	respawnLinkedItems[] = {"V_PlateCarrier3_rgr", "H_HelmetB_light", "NVGoggles", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	weapons[] = {"c_RH_M4A1_ris_eosd"};
	respawnweapons[] = {"c_RH_M4A1_ris_eosd"};
	magazines[] = {"30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade","HandGrenade",};
	Respawnmagazines[] = {"30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade","HandGrenade",};
	};
};
class CfgWeapons
{
class RH_M4A1_ris;

class c_RH_M4A1_ris_eosd : RH_M4A1_ris
{
	displayName = "M4A1 RIS EOTech SD";
	picture = "\RH_m4\inv\m4_ris_x_ca.paa";
	class LinkedItems
	{
		class LinkedItemsOptic
		{
			slot = "CowsSlot";
			item = "RH_eotech553";
		};
		class LinkedItemsMuzzle
		{
			slot = "MuzzleSlot";
			item = "RH_qdss_nt4";
		};
		class LinkedItemsAcc
		{
			slot = "PointerSlot";
			item = "RH_peq2";
		};
	};
};
class c_RH_M4A1_ris_agsd : RH_M4A1_ris
{
	displayName = "M4A1 RIS ACOG SD";
	picture = "\RH_m4\inv\m4_ris_x_ca.paa";
	class LinkedItems
	{
		class LinkedItemsOptic
		{
			slot = "CowsSlot";
			item = "RH_ta31rco";
		};
		class LinkedItemsMuzzle
		{
			slot = "MuzzleSlot";
			item = "RH_qdss_nt4";
		};
		class LinkedItemsAcc
		{
			slot = "PointerSlot";
			item = "RH_peq2";
		};
	};
};
class c_RH_M4A1_ris_eo : RH_M4A1_ris
{
	displayName = "M4A1 RIS EOTech";
	picture = "\RH_m4\inv\m4_ris_x_ca.paa";
	class LinkedItems
	{
		class LinkedItemsOptic
		{
			slot = "CowsSlot";
			item = "RH_eotech553";
		};
		class LinkedItemsMuzzle
		{
			slot = "MuzzleSlot";
			item = "";
		};
		class LinkedItemsAcc
		{
			slot = "PointerSlot";
			item = "RH_peq2";
		};
	};
};
class c_RH_M4A1_ris_ag : RH_M4A1_ris
{
	displayName = "M4A1 RIS ACOG";
	picture = "\RH_m4\inv\m4_ris_x_ca.paa";
	class LinkedItems
	{
		class LinkedItemsOptic
		{
			slot = "CowsSlot";
			item = "RH_eotech553";
		};
		class LinkedItemsMuzzle
		{
			slot = "MuzzleSlot";
			item = "";
		};
		class LinkedItemsAcc
		{
			slot = "PointerSlot";
			item = "RH_peq2";
		};
	};
};
};

I made a few example weapons from the RH weapon pack and made two units that use one of the four example weapons. Let me know how this works for you. :)

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  

×