Advpath.inc - Moved to new thread.

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Wed Jan 14, 2004 6:18 pm

Bad Karma wrote:Here's something I noticed with the last update.
Tried changing the settings and nothing changed, except how frequently this happened. Recorded coord's and it is occuring at each sample ("waypoint") loc.

When following someone, it runs to the waypoint. It then turns around and runs back to it, then turns around and goes to the next waypoint. Rinse/repeat.

When the target stops, it paces (still). This is new from 2 updates ago.

Everything else seems to be working as intended/described.
Are you using this from within another macro? Or are you using this with the example mac file above? If you are calling it from your own macro I might have to help you integrate it a bit better so that you hit your waypoints better.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Wed Jan 14, 2004 6:51 pm

Updated.
advpath.inc -- Changed 2 instances in the script where I could use $spawn(id,distance,3d) instead of calculating 3d distance via macro calculations. (These get called a decent amount so it might help with performance a little.)

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Wed Jan 14, 2004 9:14 pm

Updated.
advpath.inc -- Added in the ability to run a pattern. You provide the size and number of sides of the object and it will run it indefinately. Use stop or pause to stop running the pattern. Try to use this on a flat surface because I can't really plot the z axis for something like this. If you really need to do it in a hilly area just use the record and play functions for that.

If the turning doesn't look natural enough just make change this:
/call InitAPFVars 1 15 13
to this:
/call InitAPFVars 0 15 13

That will turn off face fast and then it should look nice and natural.

Try around a 50 size or higher to get the feel for how much the size and number of sides makes a difference.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Thu Jan 15, 2004 2:18 am

Updates:
Both the example macro and advpath.inc were updated. There were alot of bug fixes. The one main one with people have the "running back and forth" issue due to short sampling distances *should* be fixed.

You no longer issue 3 parameters to InitAPVars it is only 2.
The default is:
/call InitAPFVars 1 15

First parameter is 1 (use face fast) or 0 (don't use face fast).
Second parameter is a number from 15 or so and down. This number is now used to:
Calculate how far away from a plotted location it will assume is close enough to move to the next loc.
and
Calculate how far in between sampling distances it will plot a loc for the person/npc you are following.

The speed of the character is used when determining the first calculation. The speed of the player/npc you are following is used in the second calculation.

In short this should stop you from having to backtrack to locs in most cases. If for some reason you still see it happen now and then try using the '/echo +' command and keep bumping up the distance mod until it acts right. Once you get a good reading let me know and I can guide you on how best to set your settings up.

There were some issues fixed with the playback function, the new pattern function and various other small fixes.

New additions since the last post are the + and - commands. Please read the top of advpath.inc for details.

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Thu Jan 15, 2004 11:50 pm

Been away at work all week. Will test this out in a little bit.
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Fri Jan 16, 2004 12:20 am

Hold that thought Bad Karma. Posting a new version right now.

Updated:
advpath.inc
example mac

Changed it so that when you first start following you do a normal /face instead of a face fast. Looks more natural.

Added the 'distance' command to change how far you stay away from the followee. Default is 20. I'm going to try to improve this. It has to take a straight path to the first loc when the followee starts moving, if you were in a tight dungeon or something you might not be able to run straight line to the first loc. I'll look at a way to handle this.

Changed the /look routines to only change in degrees of 10. This should stop alot of the "bobbling" while pathing.

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Fri Jan 16, 2004 1:13 am

Good thing I double checked for new messages before I logged in. lol
re-grabbed and testing now...

I'll fire up IRC when I get in....

{edit}: EVIL SMILIES!
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

User avatar
Schark
orc pawn
orc pawn
Posts: 28
Joined: Sat Nov 29, 2003 5:37 am

Post by Schark » Fri Jan 16, 2004 3:29 pm

Doh! The last one seemed to work alot better than the new one, and I forgot to back it up.. any chance you could PM me the one from before this one?

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Fri Jan 16, 2004 5:54 pm

I don't have it any more hehe. I realize this latest one has a few issues because of the initial slow /face commands. I'm going to work on it tonight.

User avatar
Schark
orc pawn
orc pawn
Posts: 28
Joined: Sat Nov 29, 2003 5:37 am

Post by Schark » Fri Jan 16, 2004 8:03 pm

Maybe someone else still has the one from before this one? :)

Follow also seemed to work alot better in the last one, I hardly got the ping ponging with it.. Best release you made yet imho..

Thanks for all your hard work on this great script btw :)

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Fri Jan 16, 2004 10:54 pm

No worries Schark... try the one I just posted.

Update:
advpath.inc

Lots of bug fixes.

When starting to move you will run to the loc the followee was standing before resuming the path. This helps you duplicate a path of the followee better.

Changed the way the non-face fast works. You really shouldn't need to use this mode at all anyways because it looks alot less obvious than it ever has. But if you do, you'll notice that if your next location is at more of an angle than you can turn using /face in the time allotted you will stop, turn and then resume.

The "am I at the plotted loc yet?" code has been greatly improved. It not only checks distances now but keeps track of your heading while facing it at the begenning of the loc and if your angle changes drastically it assumes you've reached the location and goes on to the next. After I added this I noticed alot better accuracy.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Fri Jan 16, 2004 11:25 pm

Somehow smilies got turned on in the main post. I shut them off.

Acidtree
decaying skeleton
decaying skeleton
Posts: 3
Joined: Thu May 27, 2004 6:00 pm

Post by Acidtree » Wed Jul 07, 2004 11:12 pm

I've searched for this would be using advpath.ini for Heros Brew Macro. I'm not finding where the actual .ini file or code is listed, anyone point me there?

Thx