User Tools

Site Tools


arma3:config:bis-weapon-config-guidelines

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
arma3:config:bis-weapon-config-guidelines [2013-04-19 20:47]
snakeman moved page to proper location.
arma3:config:bis-weapon-config-guidelines [2014-07-16 11:13]
snakeman changed the define into actual value.
Line 1: Line 1:
 ====== ArmA 3 BIS Weapon Config Guidelines ====== ====== ArmA 3 BIS Weapon Config Guidelines ======
  
-101 - How to set up a weapon for ArmA 3+**101 - How to set up a weapon for Arma 3** 
  
  
-=====Additional functionality compared to A2/OA ======+=====  Additional functionality compared to A2/OA  =====
  
-  * Slotable weapon accessories +  *  Slotable weapon accessories 
-  * Custom reload animations +  *  Custom reload animations 
-  * Adjustable sights +  *  Adjustable sights 
-  * Underwater weapons +  *  Underwater weapons 
-  * Ammo changes on fly and on hit +  *  Ammo changes on fly and on hit 
-  * Rotating muzzle-flash +  *  Rotating muzzle-flash 
-  * Explosion shielding ​+  *  Explosion shielding
  
  
-=====Model Requirements (p3d) ======+=====  Model requirements {p3d}  ​=====
  
-proxies for slotable accessories+  *  ​proxies for slotable accessories 
 +    *  muzzle accessory should be on proxy **\A3\data_f\proxies\weapon_slots\MUZZLE** 
 +    *  optics should be on proxy **\A3\data_f\proxies\weapon_slots\TOP** 
 +    *  side accessory should be on proxy **\A3\data_f\proxies\weapon_slots\SIDE** 
 +    *  all these proxies could be redefined in //​cfgWeapons >> Weapon >> WeaponSlotsInfo >> XXX >> linkProxy// parameter where XXX is the slot name
  
-muzzle accessory ​should be on proxy \A3\data_f\proxies\weapon_slots\MUZZLE+  *  selections for folding iron sights 
 +    *  You need to create selections and axes for iron sights if You want them folded once the optics is put on the weapon 
 +    *  Front part should be named **ForeSight** with **ForeSight_axis** in memory lod 
 +    *  Rear part should be named **BackSight** with **BackSight_axis** in memory lod
  
-optics should ​be on proxy \A3\data_f\proxies\weapon_slots\TOP+  *  adjustable sights for grenade launchers 
 +    *  there needs to be a selection that is going to rotate (in case of collimator sights), default naming is **OP** 
 +    *  this selection needs to have an axis in memory lod, default naming is **OP_axis** 
 +    *  there needs to be a focus point, the best place is the red dot of collimator, with memory point **OP_look** by default and several points for eye, usually **OP_eyeX** where X is the number of the point. Good practice is to place them in same distance form focus point
  
-side accessory should be on proxy \A3\data_f\proxies\weapon_slots\SIDE+=====  Model config changes {model.cfg} ​ =====
  
-all these proxies could be redefined in cfgWeapons >> Weapon >> WeaponSlotsInfo >> XXX >> linkProxy parameter where XXX is the slot name  +  *  ​custom reload animation have a good use of newly added parameter ​**unHideValue** for hide type of animations - you are now able to make asymmetrical animations eg. for hiding of magazine: 
- +model.cfg
-selections for folding iron sights +
- +
-You need to create selections and axes for iron sights if You want them folded once the optics is put on the weapon +
- +
-Front part should be named ForeSight with ForeSight_axis in memory lod +
- +
-Rear part should be named BackSight with BackSight_axis in memory lod  +
- +
-adjustable sights for grenade launchers +
- +
-there needs to be a selection that is going to rotate (in case of collimator sights), default naming is OP +
- +
-this selection needs to have an axis in memory lod, default naming is OP_axis +
- +
-there needs to be a focus point, the best place is the red dot of collimator, with memory point OP_look by default and several points for eye, usually OP_eyeX where X is the number of the point. Good practice is to place them in same distance form focus point  +
- +
- +
-====== Model Config Changes (model.cfg) ====== +
- +
-custom reload animation have a good use of newly added parameter unHideValue for hide type of animations - you are now able to make asymmetrical animations eg. for hiding of magazine: ​ +
- +
-model.cfg:+
 <code cpp> <code cpp>
-class magazine_hide +  class magazine_hide 
-+  
- type = "​hide";​ +   type = "​hide";​ 
- source = "​reloadMagazine";​ +   source = "​reloadMagazine";​ 
- selection = "​magazine";​ +   selection = "​magazine";​ 
- minValue = 0; +   minValue = 0.000000; 
- maxValue = 1; +   maxValue = 1.00000
- hideValue = 0.220; +   hideValue = 0.220; 
- unhideValue = 0.550; +   unhideValue = 0.550; 
-};+   };
 </​code>​ </​code>​
  
-the animations could look a bit better by simply adding a translation for the magazine and adding an axis for that in model - magazine should translate at first, then disappear, appear and translate back  +  *  ​the animations could look a bit better by simply adding a translation for the magazine and adding an axis for that in model - magazine should translate at first, then disappear, appear and translate back 
- +model.cfg
-model.cfg:+
 <code cpp> <code cpp>
-class magazine_reload_move_1 +  class magazine_reload_move_1 
-+  
- type = "​translation";​ +   type = "​translation";​ 
- source = "​reloadMagazine";​ +   source = "​reloadMagazine";​ 
- selection = "​magazine";​ +   selection = "​magazine";​ 
- axis = "​magazine_axis";​ +   axis = "​magazine_axis";​ 
- minValue = 0.145; +   minValue = 0.145; 
- maxValue = 0.170; +   maxValue = 0.170; 
- offset0 = 0; +   offset0 = 0.0; 
- offset1 = 0.5; +   offset1 = 0.5; 
-}; +   }; 
-</​code>​+</​code> ​
  
-foldable iron sights use hasOptics controller ​ +  *  ​foldable iron sights use **hasOptics** controller  
- +model.cfg
-model.cfg:+
 <code cpp> <code cpp>
-class BackSight_optic +  class BackSight_optic 
-+  
- type = "​rotation";​ +   type = "​rotation";​ 
- source = "​hasOptics";​ +   source = "​hasOptics";​ 
- selection = "​BackSight";​ +   selection = "​BackSight";​ 
- axis = "​BackSight_axis";​ +   axis = "​BackSight_axis";​ 
- memory = 1; +   memory = 1; 
- minValue = 0; +   minValue = 0.0000000; 
- maxValue = 1; +   maxValue = 1.0000000
- angle0 = 0; +   angle0 = 0.000000; 
- angle1 = (rad 90); +   angle1 = (rad 90); 
-};+   };
 </​code>​ </​code>​
  
-new animation controllers ​zeroing ​and zeroing2 take values from discreteDistance[] of first and second muzzle of the weapon. The value is index number of current zeroing in the array starting with zero (that means the first value is 0, second is 1, the last is number of discrete distances plus one). It might be used for iron sights of the weapon if desired but better use is for UGL collimator sights rotation: ​ +  *  ​new animation controllers ​**zeroing1** ​and **zeroing2** take values from //discreteDistance// of first and second muzzle of the weapon. The value is index number of current zeroing in the array starting with zero (that means the first value is 0, second is 1, the last is number of discrete distances plus one). It might be used for iron sights of the weapon if desired but better use is for UGL collimator sights rotation: 
- +model.cfg
-model.cfg:+
 <code cpp> <code cpp>
-class OP_ROT +  class OP_ROT 
-+  
- type = "​rotation";​ +   type="​rotation";​ 
- source = "​zeroing2";​ // use second muzzle zeroing for rotation +   source="​zeroing2"; ​           // use second muzzle zeroing for rotation 
- sourceAddress = "​loop";​ // loop when phase out of bounds +   sourceAddress="​loop"; ​    ​// loop when phase out of bounds 
- selection = "​OP";​ // selection we want to rotate +   selection="​OP"; ​      ​// selection we want to rotate 
- axis = "​OP_axis";​ // has its own axis +   axis="​OP_axis"; ​                 // has its own axis 
- minValue = 0; +   minValue=0;​ 
- maxValue = 3; // this weapon has array with 4 distances +   maxValue=3; ​  ​// this weapon has array with 4 distances 
- angle0 = "rad 0"; +   angle0="​rad 0"; 
- angle1 = "rad 65"; +   angle1="​rad 65"; 
-};+   };
 </​code>​ </​code>​
  
-rotating muzzle flashes are done using a new animation source ammoRandom which changes it's value every time weapon is fired. Various degrees of rotation may be set up by using correct muzzle flash shape and minValue maxValue combination. ​ +  *  ​rotating muzzle flashes are done using a new animation source ​**ammoRandom** which changes it's value every time weapon is fired. Various degrees of rotation may be set up by using correct muzzle flash shape and minValue maxValue combination. 
- +model.cfg
-model.cfg:+
 <code cpp> <code cpp>
-class MuzzleFlashROT +  class MuzzleFlashROT 
-+  
- type = "​rotationX";​ +   type="​rotationX";​ 
- source = "​ammoRandom";​ //use ammo count as phase for animation +   source="​ammoRandom"; ​           //use ammo count as phase for animation 
- sourceAddress = "​loop";​ //loop when phase out of bounds +   sourceAddress="​loop"; ​    ​//loop when phase out of bounds 
- selection = "​zasleh";​ //selection we want to rotate +   selection="​zasleh"; ​      ​//selection we want to rotate 
- axis = "";​ //no own axis - center of rotation is computed from selection +   axis=""; ​                 //no own axis - center of rotation is computed from selection 
- centerFirstVertex = true; //use first vertex of selection as center of rotation +   centerFirstVertex=true; ​  ​//use first vertex of selection as center of rotation 
- minValue = 0; +   minValue=0;​ 
- maxValue = 4; //rotation angle will be 360/4 = 90 degrees +   maxValue=4; ​              ​//rotation angle will be 360/4 = 90 degrees 
- angle0 = "rad 0"; +   angle0="​rad 0"; 
- angle1 = "rad 360";​ +   angle1="​rad 360";​ 
-};+   };
 </​code>​ </​code>​
  
  
-=====New Config Parameters (config.cpp) ======+=====  New config parameters {config.cpp}  ​=====
  
-====Slotable weapons ​=====+====  Slotable weapons ​ ====
  
-Available slots are defined in each weapon but are usually inherited from a parent weapon. They are stored as classes in class WeaponSlotsInfo which contains the slots and parameters for inventory +  *  ​Available slots are defined in each weapon but are usually inherited from a parent weapon. They are stored as classes in **class WeaponSlotsInfo** which contains the slots and parameters for inventory 
- +    ​* ​ **Mass** is a new unit used to describe weight and volume of an object used. Each container has a set capacity in the same units. 
-Mass is a new unit used to describe weight and volume of an object used. Each container has a set capacity in the same units. +    ​*  ​allowedSlots is an array of slot numbers where you may put the weapon. 701 stands for vest, 801 stands for uniform, 901 stands for backpack 
- +    ​*  ​each weapon slot is a separate subclass in class WeaponSlotsInfo 
-allowedSlots[] is an array of slot numbers where you may put the weapon. 701 stands for vest, 801 stands for uniform, 901 stands for backpack +      ​*  ​parameter ​**linkProxy** defines a proxy in weapon model for said slot (see standard names on top) 
- +      ​*  ​parameter ​**displayName** describes a mouse-over name of slot in Inventory 
-each weapon slot is a separate subclass in class WeaponSlotsInfo +      ​*  ​array **compatibleItems** lists possible accessory placeable into that slot. Most weapons are able to have any RIS equipment, but eg. muzzle accessory differs according to caliber. 
- +    ​*  ​external classes ​//CowsSlot// and //PointerSlot// are used for standard optics and side accessory. That means these classes are outside cfgWeapons and changeable for all weapons at once.
-parameter linkProxy defines a proxy in weapon model for said slot (see standard names on top) +
- +
-parameter displayName describes a mouse-over name of slot in Inventory +
- +
-array compatibleItems[] lists possible accessory placeable into that slot. Most weapons are able to have any RIS equipment, but eg. muzzle accessory differs according to caliber.  +
- +
-external classes CowsSlot and PointerSlot are used for standard optics and side accessory. That means these classes are outside cfgWeapons and changeable for all weapons at once. +
  
 <code cpp> <code cpp>
-class SlotInfo; +  ​class SlotInfo; 
-class CowsSlot : SlotInfo +  class CowsSlot : SlotInfo 
-+  
- // targetProxy +   // targetProxy 
- linkProxy = "​\A3\data_f\proxies\weapon_slots\TOP";​ +   linkProxy = "​\A3\data_f\proxies\weapon_slots\TOP";​ 
-  +   
- // display name +   // display name 
- displayName = $STR_A3_CowsSlot0;​ +   displayName = $STR_A3_CowsSlot0;​ 
-  +   
- // class names with items supported by weapon +   // class names with items supported by weapon  
- compatibleItems[] = { "​optic_Arco",​ "​optic_aco",​ "​optic_ACO_grn","​optic_hamr",​ "​optic_Holosight"​ }; +   compatibleItems[[]] = {"​optic_Arco","​optic_aco",​ "​optic_ACO_grn","​optic_hamr","​optic_Holosight"​};​ 
-}; +  };  
-class PointerSlot : SlotInfo +  class PointerSlot : SlotInfo 
-+  
- // targetProxy +   // targetProxy 
- linkProxy = "​\A3\data_f\proxies\weapon_slots\SIDE";​ +   linkProxy = "​\A3\data_f\proxies\weapon_slots\SIDE";​ 
-  +   
- // display name +   // display name 
- displayName = $STR_A3_PointerSlot0;​ +   displayName = $STR_A3_PointerSlot0;​ 
-  +   
- // class names with items supported by weapon +   // class names with items supported by weapon  
- compatibleItems[] = { "​acc_flashlight",​ "​acc_pointer_IR"​ }; +   compatibleItems[[]] = {"​acc_flashlight","​acc_pointer_IR"​};​  
-}; +  }; 
- +   
-class cfgWeapons +  class cfgWeapons 
-+    
- class myWeapon +   class myWeapon 
-+  
- class WeaponSlotsInfo +   class WeaponSlotsInfo 
- +  
- mass = 4; /// default mass of a weapon +   mass = 4; /// default mass of a weapon 
- class MuzzleSlot : SlotInfo +   class MuzzleSlot : SlotInfo 
- +  
- // targetProxy +  ​   ​// targetProxy 
- linkProxy = "​\A3\data_f\proxies\weapon_slots\MUZZLE";​ +  ​   ​linkProxy = "​\A3\data_f\proxies\weapon_slots\MUZZLE";​ 
-  +   
- // display name +  ​   ​// display name 
- displayName = "​Muzzle Slot";​ +  ​   ​displayName = "​Muzzle Slot";​ 
-  +   
- // class names with items supported by weapon +  ​   ​// class names with items supported by weapon 
- compatibleItems[] = {}; // moved to each weapon +  ​   ​compatibleItems[[]] = {}; // moved to each weapon 
- }; +   }; 
- class CowsSlot: CowsSlot {}; +   class CowsSlot: CowsSlot {}; 
- class PointerSlot:​ PointerSlot {}; +   class PointerSlot:​ PointerSlot {}; 
- allowedSlots[] = {901}; // you simply cannot put this into your pants +   allowedSlots[[]] = {901}; // you simply cannot put this into your pants 
- }; +   }; 
- }; +   }; 
-};+  };
 </​code>​ </​code>​
  
-**Muzzle accessories** 
- 
-suppressors are configured as a weapon inheriting some item abilities from class ItemCore 
- 
-the class itself consists only from scope, displayName,​ picture and model, there is a separate subclass ItemInfo with all the required parameters 
- 
-there is subclass MagazineCoef inside class ItemInfo with parameter initSpeed - this is just a multiplier of initSpeed of weapon'​s magazine 
- 
-subclass AmmoCoef of class ItemInfo has more parameters for the ammo shoot through the suppressor: 
- 
-hit is the coefficient of hit of original ammo 
- 
-visibleFire,​ audibleFire,​ visibleFireTime and audibleFireTime are coefficients for detection upon shooting the weapon 
- 
-higher cost coefficient should make AI think more about shooting the suppressed weapon 
- 
-typicalSpeed and airFriction coefficients change the ballistic characteristics of the ammo  
- 
-there are alternate muzzleEnd and alternativeFire directly inside class ItemInfo to have different muzzle effects origin and muzzle flashes 
  
-you may set up modes[] ​and specific fire modes for the suppressed weapon directly ​in class ItemInfo ​+===  Muzzle accessories ​ === 
 +  *  suppressors are configured as a weapon inheriting some item abilities from class **ItemCore** 
 +  *  the class itself consists only from scope, displayName,​ picture ​and model, there is a separate subclass **ItemInfo** with all the required parameters 
 +    *  there is subclass **MagazineCoef** inside class ItemInfo with parameter **initSpeed** - this is just a multiplier of initSpeed of weapon'​s magazine 
 +    *  subclass **AmmoCoef** of class ItemInfo has more parameters ​for the ammo shoot through the suppressor:​ 
 +      *  **hit** is the coefficient of hit of original ammo 
 +      *  **visibleFire**,​ **audibleFire**,​ **visibleFireTime** and **audibleFireTime** are coefficients for detection upon shooting the weapon 
 +      *  higher **cost** coefficient should make AI think more about shooting ​the suppressed weapon 
 +      *  **typicalSpeed** and **airFriction** coefficients change the ballistic characteristics of the ammo 
 +    *  there are alternate **muzzleEnd** and **alternativeFire** ​directly ​inside ​class ItemInfo ​to have different muzzle effects origin and muzzle flashes
  
 <code cpp> <code cpp>
-class Mode_SemiAuto;​ +  ​class Mode_SemiAuto;​ 
-class cfgWeapons +  class cfgWeapons 
-+  
- class ItemCore; +   class ItemCore; 
- class InventoryMuzzleItem_Base_F;​ +   class InventoryMuzzleItem_Base_F;​  
- class myMuzzleAccessory +   class myMuzzleAccessory 
-+  
- scope = 2; +   scope = 2; 
- displayName="​My Muzzle Accessory";​ +   displayName="​My Muzzle Accessory";​ 
-  +   
- picture="​\A3\weapons_F\Data\UI\myMuzzleAccessory_CA.paa";​ +   picture="​\A3\weapons_F\Data\UI\myMuzzleAccessory_CA.paa";​ 
- model = "​\A3\weapons_f\acc\myMuzzleAccessory";​ +   model = "​\A3\weapons_f\acc\myMuzzleAccessory";​  
-  +    
- class ItemInfo: InventoryMuzzleItem_Base_F +   class ItemInfo: InventoryMuzzleItem_Base_F 
- +   {  
- class MagazineCoef +  ​ soundTypeIndex = 1; // index of sound in sounds[[]] in weapon modes (inherited 1 from parent class) 
- +   
- initSpeed = 0.8; +  class MagazineCoef 
- }; +  
-  +   initSpeed = 0.8; 
- class AmmoCoef +   }; 
- +   
- hit = 0.8; +   class AmmoCoef 
- visibleFire = 0.3; +  
- audibleFire = 0.8; +   hit=0.8; 
- visibleFireTime = 0.5; +   visibleFire=0.3;​ 
- audibleFireTime = 1; +   audibleFire=0.8;​ 
- cost = 1; +   visibleFireTime=0.5;​ 
- typicalSpeed = 0.8; +   audibleFireTime=1.0
- airFriction = 1; +   cost = 1.0
- }; +   typicalSpeed= 0.8; 
-  +   airFriction = 1.0      
- muzzleEnd = "​zaslehPoint";​ // memory point in muzzle supressor'​s model +   };  
- alternativeFire = "​Zasleh2"; ​ // class in cfgWeapons with model of muzzle flash +   
-  +   muzzleEnd = "​zaslehPoint";​ // memory point in muzzle supressor'​s model 
- modes[] = {"​Single"​};​ +   alternativeFire = "​Zasleh2"; ​ // class in cfgWeapons with model of muzzle flash  
-  +    
- class Single: Mode_SemiAuto +   class MuzzleCoef 
- +  
- begin1[] ​{"​A3\sounds_f\weapons\silenced\silent-25.wss", db0, 1,600}+  ​ dispersionCoef ​1.0f
- begin2[] ​{"​A3\sounds_f\weapons\silenced\silent-26.wss", db0, 1,600}+  ​ artilleryDispersionCoef ​1.0f  
- soundBegin[] ​{begin1,0.5, begin2,0.5}+  ​ 
-  +  ​ fireLightCoef ​= 0.1f
- closure1[] ​{"​A3\sounds_f\weapons\closure\closure_rifle_2.wss", db0, 1,300}+   
- closure2[] ​{"​A3\sounds_f\weapons\closure\closure_rifle_3.wss", db0, 1,300}+  ​ recoilCoef ​1.0f; 
- soundClosure[] ​{closure1,0.5, closure2,0.5}+  recoilProneCoef = 1.0f
-  +   
- weaponSoundEffect  ​"​DefaultRifle"​+  minRangeCoef ​1.0f; minRangeProbabCoef = 1.0f
- }; +  ​ midRangeCoef ​1.0f; midRangeProbabCoef = 1.0f
- }; +  ​ maxRangeCoef ​1.0f; maxRangeProbabCoef = 1.0f
- }; +   }; 
-};+   }; 
 +   }; 
 +  };
 </​code>​ </​code>​
  
-**Optics** +  ​ ​Starting from patch 1.24 (dev version 1.23 from 23.6. 2014 on), there is a change how sounds are handled because of sound suppressors:​ 
- +    ​* ​ Weapon without any muzzle accessory has a **soundTypeIndex** equal to 0, while it could be any number ​(by default 1according to suppressor type used. 
-in addition to default parameters mentioned in muzzle accessories class, there is weaponInfoType to choose ​correct resource for weapon info directly inside optic class +    ​* ​ array parameter ​**sounds** of fire mode is used to chose what sound subclass is going to be used - it is //sounds = {StandardSound,​ SilencedSound};//​ by default 
- +    ​* ​ classes defined ​in previous parameter are subclasses of a fire mode with various sound parameters: weaponSoundEffect,​ soundBegin, soundClosure{}
-there is the same ItemInfo subclass but with different parameters +
- +
-don't forget that ItemInfo inherits some parameters from InventoryOpticsItem_Base_F ​(eg. muzzlePos and muzzleEndin case you rename the memory points  +
- +
-parameter ​opticType ​is used for balancing the optics for specific fire modes (should ​be further described by balancing crew) +
- +
-modelOptics ​is the 2D model for selected optics +
- +
-subclass OpticsModes works the same way it used to work in A2/OA +
  
 <code cpp> <code cpp>
-class cfgWeapons +  class MyWeapon: Rifle_Base_F 
-+  
- class ​ItemCore; +   class Single: Mode_SemiAuto 
- class InventoryOpticsItem_Base_F+  ​ {  
- class ​myOpticsAccessory +  sounds[[]] = {StandardSound,​ SilencedSound}
-+   
- scope = 2; +  class BaseSoundModeType /// I am too lazy to copy this twice into both standard and silenced sounds, that is why there is a base class from which both inherit (and sound of closure stays the same no matter what muzzle accessory is used) 
- displayName="My Optics Accessory"; +  
-  +  ​ weaponSoundEffect  ​= "DefaultRifle"; 
- picture="\A3\weapons_F\Data\UI\myOpticsAccessory_CA.paa"; +   
- model ​= "\A3\weapons_f\acc\myOpticsAccessory"; +  ​ closure1[[]]={"A3\sounds_f\weapons\closure\closure_rifle_2", db-12, 1,10}
- weaponInfoType ​"​RscOptics_myOptics"​+  ​ closure2[[]]={"A3\sounds_f\weapons\closure\closure_rifle_3", db-12, 1,10}
-  +  ​ soundClosure[[]]={closure1,​0.5,​ closure2,​0.5}
- class ItemInfoInventoryOpticsItem_Base_F +   }; 
- +   
- mass = 7; +  class StandardSoundBaseSoundModeType /// Sounds inside this class are used when soundTypeIndex = 0, according to sounds[[]] 
- modelOptics="\A3\Weapons_f\acc\reticle_MyOptics_F"+  
- class OpticsModes +  ​ begin1[[]]={"A3\Sounds_F\weapons\SMG_02\SMG_02_st_1b", db0, 1,500}
-+  ​ begin2[[]]={"A3\Sounds_F\weapons\SMG_02\SMG_02_st_2b", ​db0, 1,500}; 
- class MyOptics +  ​ begin3[[]]={"​A3\Sounds_F\weapons\SMG_02\SMG_02_st_3b"​db01,500}; 
-+  ​ soundBegin[[]]={begin1,0.33, begin2,0.33, begin3,0.34}; 
- opticsID = 1; +   }
- useModelOptics = true; +   
- opticsPPEffects[]={"OpticsCHAbera1","​OpticsBlur1"​}; +  class SilencedSound:​ BaseSoundModeType /// Sounds inside this class are used when soundTypeIndex = 1, according to sounds[[]] 
- opticsZoomMin = 0.0555; +  { 
- opticsZoomMax = 0.1300; +  begin1[[]]={"​A3\sounds_f\weapons\silenced\silent-07", db-1, 1,200}; 
- opticsZoomInit= 0.1300; +  ​ begin2[[]]={"A3\sounds_f\weapons\silenced\silent-08", ​db-1, 1,200}; 
- discreteDistance[] = {100,300,400,500,​600,​700,​800,​900,​1000}; +  ​ soundBegin[[]]={begin1,0.5, begin2,0.5}; 
- discreteDistanceInitIndex = 1; +   }; 
- distanceZoomMin = 100; +  ​ ///​ various other fire mode parameters 
- distanceZoomMax = 1000; +   }; 
- nFovLimit = 0.07; +   };
- discretefov[] = {0.1300,0.0555}; +
- discreteInitIndex = 0+
- modelOptics[] = {"\A3\Weapons_f\acc\reticle_MyOptics_F",​ "\A3\Weapons_f\acc\reticle_MyOptics_z_F"}; +
- memoryPointCamera = "​opticView";​ +
- visionMode[] = {"Normal","​NVG"​}; +
- opticsFlare ​true; +
- opticsDisablePeripherialVision = true; +
- cameraDir = "";​ +
- }; +
- class IronOnTopOfMyOptics:​ MyOptics +
- { +
- opticsID = 2; +
- useModelOptics = false; +
- opticsFlare = false; +
- opticsDisablePeripherialVision = false; +
- opticsZoomMin=0.375; +
- opticsZoomMax=1.1;​ +
- opticsZoomInit=0.75; +
- memoryPointCamera = "​eye";​ +
- visionMode[] = {}; +
- discretefov[] = {}; +
- }; +
- }; +
- }; +
- }; +
-};+
 </​code>​ </​code>​
  
-**Side Accessory** 
- 
-the class of side accessory is made the same way as for muzzle accessory 
  
-subclass ItemInfo ​contains ​some specific ​parameters, but they work the same way as they did in A2/OA +===  Optics ​ === 
 +  *  in addition to default parameters mentioned in muzzle accessories class, there is **weaponInfoType** to choose a correct resource for weapon info directly inside optic class 
 +    *  there is the same ItemInfo ​subclass ​but with different parameters 
 +      *  don't forget that ItemInfo ​inherits ​some parameters ​from InventoryOpticsItem_Base_F (eg. muzzlePos and muzzleEnd) in case you rename the memory points 
 +    *  parameter **opticType** is used for balancing the optics for specific fire modes (should be further described by balancing crew) 
 +    *  **modelOptics** is the 2D model for selected optics 
 +    *  subclass **OpticsModes** works the same way it used to work in A2/OA
  
 <code cpp> <code cpp>
-class cfgWeapons +  ​class cfgWeapons 
-+  
- class ItemCore; +   class ItemCore; 
- class ​InventoryFlashLightItem_Base_F+   class InventoryOpticsItem_Base_F;  
- class ​mySidesAccessory +   class myOpticsAccessory 
-+  
- scope = 2; +   scope = 2; 
- displayName="​My ​Sides Accessory";​ +   displayName="​My ​Optics ​Accessory";​ 
-  +   
- picture="​\A3\weapons_F\Data\UI\mySidesAccessory_CA.paa";​ +   picture="​\A3\weapons_F\Data\UI\myOpticsAccessory_CA.paa";​ 
- model = "​\A3\weapons_f\acc\mySidesAccessory"; +   model = "​\A3\weapons_f\acc\myOpticsAccessory";  
-  +  ​ weaponInfoType = "​RscOptics_myOptics";​  
- class ItemInfo: ​InventoryFlashLightItem_Base_F +   
- +   class ItemInfo: ​InventoryOpticsItem_Base_F 
- mass = 9+   {  
- class Pointer +   mass = 7
- +  ​ modelOptics="​\A3\Weapons_f\acc\reticle_MyOptics_F";​  
- irLaserPos="laser pos"; +  class OpticsModes 
- irLaserEnd="laser dir"; +  
- }; +  ​ class MyOptics 
- class FlashLight{}; +  { 
- }; +  opticsID ​1; 
- }; +  useModelOptics = true; 
-};+  opticsPPEffects[[]]={"OpticsCHAbera1","​OpticsBlur1"​}
 +  ​ opticsZoomMin ​0.0555; 
 +  opticsZoomMax = 0.1300; 
 +  opticsZoomInit= 0.1300; 
 +  discreteDistance[[]] = {100,​300,​400,​500,​600,​700,​800,​900,​1000};​ 
 +  discreteDistanceInitIndex = 1;  
 +  distanceZoomMin = 100; 
 +  distanceZoomMax = 1000;  
 +  nFovLimit = 0.07; 
 +  discretefov[[]] = {0.1300,​0.0555};​ 
 +  discreteInitIndex = 0;  
 +  modelOptics[[]] = {"\A3\Weapons_f\acc\reticle_MyOptics_F", "​\A3\Weapons_f\acc\reticle_MyOptics_z_F"​};  
 +  ​ memoryPointCamera = "​opticView";​ 
 +  visionMode[[]] = {"​Normal","​NVG"​}; 
 +  ​ opticsFlare = true; 
 +  opticsDisablePeripherialVision = true; 
 +  cameraDir = "";​ 
 +  }; 
 +  class IronOnTopOfMyOptics:​ MyOptics 
 +  { 
 +  opticsID = 2; 
 +  useModelOptics = false; 
 +  opticsFlare = false; 
 +  opticsDisablePeripherialVision = false; 
 +  opticsZoomMin=0.375;​  
 +  opticsZoomMax=1.1; ​  
 +  opticsZoomInit=0.75;​ 
 +  memoryPointCamera = "​eye";​ 
 +  visionMode[[]] = {}; 
 +  discretefov[[]] = {}; 
 +  };  
 +  }; 
 +   }; 
 +   }; 
 +  };
 </​code>​ </​code>​
  
  
-===== Custom reload animations ===== +===  Side Accessory  ​=== 
- +  ​*  ​the class of side accessory ​is made the same way as for muzzle accessory 
-parameter reloadAction is now for both a magazine and the weapon. +    ​* ​ subclass ItemInfo contains some specific parametersbut they work the same way as they did in A2/OA
- +
-if it is not defined for any of them, default reload ​is played. +
- +
-if the parameter is defined ​for the weapon but isn't defined for a magazine, reloadAction for weapon is played upon reloading said weapon +
- +
-if the magazine has reloadAction defined, the action selected by this parameter is played every time (not depending on weapon). This ensures different reloads for different magazines of one weapon (eg. UGLs)  +
- +
-the action chosen by reloadAction is played according to config of animations for said soldier (action ​in CfgMovesMaleSdr leads to a state in CfgGesturesMale for default soldier), different target states could be defined for different action maps (eg. there could be a different reload gesture for crouch and prone with rifle) ​+
  
 <code cpp> <code cpp>
-class CfgMovesBasic +  ​class cfgWeapons 
-+  
- class ​DefaultDie+   class ItemCore
- class ​ManActions +   class InventoryFlashLightItem_Base_F;  
-+   class mySidesAccessory 
- reloadMyWeapon = "​reloadMyWeapon"​+  
- }; +  ​ scope = 2
-}; +  ​ displayName="​My Sides Accessory";​ 
- +   
-class CfgGesturesMale +  ​ picture="\A3\weapons_F\Data\UI\mySidesAccessory_CA.paa";​ 
-+  model = "\A3\weapons_f\acc\mySidesAccessory";  
- class Default+    
- class States +  ​ class ItemInfo: InventoryFlashLightItem_Base_F 
- +   { 
- class reloadMyWeapon:​ Default +  ​ mass ​9
- { +  ​ class Pointer 
- file="\A3\anims_f\Data\Anim\Sdr\wop\erc\stp\rld\rfl\reloadMyWeapon.rtm"; +   { 
- looped=0; +  ​ irLaserPos="laser pos"
- speed=0.400000;​ +  ​ irLaserEnd="laser dir"
- mask="​handsWeapon";​ +   }; 
- headBobStrength=0.200000+  ​ class FlashLight{};  
- headBobMode=2;​ +   }; 
- rightHandIKBeg=1;​ +   }; 
- rightHandIKEnd=1+  };
- leftHandIKCurve[]={0,​1,​0.050000,​0,​0.950000,​0,​1,​1}+
- }; +
- }; +
-}; +
- +
-class cfgWeapons +
-+
- class myWeapon +
-+
- reloadAction = "​reloadMyWeapon";​ +
- }; +
-};+
 </​code>​ </​code>​
  
  
-===== Underwater weapons =====+====  ​Custom reload animations  ​====
  
-weapons with canShootInWater set to 1 are able to shoot under water +  *  parameter **reloadAction** is now for both a magazine and the weapon. ​ 
- +    ​* ​ if it is not defined for any of them, default reload is played. 
-parameter ​soundBeginWater[] has the same use as soundBegin[] and defines what sounds and with what probability ​is going to be played ​while shooting under the water surfaceboth of them are defined ​per fire mode: +    ​* ​ if the parameter ​is defined for the weapon but isn't defined for a magazine, reloadAction for weapon ​is played ​upon reloading said weapon 
 +    *  if the magazine has reloadAction definedthe action selected by this parameter is played every time (not depending on weapon). This ensures different reloads for different magazines ​of one weapon (eg. UGLs) 
 +  *  the action chosen by reloadAction is played according to config of animations for said soldier (action in CfgMovesMaleSdr leads to a state in CfgGesturesMale for default soldier), different target states could be defined ​for different action maps (eg. there could be a different reload gesture for crouch and prone with rifle)
  
 <code cpp> <code cpp>
-class Mode_SemiAuto;​ +  ​class CfgMovesBasic 
- +  { 
-class cfgWeapons +   class DefaultDie; 
-{ +   class ManActions 
- class ​myWeapon +  
-+  ​ reloadMyWeapon ​= "reloadMyWeapon";  
- modes[] ​{"Single"​}; ​// this example weapon has just one fire mode +  }; 
- canShootInWater = 1;  ​// allows to shoot under water +  }; 
- class SingleMode_SemiAuto +   
- +  class CfgGesturesMale 
- begin1[]={"A3\sounds_f\weapons\myWeapon\myWeapon_st_1b.wav",​ db5, 1,900}; +  { 
- begin2[]={"​A3\sounds_f\weapons\myWeapon\myWeapon_st_2b.wav", db5, 1,900}+  class Default; 
- begin3[]={"​A3\sounds_f\weapons\myWeapon\myWeapon_st_3b.wav",​ db5, 1,900}+  class States 
- soundBegin[]={begin1,0.33, begin2,​0.33,​ begin3,​0.34} // all three sounds have roughly the same probablity +  { 
- beginwater1[]={"A3\sounds_f\weapons\myWeapon\underwater_myWeapon_st_1b.wav", db0, 1,200}+  class reloadMyWeaponDefault 
- beginwater2[]={"​A3\sounds_f\weapons\myWeapon\underwater_myWeapon_st_2b.wav", db5, 1,200}+  
- beginwater3[]={"​A3\sounds_f\weapons\myWeapon\underwater_myWeapon_st_3b.wav",​ db5, 1,200}+  ​ file="\A3\anims_f\Data\Anim\Sdr\wop\erc\stp\rld\rfl\reloadMyWeapon.rtm"; 
- soundBeginWater[]={beginwater1,0.33beginwater2,0.33beginwater3,0.34}; // all three sounds have roughly the same probablity +  ​ looped=0
- }; +  ​ speed=0.400000
- }; +  ​ mask="handsWeapon"; 
-};+  ​ headBobStrength=0.200000; 
 +  headBobMode=2;​ 
 +  rightHandIKBeg=1; 
 +  ​ rightHandIKEnd=1; 
 +  ​ leftHandIKCurve[[]]={0,1,0.050000,0,0.950000,0,1,1}; 
 +   }; 
 +   }; 
 +  }; 
 +   
 +  class cfgWeapons 
 +  {   
 +  class myWeapon 
 +  { 
 +  reloadAction = "​reloadMyWeapon";​ 
 +  }; 
 +  ​};
 </​code>​ </​code>​
  
-underwater ammo has some different characteristics 
  
-waterFriction is underwater equivalent of airFriction and supercavitating ammunition has this close to zero. Standard ammo doesn'​t have this set and that means it is set to -0.4 by default (ie. stops nearly right after entering water)+====  Underwater weapons ​ ====
  
-timeToLive for underwater ammo is rather low to let it be harmless after some 40 meters +  *  weapons with **canShootInWater** set to 1 are able to shoot under water 
- +    ​* ​ parameter **soundBeginWater** has the same use as //​soundBegin//​ and defines what sounds and with what probability ​is going to be played while shooting under the water surfaceboth of them are defined per fire mode:
-the fancy bubble effect ​is done by having effectFly set to AmmoUnderwateryou'll try to modify it to work even on ground and we all know it +
  
 <code cpp> <code cpp>
-class cfgAmmo +  ​class Mode_SemiAuto;​ 
-+  class cfgWeapons 
- class ​BulletBase+  ​  
- class myAmmo: BulletBase ​// For myWeapon +   class myWeapon 
-+  { 
- waterFriction ​-0.00096// nearly direct line underwater +  modes[[]] = {"​Single"​}// this example weapon has just one fire mode 
- timeToLive ​= 0.12; // that's enough for 45 meters underwater +  ​ canShootInWater = 1;  ​// allows to shoot under water 
- effectFly ​= "AmmoUnderwater"; +  class Single: Mode_SemiAuto 
- }; +  {  
-};+  begin1[[]]={"​A3\sounds_f\weapons\myWeapon\myWeapon_st_1b.wav",​ db5, 1,900}; 
 +  ​ begin2[[]]={"​A3\sounds_f\weapons\myWeapon\myWeapon_st_2b.wav",​ db5, 1,900}; 
 +  ​ begin3[[]]={"​A3\sounds_f\weapons\myWeapon\myWeapon_st_3b.wav", db5, 1,900}
 +  ​ soundBegin[[]]={begin1,0.33, begin2,​0.33,​ begin3,​0.34} // all three sounds have roughly the same probablity 
 +  ​ beginwater1[[]]={"A3\sounds_f\weapons\myWeapon\underwater_myWeapon_st_1b.wav", db0, 1,200}; 
 +  beginwater2[[]]={"​A3\sounds_f\weapons\myWeapon\underwater_myWeapon_st_2b.wav",​ db5, 1,200}; 
 +  beginwater3[[]]={"​A3\sounds_f\weapons\myWeapon\underwater_myWeapon_st_3b.wav",​ db5, 1,200}; 
 +  soundBeginWater[[]]={beginwater1,​0.33,​ beginwater2,​0.33,​ beginwater3,​0.34};​ // all three sounds have roughly the same probablity 
 +  }
 +   }; 
 +  };
 </​code>​ </​code>​
  
 +  *  underwater ammo has some different characteristics
 +    *  **waterFriction** is underwater equivalent of //​airFriction//​ and supercavitating ammunition has this close to zero. Standard ammo doesn'​t have this set and that means it is set to -0.4 by default (ie. stops nearly right after entering water)
 +    *  **timeToLive** for underwater ammo is rather low to let it be harmless after some 40 meters
 +    *  the fancy bubble effect is done by having **effectFly** set to **AmmoUnderwater**,​ you'll try to modify it to work even on ground and we all know it
  
-===== Ammo Changes On Fly And On Hit ===== 
- 
-there are two new simulations of ammo available mainly for artillery, but usable for many other means  
- 
-simulation shotSubmunition allows to deploy multiple ammo from the parent one upon meeting certain conditions 
- 
-parameter submunitionAmmo defines class of newly created ammo and this could be used multiple times 
- 
-you could set the inherited ammo and it would spread in cone according to submunitionConeAngle (and it is in degrees) 
- 
-submunitionConeType[] describes pattern of ammo in detail, first part is a distribution function ("​random",​ "​randomcenter",​ "​poissondisc",​ "​poissondisccenter",​ "​custom"​),​ second parameter is number of ammo except of custom one, where it is another array of pairs for specific locations ​ 
 <code cpp> <code cpp>
-submunitionConeType[] = {"​random",​ 10}+  class cfgAmmo 
-submunitionConeType[] ​{"​randomcenter",​ 10}+  ​{ 
-submunitionConeType[] ​{"​poissondisc",​ 10}+  class BulletBase
-submunitionConeType[] ​{"poissondisccenter", 10}; +  ​ class myAmmo: BulletBase // For myWeapon 
-submunitionConeType[] = {"​custom",​ {{0,0}, {-1,0}, {1,0}, {0,-1}, {0,​1}} ​};+  { 
 +  waterFriction ​-0.00096// nearly direct line underwater 
 +  ​ timeToLive ​0.12// that's enough for 45 meters underwater 
 +  ​ effectFly ​= "AmmoUnderwater"
 +  }; 
 +  };
 </​code>​ </​code>​
  
-parameter triggerDistance is used to deploy ammo in set 3D distance before expected target 
  
-parameter triggerTime is used to deploy ​ammo in set time after being fired+====  Ammo changes on fly and on hit  ==== 
 +  *  there are two new simulations of ammo available mainly for artillery, but usable for many other means
  
-parameter triggerSpeedCoef is a coefficient of speed of inherited ammo relative to speed of parent ammo +  *  simulation **shotSubmunition** allows to deploy multiple ammo from the parent one upon meeting certain conditions 
- +    *  parameter **submunitionAmmo** defines class of newly created ammo and this could be used multiple times 
-for Artillery computer use array aimAboveTarget[] and aimAboveDefault as a index of the array to set different heights to change the ammo to something different (eg. flare) ​+    *  you could set the inherited ammo and it would spread in cone according to **submunitionConeAngle** (and it is in degrees) 
 +    *  **submunitionConeType** describes pattern of ammo in detail, first part is a distribution function ("​random",​ "​randomcenter",​ "​poissondisc",​ "​poissondisccenter",​ "​custom"​),​ second parameter is number of ammo except of custom one, where it is another array of pairs for specific locations 
 +  submunitionConeType = {"​random",​ 10}; 
 +  submunitionConeType = {"​randomcenter",​ 10}; 
 +  submunitionConeType = {"​poissondisc",​ 10}; 
 +  submunitionConeType = {"​poissondisccenter",​ 10}; 
 +  submunitionConeType = {"​custom",​ {{0,0}, {-1,0}, {1,0}, {0,-1}, {0,1}} }; 
 +    *  parameter **triggerDistance** is used to deploy ammo in set 3D distance before expected target 
 +    *  parameter **triggerTime** is used to deploy ammo in set time after being fired 
 +    *  ​parameter ​**triggerSpeedCoef** is a coefficient of speed of inherited ammo relative to speed of parent ammo 
 +    ​*  ​for Artillery computer use array **aimAboveTarget** and **aimAboveDefault** as a index of the array to set different heights to change the ammo to something different (eg. flare)
  
 <code cpp> <code cpp>
-class cfgAmmo +  ​class cfgAmmo 
-+  
- class SubmunitionBase;​ +   class SubmunitionBase;​ 
- class MyAmmo: SubmunitionBase +   class MyAmmo: SubmunitionBase 
-+  
- submunitionAmmo = "​MySubmunitionAmmo";​ +   submunitionAmmo = "​MySubmunitionAmmo";​ 
- submunitionConeType[] = {"​poissondisc",​ 10}; +   submunitionConeType[[]] = {"​poissondisc",​ 10};   
- submunitionConeAngle = 10; +   submunitionConeAngle = 10; 
- triggerDistance = 100; +   triggerDistance = 100; 
- }; +   }; 
-};+  };
 </​code>​ </​code>​
  
-simulation shotDeploy is used to change ammo upon impact (eg. change to a mine) +  *  ​simulation ​**shotDeploy** is used to change ammo upon impact (eg. change to a mine) 
- +    ​*  ​it uses the same **submunitionAmmo** parameter as described above
-it uses the same submunitionAmmo parameter as described above +
  
 <code cpp> <code cpp>
-class cfgAmmo +  ​class cfgAmmo 
-+  
- class ShotDeployBase;​ +   class ShotDeployBase;​ 
- class Mo_ClassicMineRange:​ ShotDeployBase +   class Mo_ClassicMineRange:​ ShotDeployBase 
-+  
- submunitionAmmo = "​APERSMine_Range_Ammo";​ // some random mine deployable by a mortar +   submunitionAmmo = "​APERSMine_Range_Ammo";​ // some random mine deployable by a mortar 
- airFriction = 0;  // artillery ammo works better without friction +   airFriction = 0;  // artillery ammo works better without friction 
- EffectFly = "​ArtilleryTrails";​ // some funky effect of smoke trails and stuff +   EffectFly = "​ArtilleryTrails";​ // some funky effect of smoke trails and stuff 
- }; +   }; 
-};+  };
 </​code>​ </​code>​
  
  
-====Explosion shielding ​=====+====  Explosion shielding ​ ====
  
-class hitpoints in configuration of all vehicles (including soldiers) has got a new parameter called explosionShielding +  *  ​class hitpoints in configuration of all vehicles (including soldiers) has got a new parameter called ​**explosionShielding** 
- +    ​*  ​this parameter simply multiplies inidrectHit taken from explosives (that makes it explosion vulnerability in an effective way) - the higher it is the more damage would selected hitpoint get from the hit
-this parameter simply multiplies inidrectHit taken from explosives (that makes it explosion vulnerability in an effective way) - the higher it is the more damage would selected hitpoint get from the hit +
  
 <code cpp> <code cpp>
-class cfgVehicles +  ​class cfgVehicles 
-+  
- class myVehicle +   class myVehicle 
-+  
- class HitPoints +   class HitPoints 
- +  
- class HitLFWheel {armor=0.12;​ explosionShielding = 0.8;}; +   class HitLFWheel {armor=0.12;​ explosionShielding = 0.8;}; 
- }; +   }; 
- }; +   }; 
-};+  };
 </​code>​ </​code>​
- 
arma3/config/bis-weapon-config-guidelines.txt · Last modified: 2014-08-22 17:51 (external edit)