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

Custom Params & Setting a Standard
https://mail.black-squirrel.com/viewtopic.php?f=15&t=18436
Page 1 of 1

Author:  LoneStar [ Mon Jan 15, 2007 5:50 pm ]
Post subject: 

I had a thought. It was biggie and it hurt a little, so I'll try to be as articulate as possible (self-depreciating humour is a gift )
Okay down to biz.
I would like to toss into the ring the idea of a the Standardization of 'Custom Sector Params' --beyond the inherent.
Not being fully versed on the aspect of using Sector Parameters, I have been told using too many Custom-parameters can be counter productive and drastically bog a DBase.  Naturally, if one were to use only Private scripts this probably wouldn't be an issue. Thinking with a long term mind-set and hoping to be proactive, I am wondering about the feasibility of  drafting up a voluntary set of Standardized Custom Sector-Parameters. I think having such a Set of 'Universal' Sector Parameters will avoid what I think will inevitably result in bloated DataBases. There may already be such a Set in the new release of TWX, which would, perhaps make this post most irrelevant.
Obviously this is an altruistic idealology that probably goes beyond the  credo: 'It's just a Game!' ..if so, then please ignore my ramblings. However, if the converse is true, then I'd like to start with a simple and obvious suggestion:
setSectorParameter {SectorIndex} "Scratch" {value}
The nomenclature is important, but I'm suggesting "Scratch" only to illustrate a possible Universal Sector Param for temporary data. Another, and less obvious suggestion:
setSectorParameter {SectorIndex} "Score" {value}
let us assume values between 1 and 10 (0 indicating not used), give an indication to the 'relevance' a sector has with respect to Gridding. 1 being not important, and 10 indicating high priority-target.  Probably tipping my hat here.. but somehow I doubt it.. hehe..
Anyway. Minus the self-depreciating humour, it'll be interesting to read what more experienced scripters think.
Lone
 
 
 

Author:  Promethius [ Mon Jan 15, 2007 9:35 pm ]
Post subject: 

I may be wrong, but I think Sing had something setup for standard settings.

Author:  ElderProphet [ Tue Jan 16, 2007 12:13 am ]
Post subject: 

Traitor and I spoke on this many moons ago, and I've spoken with Sing about it as well. It's certainly scripter preference, but between Traitor's standard list and Sing's standard list, we could probably hash out a combined list of the most commonly used sector parameters.

I do see the need for this, and appreciate you bringing it up LoneStar. In truth, Sector Parameters have been under utilized to date, but a need for standardization will grow as more scripts make use of them, which is inevitable.

It'd be nice if the standard is somewhat based around the TWX 2 Export criteria, as posted on Swath's site.

+EP+

Author:  RexxCrow [ Tue Jan 16, 2007 12:41 am ]
Post subject: 

How about giving TWX the ability to modify/rewrite files? That is true power right there!

Author:  Parrothead [ Tue Jan 16, 2007 12:53 am ]
Post subject: 

Perhaps if Sing and Traitor would post the list here we could come to a concenus on the issue and the best way to use them (0 vs 1) or (0 vs qty) for mine data etc as to promote compatability between scripts of the same or similar function.I use them in a certain way but would be happy to change to promote better functionality in public scripts or soon to be public scripts like unlim gridders etc.

Author:  Singularity [ Tue Jan 16, 2007 1:13 am ]
Post subject: 

I've been using Traitor's list pretty much verbatim with a few minor exceptions. Sector parms are case sensitive, so I uppercase all of mine to remove issues there.

I talked to MD about this too a while back, we had a few we hashed out then.

Been trying to get this done too, but it always seems an uphill battle. One of the reasons I'm eager for the 2.04 final build is to get the parm loop bug cleared up for the public release... allowing me to write more public parm-related scripts. The few I have on my site experience the "unknown error" bug probably 50% of the time. I figure the more public scripts use parms, the more likely others will adopt the same ones.

And yea, obviously you're trying to do datamining. There are a lot of ways to do this. I don't use a scored sector since the score itself would change based on who I'm playing against. Ie: Some players never build in DEs, some always do. Sometimes I can probe, sometimes I can't, etc. Sometimes people move their base from an unexplored DE w/ none of my figs nearby to a random already explored 3-way with 1 of my figs adj. You get the drill. What I prefer to store is this basic information... then crunch it on the fly.

Code:
setSectorParameter $idx "FIGSEC"        FALSE
setSectorParameter $idx "LIMPSEC"       0
setSectorParameter $idx "MINESEC"       0
setSectorParameter $idx "NEARESTDE"     0
setSectorParameter $idx "NEARESTTUN"    0
setSectorParameter $idx "DISTFDOCK"     0
setSectorParameter $idx "DISTFTERRA"    0
setSectorParameter $idx "TRAFFIC"       0
setSectorParameter $idx "1STFIGGED"     "N/A"


Those are the ones I initialize for every sector.

Other stuff I set along the way:

Code:
Random  flag: SPECIALSEC
Date & Time, last bust: BUSTED_TS
Low  traffic: ISLOWTRAF
High  Traffic: ISHIGHTRAF
Nearest  Fig: NEARFIG
Distance to Dock: DIST2DOCK
Distance To Terra: DIST2TERRA
Known Upgraded Port: UPPEDPORT
Is part of a tunnel: ISTUNNEL
Is part of a bubble: ISBUBBLE
Is the bubble gate: ISGATE
Deep DEs  too: ISDEADEND
MSL: MSLSEC
Adj to  MSL: ADJMSL
Don't use this much:  ADJFED
Last time it appeared:  LASTFIGCHK
First time it appeared: 1STFIGGED

EP's MCIC stuff:
FUEL+
FUEL-
ORGANICS+
ORGANICS-
EQUIPMENT+
EQUIPMENT-


I don't use the ADJ to fed very often because of this little snippet:

Code:
:get_fed_adjacents
     setArray $FEDadj SECTORS
     :search_around_terra
     setVar $idx 1
     while ($idx <= 10)
                 setVar $chk_idx 1
                 while ($chk_idx <= SECTOR.WARPCOUNT[$idx])
                      if   (SECTOR.WARPS[$idx][$chk_idx] > 10)
                              setVar $FEDadj[SECTOR.WARPS[$idx][$chk_idx]] TRUE
                      end
                           add  $chk_idx 1
                 end
                 add $idx 1
     end
     :search_dock
     isNumber $result STARDOCK
     if ($result < 1)
                 goto :wheres_dock
     end
     if (STARDOCK < 1) OR (STARDOCK > SECTORS)
                 goto :wheres_dock
     end
     setVar $chk_idx 1
     while ($chk_idx <= SECTOR.WARPCOUNT[STARDOCK])
                 setVar $FEDadj[SECTOR.WARPS[STARDOCK][$chk_idx]] TRUE
                 add $chk_idx 1
     end
     :wheres_dock
     return


Frankly that's such a trivial thing I see no reason why to spend more time w/ a DB call bloating it further when that will suffice... 99.999% of the time.

And p-head... consensus, LOL. We can't even agree on an edit most of the time.

Author:  LoneStar [ Tue Jan 16, 2007 4:04 am ]
Post subject: 

ElderProphet wrote:
It'd be nice if the standard is somewhat based around the TWX 2 Export criteria, as posted on Swath's site.

+EP+

 
I'll check the Export criteria for my own edification, and perhaps contribute some more ideas.
Thanks for the info.
Lone

Author:  LoneStar [ Tue Jan 16, 2007 5:46 am ]
Post subject: 

Singularity wrote:
I've been using Traitor's list pretty much verbatim with a few minor exceptions. Sector parms are case sensitive, so I uppercase all of mine to remove issues there.

I talked to MD about this too a while back, we had a few we hashed out then.

Been trying to get this done too, but it always seems an uphill battle. One of the reasons I'm eager for the 2.04 final build is to get the parm loop bug cleared up for the public release... allowing me to write more public parm-related scripts. The few I have on my site experience the "unknown error" bug probably 50% of the time. I figure the more public scripts use parms, the more likely others will adopt the same ones.
  ...

Great list of params. I think they'd make a great foundation upon which to build from!
Thanks for sharing.
Lone

Author:  RexxCrow [ Tue Jan 16, 2007 5:47 am ]
Post subject: 

EP BTW, I always get this message a few times after using your script and once I get it, I always get it upon attempting to trade for that game. I tried to reset it w/ that other script, deleting the files, so related to a loadVar I am assuming.


Agreed, 150 units.

We'll buy them for 12,996 credits.
Your offer [12,996] ? Unknown script run-time error 'EP_BETA06G.TS': , line 698

Script terminated: C:\TWXProxy\scripts\EP_Beta06g\EP_Beta06g.cts

12996
You insult my intelligence, but we'll buy them anyway.

Author:  Singularity [ Tue Jan 16, 2007 6:11 am ]
Post subject: 

Looks like the parm bug to me. IIRC this has been fixed and is awaiting release.

Author:  Parrothead [ Tue Jan 16, 2007 4:18 pm ]
Post subject: 

Traitor's list is good enough for me.Thanks for the input.

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