Page tree
Skip to end of metadata
Go to start of metadata

Note: Refers to the

This page requires a review regarding compatibility with VBS2.


Introduction

CfgWeapons, along with CfgMagazines and CfgAmmo are the root classes which define weapon configurations.

Weapons can be added to the game via addons, either inheriting definitions from classes already present in the game, or creating totally new ones.

CfgWepaons defines the weapon characteristics (i.e. which muzzles are available, the firing modes, and the types of magazines used). Magazine and ammo parameters are defined in CfgMagazines & CfgAmmo.

Parameters

access

TokenNameValueTypes
Description:

  1. define ReadAndWrite 0 //! any modifications enabled
  2. define ReadAndCreate 1 //! only adding new class members is allowed
  3. define ReadOnly 2 //! no modifications enabled
  4. define ReadOnlyVerified 3 //! no modifications enabled, CRC test applied
access = 3;

aiDispersionCoefX

TokenNameValueTypes
Description: Dispersion multiplier for Ai units (axis X - left to right)

aiDispersionCoefX = 7.1;

aiDispersionCoefY

TokenNameValueTypes
Description: Dispersion multiplier for Ai units (axis Y - top-down)

aiDispersionCoefY = 2.1;

aiRateOfFire

TokenNameValueTypes
Description: delay between shots at given distance (aiRateOfFireDistance)

aiRateOfFire = 0.3;

aiRateOfFireDistance

TokenNameValueTypes
Description: at shorter distance delay (aiRateOfFire) goes lineary to zero

aiRateOfFireDistance = 600;

autoAimEnabled

TokenNameValueTypes
Description: false for all standart weapons

autoAimEnabled = 0;

autoFire

TokenNameValueTypes
Description: If true weapon will continue firing once you press fire button once until you release it.

autoFire = 1;

autoReload

TokenNameValueTypes
Description: if true weapon will be reloaded automaticly once magazine is empty

autoReload = 1;

backgroundReload

TokenNameValueTypes
Description: Weapon automatically reloads magazines without player intervention or animation.

backgroundReload = 1;

ballisticsComputer

TokenNameValueTypes
Description: Weapon attempts to calculate and shift the aimpoint to hit a locked target based on range, target movement, own movement, and ballistics of selected ammo type. (unverified)

ballisticsComputer = 1;

burst

TokenNameValueTypes
Description: Number of shots actually fired each time the weapon is fired.

burst = 5;

cameraDir

TokenNameValueTypes
Description: (unverified)

cameraDir = "GL look";

canDrop

TokenNameValueTypes
Description: Weapon cannot be dropped from Inventory Menu with this set to false.

canDrop = 1;

canLock

TokenNameValueTypes
Description: Defines if weapon can be locked on the target (white box appears) Valid values: 0, 1, 2

  1. define LockNo 0
  2. define LockCadet 1
  3. define LockYes 2
canLock = 2;

cartridgePos

TokenNameValueTypes
Description:

cartridgePos = "nabojnicestart";

cartridgeVel

TokenNameValueTypes
Description:

cartridgeVel = "nabojniceend";

count

TokenNameValueTypes
Description: Number of shots weapon starts with. Should be defined in CfgMagazines instead.

count = 8;

cursor

TokenNameValueTypes
Description:

cursor = "\ca\Weapons\Data\w_weapon_S";

cursorAim

TokenNameValueTypes
Description:

cursorAim = "\ca\Weapons\Data\cursor_target_locked_ca.paa";

cursorSize

TokenNameValueTypes
Description:

cursorSize = 4;

dexterity

TokenNameValueTypes
Description: Ingame weapon handling value, lower value = takes more time to traverse a weapon

dexterity = 3.1;

dispersion

TokenNameValueTypes
Description: Ingame weapon dispersion. Bigger value - more dispersion

dispersion = 0.015;

displayName

TokenNameValueTypes
Description: Either reference to a stringtable, or the name, i.e "Vikhr".

displayName = "$STR_DN_VIKHR";

distanceZoomMax

TokenNameValueTypes
Description:

distanceZoomMax = 100;

distanceZoomMin

TokenNameValueTypes
Description:

distanceZoomMin = 500;

drySound[]

TokenNameValueTypes
Description: Sound when empty weapon fired

drySound[] = {"\ca\Weapons\Data\Sound\XMS_dry_v2",0.000316228,1};

enableAttack

TokenNameValueTypes
Description:

enableAttack = 1;

ffCount

TokenNameValueTypes
Description:

ffCount = 6;

ffFrequency

TokenNameValueTypes
Description:

ffFrequency = 11;

ffMagnitude

TokenNameValueTypes
Description:

ffMagnitude = 0.5;

fireLightDuration

TokenNameValueTypes
Description:

fireLightDuration = 0.05;

flash

TokenNameValueTypes
Description:

flash = "gunfire";

flashSize

TokenNameValueTypes
Description:

flashSize = 1.2;

forceOptics

TokenNameValueTypes
Description: Valid values: 0, 1, 2

forceOptics = 2;

initSpeed

TokenNameValueTypes
Description: Initial speed of shot.

initSpeed = 900;

laser

TokenNameValueTypes
Description:

laser = 0;

libTextDesc

TokenNameValueTypes
Description:

libTextDesc = "$STR_LIB_SVD";

magazineReloadTime

TokenNameValueTypes
Description: Time delay when reloading the weapon (changing magazines).

magazineReloadTime = 0.1;

maxRange

TokenNameValueTypes
Description: Together with *Range and *RangeProbab values defines probability to use this weapon for Ai units at given distance.

maxRange = 70;

maxRangeProbab

TokenNameValueTypes
Description:

maxRangeProbab = 0.1;

memoryPointCamera

TokenNameValueTypes
Description:

memoryPointCamera = "GL eye";

midRange

TokenNameValueTypes
Description:

midRange = 500;

midRangeProbab

TokenNameValueTypes
Description:

midRangeProbab = 0.2;

minRange

TokenNameValueTypes
Description:

minRange = 50;

minRangeProbab

TokenNameValueTypes
Description:

minRangeProbab = 0.1;

model

TokenNameValueTypes
Description:

model = "\ca\a10\AGM65";

modelMagazine

TokenNameValueTypes
Description:

modelMagazine = "";

modelOptics

TokenNameValueTypes
Description: Optic model used in game. "-" defines 3d view from the model (point "eye")

modelOptics = "\ca\Weapons\G36_optics";
modelOptics = "-";

modes[]

TokenNameValueTypes
Description:

modes[] = {"manual","close","short","medium","far"};

multiplier

TokenNameValueTypes
Description: Ammunition used per shot.

multiplier = 5;

muzzleEnd

TokenNameValueTypes
Description:

muzzleEnd = "konec hlavne";

muzzlePos

TokenNameValueTypes
Description:

muzzlePos = "usti hlavne";

muzzles[]

TokenNameValueTypes
Description:

muzzles[] = {"TimeBombMuzzle","PipeBombMuzzle","MineMuzzle","MineEMuzzle"};

nameSound

TokenNameValueTypes
Description: Sound played when vehicle cammander swith to this weapon

nameSound = "smokeshell";

optics

TokenNameValueTypes
Description:

optics = 1;

opticsDisablePeripherialVision

TokenNameValueTypes
Description:

opticsDisablePeripherialVision = 1;

opticsFlare

TokenNameValueTypes
Description:

opticsFlare = 1;

opticsZoomInit

TokenNameValueTypes
Description:

opticsZoomInit = 0.35;

opticsZoomMax

TokenNameValueTypes
Description:

opticsZoomMax = 0.0625;

opticsZoomMin

TokenNameValueTypes
Description:

opticsZoomMin = 0.0625;

picture

TokenNameValueTypes
Description:

picture = "smokeshell";

primary

TokenNameValueTypes
Description:

primary = 10;

recoil

TokenNameValueTypes
Description: Selects Weapon recoil defined in cfgRecoils config section

recoil = "AK74Recoil";

recoilProne

TokenNameValueTypes
Description: When prone recoil can be set to slower values

recoilProne = "AK74Recoil";

reloadAction

TokenNameValueTypes
Description:

reloadAction = "ManActReloadMagazine";

reloadMagazineSound[]

TokenNameValueTypes
Description: Sound played while changing magazines.

reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316228,1};

reloadSound[]

TokenNameValueTypes
Description: Sound played after each shot.

reloadSound[] = {"\ca\Weapons\Data\Sound\gun125reload",1,1};

reloadTime

TokenNameValueTypes
Description: Time delay between each individual shot.

reloadTime = 0.007;

scope

TokenNameValueTypes
Description:

scope = 2;


Note: Refers to the accessibility of the variable, not a rifle scope.

selectionFireAnim

TokenNameValueTypes
Description:

selectionFireAnim = "zasleh";

shotFromTurret

TokenNameValueTypes
Description: meaning unknown. But "zasleh" animation is not working if set to 1

shotFromTurret = 1;

showAimCursorInternal

TokenNameValueTypes
Description:

showAimCursorInternal = 1;

showEmpty

TokenNameValueTypes
Description: If false weapon gets hidden from the player once there's no ammo left for it

showEmpty = 1;

showSwitchAction

TokenNameValueTypes
Description:

showSwitchAction = 1;

showToPlayer

TokenNameValueTypes
Description: Some modes defined for Ai usage (ex. burst modes for full auto weapons) can be hidden from player with this parameter

showToPlayer = 1;

sound[]

TokenNameValueTypes
Description: Last parameter defines how fast the sound should be played. 1 means normal speed.

sound[] = {"\ca\Weapons\Data\Sound\AGS30_shot1",10,1};

soundBurst

TokenNameValueTypes
Description: When set to false single shot sound can be used with burst mode - it will be played several times

soundBurst = 1;

soundContinuous

TokenNameValueTypes
Description: If true sound for the next shot won't start before previous oe ends. Thus you can prevent sound overlapping.

soundContinuous = 1;

soundFly[]

TokenNameValueTypes
Description:

soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1",25.1189,0.8};

soundServo[]

TokenNameValueTypes
Description:

soundServo[] = {"",0.0001,1};

type

TokenNameValueTypes
Description: Defines gear slots that occupied by this weapon

#define WeaponNoSlot		0	// dummy weapon
#define WeaponSlotPrimary	1	// primary weapon
#define WeaponSlotHandGun	2	// handGun/sidearm
#define WeaponSlotSecondary	4	// secondary weapon
#define WeaponSlotHandGunItem	16	// sidearm/GL magazines	
#define WeaponSlotItem		256	// main magazines, items, explosives
#define WeaponSlotBinocular	4096	// binocular, NVG, LD, equipment
#define WeaponHardMounted	65536

UiPicture

TokenNameValueTypes
Description:

UiPicture = "\CA\weapons\data\Ico\i_aa_CA.paa";

useAction

TokenNameValueTypes
Description:

useAction = 1;

useActionTitle

TokenNameValueTypes
Description:

useActionTitle = "$STR_ACTION_PUTBOMB";

useAsBinocular

TokenNameValueTypes
Description:

useAsBinocular = 0;

value

TokenNameValueTypes
Description:

value = 0;