OpenXcom Forum

OpenXcom Forks => OXCE Suggestions NEW => OpenXcom Extended (OXCE) => OXCE Suggestions Abandoned => Topic started by: Alpha Centauri Bear on November 25, 2022, 08:08:24 am

Title: [ABANDONED] Reaction mechanics
Post by: Alpha Centauri Bear on November 25, 2022, 08:08:24 am
Abandon reason: the concept has flaws and needs more thought

Hello, fellow players and modders.

First of all, I clearly understand that redoing reaction mechanics would be pretty drastic change. I don't even hope this will be implemented but still like to open a discussion. As the last resort, I can modify it myself and propose a change in the code.

Vanilla reaction mechanics is well defined but pretty weird to say the least. It include the amount of TU left on target. Why target TU should have anything to do with reaction triggering is beyond of my imagination. When opponent enters unit visibility area with the last step spending all of their TUs - immediate reaction follows. Whereas, if we can imagine unit with 1000 TUs then it can safely enter enemy visibility area, do a break dance, then leave - nothing will happens.

I am thinking reaction time should depend on reaction stat and how long enemy is visible only.

Specifically, this is proposed formula.
Unit reaction probability = "reaction" / 100 / 8.
Enemy perform an action and is visible at the end of this action.
Dice are rolled for above reaction probability so many times as many TUs are spent in action. Reaction is triggered when first roll succeeds.
As soon as reaction is triggered, unit continues firing/stubbing until exhausted their TU or killed the enemy.

That includes all enemy actions because reaction is triggered by the time passed since enemy is first seen, not the type of actions it does.

Example.
Reaction 100. Reaction probability = 100 / 100 / 8 = 1/8.
Enemy makes one 4 TU step and is visible at the end of step.
RNG is rolled 4 times for 1/8 probability. If at least one time it succeeds, reaction fire is triggered.

Benefits
Title: Re: [SUGGESTION] Reaction mechanics
Post by: Vakrug on November 25, 2022, 11:28:40 am
Why target TU should have anything to do with reaction triggering is beyond of my imagination. When opponent enters unit visibility area with the last step spending all of their TUs - immediate reaction follows. Whereas, if we can imagine unit with 1000 TUs then it can safely enter enemy visibility area, do a break dance, then leave - nothing will happens.
This behavior quite well simulate real time action in turn based game. If a shooter reserved half of his TUs and a runner entered his sight with near 0 TUs, then this means that a shooter was standing there and was preparing for a shooting for a half of turn. If a runner enters shooter's sight with near 100% TUs, then this means that a shooter (with 50% TU) is not supposed to be where it is standing yet, so no reaction fire.

Enemy perform an action and is visible at the end of this action.
You just introduced a concept of "action" that is not present in a game and not bothered to actually describe it. And after few minutes of thinking I realized that it would be very hard and probably unintuitive to encode what "action" really is. Simple example: mind probe usage takes 50% TU, but you can't be shot while using it, so it is not supposed to be an "action".

One of the greatest thing in current reaction system is that there is no randomness. And you just introduced it.
Title: Re: [SUGGESTION] Reaction mechanics
Post by: Yankes on November 25, 2022, 11:47:28 am
Vanilla reaction mechanics is well defined but pretty weird to say the least. It include the amount of TU left on target. Why target TU should have anything to do with reaction triggering is beyond of my imagination. When opponent enters unit visibility area with the last step spending all of their TUs - immediate reaction follows. Whereas, if we can imagine unit with 1000 TUs then it can safely enter enemy visibility area, do a break dance, then leave - nothing will happens.
1000TU vs 50TU is like comparing Ferrary with walking men. You can see it but you are too slow to jump off round before it hit you.
Same with here, from observe perspective 1000TU unit literary jump from one side of room to other and is nearly impossible to aim at it.

For units with relative same amount TU this work even better, as it try recreate simultaneously movements. When one side spend 1TU other side can spend same 1TU too.


For change it self, reactions are scripted, if you really want you can try override default behavior but there are still some limitations how much you can override.
Title: Re: [SUGGESTION] Reaction mechanics
Post by: Alpha Centauri Bear on November 25, 2022, 03:14:42 pm
Thank you for response, everyone.
Now I am thinking this might not be a good proposal or it should be rethought.
Title: Re: [ABANDONED] Reaction mechanics
Post by: Abyss on December 15, 2023, 03:38:27 pm
FYI: each turn in game simulates ~6-8 seconds in real time. The ferrari example is quite right.
Title: Re: [ABANDONED] Reaction mechanics
Post by: Juku121 on December 15, 2023, 03:59:34 pm
Where did you get that number? AFAIK, there's never been any clear consensus on how long a turn is and how large a tile is. Deriving a number from one singular aspect of the game can give you anything from a few seconds to over a minute. Some old (https://www.ufopaedia.org/index.php/User_talk:Danial#Turn_Length) examples.