• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

A fix for off mesh issues with MQ2Nav... (1 Viewer)

joojoobee

A Member to Remember
Creator
Joined
May 15, 2016
RedCents
4,327¢
A little workaround for off the grid errors with MQ2Nav. If, for instance, you are standing in a non-mapped region, or the NPC or target is off the grid, this tries to move you back onto the mesh or find a position CLOSE to the target that is on the mesh.

It's not perfect, but just giving some ideas I've been working on. I basically replaced all "/nav id" or "/nav target" calls by the puller to the target in kissassist with:
/call MQ2NavFix X Y Z

XYZ is the location or NPC you want to Nav to. The snippets will try to get you back on the mesh, and/or find a position closer to the NPC that is on the mesh. Can be more sophisticated for the Target than I've coded right now, but it's a start...

Joojoobee (JJB)

ps-- I was looking at MQ2Nav code last couple of days and I think I can add a couple of calls (.TargetOnMesh or .MeOnMesh) that might make this easier than the code I am using here. We'll see if I understand Brainiacs code well enough to mess with that.

Rich (BB code):
|: --------------------------------------------------------------------------------------------
|: SUB: MQ2NavFix
|: --------------------------------------------------------------------------------------------
    Sub MQ2NavFix(float Xcheck, float Ycheck, float Zcheck)
    |: Check to see if can move
    |: Is it destination or starting problem?
    |: if starting position is wrong, try to /circle out of it (I found MoveTo to be problematic, but /circle worked great.  Could me made more sophisticated...
    |: Need a version that if close to 


    /echo Entering NavFix
    |:  Checks if my start position is off the grid.  Do do this, looks 0.5 in every direction and sees if it can move there.
    |:  If off grid, try to move until on the grid.  Use ${Navigation.PathExists[target]} as the boolean for getting to the grid.
    /call checkMeMQ2Nav
    
    |: Look for places NEAR the target that are on grid.  Need eventually a check for whether that position is on the other side of a wall or something, but for now this is a start.            
    /call checkMQ2Nav ${Xcheck} ${Ycheck} ${Zcheck}            

    /return


|: --------------------------------------------------------------------------------------------
|: SUB: checkMeMQ2Nav
|: --------------------------------------------------------------------------------------------
    sub checkMeMQ2Nav

    /declare circleTimer timer local 0
  /declare moveDist int local 0.5
    /
    /varset circleTimer 3s

    /if (${Navigation.PathExists[locxyz ${Math.Calc[${Me.X}+${moveDist}]} ${Me.Y} ${Me.Z}]} && ${Navigation.PathExists[locxyz ${Math.Calc[${Me.X}-${moveDist}]} ${Me.Y} ${Me.Z}]} && ${Navigation.PathExists[locxyz ${Me.X} ${Math.Calc[${Me.Y}+${moveDist}]} ${Me.Z}]} && ${Navigation.PathExists[locxyz ${Me.X} ${Math.Calc[${Me.Y}-${moveDist}]} ${Me.Z}]}) {
        /return
    } else {
        /circle on 6
        /echo circling
        /while (!${Navigation.PathExists[target]}) {
            /delay 5
            /if (${circleTimer}==0) {
                /echo backwards
                /circle backward
                /varset circleTimer 3s
            }
        }
        /circle off
    }

    /return


|: --------------------------------------------------------------------------------------------
|: SUB: checkMQ2Nav
|: --------------------------------------------------------------------------------------------
    sub checkMQ2Nav(float Xcheck, float Ycheck, float Zcheck)
    /declare xNew float local ${Xcheck}
    /declare yNew float local ${Ycheck}
    /declare moveDist int local 2
    /declare moveLess float local ${Math.Calc[${moveDist}+0.5]}


    /if (!${Navigation.PathExists[locxyz ${Xcheck} ${Ycheck} ${Zcheck}]}) {
        
        /if (${Navigation.PathExists[locxyz ${Math.Calc[${Xcheck}+${moveDist}]} ${Ycheck} ${Zcheck}]}) {
            /varset xNew ${Math.Calc[${Xcheck}+${moveDist}]}
            /echo xNew + ${moveDist}
        } else /if (${Navigation.PathExists[locxyz ${Math.Calc[${Xcheck}-${moveDist}]} ${Ycheck} ${Zcheck}]} ) {
            /varset xNew ${Math.Calc[${Xcheck}-${moveDist}]}
            /echo xNew - ${moveDist}
        } else /if (${Navigation.PathExists[locxyz ${Xcheck} ${Math.Calc[${Ycheck}+${moveDist}]} ${Zcheck}]} ) {
            /varset yNew ${Math.Calc[${Ycheck}+${moveDist}]}
            /echo yNew + ${moveDist}
        } else /if (${Navigation.PathExists[locxyz ${Xcheck} ${Math.Calc[${Ycheck}-${moveDist}]} ${Zcheck}]} ) {
            /varset yNew ${Math.Calc[${Ycheck}-${moveDist}]}
            /echo yNew - ${moveDist}
        }
    }

    /squelch /nav locxyz ${xNew} ${yNew} ${Zcheck}

    /return
 
Last edited:
This being added to kiss would be SUPER useful (until MQ2Nav is updated).
 
I have never seen this happen. either my mesh works or it doesn't
 
why would you want something that is intended to read from a mesh, not read from a mesh? why not see if brainiac can merge advpath and nav to do the same thing your doing? If it cant read the mesh advpath to it then advpath back to the mesh and nav back.....
 
I have never seen this happen. either my mesh works or it doesn't

I've seen this. Try using MQ2Nav in Lceanium, particularly in the eastern field area where the named Yeti with the pet focii earring spawns. I think mine would run reliably for 5-10 minutes and then when it got to a certain point where it was pulling the two drovalgs (or however you spell it) where one is a named PH'er, then it would go wonky on me and start pathing back and forth and back and forth and back and forth until eventually quitting. It took a long time for it to reset, though. I had similar things happen in skyfire, but not to the same extent.
 
^^^^ what he said.

For instance trying to use MQ2Nav to collect shinies from the ground in Lce is a PITA because they spawn where the mesh is not allowing a path to.

Here, try this out in Lce (or any zone really, that has shinies in odd places) it is very simplistic. What I do is use a friend's rogue to collect in X zone while I am playing my main group. Every 5-10m or so I check on the rogue and "/mqpause on" then get him unstuck trying to obtain an unobtainable shiny (usually just manually navigate to it and grab it) then unpause and let him to his thing. (works best using a rogue with SOS2 of course)


Rich (BB code):
|Collection V2.1
|NecroGnomie Flavored!
|
|	This is designed to have a rogue run around collecting "shinies"
|
|	REQUIREMENTS:
|		MQ2Nav
|

#CHAT BC
#turbo 40

	 

Sub Main
	/if (!${Me.Class.ShortName.Equal[ROG]}) {
		/echo \ar WARNING \ay This macro is intended for rogues only!!
		/end
		}
	/if (${Bool[${Plugin[MQ2EQBC]}]}) {
		/if (!${Defined[ChatChannel]}) {
			/declare ChatChannel BC
			} else {
			/declare ChatChannel Echo
			}
		}
	/if (${Bool[${Plugin[MQ2Nav]}]}) {
		/if (!${Navigation.MeshLoaded}) {
			/nav reload
			/delay 5s ${Navigation.MeshLoaded}
			/if (!${Navigation.MeshLoaded}) {
				/echo \ar ERROR \ay Either MQ2Nav is not loaded, or there is no mesh for this zone!!
				/endmacro
				}
			} 
:mainloop
	/if (!${Me.Invis} && ${Me.Class.ShortName.Equal[ROG]}) /call RogueInvis
	/if (!${GroundItemCount[Glowing Globe]}) {
		/echo Are you sure there are shinies here? None in zone...
		/delay 005
		/echo Pausing 30 seconds
		/delay 30s ${GroundItemCount[Glowing Globe]}
		/goto :mainloop
		}
	/if (${GroundItemCount[Glowing Globe]}) {
		/invoke ${Ground[Glowing Globe].DoTarget}
		/delay 2s ${Bool[${Ground.ID}]}==TRUE
		/if (${Bool[${Ground.ID}]} == TRUE) {
			/if (${Navigation.PathExists[item id ${Ground[Glowing Globe].ID}]}) {
				/if (${Ground[Glowing Globe].Distance3D}<20) {
					/call GrabShiny
					/goto :mainloop
					}
				/nav item
				/delay 5s
				/if (!${Navigation}) /goto :mainloop
				/delay 60s ${Ground[Glowing Globe].Distance3D}<20
				/if (${Ground[Glowing Globe].Distance3D}<20) /call GrabShiny
				}
			}
		}
	/delay 1s
	/goto :mainloop
	/return	
	
Sub RogueInvis
	:ReDoinvis
	/if (${Me.AbilityReady[Sneak]}) /doability sneak
	/delay 1s
	/if (${Me.AbilityReady[hide]})	/doability hide
	/if (!${Me.Invis}) /goto ReDoInvis
	/return
	
Sub GrabShiny
	/if (${Ground[Glowing Globe].Distance3D}>20) {
		/echo not close enough to grab.....
		/return
		}
	/invoke ${Ground[Glowing Globe].Grab}
	/delay 1s
	/if (${Cursor.ID}) /autoinv
	/if (${Window[InventoryWindow]}) /invoke ${Window[InventoryWindow].DoClose}
	/return

- - - Updated - - -

Oh, the advantage of trying this out is... it wont get you dead while hammering on the "stuck trying to reach unobtainable mesh areas" issue.

I have tried to tinker with editing the mesh but apparently... I am just not grasping. I am up with walkable areas... but they are entirely separate... the nav works in X or Y , but wont cross from X to Y area.
 
Yeah... I tend to make my mesh's with the agent "width" a little larger and higher to avoid getting caught on snags. It means more often than not an NPC is occasionally off mesh. Kiss will eventually ignore the target and move on to another.

But, sometimes my puller after a fight finds himself off mesh... It doesn't happen often, but it happens often enough to be a problem. If he is off mesh it won't work at all unless I first have him MQ2MoveUtil back to camp or do the little trick I did above.

As I said above I would love to implement in Brainiac's DLL... but I suspect it will take me a while to suss out the code workings... :hfive:

- - - Updated - - -

Saar-- yes, I was thinking exactly that around merging ADVPath, etc.
 
A fix for off mesh issues with MQ2Nav...

Users who are viewing this thread

Back
Top
Cart