Warframe

Warframe

View Stats:
Malidictus Sep 10, 2018 @ 5:23am
How are accuracy and stability calculated?
This is a pretty dry mechanics question, but something I find curious in pretty much every shooter I play. How do shot deviation and shot recoil work? The Wiki has some answers, but they're very general and lacking in detail, without providing a good idea of how the final results are actually calculated. And before you ask - no, this isn't a matter of min/maxing. I'm just interested in game mechanics, is all.

Accuracy

According to the Wiki, the first shot from all weapons is pinpoint-accurate. Every follow-up shot has a chance to deviate from centre-reticle, determined by the weapon's accuracy. The accuracy stat goes from 0 to 100, with 100 being perfect accuracy on every shot and 0 being ???

OK, but how are these calculated? What does 50 accuracy represent, for instance, other than "more than 40?" What probability does that create for a follow-up shot to deviate? Does accuracy control the extent of deviation? Would a 50-accuracy weapon deviate by a larger offset per shot than a 70-accuacy weapon? How does this deviation decay when the weapon stops firing? Does the offset interpolate as it decreases, or does it stay at its current maximum value and reset to 0 after a certain time? Does higher accuracy make shot deviation reset faster?

Basically, I'm curious about the formula being used to calculate the offset of each individual shot. Since the Wiki doesn't have it, I suspect it might not be known to players, but it doesn't hurt to ask.

Recoil

The Wiki is very vague about this. With every shot, the player's reticle is shifted off-target and higher recoil values cause a greater shift. Fair enough, but there are a few extra factors.

How is recoil per shot calculated? Is it radial (pick a direction, pick an offset amount) or carthesian (offset horzotnally, offset vertically)? Is recoil centred with all directions being equally weighted, or do weapons "pull" in a particular direction? Does recoil pattern (where it pulls to, if any) differ between weapons? What are the values for recoil - minimum and maximum? What do mimumum and maximum recoil even mean. I assume minimum would be no recoil, but what about maximum?

Again, I'm curious how this is calculated, and if we even have a means of knowing this.

---

I come from a background of games where these kinds of behind-the-scenes mechanics are well-documented and the way in which each developer implements them are fascinating to pore through. I hope Warframe's mechanics are similarly exposed, because I'm genuinely curious to see how they work.
< >
Showing 1-6 of 6 comments
[R] Nerva Sep 10, 2018 @ 6:35am 
Accuracy: The correct answer here is "it varies by weapon."

No seriously. Just about every weapon in the game calculates shot deviation using the accuracy value, but does so differently. You can see this with the Accuracy penalty of Heavy Caliber. Slow projectile weapons and continuous-beam weapons are notorious for how severely they're affected by these mods. Many of them boast 100 accuracy scores until a Heavy Caliber goes into them, and then they drop to about 3. What's this do to the weapon? Often wild, 45-degree variances in shot direction. With hitscan weapons, Heavy Caliber typically results in a mild loss of accuracy, only noticeable at sniping ranges. Put Heavy Caliber in a Braton Prime, and it'll still function for most of the purposes you'd typically use a Braton Prime for, you're just not going to be hitting guys across the two-ramp room in Grineer Galleons anymore.


Recoil: Recoil generally indicates the number of degrees your aim is shifted off center when you fire, and your time to auto-recenter can usually be calculated based off that number. As for the direction your aim is shifted, that's weapon-specific. Some weapons have upward recoil some downward, and a few have random recoil that can go either way on repeated shots. It's not straight up or down either; there's a small lateral shift that can occur as well. On rapid-fire weapons firing full-auto, there's a general point where your weapon is forbidden from shifting further up or down; when you hit this point the game stops generating vertical recoil shift and increases lateral to compensate.

Sorry that the game's not specific enough about accuracy and recoil mechanics. One of the ideas of Warframe is that you're supposed to figure out your weapons through actual combat trials, and decide for yourself whether or not you like the weapon, can fix what you don't like about it with modding, or that it's not worth fixing via modding. That's one of the things the process of Mastering weapons by taking them to max rank is supposed to encourage.
Malidictus Sep 10, 2018 @ 8:19am 
On Accuracy:

Hmm... Are you sure that's due to how accuracy is calculated and not something specific to how it applies to certain types of weapons? I know shotguns have their own approach towards calculating multishot percentage (normalising it based on bellet count). Could projectile weapons maybe handle their accuracy differently?

Could also be that weapons have "hidden" shot deviation stats that accuracy modifies, too. Payday 2 was notorious for having hidden bullet spread values per weapon with the Accuracy stat modifying post-factum. I'm curious if Warframe has something like that.

On Recoil:

Oh, right, I neglected to mention self-centring recoil. Does the rate of recoil re-centre depend on Recoil? I would assume not, but you never know. Also, do you know if self-centring has any kind of delay once you stop shooting? I've not noticed my aim trying to re-centre WHILE I'm shooting, but I tend to use fast-firing weapons so I might have missed it.

As to recoil vertical limits, ugh... So another game which has those, eh? Again, Payday 2 has the same issue, which I think is there to prevent violent recoil snap-back if your gun manages to recoil too far in one direction before self-centring kicks in. I'm genuinely not sure why video games keep relying on self-centring recoil, to be honest. It sort of takes the marksmanship out of precision weapons and causes weird recoil snaps after long bursts. But hey, thanks for letting me know it's there regardless.

Finally, I'm a little lost on the type of recoil used here. Initially you described it as radial - just recoil in a random direction. Later on, though, you seem to be describing cartesian recoil, with separate offset along the X and Y axes. My blind guess is that the game has a "recoil profile" per weapon with a horizonal and vertical interval that it randomly picks from to apply offset. That makes it easy to "weigh" the recoil of different weapons separately by tweaking the interval average.

I've made attempts to model recoil like the above analytically, but I ran into issues of predicting standard deviation during long bursts since I just don't know what model to use.

On learning through experience:

Well, my interest here is predominantly academic. I'm interested in the systems more so than the weapons. I "collect" game mechanics as a hobby, as it's quite fascinating how differently separate developers can approach solving the same problem. That fascination dates back to City of Heroes, and all the weird ways in which Cryptic Studios approached solving MMO issues - both good and bad. My background is in mathematics and programming, so this sort of thing fascinates me :)
jonnin Sep 10, 2018 @ 6:16pm 
accuracy and precision are borked by most non-shooters (and the general population at large).
accuracy is whether the gun hits where you aim it. So if you locked the gun down unmovable (not possible in game, really) and fired it 3 times aimed at the same tiny spot, it would hit the same spot 3 times if accurate, or a little off (less accurate) or all over creation (inaccurate). The shots form a 'group' with a radius of R and that R can be said to be an inverse measure of its accuracy.

precision is whether it hits the same location every time. If you do the above test and hit 5 inches high and 3 inches left every single shot, its very precise, and not accurate (probably fixable with better scope/sights). That is, missing exactly the same way is precision.

you need both, of course (you want to hit the same spot which is where you aimed, every time) , but the game muddles this concept. Accuracy in game is an algorithm and it appears to be on a modulus. That is, an inaccurate gun will do the same thing every time but it also isnt precise... try it, shoot at a mark on a wall with a low accurcy gun. the first shot goes to location 1, shot 2 is location 2, ... location N (N seems to be about 5 but I havent tested it much) and then back to location 1 (precisely!) and location 2 ... etc.

recoil in game seems to be simpler, it appears to just (always) push the gun upwards, see dual cestra for example. But it stops after a short burst; it never goes straight up (which it will if you give a potent machine gun or magnum revolver to a novice/ weakling ). Recoil in game, unrealistically, seems to be a measure of how many units UP the gun is moved under fire ... and its a fixed distance from resting. Ideally, some guns would recoil up, and some back, and exotic concepts might be downward, and very odd concepts might be forward (some big rifles redirect the gas from the shot to somewhat cancel the recoil, as do modern full autos, and its possible to pull if the bullet mass is less than the powder mass).

Last edited by jonnin; Sep 10, 2018 @ 6:22pm
Malidictus Sep 11, 2018 @ 6:18am 
I wasn't really aiming to discuss realistic depiction of weapon-firing characteristics, though - especially in Warframe :) However, to your point - I believe video games use "accuracy" as a catch-all term for per-shot weapon handling like P&P RPGs use hit points. It doesn't model JUST the gun's ability to fire where it's aimed, but also its ability to be aimed reliably. It's why scopes in many games inprove weapon accuracy and decrease bullet spread. Attaching an ACOG to your rifle won't make the bullets come out of the barrel straighter, but it will make the character better able to aim where they intended to shoot.

In essence, where you point the mouse reticle isn't always where your character is aiming, if your character or their gun don't have very good aim. Maybe the sight is blurry or lacks magnification. Maybe the weapon is heavy to hold steady, or maybe its grips are set awkward so it's inconvenient to handle. Maybe your character just isn't a great shot or is firing from the hip. "Accuracy" is just an easy thing to model in-engine so it's used to model pretty much all aspects of aiming.

I was more curious how it works, though. Mechanically, the simplest way to model a hitscan weapon with spread is use a normal vector from the gun to where the player's reticle is pointing, then cast a new vector from the same point of origin but with a certain angle and direction from the nromal. How that angle and that direction are determined by accuracy (and whatever else) was my question. The Wiki suggests that with every shot past the first, Warframe rolls on spread. If successful, some angle of spread is chosen and the shot is fired within this cone. If unsuccessful, the shot is fired within the previous cone. My question is how Accuracy corresponds to the chance for this happening and for how much the spread bound is increased - whether that's fixed, determined per weapon or random within some bounds.

The same applies to recoil - in most games it's a simple view rotation, usually applied separately for horizontal and vertical rotation so that recoil can be "weighted," typically up and to the right though it depends. In my experience, weapons in Warframe absolutely do not all pull up. Both my Gorgon and my Soma - weapons I fire in exceedingly long bursts - have either symmetrical recoil or recoil with very wide intervals roughly centred around 0. In fact, both of them behave a lot like LMGs in Payday 2, meaning my aim "dances" every which way around what I'm trying to shoot at without giving me a consistent "pull" that I can counter with smooth mouse motions. This is distinctly opposite of how The Division handles LMG recoil, which is heavily weighted "up" and can usually be countered fairly consistently by a semi-constant downward motion with my mouse.

I understand why games hide their mechanics - it's to avoid players "playing" the spreadsheet version of the game's stats rather than experimenting. For all of its modding potential, Warframe isn't actually a terribly customisable game when it comes to mechanics. You can mostly tweak stats - damage, health, resistance, etc. Those alter the nature of encounters, but they don't significantly alter the behaviour of the systems - weapons, Warframes, etc. There ARE some mods which affect recoil and accuracy, true, but the majority of them tweak the "RPG" stats, rather than the "Shooter" stats. All the same, I'm still curious to know the mechanics :)
jonnin Sep 11, 2018 @ 4:10pm 
Would be nice to know. I am torn between what others have said, what I have seen (the repeating pattern and recoil up mechanics), and throwing in the towel and saying its coded per gun.
Malidictus Sep 12, 2018 @ 4:58am 
The recoil SYSTEM is unlikely to be coded per gun. That would be very poor programming for such a generally simple system. Unless I wildly miss my guess, I don't see how the system is anything much more complicated than a forced camera movement off-centre, followed by a forced camera movement back to the original centre, both of them with a specific speed possibly scaled to the distance of movement.

What might be coded per gun, however, is the recoil profile. I don't have any real knowledge of how it's done in Warframe, but Payday 2 simply had an array of four values, representing the bounds of vertical and horizontal recoil. an LMG might have, for instance, -0.2 / 0.8, -1 / 1.4, base. That means every shot will shift the weapon anywhere between 0.2 degrees down to 0.8 degrees up and 1 degree left to 1.4 degrees right. That means the weapon on average pulls about 0.3 degrees up and 0.2 degrees right, i.e. basically nowhere. With intervals this wide, it ends up dancing all over the place unpredictably. That's the behaviour I'm seeing from my Soma and my Gorgon in Warframe, at least in terms of mechanical muscle memory.

It's entirely possible that Warframe has some kind of system of its own, perhaps featuring progressive recoil that gets worse the longer you shoot. I know some games have the reverse - self-stabilising recoil which diminishes over longer butsts, at least for machineguns. I don't know that I can think of a game which does this, though. Most of the ones with such mechanics tend to reduce weapon spread over longer bursts, instead. I'm thinking Battlefield games and The Division.

Point being, recoil behaviour likely varies from gun to gun using hidden internal stats. For some reason, many developers are opposed to letting players make informed choices and instead require us to guess what factors determine our performance.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Sep 10, 2018 @ 5:23am
Posts: 6