Author Topic: [Resolved] Survivalist who decided to flee skips his turns  (Read 12062 times)

ushas

  • Hero Member
  • *****
  • Posts: 661
[Resolved] Survivalist who decided to flee skips his turns
« on: September 27, 2017, 03:52:26 PM »
(v20, linux)

Facility attack info: Lvl 1 Survivalist Training facility, 27th July, Vigilantes difficulty, 3 party members.

So I had this facility attack and the first guy who decided to flee was showing the underfoot icon and so on properly, but he wasn't running anywhere. In fact it looks like the game is skipping his turns altogether.

His turn when decision to flee happened:
Code: [Select]
BattleControlScript.FindNextActiveCharacter. AI character at pos 6 is combat capable?: True is involved in combat:? True
CharMainScript.CheckIfBleedingReturnKilledAndApplyDamage. Method called. Checking for: Jerry Alden
BattleControlScript.FindNextActiveCharacter. Jerry Alden has not died from fire or bleeding
BCS.CacheCurrentCharacter. Method called for character at pos 6 on char script list. Is player controlled: False name is: Jerry Alden
CameraControlScript.GetRequiredCameraPosition: Method called
CameraControlScript.FocusCamera. Method called. Return to default elevation: False target pos: (16.2, 10.0, 1.9) time scale: 1
CharacterContainer.DecreasActivePerkCooldowns. Method called.
BCS.CheckIfPlayerOrAITurn. Method called. Is character delaying turn: False
BattleControlScript.CheckIfPlayerOrAiTurn. Jerry Alden is not delaying turn. Restoring AP
BattleControlScript.DisablePlayerInput. Method called
CharacterAIScript.InvokeGetPossibleOrdersForTurn. Method called. Character is: Jerry Alden delay
CharacterMainScript.CheckIfShouldFlee. Jerry Alden is heavily wounded.
CharacterMainScript.CheckIfShouldFlee.Jerry Alden flee chance: 20 will flee: 20
CombatQueueManager.SetFleeingIcon. Character ID: 7
CharacterAIScript.InvokeGetPossibleOrdersForTurn. Flee destination tile script NOT FOUND
CharacterMainScript.GetFleeDestinationTileScript. Method called. Character: Jerry Alden Number of flee tiles: 6
CharacterMainScript.GetFleeToTileScript. Position of flee tile in list: 2 Flee destination tile set. X: 49 Y: 26 tile position: (49.0, 26.0)
CharacterAIScript.GetPathAndFlee. Fleeing character: Jerry Alden has not reached flee location
PathFindingScript.FindPath. Open list count is zero
PathFindingScript.TraceAndReturnPath. Number of elements in path: 1 No path has been found. Can trace through occupied: False
CharacterAIScript.GetPathAndFlee. NO FLEE PATH FOUND. SKIPPING TURN

One of his next turns:
Code: [Select]
CharMainScript.CheckIfBleedingReturnKilledAndApplyDamage. Method called. Checking for: Jerry Alden
BattleControlScript.FindNextActiveCharacter. Jerry Alden has not died from fire or bleeding
BCS.CacheCurrentCharacter. Method called for character at pos 6 on char script list. Is player controlled: False name is: Jerry Alden
CameraControlScript.GetRequiredCameraPosition: Method called
CameraControlScript.FocusCamera. Method called. Return to default elevation: False target pos: (16.2, 9.0, 0.9) time scale: 1
CharacterContainer.DecreasActivePerkCooldowns. Method called.
BCS.CheckIfPlayerOrAITurn. Method called. Is character delaying turn: False
BattleControlScript.CheckIfPlayerOrAiTurn. Jerry Alden is not delaying turn. Restoring AP
BattleControlScript.DisablePlayerInput. Method called
CharacterAIScript.InvokeGetPossibleOrdersForTurn. Method called. Character is: Jerry Alden delay
CharacterAIScript.InvokeGetPossibleOrdersForTurn. Flee destination tile script ALREADY FOUND
CharacterAIScript.GetPathAndFlee. Fleeing character: Jerry Alden has not reached flee location
PathFindingScript.FindPath. Open list count is zero
PathFindingScript.TraceAndReturnPath. Number of elements in path: 1 No path has been found. Can trace through occupied: False
CharacterAIScript.GetPathAndFlee. NO FLEE PATH FOUND. SKIPPING TURN

He had a bat equipped at the time. 

The next guy who decides to flee (equipped pistol) is running to the door and escaping without any problems. I would say there was many paths for the first one to be able escape too. He stays in the battle though. I had to put him down to finalize the encounter. 

Afterwards, I've quick re-launch the mission and again and the first guy who decides to flee won't go anywhere again (this one holds the pistol). It was different place on the map. If you need saved some screens.
« Last Edit: October 18, 2017, 02:38:32 PM by Daithi »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Survivalist who decided to flee skips his turns
« Reply #1 on: September 28, 2017, 10:07:58 AM »
It seems that in the first turn, it can't find a tile to flee to. It's unlikely, but possible that they are all occupied. Then in the next turn, it looks like he assumes that he has a flee tile, but since there is no tile, he can't move to it.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Survivalist who decided to flee skips his turns
« Reply #2 on: September 28, 2017, 01:30:28 PM »
Yeah, that's strange. I don't think there wasn't any path possible at the beginning. But at least one unit was always adjacent. Will try to recreate again. It was easy before, also the first enemy to flee.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Survivalist who decided to flee skips his turns
« Reply #3 on: September 29, 2017, 04:05:17 PM »
Of course, after said it's easy, wasn't much lucky to recreate.
However, found some screenshots and it seems that caught shortly after the fleeing decision (based on the bark):

Several tiles around him are indeed occupied and it's possible it was like that in the other case too. But technically, the path to the exit should be possible.

I will try to recreate on other maps next week too. Wasn't there some command to force them to flee?


Also, one clipping in Training Facility:

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Survivalist who decided to flee skips his turns
« Reply #4 on: October 18, 2017, 12:46:52 PM »
Fixed issue with cover anyway : ) Having a look at the fleeing issue.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Survivalist who decided to flee skips his turns
« Reply #5 on: October 18, 2017, 02:38:19 PM »
Thankfully, not a logic error, but rather a human one. One of the flee points was in the wall! Fixed now.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] Survivalist who decided to flee skips his turns
« Reply #6 on: October 19, 2017, 05:53:59 PM »
Nice. That would explain why one couldn't escape while the other one could. Also that haven't encountered on other maps.
Human errors are to be expected, np. If there are more exits though, what about a rethink chance - if path is null then try the next exit, or so?