greywolf907 20 Posted January 25, 2016 So I have created a re textured rifle and can not figure out how to have a default scope attached to it through the config.cpp file. I would like to link a RCO scope to the rifle so that if I spawn in a unit with Zeus the AI will have a scope or if I play as one of my custom units on a mission that uses the re textured rifle I have a scope to use. Thanks for any help Share this post Link to post Share on other sites
Lala14 135 Posted January 25, 2016 https://forums.bistudio.com/topic/187526-add-primary-weapon-item-to-cfgvehicle-need-help/#entry2970304 Share this post Link to post Share on other sites
greywolf907 20 Posted January 25, 2016 Ok well I can get it to work but then I can't see my 2nd weapons in the virtual arsenal how can I incorporate it into my config and make it work how it does now but with the attachments and also so I can have different attachments on the second weapon? thanks. Here is what I have for the config.cpp class CfgPatches { class T1_WEAPONS { units[] = {}; weapons[] = {}; requiredVersion = 0.1; }; }; class cfgWeapons { //******************************************************************************************************************************************************************************************** //***** Rifles ***************************************************************************************************************************************************** //******************************************************************************************************************************************************************************************** class arifle_MXM_F; class T1_MD_KRIP_W: arifle_MXM_F { baseWeapon = "T1_MD_KRIPT_W"; displayName = "MXM MANDRAKE [TIER1]"; hiddenSelections[] = {"camo1"}; hiddenSelectionsTextures[] = {"T1_WEAPONS\Data\T1_MXM_MDK.paa"}; picture = "\T1_WEAPONS\UI\MD_MXM.paa"; scopeCurator = 2; }; class arifle_MXM_F_1; class T1_MDN_KRIP_W: arifle_MXM_F { baseWeapon = "T1_MDN_KRIPT_W"; displayName = "MXM MANDRAKE NET [TIER1]"; hiddenSelections[] = {"camo1"}; hiddenSelectionsTextures[] = {"T1_WEAPONS\Data\T1_MXM_MD_N.paa"}; picture = "\T1_WEAPONS\UI\MD_MXM.paa"; scopeCurator = 2; }; }; Share this post Link to post Share on other sites
El_Guiguitre 13 Posted January 25, 2016 https://community.bistudio.com/wiki/Arma_3_Characters_And_Gear_Encoding_Guide To have something show in the arsenal you need to define the scope. scopeArsenal = 2; // 2 = class is available in the Virtual Arsenal; 0 = class is unavailable in the Virtual Arsenal. Share this post Link to post Share on other sites
greywolf907 20 Posted January 25, 2016 Well even without the line scopeArsenal = 2; my weapons show up in the arsenal but when I add the lines to attach the scope and suppressor the weapon I add the lines to in the config no longer shows up in the arsenal even with the scopeArsenal line. Can you please take my config above and show me how to make it work with the attachments and arsenal? Thanks for the help Share this post Link to post Share on other sites
Rich_R 1087 Posted January 26, 2016 I think you need to add the following. Note the attachments here are RH's...you just need to change out the class names; { class LinkedItems { class LinkedItemsOptic { slot = "CowsSlot"; item = "optic_hamr"; }; class LinkedItemsAcc { slot = "PointerSlot"; item = "RH_peq2"; }; class LinkedItemsMuzzle { slot = "MuzzleSlot"; item = "RH_qdss_nt4"; }; }; }; Share this post Link to post Share on other sites
greywolf907 20 Posted January 26, 2016 So where do I add this into my config above? At the end or in the field of the rifles or what? Everything I try seems to give me a error or messes up the second gun being in the arsenal. Thanks Share this post Link to post Share on other sites
road runner 4344 Posted January 26, 2016 This needs to be moved to the configs section. Share this post Link to post Share on other sites
greywolf907 20 Posted January 26, 2016 Thanks for the info. Share this post Link to post Share on other sites
El_Guiguitre 13 Posted January 26, 2016 You add it like this. class CfgPatches { class ELG_HLC_replacement_AAF { units[] = {}; weapons[] = {"AAF_hlc_rifle_G36C"}; requiredVersion = 0.1; requiredAddons[] = {"hlcweapons_g36", "RH_acc"}; }; }; class CfgVehicles { class I_Soldier_base_F; class I_Soldier_lite_F : I_Soldier_base_F { weapons[] = {"AAF_hlc_rifle_G36C", "hgun_ACPC2_F", "Throw", "Put"}; respawnWeapons[] = {"AAF_hlc_rifle_G36C", "hgun_ACPC2_F", "Throw", "Put"}; magazines[] = {"hlc_30rnd_556x45_EPR_G36", "hlc_30rnd_556x45_EPR_G36", "hlc_30rnd_556x45_EPR_G36", "hlc_30rnd_556x45_EPR_G36", "9Rnd_45ACP_Mag", "9Rnd_45ACP_Mag", "9Rnd_45ACP_Mag", "SmokeShell", "SmokeShellGreen", "Chemlight_green", "Chemlight_green"}; respawnMagazines[] = {"hlc_30rnd_556x45_EPR_G36", "hlc_30rnd_556x45_EPR_G36", "hlc_30rnd_556x45_EPR_G36", "hlc_30rnd_556x45_EPR_G36", "9Rnd_45ACP_Mag", "9Rnd_45ACP_Mag", "9Rnd_45ACP_Mag", "SmokeShell", "SmokeShellGreen", "Chemlight_green", "Chemlight_green"}; }; class CfgWeapons { class hlc_rifle_G36C; class AAF_hlc_rifle_G36C : hlc_rifle_G36C { scope = protected; class LinkedItems { class LinkedItemsOptic { slot = "asdg_OpticRail_G36C"; item = "RH_eothhs1"; }; class LinkedItemsAcc { slot = "asdg_fsr_36C"; item = "acc_pointer_IR"; }; }; }; }; 1 Share this post Link to post Share on other sites
greywolf907 20 Posted January 26, 2016 What is the line scope = protected; for? Also is there not a way to just do this within my weapons config as I have my different re textured addons separated in different files weapons, NATO units, Ghillie Units, ETC... Really did not want to add my weapons code line into my units config. Thanks Share this post Link to post Share on other sites
El_Guiguitre 13 Posted January 27, 2016 "scope=protected" comes from a macro #define private 0 #define protected 1 #define public 2 and it means this: 2 = class is available in the editor; 1 = class is unavailable in the editor, but can be accessed via a macro; 0 = class is unavailable (and used for inheritance only). Also is there not a way to just do this within my weapons config as I have my different re textured addons separated in different files weapons, NATO units, Ghillie Units, ETC... Really did not want to add my weapons code line into my units config. Thanks If you want your units to spawn with your custom rifle, you need to add it in their class, but you can do it in another config file, where you just define the "weapons" and "respawnWeapons" parameters. Share this post Link to post Share on other sites