Waypointing Questions

I’d appreciate any advice or insights that are offered. I’m populating the interior of a keep, trying to set up day-night waypoint sets for all the NPCs, and I’m running into an odd pathfinding problem. Or maybe it isn’t a problem, and this is just how it works. I don’t know if it makes a difference but I’m using AWW.

The problem: when NPCs cross over into another area, it seems like their pathfinding breaks down and they get stuck in certain spots until my character loads in, upon which the NPC suddenly realizes how to circumvent the obstacle, and proceeds to their waypoint. Is this normal? Do I need to waypoint more specific paths to make sure they walk their waypoints unattended? Do more waypoints mean increased CPU load?

Finally, I’ve seen some modules use the ASG spawn kit. Is that a better option for reliably getting NPCs where they need to be?

Normal.

@Meaglyn would know about AWW, but, more generally, when an NPC enters an area with no PCs, by default their AI level drops to very low. When a PC enters that area, their AI returns to normal.

You can change this in the area OnEnter script:

      SetAILevel(GetEnteringObject(), AI_LEVEL_NORMAL);

For performance reasons, you might want to limit that to creatures whose unseen performance is important, and exclude the OnEnter event triggered by spawning.

Yes, what @proleric said. I thought I mentioned that in the aww readme, but clearly I just thought it instead :slight_smile:

Manually setting the AI is useful for people who are not going to be in combat ever. It is needed to get them to move across area waypoints when no PC is in the area though.

More waypoints won’t mean more cpu (unless you go crazy then maybe). But more NPCs running higher AI levels in unoccupied areas will.

If you really need them to move from place to place then you can use waypoints. If you just need them in specific places at specific times you may be better off spawning. I use NESS for that. Have no knowledge one way or the other about ASG.

It can look really cool when everyone is setup to move around at different times (see the ambient city demo module around here somewhere) but it does come at a performance cost.

1 Like

Thanks both of you for the responses. About the AI meaglyn, whether or not it was in the readme, there’s a good chance I would have missed it, or forgotten it. I’ve never been been very good at coding or scripting, so absorbing all of this has been a bit of a brain burner for me. I’m getting better though.

I checked out ambient city, and it’s fantastic, but dammit, now I need to learn it, because it’s absolutely perfect for my current project. It’ll be well worth the time it takes to really figure it out. I’ve just begun to populate, so I don’t have much time sunk. Cheers.