aliens

Author Topic: Aiming algorithm  (Read 18260 times)

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: Aiming algorithm
« Reply #30 on: March 04, 2015, 11:52:25 am »
robin,
- start vanilla game.
- get to the situation with target behind the cover.
- make a save.
- make at least 50 trials of aim shots to find the actual vanilla hit chance.
- copy saves to openxcom. enabke save scumming.
- use import vanilla save and test 50 trials.
- compare results.

you will be surprised how oxc far from vanilla. i'm just making hit ratio adjusted to vanilla 

Offline hellrazor

  • Commander
  • *****
  • Posts: 1953
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Aiming algorithm
« Reply #31 on: March 04, 2015, 12:07:27 pm »
It should be logical that a unit shooting on another unit should target the visible part of it.
This means if the target is in the open priority targer area woukd usually be the chest or head.
if the unit is in cover, but visible partially, aiming should be centered on the visible parts.
This only changes the aiming focus of a shot on the visible parts of the enemy.

Since aiming at a enemy (and priorize visible parts), then shooting and actually hitting it, are two different things. Shooting the enemy will trigger the normal chance to hit calculation, but its aiming focus is now on the visible parts of the enemy and not the probably not visible center of the unit.

Result would be less "no line of fire" errors.
This does not effect your chance to hit, your shot could still stray and hit the enemys covers destroy it or miss completly.
Would this be what you wanted to explain to them volutar?

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: Aiming algorithm
« Reply #32 on: March 04, 2015, 12:36:52 pm »
no line of fire is already ok.
the matter is hitting target with chances almost 2 times less than vanilla (roof case).
in 90% of cases when you're using snap and auto it will cause almost same result. in case of aim shot it wont cause too much of ridiculous misses due to obstacles, which are OpenXcom specific and not common for vanilla.

Offline hellrazor

  • Commander
  • *****
  • Posts: 1953
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Aiming algorithm
« Reply #33 on: March 04, 2015, 12:50:12 pm »
no line of fire is already ok.
the matter is hitting target with chances almost 2 times less than vanilla (roof case).
in 90% of cases when  you're using snap and auto it will cause almost same result. in case of aim shot it wont cause too much of ridiculous misses due to obstacles, which are OpenXcom specific and not common for vanilla.

Enemy on the roof of a building i guess you mean. And yes if there is a way tomake this more vanila like do it.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2490
  • XCom Armoury Quartermaster
    • View Profile
Re: Aiming algorithm
« Reply #34 on: March 04, 2015, 04:05:34 pm »
You know what, I have agreed with this change from the beginning, with one caveat. Getting that caveat across must be too complicated. And OXC's aim at being vanilla (which I very much like, don't misread me) probably interferes with my intereset in cover any ways.

To take a last shot at it (HA!):
Spoiler:
This does not effect your chance to hit, your shot could still stray and hit the enemys covers destroy it or miss completly.

The problem is that a "stray shot" hitting cover is not a great way to represent cover. Turning a miss into a miss is really not changing anything.

The % of shots that are "stray shot that happen to hit target" and could then be affected by the target being behind cover is such a minimal fraction of total shots that it's not really work speaking about. Say you have 70% to hit, probably 28% to hit anywhere but the target on a miss, so 2% "stray shots" on target, 1% shots blocked by cover from being half obscured. So being in half cover gives you a 1% extra chance of not being hit? Cover is irrelevant.

The current situation has bad target placement which results in obstacles taking away hits. It makes cover more relevant because now cover takes away from hits. (missing half of the 70% of hits as above is a significant gain in survivability for being in half cover!)

Before anyone explodes: Yes, I agree, it is a bad mechanic that creates stupid situations probably more often than good ones. The problem (for some of us) is that fixing it reduces the value of cover unless something else is done to compensate. But it seems like vanilla has no cover either, so the outcome is clear: OpenXCom is like vanilla, aiming should be like volutar proposed and we won't be playing with cover (something I find sad in a tactical game, but that's how XCom is).

Offline hellrazor

  • Commander
  • *****
  • Posts: 1953
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Aiming algorithm
« Reply #35 on: March 06, 2015, 01:59:16 pm »
The problem is that a "stray shot" hitting cover is not a great way to represent cover. Turning a miss into a miss is really not changing anything.
It is a wonderful way to represent cover. It even has some catch of reality to it.
The % of shots that are "stray shot that happen to hit target" and could then be affected by the target being behind cover is such a minimal fraction of total shots that it's not really work speaking about. Say you have 70% to hit, probably 28% to hit anywhere but the target on a miss, so 2% "stray shots" on target, 1% shots blocked by cover from being half obscured. So being in half cover gives you a 1% extra chance of not being hit? Cover is irrelevant.
It is not. Cover has one main function it limits visibility (either completly or partially) the area on which you can be hit is smaller if you are behind cover (because the cover is in the line of fire and would be hit first).

The current situation has bad target placement which results in obstacles taking away hits.

Why? obviously this needs adjustment, but wouldn't make cover obsolete.

It makes cover more relevant because now cover takes away from hits. (missing half of the 70% of hits as above is a significant gain in survivability for being in half cover!)
Cover is in the line of fire so it will be hit anyway. Were is your fucking Problem?

Before anyone explodes: Yes, I agree, it is a bad mechanic that creates stupid situations probably more often than good ones. The problem (for some of us) is that fixing it reduces the value of cover unless something else is done to compensate. But it seems like vanilla has no cover either, so the outcome is clear: OpenXCom is like vanilla, aiming should be like volutar proposed and we won't be playing with cover (something I find sad in a tactical game, but that's how XCom is).

We always played with cover, i guess you didn't grasped how it works even in vanilla.

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: Aiming algorithm
« Reply #36 on: March 06, 2015, 05:34:56 pm »
Uh.. There's no "Cover concept" in Gollops' x-com universe. There was cover concept in Laser Squad, but not later. Solomon's x-com made cover concept into account and made it one of key features. It makes whole tactics totally different.
X-Com is not about covering and avoiding shots by some ruse. Aliens can't even kneel. It's about suffering and getting shots in the head even through 2 windows (not quite a real life situation). Adding gamey feature from xcom2012 heavily alters xcom tactics. Though it is possible to make "cover" concept (decreasing hit ratio by obstruction percentage), but it have to be _optional_, not default.
But before making it optional, this targeting should be at least taken under control, while currently it's just "how it goes", and not really vanillish. Which apparently is not good.

Offline kikimoristan

  • Commander
  • *****
  • Posts: 649
    • View Profile
Re: Aiming algorithm
« Reply #37 on: March 06, 2015, 06:39:09 pm »
Uh.. There's no "Cover concept" in Gollops' x-com universe. There was cover concept in Laser Squad, but not later. Solomon's x-com made cover concept into account and made it one of key features. It makes whole tactics totally different.
X-Com is not about covering and avoiding shots by some ruse. Aliens can't even kneel. It's about suffering and getting shots in the head even through 2 windows (not quite a real life situation). Adding gamey feature from xcom2012 heavily alters xcom tactics. Though it is possible to make "cover" concept (decreasing hit ratio by obstruction percentage), but it have to be _optional_, not default.
But before making it optional, this targeting should be at least taken under control, while currently it's just "how it goes", and not really vanillish. Which apparently is not good.

i kinda like the idea of reducing damage based on cover %  optional advanced setting . how would you implement that?

instead of making firing more accurate you make the opposite...firing goes trough tranasparent cover with reduced damage if is a sure shot ???

Offline hellrazor

  • Commander
  • *****
  • Posts: 1953
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Aiming algorithm
« Reply #38 on: March 06, 2015, 07:39:20 pm »
Uh.. There's no "Cover concept" in Gollops' x-com universe. There was cover concept in Laser Squad, but not later. Solomon's x-com made cover concept into account and made it one of key features. It makes whole tactics totally different.
X-Com is not about covering and avoiding shots by some ruse. Aliens can't even kneel. It's about suffering and getting shots in the head even through 2 windows (not quite a real life situation). Adding gamey feature from xcom2012 heavily alters xcom tactics. Though it is possible to make "cover" concept (decreasing hit ratio by obstruction percentage), but it have to be _optional_, not default.
But before making it optional, this targeting should be at least taken under control, while currently it's just "how it goes", and not really vanillish. Which apparently is not good.

So there was not really an intregration of it but the battlescape mechanics provided us with something like it. That's at least my understanding.

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: Aiming algorithm
« Reply #39 on: March 06, 2015, 07:50:21 pm »
i kinda like the idea of reducing damage based on cover %  optional advanced setting . how would you implement that?
No. It's about lowering chances to hit. Damage reduction is not the subject.

Offline kikimoristan

  • Commander
  • *****
  • Posts: 649
    • View Profile
Re: Aiming algorithm
« Reply #40 on: March 06, 2015, 07:56:58 pm »
sorry yes. you're right. lowering chances to hit. rather than using magic where it hits or it doesn't hit cause of aiming how about if anything is partially visible shot always hits but at a reduced % based on how much is visible or something like that. optional advanced setting!

so i guess you can hit targets behind walls as well, on rooves(roofs), behind windows or other portholes etc. if target is 0% visible then this is not applied.
« Last Edit: March 06, 2015, 07:59:59 pm by tollworkout »

Offline Arthanor

  • Commander
  • *****
  • Posts: 2490
  • XCom Armoury Quartermaster
    • View Profile
Re: Aiming algorithm
« Reply #41 on: March 07, 2015, 06:10:59 pm »
It is a wonderful way to represent cover. It even has some catch of reality to it.It is not. Cover has one main function it limits visibility (either completly or partially) the area on which you can be hit is smaller if you are behind cover (because the cover is in the line of fire and would be hit first).

Why? obviously this needs adjustment, but wouldn't make cover obsolete.
Cover is in the line of fire so it will be hit anyway. Were is your fucking Problem?

We always played with cover, i guess you didn't grasped how it works even in vanilla.
Since you replied in such a heated way...

I don't think you understood what I am speaking of. Volutar described a situation where, with his fix, a unit mostly obstructed and one that is mostly visible will be hit with the same likelihood because of proper placement of the target and a small deviation of hits which does not overlap with the obstacle.

Prior to his fix, the obstructed unit would be hit less than the mostly unobstructed one, but for the wrong reason: The target was not properly placed. This is cover by obstacle in the line of fire because the line of fire is not well placed. With the fix, as volutar said: You won't be able to hide behind gear or around corners. There is now less cover by obstacle in line of fire, because the line of fire is placed properly and intersects more rarely with obstacles.

One way of making cover more relevant again is to increase the deviation on hits (the highlighted ellipse in volutar's picture), so that obstacles are again in the line of fire and corners/fences/low walls could provide some form of protection by being in the line of fire instead of the situation where proper target placement and narrow deviation keep the line of fire free of obstacles.

Any ways, I have been agreeing with volutar's proposed change for target placement since the beginning, just worried about its implications. I'm done with this now, we'll see what the consequences are once it is implemented...

Offline kikimoristan

  • Commander
  • *****
  • Posts: 649
    • View Profile
Re: Aiming algorithm
« Reply #42 on: March 07, 2015, 06:57:08 pm »
ok this is my 2 cents for what is worth i think he should go ahead with his idea but make it an optional setting?? you guys gotta make pace just saying. that way everyone is happy.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2490
  • XCom Armoury Quartermaster
    • View Profile
Re: Aiming algorithm
« Reply #43 on: March 07, 2015, 07:18:03 pm »
I don't think it should be optional, volutar's target placement is clearly superior to the current way of doing things. (And I've mentioned that in every post I've written I think?).

What should be optional (or variable as a setting) is the spread of a successful shot (the highlighted ellipse on volutar's picture), so people can play with varying accuracies (and thus more or less cover, depending on what they prefer). But that's for later.

Offline kikimoristan

  • Commander
  • *****
  • Posts: 649
    • View Profile
Re: Aiming algorithm
« Reply #44 on: March 07, 2015, 07:32:04 pm »
yeah i guess volutars system is implemented but it has a number that reflects the "vanillaness" of aiming. 0 = vanilla ....max number is full volutar . maybe the number is the "deviation" from centre .

Aiming Spread: 0
This changes the way aiming is calculated. Higher numbers reflect deviation from center making cover less and less effective. Default Xcom is always dead center (0).

So max number is based on that 12 x 5 LOF system. Maybe max number is 12? Or maybe max number is an abstraction of an oval shape meaning at 0 is dead centre, at 1 then 2 top/bottom 1 side, ....

this spread system can also be added to the weapons as a
  WeaponSpread: 4 < or even AimingSpread: or ShotSpread: etc.

 but it uses same mechanic to randomize the shot instead of deviate it from the center

this would be useful for shotguns machine guns lmg and can make some weapons more or less effective at  long range . i dunno.
« Last Edit: March 07, 2015, 07:46:46 pm by tollworkout »