AttachmentUnique Asset

From COD Engine Research
Jump to: navigation, search

The attachment unique asset was added on Black Ops 2 alongside Treyarch's regular attachment asset. This is the the only Call of Duty it has appeared in so far.

enum eAttachment
{
  ATTACHMENT_NONE = 0x0,
  ATTACHMENT_ACOG = 0x1,
  ATTACHMENT_DUALCLIP = 0x2,
  ATTACHMENT_DUALOPTIC = 0x3,
  ATTACHMENT_DW = 0x4,
  ATTACHMENT_EXTBARREL = 0x5,
  ATTACHMENT_EXTCLIP = 0x6,
  ATTACHMENT_EXTRAMAGS = 0x7,
  ATTACHMENT_FASTADS = 0x8,
  ATTACHMENT_FASTRELOAD = 0x9,
  ATTACHMENT_FMJ = 0xA,
  ATTACHMENT_GL = 0xB,
  ATTACHMENT_GRIP = 0xC,
  ATTACHMENT_HOLO = 0xD,
  ATTACHMENT_IR = 0xE,
  ATTACHMENT_IRONSIGHTS = 0xF,
  ATTACHMENT_LONGBREATH = 0x10,
  ATTACHMENT_MK = 0x11,
  ATTACHMENT_MMS = 0x12,
  ATTACHMENT_RANGEFINDER = 0x13,
  ATTACHMENT_REFLEX = 0x14,
  ATTACHMENT_RF = 0x15,
  ATTACHMENT_SELECTFIRE = 0x16,
  ATTACHMENT_SILENCER = 0x17,
  ATTACHMENT_STACKFIRE = 0x18,
  ATTACHMENT_STALKER = 0x19,
  ATTACHMENT_STEADYAIM = 0x1A,
  ATTACHMENT_SWAYREDUC = 0x1B,
  ATTACHMENT_TACKNIFE = 0x1C,
  ATTACHMENT_VZOOM = 0x1D,
  ATTACHMENT_TYPE_COUNT = 0x1E,
  ATTACHMENT_INVALID = 0x1E,
};
 
enum weapOverlayReticle_t
{
  WEAPOVERLAYRETICLE_NONE = 0x0,
  WEAPOVERLAYRETICLE_CROSSHAIR = 0x1,
  WEAPOVERLAYRETICLE_MAX
};
 
struct WeaponAttachmentUnique
{
  const char *szInternalName;
  eAttachment attachmentType;
  int siblingLink;
  int childLink;
  int combinedAttachmentTypeMask;
  const char *szAltWeaponName;
  unsigned int altWeaponIndex;
  const char *szDualWieldWeaponName;
  unsigned int dualWieldWeaponIndex;
  ScriptString *hideTags;
  XModel * viewModel;
  XModel * viewModelAdditional;
  XModel * viewModelADS;
  XModel * worldModel;
  XModel * worldModelAdditional;
  char * viewModelTag;
  char * worldModelTag;
  vec3_t viewModelOffsets;
  vec3_t worldModelOffsets;
  vec3_t viewModelRotations;
  vec3_t worldModelRotations;
  vec3_t viewModelAddOffsets;
  vec3_t worldModelAddOffsets;
  vec3_t viewModelAddRotations;
  vec3_t worldModelAddRotations;
  WeaponCamo *weaponCamo;
  bool disableBaseWeaponAttachment;
  bool disableBaseWeaponClip;
  bool overrideBaseWeaponAttachmentOffsets;
  vec3_t viewModelOffsetBaseAttachment;
  vec3_t worldModelOffsetBaseAttachment;
  Material *overlayMaterial;
  Material *overlayMaterialLowRes;
  weapOverlayReticle_t overlayReticle;
  int iFirstRaiseTime;
  int iAltRaiseTime;
  int iAltDropTime;
  int iReloadAmmoAdd;
  int iReloadStartAdd;
  bool bSegmentedReload;
  const char **szXAnims;        //Count = 0x58
  int animationOverrides[3];
  float (* locationDamageMultipliers)[21];  //21
  int soundOverrides;
  const char *fireSound;
  const char *fireSoundPlayer;
  const char *fireLoopSound;
  const char *fireLoopSoundPlayer;
  const char *fireLoopEndSound;
  const char *fireLoopEndSoundPlayer;
  const char *fireStartSound;
  const char *fireStopSound;
  const char *fireStartSoundPlayer;
  const char *fireStopSoundPlayer;
  const char *fireLastSound;
  const char *fireLastSoundPlayer;
  const char *fireKillcamSound;
  const char *fireKillcamSoundPlayer;
  int effectOverrides;
  FxEffectDef * viewFlashEffect;
  FxEffectDef * worldFlashEffect;
  TracerDef *tracerType;
  TracerDef *enemyTracerType;
  float adsDofStart;
  float adsDofEnd;
  int iAmmoIndex;
  int iClipIndex;
  bool bOverrideLeftHandIK;
  bool bOverrideLeftHandProneIK;
  vec3_t ikLeftHandOffset;
  vec3_t ikLeftHandRotation;
  vec3_t ikLeftHandProneOffset;
  vec3_t ikLeftHandProneRotation;
  float customFloat[3];
  int customBool[3];
};

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_unq/" that contain the setting names and new values separated by backslashes. The first entry identifies the file and for attachments, "ATTACHMENTFILE" is used.