Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #16  
Old 07-27-2009, 03:19 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

By default, the new pathing should be on, but you can disable it with rules if you like. Here is the section from ruletypes.h that deals with the new pathing:

Code:
RULE_CATEGORY( Pathing )
// Some of these rules may benefit by being made into columns in the zone table,
// for instance, in dungeons, the min LOS distances could be substantially lowered.
RULE_BOOL ( Pathing, Aggro, true )		// Enable pathing for aggroed mobs.
RULE_BOOL ( Pathing, AggroReturnToGrid, true )	// Enable pathing for aggroed roaming mobs returning to their previous waypoint.
RULE_BOOL ( Pathing, Guard, true )		// Enable pathing for mobs moving to their guard point.
RULE_BOOL ( Pathing, Find, true )		// Enable pathing for FindPerson requests from the client.
RULE_BOOL ( Pathing, Fear, true )		// Enable pathing for fear
RULE_REAL ( Pathing, ZDiffThreshold, 10)	// If a mob las LOS to it's target, it will run to it if the Z difference is < this.
RULE_INT  ( Pathing, LOSCheckFrequency, 1000)	// A mob will check for LOS to it's target this often (milliseconds).
RULE_INT  ( Pathing, RouteUpdateFrequencyShort, 1000)	// How often a new route will be calculated if the target has moved.
RULE_INT  ( Pathing, RouteUpdateFrequencyLong, 5000)	// How often a new route will be calculated if the target has moved.
// When a path has a path node route and it's target changes position, if it has RouteUpdateFrequencyNodeCount or less nodes to go on it's
// current path, it will recalculate it's path based on the RouteUpdateFrequencyShort timer, otherwise it will use the
// RouteUpdateFrequencyLong timer.
RULE_INT  ( Pathing, RouteUpdateFrequencyNodeCount, 5) 
RULE_REAL ( Pathing, MinDistanceForLOSCheckShort, 40000) // (NoRoot). While following a path, only check for LOS to target within this distance.
RULE_REAL ( Pathing, MinDistanceForLOSCheckLong, 1000000) // (NoRoot). Min distance when initially attempting to acquire the target.
RULE_INT  ( Pathing, MinNodesLeftForLOSCheck, 4)	// Only check for LOS when we are down to this many path nodes left to run.
// This next rule was put in for situations where the mob and it's target may be on different sides of a 'hazard', e.g. a pit
// If the mob has LOS to it's target, even though there is a hazard in it's way, it may break off from the node path and run at
// the target, only to later detect the hazard and re-acquire a node path. Depending upon the placement of the path nodes, this
// can lead to the mob looping. The rule is intended to allow the mob to at least get closer to it's target each time before
// checking LOS and trying to head straight for it.
RULE_INT  ( Pathing, MinNodesTraversedForLOSCheck, 3)	// Only check for LOS after we have traversed this many path nodes.
RULE_INT  ( Pathing, CullNodesFromStart, 1)		// Checks LOS from Start point to second node for this many nodes and removes first node if there is LOS
RULE_INT  ( Pathing, CullNodesFromEnd, 1)		// Checks LOS from End point to second to last node for this many nodes and removes last node if there is LOS
RULE_REAL ( Pathing, CandidateNodeRangeXY, 400)		// When searching for path start/end nodes, only nodes within this range will be considered.
RULE_REAL ( Pathing, CandidateNodeRangeZ, 10)		// When searching for path start/end nodes, only nodes within this range will be considered.
As long as you don't have them disabled in your rules, and you have the .path files in your maps folder, it should work. It is awesome to do a #aggrozone in PoK and watch all of the NPCs run to attack you, then turn around and start pathing back after they get to you (by default, PoK is a non-combat zone). Almost ever NPC I followed after doing that walked back to their spawn point with perfect pathing. The only one I saw that didn't was a roamer that has a pathing grid set on it and normally paths through walls in the first place :P
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #17  
Old 07-27-2009, 03:18 PM
vales
Discordant
 
Join Date: May 2006
Posts: 458
Default

Awesome. Thanks for that, KLS and Trev.


The MaNGOS guys have a pretty neat waypoint/pathing system as well. Maybe you can "borrow" some of their code to make it easier as well.

As of now, if you target an NPC and type some commands to get their info, it will actually show their waypoint ID as well. This way, you can identify what NPC has what waypoint and pathing ID without having to guess what goes on who. It also has a MySQL entry iirc, so you can find it much easier as well.
Reply With Quote
  #18  
Old 08-29-2009, 02:48 PM
Opulens
Fire Beetle
 
Join Date: Aug 2009
Location: U.S
Posts: 10
Default

Quote:
Originally Posted by KLS View Post
I'm going to start uploading any maps I make to the map svn, I did tutorialb and worked on mistmoore a bit, there were certain spots that were unreachable on the map.

Also fixed up yet more #path stuff, including a crash related to adding and deleting nodes. Also including adding #path resort nodes which is needed if you ever get your node ids out of order, like if for example you ever create node 1 2 3 4 5 and then delete node 3 so it's 1 2 4 5 it will cause issues because some of the code assumes nodes are in order and none are missing.
We get the following error now:
19610 [08.29. - 11:25:50] Unsupported path file version.
19610 [08.29. - 11:25:50] Path File ./Maps/tutorialb.path failed to load.


Please advise..
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 01:49 PM.


 

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