Barotrauma
Submarine Overhaul
Antoneeee  [δημιουργός] 15 Οκτ 2024, 22:24
Pathing advice
I was originally gonna make this as a response to someone, but it ended up being too long to post in comment form. So I'm posting it here to hopefully immortalize this.


Step one is to make sure the hull is made as simple as possible. Not just the zones, but the way in which the layout is designed. If you're going to have abnormal room layouts, just know that as long as the AI can reach the top of the ceiling with a welding tool, you can probably keep it as a single hull regardless of height. If, however, a bot cannot climb a platform to get to the higher parts of the room, without using ladders or stairs, it's usually a good idea to separate that room into two pieces.Try to also keep navigational elements like stairs or ladders away from each other, so that they wont interfere and make your life harder.

After that, the second step is to tidy up the waypoints and make it as clean as possible. It should look clean and smooth. Try to keep things as consistent as possible, so that if you spot a problem, you'll be able to know if it's because of the pathing or not.
When it comes to ladders, I always try to have two waypoints right next to each other, followed by a waypoint above the other two on the ladder, and connect all three waypoints to each other. ive found that this produces the best results.
Additionally, there should be a waypoint bellow every hatch, if there's space. ive personally witnessed AI bots who have been unable to repair broken hatches due to inadequate pathing.

If those two steps aren't enough, or your ship has some really abnormal sections like in the Kastrull, then the best advice I can give you are as such:
Bots will check if they can weld a wall inside the hull that the wall is located in. This seems obvious, but it has implications. This means that hulls that are inaccessible, or extremely hard to enter into via normal means, are essentially impossible to weld from the bots perspective. This is because the only way a bot can weld a wall is by being in the hull the wall is located in. This is why I had to completely redesign the Kastrulls drone, because the drones ballast was inaccessible, which caused the bots to give up.
The position of a waypoint, and its connections matters a lot. It can determine how high a bot has to climb a ladder before they detach onto the floor, or if a bot will be confused on how to detach from a ladder, or if a bot will get confused on getting off stairs.

TLDR: The best advice I can give is to keep things simple, clean, and uniform. I suggest you study the Kastrull-1 and its drone, as I've put in a ton of work to get those subs run good with bots.

Try and study their behavior and understand it from a technical perspective.
There's about a million and one things that I've learned just from watching them, none of which can be properly conveyed in text lol. But I hope this helps.