Quest Follower AI

So for the first time today, I’ve gotten the PCs to actually be able to cope with multiple quest givers and multiple quests active at once.

Right now, the PCs travel around to quest givers, picking up as many quests as they can, and then start performing the quests.  When selecting quest givers to visit and quests to perform, the PCs always favour the closest quest givers and quest locations.

This is a big step forward from previous implementations, but there are still a few improvements to be made (I’ll do these tomorrow);  most notably, the PCs should check the distance to the next quest giver, and compare that against the distance to its nearest active quest, and do whichever of the two is closest, instead of always preferring to visit the new quest giver.  But I’m pretty thrilled to see the PCs actually now coping with having lots of quests active at once, and more than one quest giver in a single region.

In the screenshot, we have two quest givers (they’re a little hard to see, since they’re small and the lighting isn’t favourable), and two grinding zones.  The PCs here first talk to both quest giver NPCs, and then go to perform the quests, then return to pick up more quests.

Tomorrow, a little more smarts for choosing whether to pick up more quests or whether to complete quests they already have.