Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2010, 08:48 PM
Brewhaus
Sarnak
 
Join Date: Aug 2010
Posts: 38
Default Maps/*.path files

I'm not sure which forum these questions should be in. After searching these forums for days on end I've only been able to find 21 {zonename}.path files. This seems like a pretty important part of the experience. Are there more of these files somewhere? If not, is there a movement going to get these files created? If so where would I find that information? Like if I path out a zone using the built in commands, where would I submit the file to?

Thanks!
Reply With Quote
  #2  
Old 09-06-2010, 01:15 PM
Brewhaus
Sarnak
 
Join Date: Aug 2010
Posts: 38
Default

So I'm getting close to finishing the pathing for hate plane (original) and I'd like to share it with the community but need to know how! Thing is frigin huge though, like 1750 nodes, taken forever.
Reply With Quote
  #3  
Old 09-06-2010, 04:02 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

If you want to email it to me (DerisionEQ at gmail.com), or upload it to one of the various file sharing sites (rapidshare, megaupload etc) and email me the download link
when you are done, I can commit it to the Maps SVN repo http://code.google.com/p/eqemumaps/

If it looks good and you plan on doing more .path files, I can give you commit access and you can commit your own after that if you want, and are comfortable using SVN
Reply With Quote
  #4  
Old 09-07-2010, 11:35 AM
Brewhaus
Sarnak
 
Join Date: Aug 2010
Posts: 38
Default

Ok, will do. Ya, I am comfortable with SVN as I code for a living.


Follow-up question about pathing... Do you know how pathing works if a mob can't find a path to the character they aggro on? Do they path to the nearest node to the character and then take a direct path from that node or do they not use any pathing and just b-line to the character? The reason I ask is that I wasn't planning on putting pathing on the outer wall in hate. I was hoping the mobs would path to the nearest node at the base of the wall and then take a direct line to you but I haven't tested it yet. If I have to place nodes on the wall the mobs are either going to path weird on the wall or there will have to be hundreds of nodes on the wall.
Reply With Quote
  #5  
Old 09-07-2010, 02:12 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

The pathfinding algorithm works like this, from initial aggro:
Code:
If the mob has Line-Of-Sight to the player, and there are no large vertical drops in between them, the mob runs directly toward
the player.

If there is no LoS, or there are large vertical drops, then:

   A list of nearby path nodes to the mob is determined and from these candidates, the node that is nearest to the player is
   selected.

   A list of nearby path nodes to the player is determined and from these candidates, the node that is nearest to the mob is
   selected.

   The shortest route between the start and end nodes (via other path nodes) is calculated.

   The mob paths to the start node, follows the nodes to the end node, then runs directly to the player.
Things are actually slightly more complicated than that. As the mob is pathing, it will periodically check if the player has moved, and recalculate it's route
if the player moves by a certain amount.

Also, as it's following it's route, the mob will periodically check if it now has LoS to the player, in which case it will discard it's route and just make a bee-line toward the player.

In the event that there is no route between the mob and the player that can be determined as I have described above, then the mob will just run directly toward the player, regardless of whether there are walls or other obstacles in the way.

As long as any place on the Hate plane wall has LoS to a path node on the ground, then you shouldn't need to put any nodes on the wall itself.

The key thing in placing path nodes is to ensure that everywhere in the zone has LoS to a node, but not to put too many redundant nodes.

e.g.

if you have a long straight corridor with no alcoves or rooms branching of it, you only need one node at each end.

If you have a square room, you really only need one node outside the door to the room and one just inside, that will have LoS to any location inside the room.

Last edited by Derision; 09-07-2010 at 05:02 PM..
Reply With Quote
  #6  
Old 09-07-2010, 02:56 PM
Brewhaus
Sarnak
 
Join Date: Aug 2010
Posts: 38
Default

Awesome, thanks for the info! Turns out I way over did the nodes!

Is there a way to delete nodes? I haven't found a way with the ingame commands. I meant to try using depop and seeing if that did it but my guess is it will just remove the representation of the node and not the node itself.

Perhaps I will just need to start over but it's going to suck to throw away like 10 hours of work. :P
Reply With Quote
  #7  
Old 09-07-2010, 03:17 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Looking at the source code, there is a '#path remove' command (which is not listed by #path help) which appears to remove the targetted node.

EDIT: Looking back at some previous posts, it appears you may have to use '#path resort' after deleting a node. I'm not quite sure, as KLS added those in-game commands
and I've not created any .path files since the in-game path creation commands were implemented.

Last edited by Derision; 09-07-2010 at 03:26 PM..
Reply With Quote
  #8  
Old 09-07-2010, 03:22 PM
Brewhaus
Sarnak
 
Join Date: Aug 2010
Posts: 38
Default

Also, I was noding rooms with columns to try and make it so mobs could path every possible way through the room, is that not necessary? For example a room that looks like the following:

X = column
O = node


Code:
__________________________________________
|    O      O       O       O       O    |
|                                        |
|   XX     XX      XX      XX      XX    |
|O  XX  O  XX   O  XX   O  XX   O  XX   O|
|                                        |
|   O       O       O       O       O    |
|                                        |
|   XX     XX      XX      XX      XX    |
|O  XX  O  XX   O  XX   O  XX   O  XX   O|
|                                        |
|    O      O       O       O       O    |
|                                        |
|   XX     XX      XX      XX      XX    |
|O  XX  O  XX   O  XX   O  XX   O  XX   O|
|                                        |
|    O      O       O       O       O    |
------------------------------------------
This would allow the mob to take the shortest route to you no matter where you are at. You could remove a large number of nodes and still have LOS to a node no matter where in the room you are but unless I'm missing something it could create weird pathing in some cases with fewer nodes.
Reply With Quote
  #9  
Old 09-07-2010, 03:23 PM
Brewhaus
Sarnak
 
Join Date: Aug 2010
Posts: 38
Default

Quote:
Originally Posted by Derision View Post
Looking at the source code, there is a '#path remove' command (which is not listed by #path help) which appears to remove the targetted node.
Excellent, thank you!
Reply With Quote
  #10  
Old 09-07-2010, 03:38 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by Brewhaus View Post
Also, I was noding rooms with columns to try and make it so mobs could path every possible way through the room, is that not necessary? For example a room that looks like the following:

X = column
O = node


Code:
__________________________________________
|    O      O       O       O       O    |
|                                        |
|   XX     XX      XX      XX      XX    |
|O  XX  O  XX   O  XX   O  XX   O  XX   O|
|                                        |
|   O       O       O       O       O    |
|                                        |
|   XX     XX      XX      XX      XX    |
|O  XX  O  XX   O  XX   O  XX   O  XX   O|
|                                        |
|    O      O       O       O       O    |
|                                        |
|   XX     XX      XX      XX      XX    |
|O  XX  O  XX   O  XX   O  XX   O  XX   O|
|                                        |
|    O      O       O       O       O    |
------------------------------------------
This would allow the mob to take the shortest route to you no matter where you are at. You could remove a large number of nodes and still have LOS to a node no matter where in the room you are but unless I'm missing something it could create weird pathing in some cases with fewer nodes.
For a room like that, my first reaction would be to lay out the nodes like this to provide full coverage with the fewest nodes:
Code:
__________________________________________
| O     O       O       O       O      O |
|                                        |
|   XX     XX      XX      XX      XX    |
|   XX     XX      XX      XX      XX    |
|                                        |
| O     O       O       O       O      O |
|                                        |
|   XX     XX      XX      XX      XX    |
|   XX     XX      XX      XX      XX    |
|                                        |
| O     O       O       O       O      O |
|                                        |
|   XX     XX      XX      XX      XX    |
|   XX     XX      XX      XX      XX    |
|                                        |
| O     O       O       O       O      O |
------------------------------------------
but you are right that this might look 'unnatural' with the mobs running straight lines and making 90 degree turns rather than taking diagonal paths
which would be shorter and look more intelligent, so yes, your placement is probably the best in that scenario
Reply With Quote
  #11  
Old 09-07-2010, 04:02 PM
Brewhaus
Sarnak
 
Join Date: Aug 2010
Posts: 38
Default

Just kinda talking to myself now...

Thinking a little more about how it works, it seems that in the perfect world in order for mobs to always take the shortest route possible you would want a node at every external corner. What I mean by external is that if you are at a corner and you are on the side with > 180 degrees, you need a node. This would allow mobs to path from one corner to the next perfectly. The amount of connections would be pretty ridiculous though. I'm assuming that at some point you would hurt performance or the algorithm for finding best path would fail or something. But take the following two rooms for example:

Code:
O                                          O
 ------------------------------------------
 |                                        |
 |  O  O                                  |
 |   XX                                   |
 |   XX                                   |
 |  O  O        O                         |
 |               -------------------------|
 |               |                         O
 |     O  O      |                         
 |      XX       |    O                    O
 |      XX       |     |------------------|
 |     O  O      |     |                  |
 |               |     |            O O   |
 |               |     |      O  O   |    |
 |               |     |       XX    |    |
 |               |     |       XX    |    |
 |       O       |     |      O  O   |    |
 -------- --------     |             |    |
O        O        O    |	     -----|
O                   O  |            O     |
 ------------------- --|		  |
 |                  O   O                 |
 |                              O         |
 |    O  O                       ---------|
 |     XX                       O         |
 |     XX                                 |
 |    O  O                                |
 |                                        |
 ------------------------------------------
O                                          O
And my original example would be:
Code:
__________________________________________
|                                        |
|  O  O   O  O    O  O    O  O    O  O   |
|   XX     XX      XX      XX      XX    |
|   XX     XX      XX      XX      XX    |
|  O  O   O  O    O  O    O  O    O  O   |
|                                        |
|  O  O   O  O    O  O    O  O    O  O   |
|   XX     XX      XX      XX      XX    |
|   XX     XX      XX      XX      XX    |
|  O  O   O  O    O  A    O  O    O  O   |
|                                        |
|  O  O   O  O    O  O    O  O    O  O   |
|   XX     XX      XX      XX      XX    |
|   XX     XX      XX      XX      XX    |
|  O  O   O  O    O  O    O  O    O  O   |
|                                        |
------------------------------------------
You wouldn't need any nodes along the walls because whenever the mob got to the last corner they would have LOS on you. The node I labeled A would have 10 connections; I guess that isn't that bad.
Reply With Quote
  #12  
Old 09-07-2010, 04:23 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Yeah you most likely have to resort after deletes to avoid crashes in game.
Reply With Quote
  #13  
Old 09-08-2010, 07:15 PM
Brewhaus
Sarnak
 
Join Date: Aug 2010
Posts: 38
Default

So everything was going good... I have all of the buildings on the first floor pathed out and working and then I stumbled onto this humdinger in the second building I was pathing out on the second floor. I can't figure out why this is happening... Bug with the pathing code maybe? I don't know and I don't know how to fix it.



I have checked multiple times to make sure the nodes are connected and they are.
Reply With Quote
  #14  
Old 09-08-2010, 07:28 PM
Brewhaus
Sarnak
 
Join Date: Aug 2010
Posts: 38
Default

Well, I disconnected and reconnected all the nodes in the building and it seems to be working now. That was strange.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:43 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3