PDA

View Full Version : pathing question


kavren
10-14-2009, 09:46 PM
This question is more of a curiosity. Can someone explain to me about "pathing". My understanding is that it is the path that mobs follow. But is it in the database? In the emu code? If it is in one, or both, where can I go to look at it? The "Project 1999" server worked on their pathing, I was wondering why, and what would making the adjustments do.

Shin Noir
10-14-2009, 10:33 PM
Well, pathing is likely related to the node system inside EQEMU. Here's my understanding of how to make mobs move around:

You have paths. This is how a NPC tries to figure how to get to a target that attacked. When a path file isn't specified, the mob more or less ignores every obstruction and makes a bee line straight to you. With a path, it tries to calculate the best way to reach you by following nodes it knows it can walk, avoiding walls when possible, but will some times run through them if they can't calculate a way to you without doing so. When you create path files, it is a pretty high CPU intensive process, and also takes a bit of time to generate as you more or less have to figure out all the potential pathing routes manually by moving there and spawning nodes yourself, and letting the server try to calculate how they all connect, then manually verifying the paths look good. Once you finish this process though, they are saved in a *.path file, and aren't so intensive afterwords for making mobs utilize them. Just glancing at the latest PEQ SVN: bazaar, befallen, beholder, blackburrow, crushbone, crystal, gukbottom, highkeep, mistmoore, najena, poknowledge, qeynos2, sebilis, soldunga, soldungb, ssratemple, templeveeshan, tutorialb, unrest, velketor currently have path files. Every other zone you're likely going to see mobs doing VERY weird pathing (like bee lining for you instead of avoiding walls etc). P1999 probably has generated more path files is all their note means. There's some built in GM commands for generating path nodes, but this is something still being developed last I heard.

You have grids. These are quest file/db spawn driven waypoints that a mob follows while not under attack. They are pretty simple, and handled via quest scripts or the grid table. This is your "roam" npc code.

You then have maps. These as I understand help the server figure out how the world is mapped out, for reasons like line of sight checks. It makes it so the server knows when your position has a clear sight to the enemy or not, if a wall exists, stuff like that. There's a map file I think for every zone, and I think azone is a tool used for this.

With the combination of these 3 files, you have what's needed to make a pretty much EQ-equivalent experience of various zones. map files can be generated, paths have to be manually done, and grids are typically manually, unless a packet collector tries to generate them for you, and packet collecting is something that has been not working for a bit (which is why mobs in newer zones tend to not be there, it's hard to add them all manually one by one, and tell them where to go).

This is also why in Project 1999 all those roaming mobs in Nektulos seem so crazy, it's likely P1999 working on a manual fix of the grid system. (It's crazy in my book at least)