View unanswered posts | View active topics It is currently Sat Apr 25, 2026 9:44 am



Reply to topic  [ 6 posts ] 
 getCourse 
Author Message
Boo! inc.
User avatar

Joined: Sat Oct 09, 2004 2:00 am
Posts: 865
Location: USA
Unread post 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?

_________________
“The object of war is not to die for your corp but to make the other bastard die for his.”

Boo! inc.


Sun Jun 28, 2009 7:30 am
Profile
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1402
Location: Canada
Unread post 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.

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.


Sun Jun 28, 2009 9:15 am
Profile ICQ YIM
Boo! inc.
User avatar

Joined: Sat Oct 09, 2004 2:00 am
Posts: 865
Location: USA
Unread post Re: getCourse
Now is this the most reliable routine to use in means of mowing about? Lets say its a simple gridder?

_________________
“The object of war is not to die for your corp but to make the other bastard die for his.”

Boo! inc.


Sun Jun 28, 2009 11:37 am
Profile
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1402
Location: Canada
Unread post 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.

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.


Sun Jun 28, 2009 1:41 pm
Profile ICQ YIM
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 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.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Sun Jun 28, 2009 1:47 pm
Profile ICQ WWW
Boo! inc.
User avatar

Joined: Sat Oct 09, 2004 2:00 am
Posts: 865
Location: USA
Unread post 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!

_________________
“The object of war is not to die for your corp but to make the other bastard die for his.”

Boo! inc.


Sun Jun 28, 2009 2:02 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 46 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.