Attachment Asset (Ghosts): Difference between revisions

From COD Engine Research
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
The attachment asset was added on Modern Warfare 3 and has been on every Call of Duty since (Black Ops 2 and Ghosts). This asset saves alot of space as previously a different weapon asset was required for each combination of attachments on each weapon.
The attachment asset was added on Modern Warfare 3 and has been on every Call of Duty since (Black Ops 2 and Ghosts). This asset saves alot of space as previously a different weapon asset was required for each combination of attachments on each weapon.
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
struct unknownAttachmentStruct1
enum AttachmentType
{
{
   char unknown1[0x10];
   ATTACHMENT_SCOPE = 0x0,
   Tracer * tracer;
   ATTACHMENT_UNDERBARREL = 0x1,
   int unknown2;
   ATTACHMENT_OTHER = 0x2,
  ATTACHMENT_COUNT = 0x3
};
};


struct unknownAttachmentStruct2
enum weapType_t
{
{
   int unknown1[2];
   WEAPTYPE_NONE = 0x0,
   Material * unknownMaterials[2];
   WEAPTYPE_BULLET = 0x1,
   char unknown2[0x10];
   WEAPTYPE_GRENADE = 0x2,
  WEAPTYPE_PROJECTILE = 0x3,
  WEAPTYPE_RIOTSHIELD = 0x4,
  WEAPTYPE_NUM = 0x5
};
};


struct unknownAttachmentStruct3
enum weapClass_t
{
{
   AdsOverlayStruct unknownStruct;
   WEAPCLASS_RIFLE = 0x0,
   int unknown;
   WEAPCLASS_SNIPER = 0x1,
  WEAPCLASS_MG = 0x2,
  WEAPCLASS_SMG = 0x3,
  WEAPCLASS_SPREAD = 0x4,
  WEAPCLASS_PISTOL = 0x5,
  WEAPCLASS_GRENADE = 0x6,
  WEAPCLASS_ROCKETLAUNCHER = 0x7,
  WEAPCLASS_TURRET = 0x8,
  WEAPCLASS_THROWINGKNIFE = 0x9,
  WEAPCLASS_NON_PLAYER = 0xA,
  WEAPCLASS_ITEM = 0xB,
  WEAPCLASS_NUM = 0xC
};
};


struct unknownAttachmentStruct4
enum PenetrateType
{
{
   Material * unknownMaterials[2];
   PENETRATE_TYPE_NONE = 0x0,
   char unknown[0xC];
   PENETRATE_TYPE_SMALL = 0x1,
  PENETRATE_TYPE_MEDIUM = 0x2,
  PENETRATE_TYPE_LARGE = 0x3,
  PENETRATE_TYPE_COUNT = 0x4
};
};


struct unknownAttachmentStruct5
enum ImpactType
{
{
   char * unknownStrings[2];
   IMPACT_TYPE_NONE = 0x0,
  IMPACT_TYPE_BULLET_SMALL = 0x1,
  IMPACT_TYPE_BULLET_LARGE = 0x2,
  IMPACT_TYPE_BULLET_AP = 0x3,
  IMPACT_TYPE_BULLET_EXPLODE = 0x4,
  IMPACT_TYPE_SHOTGUN = 0x5,
  IMPACT_TYPE_SHOTGUN_EXPLODE = 0x6,
  IMPACT_TYPE_GRENADE_BOUNCE = 0x7,
  IMPACT_TYPE_GRENADE_EXPLODE = 0x8,
  IMPACT_TYPE_ROCKET_EXPLODE = 0x9,
  IMPACT_TYPE_PROJECTILE_DUD = 0xA,
  IMPACT_TYPE_COUNT = 0xB
};
};


struct unknownAttachmentStruct6
enum weapFireType_t
{
{
   char unknown1[0x20];
   WEAPON_FIRETYPE_FULLAUTO = 0x0,
   char * unknownString;
   WEAPON_FIRETYPE_SINGLESHOT = 0x1,
   XModel * unknownModel;
   WEAPON_FIRETYPE_BURSTFIRE2 = 0x2,
   int unknown2;
   WEAPON_FIRETYPE_BURSTFIRE3 = 0x3,
   FxEffectDef * unknownFx1;
   WEAPON_FIRETYPE_BURSTFIRE4 = 0x4,
   int unknown3;
   WEAPON_FIRETYPE_DOUBLEBARREL = 0x5,
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] unknownSound1;
   WEAPON_FIRETYPECOUNT = 0x6,
   FxEffectDef * unknownFx2;
   WEAPON_FIRETYPE_BURSTFIRE_FIRST = 0x2,
   [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] unknownSound2;
   WEAPON_FIRETYPE_BURSTFIRE_LAST = 0x4
  char unknown4[0x10];
  FxEffectDef * unknownFx3;
  char unknown5[4];
  FxEffectDef * unknownFx4;
  [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] unknownSound3;
};
};


struct AttachmentDef
enum weapOverlayReticle_t
{
{
   const char * name;
  WEAPOVERLAYRETICLE_NONE = 0x0,
   const char * displayName;
  WEAPOVERLAYRETICLE_CROSSHAIR = 0x1,
      char unknown1[0xC];
  WEAPOVERLAYRETICLE_NUM = 0x2
   XModel * * worldModel;
};
   XModel * *gunXModel;
 
   XModel * *reticleXModel;
enum weaponIconRatioType_t
      unknownAttachmentStruct1 * unknownStruct1;
{
      char (*unknown2)[9];
  WEAPON_ICON_RATIO_1TO1 = 0x0,
      char (*unknown3)[2];
  WEAPON_ICON_RATIO_2TO1 = 0x1,
      char (*unknown4)[3];
  WEAPON_ICON_RATIO_4TO1 = 0x2,
      unknownAttachmentStruct2 * unknownStruct2;
  WEAPON_ICON_RATIO_COUNT = 0x3
      char (*unknown5)[0xC];
};
      char (*unknown6)[0x18];
 
      char (*unknown7)[0x1C];
enum ammoCounterClipType_t
      char (*unknown8)[0x4C];
{
      char (*unknown9)[0x18];
  AMMO_COUNTER_CLIP_NONE = 0x0,
      char (*unknownA)[0x40];
  AMMO_COUNTER_CLIP_MAGAZINE = 0x1,
      char (*unknownB)[0x40];
  AMMO_COUNTER_CLIP_SHORTMAGAZINE = 0x2,
      char (*unknownC)[0x18];
  AMMO_COUNTER_CLIP_SHOTGUN = 0x3,
      char (*unknownD)[0x18];
  AMMO_COUNTER_CLIP_ROCKET = 0x4,
      char (*unknownE)[0x30];
  AMMO_COUNTER_CLIP_BELTFED = 0x5,
      char (*unknownF)[0x58];
  AMMO_COUNTER_CLIP_ALTWEAPON = 0x6,
      char (*unknown10)[0x30];
  AMMO_COUNTER_CLIP_COUNT = 0x7
      unknownAttachmentStruct3 * unknownStruct3;
};
      unknownAttachmentStruct4 * unknownStruct4;
 
      unknownAttachmentStruct5 * unknownStruct5;
enum weapProjExposion_t
      unknownAttachmentStruct6 * unknownStruct6;
{
      char unknown11[0x38];
  WEAPPROJEXP_GRENADE = 0x0,
  WEAPPROJEXP_ROCKET = 0x1,
  WEAPPROJEXP_FLASHBANG = 0x2,
  WEAPPROJEXP_NONE = 0x3,
  WEAPPROJEXP_DUD = 0x4,
  WEAPPROJEXP_SMOKE = 0x5,
  WEAPPROJEXP_HEAVY = 0x6,
  WEAPPROJEXP_NUM = 0x7
};
 
struct __declspec(align(8)) AttAmmoGeneral
{
  PenetrateType penetrateType;
  float penetrateMultiplier;
  ImpactType impactType;
  weapFireType_t fireType;
  TracerDef *tracerType;
  bool rifleBullet;
  bool armorPiercing;
};
 
struct AttSight
{
  bool aimDownSight;
  bool adsFire;
  bool rechamberWhileAds;
  bool noAdsWhenMagEmpty;
  bool canHoldBreath;
  bool canVariableZoom;
  bool hideRailWithThisScope;
  bool useScopeDrift;
  bool useDualFOV;
};
 
struct AttReload
{
  bool noPartialReload;
  bool segmentedReload;
};
 
struct AttAddOns
{
  bool motionTracker;
  bool silenced;
  bool riotShield;
};
 
struct AttGeneral
{
  bool boltAction;
  bool inheritsPerks;
  bool reticleSpin45;
  float enemyCrosshairRange;
  Material *reticleCenter;
  Material *reticleSide;
  int reticleCenterSize;
  int reticleSideSize;
  float moveSpeedScale;
  float adsMoveSpeedScale;
};
 
struct AttAimAssist
{
  float autoAimRange;
  float aimAssistRange;
  float aimAssistRangeAds;
};
 
struct AttAmmunition
{
  int maxAmmo;
  int startAmmo;
  int clipSize;
  int shotCount;
  int reloadAmmoAdd;
  int reloadStartAdd;
};
 
struct AttDamage
{
  int damage;
  int minDamage;
  int meleeDamage;
  float maxDamageRange;
  float minDamageRange;
  int playerDamage;
  int minPlayerDamage;
};
 
struct AttLocationDamage
{
  float locNone;
  float locHelmet;
  float locHead;
  float locNeck;
  float locTorsoUpper;
  float locTorsoLower;
  float locRightArmUpper;
  float locRightArmLower;
  float locRightHand;
  float locLeftArmUpper;
  float locLeftArmLower;
  float locLeftHand;
  float locRightLegUpper;
  float locRightLegLower;
  float locRightFoot;
  float locLeftLegUpper;
  float locLeftLegLower;
  float locLeftFoot;
  float locGun;
};
 
struct AttIdleSettings
{
  float hipIdleAmount;
  float hipIdleSpeed;
  float idleCrouchFactor;
  float idleProneFactor;
  float adsIdleLerpStartTime;
  float adsIdleLerpTime;
};
 
struct AttADSSettings
{
  float adsSpread;
  float adsAimPitch;
  float adsTransInTime;
  float adsTransOutTime;
  int adsReloadTransTime;
  float adsCrosshairInFrac;
  float adsCrosshairOutFrac;
  float adsZoomFov;
  float adsZoomInFrac;
  float adsZoomOutFrac;
  float adsFovLerpTime;
  float adsBobFactor;
  float adsViewBobMult;
  float adsFireRateScale;
  float adsDamageRangeScale;
  float adsFireAnimFrac;
};
 
struct AttScopeDriftSettings
{
  float fScopeDriftDelay;
  float fScopeDriftLerpInTime;
  float fScopeDriftSteadyTime;
  float fScopeDriftLerpOutTime;
  float fScopeDriftSteadyFactor;
  float fScopeDriftUnsteadyFactor;
};
 
struct AttHipSpread
{
  float hipSpreadStandMin;
  float hipSpreadDuckedMin;
  float hipSpreadProneMin;
  float hipSpreadMax;
  float hipSpreadDuckedMax;
  float hipSpreadProneMax;
  float hipSpreadFireAdd;
  float hipSpreadTurnAdd;
  float hipSpreadMoveAdd;
  float hipSpreadDecayRate;
  float hipSpreadDuckedDecay;
  float hipSpreadProneDecay;
};
 
struct AttGunKick
{
  int hipGunKickReducedKickBullets;
  float hipGunKickReducedKickPercent;
  float hipGunKickPitchMin;
  float hipGunKickPitchMax;
  float hipGunKickYawMin;
  float hipGunKickYawMax;
  float hipGunKickMagMin;
  float hipGunKickAccel;
  float hipGunKickSpeedMax;
  float hipGunKickSpeedDecay;
  float hipGunKickStaticDecay;
  int adsGunKickReducedKickBullets;
  float adsGunKickReducedKickPercent;
  float adsGunKickPitchMin;
  float adsGunKickPitchMax;
  float adsGunKickYawMin;
  float adsGunKickYawMax;
  float adsGunKickMagMin;
  float adsGunKickAccel;
  float adsGunKickSpeedMax;
  float adsGunKickSpeedDecay;
  float adsGunKickStaticDecay;
};
 
struct AttViewKick
{
  float hipViewKickPitchMin;
  float hipViewKickPitchMax;
  float hipViewKickYawMin;
  float hipViewKickYawMax;
  float hipViewKickMagMin;
  float hipViewKickCenterSpeed;
  float adsViewKickPitchMin;
  float adsViewKickPitchMax;
  float adsViewKickYawMin;
  float adsViewKickYawMax;
  float adsViewKickMagMin;
  float adsViewKickCenterSpeed;
};
 
struct __declspec(align(8)) ADSOverlay
{
  Material *shader;
  Material *shaderLowRes;
  Material *shaderEMP;
  Material *shaderEMPLowRes;
  weapOverlayReticle_t reticle;
  float width;
  float height;
  float widthSplitscreen;
  float heightSplitscreen;
};
 
struct __declspec(align(8)) AttADSOverlay
{
  ADSOverlay overlay;
  bool hybridToggle;
  bool thermalScope;
  bool thermalToggle;
  bool outlineEnemies;
};
 
struct __declspec(align(8)) AttUI
{
  Material *dpadIcon;
  Material *ammoCounterIcon;
  weaponIconRatioType_t dpadIconRatio;
  weaponIconRatioType_t ammoCounterIconRatio;
  ammoCounterClipType_t ammoCounterClip;
};
 
struct AttRumbles
{
  const char *fireRumble;
   const char *meleeImpactRumble;
};
 
struct AttProjectile
{
  int explosionRadius;
  int explosionInnerDamage;
  int explosionOuterDamage;
  float damageConeAngle;
  int projectileSpeed;
  int projectileSpeedUp;
  int projectileActivateDist;
  float projectileLifetime;
  const char *projectileName;
  XModel *projectileModel;
  weapProjExposion_t projExplosionType;
  FxEffectDef *projExplosionEffect;
  bool projExplosionEffectForceNormalUp;
  snd_alias_list_name projExplosionSound;
  FxEffectDef *projDudEffect;
  snd_alias_list_name projDudSound;
  bool projImpactExplode;
  float destabilizationRateTime;
  float destabilizationCurvatureMax;
  int destabilizeDistance;
  FxEffectDef *projTrailEffect;
  int projIgnitionDelay;
  FxEffectDef *projIgnitionEffect;
  snd_alias_list_name projIgnitionSound;
};
 
struct __declspec(align(4)) WeaponAttachment
{
   const char *szInternalName;
  const char *szDisplayName;
  AttachmentType type;
  weapType_t weaponType;
  weapClass_t weapClass;
   XModel **worldModels;
   XModel **viewModels;
   XModel **reticleViewModels;
  AttAmmoGeneral *ammogeneral;
  AttSight *sight;
  AttReload *reload;
  AttAddOns *addOns;
  AttGeneral *general;
  AttAimAssist *aimAssist;
  AttAmmunition *ammunition;
  AttDamage *damage;
  AttLocationDamage *locationDamage;
  AttIdleSettings *idleSettings;
  AttADSSettings *adsSettings;
  AttADSSettings *adsSettingsMain;
  AttScopeDriftSettings *scopeDriftSettings;
  AttScopeDriftSettings *scopeDriftSettingsMain;
  AttHipSpread *hipSpread;
  AttGunKick *gunKick;
  AttViewKick *viewKick;
  AttADSOverlay *adsOverlay;
  AttUI *ui;
  AttRumbles *rumbles;
  AttProjectile *projectile;
  float ammunitionScale;
  float damageScale;
  float damageScaleMin;
  float stateTimersScale;
  float fireTimersScale;
  float idleSettingsScale;
  float adsSettingsScale;
  float adsSettingsScaleMain;
  float hipSpreadScale;
  float gunKickScale;
  float viewKickScale;
  float viewCenterScale;
  int loadIndex;
  bool hideIronSightsWithThisAttachment;
  bool shareAmmoWithAlt;
};
};
</syntaxhighlight>
</syntaxhighlight>
== Source Format ==
== Source Format ==
There is currently no known source format for the attachment asset. The currently accepted one is extensionless raw text files located at "raw/attachment/" that contain the setting names and new values seperated by backslashes. The first entry identifies the file and for attachments, "ATTACHMENTFILE" is used.
There is currently no known source format for the attachment asset. The currently accepted one is extensionless raw text files located at "raw/attachment/" that contain the setting names and new values seperated by backslashes. The first entry identifies the file and for attachments, "ATTACHMENTFILE" is used.

Latest revision as of 01:24, 22 January 2015

The attachment asset was added on Modern Warfare 3 and has been on every Call of Duty since (Black Ops 2 and Ghosts). This asset saves alot of space as previously a different weapon asset was required for each combination of attachments on each weapon.

enum AttachmentType
{
  ATTACHMENT_SCOPE = 0x0,
  ATTACHMENT_UNDERBARREL = 0x1,
  ATTACHMENT_OTHER = 0x2,
  ATTACHMENT_COUNT = 0x3
};

enum weapType_t
{
  WEAPTYPE_NONE = 0x0,
  WEAPTYPE_BULLET = 0x1,
  WEAPTYPE_GRENADE = 0x2,
  WEAPTYPE_PROJECTILE = 0x3,
  WEAPTYPE_RIOTSHIELD = 0x4,
  WEAPTYPE_NUM = 0x5
};

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

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_BULLET_EXPLODE = 0x4,
  IMPACT_TYPE_SHOTGUN = 0x5,
  IMPACT_TYPE_SHOTGUN_EXPLODE = 0x6,
  IMPACT_TYPE_GRENADE_BOUNCE = 0x7,
  IMPACT_TYPE_GRENADE_EXPLODE = 0x8,
  IMPACT_TYPE_ROCKET_EXPLODE = 0x9,
  IMPACT_TYPE_PROJECTILE_DUD = 0xA,
  IMPACT_TYPE_COUNT = 0xB
};

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

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

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 weapProjExposion_t
{
  WEAPPROJEXP_GRENADE = 0x0,
  WEAPPROJEXP_ROCKET = 0x1,
  WEAPPROJEXP_FLASHBANG = 0x2,
  WEAPPROJEXP_NONE = 0x3,
  WEAPPROJEXP_DUD = 0x4,
  WEAPPROJEXP_SMOKE = 0x5,
  WEAPPROJEXP_HEAVY = 0x6,
  WEAPPROJEXP_NUM = 0x7
};

struct __declspec(align(8)) AttAmmoGeneral
{
  PenetrateType penetrateType;
  float penetrateMultiplier;
  ImpactType impactType;
  weapFireType_t fireType;
  TracerDef *tracerType;
  bool rifleBullet;
  bool armorPiercing;
};

struct AttSight
{
  bool aimDownSight;
  bool adsFire;
  bool rechamberWhileAds;
  bool noAdsWhenMagEmpty;
  bool canHoldBreath;
  bool canVariableZoom;
  bool hideRailWithThisScope;
  bool useScopeDrift;
  bool useDualFOV;
};

struct AttReload
{
  bool noPartialReload;
  bool segmentedReload;
};

struct AttAddOns
{
  bool motionTracker;
  bool silenced;
  bool riotShield;
};

struct AttGeneral
{
  bool boltAction;
  bool inheritsPerks;
  bool reticleSpin45;
  float enemyCrosshairRange;
  Material *reticleCenter;
  Material *reticleSide;
  int reticleCenterSize;
  int reticleSideSize;
  float moveSpeedScale;
  float adsMoveSpeedScale;
};

struct AttAimAssist
{
  float autoAimRange;
  float aimAssistRange;
  float aimAssistRangeAds;
};

struct AttAmmunition
{
  int maxAmmo;
  int startAmmo;
  int clipSize;
  int shotCount;
  int reloadAmmoAdd;
  int reloadStartAdd;
};

struct AttDamage
{
  int damage;
  int minDamage;
  int meleeDamage;
  float maxDamageRange;
  float minDamageRange;
  int playerDamage;
  int minPlayerDamage;
};

struct AttLocationDamage
{
  float locNone;
  float locHelmet;
  float locHead;
  float locNeck;
  float locTorsoUpper;
  float locTorsoLower;
  float locRightArmUpper;
  float locRightArmLower;
  float locRightHand;
  float locLeftArmUpper;
  float locLeftArmLower;
  float locLeftHand;
  float locRightLegUpper;
  float locRightLegLower;
  float locRightFoot;
  float locLeftLegUpper;
  float locLeftLegLower;
  float locLeftFoot;
  float locGun;
};

struct AttIdleSettings
{
  float hipIdleAmount;
  float hipIdleSpeed;
  float idleCrouchFactor;
  float idleProneFactor;
  float adsIdleLerpStartTime;
  float adsIdleLerpTime;
};

struct AttADSSettings
{
  float adsSpread;
  float adsAimPitch;
  float adsTransInTime;
  float adsTransOutTime;
  int adsReloadTransTime;
  float adsCrosshairInFrac;
  float adsCrosshairOutFrac;
  float adsZoomFov;
  float adsZoomInFrac;
  float adsZoomOutFrac;
  float adsFovLerpTime;
  float adsBobFactor;
  float adsViewBobMult;
  float adsFireRateScale;
  float adsDamageRangeScale;
  float adsFireAnimFrac;
};

struct AttScopeDriftSettings
{
  float fScopeDriftDelay;
  float fScopeDriftLerpInTime;
  float fScopeDriftSteadyTime;
  float fScopeDriftLerpOutTime;
  float fScopeDriftSteadyFactor;
  float fScopeDriftUnsteadyFactor;
};

struct AttHipSpread
{
  float hipSpreadStandMin;
  float hipSpreadDuckedMin;
  float hipSpreadProneMin;
  float hipSpreadMax;
  float hipSpreadDuckedMax;
  float hipSpreadProneMax;
  float hipSpreadFireAdd;
  float hipSpreadTurnAdd;
  float hipSpreadMoveAdd;
  float hipSpreadDecayRate;
  float hipSpreadDuckedDecay;
  float hipSpreadProneDecay;
};

struct AttGunKick
{
  int hipGunKickReducedKickBullets;
  float hipGunKickReducedKickPercent;
  float hipGunKickPitchMin;
  float hipGunKickPitchMax;
  float hipGunKickYawMin;
  float hipGunKickYawMax;
  float hipGunKickMagMin;
  float hipGunKickAccel;
  float hipGunKickSpeedMax;
  float hipGunKickSpeedDecay;
  float hipGunKickStaticDecay;
  int adsGunKickReducedKickBullets;
  float adsGunKickReducedKickPercent;
  float adsGunKickPitchMin;
  float adsGunKickPitchMax;
  float adsGunKickYawMin;
  float adsGunKickYawMax;
  float adsGunKickMagMin;
  float adsGunKickAccel;
  float adsGunKickSpeedMax;
  float adsGunKickSpeedDecay;
  float adsGunKickStaticDecay;
};

struct AttViewKick
{
  float hipViewKickPitchMin;
  float hipViewKickPitchMax;
  float hipViewKickYawMin;
  float hipViewKickYawMax;
  float hipViewKickMagMin;
  float hipViewKickCenterSpeed;
  float adsViewKickPitchMin;
  float adsViewKickPitchMax;
  float adsViewKickYawMin;
  float adsViewKickYawMax;
  float adsViewKickMagMin;
  float adsViewKickCenterSpeed;
};

struct __declspec(align(8)) ADSOverlay
{
  Material *shader;
  Material *shaderLowRes;
  Material *shaderEMP;
  Material *shaderEMPLowRes;
  weapOverlayReticle_t reticle;
  float width;
  float height;
  float widthSplitscreen;
  float heightSplitscreen;
};

struct __declspec(align(8)) AttADSOverlay
{
  ADSOverlay overlay;
  bool hybridToggle;
  bool thermalScope;
  bool thermalToggle;
  bool outlineEnemies;
};

struct __declspec(align(8)) AttUI
{
  Material *dpadIcon;
  Material *ammoCounterIcon;
  weaponIconRatioType_t dpadIconRatio;
  weaponIconRatioType_t ammoCounterIconRatio;
  ammoCounterClipType_t ammoCounterClip;
};

struct AttRumbles
{
  const char *fireRumble;
  const char *meleeImpactRumble;
};

struct AttProjectile
{
  int explosionRadius;
  int explosionInnerDamage;
  int explosionOuterDamage;
  float damageConeAngle;
  int projectileSpeed;
  int projectileSpeedUp;
  int projectileActivateDist;
  float projectileLifetime;
  const char *projectileName;
  XModel *projectileModel;
  weapProjExposion_t projExplosionType;
  FxEffectDef *projExplosionEffect;
  bool projExplosionEffectForceNormalUp;
  snd_alias_list_name projExplosionSound;
  FxEffectDef *projDudEffect;
  snd_alias_list_name projDudSound;
  bool projImpactExplode;
  float destabilizationRateTime;
  float destabilizationCurvatureMax;
  int destabilizeDistance;
  FxEffectDef *projTrailEffect;
  int projIgnitionDelay;
  FxEffectDef *projIgnitionEffect;
  snd_alias_list_name projIgnitionSound;
};

struct __declspec(align(4)) WeaponAttachment
{
  const char *szInternalName;
  const char *szDisplayName;
  AttachmentType type;
  weapType_t weaponType;
  weapClass_t weapClass;
  XModel **worldModels;
  XModel **viewModels;
  XModel **reticleViewModels;
  AttAmmoGeneral *ammogeneral;
  AttSight *sight;
  AttReload *reload;
  AttAddOns *addOns;
  AttGeneral *general;
  AttAimAssist *aimAssist;
  AttAmmunition *ammunition;
  AttDamage *damage;
  AttLocationDamage *locationDamage;
  AttIdleSettings *idleSettings;
  AttADSSettings *adsSettings;
  AttADSSettings *adsSettingsMain;
  AttScopeDriftSettings *scopeDriftSettings;
  AttScopeDriftSettings *scopeDriftSettingsMain;
  AttHipSpread *hipSpread;
  AttGunKick *gunKick;
  AttViewKick *viewKick;
  AttADSOverlay *adsOverlay;
  AttUI *ui;
  AttRumbles *rumbles;
  AttProjectile *projectile;
  float ammunitionScale;
  float damageScale;
  float damageScaleMin;
  float stateTimersScale;
  float fireTimersScale;
  float idleSettingsScale;
  float adsSettingsScale;
  float adsSettingsScaleMain;
  float hipSpreadScale;
  float gunKickScale;
  float viewKickScale;
  float viewCenterScale;
  int loadIndex;
  bool hideIronSightsWithThisAttachment;
  bool shareAmmoWithAlt;
};

Source Format

There is currently no known source format for the attachment asset. The currently accepted one is extensionless raw text files located at "raw/attachment/" that contain the setting names and new values seperated by backslashes. The first entry identifies the file and for attachments, "ATTACHMENTFILE" is used.