www.ClassicTW.com
https://mail.black-squirrel.com/

getCourse
https://mail.black-squirrel.com/viewtopic.php?f=15&t=22414
Page 1 of 1

Author:  mob [ Sun Jun 28, 2009 7:30 am ]
Post subject:  getCourse

Is "getCourse" going to be the most accurate way to plot a course? Ive seen it done a number of different ways but very few use getCourse to do it, some get the course through interrogation and assign to a var. What would be the easiest/accurate way to do this?

Author:  LoneStar [ Sun Jun 28, 2009 9:15 am ]
Post subject:  Re: getCourse

mob wrote:
Is "getCourse" going to be the most accurate way to plot a course? Ive seen it done a number of different ways but very few use getCourse to do it, some get the course through interrogation and assign to a var. What would be the easiest/accurate way to do this?


Usually the method is contextual. That is, GetCourse quieries the TWX DBase and returns a "-1" if a course cannot be plotted. Keep in mind that this sometimes is the result of a course plot longer than the max course (usually 45 Hops). GetCourse in the newer TWX PROXY will work with Avoids that you set via the SetAvoid cmd in TWX.

Using the CIM to plot a course is generally ideal when you don't have a completed Map, Avoids are considered. Generally this is the better way to Go, as Managing Avoids within TWX is as sucessful as the Scripts you use that manage them.

Naturally queying the DBase is faster (my latest YourIT script has an option to plot or not-plot).

Code:
GetCourse $COURSE $START $DESTINATION
if ($COURSE = "-1")
  send "^F" & $START & "*" & $DESTINATION & "**Q"
  waiton ": ENDINTERROG"
  GetCourse $COURSE $START $DESTINATION
  if ($COURSE = "-1")
    Echo "**Unable to Plot Course**"
    Halt
  halt
end

..That's what I usually do.

Author:  mob [ Sun Jun 28, 2009 11:37 am ]
Post subject:  Re: getCourse

Now is this the most reliable routine to use in means of mowing about? Lets say its a simple gridder?

Author:  LoneStar [ Sun Jun 28, 2009 1:41 pm ]
Post subject:  Re: getCourse

mob wrote:
Now is this the most reliable routine to use in means of mowing about? Lets say its a simple gridder?


If you're working with Avoids at all, I would suggest parsing any set Avoids using the 'SetAvoid' command from the game server (after a ClearAllAvoids cmd).

I've personally never had a issue with either process (one is faster than the other). There are times when a target is unreachable --further than Max Warp Distance, corrupted game map, target's behind an avoid, etc-- I believe the course-plot results are reliable and consistant. Might be interesting to create your own course-plots to create a little bit of 'wandering' (ie avoid the 5th sector in a 10sector course and recalculate).

You could write a script to plot 1k random courses and compare the results of GetCourse and Course-plots, and spit out any discrepancies.

Author:  Singularity [ Sun Jun 28, 2009 1:47 pm ]
Post subject:  Re: getCourse

Provided you're not getting shot at, since the CF plot will add time. But getCourse requires an accurate ZTM ahead of time.

So a lot will depend on when/where you're using the gridder. You could make an option if you're uncertain, so you could set it by the circumstance.

Author:  mob [ Sun Jun 28, 2009 2:02 pm ]
Post subject:  Re: getCourse

Well this is mostly for experience and something that is point and click, I am not making any options in it for now so it runs pretty much on its own with my own options hardcoded. Prolly for early game or none shoot situations Im looking to make something fast and smart but somewhat basic so it can be mostly original...with some help of course:) I am going to have some saftys added so you don't go killin yourself of course but still in early stages...any input would be appreciated!

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/