Range vs Accuracy: Let's improve it.

Ideas and suggestions for how to improve the Warzone 2100 base game only. Ideas for mods go in Mapping/Modding instead. Read sticky posts first!
User avatar
Stratadrake
Trained
Trained
Posts: 197
Joined: 07 Sep 2008, 09:43
Location: Pacific NW
Contact:

Range vs Accuracy: Let's improve it.

Post by Stratadrake » 07 Jul 2012, 07:22

...by which I don't mean changing how the game calculates a "hit" or "miss" - WZ has always used a virtual dice-roll to determine whether a projectile will damage the target; a simple and efficient abstraction that has served its role well not only in videogames, but pen and paper too.

I mean the method by which WZ actually determines the base chance-to-hit when a weapon fires. In the current branch base accuracy is decided by one rule:

- If the target is closer than the weapon's Short range, Short accuracy is used. If it's farther away, Long accuracy is used.

This is the part we should change.

For example, let me contrive a hypothetical weapon with these properties:
- Minimum range: 1.0s
- Short range: 3.0s, 100% accuracy
- Long range: 5.0s, 1% accuracy

This means that I can be certain to hit a target at 2.99 squares distance, but I can't hit the broad side of a barn from even 3.01 squares. Why (besides the fact that I designed this weapon to do this) should a barely-perceptible difference in range make a night-and-day difference in whether I can hit the target?

Rather, base accuracy of an attack should be calculated as some interpolation between Short and Long accuracies, depending on the exact range to target.

For example, again using my same contrived weapon. At minimum range (1.0s) it has 100% accuracy; at maximum (5.0s) it has only 1%. At any range inbetween, the accuracy is a linear interpolation between those two values, meaning that at any given range, my effective accuracy is:

1.0s - 100%
2.0s - 75%
3.0s - 50%
4.0s - 25%
5.0s - 1%

There is no sudden change in accuracy rate depending on where my unit falls within weapon range. The closer I get to the target the better my accuracy is; the farther away I am, the less chance I have to actually hit it.

Of course, as a side effect this would probably require tweaking the accuracies of most existing weapons to compensate for the fact that targetting enemies from Long range would see a net increase in accuracy. But that's a small price that is easily fixable, IMO.
Strata @dA, @FAC

Searge-Major
Trained
Trained
Posts: 182
Joined: 10 Sep 2011, 03:36
Location: Great Southern region, Western Australia

Re: Range vs Accuracy: Let's improve it.

Post by Searge-Major » 07 Jul 2012, 08:10

:oops: I had always assumed that your suggestion was how WZ actually calculated accuracy...

My very bad. :| Nothing else to say, except... I hope this does make it into Warzone2100.

Regards, Searge
I fully realise my input is just another drop in the proverbial bucket. It is my goal to make each drop count.

User avatar
Giani
Regular
Regular
Posts: 804
Joined: 23 Aug 2011, 22:42
Location: Argentina

Re: Range vs Accuracy: Let's improve it.

Post by Giani » 07 Jul 2012, 16:04

Nice idea, but won't the flamers get OP if I am 5 tiles away from the target and have 1% chances to hit?
And what about increasing the chances to hit the target if it is a base structure?
My maps: http://forums.wz2100.net/viewtopic.php?f=10&t=9501

User avatar
Stratadrake
Trained
Trained
Posts: 197
Joined: 07 Sep 2008, 09:43
Location: Pacific NW
Contact:

Re: Range vs Accuracy: Let's improve it.

Post by Stratadrake » 07 Jul 2012, 17:34

It's interesting you should mention flamers, because the range/accuracy on the basic Flamer is 90% at 2 squares, 40% at 3. So any and everything that is even slightly more than 2.00 sq distance gets 40%.
And what about increasing the chances to hit the target if it is a base structure?
Realistically speaking the relative sizes between unit/target should also have some effect on accuracy, but let's tackle one thing at a time.
Strata @dA, @FAC

User avatar
Iluvalar
Regular
Regular
Posts: 1803
Joined: 02 Oct 2010, 18:44

Re: Range vs Accuracy: Let's improve it.

Post by Iluvalar » 07 Jul 2012, 18:35

Stratadrake wrote:But that's a small price that is easily fixable, IMO.
With less opinion and more maths, you would know that it is nearly impossible and certainly not something you could call "warzone2100" at the end.

First thing first, a real realistic angular distribution of the bullet would not make the accuracy drop in a linear fashion ! At twice the distance, the target look 4 time smaller. So your solution would not even look "real" at the end.

Next, whatever the function we chose, it would lead to the same result : Most weapon would refuse to shoot at very bad accuracy <15% because they have a reload time to take into account. Everybody would cry if their lancers was shooting at max range with 1% hit chance. As an immediate result, the ROF, the range and the accuracy will glue together in much more a single stat. With some silly side effect like the machine gun having the highest range now because they don't have ammo nor reload time.

It will require you to reduce the ROF of the machine gun to fit their actual range. At the end, if you want the game balanced, unless you have a solution that is yet to tell us, the dps of all weapons of the same kind of range will be equal. And assault gun and a medium cannon will look the same.

Because we will lose all the control over the big blob (rof = acc = range) we will also lose the control on the brutality of the weapon. Which will ultimately kill our chance to have an armor game going on.

Let's try to resume in more mathematical approach.
In real life :
( (ROF/ ammo COST$)(aka accuracy) x range) = X
where X can be anything. But in a game, where we aim at a mixed strategy equilibrium (balance), That X must be a constant C instead. Since there is no ammo cost in wz, the formula become this :
(ROF x range) = C
And so, if we want to keep control of the range, we'll lose any control on the ROF of the weapons.

So I guess, yes, it's easy to fix as long as you don't mind not having ROF anymore...
Heretic 2.3 improver and proud of it.

User avatar
Kih-ap-hiih
Trained
Trained
Posts: 45
Joined: 02 May 2010, 18:00

Re: Range vs Accuracy: Let's improve it.

Post by Kih-ap-hiih » 07 Jul 2012, 19:19

I cant read last post.

But if you wish to get more accuracy, you must get some experienced units. :o

Edited: Have read it, but reserved this post.
-
-
So you think Rockies can hit the target!
Experienced units that you can still control, can do more damages, than new units. :lecture:

User avatar
Stratadrake
Trained
Trained
Posts: 197
Joined: 07 Sep 2008, 09:43
Location: Pacific NW
Contact:

Re: Range vs Accuracy: Let's improve it.

Post by Stratadrake » 07 Jul 2012, 23:19

Illuvalar, I posed a contrived example for one purpose and one purpose only - to show where the abrupt, bipolar short/long range distinction fails to be logical; we can replace it with a new system that makes more (if not perfect) logical sense AND is just as easy to compute internally as the current system.

When I suggested "tweaking weapon accuracy values" in no way am I suggesting that my contrived example should be the template for all Warzone weapons to follow - Hellstorm no.

Since you mentioned Lancers, let's take them. Their stats are:
- Minimum range: 1s
- Short range: 4s, 30% accuracy
- Long range: 9s, 60%

Lancers are more accurate at long range than short - we'll be keeping them that way, just changing the nuances. Here's a quick Excel chart to show how:
Lancer_accuracy_proposal.png
Explanation follows.
Lancer_accuracy_proposal.png (14.01 KiB) Viewed 3791 times
Red is their current behavior in WZ - less than 4 squares you get 30% accuracy, more than 4 sq you get 60%. Notice the very sudden jump at precisely 4.0 squares.

Now blue is my accuracy proposal - the effective accuracy is calculated using an interpolation between the weapon's Short and Long accuracies. With the blue line, at 4.0sq your Lancer rockets hit about 40% of the time (regardless of whether they're on the near or far side of 4sq). At 6sq, accuracy is 50%. And so on. But this introduces a problem: Everything in the "Short" range (1~4 squares) now gets up to a 10% accuracy boost, while everything in "Long" range (4-9 squares) gets up to a 20% accuracy drop. And since Lancers are best suited to longer range, this is a problem.

This is where tweaking a weapon's base accuracies comes into play: Purple shows the accuracy graph with Lancers changed from 30/60 accuracy to 20/75. Now their average accuracy (statistical mean) over the "Short" (1-4) and "Long" (4-9) ranges about matches the current values. Yes, they do differ at the extremes, but the overall difference is less one-sided.
Strata @dA, @FAC

User avatar
C27
Rookie
Rookie
Posts: 27
Joined: 18 Jun 2012, 21:24

Re: Range vs Accuracy: Let's improve it.

Post by C27 » 08 Jul 2012, 00:02

Not that my opinion matters, but the purple graph proposal looks good to me as a linear best-fit. Since things would average out to the same general accuracy, it's not really going to break anything. (Lancers would be slightly stronger at absolute maximum range, but if you can hold absolute maximum range with them all the time you'll probably win anyway. It's not so easy in a real game.)

User avatar
Iluvalar
Regular
Regular
Posts: 1803
Joined: 02 Oct 2010, 18:44

Re: Range vs Accuracy: Let's improve it.

Post by Iluvalar » 08 Jul 2012, 03:49

What about the purple line but that cap to min 30% and max 60% ? I believe it would not upset any balance.
Heretic 2.3 improver and proud of it.

User avatar
Stratadrake
Trained
Trained
Posts: 197
Joined: 07 Sep 2008, 09:43
Location: Pacific NW
Contact:

Re: Range vs Accuracy: Let's improve it.

Post by Stratadrake » 08 Jul 2012, 05:13

You mean something more like a cubic interpolation instead of linear? That's a little more complicated because a weapon's "Short range" spec does not necessarily fall evenly between minimum and maximum ranges.
Strata @dA, @FAC

User avatar
Iluvalar
Regular
Regular
Posts: 1803
Joined: 02 Oct 2010, 18:44

Re: Range vs Accuracy: Let's improve it.

Post by Iluvalar » 08 Jul 2012, 06:35

min(60, max(30, purple line) )
Heretic 2.3 improver and proud of it.

User avatar
Giani
Regular
Regular
Posts: 804
Joined: 23 Aug 2011, 22:42
Location: Argentina

Re: Range vs Accuracy: Let's improve it.

Post by Giani » 08 Jul 2012, 16:55

Stratadrake wrote: ...
1.0s - 100%
2.0s - 75%
3.0s - 50%
4.0s - 25%
5.0s - 1%
...
1.0 is 1 tile? 2? :hmm:
My maps: http://forums.wz2100.net/viewtopic.php?f=10&t=9501

User avatar
Stratadrake
Trained
Trained
Posts: 197
Joined: 07 Sep 2008, 09:43
Location: Pacific NW
Contact:

Re: Range vs Accuracy: Let's improve it.

Post by Stratadrake » 08 Jul 2012, 19:37

Yes, that example was measured in map-squares/tiles.
min(60, max(30, purple line) )
Oh yes, a piecewise function. HOWEVER, if we've changed the Lancer's base accuracy to 20/75, where do these values of "30" and "60" come from?
Strata @dA, @FAC

Searge-Major
Trained
Trained
Posts: 182
Joined: 10 Sep 2011, 03:36
Location: Great Southern region, Western Australia

Re: Range vs Accuracy: Let's improve it.

Post by Searge-Major » 09 Jul 2012, 03:55

I think that was what Iluvalar meant, don't change the accuracy values at all... just use the interpolation and the min and max values to replace the current system. :hmm:

Regards, Searge
I fully realise my input is just another drop in the proverbial bucket. It is my goal to make each drop count.

User avatar
Iluvalar
Regular
Regular
Posts: 1803
Joined: 02 Oct 2010, 18:44

Re: Range vs Accuracy: Let's improve it.

Post by Iluvalar » 09 Jul 2012, 06:20

I meant :

if (range<short range/2){ accuracy=shortRangeAcc;}
elseif (range>longrange-short range/2){ accuracy=longRangeAcc;}
else{ interpolate between the points... }

Maybe i'll need a graph...
Heretic 2.3 improver and proud of it.

Post Reply