FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.68k stars 394 forks source link

Team2 (hostile) NPC AI completely break if the location has a team/faction #13892

Open itchyOwl opened 2 months ago

itchyOwl commented 2 months ago

Discussed in https://github.com/FakeFishGames/Barotrauma/discussions/13818

Originally posted by **ubertpendragon** April 24, 2024 ### 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? If the location doesn't have `outpostteam="None"` and is owned by I assume FriendlyNPC team or a faction, the AI of NPCs in team2 breaks: Enemies flee you without attacking. I assume this is to prevent Team2 from shooting at the outpost? But humans don't actually shoot handheld weapons at walls ![image](https://github.com/FakeFishGames/Barotrauma/assets/73229309/5bb7c864-1e1c-484a-a57a-b9be40f66f79) # IF YOU SPAWN THE ENEMIES WITH FRIENDLY TEAM ID and THEN CHANGE THEIR TEAM, THE AI IS FINE FOR SOME REASON ```xml ``` # IF YOU SPAWN THE ENEMIES WITH teamid="Team2" OR LEAVE IT BLANK, THE AI BREAKS This is a problem for any event/mission that uses Team2 to turn NPCs hostile. Otherwise you have to loop a combataction event to circumvent the problem Example of modded mission that is basically using the abandonedoutpostassassinate mission, but in a city https://github.com/FakeFishGames/Barotrauma/assets/73229309/acb81caf-8ec2-42f1-b0b1-352537ca73c3 ```xml ``` ### Reproduction steps 1. Delete `outpostteam="None"` from abandonedoutpost locationtype.xml 2. Start an abandoned outpost mission with human enemies 3. AI breaks ### Bug prevalence Happens every time I play _No response_ ### Version v1.4.4.1 (Blood in the Water Update)
Regalis11 commented 1 month ago

Addressed in https://github.com/FakeFishGames/Barotrauma-development/commit/1a729305c160a0717376058f92d8118f88f2d839