Jump to content
Sign in to follow this  
dren

Adding Optics etc in config

Recommended Posts

Hello!

How in earth i can add optic for soldier via conifg?

as seemly linkedItems wont add it..

Here is one of the soldiers config

class EventHandlers; // External class reference

Items[] = {"FirstAidKit"};

RespawnItems[] = {"FirstAidKit"};

linkedItems[] = {"H_HelmetB", "V_TacVest_khk", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio","ItemGPS"};

respawnLinkedItems[] = {"H_HelmetB", "V_TacVest_khk", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio","ItemGPS"};

};

class AToW_BluRifleman : AToW_Soldier_Base {

_generalMacro = "B_Soldier_F";

scope = public;

displayName = "Rifleman";

uniformAccessories[] = {};

weapons[] = {"arifle_MX_F", "hgun_P07_F", "Throw", "Put", "Binocular"};

respawnWeapons[] = {"arifle_MX_F", "hgun_P07_F", "Throw", "Put", "Binocular"};

magazines[] = {"30Rnd_65x39_caseless_mag",

Thanks!

Share this post


Link to post
Share on other sites

I think you can use :

this addPrimaryWeaponItem "ITEM_NAME"

Share this post


Link to post
Share on other sites
I think you can use :

this addPrimaryWeaponItem "ITEM_NAME"

yes that would work for init, but not in config file.

also PrimaryWeaponItem or PrimaryWeaponItems doesent seem to work ether..

So anyone had success in this? or do i need to create new weapon classes to get this working?

Share this post


Link to post
Share on other sites

Ah ok, sorry can't help you more, I'm quite a newb at this still :/

Share this post


Link to post
Share on other sites
yes that would work for init, but not in config file.

also PrimaryWeaponItem or PrimaryWeaponItems doesent seem to work ether..

So anyone had success in this? or do i need to create new weapon classes to get this working?

This thread has lots of useful information: http://forums.bistudio.com/showthread.php?147718-Bringing-A2-weapon-addons-to-A3

This might help you, taken from the A3 config available here: http://forums.bistudio.com/showthread.php?115692-Community-Modding-Bible&p=2316554&viewfull=1#post2316554

//ndefs=13
enum {
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 weapons_f : Rifles\MX\config.bin{
class CfgPatches
{
class A3_Weapons_F_Rifles_MX
{
 units[] = {};
 weapons[] = {"arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MX_SW_F","arifle_MXM_F","arifle_MX_Hamr_point_grip_F","arifle_MX_COWS_grip_F","arifle_MX_ACO_point_gripod_mzls_F","arifle_MX_ACO_point_grip_F","arifle_MX_TWS_snds_F","arifle_MX_GL_ACO_point_F","arifle_MX_GL_Hamr_point_mzls_F","arifle_MX_GL_COWS_point_mzls_F","arifle_MXC_Holo_F","arifle_MXC_Holo_point_grip_F","arifle_MXC_Holo_point_grip_snds_F","arifle_MXC_ACO_point_grip_mzls_F","arifle_MXC_ACO_point_grip_F","arifle_MXC_COWS_point_grip_F","arifle_MXC_ACO_flash_grip_mzls_F","arifle_MXC_Nstalker_point_grip_mzls_F","arifle_MX_SW_Hamr_point_gripod_F","arifle_MX_SW_NVS_point_gripod_mzls_F","arifle_MX_SW_TWSMG_point_gripod_mzls_F","arifle_MXM_Hamr_point_gripod_F","arifle_MXM_SOS_point_bipod_F","arifle_MXM_TWSS_bipod_mzls_F"};
 requiredVersion = 0.1;
 requiredAddons[] = {"A3_Weapons_F"};
};
};
class Mode_SemiAuto;
class Mode_Burst;
class Mode_FullAuto;
class SlotInfo;
class CowsSlot;
class PointerSlot;
class CfgWeapons
{
class Rifle;
class Rifle_Base_F: Rifle
{
 class WeaponSlotsInfo;
 class GunParticles;
};
class UGL_F;
class arifle_MX_Base_F: Rifle_Base_F
{
 magazines[] = {"30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag_Tracer","100Rnd_65x39_caseless_mag","100Rnd_65x39_caseless_mag_Tracer"};
 class Library
 {
  libTextDesc = "$STR_A3_CfgWeapons_arifle_XMX_Library0";
 };
 reloadAction = "GestureReloadMX";
 maxRecoilSway = 0.0125;
 swayDecaySpeed = 1.25;
 class GunParticles: GunParticles
 {
  class SecondEffect
  {
   positionName = "Nabojnicestart";
   directionName = "Nabojniceend";
   effectName = "CaselessAmmoCloud";
  };
 };
 class WeaponSlotsInfo: WeaponSlotsInfo
 {
  class MuzzleSlot: SlotInfo
  {
   linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
   compatibleItems[] = {"muzzle_snds_h"};
  };
  class CowsSlot: CowsSlot{};
  class PointerSlot: PointerSlot{};
 };
 opticsZoomMin = 0.375;
 opticsZoomMax = 1.1;
 opticsZoomInit = 0.75;
 distanceZoomMin = 300;
 distanceZoomMax = 300;
 descriptionShort = "$STR_A3_CfgWeapons_XM_base_F0";
 handAnim[] = {"OFP2_ManSkeleton","\A3\Weapons_F\Rifles\MX\data\Anim\mx.rtm"};
 dexterity = 1.8;
 bullet1[] = {"A3\sounds_f\weapons\shells\5_56\metal_556_01.wav",0.1,1,15};
 bullet2[] = {"A3\sounds_f\weapons\shells\5_56\metal_556_02.wav",0.1,1,15};
 bullet3[] = {"A3\sounds_f\weapons\shells\5_56\metal_556_03.wav",0.17782794,1,15};
 bullet4[] = {"A3\sounds_f\weapons\shells\5_56\metal_556_04.wav",0.17782794,1,15};
 bullet5[] = {"A3\sounds_f\weapons\shells\5_56\asphlat_556_01.wav",0.1,1,15};
 bullet6[] = {"A3\sounds_f\weapons\shells\5_56\asphlat_556_02.wav",0.1,1,15};
 bullet7[] = {"A3\sounds_f\weapons\shells\5_56\asphlat_556_03.wav",0.1,1,15};
 bullet8[] = {"A3\sounds_f\weapons\shells\5_56\asphlat_556_04.wav",0.1,1,15};
 bullet9[] = {"A3\sounds_f\weapons\shells\5_56\grass_556_01.wav",0.01,1,15};
 bullet10[] = {"A3\sounds_f\weapons\shells\5_56\grass_556_02.wav",0.01,1,15};
 bullet11[] = {"A3\sounds_f\weapons\shells\5_56\grass_556_03.wav",0.01,1,15};
 bullet12[] = {"A3\sounds_f\weapons\shells\5_56\grass_556_04.wav",0.01,1,15};
 soundBullet[] = {"bullet1",0.083,"bullet2",0.083,"bullet3",0.083,"bullet4",0.083,"bullet5",0.083,"bullet6",0.083,"bullet7",0.083,"bullet8",0.083,"bullet9",0.083,"bullet10",0.083,"bullet11",0.083,"bullet12",0.083};
 modes[] = {"Single","FullAuto","single_medium_optics1","single_far_optics2","fullauto_medium"};
 class Single: Mode_SemiAuto
 {
  begin1[] = {"A3\sounds_f\weapons\MX\mx-st-full-1.wav",1.0,1,1200};
  begin2[] = {"A3\sounds_f\weapons\MX\mx-st-full-2.wav",1.0,1,1200};
  soundBegin[] = {"begin1",0.5,"begin2",0.5};
  closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_6.wav",3.1622777,1,300};
  closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_7.wav",3.1622777,1,300};
  soundClosure[] = {"closure1",0.5,"closure2",0.5};
  weaponSoundEffect = "DefaultRifle";
  reloadTime = 0.096;
  recoil = "recoil_single_mx";
  recoilProne = "recoil_single_prone_mx";
  dispersion = 0.00093;
  minRange = 2;
  minRangeProbab = 0.5;
  midRange = 225;
  midRangeProbab = 0.7;
  maxRange = 500;
  maxRangeProbab = 0.2;
 };
 class FullAuto: Mode_FullAuto
 {
  begin1[] = {"A3\sounds_f\weapons\MX\mx-st-full-1.wav",1.0,1,1200};
  begin2[] = {"A3\sounds_f\weapons\MX\mx-st-full-2.wav",1.0,1,1200};
  soundBegin[] = {"begin1",0.5,"begin2",0.5};
  closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_6.wav",3.1622777,1,300};
  closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_7.wav",3.1622777,1,300};
  soundClosure[] = {"closure1",0.5,"closure2",0.5};
  weaponSoundEffect = "DefaultRifle";
  reloadTime = 0.096;
  recoil = "recoil_auto_mx";
  recoilProne = "recoil_auto_prone_mx";
  dispersion = 0.00093;
  minRange = 0;
  minRangeProbab = 0.9;
  midRange = 15;
  midRangeProbab = 0.7;
  maxRange = 30;
  maxRangeProbab = 0.1;
  aiRateOfFire = 1e-006;
 };
 class single_medium_optics1: Single
 {
  requiredOpticType = 1;
  showToPlayer = 0;
  minRange = 2;
  minRangeProbab = 0.2;
  midRange = 550;
  midRangeProbab = 0.7;
  maxRange = 700;
  maxRangeProbab = 0.1;
  aiRateOfFire = 6;
  aiRateOfFireDistance = 600;
 };
 class single_far_optics2: single_medium_optics1
 {
  requiredOpticType = 2;
 };
 class fullauto_medium: FullAuto
 {
  showToPlayer = 0;
  burst = 3;
  minRange = 2;
  minRangeProbab = 0.5;
  midRange = 75;
  midRangeProbab = 0.7;
  maxRange = 150;
  maxRangeProbab = 0.05;
  aiRateOfFire = 2.0;
 };
 class GL_3GL_F: UGL_F
 {
  displayName = "$STR_A3_cfgweapons_3gl0";
  descriptionShort = "$STR_A3_cfgweapons_3gl1";
  useModelOptics = 0;
  useExternalOptic = 0;
  magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell"};
  cameraDir = "OP_look";
  discreteDistance[] = {100,200,300,400};
  discreteDistanceCameraPoint[] = {"OP_eye","OP_eye2","OP_eye3","OP_eye4"};
  discreteDistanceInitIndex = 1;
 };
 aiDispersionCoefY = 10;
 aiDispersionCoefX = 8;
 drySound[] = {"A3\sounds_f\weapons\Other\dry_1.wav",0.01,1};
 reloadMagazineSound[] = {"A3\sounds_f\weapons\reloads\new_MX.wav",0.1,1,30};
};
class arifle_MXC_F: arifle_MX_Base_F
{
 scope = 2;
 displayName = "$STR_A3_CfgWeapons_arifle_XMC0";
 model = "\A3\Weapons_F\Rifles\MX\MXC_F.p3d";
 reloadAction = "GestureReloadMXCompact";
 picture = "\A3\weapons_F\Rifles\MX\data\UI\gear_mx_cqc_X_CA.paa";
 UiPicture = "\A3\weapons_f\data\UI\icon_regular_CA.paa";
 handAnim[] = {"OFP2_ManSkeleton","\A3\Weapons_F\Rifles\MX\data\Anim\MX_cqc.rtm"};
 class WeaponSlotsInfo: WeaponSlotsInfo
 {
  mass = 40;
 };
 class ItemInfo
 {
  priority = 1;
  RMBhint = "XMC";
  onHoverText = "TODO XMC DSS";
 };
 descriptionShort = "$STR_A3_CfgWeapons_arifle_XMX1";
};
class arifle_MX_F: arifle_MX_Base_F
{
 scope = 2;
 displayName = "$STR_A3_CfgWeapons_arifle_XMX0";
 model = "\A3\Weapons_F\Rifles\MX\MX_F.p3d";
 picture = "\A3\weapons_F\Rifles\MX\data\UI\gear_mx_rifle_X_CA.paa";
 UiPicture = "\A3\weapons_f\data\UI\icon_regular_CA.paa";
 handAnim[] = {"OFP2_ManSkeleton","\A3\Weapons_F\Rifles\MX\data\Anim\MX_afg.rtm"};
 class WeaponSlotsInfo: WeaponSlotsInfo
 {
  mass = 50;
 };
 class ItemInfo
 {
  priority = 1;
  RMBhint = "XMX";
  onHoverText = "TODO XMX DSS";
 };
 descriptionShort = "$STR_A3_CfgWeapons_arifle_XMX1";
};
class arifle_MX_GL_F: arifle_MX_Base_F
{
 scope = 2;
 displayName = "$STR_A3_CfgWeapons_arifle_XMX_GL0";
 model = "\A3\Weapons_F\Rifles\MX\MX_GL_F.p3d";
 picture = "\A3\weapons_F\Rifles\MX\data\UI\gear_mx_rifle_gl_X_CA.paa";
 UiPicture = "\A3\Weapons_F\Data\UI\icon_gl_CA.paa";
 weaponInfoType = "RscWeaponZeroing";
 handAnim[] = {"OFP2_ManSkeleton","\A3\Weapons_F\Rifles\MX\data\Anim\MX_gl.rtm"};
 muzzles[] = {"this","GL_3GL_F"};
 class WeaponSlotsInfo: WeaponSlotsInfo
 {
  mass = 60;
 };
 class ItemInfo
 {
  priority = 1;
  RMBhint = "XMX 3GL";
  onHoverText = "TODO XMX 3GL DSS";
 };
 descriptionShort = "$STR_A3_CfgWeapons_arifle_XMX_GL1";
};
class arifle_MX_SW_F: arifle_MX_Base_F
{
 scope = 2;
 displayName = "$STR_A3_CfgWeapons_arifle_XM_LSW0";
 nameSound = "Mgun";
 model = "\A3\Weapons_F\Rifles\MX\MX_SW_F.p3d";
 picture = "\A3\weapons_F\Rifles\MX\data\UI\gear_mx_lmg_X_CA.paa";
 UiPicture = "\A3\weapons_f\data\UI\icon_regular_CA.paa";
 magazines[] = {"100Rnd_65x39_caseless_mag_Tracer","100Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag_Tracer"};
 cursor = "mg";
 class Single: Single
 {
  recoilProne = "recoil_single_prone_mx_sw";
 };
 class WeaponSlotsInfo: WeaponSlotsInfo
 {
  mass = 50;
 };
 class ItemInfo
 {
  priority = 1;
  RMBhint = "XMSW";
  onHoverText = "TODO XMSW DSS";
 };
 modes[] = {"manual","close","short","medium","far","far_optic1"};
 class manual: FullAuto
 {
  dispersion = 0.00093;
  recoilProne = "recoil_single_prone_mx_sw";
  soundContinuous = 0;
  soundBurst = 0;
  minRange = 0;
  minRangeProbab = 0.3;
  midRange = 5;
  midRangeProbab = 0.58;
  maxRange = 10;
  maxRangeProbab = 0.04;
  showToPlayer = 1;
 };
 class close: manual
 {
  burst = 10;
  aiRateOfFire = 0.5;
  aiRateOfFireDistance = 50;
  minRange = 10;
  minRangeProbab = 0.05;
  midRange = 20;
  midRangeProbab = 0.7;
  maxRange = 50;
  maxRangeProbab = 0.04;
  showToPlayer = 0;
 };
 class short: close
 {
  burst = 8;
  aiRateOfFire = 2;
  aiRateOfFireDistance = 300;
  minRange = 50;
  minRangeProbab = 0.05;
  midRange = 150;
  midRangeProbab = 0.7;
  maxRange = 300;
  maxRangeProbab = 0.04;
 };
 class medium: close
 {
  burst = 7;
  aiRateOfFire = 4;
  aiRateOfFireDistance = 600;
  minRange = 200;
  minRangeProbab = 0.05;
  midRange = 400;
  midRangeProbab = 0.7;
  maxRange = 600;
  maxRangeProbab = 0.04;
 };
 class far: close
 {
  burst = 5;
  aiRateOfFire = 5;
  aiRateOfFireDistance = 1000;
  minRange = 400;
  minRangeProbab = 0.05;
  midRange = 700;
  midRangeProbab = 0.6;
  maxRange = 900;
  maxRangeProbab = 0.01;
 };
 class far_optic1: far
 {
  requiredOpticType = 1;
  burst = 3;
  aiRateOfFire = 10;
  aiRateOfFireDistance = 1000;
  minRange = 400;
  minRangeProbab = 0.05;
  midRange = 850;
  midRangeProbab = 0.7;
  maxRange = 1000;
  maxRangeProbab = 0.01;
 };
 aiDispersionCoefY = 20.0;
 aiDispersionCoefX = 18.0;
 descriptionShort = "$STR_A3_CfgWeapons_arifle_XM_LSW1";
};
class arifle_MXM_F: arifle_MX_Base_F
{
 scope = 2;
 displayName = "$STR_A3_CfgWeapons_arifle_XMM0";
 model = "\A3\Weapons_F\Rifles\MX\MXM_F.p3d";
 reloadAction = "GestureReloadMXSniper";
 picture = "\A3\weapons_F\Rifles\MX\data\UI\gear_mx_dmr_X_CA.paa";
 UiPicture = "\A3\weapons_f\data\UI\icon_regular_CA.paa";
 handAnim[] = {"OFP2_ManSkeleton","\A3\Weapons_F\Rifles\MX\data\Anim\MX_dmr.rtm"};
 magazines[] = {"20Rnd_762x45_mag"};
 class Single: Single
 {
  dispersion = 0.000290888;
  maxRange = 500;
 };
 class FullAuto: FullAuto
 {
  dispersion = 0.000290888;
 };
 class single_medium_optics1: single_medium_optics1
 {
  dispersion = 0.000290888;
 };
 class single_far_optics2: single_far_optics2
 {
  dispersion = 0.000290888;
  maxRange = 800;
 };
 class fullauto_medium: fullauto_medium
 {
  dispersion = 0.000290888;
 };
 class ItemInfo
 {
  priority = 1;
  RMBhint = "XMM";
  onHoverText = "TODO XMM DSS";
 };
 class WeaponSlotsInfo: WeaponSlotsInfo
 {
  mass = 50;
  class MuzzleSlot: SlotInfo
  {
   linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
   compatibleItems[] = {"muzzle_snds_B"};
  };
  class CowsSlot: CowsSlot{};
  class PointerSlot: PointerSlot{};
 };
 descriptionShort = "$STR_A3_CfgWeapons_arifle_XMM1";
};
class arifle_MX_ARCO_point_grip_F: arifle_MX_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ARCO";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MX_Hamr_point_grip_F: arifle_MX_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_Hamr";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MX_ACO_point_gripod_mzls_F: arifle_MX_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MX_ACOg_point_gripod_mzls_F: arifle_MX_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO_grn";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MX_ACO_point_grip_F: arifle_MX_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MX_ACOg_point_grip_F: arifle_MX_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO_grn";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MX_GL_ACO_point_F: arifle_MX_GL_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MX_GL_ACOg_point_F: arifle_MX_GL_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO_grn";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MX_GL_ARCO_point_mzls_F: arifle_MX_GL_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ARCO";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MX_GL_Hamr_point_mzls_F: arifle_MX_GL_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_Hamr";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MXC_Holo_F: arifle_MXC_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_Holosight";
  };
 };
};
class arifle_MXC_Holo_point_grip_F: arifle_MXC_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_Holosight";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MXC_Holo_point_grip_snds_F: arifle_MXC_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_Holosight";
  };
  class LinkedItemsMuzzle
  {
   slot = "MuzzleSlot";
   item = "muzzle_snds_H";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MXC_ACO_point_grip_mzls_F: arifle_MXC_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MXC_ACOg_point_grip_mzls_F: arifle_MXC_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO_grn";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MXC_ACO_point_grip_F: arifle_MXC_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MXC_ACOg_point_grip_F: arifle_MXC_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO_grn";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MXC_ACO_flash_grip_mzls_F: arifle_MXC_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_flashlight";
  };
 };
};
class arifle_MXC_ACOg_flash_grip_mzls_F: arifle_MXC_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ACO_grn";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_flashlight";
  };
 };
};
class arifle_MX_SW_ARCO_point_gripod_F: arifle_MX_SW_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ARCO";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MX_SW_Hamr_point_gripod_F: arifle_MX_SW_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_Hamr";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MXM_ARCO_point_gripod_F: arifle_MXM_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_ARCO";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
class arifle_MXM_Hamr_point_gripod_F: arifle_MXM_F
{
 class LinkedItems
 {
  class LinkedItemsOptic
  {
   slot = "CowsSlot";
   item = "optic_Hamr";
  };
  class LinkedItemsAcc
  {
   slot = "PointerSlot";
   item = "acc_pointer_IR";
  };
 };
};
};
//};

Share this post


Link to post
Share on other sites

Finally got it working.

So if you want different attachments to your custom units (aka reskinning and want to have machinegunner with ACO aim).

you need to create new weapon class and add that to your unit.

I added code belove inside my custom unit config.cpp to get MX SW with ACO optics

Hope it helps someone

class cfgWeapons {

class arifle_MX_SW_F;

	class arifle_MX_SW_ACO_AToW: arifle_MX_SW_F {
	class LinkedItems {
		class LinkedItemsOptic {
			item = "optic_ACO";
			slot = "CowsSlot";
		};
		class LinkedItemsAcc {
			item = "acc_pointer_IR";
			slot = "PointerSlot";
		};
	};
};
};

Share this post


Link to post
Share on other sites

Hello! I have the exact same question, and what Dren wrote don't work for me.

here's what my Config.cpp looks like. ( I have no idea what i should put were it says " arifle_MX_SW_ACO_AToW " , I'm using addon weapon and optics.

class arifle_MX_SW_ACO_AToW: FHQ_M4A1_SNW {

class LinkedItems {

class LinkedItemsOptic {

item = "FHQ_optic_AIM";

slot = "CowsSlot";

};

class LinkedItemsAcc {

item = "acc_pointer_IR";

slot = "PointerSlot";

};

Share this post


Link to post
Share on other sites
class cfgWeapons {

class arifle_MX_SW_F;

class arifle_MX_SW_ACO_AToW: arifle_MX_SW_F {

class LinkedItems {

class LinkedItemsOptic {

item = "optic_ACO";

slot = "CowsSlot";

};

class LinkedItemsAcc {

item = "acc_pointer_IR";

slot = "PointerSlot";

};

};

};

};

Thanks it works fantastic!

What is the slot definition for a suppressor?

I thought something like that:

class LinkedItemsAcc {

item = "example";

slot = "MuzzleSlot";

};

But it isn't working does anyone know the definition?

EDIT:

Never mind I got it :)

class LinkedItemsMuzzle <-- that was my problem

{

item = "muzzle_snds_H";

slot = "MuzzleSlot";

};

Edited by Jako

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  

×