UseHumanAi is broken (slugcat)
Disclaimers
- [X] I have searched the issue tracker to check if the issue has already been reported.
- [X] My issue happened while using mods.
What happened?
Anytime I enable UseHumanAi, even on a character that would be theoretically compatible with bots, the game will spit me an error code relating to AIObjectiveManager, and a dead ragdoll in the character editor. My hope is that you'll allow non-humans to have bot AI (for the sake of mods)
Reproduction steps
- Create a custom character that's a humanoid
- Enable UseHumanAi
- Error message (and if you use the character editor, a duplicate ragdoll)
Bug prevalence
Happens every time I play
Single player or multiplayer?
Other
-
Happens in-game, and in the editor
Version
v1.2.8.0 (Winter Update hotfix 2)
-
No response
Which operating system did you encounter this bug on?
Windows
Relevant error messages and crash reports
Failed to spawn the character "Slugcat". {Object reference not set to an instance of an object.}
at Barotrauma.AIObjectiveManager.CreateAutonomousObjectives() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjectiveManager.cs:line 156
at Barotrauma.AIObjectiveManager..ctor(Character character) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjectiveManager.cs:line 75
at Barotrauma.HumanAIController..ctor(Character c) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\HumanAIController.cs:line 172
at Barotrauma.Character.Create(CharacterPrefab prefab, Vector2 position, String seed, CharacterInfo characterInfo, UInt16 id, Boolean isRemotePlayer, Boolean hasAi, Boolean createNetworkEvent, RagdollParams ragdoll, Boolean spawnInitialItems) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\Character.cs:line 1256
at Barotrauma.Character.Create(Identifier speciesName, Vector2 position, String seed, CharacterInfo characterInfo, UInt16 id, Boolean isRemotePlayer, Boolean hasAi, Boolean createNetworkEvent, RagdollParams ragdoll, Boolean throwErrorIfNotFound, Boolean spawnInitialItems) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\Character.cs:line 1246
at Barotrauma.CharacterEditor.CharacterEditorScreen.SpawnCharacter(Identifier speciesName, RagdollParams ragdoll) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Screens\CharacterEditor\CharacterEditorScreen.cs:line 1552
at Barotrauma.CharacterEditor.CharacterEditorScreen.<CreateCharacterSelectionPanel>b__179_7(GUIButton b, Object obj) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Screens\CharacterEditor\CharacterEditorScreen.cs:line 2773
Addressed in https://github.com/FakeFishGames/Barotrauma-development/pull/5024 (PR in our private repo)
Fix tested. More comprehensive testing notes in our private repo: https://github.com/FakeFishGames/Barotrauma-development/pull/5024 No issues found. Closing ticket as completed.