BF2 adding tracer to a weapon

Posted by boRis!! on  - Basic Client Side Coding

Easy tutorial to add tracer to a weapon on Battlefield2*

  • Go to your BF2 Located File. EX: >>C:\Program Files (x86)\EA Games\Battlefield 2
  • Find Objects_server and open it, find for Weapons\Handheld and select your weapon.
  • Open weapon .tweak file then search for this line:


rem -------------------------------------
ObjectTemplate.addTemplate S_gun_Projectile_Looping -- gun means your gun '-'

rem -------------------------------------

ObjectTemplate.timeToLive CRD_NONE/x/x/x

ObjectTemplate.material x
ObjectTemplate.hasOnTimeEffect x
ObjectTemplate.minDamage x

ObjectTemplate.damage x

You will maybe see these lines, under ObjectTemplate.material add that all that lines below under ObjectTemplate.material:

ObjectTemplate.tracerScaler x

ObjectTemplate.maxTracerScaler x
ObjectTemplate.minTracerScaler x
ObjectTemplate.tracerSizeModifier x

ObjectTemplate.tracerTemplate p_tracer_r

Maybe it looks like this:


rem -------------------------------------

ObjectTemplate.addTemplate S_usrif_gun_Projectile_Looping
rem -------------------------------------
ObjectTemplate.timeToLive CRD_NONE/x/x/x
ObjectTemplate.material x
ObjectTemplate.hasOnTimeEffect x
ObjectTemplate.tracerScaler x
ObjectTemplate.maxTracerScaler x
ObjectTemplate.minTracerScaler x
ObjectTemplate.tracerSizeModifier x
ObjectTemplate.tracerTemplate p_tracer_r
ObjectTemplate.minDamage x

ObjectTemplate.damage x

-------------you done it (I think)

ObjectTemplate.timeToLive -- Means how much time the tracer will be visible.

ObjectTemplate.tracerScaler -- If I'm not wrong, it means how much the tracer will increase over time.

ObjectTemplate.maxTracerScaler -- Max tracer size over time.

ObjectTemplate.minTracerScaler -- Min tracer size over time.

ObjectTemplate.tracerSizeModifier -- Tracer size in XYZ Axis, bigger the number, bigger the size.

ObjectTemplate.tracerTemplate -- The tracer template used, original game has: p_tracer_r, p_tracer_g, p_tracer_tank.

Community content is available under CC-BY-SA unless otherwise noted.