Jump to content
Sign in to follow this  
wolfbane

Wolfbane´s tracerfx script addon

Recommended Posts

This is a small script addon that i´ve worked on for some time now for my own use. But i thought maybe the ofp community could have some use for it too so i decided to release it.

This is addon aims to provide a bit more realistic tracerrounds. The tracers comes in 4 colors to choose from. There are two types of tracers, normal and glowing. The tracers can richochet off the ground realisticly and can also be set to a specific size. You can set the number of rounds between each tracer fired. Check out the readme on how to run the script.

Latest version:

Download v1.06

Download v1.06 Source

Previous version:

Download v1.05

Download v1.05 Source

smile_o.gif

Share this post


Link to post
Share on other sites

It works unclesam.gif

One thing, that "red" looks rather "pink", is it possible to make it more "NATO-red"? "Green" on East works fine - only need to turn off standard BIS tracers and do not put to many MGs with new one wink_o.gif

I can see shiny future for this thing.

Share this post


Link to post
Share on other sites

OMG! OMG! OMG!!!!!! THIS IS AMAZING!!!!!!!!!!

Now THIS is what I've been waiting for for SOOOOOOO long.  

Thank you SOOOOOOOOOOO much. You have made me VERY VERY VERY HAPPY!!!

Finally now we can have realistic looking firefights with realistic looking tracers!!

OMG!!!!!!!  HOLY SHHHHHHHHEEEEEET!  YOU EVEN MADE THEM RICOCHET!!!!!!   That's even better then the tracer effects in other games!  

That is just AMAZING!!!  

YOU DA MAN!!!!!!!

By the way, I actually like it mixed with the BIS tracers. The more tracers the better the light show in my opinion. lol

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

Wow... never seen Miles go that crazy... I guess I should download this addon then, eh biggrin_o.gif

Share this post


Link to post
Share on other sites

wow this is really cool

soem things can be improved but this is an very nice start..

and they actually look good with BIS tracers.

these give the tracer and size and the bis tracer gives the streaking look.

very well done.

can't wait to see some improvements.

Share this post


Link to post
Share on other sites

Thank you for your kind words. I´m glad you guys like it. I didn´t know if i should release it since i though it wasn´t a very fancy addon just some simple scripting but i´m glad i did it now.

I tried to optimize the scripts for as much performace as i could. I had some problems with the glowing tracers. I would have liked to used a function script for that too but it just wasn´t possible with how i implemented some things (some types of loops just doesn´t run very well in function scripts). The normal tracers are created via the drop function and the speed is reduced a bit compared to the actual bullet fired so they are easier to spot. That was impossible for me to do with the glowing tracers without creating some sort of dummybullet with zero mass as a placeholder for the real bullet. But how much i tried i couldn´t create such a bullet.. Because of these things the glowing tracers show up a bit later and further away from the unit fireing the tracers and also travel much faster than the normal drop created tracers. I think there should be some other light object for the glowing tracers too because it looks a bit weird now. If the speed reduction and a new light object for the glowing tracers was implemented i think that they would look much better. I will see if i can do something about that. But the glowing tracers was more of a experiment anyways, i never really planned to use it but as it was allready in the addon i didn´t remove it for the release. But i´ll look into it again.

Przezdzieblo : I will take a look at the issue with the red tracer an possibly change it. The problem is if you make the tracers to dark in color they tend to be quite hard to spot.

Anyways if you don´t want to sit around and wait for me to update the addon, feel free to use, modify or mess about with it in anyway you like. This includes adding it to your custom addon or mod, releasing it under a pseudonym or whatever.. biggrin_o.gif No need to credit me or anything. I´m just happy if it´s of any use.

smile_o.gif

Share this post


Link to post
Share on other sites

Actually the glowing part is nice. I would leave it in. Besides users can turn it on or off. Better to leave it in just to give some versatility for mission makers I think.

Man the more I mess with the script the more I am enjoying it.

By the way, the slower speed is in fact rather realistic looking. I've fired tracer rounds in the military many times and they do look like they are moving in slow motion sometimes especially as they get farther away (they look pretty fast when they're coming right at you.) LOL

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

Is this compatible with original Operation Flashpoint(Not Resistance)?

edit-nevermind, tried it and it doesn't work. sad_o.gif

Share this post


Link to post
Share on other sites

The addon is now updated with some minor changes/fixes.

"Changelog v 1.01

bugfix - the size parameter was set to the same value as the rounds parameter thus causing weird looking tracers when those parameters where used

fix - the color of the red tracer made slightly darker so its not as white/pink looking (making it darker red than it is now would cause it to look kinda greyish ingame and harder to spot)"

Use the original download link in the first post to get the updated file.

smile_o.gif

Share this post


Link to post
Share on other sites

Edit--oops...ok link works now. smile_o.gif

By the way...I found my favorite value was this one:

[this,1,1,0,"green",1]exec "\wbe_tracerfx\wbe_tracerfx.sqs"

Tons of bouncing tracers and just the right size.   It brings back fond memories of firing my beloved M60 machine gun in the Army.   (sniff)

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

Great / nice job. My one gripe is that it doesn't really work as a tracer - It's more of an effect: Eye candy.

A more technical question - How did you do you "counting" thing? I mean the once every three shots thing. I decompiled it(no pun intended! ;)), and I gathered it definetely had something to do with the _numrounds variable. Normally I would be able to figure this out, but I still suck a bit at .SQF files, so tell me - How did you do it? Let me guess - When the "fired" eventhandler is activated, some value goes up, and when that value reaches 3, the next shot will have a cl_fired particle, and the beforementioned "value" will be reset?

Share this post


Link to post
Share on other sites

how about include this in addons?

like for our Swedish Forces 4.0..

and good work.

Share this post


Link to post
Share on other sites
Great / nice job. My one gripe is that it doesn't really work as a tracer - It's more of an effect: Eye candy.

A more technical question - How did you do you "counting" thing? I mean the once every three shots thing. I decompiled it(no pun intended! ;)), and I gathered it definetely had something to do with the _numrounds variable. Normally I would be able to figure this out, but I still suck a bit at .SQF files, so tell me - How did you do it? Let me guess - When the "fired" eventhandler is activated, some value goes up, and when that value reaches 3, the next shot will have a cl_fired particle, and the beforementioned "value" will be reset?

Actually for me it seems to work very well as a tracer.  I was able to absolutely hammer targets by "walking" my tracers onto a target much as I did in real life on the M60 GPMG, M2, and M249 SAW that I fired during my military service.  

Try this setting:

[this,1,1,0,"green",1]exec "\wbe_tracerfx\wbe_tracerfx.sqs";

This is the most best value that I've tried so far and it works very well for seeing where your bullets are hitting.  I've also had no significant problem with the CPU slowdown even on missions where many machine gunners and autoriflemen are using the script.   While its like like every bullet a tracer, visually it looks similar to a 1 in 3 tracer load that I would use on my M249 loadouts (I liked tracers) when we had plenty of tracer rounds to use up on the firing range.  During nightfire on the M16A2 I also would usually use all tracers rounds.  

smile_o.gif

Oh by the way if anyone is wondering why the tracers "bounce" in this addon, it is because in real life that's exactly what they do half the time when they hit the ground. That's why I was just blown away when I saw that. Even some of the best looking tracers in other games like MOH:AA don't have bouncing ricocheting tracers like this addon has.

So Wolfbane should be very proud of himself for this accomplishment. It really brings OFP to a whole new level of realism and makes firefights ALOT more exciting with these tracers wizzing around the battlefield.

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

Very nice addon indeed.

It's definitely a keeper.

Any way to add it to every single unit on the map?

Here's the setting that is the closest to my experience firing the G3A3 with tracers:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[this,1,1,0,"yellow",2,0.1]exec "\wbe_tracerfx\wbe_tracerfx.sqs"

Share this post


Link to post
Share on other sites

Well, it works ok for the infantrymen, but try on a tank. The problem is that it's just one particle that gets the bullet's velocity once - it doesn't account for downfall, etc.

Share this post


Link to post
Share on other sites

This is a great addon. The only issue Im having is in order to use it with most mods.. the default tracer within the mod would need to be deactivated. Right now I get a combination of the old laser beams and the new tracer together. Also tracers are riccocheting (SP?) off of infantry when they get hit.

Share this post


Link to post
Share on other sites

The tracers will ricochet off anything they hit about 60% of the time.  But yeah, in real life, they usually don't do this off of bodies.  I think it would be nearly impossible or require some very hefty CPU intensive scripting to make them not bounce off of soldiers.    

I'm just amazed that the tracers bounce at all.  Again try to find any other game that does this.    Plus in real life occasionally a tracer round will bounce off a helmet or will go through a person and bounce off of something behind him.

But if you don't like the ricocheting, you can always turn that off in the script.

As for the BIS tracer problem, I actually like the combination of tracers, however to remove the BIS tracers you would have to edit the ammo in the weapons used in a particular mod.   That would be up to MOD's to do themselves if they decided to incorporate this tracer addon into their mods.  

Now there may be a global BIS tracer on/off command, but if I'm not aware of it.

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

It was a pain in the ass to get a good screenshot because the tracers move very quickly, but I finally got a halfway decent one:

TracerFire.jpg

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

Red was kind enough to make me a script to set different settings for tanks and soldiers.

I added choppers and cars to it.

Here it is:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Create a trigger that covers all units placed on the island

; Set it to activate by anyone present

; In the onactivation field write: thislist exec "unit_check.sqs"

_list = _this

_i = 0

_men = []

_tanks = []

_helos = []

_cars = []

#check_type

_unit = _list select _i

?"man" counttype [_unit] == 1: _men = _men + [_unit]

?"tank" counttype [_unit] == 1: _tanks = _tanks + [_unit]

?"air" counttype [_unit] == 1: _helos = _helos + [_unit]

?"car" counttype [_unit] == 1: _cars = _cars + [_unit]

_i = _i + 1

?_i < (count _list): goto "check_type"

"[_x,1,1,0,{yellow},2,0.1] exec {\wbe_tracerfx\wbe_tracerfx.sqs}" foreach _men

"[_x,1,1,0,{red},2,0.3] exec {\wbe_tracerfx\wbe_tracerfx.sqs}" foreach _tanks

"[_x,1,1,0,{green},1,0.7] exec {\wbe_tracerfx\wbe_tracerfx.sqs}" foreach _helos

"[_x,1,1,0,{yellow},2,0.3] exec {\wbe_tracerfx\wbe_tracerfx.sqs}" foreach _cars

exit

Share this post


Link to post
Share on other sites

Note that the BIS sinper has no tracer.

This script could be used in the JAM/MAAM addon to replace the other tracers. It's great.

But I noticed that the speed of the tracer is sometimes to slow. The bouncing tracer is created on the impact and can be seen flying in the air while the tracer leaving the barrel hasn't arrived yet. This is a little issue that can be fixed very easy. The problem is that every ammo has it's own velocity and you need to configure the script for each one (or make one big one for all ammo's when it's used in JAM/MAAM.

Great scripting. If the little isue can be fixed than this might become the standard for OFP. I hope many mods will use it.

Share this post


Link to post
Share on other sites

One more thing - tracers go straight. At 300 meters there is no difference, but at 600 - there is big. Tracers goes even few meters above target which is hit.

Cpt. FrostBite said about two tracers instead of one - bullet is faster than tracer. But sometimes at the moment of hit there is no additional bouncing tracer - but one which gone straight now change it`s trajectory (if target was far - all it happens few meters above and looks like ufo).

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×