Bots in single player with "Fight Intruder" command will not attempt to arrest any enemy. Kills handcuffed enemies.
Discussed in https://github.com/FakeFishGames/Barotrauma/discussions/15289
Originally posted by Argimor December 3, 2024
Disclaimers
- [X] I have searched the issue tracker to check if the issue has already been reported.
- [ ] My issue happened while using mods.
What happened?
In unmodded single player campaign(Client-side Lua, no mod packages running), any bot in the sub that has "Fight Intruder" command treats handcuffed human enemies as armed and dangerous, IE: runs away if unarmed, or attempts to kill, even with the means to arrest, IE: stun weapon and handcuff only loadout security officers. Tested with outpost pirates in normal campaign, prisoners who have been re-handcuffed after escaping, and any spawned human with any job type in "Team2" enemy team. Bots with the means to arrest do not attempt to do so, and will seek lethal weapons if they only have stun weapons, and will kill any enemy that is handcuffed.
Also It is difficult to tell but it appears normal AI not in "Fight Intruder" mode treats the handcuffed enemies differently, as if attempting to run away from them, handcuffed enemies also seem to react as if they are not handcuffed and instead only "weaponless" and try to run away too, additionally assaulting AI in "Fight Intruders" mode will treat temporarily stunned handcuffed enemies as neutralized, but the instant they get back up they attempt to kill, repeating until enemy is unconscious.
I'm fairly sure this is unintended behavior, as it makes it impossible to assign crew AI defense duties while capturing prisoners for the "By the Book" talent, or doing prisoner transport or any mission where a hostile NPC must be kept alive.
Reproduction steps
- Start single player campaign, or provided save, Save.zip
- Assign any player crew AI with handcuffs and means to stun the "Fight Intruders" command and place in the submarine.
- Spawn any hostile human NPC armed or not in submarine.
- Crew AI will kill target, will not use handcuffs.
- Spawn any hostile human NPC and handcuff them.
- Crew AI will kill target.
- Example:
Crew continues fighting stunned target, does not attempt to handcuff.
Manually handcuffing enemy.
"Fight Intruders" order cancelled, handcuffed enemy attempts to run away.
On resuming command, crew AI kills treats handcuffed enemy as hostile and kills them
Bug prevalence
Happens every time I play
Single player or multiplayer?
Single player
-
No response
Version
v1.6.19.1 (Unto the Breach Update Hotfix 2)
-
No response
Which operating system did you encounter this bug on?
Windows
Relevant error messages and crash reports
No response
Note: This is still open as although killing handcuffed enemies is fixed in fix/targetting-handcuffed the issue for killing over arresting noted above still exists last I checked (they don't attempt to arrest targets usually that are humanoid in fight intruders).
Just adding this info from slack to the ticket for future reference.