Team Fortress 2

Team Fortress 2

63 ratings
[VIDEO Guide] - Guide to Ultra Rare Crits on No-crit Melees
By Dom
A VIDEO guide to explain the reported cases of melee weapons that have 'no random critical hits' randomly critting.
   
Award
Favorite
Favorited
Unfavorite
Enjoy
Would Rather Read Than Watch a Video?
Note: This is the video's script and may not be formatted well for reading.


Hey everybody Dom here. Today I’d like to talk about rare reported occurrences where weapons that can’t randomly crit have.

In Team Fortress 2 people have reported cases where melee weapons with the ‘no random critical hits’ attribute have been spotted randomly critting. Usually when a weapon is seen randomly critting when it shouldn’t be able to it’s blamed on a glitch. The logic is maybe it occurred due to the demoman’s shields, lag compensation being crit boosted unknowingly or some other unseen oddity. So what is really happening?

In the game’s code there’s a function that calculates critical hit chance for melee weapons. It’s called: CTFWeaponBaseMelee::CalcIsAttackCriticalHelper. Looking at this function may reveal something. Look at this code:

isACritical = false; if( (float)(multCritChance * 10000.0) >= (float)RandomInt(0, 9999) ) { isACritical = IsAllowedToWithdrawFromCritBucket(damageBonus); }

  • Melee weapons with the ‘no random critical hits’ attribute use a critical hit chance modifier of 0. So the part that says multCritChance is 0. 0 times 10,000 equals 0.
  • The part that says RandomInt randomly produces a value between 0 and 9,999 every time a melee weapon is swung.
  • The part in the middle of these two says ‘is greater than or equal to.’ This means that a crits will occur when the value on the left is greater than or equal to the value on the right.
  • If the value on the right rolls a 0 this restriction will be fulfilled. 0 is greater than or equal to 0. When the value on the right is 0 the weapon will criticly hit.

So the mystery is solved. Melee weapons with the ‘no random critical hits’ attribute can randomly critically hit. This just leaves the question of what’s the chance of this happening? This is very easy to solve. It happens when a 0 is rolled between 0 and 9,999. That’s effetely 1 in 10,000 values. 1 in 10,000 is exactly 0.01% chance, which is the answer.

So melee weapons that shouldn’t randomly crit have an extremely rare chance to. This is due to a bug where a ‘greater than’ should have been used but instead a ‘greater than or equal to’ was used. Value confirms this behaviour as a bug alongside the information that rapid-fire non-melee weapons like the flramthower have a similar bug and that they are working on a solution.

One final thing to note: console commands that disable random crits also disable these rare crits meaning that Team Fortress 2 competitive play is not affected by this bug.

And that just about sums up everything noteworthy. It turns out certain weapons that shouldn’t randomly crit have an extremely rare chance to randomly crit. Thanks for watching. Like if you enjoyed or learned something new and subscribe for more videos like this one. Au revoir.


Thanks for reading. Don't forget to like/fav if you did. Subscribe to me on YouTube.
15 Comments
Balding swiss subhuman Jul 14, 2016 @ 2:27pm 
Damn, that's pretty amazing there.
Thanks for the info.
twomas21 Jul 14, 2016 @ 4:04am 
Dom pounding infero ezpz
rora Jul 13, 2016 @ 9:33am 
The math is correct, I do not see the problem. I think many people are confused with the difference between percentages and ratios. It is 0.01 percent chance!
∓John "Drier" Johnson Jul 12, 2016 @ 8:54pm 
Too many numbers! DX
Dom  [author] Jul 12, 2016 @ 12:18pm 
Let's say you have 1/4 (one-fourth). We know that’s 25% but let’s get this number with math. 1 divided by 4 = 0.25. Now move it over 2 decimal places to get the percent. 25%. Perfect. Now look at 1/10,000. 1 divided by 10,000 = 0.0001. Now move it over 2 decimal places to get the percent. 0.01%.
Inferno Jul 12, 2016 @ 9:44am 
Take 1 and divide it by 10000. you get 0.0001, i did make a mistake saying it was 0.001.
Dom  [author] Jul 12, 2016 @ 8:23am 
You're incorrect. By your logic 1 in 10 = 1% of 10 and not 10% of 10.
Inferno Jul 12, 2016 @ 8:10am 
1 in 10000 is actually 0.001% because 0.01% is 1 in 1000
Rune Thief Jul 11, 2016 @ 1:49pm 
i think its 1% for unusual and a golden frying pan is a 0.1% :sticky:
Dom  [author] Jul 10, 2016 @ 1:54pm 
I remember reading it was 0.5% chance.