Path Grids - what are they good for?

Post » Sat Jan 07, 2017 4:29 am

This is one of these questions I never thought to ask before because it seemed fairly straightforward--until I really thought about it, oh ten years after using them (and struggling with their annoying little glitches). But if you have a cell that's only ever going to be inhabited by you and maybe some companions (hopefully all with follow scripting), are they really necessary in every tiny cell? I hate working with the things so much, maybe I'm just looking for any excuse to get out of doing them, but are companions really going to be more jammed into a place like a tiny bathroom and not walking into walls any less without them? Because even with a path grid, AI pathing in such tiny spaces svcks so much, you're pretty much relying on warping to get your companions out of there again.



So. Path grids. Totally useless in those situations or should I still bother?



But questions aside, let's take a moment to [censored] about path grids. Like when you stop one short of a barrier or ledge, but the NPC hits it and never stops walking. So instead of stopping at the fence or on the edge of a balcony and gazing meditatively over it, they try to walk into or off it, never getting anywhere. They just keep walking and walking and walking.



And how about when you set one neatly in the center of a wide hall with no obstacles and assign it position in the AITravel function, but the capricious engine has decided your path grid is not the absolute correct z-height relative to the floor, even though the difference can be measured in pico-whatever-units, so the AI is never going to finish that wander package. Ever. Hope you like the taste of failure, because no matter how many times you adjust it, load the game, watch the NPC do nothing, exit, load the CS and try again, they will never get there.



Oh, oh, and hey, how about when you generate a default path grid and it leaves several halfway up a wall, so the NPC would be trying to climb a bookshelf or something. Gotta love that.



Pathgrids. :flamethrower:

User avatar
Marguerite Dabrin
 
Posts: 3546
Joined: Tue Mar 20, 2007 11:33 am

Post » Sat Jan 07, 2017 6:04 am

It's a question of the game engine needing it for a few instances, but it has to be ubiquitous to work. You either have grid based pathing or you don't, as trying to mix methods in a single game is too painful. However, where they're not being actually used, they don't have to work properly, if you see what I mean.



This was a step towards the NPC wandering that came in with TES IV, where a character can walk off to a different city one a month, and you'll get to see them on the road. Morrowind characters stay in one place, or they get disabled, and a clone enabled at a new location. They don't actually travel in between.

User avatar
Amber Hubbard
 
Posts: 3535
Joined: Tue Dec 05, 2006 6:59 pm

Post » Sat Jan 07, 2017 2:09 pm

Yeah, the implementation just wasn't there yet. I've dabbled with modding Skyrim, and boy do they work well now. MW path grids are half-baked in comparison--barely functional.


I guess my worst problems come from trying to design paths for followers and wandering NPCs in the same cell. There's no way to tell the non-follower not to use specific walkways. And what do they do when a path stops in front of a shaft and continues below? They sure try hard to get to that next path point, even though they're not connected. I thought that would be the whole point of not connecting them, but coding the NPCs to find a grid path if they're not on one means they'll also pick one they can't get to and walk in place forever to try to get to it.


And then there's the problem of designating where they're allowed to inhabit vs. where they're allowed to walk. MW's path grids make no distinction, so if you need to set a point to turn a corner in a hall, the NPC (unless severly restricted by distance in their wander package) will promptly make a beeline for it and stand there, blocking the way.


I'd blame the weirdness of Telvanni architecture for most of my NPC pathing problems, but I've seen this same dumb [censored] happen in far kinder tilesets.


Real question: what does the game engine do when a grid point is too high or low anyway? In my experience it can barely handle any discrepancies, so I try way too hard to get that little green box around the point to be fully visible (gotta love those curved Telvanni floors!) but all it does is seem to make the problem worse.
User avatar
djimi
 
Posts: 3516
Joined: Mon Oct 23, 2006 6:44 am


Return to III - Morrowind