Vigilantes > Resolved Bugs
[Resolved] AI hang: Melee enemy and enviromental object
ushas:
(v23, linux, SB)
I think this is the same problem as reported by awg with survivalist + bat (at least my aim was to recreate):
http://steamcommunity.com/app/545600/discussions/1/1693785035818232948/#c1693785035822373254
Played the game from the start up to Emilia. This time it hangs when the guy holds a knife. On a turn before that, in the same position, he attacked Sam in cc all right, but right on the beginning of his next turn it freezes.
The situation:
awg's screenshot for comparison:
https://steamuserimages-a.akamaihd.net/ugc/931551196250953961/2726FAF2447C5BC841CF21A3F9D631859163B892/
This time there is an error. Last lines in the log:
--- Code: ---CharacterAIScript.GetMeleeOrdersAgainstEnvironmentObjects. There are IEOs in play
CharacterAIScript.GetMeleeOrdersAgainstEnvironmentObjects. Method called. There are: 0 more players than enemies around ieo 0
CharacterAIScript.GetMeleeOrdersAgainstEnvironmentObjects. Method called. There are: 0 more players than enemies around ieo 1
CharacterAIScript.GetMeleeOrdersAgainstEnvironmentObjects. Method called. There are: 1 more players than enemies around ieo 2
CharacterAIScript.GetMeleeOrdersAgainstEnvironmentObject. No move req. Enough AP. Current AP: 6 total: 3path cost 0 move & attack: 3
CharacterAIScript.GetMeleeVSIEOOrder. Method called.
CharacterAIScript.GetMeleeVSIEOOrder. Path is null. No move required
NullReferenceException: Object reference not set to an instance of an object
at CharacterAIScript.GetMeleeMetaOrderAgainstEnvironmentObject (.InteractableEnvironmentObject ieoScriptIn, .MovementPath pathIn, Int32 playersMinusAlliesAdjacentToEnvironmentObjectIn, Int32 totalAPCostIn, Boolean escapesBlastIn) [0x00000] in <filename unknown>:0
at CharacterAIScript.GetMeleeOrdersAgainstEnvironmentObjects () [0x00000] in <filename unknown>:0
at CharacterAIScript+<GetMeleeAttackOrderForMaxDamageOpponent>c__Iterator33.MoveNext () [0x00000] in <filename unknown>:0
--- End code ---
Seems he indeed wanted to trigger the canister. Gang's equipment lvl is 2, in case that plays any role in recreation.
Edit: Title was edited to better represent the issue.
Daithi:
At a guess, it may be happening if they miss the object. Have seen them activate the environment objects quite a few times, and missing an environment object is not very common. It's a good place to start anyway, and it seems like the bug isn't going to be all that difficult to recreate.
ushas:
Ah, that's interesting. Yeah, was just restarting the battle till one of them had a melee weapon. Then it's about a bait, positioned Sam next to the thing per awg's instructions, not letting the second guy to do the ranged activation.
Edit: Of course, you know much better what's going on, just that now I realize - when was doing the cc activation cth is 100% -> thus no miss. Don't they have the same rules?
Edit2: The second object on the same map, the same hang. This guy is only HtH for a change.
--- Code: ---CharAIScript.GetOrdersBasedOnBehaviourType. Checking for orders. Behaviour type is: 0
CharAIScript.GetOrdersBasedOnBehaviourType. Aggressive Character has melee weapon
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Unarmed damage is: 4.12005
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Combat Knife damage is: 5.88384
CharacterAIScript.GetMeleeMetaOrder. Method called. Is move required: False / avg distance to enemies: 8.5
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Unarmed damage is: 4.12005
BattleControlScript.GetMeleeDamage. Method called. Weapon name is: Combat Knife damage is: 5.88384
CharacterAIScript.GetMeleeMetaOrder. Method called. Is move required: False / avg distance to enemies: 8.5
CharacterAIScript.GetMeleeMetaOrder. Found path, adjacent exit allowed, no pathing through fire
CharacterAIScript.GetMeleeMetaOrder. Method called. Is move required: True / avg distance to enemies: 8
CharAIScript.GetMeleeMetaOrder. Path found, route through fire
CharacterAIScript.GetMeleeMetaOrder. Method called. Is move required: True / avg distance to enemies: 8
CharacterAIScript.GetMeleeOrdersAgainstEnvironmentObjects. Method called. There are: 3 IEOS. Current meta orders: 4
CharacterAIScript.GetMeleeOrdersAgainstEnvironmentObjects. There are IEOs in play
CharacterAIScript.GetMeleeOrdersAgainstEnvironmentObjects. Method called. There are: 1 more players than enemies around ieo 0
CharacterAIScript.GetMeleeOrdersAgainstEnvironmentObject. No move req. Enough AP. Current AP: 6 total: 3path cost 0 move & attack: 3
CharacterAIScript.GetMeleeVSIEOOrder. Method called.
CharacterAIScript.GetMeleeVSIEOOrder. Path is null. No move required
NullReferenceException: Object reference not set to an instance of an object
at CharacterAIScript.GetMeleeMetaOrderAgainstEnvironmentObject (.InteractableEnvironmentObject ieoScriptIn, .MovementPath pathIn, Int32 playersMinusAlliesAdjacentToEnvironmentObjectIn, Int32 totalAPCostIn, Boolean escapesBlastIn) [0x00000] in <filename unknown>:0
at CharacterAIScript.GetMeleeOrdersAgainstEnvironmentObjects () [0x00000] in <filename unknown>:0
at CharacterAIScript+<GetMeleeAttackOrderForMaxDamageOpponent>c__Iterator33.MoveNext () [0x00000] in <filename unknown>:0
TimeOfDayWeatherScript.DetermineTimeUntilNextFlash. Method called. Time until flash: 24
TimeOfDayWeatherScript.HandleLightning. Method called
TimeOfDayWeatherScript.DetermineTimeUntilNextFlash. Method called. Time until flash: 42.5
--- End code ---
Hm, but he seems to have a knife in his pockets. Anyway, again in battle it freezes at the beginning so visually he did nothing. Guessing his first action was supposed to be the object activation.
ushas:
Another piece with HtH mafia and Arcadi:
Seems the issue can be recreated on other maps too, as soon as there is a melee enemy and an environmental object.
Unsure yet which steps are necessary but so far was successful to do it as follows:
1. First one must bait the enemy so he ends the turn adjacent to this object without activating it.
2. Then my own guy will step next to the object to be adjacent too, if not already there.
(unsure if needed, but so far it was always to be also adjacent to the baited enemy, see all the images)
3. On the enemy's next turn, he is ought to start with activating the object, but the game freezes.
Edit: Confirming you don't need to be adjacent to the enemy.
Again, Mr. Mafia here ends the turn next to the container, followed by Ray stepping next to it too. Then he prob. wants to change to HtH and activate the thing. The game hangs. Seems it's enough when they start their turn next to the object while an ally is in the AOE too. Guaranteed freeze.
ushas:
I understand enemy CC activation is a fairly young. However, seems you will be checking the AI code anyway, so let me add some preliminary feedback: They do it to their detriment. Unsure whether it's that way always, but most of the time they just step next to the barrel, activate and end the turn. Yeah, it harms my guys and makes sense that our hp lowered is more important than theirs, esp. if it puts down one or more of us, but they are often harming their side even more.
Like when the guy is the last one and he blows himself up just because one ally stands next to such object, resulting in our win. He would do better to run away... On various occasions I thought the enemy has enough AP for activation as well as to step outside the AOE, but no, he ends the turn inside... Naturally, they're evaluating a lot of things. Perhaps also taking into account closeness to allies for the next turn? So perhaps just some weights need to be adjusted.
Navigation
[0] Message Index
[#] Next page
Go to full version