Attachment Asset (MW3)

From COD Engine Research
Jump to: navigation, search

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.

struct unknownAttachmentStruct1
{
  char unknown1[0x10];
  Tracer * tracer;
  int unknown2[2];
};
 
struct unknownAttachmentStruct2
{
  int unknown1[2];
  Material * unknownMaterials[2];
  char unknown2[0x10];
};
 
struct unknownAttachmentStruct3
{
  AdsOverlayStruct unknownStruct;
  int unknown;
};
 
struct unknownAttachmentStruct4
{
  Material * unknownMaterials[2];
  char unknown[0xC];
};
 
struct unknownAttachmentStruct5
{
  char * unknownStrings[2];
};
 
struct unknownAttachmentStruct6
{
  char unknown1[0x20];
  XModel * unknownModel;
  int unknown2;
  FxEffectDef * unknownFx1;
  int unknown3;
  [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] unknownSound1;
  FxEffectDef * unknownFx2;
  [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] unknownSound2;
  char unknown4[0x10];
  FxEffectDef * unknownFx3;
  char unknown5[4];
  FxEffectDef * unknownFx4;
  [[:Category:Utilities#snd_alias_list_name|snd_alias_list_name]] unknownSound3;
};
 
struct AttachmentDef
{
  const char * name;
  const char * displayName;
       char unknown1[0xC];
  XModel * * worldModel;  //Count = 0x10
  XModel * *gunXModel;  //Count = 0x10
  XModel * *reticleXModel;  //Count = 8
       unknownAttachmentStruct1 * unknownStruct1;
       char (*unknown2)[7];
       char (*unknown3)[2];
       char (*unknown4)[2];
       unknownAttachmentStruct2 * unknownStruct2;
       char (*unknown5)[0xC];
       char (*unknown6)[0x18];
       char (*unknown7)[0x1C];
       char (*unknown8)[0x4C];
       char (*unknown9)[0x18];
       char (*unknownA)[0x38];
       char (*unknownB)[0x38];
       char (*unknownC)[0x30];
       char (*unknownD)[0x50];
       char (*unknownE)[0x28];
       unknownAttachmentStruct3 * unknownStruct3;
       unknownAttachmentStruct4 * unknownStruct4;
       unknownAttachmentStruct5 * unknownStruct5;
       unknownAttachmentStruct6 * unknownStruct6;
       char unknown11[0x38];
};

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.