Weapon Asset (Ghosts): Difference between revisions

From COD Engine Research
No edit summary
No edit summary
Line 2: Line 2:
[[Category:Assets]]
[[Category:Assets]]
[[Category:Ghosts]]
[[Category:Ghosts]]
The purpose of the weapon asset should be fairly obvious, but the structure not so much. The weapon asset on Ghosts continues on the Modern Warfare 2 idea of the "WeaponVariantDef". On Xbox 360 the WeaponVariantDef is 0xBC bytes, while the WeaponDef is 0x848.
The purpose of the weapon asset should be fairly obvious, but the structure not so much. The weapon asset on Ghosts continues on the Modern Warfare 2 idea of the "WeaponVariantDef". Tthe WeaponVariantDef is 0xBC bytes, while the WeaponDef is 0x848.
<source lang="cpp">
<source lang="cpp">
enum playerAnimType_t : int
enum playerAnimType_t : int
Line 166: Line 166:
   FxEffectDef * worldFlashEffect;
   FxEffectDef * worldFlashEffect;
   FxEffectDef * viewADSFlashEffect;
   FxEffectDef * viewADSFlashEffect;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] pickUpSound;
   snd_alias_list_name pickUpSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] pickUpSoundPlayer;
   snd_alias_list_name pickUpSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] ammoPickupSound;
   snd_alias_list_name ammoPickupSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] ammoPickupSoundPlayer;
   snd_alias_list_name ammoPickupSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] projectileSound;
   snd_alias_list_name projectileSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] pullbackSound;
   snd_alias_list_name pullbackSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] pullbackSoundPlayer;
   snd_alias_list_name pullbackSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] fireSound;
   snd_alias_list_name fireSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] fireSoundPlayer;
   snd_alias_list_name fireSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] fireSoundPlayerAkimbo;
   snd_alias_list_name fireSoundPlayerAkimbo;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] loopFireSound;
   snd_alias_list_name loopFireSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] loopFireSoundPlayer;
   snd_alias_list_name loopFireSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] stopFireSound;
   snd_alias_list_name stopFireSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] stopFireSoundPlayer;
   snd_alias_list_name stopFireSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] lastShotSound;
   snd_alias_list_name lastShotSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] lastShotSoundPlayer;
   snd_alias_list_name lastShotSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] emptyFireSound;
   snd_alias_list_name emptyFireSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] emptyFireSoundPlayer;
   snd_alias_list_name emptyFireSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] meleeSwipeSound;
   snd_alias_list_name meleeSwipeSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] meleeSwipeSoundPlayer;
   snd_alias_list_name meleeSwipeSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] meleeHitSound;
   snd_alias_list_name meleeHitSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] meleeMissSound;
   snd_alias_list_name meleeMissSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] rechamberSound;
   snd_alias_list_name rechamberSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] rechamberSoundPlayer;
   snd_alias_list_name rechamberSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] reloadSound;
   snd_alias_list_name reloadSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] reloadSoundPlayer;
   snd_alias_list_name reloadSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] reloadEmptySound;
   snd_alias_list_name reloadEmptySound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] reloadEmptySoundPlayer;
   snd_alias_list_name reloadEmptySoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] reloadStartSound;
   snd_alias_list_name reloadStartSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] reloadStartSoundPlayer;
   snd_alias_list_name reloadStartSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] reloadEndSound;
   snd_alias_list_name reloadEndSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] reloadEndSoundPlayer;
   snd_alias_list_name reloadEndSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] detonateSound;
   snd_alias_list_name detonateSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] detonateSoundPlayer;
   snd_alias_list_name detonateSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] nightVisionWearSound;
   snd_alias_list_name nightVisionWearSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] nightVisionWearSoundPlayer;
   snd_alias_list_name nightVisionWearSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] nightVisionRemoveSound;
   snd_alias_list_name nightVisionRemoveSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] nightVisionRemoveSoundPlayer;
   snd_alias_list_name nightVisionRemoveSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] altSwitchSound;
   snd_alias_list_name altSwitchSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] altSwitchSoundPlayer;
   snd_alias_list_name altSwitchSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] raiseSound;
   snd_alias_list_name raiseSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] raiseSoundPlayer;
   snd_alias_list_name raiseSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] firstRaiseSound;
   snd_alias_list_name firstRaiseSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] firstRaiseSoundPlayer;
   snd_alias_list_name firstRaiseSoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] putawaySound;
   snd_alias_list_name putawaySound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] putawaySoundPlayer;
   snd_alias_list_name putawaySoundPlayer;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] scanSound;
   snd_alias_list_name scanSound;
       [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] unknownSound1;
       snd_alias_list_name unknownSound1;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] * parallelBounceSound;
   snd_alias_list_name * parallelBounceSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] * perpendicularBounceSound;
   snd_alias_list_name * perpendicularBounceSound;
   FxEffectDef * viewShellEjectEffect;
   FxEffectDef * viewShellEjectEffect;
   FxEffectDef * worldShellEjectEffect;
   FxEffectDef * worldShellEjectEffect;
Line 383: Line 383:
   FxEffectDef * projExplosionEffect;
   FxEffectDef * projExplosionEffect;
   FxEffectDef * projDudEffect;
   FxEffectDef * projDudEffect;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] projExplosionSound;
   snd_alias_list_name projExplosionSound;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] projDudSound;
   snd_alias_list_name projDudSound;
   WeapStickinessType stickiness;
   WeapStickinessType stickiness;
   float lowAmmoWarningThreshold;
   float lowAmmoWarningThreshold;
Line 426: Line 426:
   float maxDist;
   float maxDist;
   const char *accuracyGraphName[2];
   const char *accuracyGraphName[2];
   [[:Vectors#vec2_t|vec2_t]] * accuracyGraphKnots;
   vec2_t * accuracyGraphKnots;
   [[:Vectors#vec2_t|vec2_t]] * originalAccuracyGraphKnots;
   vec2_t * originalAccuracyGraphKnots;
   short accuracyGraphKnotCount;
   short accuracyGraphKnotCount;
   short originalAccuracyGraphKnotCount;
   short originalAccuracyGraphKnotCount;
Line 476: Line 476:
   int turretBarrelSpinDownTime;
   int turretBarrelSpinDownTime;
   int turretBarrelSpinSpeed;
   int turretBarrelSpinSpeed;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] turretBarrelSpinMaxSnd;
   snd_alias_list_name turretBarrelSpinMaxSnd;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] turretBarrelSpinUpSnds[4];
   snd_alias_list_name turretBarrelSpinUpSnds[4];
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] turretBarrelSpinDownSnds[4];
   snd_alias_list_name turretBarrelSpinDownSnds[4];
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] missileConeSoundAlias;
   snd_alias_list_name missileConeSoundAlias;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] missileConeSoundAliasAtBase;
   snd_alias_list_name missileConeSoundAliasAtBase;
       char unknown16[0x34];
       char unknown16[0x34];
   ScriptString unknownScriptString;
   ScriptString unknownScriptString;
Line 498: Line 498:
{
{
   int unknown1;
   int unknown1;
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] unknownSounds[2];
   snd_alias_list_name unknownSounds[2];
   int unknown2;
   int unknown2;
};
};
Line 558: Line 558:
   short accuracyGraphKnotCount;
   short accuracyGraphKnotCount;
   short originalAccuracyGraphKnotCount;
   short originalAccuracyGraphKnotCount;
   [[:Vectors#vec2_t|vec2_t]] *accuracyGraphKnots;
   vec2_t *accuracyGraphKnots;
   [[:Vectors#vec2_t|vec2_t]] *originalAccuracyGraphKnots;
   vec2_t *originalAccuracyGraphKnots;
       int unknown5;
       int unknown5;
       char * unknownString;
       char * unknownString;

Revision as of 19:09, 11 June 2014

The purpose of the weapon asset should be fairly obvious, but the structure not so much. The weapon asset on Ghosts continues on the Modern Warfare 2 idea of the "WeaponVariantDef". Tthe WeaponVariantDef is 0xBC bytes, while the WeaponDef is 0x848.

enum playerAnimType_t : int
{
  none = 0x0,
  other = 0x1,
  pistol = 0x2,
  smg = 0x3,
  autorifle = 0x4,
  mg = 0x5,
  sniper = 0x6,
  rocketlauncher = 0x7,
  explosive = 0x8,
  grenade = 0x9,
  turret = 0xA,
  c4 = 0xB, 
  m203 = 0xC, 
  hold = 0xD,
  briefcase = 0xE,
  riotshield = 0xF,
  laptop = 0x10,
  throwingknife = 0x11,
  mortar = 0x12,
  juggernautmaniac = 0x13,
  claymore = 0x14,
  minigun = 0x15,
  drill = 0x16,
  dogwhistle = 0x17,
  smg_bullpup = 0x18,
  autorifle_bullpup = 0x19,
  sniper_bullpup = 0x1A,
  killstreaktrigger = 0x1B,
  trophysystem = 0x1C,
  PLAYER_ANIM_TYPE_MAX
};

enum weapType_t : int
{
  WEAPTYPE_NONE,
  WEAPTYPE_BULLET,
  WEAPTYPE_GRENADE,
  WEAPTYPE_PROJECTILE,
  WEAPTYPE_RIOTSHIELD,
  WEAPTYPE_MAX
};

enum weapClass_t : int
{
  WEAPCLASS_RIFLE = 0,
  WEAPCLASS_SNIPER = 1,
  WEAPCLASS_MG = 2,
  WEAPCLASS_SMG = 3,
  WEAPCLASS_SPREAD = 4,
  WEAPCLASS_PISTOL = 5,
  WEAPCLASS_GRENADE = 6,
  WEAPCLASS_ROCKETLAUNCHER = 7,
  WEAPCLASS_TURRET = 8,
  WEAPCLASS_THROWINGKNIFE = 9,
  WEAPCLASS_NON_PLAYER = 10,
  WEAPCLASS_ITEM = 11,
  WEAPCLASS_MAX
};

enum PenetrateType : int
{
  PENETRATE_TYPE_NONE = 0,
  PENETRATE_TYPE_SMALL = 1,
  PENETRATE_TYPE_MEDIUM = 2,
  PENETRATE_TYPE_LARGE = 3,
  PENETRATE_TYPE_MAX 
};

enum weapInventoryType_t : int
{
  WEAPINVENTORY_PRIMARY = 0,
  WEAPINVENTORY_OFFHAND = 1,
  WEAPINVENTORY_ITEM = 2,
  WEAPINVENTORY_ALTMODE = 3,
  WEAPINVENTORY_EXCLUSIVE = 4,
  WEAPINVENTORY_SCAVENGER = 5,
  WEAPINVENTORY_MAX
};

enum weapFireType_t : int
{
  WEAPON_FIRETYPE_FULLAUTO = 0x0,
  WEAPON_FIRETYPE_SINGLESHOT = 0x1,
  WEAPON_FIRETYPE_BURSTFIRE2 = 0x2,
  WEAPON_FIRETYPE_BURSTFIRE3 = 0x3,
  WEAPON_FIRETYPE_BURSTFIRE4 = 0x4,
  WEAPON_FIRETYPE_DOUBLE_BARREL = 0x5,
  WEAPON_FIRETYPE_MAX
};

enum activeReticleType_t : int
{
  VEH_ACTIVE_RETICLE_NONE = 0,
  VEH_ACTIVE_RETICLE_PIP_ON_A_STICK = 1,
  VEH_ACTIVE_RETICLE_BOUNCING_DIAMOND = 2,
  VEH_ACTIVE_RETICLE_MAX
};

enum weaponIconRatioType_t : int
{
  WEAPON_ICON_RATIO_1TO1 = 0,
  WEAPON_ICON_RATIO_2TO1 = 1,
  WEAPON_ICON_RATIO_4TO1 = 2,
  WEAPON_ICON_RATIO_MAX
};

enum WeapStickinessType
{
  WEAP_STICK_DONT = 0,
  WEAP_STICK_ALL,
  WEAP_STICK_ALL_ORIENT,
  WEAP_STICK_GROUND,
  WEAP_STICK_GROUND_YAW,
  WEAP_STICK_KNIFE,
  WEAP_STICK_MAX
};

struct AdsOverlayStruct
{
  Material *adsOverlayShader;
  Material *adsOverlayShaderLowRes;
  Material *adsOverlayShaderEMP;
  Material *adsOverlayShaderEMPLowRes;
  int adsOverlayReticle;
  float adsOverlayWidth;
  float adsOverlayHeight;
  float adsOverlayWidthSplitscreen;
  float adsOverlayHeightSplitscreeen;
};

struct WeaponDef
{
  char * szInternalName;
  XModel * *gunXModel;           //Count = 0x40
  XModel * handModel;
       XModel * unknownModel1;
       XModel * unknownModel2;
       Material * unknownMaterial1;
       Material * unknownMaterial2;
   Material ** camoMaterials;	//Count = 0x3F
   XAnim ** animR;					//Count = 0x7C
   XAnim ** animL;					//Count = 0x7C
   char * szModeName;
       ScriptString (*unkScriptStrings1[0x18]);
       ScriptString (*unkScriptStrings2[0x18]);
       ScriptString (*unkScriptStrings3[0x18]);
       ScriptString (*unkScriptStrings4[0x18]);
       ScriptString (*unkScriptStrings5[0x18]);
       FxEffectDef ** unkFxArray;				//Count = 0x10
       ScriptString (*unkScriptStrings6[0x10]);
  playerAnimType_t playerAnimType;
  weapType_t weapType;
  weapClass_t weaponClass;
  PenetrateType penetrateType;
  weapInventoryType_t inventoryType;
  weapFireType_t fireType;
       char unknown1[0x10];
  FxEffectDef * viewFlashEffect;
  FxEffectDef * worldFlashEffect;
  FxEffectDef * viewADSFlashEffect;
  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 fireSoundPlayerAkimbo;
  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 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 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 scanSound;
       snd_alias_list_name unknownSound1;
  snd_alias_list_name * parallelBounceSound;
  snd_alias_list_name * perpendicularBounceSound;
  FxEffectDef * viewShellEjectEffect;
  FxEffectDef * worldShellEjectEffect;
  FxEffectDef * viewLastShotEjectEffect;
  FxEffectDef * worldLastShotEjectEffect;
  FxEffectDef * unknownFx1;
  Material * reticleCenter;
  Material * reticleSide;
  int iReticleCenterSize;
  int iReticleSideSize;
  int iReticleMinOfs;
  activeReticleType_t activeReticleType;
  float vStandMove[3];
  float vStandRot[3];
  float vStrafeMove[3];
  float vStrafeRot[3];
  float vDuckedOfs[3];
  float vDuckedMove[3];
  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;          //Count = 0x40
  XModel * worldClipModel;
  XModel * rocketModel;
  XModel * knifeModel;
  XModel * worldKnifeModel;
  Material * hudIcon;
  weaponIconRatioType_t hudIconRatio;
  Material * pickupIcon;
  weaponIconRatioType_t pickupIconRatio;
  Material * ammoCounterIcon;
  weaponIconRatioType_t ammoCounterIconRatio;
       int ammoCounterClip;   //Missing enum
  int iStartAmmo;
  const char *szAmmoName;
  int iAmmoIndex;
  const char *szClipName;
  int iClipIndex;
  int iMaxAmmo;
  int shotCount;
  const char *szSharedAmmoCapName;
  int iSharedAmmoCap;
  int damage;
  int playerDamage;
  int iMeleeDamage;
  int iDamageType;
  int iFireDelay;
  int iMeleeDelay;
  int meleeChargeDelay;
  int iDetonateDelay;
  int iRechamberTime;
  int iRechamberOneHanded;
  int iRechamberBoltTime;
  int iHoldFireTime;
  int iDetonateTime;
       int unknown2;
  int iMeleeTime;
  int meleeChargeTime;
  int iReloadTime;
  int reloadShowRocketTime;
  int iReloadEmptyTime;
  int iReloadAddTime;
       int unknown3;
  int iReloadStartTime;
  int iReloadStartAddTime;
  int iReloadEndTime;
  int iDropTime;
  int iRaiseTime;
  int iAltDropTime;
  int quickDropTime;
  int quickRaiseTime;
  int iFirstRaiseTime;
  int iEmptyRaiseTime;
  int iEmptyDropTime;
  int sprintInTime;
  int sprintLoopTime;
  int sprintOutTime;
  int stunnedTimeBegin;
  int stunnedTimeLoop;
  int stunnedTimeEnd;
       char unknown4[0x114];
  float autoAimRange;
  float aimAssistRange;
  float aimAssistRangeAds;
  float aimPadding;
  float enemyCrosshairRange;
  float moveSpeedScale;
  float adsMoveSpeedScale;
  float sprintDurationScale;
  float adsZoomInFrac;
  float adsZoomOutFrac;
  AdsOverlayStruct overlayInfo;
       int unknown6;
  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;
  float fAdsIdleAmount;
  float fHipIdleAmount;
  float adsIdleSpeed;
  float hipIdleSpeed;
  float fIdleCrouchFactor;
  float fIdleProneFactor;
  float fGunMaxPitch;
  float fGunMaxYaw;
       char unknown7[0xC];
  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;
  float adsViewErrorMin;
  float adsViewErrorMax;
       int unknown8;
  PhysCollisionMap * collisions;
       char unknown9[0x28];
  int iDropAmmoMin;
  int ammoDropClipPercentMin;
  int ammoDropClipPercentMax;
  int iExplosionRadius;
  int iExplosionRadiusMin;
  int iExplosionInnerDamage;
  int iExplosionOuterDamage;
  float damageConeAngle;
  float bulletExplDmgMult;
  float bulletExplRadiusMult;
  int iProjectileSpeed;
  int iProjectileSpeedUp;
  int iProjectileSpeedForward;
  int iProjectileActivateDist;
  float projLifetime;
  float timeToAccelerate;
  float projectileCurvature;
       char * unknownString1;
       XModel * projectileModel;
       int projExplosiveType;   //Missing enum
  FxEffectDef * projExplosionEffect;
  FxEffectDef * projDudEffect;
  snd_alias_list_name projExplosionSound;
  snd_alias_list_name projDudSound;
  WeapStickinessType stickiness;
  float lowAmmoWarningThreshold;
  float ricochetChance;
       char unknown10[0xC];
  float (*parallelBounce[31]);
  float (*perpendicularBounce[31]);
  FxEffectDef * projTrailEffect;
  FxEffectDef * projBeaconEffect;
  float vProjectileColor[3];
       int guidedMissileType;   //Missing enum
  float maxSteeringAccel;
  float projIgnitionDelay;
  FxEffectDef * projIgnitionEffect;
       char unknown11[0x38];
  float fAdsGunKickSpeedDecay;
  float fAdsGunKickStaticDecay;
  float fAdsViewKickPitchMin;
  float fAdsViewKickPitchMax;
  float fAdsViewKickYawMin;
  float fAdsViewKickYawMax;
       char unknown12[0xC];
  float fAdsSpread;
  int hipGunKickReducedKickBullets;
  float hipGunKickReducedKickPercent;
  float fHipGunKickPitchMin;
  float fHipGunKickPitchMax;
  float fHipGunKickYawMin;
  float fHipGunKickYawMax;
       int unknown13;
  float fHipGunKickAccel;
  float fHipGunKickSpeedMax;
  float fHipGunKickSpeedDecay;
  float fHipGunKickStaticDecay;
  float fHipViewKickPitchMin;
  float fHipViewKickPitchMax;
  float fHipViewKickYawMin;
  float fHipViewKickYawMax;
       char unknown14[0xC];
  float fightDist;
  float maxDist;
  const char *accuracyGraphName[2];
  vec2_t * accuracyGraphKnots;
  vec2_t * originalAccuracyGraphKnots;
  short accuracyGraphKnotCount;
  short originalAccuracyGraphKnotCount;
  int iPositionReloadTransTime;
  float leftArc;
  float rightArc;
  float topArc;
  float bottomArc;
  float accuracy;
  float aiSpread;
  float playerSpread;
  float minVertTurnSpeed;
  float minHorTurnSpeed;
  float maxVertTurnSpeed;
  float maxHorTurnSpeed;
  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;
  float scanSpeed;
  float scanAccel;
  int scanPauseTime;
  const char *szScript;
  float fOOPosAnimLength[2];
  int minDamage;
  int minPlayerDamage;
  float maxDamageRange;
  float minDamageRange;
  float destabilizationRateTime;
  float destabilizationCurvatureMax;
  int destabilizeDistance;
  float (*locationDamageMultipliers[22]);
  const char *fireRumble;
  const char *meleeImpactRumble;
  [[:Tracer Asset|Tracer]] * tracer;
       char unknown15[0x2C];
  FxEffectDef *turretOverheatEffect;
  const char *turretBarrelSpinRumble;
  int turretBarrelSpinUpTime;
  int turretBarrelSpinDownTime;
  int turretBarrelSpinSpeed;
  snd_alias_list_name turretBarrelSpinMaxSnd;
  snd_alias_list_name turretBarrelSpinUpSnds[4];
  snd_alias_list_name turretBarrelSpinDownSnds[4];
  snd_alias_list_name missileConeSoundAlias;
  snd_alias_list_name missileConeSoundAliasAtBase;
       char unknown16[0x34];
  ScriptString unknownScriptString;
       char unknown17[0x5E];
  ScriptString stowTag;
  XModel * unknownModel3;
};

struct unkWeaponVariantDefStruct1
{
  int unknown;
  XAnim* unknownAnims[2];
  char unkData[0xC];
};

struct unkWeaponVariantDefStruct2
{
  int unknown1;
  snd_alias_list_name unknownSounds[2];
  int unknown2;
};

struct unkWeaponVariantDefStruct3
{
  int unknown1;
  FxEffectDef* unknownFXs[2];
  int unknown2;
};

struct unkWeaponVariantDefStruct4
{
   int unknown;
   ScriptString (*unknownArrays[0x18])[2];
};

struct WeaponVariantDef
{
  char * name;
  WeaponDef * info;
  const char * displayName;
  ScriptString (*hideTags[0x20]);
  AttachmentDef ** sights;				//Count = 6
  AttachmentDef ** underBarrel;				//Count = 3
  AttachmentDef ** barrelsAndMods;				//Count = 8
  XAnim ** szXAnims;							//Count = 0x7C
       int unkCount1;
       unkWeaponVariantDefStruct1 * unkData1;		//Count = unkCount1
       int unkCount2;
       unkWeaponVariantDefStruct2 * unkData2;		//Count = unkCount2
       int unkCount3;
       unkWeaponVariantDefStruct3 * unkData3;		//Count = unkCount3
       int unkCount4;
       char * unkData4;					//Size = unkCount4 << 4
       int unkCount5;
       unkWeaponVariantDefStruct4 * unkData5;		//Count = unkCount5
  float adsZoomFov;
  int adsTransInTime;
  int adsTransOutTime;
  int clipSize;
       int unknown1;
  int fireTime;
       int unknown2;
       int unknown3;
  float penetrateMultiplier;
  float adsViewKickCenterSpeed;
  float hipViewKickCenterSpeed;
  char *szAltWeaponName;
  int altWeaponFireTime;
  int altWeaponIndex;
  int altRaiseTime;
  Material * killIcon;
  Material * dpadIcon;
       char unknown4[0x10];
  int dropAmmoMax;
  float adsDofStart;
  float adsDofEnd;
  short accuracyGraphKnotCount;
  short originalAccuracyGraphKnotCount;
  vec2_t *accuracyGraphKnots;
  vec2_t *originalAccuracyGraphKnots;
       int unknown5;
       char * unknownString;
};

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".