Vehicle Asset (Ghosts): Difference between revisions

From COD Engine Research
No edit summary
No edit summary
Line 155: Line 155:
       snd_alias_list_name unknownSound7;
       snd_alias_list_name unknownSound7;
       int unknown8;
       int unknown8;
       snd_alias_list_name unkSoundC;
       snd_alias_list_name unknownSound8;
       snd_alias_list_name unkSoundD;
       snd_alias_list_name unknownSound9;
       snd_alias_list_name unkSoundE;
       snd_alias_list_name unknownSoundA;
       snd_alias_list_name unkSoundF;
       snd_alias_list_name unknownSoundB;
   int engineRampUpLength;
   int engineRampUpLength;
   snd_alias_list_name engineRampDownSnd;
   snd_alias_list_name engineRampDownSnd;

Revision as of 00:18, 16 January 2014

The vehicle asset is a was added on Modern Warfare 2 and has been on every Call of Duty game since except for Black Ops 1. The purpose of this asset is to declare vehicles, mostly used for killstreaks.

struct VehiclePhysics 
{
  int physicsEnabled;
       const char *unknown1;
  PhysPreset *physicsPreset;
  const char *accelerationGraph;
  int steeringAxle;
  int powerAxle;
  int brakingAxle;
       float unknown2;
  float reverseSpeed;
  float maxVelocity;
  float maxPitch;
  float maxRoll;
  float maxYaw;
  float suspensionTravelRear;
  float suspensionStrengthFront;
  float suspensionDampingFront;
  float suspensionStrengthRear;
  float suspensionDampingRear;
  float frictionBraking;
  float frictionCoasting;
  float frictionTopSpeed;
  float frictionSide;
  float frictionSideRear;
  float velocityDependentSlip;
  float rollStability;
  float rollResistance;
  float pitchResistance;
  float yawResistance;
  float uprightStrengthPitch;
  float uprightStrengthRoll;
  float targetAirPitch;
  float airYawTorque;
  float airPitchTorque;
  float minimumMomentumForCollision;
  float collisionLaunchForceScale;
  float wreckedMassScale;
  float wreckedBodyFriction;
  float minimumJoltForNotify;
  float slipThreshholdFront;
  float slipThreshholdRear;
  float slipFricScaleFront;
  float slipFricScaleRear;
  float slipFricRateFront;
  float slipFricRateRear;
  float slipYawTorque;
};

enum VehicleTypes : int
{
  VEH_WHEELS_4 = 0x0,
  VEH_TANK = 0x1,
  VEH_PLANE = 0x2,
  VEH_BOAT = 0x3,
  VEH_ARTILLERY = 0x4,
  VEH_HELICOPTER = 0x5,
  VEH_SNOWMOBILE = 0x6,
  VEH_TYPE_MAX
};

struct Vehicle
{
  char * name;
  int type;
  const char *useHintString;
  int health;
       char unknown1[8];
  float texureScrollScale;
  float maxSpeed;
  float accel;
  float rotRate;
  float rotAccel;
  float maxBodyPitch;
  float maxBodyRoll;
  float fakeBodyAccelPitch;
  float fakeBodyAccelRoll;
  float fakeBodyVelPitch;
  float fakeBodyVelRoll;
  float fakeBodySideVelPitch;
  float fakeBodySidePitchStrength;
  float fakeBodyRollStrength;
  float fakeBodyPitchDampening;
  float fakeBodyRollDampening;
  float fakeBodyBoatRockingAmplitude;
  float fakeBodyBoatRockingPeriod;
  float fakeBodyBoatRockingRotationPeriod;
  float fakeBodyBoatRockingFadeoutSpeed;
  float boatBouncingMinForce;
  float boatBouncingMaxForce;
  float boatBouncingRate;
  float boatBouncingFadeinSpeed;
  float boatBouncingFadeoutSteeringAngle;
  float collisionDamage;
  float collisionSpeed;
  float killcamZDist;
  float killcamBackDist;
  float killcamUpDist;
  int playerProtected;
  int bulletDamage;
  int armorPiercingDamage;
  int grenadeDamage;
  int projectileDamage;
  int projectileSplashDamage;
  int heavyExplosiveDamage;
  VehiclePhysics vehiclePhysics;
       char unknown2[0x9C];
  FxEffectDef* treadFx;
  FxEffectDef* waterTreadFx;
       char unknown3[0x130];
  const char * turretWeaponName;
  WeaponVarientDef *turretWeapon;
  float turretHorizSpanLeft;
  float turretHorizSpanRight;
  float turretVertSpanUp;
  float turretVertSpanDown;
       char unknown4[0x10];
  float turretRotRate;
       int unknown5;
  snd_alias_list_name turretSpinSnd;
  snd_alias_list_name turretStopSnd;
  int trophyEnabled;
  float trophyRadius;
  float trophyInactiveRadius;
  int trophyAmmoCount;
  float trophyReloadTime;
  ScriptString trophyTags[4];
       FxEffectDef* unknownFx1;
       FxEffectDef* unknownFx2;
  Material *compassFriendlyIcon;
  Material *compassEnemyIcon;
  Material* compassFriendlyIconCB;
  Material* compassEnemyIconCB;
  int compassIconWidth;
  int compassIconHeight;
  snd_alias_list_name lowIdleSound;
  snd_alias_list_name highIdleSound;
  snd_alias_list_name lowEngineSound;
  snd_alias_list_name highEngineSound;
       int unknown6;
       ScriptString unknownScriptString1;
       snd_alias_list_name unknownSound1;
       snd_alias_list_name unknownSound2;
       snd_alias_list_name unknownSound3;
       snd_alias_list_name unknownSound4;
       int unknown7;
       ScriptString unknownScriptString2;
       snd_alias_list_name unknownSound5;
       snd_alias_list_name unknownSound6;
       snd_alias_list_name unknownSound7;
       int unknown8;
       snd_alias_list_name unknownSound8;
       snd_alias_list_name unknownSound9;
       snd_alias_list_name unknownSoundA;
       snd_alias_list_name unknownSoundB;
  int engineRampUpLength;
  snd_alias_list_name engineRampDownSnd;
  int engineRampDownLength;
  snd_alias_list_name suspensionSoftSnd;
  float suspensionSoftCompression;
  snd_alias_list_name suspensionHardSnd;
  float suspensionHardConpression;
  snd_alias_list_name collisionSnd;
  float collisionBlendSpeed;
  snd_alias_list_name speedSnd;
  float speedSndBlendSpeed;
  char *surfaceSndPrefix;
  snd_alias_list_name surfaceSounds[0x1F];
  float surfaceSndBlendSpeed;
  float slideVolume;
  float slideBlendSpeed;
  float inAirPitch;
       char * unknownString;
       char unknown9[8];
};

Source Format

The vehicle source files are raw text files with no extension, located at "raw/vehicles/". 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 vehicles the identifier string is "VEHICLEFILE".