Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

UseHumanAi is broken (slugcat)

Open kleiner-sentry opened this issue 1 year ago • 1 comments

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)

image

Reproduction steps

  1. Create a custom character that's a humanoid
  2. Enable UseHumanAi
  3. 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

kleiner-sentry avatar Feb 04 '24 09:02 kleiner-sentry

Addressed in https://github.com/FakeFishGames/Barotrauma-development/pull/5024 (PR in our private repo)

Regalis11 avatar Mar 04 '24 18:03 Regalis11

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.

Jasontti avatar May 24 '24 07:05 Jasontti