All,
MQ2Nav use in Kissassist has an issue in that you can only designate the location of the Target to move to... and it's hard to figure out, especially in unpredictable, unsee-able, terrain what might be a good stopping point short of standing on top of the mob while Kiss decides whether to shoot, cast, etc. Kissassist is supposed to stop the nav when the target is LineOfSight... but, well, it doesn't. This is on a top end computer running 9 accounts, so maybe it's an issue with updating variables, etc...
All that said, I started modifying MQ2Nav with a different workaround. Basically, while the movement is active, a routine in MQ2Navigation.cpp is run. I added a simple check for distanceToTarget < MDist (where mdist is a number you provide with a new command I added to my modded MQ2Nav).
I also added this command to MQ2Nav in this subroutine
Probably a better place to put it that there, but it was the easiest to mod. I am not a C++ coder and Brainiac is would probably conniptions with my bad coding style.
The command would be:
/nav mdist 50 | stops 50 units from the mob
/nav mdist 0 | goes right up to be on top of the mob
/nav mdist ${dist} | stops at the distance in the variable ${dist}
Examples are in the pull routine modifications below. What this does is run to within 100 units, check if Lineofsight (LOS)... subtract 10... run to 90, check if LOS, etc. Then, when LOS it starts the pull. Infinitely better pulls and far far fewer deaths.
Next up mods for Brainiac's MQ2Nav for me are:
None of the above possible of course without Maskoi's, EQmule's Ctaylor's, Redbot's etc. MQ2 and of course Brainiac's gorgeous MQ2Nav (which I am only just starting to understand).
JJB
PS-- whether any of the above gets into either MQ2Nav or any of the various iterations of Kissassist is beyond my control. Just telling people here what's possible and what I got to work.
MQ2Nav use in Kissassist has an issue in that you can only designate the location of the Target to move to... and it's hard to figure out, especially in unpredictable, unsee-able, terrain what might be a good stopping point short of standing on top of the mob while Kiss decides whether to shoot, cast, etc. Kissassist is supposed to stop the nav when the target is LineOfSight... but, well, it doesn't. This is on a top end computer running 9 accounts, so maybe it's an issue with updating variables, etc...
All that said, I started modifying MQ2Nav with a different workaround. Basically, while the movement is active, a routine in MQ2Navigation.cpp is run. I added a simple check for distanceToTarget < MDist (where mdist is a number you provide with a new command I added to my modded MQ2Nav).
Rich (BB code):
if (m_activePath->IsAtEnd() || distanceToTarget < MDist() )
{
WriteChatf(PLUGIN_MSG "\agReached destination at: %.2f %.2f %.2f || %.2f",
dest.y, dest.x, dest.z, distanceToTarget);
LookAt(dest);
if (m_pEndingItem || m_pEndingDoor)
{
AttemptClick();
}
Stop();
}
else if (m_activePath->GetPathSize() > 0)
{ ... etc.
I also added this command to MQ2Nav in this subroutine
Rich (BB code):
std::shared_ptr<DestinationInfo> ParseDestination(const char* szLine, NotifyType notify)
... various code
// parse /nav distance to stop at #
if (!_stricmp(buffer, "mdist"))
{
GetArg(buffer, szLine, 2);
double distToTarget = 0;
try { distToTarget = boost::lexical_cast<double>(buffer); }
catch (const boost::bad_lexical_cast&)
{
if (notify == NotifyType::Errors || notify == NotifyType::All)
WriteChatf(PLUGIN_MSG "\arBad Distance to Stop at");
return result;
}
if (notify == NotifyType::All)
WriteChatf(PLUGIN_MSG "--> mdist set to: %.2f", distToTarget);
g_mq2Nav->mdistt = distToTarget;
return result;
}
Probably a better place to put it that there, but it was the easiest to mod. I am not a C++ coder and Brainiac is would probably conniptions with my bad coding style.
The command would be:
/nav mdist 50 | stops 50 units from the mob
/nav mdist 0 | goes right up to be on top of the mob
/nav mdist ${dist} | stops at the distance in the variable ${dist}
Examples are in the pull routine modifications below. What this does is run to within 100 units, check if Lineofsight (LOS)... subtract 10... run to 90, check if LOS, etc. Then, when LOS it starts the pull. Infinitely better pulls and far far fewer deaths.
Rich (BB code):
|:-------------------------------------------------------------------------------------
|: SUB: Pull Using MQ2Nav
|: -------------------------------------------------------------------------------------
Sub PullUsingNav(int BeginMobNavID,float NavPullDist)
/if (${DebugPull}) /echo \atDEBUGPULL PullUsingNav Enter \agLine#: ${Macro.CurLine}
/varset PullTimer 30
/varset PullNavTimer 1m
/declare mdistance int local 100
|: mdist checks
/nav mdist ${mdistance}
/call MQ2NavFix ${Spawn[${MyTargetID}].X} ${Spawn[${MyTargetID}].Y} ${Spawn[${MyTargetID}].Z} "PullUsingNav 1"
:DistanceCheck
/if (!${Navigation.Active} && !${Spawn[${MyTargetID}].LineOfSight} && !${Target.LineOfSight}) {
/varcalc mdistance ${mdistance}-10
/nav mdist ${mdistance}
/call MQ2NavFix ${Spawn[${MyTargetID}].X} ${Spawn[${MyTargetID}].Y} ${Spawn[${MyTargetID}].Z} "PullUsingNav 1.1"
}
/doevents
/if (!${DragCorpse}) {
/call GrabCorpse
/if (${DragCorpse}) {
/varset PullNavTimer 0
/return
}
}
|: Return if in sub for more than 3 min
/delay 10
|: Corrects heading when mob is moving and your using Navigation.
/if (${Spawn[${MyTargetID}].Speed}>25) {
/call MQ2NavFix ${Spawn[${MyTargetID}].X} ${Spawn[${MyTargetID}].Y} ${Spawn[${MyTargetID}].Z} "PullUsingNav 2"
}
|: Check for Unexpected Aggro
/if ((${AggroTargetID} && !${ChainPull}) || (${Me.XTarget[${XTSlot2}].ID} && ${ChainPull})) {
/echo unexpected aggro 1
/nav mdist 0
/return
}
/squelch /if (${Me.XTarget[${XTSlot}].ID} && ${Me.XTarget[${XTSlot}].ID}!=${MyTargetID} && ${Me.XTarget[${XTSlot}].ID}!=${BeginMobNavID}) {
/squelch /target ${Me.XTarget[${XTSlot}].ID}
/squelch /delay 5 ${Target.ID}==${Me.XTarget[${XTSlot}].ID}
/squelch /if (${Me.TargetOfTarget.ID}==${Me.ID}) {
/echo unexpected aggro 2
/varset PullNavTimer 0
/nav mdist 0
/return
}
/target ${BeginMobNavID}
}
|: Check for being too far from camp.
/if ((${Math.Distance[${CampYLoc},${CampXLoc}]}>=${Math.Calc[${MaxRadius}*.90]} && ${Spawn[${MyTargetID}].Distance}>${Math.Calc[${MaxRadius}*.10]}) || ${Math.Distance[${CampYLoc},${CampXLoc}]}>=${MaxRadius} || ${PullNavTimer}==0) {
/if (${Navigation.Active}) /nav stop
/echo Nav stopped PullUsingNav-- too far from camp
/call BackToCampReset
/varset PullNavTimer 0
/echo too far from camp, prepare to return
/nav mdist 0
/return
}
/if (${Me.Moving} && ${Navigation.Active}) /varset PullTimer 30
/if ((${Spawn[${MyTargetID}].Distance3D}>${NavPullDist} || !${Target.LineOfSight} || !${Spawn[${MyTargetID}].LineOfSight} || ${Spawn[${MyTargetID}].FeetWet}!=${Me.FeetWet}) && ((!${AggroTargetID} && !${ChainPull}) || (!${Me.XTarget[${XTSlot2}].ID} && ${Me.XTarget[${XTSlot}].ID}!=${MyTargetID} && ${ChainPull}))) /goto :DistanceCheck
|: This is where the pull is managed.
/if (${Navigation.Active} && (${Spawn[${MyTargetID}].LineOfSight} || ${Target.LineOfSight}) && (${Spawn[${MyTargetID}].Distance3D}<=${NavPullDist} || ${Navigation.PathLength[id ${Target.ID}]} < 50) && ${Target.FeetWet}==${Me.FeetWet} ) {
/nav stop
/echo Start the Pull Usin gNav Pull...
|: XXX this is where we cast the two protection spells
/call MonkProtectionSpells ${MyTargetID}
/if (!${Spawn[${MyTargetID}].LineOfSight}) {
/nav mdist ${mdistance}
/call MQ2NavFix ${Spawn[${MyTargetID}].X} ${Spawn[${MyTargetID}].Y} ${Spawn[${MyTargetID}].Z} "PullUsingNav 3"
/goto :DistanceCheck
}
}
/varset PullNavTimer 0
/if (${DebugPull}) /echo \atDEBUGPULL PullUsingNav Pulling ${NavPullDist} ${Target.Distance} \agLine#: ${Macro.CurLine}
/if (${DebugPull}) /echo \atDEBUGPULL PullUsingNav Leave \agLine#: ${Macro.CurLine}
/echo Leaving PullUsingNav
/nav mdist 0
/return
Next up mods for Brainiac's MQ2Nav for me are:
- a return # for total number of path steps. ${Navigation.TotalIndex}
- a return # for which path index you are at (if you are in Active Nav) ${Navigation.CurrentIndex}
- a return for providing an index number and it will tell you the path point (treating MQ2Nav points like a waypoint list)-- I want to use this to search the path for MOBs that might aggro. ${Navigation.Index[ # ]}
- I also think I have a way for using the mesh to find nearby points to move towards to make the puller look more natural... but lower on the priority list for me.
None of the above possible of course without Maskoi's, EQmule's Ctaylor's, Redbot's etc. MQ2 and of course Brainiac's gorgeous MQ2Nav (which I am only just starting to understand).
JJB
PS-- whether any of the above gets into either MQ2Nav or any of the various iterations of Kissassist is beyond my control. Just telling people here what's possible and what I got to work.

