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.76k stars 406 forks source link

Bots should prioritize fixing damaged walls first before fixing devices while autonomous / Unable to fix leaks on Humpback docking port #4357

Closed Rokvach closed 3 years ago

Rokvach commented 3 years ago

Build: Release Branch: bugfixes Commit: https://github.com/Regalis11/Barotrauma-development/commit/2bc80edc75d6def01adf7e5ff2685c674fe1ee82 Game screen: Level Editor test mode Submarine: Humpback

When bots are doing tasks autonomously they seem to be attending to devices even when the submarine is submerged, this isn't really ideal as the devices just breaks right after they are done repairing them, so they just end up constantly going around and fixing the same devices rather than fix the leaks. This ofc isn't an issue if player has ordered the bots to fix leaks, but there can be cases when the player isn't around to order the bots, for example when exploring ruins, caves or even trying to do a beacon mission.

Encountered this issue whilst testing the Coilgun dancing bug and teleporting the sub on top of a Thalamus and just decided to look as to how the AI reacts to that type of a situation, they did patch up the biggest leaks on the outer walls but didn't bother with the inner walls or smaller leaks on the outer walls. After patching the bigger leaks they turned to repair devices and has now been doing that the past 30 minutes I've been observing them.

I think the biggest issue in my case is this leak at the top, which they seem to not be able to detect by themselves. There is a huge hole at the bottom too but I think the inner walls should prevent that water from coming inside. But if the bots just fixed the inner walls it would help a lot on recovering the submarine, even if some area is still leaking, as it still would allow for some sections of the sub to drain. image.png image.png

After the above happened I now ordered all the bots to specifically fix leaks, they started fixing the inner walls immediately but then ran all to the leak showcased on the above pic and reported this image.png

I wasn't fast enough to take a screenshot of the debugai when this happened as all the bots decided to go and find oxygen at the same time forgetting about the leak at the top, now they are instead fixing leaks and even repairing devices elsewhere on the sub whilst the leak on the docking port has been forgotten.

itchyOwl commented 3 years ago

Based on the description, I'm not sure there is an issue with the priorities (although there might be). The bots just can't get to that leak for some reason. Need to test and try to repro this.