Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3   Go Down

Author Topic: 20mm ShVAK Cannon Tracer Rate  (Read 7614 times)

0 Members and 1 Guest are viewing this topic.

SAS~Malone

  • flying as #46 with the FAC
  • Editor
  • member
  • Offline Offline
  • Posts: 14562
  • proud member of that 'other' site
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #12 on: August 30, 2014, 12:08:33 AM »

i don't have the historical facts, but my guess is, seeing it's a Russian sim, the dev's would likely have got the facts right for these guns, probably more so than the foreign (to them) planes, like US/UK, for instance.
that said, as mentioned, we welcome any cold, hard facts, but we aren't about to change it based on someone's 'feelings'. :D
Logged
.....taking fun seriously since 1968.....  8)

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23969
  • Taking a timeout
    • STFU
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #13 on: August 30, 2014, 01:02:58 AM »

Do we implicitly trust the designer if a source is not given?
Such a low rate as near 1/second is not particularly useful.
I trust in sheer numbers.
The ShVAK cannons in IL-2 4.12.2 use a "TP-T / HE / HE / HE" belting where the tracer color sequence is "yellow - green/blue - orange - white - red".
With a shot frequency of 10.83- per second (650 rpm) this means that depending on the current gun sync, on a two-cannon aircraft you get a tracer every 185ms - 369ms.
Even if all bullets would be tracers, 650rpm doesn't get you below 92ms here and from what I read everyone's just mixing up these cannons with the tracers they get from e.g. the ShKAS guns where you have tracers every 30ms.
These are cannons, not just guns. They pack a punch at the cost of fire rate, deal with it.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23969
  • Taking a timeout
    • STFU
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #14 on: August 30, 2014, 06:52:55 AM »

*bump*
Just saw a funny thing in IL-2's Java code.
Those who complain about the low tracer rate for ShVAK cannons might want to give the attached hotfix a try.
It's valid for Modact 5.x only and goes right into your game folder (keeping the folder structure of the zip file, this will result in a file "#SAS/ShVAK Tracers/2735B1CA75C7B402" being created in your game then).
If this solves it for you, then we're good to go with a little modification which, funny enough, will not change anything in the belting and hence will not be some kind of "cheat" because the ammo, the bullet's flight paths, the damage caused etc. all remains the same.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6057
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #15 on: August 31, 2014, 09:11:04 PM »

So, Mike, what was this 'funny thing" in Java? And what did you change?

My mods are based on the old AAA scheme, and so it seems the 'hot fix' can't be checked out. (Not that it matters so much; as I said, if the low tracer rate is realistic I'm OK with that.)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23969
  • Taking a timeout
    • STFU
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #16 on: August 31, 2014, 11:07:16 PM »

Oh, the old AAA stuff? That's 4.08m or 4.09b1m... Even if this is just a simple thing to do, I'm afraid I don't have a classdump of that version at hands anymore.
If you can spot the "2735B1CA75C7B402" in your game and upload it somewhere, I could apply the modification there for you to test it.

The "funny thing" is this:
IL-2 uses a belting scheme for each gun, where each bullet in the belt is defined separately.
There are three properties for tracers, defining their mesh/trail/color, either combination.
Usually this would fully define tracers: If none of the three is defined, the bullet does not have a tracer, otherwise the defined one(s) apply.

The ShVAKs have, as I wrote before, tracers on every 4th bullet, which would make sense and might be historically correct. I don't know if it is, that's why I asked for sources.

Now comes the odd part:
For some unknown reason (I guess it's a thing from java code attic) there's an additional property "traceFreq" on each gun, an integer number.
As written before, the frequency where tracers apply is fully defined by the tracers already, and it basically doesn't make sense to try to define it by a single number since the frequency might even vary (imagine a TP-T/HE/TP-T/HE/HE/TP-T/TP-T/HE belting for instance). Still that property is there and it's been used in code:
In the "Gun" class tracers are created only when this is true:
Code: [Select]
if(Config.isUSE_RENDER() && bulletNum % prop.traceFreq == 0)"Config.isUSE_RENDER()" defines whether or not 3D stuff is drawn at all (it isn't on dedicated servers for instance).
"bulletNum" is a number giving the position on the belt (0 to number of bullets on belt minus 1).

This means that tracers will only be drawn when the bullet number can be divided by "traceFreq" without remainder.

A spot check shows that this doesn't matter for guns in IL-2 usually as the belting definition matches the "traceFreq" property.
However for the ShVAKs, each 4th bullet in the belt is a tracer, but "traceFreq" is set to "3".
The result is that 2 out of 3 tracers will be skipped (bullet number 4 and 8, neither can be divided by 3).
That just doesn't make sense and as I wrote before I guess that this is a simple mistake, code attic. Someone altered the belting but forgot to match this useless "traceFreq" property or vice versa.
The glitch is there in 4.09m so I guess it will be in AAA code as well.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6057
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #17 on: September 01, 2014, 02:37:27 AM »

Now that is *very* interesting indeed! And remarkable how quickly you uncovered this, Mike.

It would seem that in this case, one's 'impression' of a too-infrequent tracer rate is most likely correct. Such a mismatch in code which results in skipping over events like this is almost certainly an outright error. But strange that it didn't get caught during even the most casual testing...
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6057
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #18 on: September 24, 2014, 11:57:54 AM »

I just tried something...

Perhaps a year ago I downloaded a collection of machine gun/cannon classfiles as a mod pack, which (memory is hazy) might have been taken from 4.12 (??).When I first added them to my MODS and tries a mission, the unsurprising load failure resulted. And so I removed this.

Last night I grabbed just the ShVAK classfile noted previously and saw a load failure due to the missing "12mmSmoke.eff" (not present in 4.08m.) I created such an effect by simply copying another tracer smoke effect and naming accordingly. That worked! I note that the formerly God awful pee yellow lighting while firing that makes the plane glow as though radioactive ;) was changed to a much more muted and realistic intensity/color. This is one thing I've fervently desired for a long time.

Now I might try adding those classfiles again, systematically fixing each error as they crop up.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6057
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #19 on: September 25, 2014, 04:55:49 AM »

After quite a few hours of tweaking I've got all the MG gun classfiles incorporated. It required to make just two new tracer smokes, and add a couple of 37mm related folders/effects in the GunFire and GunFireDay folders. I adjusted all the GunFire.eff and GunFlare.eff files to my taste.

Except for the 30mm cannon on the later Frank and the peashooters on the Claude (which uses the Ki-27 cockpit), I now have *finally* graduated from the awful psychadelic yellow lighting which illuminated the plane when guns fire!! Yay!

More guns now make tracers smoke. But it seems, though, that for most guns the tracer smoke is now applied to fewer tracers. In general, about 1/2 the tracers make smoke compared to my previous 4.08m/AAA mod pack v1.

All in all, I'm pleased. I wish I had thought to persevere last year when I first tried the MG classfiles, being too quickly dissuaded by the first load error that cropped up. But then, in the interim I've got a lot more comfortable with modding.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23969
  • Taking a timeout
    • STFU
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #20 on: September 25, 2014, 06:46:45 AM »

How about releasing that mod then?
Logged
Don't split your mentality without thinking twice.

Koty

  • Mr. MiG
  • Modder
  • member
  • Offline Offline
  • Posts: 2274
  • It's a MiG!
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #21 on: September 25, 2014, 07:21:28 AM »

wait, ShVAK ROF 600 rpm?! it was around 2500 or so :D :D :D If you don't like the frequency, look for the B-20 cannon.
EDIT: Only 800, well :D
Logged
If I don't have to do it, I won't. If I have to do it, I'll make it quick.

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23969
  • Taking a timeout
    • STFU
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #22 on: September 25, 2014, 07:36:15 AM »

ShVAK ROF 600 rpm?! it was around 2500 or so
Sources for this or you're just another one kidding around in this thread.
EDIT: Well, got it yourself :P
Logged
Don't split your mentality without thinking twice.

SAS~Malone

  • flying as #46 with the FAC
  • Editor
  • member
  • Offline Offline
  • Posts: 14562
  • proud member of that 'other' site
Re: 20mm ShVAK Cannon Tracer Rate
« Reply #23 on: September 25, 2014, 10:37:11 AM »

lols :D
Logged
.....taking fun seriously since 1968.....  8)
Pages: 1 [2] 3   Go Up
 

Page created in 0.033 seconds with 24 queries.