Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Accuracy fixes #3559

Closed
wzdev-ci opened this issue Jun 21, 2012 · 30 comments
Closed

Accuracy fixes #3559

wzdev-ci opened this issue Jun 21, 2012 · 30 comments

Comments

@wzdev-ci
Copy link
Contributor

keyword_accuracy keyword_miss resolution_fixed type_patch (an actual patch, not a request for one) | by Iluvalar


Fix : Game engine stop trying to "miss" through the target. In a 90° arc behind.

Fix : Game engine stop trying to "miss" inside the hitbox.

Improvement/Realism : Missed shots distance vary, in respect with range, weapon accuracy and the random seed. More misses will fall closer to the target. (no more fixed misses circles looking odd around the target).

see : https://github.com/Iluvalar/warzone2100/commits/3.1-accuracy


Issue migrated from trac:3559 at 2022-04-16 09:54:14 -0700

@wzdev-ci
Copy link
Contributor Author

Safety0ff edited the issue description

@wzdev-ci
Copy link
Contributor Author

Safety0ff commented


See the comment I added on github.

Also the code isn't self explanatory, so please add comments.

@wzdev-ci
Copy link
Contributor Author

Iluvalar commented


Done.

Again thx for the help on IRC.

@wzdev-ci
Copy link
Contributor Author

Staff commented


Check the style guide, and rebase your work to squash your commits, then finally, make patch serial, and attach it.

@wzdev-ci
Copy link
Contributor Author

anonymous@... commented


The patch doesn't make any sense. WTF is this shit?!

@wzdev-ci
Copy link
Contributor Author

Iluvalar uploaded file 0001-improve-misses-mechanism.patch (4.1 KiB)

Is that right ?

@wzdev-ci
Copy link
Contributor Author

vexed commented


That is a patch serial, yes.

@wzdev-ci
Copy link
Contributor Author

truthful_one@... commented


This is a completely twisted and nonsensical approach to weapon accuracy, this patch will never get accept as is.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jun 25, 2012

Iluvalar commented


Replying to Warzone2100/old-trac-import#3559 (comment:6):

This is a completely twisted and nonsensical approach to weapon accuracy, this patch will never get accept as is.
Sorry but, it's the twisted and nonsensical approach we always had in the game since the beginning. I would even say in the gameS. In real life, the accuracy and the range are strongly correlated. So until you come with a good idea on how to remove the range from the game. We gonna stick with the system we always had and I'm just fixing an obvious error in it.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 4, 2012

vexed commented


This would seem to change balance in a rather big way.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 5, 2012

Iluvalar changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 5, 2012

Iluvalar commented


Replying to Warzone2100/old-trac-import#3559 (comment:8):

This would seem to change balance in a rather big way.

hmm, between 3% to 20% accuracy change in a non-continuous manner. Which can be serious yes. But please, note that this is a bug caused by the watermelon projectiles changes. It was not there in 2.3 where most of our stats files and balance come from.

It's a FIX that should be made in 3.1 as well.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 5, 2012

vexed commented


Replying to Warzone2100/old-trac-import#3559 (comment:9):

Replying to Warzone2100/old-trac-import#3559 (comment:8):

This would seem to change balance in a rather big way.

hmm, between 3% to 20% accuracy change in a non-continuous manner. Which can be serious yes. But please, note that this is a bug caused by the watermelon projectiles changes. It was not there in 2.3 where most of our stats files and balance come from.

It's a FIX that should be made in 3.1 as well.

Ever heard of the phrase that the cure is worse than the disease ?

There is no way we can redo all balance in time before the RC build.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 5, 2012

Iluvalar commented


Replying to Warzone2100/old-trac-import#3559 (comment:10):

Ever heard of the phrase that the cure is worse than the disease ?

There is no way we can redo all balance in time before the RC build.

That's exactly my tought as well. Except NoQ's last balance proposal was fixing things that were already there in 2.3 a long time ago. He had reason to assume how the accuracy was wrong and how to fix it. We still have a balance that is mostly 2.3 compatible and this fix is bringing the accuracy to what it has always been.

It is a fix, not an improvement proposal !

@wzdev-ci
Copy link
Contributor Author

Iluvalar commented


Just in case you missed me. I repeat it's a BUG. It can turn a 70% accuracy into 100%. Having an unwanted effect as strong as the weapon modifiers. It must be fixed.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 1, 2012

Stratadrake commented


Having heard Illuvalar's description in the forums I agree this indeed looks like a BUG.

In detail:

  • When a weapon fires, WZ uses a virtual diceroll (based on modified weapon accuracy) to decide in advance whether this projectile should be hit or miss.
  • The actual hit or miss is determined not by the diceroll but by a hitbox collision test. If it visibly "hits" the target it's a hit. If it visibly "misses" it's a miss.
  • Hits are always aimed precisely at the expected target position (includes leading a moving target). In most cases this means they will actually hit - that is what we want.
  • Misses are given a random deviation from the expected target position, e.g. a random distance <= (100% - accuracy).

The flaws:

  • Misses can still be targetted inside the expected hitbox; if so, they will visibly "hit" the target and be ruled a hit.
  • Misses can also be targetted "behind" the expected hitbox; if so, they will "hit" the hitbox en route, thus be ruled a hit.
  • If the target hitbox is larger than the given shot deviation, ALL misses will land inside the hitbox and score a hit, meaning the weapon always hits target regardless of its intended accuracy.

For example, if I'm using a weapon with 50% accuracy, then we know that half of all shots have a 100% chance to precisely hit the target. The other half may land up to 50 distance units (about 1/3 sq.) from the target. Sounds good on paper, right? Except that if the target has a radius of 25 distance units, about 50% of misses will accidentally land inside its hitbox and "hit" the target. If the target has a radius 50 or greater, 100% of misses will accidentally land inside its hitbox and still "hit".

If all this is correct, this is indeed a bug because it artificially inflates weapon accuracy over the stated values, even though it is not necessarily gamebreaking.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 2, 2012

steve commented


Replying to Warzone2100/old-trac-import#3559 (comment:12):

Just in case you missed me. I repeat it's a BUG. It can turn a 70% accuracy into 100%. Having an unwanted effect as strong as the weapon modifiers. It must be fixed.

It looks fine (i.e. "realistic and playable enough") to me that a weapon with x% accuracy will land x% of the shots where supposed and actually hit the target, and that a very large target might still be hit by a large fraction of the deviating shots. Moreover, "miss" shots behind the target should not be a problem for those indirect weapons, where shots behind the target are also misses regarding collision tests.

Suggestions:

  • dismiss fix that makes dice-roll misses always land outside hit box (a machine gunner right in front of a building should have no trouble hitting it even without accuracy upgrades)
  • accept a fix that stops engine trying to miss "behind the target" for direct weapons
  • accept a fix that makes dice-roll misses cluster near aim with a scatter that depends on distance (one that makes both closer and bigger targets easier to hit with direct weapons)

Better alternatives probably require a mayor change of the range-accuracy mechanics. Balance could be regained by tuning base accuracy, miss scatter, rof, etc.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 2, 2012

Stratadrake changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 2, 2012

Stratadrake commented


I agree that forcing a (direct-fire) miss to land "right" or "left" of the hitbox may create extreme scatter if the target is large (or close) enough. However there is always the possibility of the shot coming up short of the target...

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 8, 2012

Iluvalar commented


You are missing an important point Steve. It's not a nice progressive function that make bigger target easier to hit like you seem to expect. It's just an ugly abrupt bug that suddenly and -for what we care- randomly give an 100% accuracy to weapons that had previously 70% with another similar body.

I'm open for hopeless discussion about how we could make the accuracy affected by target size, but what I'm fixing now is just a plain bug.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 8, 2012

steve@... commented


Yes, the current behavior is really bad. That is why I suggested accepting part of your proposed solution, which should suffice to fix the bug for now.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 9, 2012

Stratadrake commented


I did some testing with a simple weapons mod, here are my results:

  • A weapon with a rated accuracy of 50% and zero upgrades successfully damaged Mantis and Python chassis about 75% of the time (50% of misses) -- equivalent to a +50% accuracy upgrade.
  • Rated accuracy of 75% successfully damaged Mantis and Python chassis almost 100% of the time - effectively never missed.
  • Rated accuracy of 70% also successfully damaged Mantis and Python near 100% of the time, but Viper only 90% of the time (80% of misses).

So yes this is a bug in the current behavior that causes weapons to be noticeably more powerful than they should be, however unlike Iluvular says I am not seeing unit size make a significant difference, only base accuracy.

I agree with steve though that the simplest fix is to make the "scatter" deviation vary proportionally with actual range to target. Instead of scatter being some X distance across all ranges, make it be some (X * range) distance. The only question is what's a good proportion....

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 6, 2012

Stratadrake commented


I have a proposal for a simpler, alternate fix:

Do not attempt to "force" a hit to hit or a miss to miss. Instead, only make sure that a "hit" actually strikes the target hitbox. All projectiles still explode on the first thing they physically contact, but only a "hit" will inflict full damage - a "miss" cannot (no exceptions), though it can still inflict a blast radius or incendiaries if the weapon has them.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 9, 2014

iluvalar commented


Sorry but when do you guys plan to fix that game breaking bug already ?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 10, 2014

crab_ commented


Replying to Warzone2100/old-trac-import#3559 (comment:20):

Sorry but when do you guys plan to fix that game breaking bug already ?

Hello Iluvalar.
Is this patch made for Master version (3.2) or you insist on applying this patch to 3.1 (3.1.2?) ?

Current balance tuned to current wrong accuracy algorithm.
Changing accuracy will change the balance in some unpredictable way. I just want to know what we should do to keep game balanced.

@wzdev-ci
Copy link
Contributor Author

iluvalar changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

iluvalar commented


Hello Crab. Can't stress that too much, the current 3.1 accuracy and the master accuracy system are both IMPOSSIBLE to balance. In 3.1 weapons that should improve from say 55 to 60% accuracy suddenly jump at 100% accuracy. The threshold vary with different targets and range but most weapons meet the criteria at some point during the game. So it's a random increase of 66% of their dps. There is no way to balance that.

Only the very last patch you made with NoQ was 3.1 specific. The previous was from observation still valid in 2.3. And that patch was somewhat conservative so it wouldn't be a big issue to either maintain it and fix at the next balance or else revert that single last balance change.

I'm unsure what is the state of accuracy in master, but it most likely require such patch as well. Of course it's a 2 yo patch now. So someone will have to read it and apply it correctly. But it's just a few small code change.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 5, 2019

Berserk Cyborg changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 5, 2019

Berserk Cyborg changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 5, 2019

Berserk Cyborg commented


Fixed in 44eb5e4201ba5fd63d1286bc0ea5a59030d1ec2b.

@wzdev-ci wzdev-ci closed this as completed Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant