Author Topic: [Resolved] AI hang: Mafia boss battle: Melee issues  (Read 12424 times)

ushas

  • Hero Member
  • *****
  • Posts: 661
[Resolved] AI hang: Mafia boss battle: Melee issues
« on: January 31, 2018, 08:28:02 PM »
(v23, linux, HB)

So far experienced this on Mafia boss battle (Lorio Vincenze). As you've fixed the boss not launching after some time as well as have been repairing AI logic issues, it's entirely possible this one is non-issue anymore too. Am, however, unable to assess, not knowing anything about the nature of those problems, so rather decided to report. Haven't played till end, but reiterated several beginnings. Seems to me the same problem, but sometimes shows itself differently. Will make more posts. Feel free to split/close.

Common factors so far: Mafia boss and a black coat specialist, melee weapon.

1) It's fun to start face to face. So upon launching the battle (Aug 01), the team re-positions right next to the boss himself. The first turn is his and the game hangs.

How we surrounded him:


His turn in the log:
Code: [Select]
CharacterAIScript.DetermineCharacterActionForTurn. Character Has AP
CharAIScript.GetOrdersBasedOnBehaviourType. Method called
CharAIScript.GetOrdersBasedOnBehaviourType. has healing item: True character health %: 1 min health before heal: 0.6 heals this turn: 0 max heals per turn
CharAIScript.GetOrdersBasedOnBehaviourType. Character has passed heal precheck.
CharAIScript.GetOrdersBasedOnBehaviourType. Checking for orders. Behaviour type is: 1
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Unarmed damage is: 18.46515
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Baton damage is: 15.97926
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.Int32].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at CharacterAIScript.GetMeleeMetaOrder (.CharacterMainScript targetScriptIn, Boolean populateHealthField, Boolean allowPathingThroughFire) [0x00000] in <filename unknown>:0
  at CharacterAIScript+<GetMeleeAttackOrderForMaxDamageOpponent>c__Iterator33.MoveNext () [0x00000] in <filename unknown>:0
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
CharacterAIScript:GetOrdersBasedOnBehaviourType()
CharacterAIScript:GetPossibleOrdersForTurn()







1b) Next attempt, during the battle, only Sam steps on an adjacent tile. Once it reaches the boss' turn, the game hangs again

Code: [Select]
BattleControlScript.CheckIfPlayerOrAiTurn. Lorio Vincenze is not delaying turn. Restoring AP
BattleControlScript.DisablePlayerInput. Method called
CharacterAIScript.InvokeGetPossibleOrdersForTurn. Method called. Character is: Lorio Vincenze delay
CombatQueueManager.GenerateCombatantIcons. Method called. PRE GEN. Current list display objects: 6 combatant icon scripts: 6
CombatQueueManager.GenerateCombatantIcons. Method called. POST GEN. Current list display objects: 6 combatant icon scripts: 6
CameraControlScript.FocusCamera. Method complete
CharacterAIScript.DetermineCharacterActionForTurn. Method called
CharacterAIScript.DetermineCharacterActionForTurn. Character Has AP
CharAIScript.GetOrdersBasedOnBehaviourType. Method called
CharAIScript.GetOrdersBasedOnBehaviourType. has healing item: True character health %: 1 min health before heal: 0.6 heals this turn: 0 max heals per turn
CharAIScript.GetOrdersBasedOnBehaviourType. Character has passed heal precheck.
CharAIScript.GetOrdersBasedOnBehaviourType. Checking for orders. Behaviour type is: 1
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Unarmed damage is: 18.46515
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Machete damage is: 15.97926
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.Int32].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at CharacterAIScript.GetMeleeMetaOrder (.CharacterMainScript targetScriptIn, Boolean populateHealthField, Boolean allowPathingThroughFire) [0x00000] in <filename unknown>:0
  at CharacterAIScript+<GetMeleeAttackOrderForMaxDamageOpponent>c__Iterator33.MoveNext () [0x00000] in <filename unknown>:0
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
CharacterAIScript:GetOrdersBasedOnBehaviourType()
CharacterAIScript:GetPossibleOrdersForTurn()
« Last Edit: February 01, 2018, 12:10:33 PM by Daithi »

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: AI hang: AI hang: Mafia boss battle: Melee issues
« Reply #1 on: January 31, 2018, 08:32:50 PM »
2) Next time we re-positioned next to a black coat specialist (aug 01) and it hangs again:


Code: [Select]
CharacterAIScript.DetermineCharacterActionForTurn. Character Has AP
CharAIScript.GetOrdersBasedOnBehaviourType. Method called
CharAIScript.GetOrdersBasedOnBehaviourType. has healing item: True character health %: 1 min health before heal: 0.5 heals this turn: 0 max heals per turn
CharAIScript.GetOrdersBasedOnBehaviourType. Checking for orders. Behaviour type is: 0
CharAIScript.GetOrdersBasedOnBehaviourType. Aggressive Character has melee weapon
CharacterAIScript.GetMeleeMetaOrder. Found path, adjacent exit allowed, no pathing through fire
CharacterAIScript.GetMeleeMetaOrder. Method called. Is move required: True / avg distance to enemies: 6.25
CharAIScript.GetMeleeMetaOrder. Path found, route through fire
CharacterAIScript.GetMeleeMetaOrder. Method called. Is move required: True / avg distance to enemies: 6.25
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Unarmed damage is: 12.0045
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Baton damage is: 12.9558
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.Int32].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at CharacterAIScript.GetMeleeMetaOrder (.CharacterMainScript targetScriptIn, Boolean populateHealthField, Boolean allowPathingThroughFire) [0x00000] in <filename unknown>:0
  at CharacterAIScript+<GetMeleeAttackOrderForMaxDamageOpponent>c__Iterator33.MoveNext () [0x00000] in <filename unknown>:0

Similar error, including "GetMeleeAttackOrderForMaxDamageOpponent". Is he contemplating an attack with a baton too?


2b) The next try was to surround a common mafia troop (aug 01). No hanging. She attacked one of us in HtH when it came to her turn. That either means that the type of unit plays a role or type of weapon, or none of those. For the record, on this same battle, the black coat specialist comes close himself, pulls out a baton and attacks all right.
« Last Edit: January 31, 2018, 08:59:24 PM by ushas »

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: AI hang: Mafia boss battle: Melee issues
« Reply #2 on: January 31, 2018, 08:37:58 PM »
3) The boss again (aug 01), on his second turn he pulls out a grenade to punish our clustering but the game hangs: 


Code: [Select]
CharacterAIScript.DetermineCharacterActionForTurn. Character Has AP
CharAIScript.GetOrdersBasedOnBehaviourType. Method called
CharAIScript.GetOrdersBasedOnBehaviourType. has healing item: True character health %: 1 min health before heal: 0.6 heals this turn: 0 max heals per turn
CharAIScript.GetOrdersBasedOnBehaviourType. Character has passed heal precheck.
CharAIScript.GetOrdersBasedOnBehaviourType. Checking for orders. Behaviour type is: 1
CharacterAIScript.GetMeleeMetaOrder. Found path, adjacent exit allowed, no pathing through fire
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Unarmed damage is: 18.46515
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Baton damage is: 15.97926
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
CharacterAIScript.GetMeleeMetaOrder. Method called. Is move required: True / avg distance to enemies: 1.5
CharAIScript.GetMeleeMetaOrder. Path found, route through fire
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Unarmed damage is: 18.46515
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Baton damage is: 15.97926
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
CharacterAIScript.GetMeleeMetaOrder. Method called. Is move required: True / avg distance to enemies: 1.5
CharacterAIScript.GetMeleeMetaOrder. Found path, adjacent exit allowed, no pathing through fire
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Unarmed damage is: 18.46515
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Baton damage is: 15.97926
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
CharacterAIScript.GetMeleeMetaOrder. Method called. Is move required: True / avg distance to enemies: 1.5
CharAIScript.GetMeleeMetaOrder. Path found, route through fire
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Unarmed damage is: 18.46515
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Baton damage is: 15.97926
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
CharacterAIScript.GetMeleeMetaOrder. Method called. Is move required: True / avg distance to enemies: 1.5
CharacterAIScript.GetMeleeMetaOrder. Found path, adjacent exit allowed, no pathing through fire
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Unarmed damage is: 18.46515
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Baton damage is: 15.97926
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 9 applied
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.Int32].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at CharacterAIScript.GetMeleeMetaOrder (.CharacterMainScript targetScriptIn, Boolean populateHealthField, Boolean allowPathingThroughFire) [0x00000] in <filename unknown>:0
  at CharacterAIScript+<GetMeleeAttackOrderForMaxDamageOpponent>c__Iterator33.MoveNext () [0x00000] in <filename unknown>:0

Why think it's the same issue: the error in the log, there is no fire on the floor, he is near enough for melee. So a bit guessing he's contemplating that melee attack again...

On one of the next tries he normally changes to a grenade and throws it. Then we went close and personal and the game hangs again once it comes to his turn.



3b) Had the boss uncovered earlier so wanted to check if time plays any role (July 26 this time). Wasn't much lucky with the specialist. He attacked us with a machete all right. But was able to recreate the above issue with the boss. 

The congifuration at the time of freeze:




Code: [Select]
CharacterAIScript.DetermineCharacterActionForTurn. Character Has AP
CharAIScript.GetOrdersBasedOnBehaviourType. Method called
CharAIScript.GetOrdersBasedOnBehaviourType. has healing item: True character health %: 1 min health before heal: 0.6 heals this turn: 0 max heals per turn
CharAIScript.GetOrdersBasedOnBehaviourType. Checking for orders. Behaviour type is: 1
CharacterAIScript.GetMeleeMetaOrder. Found path, adjacent exit allowed, no pathing through fire
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Unarmed damage is: 16.13745
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 8 applied
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Baton damage is: 14.98266
BattleControlScript.GetMeleeChanceToHit. Criminal cth bonus of: 8 applied
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.Int32].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at CharacterAIScript.GetMeleeMetaOrder (.CharacterMainScript targetScriptIn, Boolean populateHealthField, Boolean allowPathingThroughFire) [0x00000] in <filename unknown>:0
  at CharacterAIScript+<GetMeleeAttackOrderForMaxDamageOpponent>c__Iterator33.MoveNext () [0x00000] in <filename unknown>:0
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
CharacterAIScript:GetOrdersBasedOnBehaviourType()
CharacterAIScript:GetPossibleOrdersForTurn()
« Last Edit: January 31, 2018, 08:39:32 PM by ushas »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: AI hang: Mafia boss battle: Melee issues
« Reply #3 on: February 01, 2018, 10:41:10 AM »
This one hasn't been fixed, have been able to recreate based on those other saves you sent. Looking into it now. Edit: Have you seen this outside the mafia boss fight?

PS: Altered Carbon is out tomorrow on Netflix. Seems to be getting good, but not great reviews.
« Last Edit: February 01, 2018, 10:56:05 AM by Daithi »

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: AI hang: Mafia boss battle: Melee issues
« Reply #4 on: February 01, 2018, 11:53:46 AM »
No. A good question. Once happened, when had time, first was trying to do recreation on the same map. Last night played the mission in full finally. Seems the boss bugs once starts a turn adjacent to n>0 allies, while for the specialist it's not so easy. So far he bugged only when we surrounded him near the beginning. However, if it's not the boss battle related, then perhaps possible on other maps too... The thing is, I'm playing with ranged party, not letting anyone near, so would miss all cc issues so far.

For v24 planning soft boiled group of hooligans 8)

rePS: Ooh. Thanks for notice. Have sub. Wondering how close they base the series on the book. Have you read the second one?

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: AI hang: Mafia boss battle: Melee issues
« Reply #5 on: February 01, 2018, 12:10:12 PM »
Just figured it out. It's a logic error that's been there for a long time, but will only manifest when a character with unarmed + another melee weapon tries to make 3 attacks. Good to get another one of these out of the way. Cheers!

Haven't read too much about it, but from scanning reviews it seems they cover the events of the first book, and wander off on tangents quite a bit. Have read all of them multiple times :) Enjoyed the first the most, but they are all good. Did you check out the first one?

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] AI hang: Mafia boss battle: Melee issues
« Reply #6 on: February 01, 2018, 02:41:45 PM »
Aha! I see, they would need to have enough AP for that. Cool issue:)
Based on those AI logic intricacies and such, do you happen to have suspicions on any other combinations to check?

Yes, read the first. Thanks for recommendation! Thought they would need to add a bit more content for series. Hope it will be more daring not just fluff. Because the premise is really interesting, offers a lot to be explored... I ponder upon what is worse punishment, whether to be send for 50 years to prison or to be stored for 200...
« Last Edit: February 01, 2018, 02:43:16 PM by ushas »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Resolved] AI hang: Mafia boss battle: Melee issues
« Reply #7 on: February 01, 2018, 02:58:51 PM »
Hmm nothing is jumping out. This won't happen for ranged / explosives, as characters will only have 1 weapon of these types. There have been some issues that only turn up with very long play times and will be hard to track down in testing that focuses on breaking a particular feature, but with so much code they're also hard to pick out.

Welcome! Yeah, it's a very interesting set of ideas. Fingers crossed they can either do a great altered carbon or snow crash adaptation. Lord of Light covers some similar ground in so far as transfer of consciousness between bodies goes, and is at least as good in concept and style, but makes almost no sense at first. Do you know of any other good, dark, sci fi reads like this?

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] AI hang: Mafia boss battle: Melee issues
« Reply #8 on: February 01, 2018, 04:56:37 PM »
Oh. So when the boss was once shooting with a pistol and second time with a rifle, it's not because he has both, but because one of them is randomly assigned to him?

In case those are some memory issues with long battles, perhaps also relates to some of the linux crashes. Think after a long battle I might have a higher chance to get a crash when save and quit the game in quick succession. But that could be just a statistical bias.

Edit: Forgot to mention, there was also this issue: the boss and one other unit was shooting and hitting us throught the long building. Let me know if need upload some screens for finding the hole. It was unfair, we had no los.

Well at least they have a good excuse for young and beautiful cast:D Transferring, altering or elevating consciousness is a sci-fi fancy, isn't it. Unsure more specifically though, you would be better off to consult wiki than my faulty memory. Wish would have read more books. If talking filmed, what comes to mind for some reason is Caprica. Was so hooked on the settings and how Zoe's mind got transferred. Think they even tried to explore a less comfortable questions... Then, after the beginning, all that is just used as a more or less static background of the same old human drama^TM :(  Haven't really watched after intro. 
« Last Edit: February 02, 2018, 02:54:17 AM by ushas »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Resolved] AI hang: Mafia boss battle: Melee issues
« Reply #9 on: February 02, 2018, 08:58:56 AM »
Yep, but that changes in V24. Have just added code to give them custom loadouts - will help with balance, allow them to be customised to have specific strengths/weakness (along with custom stats/skills later) and to give the player custom weapons as a reward (if I get that far).

Any chance you can give me a screen for this issue? That long building is mostly one big 3d mesh and I can't figure out where the hole in the collider is.

Watched BSG and mostly enjoyed it, but never tuned in to Caprica. Felt BSG had some of the same problems, a bit too much of a soap opera.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] AI hang: Mafia boss battle: Melee issues
« Reply #10 on: February 02, 2018, 04:29:22 PM »
Oho, that's great news! In case fully custom is too much of work or to be supplied gradually, some of the lieutenants can have upgraded versions of weapons from what you already planned or what not. Though not a fan of all craftable to be also lootable.

A lot of my friends were watching BSG. Yes, a soap opera, that's it. Not my cup of tea though. Unless goofy.

Edit. Just read one of the carbon reviews:
"time to reward those who’ve been around for all 10 eps. But man, the boobs, blood and backstory digression it takes to get there!"
Lol. Perhaps one ought to drink some alcohol before attempting to watch.
« Last Edit: February 02, 2018, 05:02:52 PM by ushas »