Author Topic: [Confirm V20] Brother doesn't want to leave after overwatch  (Read 1320 times)

ushas

  • Hero Member
  • *****
  • Posts: 661
[Confirm V20] Brother doesn't want to leave after overwatch
« on: August 24, 2017, 02:35:25 AM »
(v19, linux, church, Vi)

Problem: After incapacitating an enemy via overwatch attack (Emilia with Patriot), the game freezes.

I'm not sure how this happened, what is the cause. The overwatch triggers normally, enemy falls down, drops the bag. The top queue portraits move to the next one, but the game freezes. It seems the turn of the incapacitated enemy wasn't properly ended. See attached image and the log excerpt (the turn of the brother, no errors).

Emilia was strafing from her tile, there are more lines around that.
May or may not relate to other overwatch issues. The difference is that there isn't usually any freeze.

I will see what can do about reproducing in future. Any ideas?   
« Last Edit: August 24, 2017, 12:29:58 PM by Daithi »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1247
Re: Brother doesn't want to leave after overwatch
« Reply #1 on: August 24, 2017, 07:09:48 AM »
Will try to recreate. There's just so many code paths to handle with OW - melee, ranged, hit, miss, kill, alive, strafe - I was wondering when I'd start regretting adding it :)

Have read the log, thing that jumped out was:

Code: [Select]
CharMainScript.StartRangedAttack. Attack has succeeded. Hit miss count: 1 attack damage list: 1
CharacterMainScript.ReduceHP. Method called. is overwatch: False /is AOO: False

It's not being recognised as an overwatch attack for some reason, so the logic to resume might not be getting called.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1247
Re: Brother doesn't want to leave after overwatch
« Reply #2 on: August 24, 2017, 07:48:16 AM »
Nice, this can be recreated by killing an enemy with a ranged strafe overwatch. Will tackle this now.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1247
Re: Brother doesn't want to leave after overwatch
« Reply #3 on: August 24, 2017, 08:40:05 AM »
Have fixed this. Was passing some incorrect information to the method which handles resolving overwatch. Also added extra check to make sure enemies killed in OW are classed as not moving. Now, need to recheck all overwatch possibilities.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Brother doesn't want to leave after overwatch
« Reply #4 on: August 24, 2017, 01:14:51 PM »
Hey, great!
So going to stress more AOO from now on. Enforcing enemies flee would be handy, indeed.

There's just so many code paths to handle with OW - melee, ranged, hit, miss, kill, alive, strafe - I was wondering when I'd start regretting adding it :)
Never!

That reminds me - why can't we overwatch with trauma kits?   *Unsuspecting ally passing by... bam, healed!*
And grenades! Come on...
        ... um, pretty please? :)

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1247
Re: [Confirm V20] Brother doesn't want to leave after overwatch
« Reply #5 on: August 24, 2017, 02:00:29 PM »
Sending you psychiatrist's bill... if you think the log files are big...   :)

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Confirm V20] Brother doesn't want to leave after overwatch
« Reply #6 on: August 25, 2017, 11:26:28 AM »
No big deal. Those are just text files, can be compressed a lot.
And if psychiatrist serves a good purpose... But I would want to know the risks in advance. ;D
So is there some technical reason why OW is limited to guns and CC?

Honestly, I'm simply confused when game mechanics aren't universal, as such decisions a sort of play against a play.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1247
Re: [Confirm V20] Brother doesn't want to leave after overwatch
« Reply #7 on: August 25, 2017, 04:39:37 PM »
So is there some technical reason why OW is limited to guns and CC?

You can't zip a bill (well, maybe inflation can!)

It's technical to some extent, as it's a problem system (complex and relatively bug prone), but it's more a resource reason. Not sure if I understand what you mean about universal mechanics, but if you mean one set of rules working in all circumstances, unfortunately, it isn't as easy as it may seem when you get down to the gritty details of implementation, and when OW is just a small cog in a much bigger machine. A lot of this is down to OW having to interrupt a complex (battle) system, and the fact it has a lot of different outcomes: hit, miss, kill, melee, ranged, burst, single shot, strafe, hit on last tile of path/not. These outcomes require different sets of actions and all have to interact with complex systems without breaking them. While the implementation time of delay turn and OW was about the same, OW has proved to be a much bigger challenge. Guess this makes sense, given what each of these things are doing.

Can see there would be some benefit for explosives (so that may happen, but not now), but not a lot for medkits. OW is the most sticky technical problem at the minute, spent half a day working on it yesterday. Trying to be more methodical to avoid any more bugs and found over 30 code paths. If there's a problem with one, it needs to be fixed, and all possibilities tested. If the original fix threw something else out -> repeat. Effectively, non trivial changes to it are probably going to cost a lot of time, which could be better spent elsewhere.
« Last Edit: August 25, 2017, 05:07:20 PM by Daithi »

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Confirm V20] Brother doesn't want to leave after overwatch
« Reply #8 on: August 26, 2017, 01:16:49 AM »
Thanks for explanations.
It makes a sense. Mechanic that interacts with all the previous systems practically multiplies the complexity. I really think it's worth, and sincerely hope you won't regret supporting OW, even if issues would be still uncovered during EA and onward. Because what matters even more than level of polish is whether it also multiplies the fun. And I think it does. (just my opinion^TM)   But it's more important whether you yourself will end up satisfied with OW.

Suppose, I just needed to hear whether it's by design. Yeah, seeing it simply theoretically - if overwatch has some definition, then what isn't forbidden... But practically, still recovering from flying dead bodies:) Just not easy from here to asses what is or isn't robust against changes. A word of advice: don't implement things so fast, people will start to have demands ;D