Tracer Asset: Difference between revisions

From COD Engine Research
mNo edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 4: Line 4:
[[Category:MW3]]
[[Category:MW3]]
[[Category:Ghosts]]
[[Category:Ghosts]]
[[Category:AW]]
[[Category:BO2]]
[[Category:BO2]]
The tracer asset is fairly obvious, it controls the drawn bullets that are supposed to help you see where you are shooting (Clearly for effect on CoD). Call of Duty 4, World at War and Black Ops 1 did not have this asset.
The tracer asset is fairly obvious, it controls the drawn bullets that are supposed to help you see where you are shooting (Clearly for effect on CoD). Call of Duty 4, World at War and Black Ops 1 did not have this asset.
== Modern Warfare 2 & 3 & Ghosts ==
== Modern Warfare 2 & 3 & Ghosts ==
struct Tracer
<syntaxhighlight lang="cpp">
{
struct TracerDef
  char * name;
{
  Material * material;
  const char * name;
  int drawInterval;
  Material * material;
  float speed;
  unsigned int drawInterval;
  float beamLength;
  float speed;
  float beamWidth;
  float beamLength;
  float screwRadius;
  float beamWidth;
  float screwDist;
  float screwRadius;
  float colors[5][4];
  float screwDist;
};
  float colors[5][4];
};
</syntaxhighlight>
== Black Ops 2 ==
<syntaxhighlight lang="cpp">
enum tracerType_t
{
  TRACERTYPE_LASER = 0x0,
  TRACERTYPE_SMOKE = 0x1,
  TRACERTYPE_NUM = 0x2
};


== Black Ops 2 ==
struct TracerDef
struct Tracer
{
{
  const char *name;
  char * name;
  tracerType_t type;
  int bShouldFade;
  Material *material;
  Material * material;
  unsigned int drawInterval;
  int drawInterval;
  float speed;
  float speed;
  float beamLength;
  float beamLength;
  float beamWidth;
  float beamWidth;
  float screwRadius;
  float screwRadius;
  float screwDist;
  float screwDist;
  float fadeTime;
  float fadeTime;
  float fadeScale;
  float fadeWidth;
  float texRepeatRate;
  float brightness;
  vec4_t colors[5];
  float colors[5][4];
};
};
</syntaxhighlight>
 
== Advanced Warfare ==
<syntaxhighlight lang="cpp">
struct TracerDef
{
  const char * name;
  Material * material;
  FxEffectDef * trailFx;
  int drawInterval;
  float speed;
  float beamLength;
  float beamWidth;
  float screwRadius;
  float screwDist;
  float colors[5][4];
};
</syntaxhighlight>


== Source Format ==
== Source Format ==
Unfortunately there has never been any information released on tracer's source format. The currently accepted format is as follows; source files are raw text files with no extension, located at "raw/tracer/". 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 tracers the identifier string is "TRACER". For example here is the "assultrifle" tracer dumped from MW2.
Unfortunately there has never been any information released on tracer's source format. The currently accepted format is as follows; source files are raw text files with no extension, located at "raw/tracer/". 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 tracers the identifier string is "TRACER". For example here is the "assultrifle" tracer dumped from MW2.
TRACER\material\gfx_tracer\drawInterval\3\speed\4500\beamLength\100\beamWidth\8\screwRadius\0.5\screwDist\50\color0R\1\color0G\0.75\color0B\0.75\color0A\0\color1R\1\color1G\0.75\color1B\0.75\color1A\1\color2R\1\color2G\0.75\color2B\0.75\color2A\1\color3R\1\color3G\1\color3B\1\color3A\0.5\color4R\1\color4G\1\color4B\1\color4A\1
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
TRACER\material\gfx_tracer\drawInterval\3\speed\4500\beamLength\100\beamWidth\8\screwRadius\0.5\screwDist\50\color0R\1\color0G\0.75\color0B\0.75\color0A\0\color1R\1\color1G\0.75\color1B\0.75\color1A\1\color2R\1\color2G\0.75\color2B\0.75\color2A\1\color3R\1\color3G\1\color3B\1\color3A\0.5\color4R\1\color4G\1\color4B\1\color4A\1
</pre>

Latest revision as of 19:13, 23 December 2014

The tracer asset is fairly obvious, it controls the drawn bullets that are supposed to help you see where you are shooting (Clearly for effect on CoD). Call of Duty 4, World at War and Black Ops 1 did not have this asset.

Modern Warfare 2 & 3 & Ghosts

struct TracerDef
{
  const char * name;
  Material * material;
  unsigned int drawInterval;
  float speed;
  float beamLength;
  float beamWidth;
  float screwRadius;
  float screwDist;
  float colors[5][4];
};

Black Ops 2

enum tracerType_t
{
  TRACERTYPE_LASER = 0x0,
  TRACERTYPE_SMOKE = 0x1,
  TRACERTYPE_NUM = 0x2
};

struct TracerDef
{
  const char *name;
  tracerType_t type;
  Material *material;
  unsigned int drawInterval;
  float speed;
  float beamLength;
  float beamWidth;
  float screwRadius;
  float screwDist;
  float fadeTime;
  float fadeScale;
  float texRepeatRate;
  vec4_t colors[5];
};

Advanced Warfare

struct TracerDef
{
  const char * name;
  Material * material;
  FxEffectDef * trailFx;
  int drawInterval;
  float speed;
  float beamLength;
  float beamWidth;
  float screwRadius;
  float screwDist;
  float colors[5][4];
};

Source Format

Unfortunately there has never been any information released on tracer's source format. The currently accepted format is as follows; source files are raw text files with no extension, located at "raw/tracer/". 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 tracers the identifier string is "TRACER". For example here is the "assultrifle" tracer dumped from MW2.

TRACER\material\gfx_tracer\drawInterval\3\speed\4500\beamLength\100\beamWidth\8\screwRadius\0.5\screwDist\50\color0R\1\color0G\0.75\color0B\0.75\color0A\0\color1R\1\color1G\0.75\color1B\0.75\color1A\1\color2R\1\color2G\0.75\color2B\0.75\color2A\1\color3R\1\color3G\1\color3B\1\color3A\0.5\color4R\1\color4G\1\color4B\1\color4A\1