Jump to content
Sign in to follow this  
dirtynorf

How to use Joint Rails to customise weapons?

Recommended Posts

I'm trying to make units obviously with custom loadouts however I cannot manage to put attachments on the weapon. I tried using "linkedItems" in the unit class but didn't work so I'm trying to make a "new weapon" that includes the attachments. I''ve had a go at looking at various other mods doing this (massi, RHS etc) but they've been no help.

 

I'm using EricJ Weapons, RHS, Joint Rails and TRYK (unimportant for weapons) and this is my code so far:

//NATO Special Operators Pack
//by DirtyNorf

class CfgPatches
{
	class ddrf_nsop
	{
		units[]={};
		weapons[]=
		{
				"ej_scarstandard",
				"rhsusf_acc_anpeq15",
				"rhsusf_acc_eotech_552",
				"HarrisDLC"
			
		};
		requiredVersion=0.1;
		requiredAddons[]=
		{
			"A3_Characters_F",
			"rhsusf_weapons",
			"rhsusf_c_weapons",
			"rhsusf_weapons2",
			"essgoggles",
			"hrp",
			"kio_balaclava",
			"shemagh",
			"tryk_backpack",
			"tryk_uniforms",
			"tryk_unit",
			"zabb",
			"zabb2",
			"zara",
			"asdg_jointrails"
		};
	};
};

class CfgFactionClasses
{
	class ddrf_nsop
	{
			displayName = "NATO Special Operations"
			priority = 1;
			side = 1;
	};
};

class CfgVehicleClasses
{
	class ddrf_nsop_green_scar
	{
		displayName="Green (SCAR)";
		priority = 2;
	};
	
	class ddrf_nsop_green_m4
	{
		displayName="Green (M4)";
		priority = 3;
	};
	
};
class CfgVehicles
{
	class B_Soldier_F;
	class ddrf_green_scar_operator: B_Soldier_F
	{
		side = 1;
		faction = "ddrf_nsop";
		vehicleClass = "ddrf_nsop_green_scar";
		scope=2;
		displayName="Operator (Green)";
		uniformAccessories[]={};
		nakedUniform="U_BasicBody";
		uniformClass="TRYK_U_B_OD_BLK_2";
		model="\A3\Characters_F\BLUFOR\b_soldier_01.p3d";
		weapons[]=
		{
			"scarl_EO_AN15_HA",
			"hgun_P07_F",
			"Throw",
			"Put",
			"Binocular"
		};
		respawnWeapons[]=
		{
			"scarl_EO_AN15_HA",
			"hgun_P07_F",
			"Throw",
			"Put",
			"Binocular"
		};
		linkedItems[]=
		{
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"rhsusf_acc_anpeq15",
			"rhsusf_acc_eotech_552",
			"HarrisDLC"
		};
		RespawnItems[]=
		{
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"rhsusf_acc_anpeq15",
			"rhsusf_acc_eotech_552",
			"HarrisDLC"
		};
		magazines[]=
		{
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"SmokeShell",
			"SmokeShell",
			"HandGrenade",
			"HandGrenade"
		};
		respawnMagazines[]=
		{
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"M4318_mag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"SmokeShell",
			"SmokeShell",
			"HandGrenade",
			"HandGrenade"
		};
	};
};

class CfgWeapons
{
	class rhsusf_acc_anpeq15;
	class rhsusf_acc_eotech_552;
	class HarrisDLC;
	class ej_scarstandard;
	class scarl_EO_AN15_HA: ej_scarstandard
    {
        scope = 2;
        displayName = "SCAR L (EOTECH)";
        class LinkedItems
        {
			class LinkedItemsOptic
			{
				slot = "CowsSlot";
				item = "rhsusf_acc_eotech_552";
			};
			class LinkedItemsUnder
			{
				slot = "UnderBarrelSlot";
				item = "HarrisDLC";
			};
	 
			class LinkedItemsAcc
			{
				slot = "PointerSlot";
				item = "rhsusf_acc_anpeq15";
			};
        };
		
		class WeaponSlotsInfo
		{
			class SlotInfo;
			class asdg_OpticRail1913;
			class asdg_FrontSideRail;
			class asdg_FrontSideRail_IAR;
			class asdg_UnderSlot;
			allowedslots[]={901};
			mass=60;
			class MuzzleSlot: SlotInfo
			{
				access=1;
				compatibleitems[]=
				{
					"muzzle_snds_M",
					"SF556_ej",
					"SF556blk_ej",
					"SFLMGMini_ej",
					"SFLMGTMini_ej",
					"ej_mzls_M",
					"SFSOCOM_ej",
					"SFSOCOMT_ej"
				};
				displayname="Muzzle Slot";
				linkproxy="\A3\data_f\proxies\weapon_slots\MUZZLE";
				scope=0;
			};
			class asdg_OpticRail1913_long: asdg_OpticRail1913
			{
				compatibleitems[]={"rhsusf_acc_eotech_552"};
			};
			class asdg_FrontSideRail_IAR: asdg_FrontSideRail
			{
				compatibleitems[]={"rhsusf_acc_anpeq15"};
			};
			class UnderBarrelSlot: asdg_UnderSlot
			{
				compatibleitems[]={"HarrisDLC"};
			};
		};
    };
};

Any help?

Share this post


Link to post
Share on other sites
Master classes has to be defined outside any class..
Why are you using scope=0; on the muzzleslot class?, On the LinkedItemsOptics there is a slot which it doesn't exist (Crowslot).
You haven't to add a weapon on the weapon[] array on CfgPatches which it already exist! You have to add the new weapon you have created in the CfgWeapons.
As ASDG don't use arrays for add new items you have to work with clases as well.. Here is your config which I think it will work better...
 
 
//NATO Special Operators Pack
//by DirtyNorf


class CfgPatches
{
    class ddrf_nsop
    {
        units[]={};
        weapons[]=
        {
                "scarl_EO_AN15_HA"            
        };
        requiredVersion=0.1;
        requiredAddons[]=
        {
            "A3_Characters_F",
            "rhsusf_weapons",
            "rhsusf_c_weapons",
            "rhsusf_weapons2",
            "essgoggles",
            "hrp",
            "kio_balaclava",
            "shemagh",
            "tryk_backpack",
            "tryk_uniforms",
            "tryk_unit",
            "zabb",
            "zabb2",
            "zara",
            "asdg_jointrails"
        };
    };
};


class CfgFactionClasses
{
    class ddrf_nsop
    {
            displayName = "NATO Special Operations"
            priority = 1;
            side = 1;
    };
};


class CfgVehicleClasses
{
    class ddrf_nsop_green_scar
    {
        displayName="Green (SCAR)";
        priority = 2;
    };
    
    class ddrf_nsop_green_m4
    {
        displayName="Green (M4)";
        priority = 3;
    };
    
};
class CfgVehicles
{
    class B_Soldier_F;
    class ddrf_green_scar_operator: B_Soldier_F
    {
        side = 1;
        faction = "ddrf_nsop";
        vehicleClass = "ddrf_nsop_green_scar";
        scope=2;
        displayName="Operator (Green)";
        uniformAccessories[]={};
        nakedUniform="U_BasicBody";
        uniformClass="TRYK_U_B_OD_BLK_2";
        model="\A3\Characters_F\BLUFOR\b_soldier_01.p3d";
        weapons[]=
        {
            "scarl_EO_AN15_HA",
            "hgun_P07_F",
            "Throw",
            "Put",
            "Binocular"
        };
        respawnWeapons[]=
        {
            "scarl_EO_AN15_HA",
            "hgun_P07_F",
            "Throw",
            "Put",
            "Binocular"
        };
        linkedItems[]=
        {
            "FirstAidKit",
            "FirstAidKit",
            "FirstAidKit",
            "FirstAidKit",
            "rhsusf_acc_anpeq15",
            "rhsusf_acc_eotech_552",
            "HarrisDLC"
        };
        RespawnItems[]=
        {
            "FirstAidKit",
            "FirstAidKit",
            "FirstAidKit",
            "FirstAidKit",
            "rhsusf_acc_anpeq15",
            "rhsusf_acc_eotech_552",
            "HarrisDLC"
        };
        magazines[]=
        {
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "16Rnd_9x21_Mag",
            "16Rnd_9x21_Mag",
            "SmokeShell",
            "SmokeShell",
            "HandGrenade",
            "HandGrenade"
        };
        respawnMagazines[]=
        {
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "16Rnd_9x21_Mag",
            "16Rnd_9x21_Mag",
            "SmokeShell",
            "SmokeShell",
            "HandGrenade",
            "HandGrenade"
        };
    };
};
class SlotInfo;


class asdg_OpticRail1913_long;
class asdg_FrontSideRail;
class asdg_UnderSlot;
class asdg_MuzzleSlot_556;
class CfgWeapons
{
    class rhsusf_acc_anpeq15;
    class rhsusf_acc_eotech_552;
    class HarrisDLC;
    class ej_scarstandard;
    class scarl_EO_AN15_HA: ej_scarstandard
{
scope = 2;
displayName = "SCAR L (EOTECH)";
class LinkedItems
{
            class LinkedItemsOptic
            {
                slot = "CowsSlot";
                item = "rhsusf_acc_eotech_552";
            };
            class LinkedItemsUnder
            {
                slot = "UnderBarrelSlot";
                item = "HarrisDLC";
            };
            class LinkedItemsAcc
            {
                slot = "PointerSlot";
                item = "rhsusf_acc_anpeq15";
            };
};
        class WeaponSlotsInfo
        {
            allowedslots[]={901};
            mass=60;
            class MuzzleSlot: asdg_MuzzleSlot_556
            {
                compatibleitems : compatibleitems 
                {
                    muzzle_snds_M = 1;
                    SF556_ej = 1;
                    SF556blk_ej = 1;
                    SFLMGMini_ej = 1;
                    SFLMGTMini_ej = 1;
                    ej_mzls_M = 1;
                    SFSOCOM_ej = 1;
                    SFSOCOMT_ej = 1;
                };
            };
            class CowsSlot : asdg_OpticRail1913_long
            {
                compatibleitems : compatibleitems
                {
                      rhsusf_acc_eotech_552 = 1;
                };
            };
            class PointerSlot : asdg_FrontSideRail
            {
                compatibleitems : compatibleitems
                {
                      rhsusf_acc_anpeq15 = 1;
                };
            };
            class UnderBarrelSlot: asdg_UnderSlot
            {
                compatibleitems : compatibleitems
                {
                      HarrisDLC = 1;
                };
            };
        };
};
};

Anyway I haven't here the RHS config (with ASDG extra pbo added) but It won't be required in order to work adding those attachments here, just inherit those slot from asdg_OpticRail1913_long / asdg_UnderSlot / asdg_FrontSideRail / asdg_MuzzleSlot_556 and ASDG+RHS+RHS_ASDG_extra will do the job...

 

Hope it helps

Share this post


Link to post
Share on other sites

 

Master classes has to be defined outside any class..
Why are you using scope=0; on the muzzleslot class?, On the LinkedItemsOptics there is a slot which it doesn't exist (Crowslot).
You haven't to add a weapon on the weapon[] array on CfgPatches which it already exist! You have to add the new weapon you have created in the CfgWeapons.
As ASDG don't use arrays for add new items you have to work with clases as well.. Here is your config which I think it will work better...
 
 
//NATO Special Operators Pack
//by DirtyNorf


class CfgPatches
{
    class ddrf_nsop
    {
        units[]={};
        weapons[]=
        {
                "scarl_EO_AN15_HA"            
        };
        requiredVersion=0.1;
        requiredAddons[]=
        {
            "A3_Characters_F",
            "rhsusf_weapons",
            "rhsusf_c_weapons",
            "rhsusf_weapons2",
            "essgoggles",
            "hrp",
            "kio_balaclava",
            "shemagh",
            "tryk_backpack",
            "tryk_uniforms",
            "tryk_unit",
            "zabb",
            "zabb2",
            "zara",
            "asdg_jointrails"
        };
    };
};


class CfgFactionClasses
{
    class ddrf_nsop
    {
            displayName = "NATO Special Operations"
            priority = 1;
            side = 1;
    };
};


class CfgVehicleClasses
{
    class ddrf_nsop_green_scar
    {
        displayName="Green (SCAR)";
        priority = 2;
    };
    
    class ddrf_nsop_green_m4
    {
        displayName="Green (M4)";
        priority = 3;
    };
    
};
class CfgVehicles
{
    class B_Soldier_F;
    class ddrf_green_scar_operator: B_Soldier_F
    {
        side = 1;
        faction = "ddrf_nsop";
        vehicleClass = "ddrf_nsop_green_scar";
        scope=2;
        displayName="Operator (Green)";
        uniformAccessories[]={};
        nakedUniform="U_BasicBody";
        uniformClass="TRYK_U_B_OD_BLK_2";
        model="\A3\Characters_F\BLUFOR\b_soldier_01.p3d";
        weapons[]=
        {
            "scarl_EO_AN15_HA",
            "hgun_P07_F",
            "Throw",
            "Put",
            "Binocular"
        };
        respawnWeapons[]=
        {
            "scarl_EO_AN15_HA",
            "hgun_P07_F",
            "Throw",
            "Put",
            "Binocular"
        };
        linkedItems[]=
        {
            "FirstAidKit",
            "FirstAidKit",
            "FirstAidKit",
            "FirstAidKit",
            "rhsusf_acc_anpeq15",
            "rhsusf_acc_eotech_552",
            "HarrisDLC"
        };
        RespawnItems[]=
        {
            "FirstAidKit",
            "FirstAidKit",
            "FirstAidKit",
            "FirstAidKit",
            "rhsusf_acc_anpeq15",
            "rhsusf_acc_eotech_552",
            "HarrisDLC"
        };
        magazines[]=
        {
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "16Rnd_9x21_Mag",
            "16Rnd_9x21_Mag",
            "SmokeShell",
            "SmokeShell",
            "HandGrenade",
            "HandGrenade"
        };
        respawnMagazines[]=
        {
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "M4318_mag",
            "16Rnd_9x21_Mag",
            "16Rnd_9x21_Mag",
            "SmokeShell",
            "SmokeShell",
            "HandGrenade",
            "HandGrenade"
        };
    };
};
class SlotInfo;


class asdg_OpticRail1913_long;
class asdg_FrontSideRail;
class asdg_UnderSlot;
class asdg_MuzzleSlot_556;
class CfgWeapons
{
    class rhsusf_acc_anpeq15;
    class rhsusf_acc_eotech_552;
    class HarrisDLC;
    class ej_scarstandard;
    class scarl_EO_AN15_HA: ej_scarstandard
{
scope = 2;
displayName = "SCAR L (EOTECH)";
class LinkedItems
{
            class LinkedItemsOptic
            {
                slot = "CowsSlot";
                item = "rhsusf_acc_eotech_552";
            };
            class LinkedItemsUnder
            {
                slot = "UnderBarrelSlot";
                item = "HarrisDLC";
            };
            class LinkedItemsAcc
            {
                slot = "PointerSlot";
                item = "rhsusf_acc_anpeq15";
            };
};
        class WeaponSlotsInfo
        {
            allowedslots[]={901};
            mass=60;
            class MuzzleSlot: asdg_MuzzleSlot_556
            {
                compatibleitems : compatibleitems 
                {
                    muzzle_snds_M = 1;
                    SF556_ej = 1;
                    SF556blk_ej = 1;
                    SFLMGMini_ej = 1;
                    SFLMGTMini_ej = 1;
                    ej_mzls_M = 1;
                    SFSOCOM_ej = 1;
                    SFSOCOMT_ej = 1;
                };
            };
            class CowsSlot : asdg_OpticRail1913_long
            {
                compatibleitems : compatibleitems
                {
                      rhsusf_acc_eotech_552 = 1;
                };
            };
            class PointerSlot : asdg_FrontSideRail
            {
                compatibleitems : compatibleitems
                {
                      rhsusf_acc_anpeq15 = 1;
                };
            };
            class UnderBarrelSlot: asdg_UnderSlot
            {
                compatibleitems : compatibleitems
                {
                      HarrisDLC = 1;
                };
            };
        };
};
};

Anyway I haven't here the RHS config (with ASDG extra pbo added) but It won't be required in order to work adding those attachments here, just inherit those slot from asdg_OpticRail1913_long / asdg_UnderSlot / asdg_FrontSideRail / asdg_MuzzleSlot_556 and ASDG+RHS+RHS_ASDG_extra will do the job...

 

Hope it helps

 

Apologies for the really late reply, I didn't realise anyone replied. I've changed it (and to note had to remove ":compatibleitems" and replace it with a = but now I get an error that it cannot read the config file when trying to pbo with the addon builder.

 

It's saying there is an input after the end of the file.

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  

×