Author Topic: Alien Reactions: can I limit how many time units they can spend?  (Read 4827 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Alien Reactions: can I limit how many time units they can spend?
« on: December 09, 2015, 05:10:22 am »
Current way reactions work: the reacting unit makes a calculation based on its own reactions (reduced according to remaining time units) against the reactions of the moving unit (reduced according to the moving unit's remaining time units). If the reacting unit gets a high enough die roll after adjusting for everybody's reactions and time units, it will react.

What happens after that is that the reacting unit will always select a snap shot, but can continue making snap shots until it runs out of time units or the unit it is reacting to is dead.


--------------------------------------------------------------------------------

What I want to happen: when the reacting unit makes a reaction shot, it re-calculates its remaining time units and re-rolls the die before making a second reaction shot. As it now has fewer time units remaining, it will have a smaller chance of reacting.

This will make it possible for a unit with a high reactions attribute to make a "safe shot" with a fast-firing weapon, and spend very few time units in order to potentially hit an enemy unit such that the enemy won't be able to react with more than one shot since the moving unit's reactions and remaining time unit composite will be too high for the reacting unit's remaining time units and reaction score composite to be able to fire again after the first shot. It'll make it so that aliens won't fire three shots at you as soon as they see you, unless you have low time units and/or reactions.

Can this be done?

edit: This is how the game is already. It doesn't seem like it because the aliens have obscenely high reactions.
« Last Edit: July 26, 2017, 12:00:46 am by The Reaver of Darkness »

Online Dioxine

  • Commander
  • *****
  • Posts: 5418
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Alien Reactions: can I limit how many time units they can spend?
« Reply #1 on: December 09, 2015, 07:27:31 am »
I think what's you're proposing is how the reactions actually already work in OXC... I shoot him, he shoots back, I shoot him again, he shoots back... Three consecutive reaction shots only happen if my reactions*TUs are low, and especially when I'm taking the out-of-LOS penalty; you get a huge penalty to your Reaction calc if you're facing away from the enemy.

You must be quite new to the game if you haven't encountered such situations, with enemies only reacting partially to a fast attack made by a high-Reactions soldier. Or even not answering at all, unless you shoot again. Also there is no roll, the reaction calc has no random element to it.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Alien Reactions: can I limit how many time units they can spend?
« Reply #2 on: December 09, 2015, 11:21:42 am »
You must be quite new to the game if you haven't encountered such situations,
That's not very nice. It's not always easy to decompile the game's code in my head just by playing it. Sure I've encountered situations in which an alien doesn't shoot off all its time units in reaction fire, and I've encountered situations in which they do. There appeared to be no concise pattern determining how it happened, so I assumed it was random.

It is possible that the direction my soldier was facing had something to do with it, I never even thought of that.

If getting shot at several times happens from having the unit facing away, then I might want to adjust the reactions penalty for that. It seems anachronistic when a unit can fire off several shots, using nearly all of its time units in the span of time of which another unit uses only 10% of its time units. Better yet, I'd like a way to prevent reaction fire regardless of reaction score if your time units are too low compared to the unit you're trying to react to.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Alien Reactions: can I limit how many time units they can spend?
« Reply #3 on: December 09, 2015, 05:35:19 pm »
We like to think there's many random rolls when we can't figure out the pattern, but reactions is one of those things that are absolutely not random.

The UFOpedia has a good article which details how reaction fire works. It's a good place to learn instead of trying to rediscover the mechanics. As far as I can tell, it already works as well as it can and is a great system to make a turn based game more dynamic.

The instances of enemies shooting many times at you probably occurred on very low reactions soldiers. 95% (from having spent 4 of 80 TUs by taking one step) of 10 reactions, still means a "reaction score" of merely 9 (integer math round down). In XCOM the aliens have really high reactions (to compensate for the AI not using squad tactics) and can shoot at you with a reaction score of 11 from, say, 20% TUs left with reactions 55, meaning they will have no TUs left after shooting. Or if they had 100% and that was your first step off the skyranger, they'll shoot many times.

It's annoying, but it "works as intended". I was toying with the idea of making snap shots half as accurate, but half as expensive, to try to reduce the number of hits from them as a compensation. Some things (cyberdiscs on higher difficulties) have almost 100% to hit with a snapshot and it becomes ridiculous.

Online Dioxine

  • Commander
  • *****
  • Posts: 5418
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Alien Reactions: can I limit how many time units they can spend?
« Reply #4 on: December 09, 2015, 06:33:04 pm »
It seems anachronistic when a unit can fire off several shots, using nearly all of its time units in the span of time of which another unit uses only 10% of its time units. Better yet, I'd like a way to prevent reaction fire regardless of reaction score if your time units are too low compared to the unit you're trying to react to.

If it's anachronistic, then 1990s were smarter than modern times. If you want to prevent reaction fire, stay in cover or shoot from beyond enemy's LoS. That simple. Also I don't advise decompling digital codes in your head. This is bad for your mental health, and I know what I'm talking about, being a sociologist. Better learn how C works and read the code directly from Git Hub (the devs will help, if you're nice to them), or, second best, there is very extensive documentation where Arthanor linked.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Alien Reactions: can I limit how many time units they can spend?
« Reply #5 on: December 09, 2015, 07:04:12 pm »
Learning the code is not that easy. UFOpaedia is a lot more readable!

And further response to the quote Dioxine responded to: How is it worst for an enemy unit to spend all their TUs in the time it took you to spend10% of yours, than it is for your soldier to spend 100% of their TUs without the enemy being able to take (more than) a shot?

It's a turn based game, so it always will be weird (you walked all the way there and shot 15 times without me getting to do anything!) but at least the reaction mechanic actually allows the other side to do a little bit of something. Try an actual turn based game where you move/shoot/attack with all your units before the other player gets to do anything. That's a lot worst than reactions!
« Last Edit: December 10, 2015, 05:50:17 pm by Arthanor »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Alien Reactions: can I limit how many time units they can spend?
« Reply #6 on: December 10, 2015, 11:28:43 am »
You might be right. It is possible that I was seeing aliens seemingly fail to react when they appeared to have a clear shot, when they didn't actually have a good shot due to terrain line of sight bugs. Then perhaps moving the unit just a bit and suddenly incurring 2-3 reaction shots was a product of the vast initiative score difference which I did not realize was the case, due to the previous move which made it appear the alien's initiative was lower.

It's hard to say how often such terrain bugs could have tricked me in such a way, but in a test just now I saw it happen with a guy stepping down the ramp. First step, looks like the alien has a perfect shot, but it doesn't shoot. Step off the ramp, he shoots twice. My usual understanding of that is that reactions are random and/or anachronistic, but maybe the truth is that line of sight issues were fooling me all along.

Well that makes me happy. Perhaps reactions already work the way I wanted them to.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Alien Reactions: can I limit how many time units they can spend?
« Reply #7 on: December 10, 2015, 11:48:53 pm »
adjust their aggression values. that dictates how much they reserve.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Alien Reactions: can I limit how many time units they can spend?
« Reply #8 on: December 11, 2015, 08:54:34 am »
Ooh neat, thanks!