project-navigation
Personal tools

Author Topic: How much Reaction Fire?  (Read 15096 times)

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: How much Reaction Fire?
« Reply #15 on: May 25, 2012, 12:28:14 pm »
let's clarify something... if an alien spends 8 tu's to walk right in front of your soldier who has a 9tu reaction fire mode set, there will be no reaction fire because 8<9. Then if the alien sits on it's hands for the remaining 20 tu's that it had but didn't use, your guy won't take the reaction shot because the alien in front of him wasn't doing anything?
As far as I understand it, that is correct.

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: How much Reaction Fire?
« Reply #16 on: May 25, 2012, 11:09:04 pm »
There are two major problems with RF:
#1: TUs for a shot comprise raising, aiming, triggering (==0) and reloading.
Of course this can be *very* different for different weapons. Think assault gun vs. RL. Those differences are NOT defined in the weapon scripts.
#2: oc aiming at a door where we expect an alien to come out would require almost 0 TUs to RF.
But what if the alien steps out of *another* door that is still in the viewing range of the shooter ??

Maybe someone should resurrect Yatta's ideas of weapon mobility an survey points...

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: How much Reaction Fire?
« Reply #17 on: May 25, 2012, 11:36:50 pm »
Maybe someone should resurrect Yatta's ideas of weapon mobility an survey points...

*glances at DarkRain* So... got any plans after finishing the wounds system?

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: How much Reaction Fire?
« Reply #18 on: May 26, 2012, 12:32:34 am »
Why, playing of course.

Wait, why are you looking at me that way...

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: How much Reaction Fire?
« Reply #19 on: May 30, 2012, 03:04:23 am »
let's clarify something... if an alien spends 8 tu's to walk right in front of your soldier who has a 9tu reaction fire mode set, there will be no reaction fire because 8<9. Then if the alien sits on it's hands for the remaining 20 tu's that it had but didn't use, your guy won't take the reaction shot because the alien in front of him wasn't doing anything?

1. in 2.4 and current 2.5dev: yes.
2. *Very* good point. Your comment helped me to finally understand what that 'resolveRF' function was good for. I agree. Gimme some time ;)

Offline Telok

  • Squad Leader
  • ****
  • Posts: 117
    • View Profile
Re: How much Reaction Fire?
« Reply #20 on: May 30, 2012, 12:03:51 pm »
Interesting note here: As far as I can tell the RF actor will only shoot at the current moving actor.

I need to test this but...
Theory: If one soldier spots an alien ready to shoot, switch to another soldier and provoke reaction fire from a safer (further away/behind cover) point. When the alien RF is exhausted switch back to the first soldier and shoot the alien.

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: How much Reaction Fire?
« Reply #21 on: May 30, 2012, 04:56:37 pm »
Interesting note here: As far as I can tell the RF actor will only shoot at the current moving actor.

I need to test this but...
Theory: If one soldier spots an alien ready to shoot, switch to another soldier and provoke reaction fire from a safer (further away/behind cover) point. When the alien RF is exhausted switch back to the first soldier and shoot the alien.

I've been trying to do this, but my experience is that they'll RF shoot other targets as well, not only the currently acting one :^/

It seems though that both need to be in it's (alien's) line of sight, the acting soldier and the RF-targeted soldier.

Offline TallTroll

  • Rookie
  • ***
  • Posts: 77
    • View Profile
Re: How much Reaction Fire?
« Reply #22 on: May 30, 2012, 05:24:45 pm »
Code: [Select]
if an alien spends 8 tu's to walk right in front of your soldier who has a 9tu reaction fire mode set, there will be no reaction fire because 8<9. Then if the alien sits on it's hands for the remaining 20 tu's that it had but didn't use, your guy won't take the reaction shot because the alien in front of him wasn't doing anything?
I'm happy with that. If an alien wants to waste 20 TU's to end up in my LOS/LOF, I vote "yes" too. An "overwatch" mode would be rather handy though. It has to have some mild penalty attached though. Maybe a small TU requirement increase, or a small accuracy penalty, becuase the actor is snatching at the shot a bit (even if the fire mode is set to Aimed)?

Offline Sandro

  • Squad Leader
  • ****
  • Posts: 240
  • Maintenance guy for UFO:AI 3D engine
    • View Profile
Re: How much Reaction Fire?
« Reply #23 on: May 30, 2012, 05:43:19 pm »
BTW, looks like current code just uses the first fitting firemode for the RF. It's very obvious with the shotgun -- single-barrel and double-barrel shots have the same TU cost, but RF is always the single-barrel.
IMHO, the firemode with the maximal delivered damage should be selected, I see no point in saving ammo in such a case.

Offline TallTroll

  • Rookie
  • ***
  • Posts: 77
    • View Profile
Re: How much Reaction Fire?
« Reply #24 on: May 30, 2012, 07:43:51 pm »
>> the firemode with the maximal delivered damage should be selected

I can think of cases where I'd want to use a cheaper fire mode. If I know there are multiple wounded aliens just around a corner for instance, I might prefer to set a snap shot, and hope for 2 kills, rather than fire 1 aimed, and definitely not be able to fire another. In general, yes, more is better, but it's nice to have options too

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: How much Reaction Fire?
« Reply #25 on: May 30, 2012, 11:49:30 pm »
Current code should select lowest TU firemode by default, but you can choose which firemode to use in reaction. I'm almost certain I've witnessed this in action in 2.5, or else my sniper got very lucky with a snap shot.

Offline Telok

  • Squad Leader
  • ****
  • Posts: 117
    • View Profile
Re: How much Reaction Fire?
« Reply #26 on: May 31, 2012, 11:54:50 am »
I've been trying to do this, but my experience is that they'll RF shoot other targets as well, not only the currently acting one :^/

It seems though that both need to be in it's (alien's) line of sight, the acting soldier and the RF-targeted soldier.

Then someone needs to check the player side code, because our soldiers don't RF anything but the current actor regardless of range or vision. I have seen several maps where soldiers shoot past immobile aliens towards the current actor. That's where my theory came from.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: How much Reaction Fire?
« Reply #27 on: May 31, 2012, 01:02:48 pm »
Then someone needs to check the player side code, because our soldiers don't RF anything but the current actor regardless of range or vision. I have seen several maps where soldiers shoot past immobile aliens towards the current actor. That's where my theory came from.

I believe what you describe is the intended implementation in aDuke's reaction fire model for 2.4. This was one of the things he changed, so people could have memories of it working differently.

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: How much Reaction Fire?
« Reply #28 on: May 31, 2012, 01:16:25 pm »
Then someone needs to check the player side code, because our soldiers don't RF anything but the current actor regardless of range or vision. I have seen several maps where soldiers shoot past immobile aliens towards the current actor. That's where my theory came from.

I was referring to aliens shooting at the player's soldiers. AI-controlled alien RF works different from player's soldiers RF?

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: How much Reaction Fire?
« Reply #29 on: May 31, 2012, 01:53:17 pm »
AI-controlled alien RF works different from player's soldiers RF?

I don't believe so. aDuke will have to speak up if I'm wrong.