Attachment Asset (Ghosts): Difference between revisions
No edit summary |
No edit summary |
||
| Line 368: | Line 368: | ||
FxEffectDef *projExplosionEffect; | FxEffectDef *projExplosionEffect; | ||
bool projExplosionEffectForceNormalUp; | bool projExplosionEffectForceNormalUp; | ||
snd_alias_list_name projExplosionSound; | |||
FxEffectDef *projDudEffect; | FxEffectDef *projDudEffect; | ||
snd_alias_list_name projDudSound; | |||
bool projImpactExplode; | bool projImpactExplode; | ||
float destabilizationRateTime; | float destabilizationRateTime; | ||
| Line 378: | Line 378: | ||
int projIgnitionDelay; | int projIgnitionDelay; | ||
FxEffectDef *projIgnitionEffect; | FxEffectDef *projIgnitionEffect; | ||
snd_alias_list_name projIgnitionSound; | |||
}; | }; | ||
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.