Jump to content
Sign in to follow this  
wolfbane

Wolfbane´s tracerfx script addon

Recommended Posts

Nemesis6 : I´m sorry but it´s rather difficult for me to explain in words how the counter in the script works. But i will try to do a new release with all of the script files commented so that it will be easier to understand what is going on. But if you don´t want to wait for that you should take a closer look at the global double array WBE_TRACERFX_UNIT_ARRAY (an array of arrays) and see how it works. That´s the hearth of the addon basicly. Each unit that is running the script is stored along with data about its tracersettings and a counter as a unique array in WBE_TRACERFX_UNIT_ARRAY. Try to add this line (without the quotes) in the scriptfiles to see how the array looks when the scripts is run: "hint format["%1",WBE_TRACERFX_UNIT_ARRAY]"

About the problem with the ricochetting tracers bouncing of infantry and other stuff i will see if i can do anything about that.

One solution that could work is to track the height of the tracers and not just check if its alive. So when the tracer is below a certain height one could assume it has hit the ground and the ricochet is created.

I knew about the problem with tracers richocetting away before the actual tracer has hit the ground. The problem lies in the speed reduction of the drop created tracers compared to the actual bullet fired. This is pretty difficult to solve but i can take a look at i when i have the time and see if i can fix it.

I can´t promise any update to the addon soon sicne i have so much stuff to do but i will try. In the meantime as i said in a previous post (and in the readme?) feel free to do whatever you want with the addon, use it (abuse it biggrin_o.gif), modify it, add it to your addon or whatever you like .

Again, thank you for your kind words. I´m glad you have some use of this little thingy.

smile_o.gif

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).

It depends on the type of bullet. Tracer bullets on 5.56mm ammunition actually burn out after like 100 meters and there is a big arc at 300 meters. Its definitely not flat. Now if you're talking 7.62x51mm or 7.62x54mm rounds then yes, they have a relatively flat trajectory at 300 meters.

But at 600 meters they shouldn't go above a target that is hit.

However in combat most people tend to overshoot their targets which is why often you see tracer bullets going up in the air. Not very many soldiers seem to be able to use tracers accurately. Even on firing ranges I noticed that during nightfire training, most soldiers shot high and did not learn the technique of "walking" tracers onto a target.

On the M60 machine gun, with the assistance of an assistant gunner with binoculars (serving as a spotter) I was able to hit 800 meter targets at Ft. Hood, Texas, by having him watch the fall of my tracers and telling me where to move my aim.

Also as far as I know, tracer rounds do go as fast as regular bullets as essentially they are bullets with a hollowed out core containing phosphorous in the base of the bullet. Their accuracy may be slightly worse but overall they are very similar in ballistics from my experience firing 5.56mm and 7.62mmx51mm tracers.

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

Wolfbane...the problem about checking the height for the tracer ricochet, is that if you have it ricochet only when it hits the ground, then it won't ricochet off of walls. One of the coolest things is seeing the tracers bounce off of walls near your positions!! So please I hope you don't change that!

In fact I never even noticed the tracers bouncing off of people until it was mentioned.

Anyways, I just wanted to let you know that I REALLY like the tracers bouncing off of walls and vehicles. I remember when firing at an old jeep on a range that half of the tracers bounced off while other stuck in it.

Chris G.

aka-Miles Teg<GD>

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).

It depends on the type of bullet.  Tracer bullets on 5.56mm ammunition actually burn out after like 100 meters and there is a big arc at 300 meters.  Its definitely not flat.  Now if you're talking 7.62x51mm or 7.62x54mm rounds then yes, they have a relatively flat trajectory at 300 meters.  

But at 600 meters they shouldn't go above a target that is hit.

However in combat most people tend to overshoot their targets which is why often you see tracer bullets going up in the air.  Not very many soldiers seem to be able to use tracers accurately.  Even on firing ranges I noticed that during nightfire training, most soldiers shot high and did not learn the technique of "walking" tracers onto a target.  

On the M60 machine gun, with the assistance of an assistant gunner with binoculars (serving as a spotter) I was able to hit 800 meter targets at Ft. Hood, Texas, by having him watch the fall of my tracers and telling me where to move my aim.

Also as far as I know, tracer rounds do go as fast as regular bullets as essentially they are bullets with a hollowed out core containing phosphorous in the base of the bullet.  Their accuracy may be slightly worse but overall they are very similar in ballistics from my experience firing 5.56mm and 7.62mmx51mm tracers.

Chris G.

aka-Miles Teg<GD>

Hm, great. But this time I was talking about that I saw in-game. There is big difference about two trajectories:

- path of bullet, which is parabolic and at >300 meters you can see in OFP an arc

- path of wolfbane`s tracer, which is flat

And here we have situation, where hitting far targets is hard, because of tracers, which we see, gives us no information where our bullets hit. And it can even mislead us.

That is what I was talking about wink_o.gif

Share this post


Link to post
Share on other sites

The little movie was so promissing I decided to mirror it just to get rid of the 'ticket' thingy if anybody could get annoyed with that tounge_o.gif

So to say thanks for this small but great addon.

Share this post


Link to post
Share on other sites

Good job with this script its really nice. Although its a bit wierd when grenades have tracers. tounge_o.gif I also uploaded the video and script to ofp.info. Thanks Miles Teg for the pic, and Oyman for the video.

Script Download

Video Download

And again thanks for releasing this great script. smile_o.gif

Share this post


Link to post
Share on other sites

dammit!

I made a script just like this last year, but never got around to releasing it sad_o.gif

ah well, thats just the way life is sometimes... wink_o.gif

Share this post


Link to post
Share on other sites

Superb Work!! That what I was waiting for all the time! Its really revolution in OFP!

Share this post


Link to post
Share on other sites

hey, sorry to bug you guys, but im a newb at this game, i read the readme, and type it in the init thing, but it didn't show, could you give me an exampe, with a random unit with the right astricts, etc, just as an example? bc i have no idea what my unit's names are, there are so many downloaded....

Share this post


Link to post
Share on other sites

An addon I have only dreamed of, excellent!

But from what people in the thread are saying, there are some bugs to be worked out.

I'll download when they are fixed.

Can it be used without the old tracer effects? I would just like to have the big glowing light.

And, can't you make it easier to use.. without having to write in init feilds. I love nothing more than to download a pbo and just throw it in the addon folder and begin playing with it already working.

Share this post


Link to post
Share on other sites
An addon I have only dreamed of, excellent!

But from what people in the thread are saying, there are some bugs to be worked out.

I'll download when they are fixed.

Can it be used without the old tracer effects? I would just like to have the big glowing light.

And, can't you make it easier to use.. without having to write in init feilds. I love nothing more than to download a pbo and just throw it in the addon folder and begin playing with it already working.

hmm, could be

The easier approach is the global triger as posted in this thread. This makes all the units have these tracers.

It can't be used without the old tracers. The problem is you need to remove the old tracers. A new addon can for example have no tracers and than when you use this script it will have the new tracers.

New addons can also implement this script so that it has the tracers already.

The little bugs prevent it from being used as a replacement right now (in my case at least). But if these are fixed it's really the best thing out there.

edit; about the bounsing of bodies;

DON'T remove it in the way you proposed. Since this means it will also remove tracers bouncing of vehicles. This is so fun I would love keep this.

Can't you detect unittype on impact?? (and when infantry set the bounsing chance to 0)

Share this post


Link to post
Share on other sites

Looks like nice effects wolfbane!

One question, how does this perform in multiplayer?

/Christer (a.k.a KeyCat)

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>

Yeah, I ditto my fellow mod-team members, Calm Terror and Miles Teg. These are perfect!

I had a weird bug, though. When I tried to film it using FRAPS, the impacts on the BRDM only showed a cloudlet... no ricochets, and when they did ricochet, the ricochet happened back near my soldier (me). As soon as I toggled FRAPS recording off, the ricochets started bouncing off the BRDM, again. Very weird.

You must be tapping heavily into some DirectX stuff with this addon?

Whatever the case, this will add so much to the game.

An enemy mgunner opened up on me and I got shot down, THEN I saw a couple of tracers fly by me. lol The luck of the draw when every 4th round is a tracer. lol

And the physics on the ricochets is PERFECT! Yep, not even Ghost Recon 2 or Project:IGI 1 got the ricochets this good!

Anyone who wants to compare it to the real thing, check out the Shoot-Out videos at

http://www.biggerhammer.net/

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>

Really? I thought 0.1 was a more realistic size...

And Miles... would you agree that the U.S. Army's red tracers look more like this script's yellow tracers when flying through the night air?

Problem with the red as they currently are is that during the day time they show up as dark red blobs flying through the air. (Kinda like paintballs... lol)

I'll probably be using yellow as the NATO tracers. Glad you included that color, wolfbane!

Again, great work!

I don't know how you could have thought that this wouldn't be a big deal addon! This is the best gameplay-enhancing addon I've tried since the blood script! (I haven't tried ECP or Y2K3 or any of that stuff... if it takes a lot of work or there are rumored incompatibility problems, I usually don't mess with it.)

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

What do you mean it doesn't work as a tracer? Try turning your crosshairs off and you'll see that it very much works as a tracer.

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.

I don't think Wolfbane said anything about it being used on a tank, so it's kinda unfair to gripe about something he didn't claim would work.

Share this post


Link to post
Share on other sites
Nemesis6 : I´m sorry but it´s rather difficult for me to explain in words how the counter in the script works. But i will try to do a new release with all of the script files commented so that it will be easier to understand what is going on. But if you don´t want to wait for that you should take a closer look at the global double array WBE_TRACERFX_UNIT_ARRAY (an array of arrays) and see how it works. That´s the hearth of the addon basicly. Each unit that is running the script is stored along with data about its tracersettings and a counter as a unique array in WBE_TRACERFX_UNIT_ARRAY. Try to add this line (without the quotes) in the scriptfiles to see how the array looks when the scripts is run: "hint format["%1",WBE_TRACERFX_UNIT_ARRAY]"

About the problem with the ricochetting tracers bouncing of infantry and other stuff i will see if i can do anything about that.

One solution that could work is to track the height of the tracers and not just check if its alive. So when the tracer is below a certain height one could assume it has hit the ground and the ricochet is created.

I knew about the problem with tracers richocetting away before the actual tracer has hit the ground. The problem lies in the speed reduction of the drop created tracers compared to the actual bullet fired. This is pretty difficult to solve but i can take a look at i when i have the time and see if i can fix it.

I can´t promise any update to the addon soon sicne i have so much stuff to do but i will try. In the meantime as i said in a previous post (and in the readme?) feel free to do whatever you want with the addon, use it (abuse it biggrin_o.gif), modify it, add it to your addon or whatever you like .

Again, thank you for your kind words. I´m glad you have some use of this little thingy.

smile_o.gif

First, let me apologize for my multi-posting, but sometimes you don't know you're going to have to multi-post until you've already done it.

In the book "Black Hawk Down" the soldiers described the tracers as "glowing" when they hit flesh. It was unclear whether they glowed in the flesh or dropped at the feet of the wounded enemies and glowed because they were burning off blood/flesh that stuck to the bullet.

But there was a recent video of an insurgent taking rounds and you could actually see the tracers bouncing off of bones in his body or changing trajectory when they tumbled through his flesh.

I would prefer it if you left the ricocheting just the way it is. 7.62mm NATO and 7.62 x 54mm Dragunov rounds (same as what the PK uses) tend to go right through a person, anyway. The phosphorus doesn't stop burning just because it passed through a body.

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).

It depends on the type of bullet.  Tracer bullets on 5.56mm ammunition actually burn out after like 100 meters and there is a big arc at 300 meters.  Its definitely not flat.  Now if you're talking 7.62x51mm or 7.62x54mm rounds then yes, they have a relatively flat trajectory at 300 meters.  

But at 600 meters they shouldn't go above a target that is hit.

However in combat most people tend to overshoot their targets which is why often you see tracer bullets going up in the air.  Not very many soldiers seem to be able to use tracers accurately.  Even on firing ranges I noticed that during nightfire training, most soldiers shot high and did not learn the technique of "walking" tracers onto a target.  

On the M60 machine gun, with the assistance of an assistant gunner with binoculars (serving as a spotter) I was able to hit 800 meter targets at Ft. Hood, Texas, by having him watch the fall of my tracers and telling me where to move my aim.

Also as far as I know, tracer rounds do go as fast as regular bullets as essentially they are bullets with a hollowed out core containing phosphorous in the base of the bullet.  Their accuracy may be slightly worse but overall they are very similar in ballistics from my experience firing 5.56mm and 7.62mmx51mm tracers.

Chris G.

aka-Miles Teg<GD>

Argh, another post by me...

Part of the problem of the mgun tracers shooting high is probably due to the fact that B.I.'s mguns shoot about 9 out of 10 rounds WAYYYYYY high over their targets. The 1 out of 10 usually flies straight toward the target and hits it... so the problem is probably not due to the script. I believe that this was B.I.'s attempt to create suppressive fire (or to balance out the mguns so that they weren't so much more powerful). If I remember correctly, this happened around v1.3 or something, about the time that the M60 became very difficult to aim through weapon sight mode.

You can even watch from the sidelines a firefight at night between mgunners with default tracers and see mgunners firing HIGH over VEHICLES. I learned this when I tried to make an ambush on a convoy mission and found that my mgunners were damn near ineffective. They certainly didn't give me the results I would expect from an M60 opening up on soft-skinned vehicles.

Share this post


Link to post
Share on other sites

Yes its true, the tracers do bounce OUT of bodies, so really its more accurate in a way if thats left in.

Having tracers for vehicle mounted guns would be good too, tanks, HMMWVs, etc.

Also, if you use the universal trigger, so that every unit has these tracers without having to type it in every individual init feild, will they all be the same color. I like my Americans to fire red tracers and my insurgents to fire green... not both red or both green.

Wolfbane, please please please! this is a great addon, how could you think it wouldn't be?

Just fix those little errors and such and this will be perfect.

Can anyone post a video of real tracers firing... how do they look at night, and how do they look in day?

Share this post


Link to post
Share on other sites

Kim-  It's not too hard to use.  Just copy and paste the sample script lines in the readme into the "init" box of your unit on the mission editor.  His readme explains in a lot of detail and in an easy to read manner how to adjust the parameters if you want.   The first sample is actually a nice quick and dirty default script line.  Try that first, and then after you've had some fun with it, try sample script lines farther down in the readme and experiment with the settings. I also posted on sample script settings that I found to be my favorite.  Just copy and paste that script this script into the init box of the unit you want it in and you're good to go:

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

You can change green to "white", "red", or "yellow".

Edit-  Oh...also there are videos and a picture posted back on the other pages in the thread.

Uzi-  Yeah the red tracer isn't the best, however its very difficult to get the red to come out nice and bright in OFP.

So yeah I just use yellow for West forces and Green for East forces.    Oh...also to avoid multi-posting Uzi, just use the "edit" function on your post to add more information.

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites
hey, sorry to bug you guys, but im a newb at this game, i read the readme, and type it in the init thing, but it didn't show, could you give me an exampe, with a random unit with the right astricts, etc, just as an example? bc i have no idea what my unit's names are, there are so many downloaded....

you name your units when you click on the map to place a unit, look at the window, and it says unit name., and you create it. smile_o.gif

Share this post


Link to post
Share on other sites

Actually you don't even need to name the unit. If you just put "this" in place of the name it automatically refers to the unit who's init box you put the script in.

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

Yeah, I would definitely like to have a side-specific script for determining the color...

Here are links to excellent tracer videos:

Spring Shoot-Out:

Large Format - T1, etc. - Realplayer 4441 K

Small Format - ISDN, 56k, etc. - Realplayer 2107 K

Large Format - T1, etc - Windows Mediaplayer 6462 K

Small Format - ISDN, 56k, etc. - Windows Mediaplayer 1982 K

I had problems with one of the files, so if you have problems, that's probably the bad one.

Fall Shoot-Out:

Windows Media Player - Large  14.9meg

Realplayer - Large  meg

Windows Media Player - Medium  3.1meg

Realplayer - Medium  4.8meg

Quicktime - Medium  13.9meg

Windows Media Player - Small  1.5meg

Keep in mind that the human eye sees "faster" than the frame rate in these videos, so the tracers would appear less like a streak than what these videos show.

Share this post


Link to post
Share on other sites
Guest [B.B.S.] T_D

I think the tracers dont follow the bullet exactly:

Tracer.JPG

On this pic you can see the tracer effect of the M1A2 SEP and Wolfbanes script. I also could see that the tracer is slower than the bullet. But i must say it looks great and i think your way of tracer effect is more performance friendly than mine.

Share this post


Link to post
Share on other sites

Note that the script on the SEP tank is completely different. It seems to go straight to the impact point of the bullet, which gives very strange results when you try to fire in high in the air (without a target)

Share this post


Link to post
Share on other sites
Guest [B.B.S.] T_D

no the tracer is mounted on the bullet. But a little bug in another script causes weird shots.

Share this post


Link to post
Share on other sites
Actually you don't even need to name the unit.  If you just put "this" in place of the name it automatically refers to the unit who's init box you put the script in.

Chris G.

aka-Miles Teg<GD>

Not sure if you read Shadows post Miles, you may find this useful:

Quote[/b] ]

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

RED

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  

×