A possible new accuracy system

The place to discuss balance changes for future versions of the game.
(Master releases & 3.X)
Post Reply
User avatar
alfred007
Regular
Regular
Posts: 619
Joined: 31 Jul 2016, 06:25
Location: Stuttgart, Germany

A possible new accuracy system

Post by alfred007 »

5 years ago a poll took place to decide what accuracy system should be used and an intense discussion ensued. The current accuracy system calculates the hit chance independent from the distance to the target. Although I know that I perhaps open Pandora's box, I want to introduce a system where the hit chance depends on the distance to the target.

So what I'm thinking about is a calculation like this:

hitChance(%) = 100 - resultMissChance(%)
resultMissChance = Distance in tiles x baseMissChance(%) x accuracy bonuses

An example for a baseMissChance of 2.5 and no bonuses

Distance hitChance
1 tile 97.5 %
2 tiles 95 %
10 tiles 75 %

To include accuracy bonuses for the player and the target
resultMissChance = Distance in tiles x baseMissChance x (1 - experience accuracy bonus to the weapon type(%)/100 + experience accuracy bonus dodge of target(%)/100) x (1 - accuracy upgrade of the attacker(%)/100)

An example for a hero unit with one accuracy upgrade shooting at a veteran unit in a distance of 10 tiles and a baseMissChance as above
resultMissChance = 10 x 2.5 x (1 - 0.4 + 0.25) x 0.9 = 10 x 2.5 x 0.85 x 0.9 = 19.1
The hitChance for a distance of 10 tiles would thereby increase from 75 % to 80.9 %

baseMissChance can replace longHit in the weapons.json file and thereby the accuracy of every weapon can be set individually. A baseMissChance of 2.5 can be set for direct firing weapons like cannons. For indirect firing weapons the value would be of course lower. E.g. for mortars 1.0 so that the hitChance for a shoot over 18 tiles would be 82 % and for Ripple Rockets e.g. to 0.3 so that the hitChance for a shoot over 80 tiles would be 76 %.

These changes could have a noticeable effect to the balance of the game. Therefore this idea should be soonest implemented to a master version after the next release so that it can be extensivly tested before implementation, if it ever get implemented into a release.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: A possible new accuracy system

Post by NoQ »

Five years? %$#@. I'm old :(

A short tl;dr of the previous thread. Changing miss radius depending on various values is realistic and attractive, but bad for gameplay and screws up multiplayer balance. Such values may be accuracy upgrades or distances. Let's suppose we're within current game rules rather than the ones you proposed because i almost wrote this reply in the other thread :? Then the formula still stands:
  • The chance to hit a non-moving spherical target with a missed shot would be (2/π) arccos (r/R), where R is the miss radius and r is target radius, assuming R > r (otherwise the chance is 100%)
This would be realistic but terrible from gameplay perspective. Battles would be won or lost for no obvious reason and experienced players would subconsciously position their armies at certain distances but will be unable to explain why.

Suppose we have three accuracy upgrades: the first upgrade decreases the miss radius from 1.2r to 1.1r, the second upgrade decreases the miss radius from 1.1r to 1.0r, the third upgrade decreases the miss radius from 1.0r to 0.9r. Let's calculate chance-to-hit-with-missed-shots before the upgrades, with one upgrade, with two upgrades, with two upgrades. The answers are: 63%, 73%, 100%, 100%. So it turns out that while we tried to increase accuracy smoothly, the second upgrade had 3x larger effect than the first one, and the third one was entirely useless. Suppose that after these three upgrades the accuracy stat settles at 75% (not sure if this corresponds to any sensible body size that can be computed from our assumptions). Then the actual chance to hit - not only with missed shots, but also with accurate shots that always hit our non-moving target - is going to be 86%, 91%, 100%, 100%. Which still makes the second upgrade demonstrate 2x larger effect than the first one. If we replace 75% final accuracy stat with 50%, the numbers are going to be 78%, 85%, 100% - still roughly the same spike in efficiency for the second upgrade.

That's it for numbers. What does it mean in practice? It means that the player would have to pay attention to the accuracy spike for his and his opponent's weapons, depending on body sizes. If it's just the upgrades, players are going to be paying more attention to upgrades, which is probably not that bad. If the miss radius depends on distance, then it becomes worse, because players would try to position their army within the accuracy spike range and outside of the opponent's accuracy spike range. If the current combat gameplay is usually "let's just attack-move my army forward", with accuracy depending on distance people will be hunting invisible imba ranges.

Not only these effects are making balance harder by screwing up the impact of accuracy in different situations and giving us a weird spiky curve instead of a smooth progression depending on body sizes, but also these effects are completely invisible, which would make people think that they win or lose battles randomly for no apparent reason.

Is all of this terrible for gameplay? I'm not quite sure. Accuracy is not directly proportional to damage but has a milder effect because if you miss the primary target you'll likely hit a nearby target. But in Warzone only full kills do any sort of actual damage (damaged-but-not-killed units would just return for free repair) and DPS of weapons is often low, which means that it is normal for the whole army to try to focus down a single tank and struggle with killing it before it turns around and retreats for repair. In these circumstances your full kill output is indeed directly proportional to accuracy, and all these effects start to matter.

I think that introducing accuracy upgrades that affect miss radius should be fine if they are tightly coupled with body sizes. Eg., there are always four upgrades with all the same accuracy values for all weapons that have accuracy upgrades at all, and each upgrade makes the weapon 100%-hit a smaller body size (Python, Cobra, Viper, Cyborg). In this case spikes will be still there and can be exploited, but at least they'll be understandable and intentionally delivered to the player. This might be good for body size balance.

I think that introducing miss radius depending on distance is bad. Spikes in efficiency that can be exploited by putting your army into an invisible zone that mutates continuously as you change and upgrade your weapons does not quite constitute "Strategy by Design" to me.

For indirect-fire weapons the formula above doesn't hold, and additionally the miss radius will most likely be intended to be larger than the tank most of the time, so i have no opinion on that.

It is probably important to point out that the opinion i'm presenting here was first introduced and defended by Iluvalar in the poll thread and earlier, and had an important consequence for him because accuracy spikes prevented him from preserving his NRS mod, which is an incredible attempt at auto-balancing the game with math. Accuracy spikes ruined all the math and made the system too complicated to tackle and not necessarily converging, so any attempts to resurrect this epic mod on 3.x releases are pointless: balance is impossible to achieve, even if we had access to Iluvalar's scripts he used for generating stats. The base game would probably tolerate these accuracy spikes much easier simply because it's already screwed up in many other places (eg., weird tech tree), so we'll have to seek manual testing-based balancing, in which we will have a long way to go. But with distances it's definitely quite unpleasant.
nick87720z
Trained
Trained
Posts: 130
Joined: 25 Feb 2014, 16:37

Re: A possible new accuracy system

Post by nick87720z »

I would note, it looks rather unrealistic if accuracy decreases linearly. With above system (-2.5% per tile) it means that target would be just unhittable - it just can't be so. In real life accuracy depends rather on what part of FOV target covers, and it should decrease to logarithmic scale. On other side - it is even simpler: dispersions's original definition is angle. Adapting for game, it could be just linearly depend on distance, so final chance to hit could be like this:

Lets define weaponDispersion, pilotDispersion;
First depends on weapon parameters and is affected by research;
Second one is defined solely by unit's pilot experience;
Both are multipliers, used to be applied to distance;

I'm not sure, what are exact values to be better for balance, so just assumption:
weaponDispersion = 0.02
pilotDispersion = 0.03

totalDispertion = pilotDispersion/expAccBonus + weaponDispersion/sysAccBonus;
absDispertion = totalDispertion * distance;
changeToHit = (absDispertion-targetsize)/absDispertion = 1-targetsize/absDispertion
if changeToMiss < 0: changeToHit = 0;
Those, who sacrifice culture for bit of freedom don't diserve any.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: A possible new accuracy system

Post by NoQ »

With above system (-2.5% per tile) it means that target would be just unhittable
This is incorrect because the shot that rolled a miss can still hit the target with positive probability because hitting the target is physics-based.

Realism-wise i'd rather imagine that this linear decrease is a property of a tank's targeting computer. At a certain distance it is completely unable to "lock on" to the target. But the tank can still shoot manually or speculatively.
nick87720z
Trained
Trained
Posts: 130
Joined: 25 Feb 2014, 16:37

Re: A possible new accuracy system

Post by nick87720z »

Hm, than i probably misunderstood meaning of above discussed accuracy property, whose change was proposed by topic starter. I supposed, that it affects actual accuracy of launched shots, not some simulated targeting system, if any (just got idea - what if it showes chance to hit in tooltip, like in ufo-ai...). Of course i know, for example, that shots actually travel a little farther than specified by weapon's range property - this makes some "change to not waste" shot.
Those, who sacrifice culture for bit of freedom don't diserve any.
User avatar
Iluvalar
Regular
Regular
Posts: 1828
Joined: 02 Oct 2010, 18:44

Re: A possible new accuracy system

Post by Iluvalar »

NoQ wrote: 15 Oct 2018, 01:18 I think that introducing miss radius depending on distance is bad. Spikes in efficiency that can be exploited by putting your army into an invisible zone that mutates continuously as you change and upgrade your weapons does not quite constitute "Strategy by Design" to me.
Mmhmm, there would be a sweat spot for the distance that one of the 2 player could abuse. And would vary according to the accuracy of both weapons and the size of both bodies. Similar to how a sub-machine gun player wouldn't want to stay in the long range of a assault riffle in a FPS. it would play on a small area, not even a tile wide and wouldn't be subtle. An advantage of 20-25% dps to the player who is in advantage. Would require everyone to learn a 4dimentionnal table. And keeping your units between 6.15 and 6.45 tile of the enemy OR losing the game doesn't appeal for an RTS.
NoQ wrote: 15 Oct 2018, 01:18 It is probably important to point out that the opinion i'm presenting here was first introduced and defended by Iluvalar in the poll thread and earlier, and had an important consequence for him because accuracy spikes prevented him from preserving his NRS mod, which is an incredible attempt at auto-balancing the game with math.
It's not only NRS, it's because the armor is subtracting in the game. So damage is a very poor balance lever... All left realistically is ROF and accuracy. If we need to FIX the accuracy via stats, this mean that we'll need to do all the balancing via ROF and only ROF. We'd lose the designer freedom that goes with it... . In other word, the machine gun, the cannon and the tank killer missile would have the same ROF (or at least a ROF that we couldnt control intentionnaly).

Before the accuracy bug get tackled, we'll have a huge tech tree, but in reality only 2-3 choices across the whole game. Depending on the map size and setting. And maybe a dozen of other choices that are not objectively bad enough to be noticeably bad but still kinda bad and unbalanced.
Heretic 2.3 improver and proud of it.
nick87720z
Trained
Trained
Posts: 130
Joined: 25 Feb 2014, 16:37

Re: A possible new accuracy system

Post by nick87720z »

Fixing some rude miswritings and mistakes in my first post:

totalDispertion = pilotDispersion/expAccBonus + weaponDispersion;
absDispertion = totalDispertion * distance;
chanceToHit = targetsize / absDispertion;

(in my first reply I confused chance to hit with chance to miss, and sysAccBonus - can't remember, from what it is, besides that it could be affected by body/propulsion combo, what is just unimplemented)
Those, who sacrifice culture for bit of freedom don't diserve any.
Post Reply