| Author |
Message |
| < TWX scripting help |
|
Posted:
Wed Feb 20, 2008 2:30 am
|
|
|
Joined: 20 Feb 2008
Posts: 9
|
|
The forums here look pretty dead, so I fear that I won't get an answer, however, I see some of the 'big names' in scripting have posted here, so I figured I'd try anyway.
I'm trying to find a way for a script to identify the sectors in a bubble. It would be easy enough to ask user to input sector numbers if the bubble was small, but what if it's a 100 + sector bubble? Can I somehow get the info from the twx database? If not, does anyone have any suggestions for alternative methods of collecting this data? preferably with low turn usage...
Also, I often see where other scripters use some sort of predefined text (?) in their scripts, like the texttrigger #179 etc..... What exactly are those? How can they be defined, or where can I find what they are already defined as so that I can try to use them in my scripts?
Thanks for any assistance/advice you can give me.
Rafar |
|
|
|
 |
|
Posted:
Fri Feb 22, 2008 1:53 pm
|
|
|
Joined: 20 Feb 2008
Posts: 9
|
|
ok, I figured out the #179 thing... Extended character codes.
Still looking for an answer to the bubble issue...
Don't we have anyone here who can come up with a solution for that problem? |
|
|
|
 |
|
Posted:
Sat Mar 01, 2008 12:50 pm
|
|
|
Joined: 30 Jan 2007
Posts: 11
Location: Iowa
|
|
..I'll bite, just since nobody else has piped in.
I don't know about an elegant twx solution, other than brute force:
Input "Door sector? " $doorSector
check each sector:
Does route from sector to terra go thru door?
Does route from terra to sector go thru door?
avoid door
Does route exist from sector to terra?
Does route exist from terra to sector?
thru door + no other routes = bubble sector (add to array)
next sector
I could prolly code it too if I had more coffee..
Shouldn't this work?
Ok uberscripters, make me look sad! _________________ Crosby
Sometimes Galactic Scourge
Before judging another, always walk a mile in their shoes. That way, you'll be a mile away, and have their shoes!! |
|
|
|
 |
|
Posted:
Sun Mar 02, 2008 3:07 am
|
|
|
Joined: 20 Feb 2008
Posts: 9
|
|
I think I could make that work. Would prob be a bit slow, but I could have it save the results so it would only have to do it once per bubble.
Thank you.
Anyone else care to chime in with their ideas? |
|
|
|
 |
|
Posted:
Sat Mar 15, 2008 10:29 pm
|
|
|
Joined: 17 Feb 2007
Posts: 37
|
|
| let me know if you got that done yet? |
|
|
|
 |
|
Posted:
Sun Mar 16, 2008 12:27 am
|
|
|
Joined: 20 Feb 2008
Posts: 9
|
|
Not yet... It's not actually a script that I'm even working on yet. It is just the next one that I'm thinking about trying to tackle after wrapping up a couple that I'm already working on. Still in the thinking about what to do and how to do it phase...  |
|
|
|
 |
|
Posted:
Mon Mar 17, 2008 3:57 am
|
|
|
Joined: 20 Feb 2008
Posts: 9
|
|
Ok.. I tried playing with this some today...
I said it would be a bit slow... Well.. It's more than a bit slow.. This method did work well, but it took about 3 hours in the cim to run once through all possible sectors to sector 1 and create an array of bubble sectors.
There has to be a better way..
TWX already has a database that tracks bubbles. Isn't there some way that we can get info from that database? |
|
|
|
 |
|
Posted:
Tue Mar 18, 2008 3:11 am
|
|
|
Joined: 20 Feb 2008
Posts: 9
|
|
I played with this a little more tonight. It simply clears all avoids. Avoids the gate sector. Checks every sector for a valid path. It is identifying the bubble with 100% accuracy. (Considering the high time demand it's only been tested on a couple of bubbles.) I have it writing the results to file so that it would only have to run once per bubble. It took almost exactly 3 hours to do it, though.
I'm thinking I can make user input an option so for small bubbles the user can simply input the sectors instead of waiting for this long process.
I'm still looking for better ideas...
Did you have any input, p_rrothead?
Singularity, are you seeing this topic? Any ideas?
Anyone else care to make those of us involved so far look bad? |
|
|
|
 |
|
Posted:
Sun Mar 23, 2008 4:53 pm
|
|
|
Joined: 20 Feb 2008
Posts: 9
|
|
I got it working perfectly.
I knew I would think of a good method sooner or later.
100% accuracy, zero turns, and almost instant results.  |
|
|
|
 |
|
Posted:
Mon Mar 24, 2008 10:02 pm
|
|
|
Joined: 30 Jan 2007
Posts: 11
Location: Iowa
|
|
hey, awesome that you got it workin' so well... was there an easy solution? If you can't share..can you give hints/clues?? _________________ Crosby
Sometimes Galactic Scourge
Before judging another, always walk a mile in their shoes. That way, you'll be a mile away, and have their shoes!! |
|
|
|
 |
|
Posted:
Mon Mar 24, 2008 10:21 pm
|
|
|
Joined: 20 Feb 2008
Posts: 9
|
|
I figured someone would have to ask... lol
Think of how you would set up a near fig search.... User enters gate sector and an interior sector... Avoid the gate... Do a search from the interior sector for near sectors instead of near figs... Create the list of sectors... Clear the avoid.. Works like a charm as long as you have good mapping data.
Speaking of mapping.....
What script/method do people use for their mapping?
I am still finding some innacuracies after running 1_ztm... Anything better to suggest?
For the purposes of my current script that won't matter because I wouldn't use a bubble anyway without first thoroughly exploring it, and that would fix any errors in the maps, but it would be nice to be confident in 100% mapping accuracy... |
|
|
|
 |
|
Posted:
Tue Mar 25, 2008 9:51 pm
|
|
|
Joined: 30 Jan 2007
Posts: 11
Location: Iowa
|
|
thanks for the reply.. good technique!
I personally like prom's proZTM 1.4 is I think the latest.. has a who's online popup box as well as giving a 'traffic' file that helps finding low/high traffic areas. _________________ Crosby
Sometimes Galactic Scourge
Before judging another, always walk a mile in their shoes. That way, you'll be a mile away, and have their shoes!! |
|
|
|
 |
|
Posted:
Tue Mar 25, 2008 10:24 pm
|
|
|
Joined: 20 Feb 2008
Posts: 9
|
|
| Cool. I'll look for it. Thanks. |
|
|
|
 |
|