Author Topic: Is maximum range even a sensible attribute within current ranged weapons system?  (Read 2406 times)

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3839
    • View Profile
Are you saying that we actually do several rolls for accuracy and they each have enough weight to decide whether something is a hit or a miss?
Do we just start at 0 and add all the rolls, are some rolls potentially negative, or what?

There are 4 rolls, each of which is non-negative. They are added up to form final dispersion roll.
It's basically like this:
Code: [Select]
roll = rng(0, recoil) + rng(0, max(0, 100 * (10 - skill))) + rng(0, gun_dispersion) + rng(0, driving_recoil)
Final dispersion roll is how much you missed, in minutes of degree.

Offline Weyrling

  • Survivor
  • ***
  • Posts: 534
    • View Profile
There are 4 rolls, each of which is non-negative. They are added up to form final dispersion roll.
It's basically like this:
Code: [Select]
roll = rng(0, recoil) + rng(0, max(0, 100 * (10 - skill))) + rng(0, gun_dispersion) + rng(0, driving_recoil)
Final dispersion roll is how much you missed, in minutes of degree.
Yeah that explains the ridiculous accuracy system.

I'm no authority or anything but I'd probably change all of those values into -1* to 1* and then throw an abs(roll) onto it.
This wouldn't change the absolute best/worst rolls, but it would make the averages a lot more plausible and the extremes less common.

I mean, it's entirely possible that you miss but your bullet veers towards the target regardless, though recoil makes sense as being all bad, so you could just add that on at the end.

Offline Tamior

  • Zombie Food
  • *
  • Posts: 95
    • View Profile

There are 4 rolls, each of which is non-negative. They are added up to form final dispersion roll.
It's basically like this:
Code: [Select]
roll = rng(0, recoil) + rng(0, max(0, 100 * (10 - skill))) + rng(0, gun_dispersion) + rng(0, driving_recoil)
Final dispersion roll is how much you missed, in minutes of degree.
So for a weapon with no recoil (e.g. bow or pneumatic stuff) if you skill is above 10 and you are not driving the only roll is  rng(0, gun_dispersion) ?
So what exactly constituted gun_dispersion?
And how aiming for longer helps to reduce the result?

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3839
    • View Profile
I think it was like that at one point.
Then it got improved by changing it to a single normal roll on the sum instead of sum of rolls. That was a really good system.

Then it got all reverted into the system where pistol-whipping is more effective than pistol-firing, unless you're a master gunman and have replaced half of your pistol with custom mods.

So for a weapon with no recoil (e.g. bow or pneumatic stuff) if you skill is above 10 and you are not driving the only roll is  rng(0, gun_dispersion) ?
So what exactly constituted gun_dispersion?
And how aiming for longer helps to reduce the result?

Recoil is "lack of aim". Internally, aiming simply reduces recoil. Walking around sets your recoil to a specific value.
Gun dispersion is sum of the shown dispersion for gun, dispersion for ammo, and 60 dispersion for every tick of damage of the gun (accurized is -1, meaning it's -60 dispersion, brand new is 0 etc.). They are all caped at 0, so you can't compensate for bad ammo with good gun.
To reduce recoil to 0, you need to aim with a good scope or have high perception and aim with mediocre scope.

Offline Tamior

  • Zombie Food
  • *
  • Posts: 95
    • View Profile
Recoil is "lack of aim". Internally, aiming simply reduces recoil. Walking around sets your recoil to a specific value.
Is that default-value-after-motion weapon-specific?

Offline Kevin Granade

  • Administrator
  • Survivor
  • *****
  • Posts: 5588
  • I code dead people.
    • View Profile
I'm no authority or anything but I'd probably change all of those values into -1* to 1* and then throw an abs(roll) onto it.
This wouldn't change the absolute best/worst rolls, but it would make the averages a lot more plausible and the extremes less common.

I mean, it's entirely possible that you miss but your bullet veers towards the target regardless, though recoil makes sense as being all bad, so you could just add that on at the end.
That only makes sense if you're adding 2D vectors, in 1D it's way too likely to just always have your errors cancel out and accuracy is totally dominated by luck.  It's possible to switch it to vector summation, but that isn't going to fix anything about ranged balance, its just another system.

EDIT: multi-reply
Then it got improved by changing it to a single normal roll on the sum instead of sum of rolls. That was a really good system.
NO. IT. WAS. NOT.  That system literally threw away important data about dispersion in the name of "making it easier to understand", while doing nothing of the sort.  It simply threw all sources of inaccuracy into a bucket and then massaged them to get a result that vaguely resembled the output you were looking for, but mostly ignored the inputs.  Additionally, any theoretical gains from "simplifying" the distribution were negated by an over-complicated and self-referential system for setting maximum effective gun ranges that was riddled with bugs and oversights, and didn't actually verify anything important about accuracy.

The sum-of-errors system can be improved by:
Switching to a 2D vector of errors instead of magnitudes. (this will also improve things by modeling rounds going into the ground or over targets heads)
 Biasing error vectors in some characteristic way (largest example is recoil vectors being up and to the side, not in an arbitrary direction).
Adjusting magnitude of contributing errors to bias the resulting distribution.

The "throw the error sources in a bucket and treat it like an arbitrary distribution" system is a dead end, you can't do anything meaningful with it except force the distribution to be what you want it to be, becuse you've thrown any additional inputs that you could use away.

Then it got all reverted into the system where pistol-whipping is more effective than pistol-firing, unless you're a master gunman and have replaced half of your pistol with custom mods.
The problem with accuracy stems from the fact that dispite my repeated demands to establish some kind of baseline accuracy tests (as a prerequisite for overhauling how dispersion worked), mugling instead decided to add a bunch of code to the game to output graphs to convince themselves that the accuracy numbers at one specific point in time were good, and then YOU, Coolthulu decided to just merge the bullshit changes instead of holding them to that requirement.
« Last Edit: July 09, 2017, 10:20:08 PM by Kevin Granade »
Its like a fun family cookout, except your family is burning in flames while trying to eat you. -secretfire
I'm more excited than a survivor on meth and toast'ems. -Nighthawk
The the giant wasp is slammed through the zombie brute!

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3839
    • View Profile
Is that default-value-after-motion weapon-specific?

No, hardcoded. It may appear per-weapon due to stability display differing per-weapon, but it is constant.
Changing that wouldn't help, though.

That only makes sense if you're adding 2D vectors, in 1D it's way too likely to just always have your errors cancel out and accuracy is totally dominated by luck.  It's possible to switch it to vector summation, but that isn't going to fix anything about ranged balance, its just another system.

Actually, it would fix the balance. Not as well as what we had pre-revert, but sum of zero mean variables has noticeably less weighting towards the middle of the distribution and is significantly less affected by the lowest value. Both of which are giant problems in the current version.

Also reminder that the realism/sense/whatever is not a sum of components.
If all the components locally look perfectly good, but add up to a mess where you need to be a master gunner to put down shambling, mindless, human-like beings with a glock that IRL wrecks running, intelligent, humans, the inclusion of those components was an error and certainly not something that makes sense.
Greedy design < lesser evils

Offline Alec White

  • NPC
  • **
  • Posts: 215
  • I'm shy
    • View Profile
Greedy design < lesser evils

I thought that was the reason for the regression to the current state.

Offline Weyrling

  • Survivor
  • ***
  • Posts: 534
    • View Profile
I'm no authority or anything but I'd probably change all of those values into -1* to 1* and then throw an abs(roll) onto it.
This wouldn't change the absolute best/worst rolls, but it would make the averages a lot more plausible and the extremes less common.

I mean, it's entirely possible that you miss but your bullet veers towards the target regardless, though recoil makes sense as being all bad, so you could just add that on at the end.
That only makes sense if you're adding 2D vectors, in 1D it's way too likely to just always have your errors cancel out and accuracy is totally dominated by luck.  It's possible to switch it to vector summation, but that isn't going to fix anything about ranged balance, its just another system.
At lower levels accuracy is already dominated by luck, if any part of that formula is bad for you then your odds are worse than flipping a coin.

Having errors capable of canceling out other errors was my entire point.
This was specifically to lower the potential shittiness of any given random value, which it would do.

If you put recoil outside the positive-to-negative ranges and just add it to the absolute value then it maintains recoil as the most important thing for a player to keep track of while everything else is still relevant.

Also I guess starting at "assume a perfect shot and then ruin it via random rolls" seems really weird to me, seeing as how that kind of system explicitly makes everything dominated by luck and further makes any single problem explode into ruining a shot completely.

Offline Tamior

  • Zombie Food
  • *
  • Posts: 95
    • View Profile
No, hardcoded. It may appear per-weapon due to stability display differing per-weapon, but it is constant.
Changing that wouldn't help, though.

Yes, figured as much myself, just wanted to double-check.

At any rate, what is our goal here? To include projectile speed reduction over distance into AIMING system, or to simply modify damage over distance as a result of projectile speed reduction?

If the latter, why not just assign every weapon an "optimal" range in stead of max range, and make it so that for ranges above optimal damage is reduced by 50% for every extra optimal range increment?
E.i. something like
final damage = (whatever damage would have been normally)*min(1,exp(ln(2)*(optimal_range-current_range)/optimal_range))


Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3839
    • View Profile
Damage reduction over distance would be bunch of extra complexity with little gain.
Aiming scaling depending on distance would be better. Could even allow some weapons to only get full accuracy at certain distance, to make sniper rifles sniper-y.

Offline Tamior

  • Zombie Food
  • *
  • Posts: 95
    • View Profile
Damage reduction over distance would be bunch of extra complexity with little gain.
Aiming scaling depending on distance would be better. Could even allow some weapons to only get full accuracy at certain distance, to make sniper rifles sniper-y.
So it's ok that you would be able (if unlikely) to score a full-damage headshot with a shotgun at 50+ tiles of range?

Offline tarburst98

  • NPC
  • **
  • Posts: 213
    • View Profile
yes, but it would be just that, incredibly unlikely. each weapon in that idea would have a 'sweet spot' of range that has much better accuracy then others. in this case a shotgun's sweet spot would be short-medium, while a handgun would be just short,  assault rifles would be medium, and snipers would be long.

Offline Tamior

  • Zombie Food
  • *
  • Posts: 95
    • View Profile
yes, but it would be just that, incredibly unlikely. each weapon in that idea would have a 'sweet spot' of range that has much better accuracy then others. in this case a shotgun's sweet spot would be short-medium, while a handgun would be just short,  assault rifles would be medium, and snipers would be long.
From what I can tell, it would not work that way per se.
It's just that you would be able to hit things up-close with handgun/shotgun without spending time to aim, while for a sniper rifle you would have to aim for a few turns to hit things even up close.

Offline Mantar

  • NPC
  • **
  • Posts: 120
  • NOMAD
    • View Profile
Anyone who tried to work out a single size always ended up trying to handwave very hard to fix and horrible problems such as single tile creatures, reality bubble having to have limited size, screen display having to have limited size and supporting weaker computers and so on.

So you're saying that people have tried before and run away screaming, that talk ain't shit, and that if I think it's so easy I ought to quit with the useless suggestion thing, roll up my sleeves and try to figure it out myself?
 Yeah, that's fair.  ;D I might take a whack at it some day, but for now I think I'll take your word that it's a dead end and just leave it be.

establish some kind of baseline accuracy tests (as a prerequisite for overhauling how dispersion worked)

What kind of testing were you looking for precisely? Because that sounds like it might be a useful angle of attack to me.