Picking Up Items, Pathfinding
Hey Folks! Hope everyone had a good weekend. A lot of family time for us due to the combo of Mother's Day and nice weather. Including the toddler's first tea party, and some quality time spent swamp-side listening to bullfrogs.
Back at the office, I resumed tackling the hull repair interaction, and trying to get AIs to seek out necessary items (patch kits) before attempting the repair. Today's screenshot shows Bo Powell in the kiosk area of the chargen station, and I've right-clicked one of the hull patch kits on the floor in the battery room on the right. (White and red squares with a yellow caution triangle on them.)
AI seems to be handling this now. I can make a hole in the hull, then select an AI, right click the hole, and choose "Patch." The AI will then contemplate a moment, walk over to the hull patch kits, pick one up, then bring it to the hole and patch it. In theory, a failure along the way should be graceful and push a message to the log to let the player know why. That'll require some more testing, though.
As a bonus, I can now make AI pick up items on the floor by using the context menu (as seen in today's screenshot). It's a special interaction that can be added to all items that can be picked up, which should prove useful in many ways down the line.
I did, however, run into a bug or two along the way. The big one I'm tackling right now is related to pathfinding. I've noticed that AI sometimes triggers an interaction while walking towards a target, instead of waiting until it gets there. And I'm unsure why.
At first, I thought it was because the AI gave up waiting too soon, but after fixing that, it's still happening. (Which makes sense, actually, since the item wouldn't know what specific interaction it was waiting for to trigger it in the first place.) So signs are pointing to the AI somehow thinking the walk phase is done before it really is.
I'll need to track that down tomorrow. But all in all, this is a pretty good step forward. A generic way to pick up items and equipment should be useful in their shipboard lives!