Weapon Asset (WaW)

From COD Engine Research
Jump to: navigation, search

The purpose of the weapon asset should be fairly obvious, but the structure not so much. The header on Xbox 360 is 0x9AC bytes long.

enum weapType_t
{
  WEAPTYPE_BULLET = 0x0,
  WEAPTYPE_GRENADE = 0x1,
  WEAPTYPE_PROJECTILE = 0x2,
  WEAPTYPE_BINOCULARS = 0x3,
  WEAPTYPE_GAS = 0x4,
  WEAPTYPE_BOMB = 0x5,
  WEAPTYPE_MINE = 0x6,
  WEAPTYPE_NUM = 0x7
};

enum weapClass_t
{
  WEAPCLASS_RIFLE = 0x0,
  WEAPCLASS_MG = 0x1,
  WEAPCLASS_SMG = 0x2,
  WEAPCLASS_SPREAD = 0x3,
  WEAPCLASS_PISTOL = 0x4,
  WEAPCLASS_GRENADE = 0x5,
  WEAPCLASS_ROCKETLAUNCHER = 0x6,
  WEAPCLASS_TURRET = 0x7,
  WEAPCLASS_NON_PLAYER = 0x8,
  WEAPCLASS_GAS = 0x9,
  WEAPCLASS_ITEM = 0xA,
  WEAPCLASS_NUM = 0xB
};

enum PenetrateType
{
  PENETRATE_TYPE_NONE = 0x0,
  PENETRATE_TYPE_SMALL = 0x1,
  PENETRATE_TYPE_MEDIUM = 0x2,
  PENETRATE_TYPE_LARGE = 0x3,
  PENETRATE_TYPE_COUNT = 0x4
};

enum ImpactType
{
  IMPACT_TYPE_NONE = 0x0,
  IMPACT_TYPE_BULLET_SMALL = 0x1,
  IMPACT_TYPE_BULLET_LARGE = 0x2,
  IMPACT_TYPE_BULLET_AP = 0x3,
  IMPACT_TYPE_SHOTGUN = 0x4,
  IMPACT_TYPE_GRENADE_BOUNCE = 0x5,
  IMPACT_TYPE_GRENADE_EXPLODE = 0x6,
  IMPACT_TYPE_RIFLE_EXPLODE = 0x7,
  IMPACT_TYPE_ROCKET_EXPLODE = 0x7,
  IMPACT_TYPE_PROJECTILE_DUD = 0x8,
  IMPACT_TYPE_MORTAR_SHELL = 0x8,
  IMPACT_TYPE_TANK_SHELL = 0x8,
  IMPACT_TYPE_COUNT = 0x9
};

enum weapInventoryType_t
{
  WEAPINVENTORY_PRIMARY = 0x0,
  WEAPINVENTORY_OFFHAND = 0x1,
  WEAPINVENTORY_ITEM = 0x2,
  WEAPINVENTORY_ALTMODE = 0x3,
  WEAPINVENTORYCOUNT = 0x4
};

enum weapFireType_t
{
  WEAPON_FIRETYPE_FULLAUTO = 0x0,
  WEAPON_FIRETYPE_SINGLESHOT = 0x1,
  WEAPON_FIRETYPE_BURSTFIRE2 = 0x2,
  WEAPON_FIRETYPE_BURSTFIRE3 = 0x3,
  WEAPON_FIRETYPE_BURSTFIRE4 = 0x4,
  WEAPON_FIRETYPECOUNT = 0x5
};

enum OffhandClass
{
  OFFHAND_CLASS_NONE = 0x0,
  OFFHAND_CLASS_FRAG_GRENADE = 0x1,
  OFFHAND_CLASS_SMOKE_GRENADE = 0x2,
  OFFHAND_CLASS_FLASH_GRENADE = 0x3,
  OFFHAND_CLASS_COUNT = 0x4
};

enum weapStance_t
{
  WEAPSTANCE_STAND = 0x0,
  WEAPSTANCE_DUCK = 0x1,
  WEAPSTANCE_PRONE = 0x2,
  WEAPSTANCE_NUM = 0x3
};

enum activeReticleType_t
{
  VEH_ACTIVE_RETICLE_NONE = 0x0,
  VEH_ACTIVE_RETICLE_PIP_ON_A_STICK = 0x1,
  VEH_ACTIVE_RETICLE_BOUNCING_DIAMOND = 0x2,
  VEH_ACTIVE_RETICLE_COUNT = 0x3
};

enum surfaceNames_t
{
  bark,
  brick,
  carpet,
  cloth,
  concrete,
  dirt,
  flesh,
  foliage,
  glass,
  grass,
  gravel,
  ice,
  metal,
  mud,
  paper,
  plaster,
  rock,
  sand,
  snow,
  water,
  wood,
  asphalt,
  ceramic,
  plastic,
  rubber,
  cushion,
  fruit,
  paintedmetal,
  player,
  tallgrass,
  opaqueglass
};

enum bodyParts_t
{
  none,
  helmet,
  head,
  neck,
  torso_upper,
  torso_lower,
  right_arm_upper,
  left_arm_upper, 
  right_arm_lower,
  left_arm_lower,
  right_hand,
  left_hand,
  right_leg_upper,
  left_leg_upper,
  right_leg_lower,
  left_leg_lower,
  right_foot,
  left_foot,
  gun
};

enum weaponIconRatioType_t
{
  WEAPON_ICON_RATIO_1TO1 = 0x0,
  WEAPON_ICON_RATIO_2TO1 = 0x1,
  WEAPON_ICON_RATIO_4TO1 = 0x2,
  WEAPON_ICON_RATIO_COUNT = 0x3
};

enum ammoCounterClipType_t
{
  AMMO_COUNTER_CLIP_NONE = 0x0,
  AMMO_COUNTER_CLIP_MAGAZINE = 0x1,
  AMMO_COUNTER_CLIP_SHORTMAGAZINE = 0x2,
  AMMO_COUNTER_CLIP_SHOTGUN = 0x3,
  AMMO_COUNTER_CLIP_ROCKET = 0x4,
  AMMO_COUNTER_CLIP_BELTFED = 0x5,
  AMMO_COUNTER_CLIP_ALTWEAPON = 0x6,
  AMMO_COUNTER_CLIP_COUNT = 0x7
};

enum weapOverlayReticle_t
{
  WEAPOVERLAYRETICLE_NONE = 0x0,
  WEAPOVERLAYRETICLE_CROSSHAIR = 0x1,
  WEAPOVERLAYRETICLE_NUM = 0x2
};

enum WeapOverlayInteface_t
{
  WEAPOVERLAYINTERFACE_NONE = 0x0,
  WEAPOVERLAYINTERFACE_JAVELIN = 0x1,
  WEAPOVERLAYINTERFACE_TURRETSCOPE = 0x2,
  WEAPOVERLAYINTERFACECOUNT = 0x3
};

enum weapProjExposion_t
{
  WEAPPROJEXP_GRENADE = 0x0,
  WEAPPROJEXP_ROCKET = 0x1,
  WEAPPROJEXP_FLASHBANG = 0x2,
  WEAPPROJEXP_NONE = 0x3,
  WEAPPROJEXP_DUD = 0x4,
  WEAPPROJEXP_SMOKE = 0x5,
  WEAPPROJEXP_HEAVY = 0x6,
  WEAPPROJEXP_FIRE = 0x7,
  WEAPPROJEXP_NAPALMBLOB = 0x8,
  WEAPPROJEXP_NUM = 0x9,
};

enum WeapStickinessType
{
  WEAPSTICKINESS_NONE = 0x0,
  WEAPSTICKINESS_ALL = 0x1,
  WEAPSTICKINESS_GROUND = 0x2,
  WEAPSTICKINESS_GROUND_WITH_YAW = 0x3,
  WEAPSTICKINESS_COUNT = 0x4
};

enum guidedMissileType_t
{
  MISSILE_GUIDANCE_NONE = 0x0,
  MISSILE_GUIDANCE_SIDEWINDER = 0x1,
  MISSILE_GUIDANCE_HELLFIRE = 0x2,
  MISSILE_GUIDANCE_JAVELIN = 0x3,
  MISSILE_GUIDANCE_BALLISTIC = 0x4,
  MISSILE_GUIDANCE_COUNT = 0x5
};

enum clipType_t
{
  WEAPCLIP_BOTTOM = 0x1,
  WEAPCLIP_TOP = 0x2,
  WEAPCLIP_LEFT = 0x3,
  WEAPCLIP_DP28 = 0x4,
  WEAPCLIP_PTRS = 0x5,
  WEAPCLIP_LMG = 0x6,
  WEAPCLIP_COUNT = 0x7
};

struct flameTable
{
  float streamChunkGravityStart;
  float streamChunkGravityEnd;
  float streamChunkMaxSize;
  float streamChunkStartSize;
  float streamChunkEndSize;
  float streamChunkStartSizeRand;
  float streamChunkEndSizeRand;
  float streamChunkDistScalar;
  float streamChunkDistSwayScale;
  float streamChunkDistSwayVelMax;
  float streamChunkSpeed;
  float streamChunkDecel;
  float streamChunkVelocityAddScale;
  float streamChunkDuration;
  float streamChunkDurationScaleMaxVelocity;
  float streamChunkDurationVelScalar;
  float streamChunkSizeSpeedScale;
  float streamChunkSizeAgeScale;
  float streamChunkSpawnFireIntervalStart;
  float streamChunkSpawnFireIntervalEnd;
  float streamChunkSpawnFireMinLifeFrac;
  float streamChunkSpawnFireMaxLifeFrac;
  float streamChunkFireMinLifeFrac;
  float streamChunkFireMinLifeFracStart;
  float streamChunkFireMinLifeFracEnd;
  float streamChunkDripsMinLifeFrac;
  float streamChunkDripsMinLifeFracStart;
  float streamChunkDripsMinLifeFracEnd;
  float streamChunkRotationRange;
  float streamSizeRandSinWave;
  float streamSizeRandCosWave;
  float streamDripsChunkInterval;
  float streamDripsChunkMinFrac;
  float streamDripsChunkRandFrac;
  float streamSmokeChunkInterval;
  float streamSmokeChunkMinFrac;
  float streamSmokeChunkRandFrac;
  float streamChunkCullDistSizeFrac;
  float streamChunkCullMinLife;
  float streamChunkCullMaxLife;
  float streamFuelSizeStart;
  float streamFuelSizeEnd;
  float streamFuelLength;
  float streamFuelNumSegments;
  float streamFuelAnimLoopTime;
  float streamFlameSizeStart;
  float streamFlameSizeEnd;
  float streamFlameLength;
  float streamFlameNumSegments;
  float streamFlameAnimLoopTime;
  float streamPrimaryLightRadius;
  float streamPrimaryLightRadiusFlutter;
  float streamPrimaryLightColor[3];
  float streamPrimaryLightFlutterColor[3];
  float fireLife;
  float fireLifeRand;
  float fireSpeedScale;
  float fireSpeedScaleRand;
  float fireVelocityAddZ;
  float fireVelocityAddZRand;
  float fireVelocityAddSideways;
  float fireGravity;
  float fireGravityEnd;
  float fireMaxRotVel;
  float fireFriction;
  float fireEndSizeAdd;
  float fireStartSizeScale;
  float fireEndSizeScale;
  float dripsLife;
  float dripsLifeRand;
  float dripsSpeedScale;
  float dripsSpeedScaleRand;
  float dripsVelocityAddZ;
  float dripsVelocityAddZRand;
  float dripsVelocityAddSideways;
  float dripsGravity;
  float dripsGravityEnd;
  float dripsMaxRotVel;
  float dripsFriction;
  float dripsEndSizeAdd;
  float dripsStartSizeScale;
  float dripsEndSizeScale;
  float smokeLife;
  float smokeLifeRand;
  float smokeSpeedScale;
  float smokeVelocityAddZ;
  float smokeGravity;
  float smokeGravityEnd;
  float smokeMaxRotation;
  float smokeMaxRotVel;
  float smokeFriction;
  float smokeEndSizeAdd;
  float smokeStartSizeAdd;
  float smokeOriginSizeOfsZScale;
  float smokeOriginOfsZ;
  float smokeFadein;
  float smokeFadeout;
  float smokeMaxAlpha;
  float smokeBrightness;
  float smokeOriginOffset;
  float collisionSpeedScale;
  float collisionVolumeScale;
  const char * name;
  Material * fire;
  Material * smoke;
  Material * heat;
  Material * drips;
  Material * streamFuel;
  Material * streamFuel2;
  Material * streamFlame;
  Material * streamFlame2;
  snd_alias_list_name flameOffLoopSound;
  snd_alias_list_name flameIgniteSound;
  snd_alias_list_name flameOnLoopSound;
  snd_alias_list_name flameCooldownSound;
};

struct WeaponDef
{
  const char *szInternalName;
  const char *szDisplayName;
  const char *szOverlayName;
  XModel *gunXModel[16];
  XModel *handXModel;
  const char *szDefaultXAnim;
  const char *szIdleXAnim;
  const char *szEmptyIdleXAnim;
  const char *szFireXAnim;
  const char *szHoldFireXAnim;
  const char *szLastShotXAnim;
  const char *szRechamberXAnim;
  const char *szMeleeXAnim;
  const char *szMeleeChargeXAnim;
  const char *szReloadXAnim;
  const char *szReloadEmptyXAnim;
  const char *szReloadStartXAnim;
  const char *szReloadEndXAnim;
  const char *szRaiseXAnim;
  const char *szFirstRaiseXAnim;
  const char *szDropXAnim;
  const char *szAltRaiseXAnim;
  const char *szAltDropXAnim;
  const char *szQuickRaiseXAnim;
  const char *szQuickDropXAnim;
  const char *szEmptyRaiseXAnim;
  const char *szEmptyDropXAnim;
  const char *szSprintInXAnim;
  const char *szSprintLoopXAnim;
  const char *szSprintOutXAnim;
  const char *szDeployXAnim;
  const char *szBreakdownXAnim;
  const char *szDetonateXAnim;
  const char *szNightVisionWearXAnim;
  const char *szNightVisionRemoveXAnim;
  const char *szAdsFireXAnim;
  const char *szAdsLastShotXAnim;
  const char *szAdsRechamberXAnim;
  const char *szAdsUpXAnim;
  const char *szAdsDownXAnim;
  const char *szModeName;
  unsigned __int16 hideTags[8];
  unsigned __int16 notetrackSoundMapKeys[20];
  unsigned __int16 notetrackSoundMapValues[20];
  int playerAnimType;
  weapType_t weapType;
  weapClass_t weapClass;
  PenetrateType penetrateType;
  ImpactType impactType;
  weapInventoryType_t inventoryType;
  weapFireType_t fireType;
  clipType_t clipType;
  int overheatWeapon;
  float overheatRate;
  float cooldownRate;
  float overheatEndVal;
  int coolWhileFiring;
  OffhandClass offhandClass;
  weapStance_t stance;
  FxEffectDef *viewFlashEffect;
  FxEffectDef *worldFlashEffect;
  snd_alias_list_name pickupSound;
  snd_alias_list_name pickupSoundPlayer;
  snd_alias_list_name ammoPickupSound;
  snd_alias_list_name ammoPickupSoundPlayer;
  snd_alias_list_name projectileSound;
  snd_alias_list_name pullbackSound;
  snd_alias_list_name pullbackSoundPlayer;
  snd_alias_list_name fireSound;
  snd_alias_list_name fireSoundPlayer;
  snd_alias_list_name loopFireSound;
  snd_alias_list_name loopFireSoundPlayer;
  snd_alias_list_name stopFireSound;
  snd_alias_list_name stopFireSoundPlayer;
  snd_alias_list_name lastShotSound;
  snd_alias_list_name lastShotSoundPlayer;
  snd_alias_list_name emptyFireSound;
  snd_alias_list_name emptyFireSoundPlayer;
  snd_alias_list_name crackSound;
  snd_alias_list_name whizbySound;
  snd_alias_list_name meleeSwipeSound;
  snd_alias_list_name meleeSwipeSoundPlayer;
  snd_alias_list_name meleeHitSound;
  snd_alias_list_name meleeMissSound;
  snd_alias_list_name rechamberSound;
  snd_alias_list_name rechamberSoundPlayer;
  snd_alias_list_name reloadSound;
  snd_alias_list_name reloadSoundPlayer;
  snd_alias_list_name reloadEmptySound;
  snd_alias_list_name reloadEmptySoundPlayer;
  snd_alias_list_name reloadStartSound;
  snd_alias_list_name reloadStartSoundPlayer;
  snd_alias_list_name reloadEndSound;
  snd_alias_list_name reloadEndSoundPlayer;
  snd_alias_list_name rotateLoopSound;
  snd_alias_list_name rotateLoopSoundPlayer;
  snd_alias_list_name deploySound;
  snd_alias_list_name deploySoundPlayer;
  snd_alias_list_name finishDeploySound;
  snd_alias_list_name finishDeploySoundPlayer;
  snd_alias_list_name breakdownSound;
  snd_alias_list_name breakdownSoundPlayer;
  snd_alias_list_name finishBreakdownSound;
  snd_alias_list_name finishBreakdownSoundPlayer;
  snd_alias_list_name detonateSound;
  snd_alias_list_name detonateSoundPlayer;
  snd_alias_list_name nightVisionWearSound;
  snd_alias_list_name nightVisionWearSoundPlayer;
  snd_alias_list_name nightVisionRemoveSound;
  snd_alias_list_name nightVisionRemoveSoundPlayer;
  snd_alias_list_name altSwitchSound;
  snd_alias_list_name altSwitchSoundPlayer;
  snd_alias_list_name raiseSound;
  snd_alias_list_name raiseSoundPlayer;
  snd_alias_list_name firstRaiseSound;
  snd_alias_list_name firstRaiseSoundPlayer;
  snd_alias_list_name putawaySound;
  snd_alias_list_name putawaySoundPlayer;
  snd_alias_list_name overheatSound;
  snd_alias_list_name overheatSoundPlayer;
  snd_alias_list_name *bounceSound;     //Refer to surfaceNames_t
  const char * standMountedWeapdef;
  const char * crouchMountedWeapdef;
  const char * proneMountedWeapdef;
  unsigned int standMountedWeapIndex;
  unsigned int crouchMountedWeapIndex;
  unsigned int proneMountedWeapIndex;
  FxEffectDef * viewShellEjectEffect;
  FxEffectDef * worldShellEjectEffect;
  FxEffectDef * viewLastShotEjectEffect;
  FxEffectDef * worldLastShotEjectEffect;
  Material *reticleCenter;
  Material *reticleSide;
  int iReticleCenterSize;
  int iReticleSideSize;
  int iReticleMinOfs;
  activeReticleType_t activeReticleType;
  float vStandMove[3];
  float vStandRot[3];
  float vDuckedOfs[3];
  float vDuckedMove[3];
  float vDuckedSprintOfs[3];
  float vDuckedSprintRot[3];
  float vDuckedSprintBob[2];
  float duckedSprintScale;
  float vSprintOfs[3];
  float vSprintRot[3];
  float vSprintBob[2];
  float sprintScale;
  float vDuckedRot[3];
  float vProneOfs[3];
  float vProneMove[3];
  float vProneRot[3];
  float fPosMoveRate;
  float fPosProneMoveRate;
  float fStandMoveMinSpeed;
  float fDuckedMoveMinSpeed;
  float fProneMoveMinSpeed;
  float fPosRotRate;
  float fPosProneRotRate;
  float fStandRotMinSpeed;
  float fDuckedRotMinSpeed;
  float fProneRotMinSpeed;
  XModel *worldModel[16];
  XModel *worldClipModel;
  XModel *rocketModel;
  XModel *knifeModel;
  XModel *worldKnifeModel;
  XModel *mountedModel;
  Material *hudIcon;
  weaponIconRatioType_t hudIconRatio;
  Material *ammoCounterIcon;
  weaponIconRatioType_t ammoCounterIconRatio;
  ammoCounterClipType_t ammoCounterClip;
  int iStartAmmo;
  const char *szAmmoName;
  int iAmmoIndex;
  const char *szClipName;
  int iClipIndex;
  int iMaxAmmo;
  int iClipSize;
  int shotCount;
  const char *szSharedAmmoCapName;
  int iSharedAmmoCapIndex;
  int iSharedAmmoCap;
  int unlimitedAmmo;
  int damage;
  float damageDuration;
  float damageInterval;
  int playerDamage;
  int iMeleeDamage;
  int iDamageType;
  int iFireDelay;
  int iMeleeDelay;
  int meleeChargeDelay;
  int iDetonateDelay;
  int iFireTime;
  int iRechamberTime;
  int iRechamberBoltTime;
  int iHoldFireTime;
  int iDetonateTime;
  int iMeleeTime;
  int meleeChargeTime;
  int iReloadTime;
  int reloadShowRocketTime;
  int iReloadEmptyTime;
  int iReloadAddTime;
  int iReloadEmptyAddTime;
  int iReloadStartTime;
  int iReloadStartAddTime;
  int iReloadEndTime;
  int iDropTime;
  int iRaiseTime;
  int iAltDropTime;
  int iAltRaiseTime;
  int quickDropTime;
  int quickRaiseTime;
  int iFirstRaiseTime;
  int iEmptyRaiseTime;
  int iEmptyDropTime;
  int sprintInTime;
  int sprintLoopTime;
  int sprintOutTime;
  int deployTime;
  int breakdownTime;
  int nightVisionWearTime;
  int nightVisionWearTimeFadeOutEnd;
  int nightVisionWearTimePowerUp;
  int nightVisionRemoveTime;
  int nightVisionRemoveTimePowerDown;
  int nightVisionRemoveTimeFadeInStart;
  int fuseTime;
  int aiFuseTime;
  int requireLockonToFire;
  int noAdsWhenMagEmpty;
  int avoidDropCleanup;
  float autoAimRange;
  float aimAssistRange;
  float aimAssistRangeAds;
  int mountableWeapon;
  float aimPadding;
  float enemyCrosshairRange;
  int crosshairColorChange;
  float moveSpeedScale;
  float adsMoveSpeedScale;
  float sprintDurationScale;
  float fAdsZoomFov;
  float fAdsZoomInFrac;
  float fAdsZoomOutFrac;
  Material *overlayMaterial;
  Material *overlayMaterialLowRes;
  weapOverlayReticle_t overlayReticle;
  WeapOverlayInteface_t overlayInterface;
  float overlayWidth;
  float overlayHeight;
  float fAdsBobFactor;
  float fAdsViewBobMult;
  float fHipSpreadStandMin;
  float fHipSpreadDuckedMin;
  float fHipSpreadProneMin;
  float hipSpreadStandMax;
  float hipSpreadDuckedMax;
  float hipSpreadProneMax;
  float fHipSpreadDecayRate;
  float fHipSpreadFireAdd;
  float fHipSpreadTurnAdd;
  float fHipSpreadMoveAdd;
  float fHipSpreadDuckedDecay;
  float fHipSpreadProneDecay;
  float fHipReticleSidePos;
  int iAdsTransInTime;
  int iAdsTransOutTime;
  float fAdsIdleAmount;
  float fHipIdleAmount;
  float adsIdleSpeed;
  float hipIdleSpeed;
  float fIdleCrouchFactor;
  float fIdleProneFactor;
  float fGunMaxPitch;
  float fGunMaxYaw;
  float swayMaxAngle;
  float swayLerpSpeed;
  float swayPitchScale;
  float swayYawScale;
  float swayHorizScale;
  float swayVertScale;
  float swayShellShockScale;
  float adsSwayMaxAngle;
  float adsSwayLerpSpeed;
  float adsSwayPitchScale;
  float adsSwayYawScale;
  float adsSwayHorizScale;
  float adsSwayVertScale;
  int bRifleBullet;
  int armorPiercing;
  int bBoltAction;
  int aimDownSight;
  int bRechamberWhileAds;
  float adsViewErrorMin;
  float adsViewErrorMax;
  int bCookOffHold;
  int bClipOnly;
  int canUseInVehicle;
  int noDropsOrRaises;
  int adsFireOnly;
  int cancelAutoHolsterWhenEmpty;
  int suppressAmmoReserveDisplay;
  int enhanced;
  int laserSightDuringNightvision;
  int bayonet;
  Material *killIcon;
  weaponIconRatioType_t killIconRatio;
  int flipKillIcon;
  Material *dpadIcon;
  weaponIconRatioType_t dpadIconRatio;
  int bNoPartialReload;
  int bSegmentedReload;
  int noADSAutoReload;
  int iReloadAmmoAdd;
  int iReloadStartAdd;
  const char *szAltWeaponName;
  unsigned int altWeaponIndex;
  int iDropAmmoMin;
  int iDropAmmoMax;
  int blocksProne;
  int silenced;
  int iExplosionRadius;
  int iExplosionRadiusMin;
  int iExplosionInnerDamage;
  int iExplosionOuterDamage;
  float damageConeAngle;
  int iProjectileSpeed;
  int iProjectileSpeedUp;
  int iProjectileSpeedForward;
  int iProjectileActivateDist;
  float projLifetime;
  float timeToAccelerate;
  float projectileCurvature;
  XModel *projectileModel;
  weapProjExposion_t projExplosion;
  FxEffectDef *projExplosionEffect;
  int projExplosionEffectForceNormalUp;
  FxEffectDef *projDudEffect;
  snd_alias_list_name *projExplosionSound;
  snd_alias_list_name *projDudSound;
  snd_alias_list_name *mortarShellSound;
  snd_alias_list_name *tankShellSound;
  int bProjImpactExplode;
  WeapStickinessType stickiness;
  int hasDetonator;
  int timedDetonation;
  int rotate;
  int holdButtonToThrow;
  int freezeMovementWhenFiring;
  float lowAmmoWarningThreshold;
  float parallelBounce[31];      //Refer to surfaceNames_t
  float perpendicularBounce[31];         //Refer to surfaceNames_t
  FxEffectDef *projTrailEffect;
  float vProjectileColor[3];
  guidedMissileType_t guidedMissileType;
  float maxSteeringAccel;
  int projIgnitionDelay;
  FxEffectDef *projIgnitionEffect;
  snd_alias_list_name projIgnitionSound;
  float fAdsAimPitch;
  float fAdsCrosshairInFrac;
  float fAdsCrosshairOutFrac;
  int adsGunKickReducedKickBullets;
  float adsGunKickReducedKickPercent;
  float fAdsGunKickPitchMin;
  float fAdsGunKickPitchMax;
  float fAdsGunKickYawMin;
  float fAdsGunKickYawMax;
  float fAdsGunKickAccel;
  float fAdsGunKickSpeedMax;
  float fAdsGunKickSpeedDecay;
  float fAdsGunKickStaticDecay;
  float fAdsViewKickPitchMin;
  float fAdsViewKickPitchMax;
  float fAdsViewKickYawMin;
  float fAdsViewKickYawMax;
  float fAdsViewKickCenterSpeed;
  float fAdsViewScatterMin;
  float fAdsViewScatterMax;
  float fAdsSpread;
  int hipGunKickReducedKickBullets;
  float hipGunKickReducedKickPercent;
  float fHipGunKickPitchMin;
  float fHipGunKickPitchMax;
  float fHipGunKickYawMin;
  float fHipGunKickYawMax;
  float fHipGunKickAccel;
  float fHipGunKickSpeedMax;
  float fHipGunKickSpeedDecay;
  float fHipGunKickStaticDecay;
  float fHipViewKickPitchMin;
  float fHipViewKickPitchMax;
  float fHipViewKickYawMin;
  float fHipViewKickYawMax;
  float fHipViewKickCenterSpeed;
  float fHipViewScatterMin;
  float fHipViewScatterMax;
  float fightDist;
  float maxDist;
  const char * aiVsAiAccuracyGraphName;
  const char * aiVsPlayerAccuracyGraphName;
  vec2_t * aiVsAiAccuracyGraphKnots;
  vec2_t * aiVsPlayerAccuracyGraphKnots;
  vec2_t * aiVsAiOriginalAccuracyGraphKnots;
  vec2_t * aiVsPlayerOriginalAccuracyGraphKnots;
  int aiVsAiAccuracyGraphKnotCount;
  int aiVsPlayerAccuracyGraphKnotCount;
  int aiVsAiOriginalAccuracyGraphKnotCount;
  int aiVsPlayerOriginalAccuracyGraphKnotCount;
  int iPositionReloadTransTime;
  float leftArc;
  float rightArc;
  float topArc;
  float bottomArc;
  float accuracy;
  float aiSpread;
  float playerSpread;
  float minTurnSpeed[2];
  float maxTurnSpeed[2];
  float pitchConvergenceTime;
  float yawConvergenceTime;
  float suppressTime;
  float maxRange;
  float fAnimHorRotateInc;
  float fPlayerPositionDist;
  const char *szUseHintString;
  const char *dropHintString;
  int iUseHintStringIndex;
  int dropHintStringIndex;
  float horizViewJitter;
  float vertViewJitter;
  const char *szScript;
  float fOOPosAnimLength[2];
  int minDamage;
  int minPlayerDamage;
  float fMaxDamageRange;
  float fMinDamageRange;
  float destabilizationRateTime;
  float destabilizationCurvatureMax;
  int destabilizeDistance;
  float locationDamageMultipliers[19];      //Refer to bodyParts_t
  const char *fireRumble;
  const char *meleeImpactRumble;
  float adsDofStart;
  float adsDofEnd;
  float hipDofStart;
  float hipDofEnd;
  const char * firstPersonFlameTableName;
  const char * thirdPersonFlameTableName;
  flameTable * firstPersonFlameTable;
  flameTable * thirdPersonFlameTable;
  FxEffectDef * tagFx_preparationEffect;
  FxEffectDef * tagFlash_preparationEffect;
};

Source Format

The weapon source files are raw text files with no extension, located at "raw/weapons/sp/" for SP weapons and "raw/weapons/mp/" for MP weapons. They use the same format as many other assets, with each setting name and value separated by a back-slash. The first setting identifies the file, and for weapons the identifier string is "WEAPONFILE". For example, here is "raw/weapons/mp/defaultweapon_mp from WaW...

WEAPONFILE\displayName\WEAPON_DEFAULTWEAPON\modeName\\playerAnimType\autorifle\altWeapon\\AIOverlayDescription\\weaponType\bullet\weaponClass\rifle\penetrateType\none\impactType\bullet_small\inventoryType\primary\fireType\Full Auto\clipType\bottom\twoHanded\0\rifleBullet\1\armorPiercing\0\boltAction\0\aimDownSight\1\rechamberWhileAds\1\noADSAutoReload\0\noPartialReload\0\segmentedReload\0\adsFire\0\noAdsWhenMagEmpty\0\avoidDropCleanup\0\enhanced\0\bayonet\0\cancelAutoHolsterWhenEmpty\0\suppressAmmoReserveDisplay\0\laserSightDuringNightvision\0\blocksProne\0\silenced\0\mountableWeapon\0\autoAimRange\0\aimAssistRange\3200\aimAssistRangeAds\3200\enemyCrosshairRange\1600\crosshairColorChange\1\moveSpeedScale\1\adsMoveSpeedScale\1\sprintDurationScale\1\gunMaxPitch\80\gunMaxYaw\15\lowAmmoWarningThreshold\0.33\ammoName\defaultweapon\maxAmmo\100\startAmmo\100\clipName\defaultweapon\clipSize\10\shotCount\1\dropAmmoMin\50\dropAmmoMax\75\reloadAmmoAdd\5\reloadStartAdd\5\damage\100\minDamage\80\meleeDamage\75\maxDamageRange\1200\minDamageRange\2200\playerDamage\100\locNone\1\locHelmet\1.4\locHead\1.4\locNeck\1.4\locTorsoUpper\1.2\locTorsoLower\0.9\locRightArmUpper\0.8\locRightArmLower\0.6\locRightHand\0.1\locLeftArmUpper\0.8\locLeftArmLower\0.6\locLeftHand\0.1\locRightLegUpper\0.5\locRightLegLower\0.4\locRightFoot\0.1\locLeftLegUpper\0.5\locLeftLegLower\0.4\locLeftFoot\0.1\locGun\0\fireTime\0.33\fireDelay\0\meleeTime\0.5\meleeChargeTime\1\meleeDelay\0.05\meleeChargeDelay\0.15\reloadTime\0.5\reloadEmptyTime\0.5\reloadEmptyAddTime\0\reloadStartTime\0\reloadEndTime\0\reloadAddTime\0\reloadStartAddTime\0\rechamberTime\0.1\rechamberBoltTime\0\dropTime\0.4\raiseTime\0.5\altDropTime\0\altRaiseTime\0\quickDropTime\0.25\quickRaiseTime\0.25\firstRaiseTime\0.5\emptyDropTime\0.5\emptyRaiseTime\0.5\sprintInTime\0.5\sprintLoopTime\0.5\sprintOutTime\0.5\deployTime\0\breakdownTime\0\nightVisionWearTime\0\nightVisionWearTimeFadeOutEnd\0\nightVisionWearTimePowerUp\0\nightVisionRemoveTime\0\nightVisionRemoveTimePowerDown\0\nightVisionRemoveTimeFadeInStart\0\standMoveF\-0.3\standMoveR\0.7\standMoveU\-1\standRotP\0\standRotY\0\standRotR\0\standMoveMinSpeed\80\standRotMinSpeed\80\posMoveRate\6\posRotRate\7.5\sprintOfsF\0\sprintOfsR\0\sprintOfsU\0\sprintRotP\0\sprintRotY\0\sprintRotR\0\sprintBobH\6\sprintBobV\8\sprintScale\0.9\duckedSprintOfsF\0\duckedSprintOfsR\0\duckedSprintOfsU\0\duckedSprintRotP\0\duckedSprintRotY\0\duckedSprintRotR\0\duckedSprintBobH\0\duckedSprintBobV\0\duckedSprintScale\0.01\duckedMoveF\0\duckedMoveR\0.5\duckedMoveU\-1.2\duckedRotP\0\duckedRotY\0\duckedRotR\0\duckedOfsF\-0.6\duckedOfsR\1\duckedOfsU\-0.2\duckedMoveMinSpeed\20\duckedRotMinSpeed\20\proneMoveF\-50\proneMoveR\-75\proneMoveU\-90\proneRotP\50\proneRotY\150\proneRotR\40\proneOfsF\-0.5\proneOfsR\1.2\proneOfsU\0.8\posProneMoveRate\20\posProneRotRate\20\proneMoveMinSpeed\0\proneRotMinSpeed\0\hipIdleAmount\30\adsIdleAmount\21\hipIdleSpeed\1\adsIdleSpeed\1\idleCrouchFactor\0.75\idleProneFactor\0.25\adsSpread\0.05\adsAimPitch\0\adsTransInTime\0.3\adsTransOutTime\0.4\adsTransBlendTime\0.1\adsReloadTransTime\0.6\adsCrosshairInFrac\1\adsCrosshairOutFrac\0.2\adsZoomFov\50\adsZoomInFrac\0.42\adsZoomOutFrac\0.08\adsBobFactor\0.1\adsViewBobMult\0.1\adsViewErrorMin\0\adsViewErrorMax\0\hipSpreadStandMin\0.8\hipSpreadDuckedMin\0.6\hipSpreadProneMin\0.4\hipSpreadMax\7\hipSpreadDuckedMax\7\hipSpreadProneMax\7\hipSpreadFireAdd\1\hipSpreadTurnAdd\0\hipSpreadMoveAdd\4.75\hipSpreadDecayRate\3.25\hipSpreadDuckedDecay\1.5\hipSpreadProneDecay\1.2\hipGunKickReducedKickBullets\4\hipGunKickReducedKickPercent\20\hipGunKickPitchMin\-30\hipGunKickPitchMax\-35\hipGunKickYawMin\-2\hipGunKickYawMax\18\hipGunKickAccel\1000\hipGunKickSpeedMax\1200\hipGunKickSpeedDecay\100\hipGunKickStaticDecay\100\adsGunKickReducedKickBullets\4\adsGunKickReducedKickPercent\20\adsGunKickPitchMin\-85\adsGunKickPitchMax\-90\adsGunKickYawMin\16\adsGunKickYawMax\18\adsGunKickAccel\400\adsGunKickSpeedMax\300\adsGunKickSpeedDecay\100\adsGunKickStaticDecay\100\hipViewKickPitchMin\60\hipViewKickPitchMax\70\hipViewKickYawMin\-35\hipViewKickYawMax\35\hipViewKickCenterSpeed\1600\adsViewKickPitchMin\60\adsViewKickPitchMax\67\adsViewKickYawMin\15\adsViewKickYawMax\18\adsViewKickCenterSpeed\1200\swayMaxAngle\3\swayLerpSpeed\6\swayPitchScale\0.1\swayYawScale\0.1\swayHorizScale\0.06\swayVertScale\0.1\swayShellShockScale\5\adsSwayMaxAngle\3\adsSwayLerpSpeed\5\adsSwayPitchScale\0.1\adsSwayYawScale\0.1\adsSwayHorizScale\0.12\adsSwayVertScale\0.2\fightDist\720\maxDist\1400\aiVsAiAccuracyGraph\\aiVsPlayerAccuracyGraph\\reticleCenter\\reticleSide\reticle_side_small\reticleCenterSize\4\reticleSideSize\8\reticleMinOfs\0\hipReticleSidePos\0\adsOverlayShader\\adsOverlayShaderLowRes\\adsOverlayReticle\none\adsOverlayWidth\220\adsOverlayHeight\220\gunModel\viewmodel_default\gunModel2\\gunModel3\\gunModel4\\gunModel5\\gunModel6\\gunModel7\\gunModel8\\gunModel9\\gunModel10\\gunModel11\\gunModel12\\gunModel13\\gunModel14\\gunModel15\\gunModel16\\handModel\viewmodel_hands_no_model\worldModel\defaultweapon\worldModel2\\worldModel3\\worldModel4\\worldModel5\\worldModel6\\worldModel7\\worldModel8\\worldModel9\\worldModel10\\worldModel11\\worldModel12\\worldModel13\\worldModel14\\worldModel15\\worldModel16\\worldClipModel\\knifeModel\viewmodel_usa_kbar_knife\worldKnifeModel\weapon_usa_kbar_knife_mp\idleAnim\viewmodel_default_idle\emptyIdleAnim\viewmodel_default_idle\fireAnim\viewmodel_default_fire\lastShotAnim\viewmodel_default_fire\rechamberAnim\viewmodel_default_idle\meleeAnim\viewmodel_default_fire\meleeChargeAnim\\reloadAnim\viewmodel_default_idle\reloadEmptyAnim\viewmodel_default_idle\reloadStartAnim\viewmodel_default_idle\reloadEndAnim\viewmodel_default_idle\raiseAnim\viewmodel_default_pullout\dropAnim\viewmodel_default_putaway\firstRaiseAnim\viewmodel_default_pullout\altRaiseAnim\viewmodel_default_idle\altDropAnim\viewmodel_default_idle\quickRaiseAnim\viewmodel_default_pullout\quickDropAnim\viewmodel_default_putaway\emptyRaiseAnim\\emptyDropAnim\\sprintInAnim\\sprintLoopAnim\\sprintOutAnim\\nightVisionWearAnim\\nightVisionRemoveAnim\\adsFireAnim\viewmodel_default_fire\adsLastShotAnim\viewmodel_default_fire\adsRechamberAnim\viewmodel_default_idle\adsUpAnim\viewmodel_default_ADS_up\adsDownAnim\viewmodel_default_ADS_down\deployAnim\\breakdownAnim\\viewFlashEffect\weapon/muzzleflashes/heavy_view\worldFlashEffect\weapon/muzzleflashes/heavy\viewShellEjectEffect\weapon/shellejects/rifle_view\worldShellEjectEffect\weapon/shellejects/rifle\viewLastShotEjectEffect\\worldLastShotEjectEffect\\worldClipDropEffect\\pickupSound\\pickupSoundPlayer\\ammoPickupSound\\ammoPickupSoundPlayer\\breakdownSound\\breakdownSoundPlayer\\deploySound\\deploySoundPlayer\\finishDeploySound\\finishDeploySoundPlayer\\fireSound\\fireSoundPlayer\\lastShotSound\\lastShotSoundPlayer\\emptyFireSound\\emptyFireSoundPlayer\\crackSound\\whizbySound\\meleeSwipeSound\\meleeSwipeSoundPlayer\\meleeHitSound\\meleeMissSound\\rechamberSound\\rechamberSoundPlayer\\reloadSound\\reloadSoundPlayer\\reloadEmptySound\\reloadEmptySoundPlayer\\reloadStartSound\\reloadStartSoundPlayer\\reloadEndSound\\reloadEndSoundPlayer\\altSwitchSound\\altSwitchSoundPlayer\\raiseSound\\raiseSoundPlayer\\firstRaiseSound\\firstRaiseSoundPlayer\\putawaySound\\putawaySoundPlayer\\nightVisionWearSound\\nightVisionWearSoundPlayer\\nightVisionRemoveSound\\nightVisionRemoveSoundPlayer\\standMountedWeapdef\\crouchMountedWeapdef\\proneMountedWeapdef\\mountedModel\\hudIcon\hud_icon_ak47\killIcon\hud_icon_ak47\dpadIcon\\ammoCounterIcon\hud_icon_ak47\hudIconRatio\1:1\killIconRatio\1:1\dpadIconRatio\4:1\ammoCounterIconRatio\1:1\ammoCounterClip\None\flipKillIcon\1\fireRumble\\meleeImpactRumble\\adsDofStart\0\adsDofEnd\0\hideTags\\notetrackSoundMap\melee_knife_stab melee_knife_stab