| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| Help Needed https://mail.black-squirrel.com/viewtopic.php?f=14&t=20242 |
Page 1 of 2 |
| Author: | Promethius [ Tue Jan 15, 2008 1:16 pm ] |
| Post subject: | Help Needed |
I am writing a T-Edit version of my ProAssetCheck script that will output all corp and solo player assets. This is the fairly easy part to do. Where I need help is in a "ranking" system for those assets. I am thinking of using fighters as the common valuation, ie. set average cost of a fighter at 200 credits, ore = 3 units or 200 credits (based on cannon damage), mines - 1k credits each, limpets 10k credits. For ships, I can get the cost of each as they are not outfitted so that isn't a major issue and I am grabbing the number of fighters. Now where I run into major problems is the valuation of planets. What are good values for a L1 through L-6 planet. The L0 planet valuation is 40k (guessing at the average purchase price) although I would rather have 200 figs on my ship than a L0 planet. Colonists on the planets also pose an issue for valuation as does the planet type - I would prefer to have a maxed L6 with 5M ore than an L6 maxed with 100K ore. The ore value may offset this issue, but not the 1:1 vs 5:1 col/fig production. I can assign a value to org/equ based on selling 100 units (yes, MCIC will affect the values, but I need a fixed number - not perfect I know but even for all). I had hoped to have this finished in a few days, but after this post it may take longer than expected. I plan on having two output formats for the script - html and pure text. The script output will be similar to that of ProAssetCheck so people can take the ranking with a grain (or three) of salt. Anyway, any input, including if the ranking system is whack, is appreciated. |
|
| Author: | V'Ger [ Tue Jan 15, 2008 2:16 pm ] |
| Post subject: | Re: Help Needed |
I think this is a good idea... just a few thoughts... You said you wanted to have some planets be worth more than others? How will that factor in with games with gold planets? For deciding citadel values, maybe just double the planet for every level of citadel that it is? (ie a level 0 planet is worth 40000 points, a level 1 is worth 80000, level 2 is 160000, etc)? Are you going to grab the amount of cash in the citadels too? For colonists, maybe just assign a per colonist value, say 10 points or so? |
|
| Author: | Thrawn [ Tue Jan 15, 2008 3:37 pm ] |
| Post subject: | Re: Help Needed |
I like your ideas. Here are my thoughts... First off, perhaps you will find that assigning values to "general" variables may prove to be easier for planets and ships, especially those edits that modify the standard ships and planets. The variables you know are constant are: product, colos, figs, cit level. For example, as V'Ger pointed out, assign a value per colo. Assign a value for x amount of product. Or base planet calculation on cit level and colos only, or combine product, figs, colos, cit level. Assign a value for a fig, mines, beacon. The only thing here is will it take into account toll/def/off figs? Armid and limpet? Assign ships a value based on # figs they are holding or their off/def odds. I like the Trader scores and Corp scores listed as I have tested earlier. It looks better than the text file that we can produce on the TWGS. As far as the asset listing, I thought it would be a nice bonus for players to see just how well they did or what they had at game end. |
|
| Author: | Singularity [ Tue Jan 15, 2008 4:21 pm ] |
| Post subject: | Re: Help Needed |
Problem is... somewhere a sysop will use this to determine the end of a game. So that if ppl know ahead of time, they can manipulate the system. Assigning values per colo does nothing to determine the strength of the base if it's been poorly managed and they're all overloaded. Obviously then other resources such as credits, figs, eq, org, ore, etc, all have their place, along with cit levels, daily production, shields, mines, etc. My suggestion is to have a small config file somewhere that's read and used as the basis for each scoring. That way a sysop can modify it to give different elements importance. |
|
| Author: | Promethius [ Tue Jan 15, 2008 5:26 pm ] |
| Post subject: | Re: Help Needed |
V'ger - Yes, I am grabbing all credits from planets and players since I know some players that run around with over 100M on them in unlims (gotta love 'em). Thrawn - Yes, the figs/armids/limpets that are deployed as well as on ships and on planets get counted and values assigned. I think you are looking at the script the same way I am for its intended use too. Sing has a good idea on the config file too and also a valid concern that players could attempt to manipulate this type of script to output in their favor. I will work on the script over the next week and see how it plays out. If nothing else I have something new to write that doesn't end with "aty40000* " |
|
| Author: | Zarkahn [ Tue Jan 15, 2008 8:48 pm ] |
| Post subject: | Re: Help Needed |
well first of all as far as planets, level 0 and 1... don't even count em, or count em just for G torp cost. figs ae easy to figure based on cost once u've counted them all, mines and Limpets as well as far as product, I'd use an average number as far as whats its worth... ex max eqp is 65 mcic, so use 32.5 as a avg. give points based on lev cits... increasing per level I guess if u check figs, u see grid, so points based on % of grid too... heh u asked for ideas.... edit... here as far as collies... if they're not making something else to count, Ignore em... a better base will have em all working all the time... that way u don't even have to count collies... |
|
| Author: | Singularity [ Tue Jan 15, 2008 11:17 pm ] |
| Post subject: | Re: Help Needed |
As for whether to make lv0 or lv1 worth points, I think that should be left to the sysop. Another reason to use a config file, any 2 sysops may differ in their opinions of what should be given points. Or might have different games w/ different settings. They might even want to deduct points (negative points) for carrying too many lv0 planets in order to make a planet buyout prohibitive. If you give figs a pt value of the fig cost, then it means a smart player could calculate the fig trend (not exactly difficult) and buy when it's low in order to bump up their relative point value. In order to combat that the sysop would either have to assign a fixed average value or try to assess points at the lowest point of the curve. The value of products is naturally going to depend on not just average MCIC, but also ptrade % and the accessibility of ports. In some games it might make no sense to give value to products because of the rapid exchange of grid (grid itself might be worth points tho) and the small size of bubbles, whereas in other games it might make all the sense in the world. Likewise a game with 200% ptrade would benefit from having a much higher point value per EQ, but perhaps not it's full average cash value as to give ppl that trade off their product more points than those that are lazy and just stockpile it. For instance a max MCIC port can sell EQ at 139.3, and the min MCIC port can sell at 106.3. A low average then would be 122 credits per unit, by assigning it a value of only 100 credits (100 times whatever the value of a credit is) people would be encouraged to trade off their product instead of stockpiling it. But then again maybe some edits would want to prioritize stockpiling because of low colonist production (and starts) and low port density thereby rewarding more thrifty players. For cols I would certainly have "productive cols" and "non productive cols" as separate elements. A sysop could choose to ignore non productive cols, or could even choose to assign a negative value to them in order to promote regular planet maintenance and give farmers something to aspire to. Any given edit may want a relative value to any given element, and this may differ from game to game. A sysop running 5 games may want 5 different assessments. And I don't think you're going to find any set of point values that would be acceptable to each and every sysop for each and every game. |
|
| Author: | Promethius [ Wed Jan 16, 2008 1:16 am ] |
| Post subject: | Re: Help Needed |
I appreciate the input as it has given me more to think about (pass the excedrin) and hopefully can put something together as a configurable ranking. I think I should also give the option of including the ranking or just output assets so players can make their own assessments (and arguments sometimes). |
|
| Author: | Thrawn [ Wed Jan 16, 2008 10:05 am ] |
| Post subject: | Re: Help Needed |
I agree with Sing. Each SysOp will be different and may want to have a different point system than another. From our perspective, I just want to show final scores (trader and corp), and if we can list final assets (# planets, figs, % sectors) then that is satisfactory to me. |
|
| Author: | Promethius [ Wed Jan 16, 2008 1:21 pm ] |
| Post subject: | Re: Help Needed |
Well, I think I may have ran into a major issue - speed or rather the lack of it. To get the players grid and deployed fighters requires going through every sector. This is extremely time consuming. It appears that a 20k game will require between 35 and 40 minutes to run. I was hoping more for something in the 20 minute range or 1k sectors per minute. I think the only way to have an efficient report is direct record access and that is something I can't do in TWX. I may go ahead and finish the script (working it in modules) as a proof of concept type project - not sure at this point if it is worth the effort. ProAssetCheck ran in game is a lot faster - not 100% accurate on planet fighters and cash due to rounding, but probably close enough. I could modify a version of it, but then the sysOp has to log in as each active corp or solo player and pull the results. |
|
| Author: | Thrawn [ Wed Jan 16, 2008 4:23 pm ] |
| Post subject: | Re: Help Needed |
Promethius wrote: Well, I think I may have ran into a major issue - speed or rather the lack of it. To get the players grid and deployed fighters requires going through every sector. This is extremely time consuming. It appears that a 20k game will require between 35 and 40 minutes to run. I was hoping more for something in the 20 minute range or 1k sectors per minute. I think the only way to have an efficient report is direct record access and that is something I can't do in TWX. I may go ahead and finish the script (working it in modules) as a proof of concept type project - not sure at this point if it is worth the effort. ProAssetCheck ran in game is a lot faster - not 100% accurate on planet fighters and cash due to rounding, but probably close enough. I could modify a version of it, but then the sysOp has to log in as each active corp or solo player and pull the results. I agree with the time issue. Since our site is automated, I would not want to code my ScoreKeeper to login to each account in a rebanging game to post final results. Sorry if my idea has aged you a few years I was looking at the asset thing a little different. Not necessarily down to each item in the game. But to list in general: # planets and their cit levels at game end, # figs (but like you said it would go into each sector), perhaps total credits, total product, list total # ships. Just to give a "general" picture to the player(s)/corp(s) how well they progressed. It may not be accurate, but then it just has to provide general final info at game end. The players themselves can run proAssetCheck on their own if they need the details. |
|
| Author: | Singularity [ Wed Jan 16, 2008 7:57 pm ] |
| Post subject: | Re: Help Needed |
Uhm... an hour to run? LOL, why? I put this together and it takes only about 5 to 10 minutes to run in a 20k Code: setArray $figamounts SECTORS setArray $figowners SECTORS send "s1*" waitFor "Sector number (0=Abort)" gosub :set_triggers # Grab the data setVar $idx 1 while ($idx <= (SECTORS-1)) send ">" add $idx 1 end send "X" pause # Spit the data back out :weredone # whatever code goes here # -------------------------------- halt # -------------------------------- :set_triggers killTrigger sectornum killTrigger fighters killTrigger weredone setTextLineTrigger sectornum :sectornum "Sector : " setTextLineTrigger fighters :fighters "<H> Fighters : " setTextTrigger weredone :weredone "Trade Wars 2002 Editor (?=Help)" return :sectornum getWord CURRENTLINE $current_sector 3 gosub :set_triggers pause :fighters getWord CURRENTLINE $figcount 4 getWord CURRENTLINE $figwho 7 setVar $figamounts[$current_sector] $figcount setVar $figowners[$current_sector] $figwho gosub :set_triggers pause # -------------------------------- halt # -------------------------------- You could expand the idea and store all of the data. Obviously you'll need to process the $figwho better because of corp number/corp name/player name clashes, but it's pretty fast... and more accurate than a player's G report. |
|
| Author: | Promethius [ Wed Jan 16, 2008 8:25 pm ] |
| Post subject: | Re: Help Needed |
I'm really not sure why it takes so long for my version to run. The code I wrote for it is: Code: waitfor "User editor" send "s10*" :getSectorFighters setVar $i 11 while ($i <= $gameSectors) send ">" setTextLineTrigger sectorfighters :sectorFighters "<H> Fighters :" pause :sectorFighters getword currentline $numFigs 4 # make sure number and not NONE in record isnumber $test $numFigs if ($test) getwordPos CURRENTLINE $pos "Corp#" if ($pos > 0) getText currentline $belong "Corp#" ")" add $corpFigSum[$belong] $numFigs add $corpFigSector[$belong] 1 else # solofigsum is assigned to the player user record number getText currentline $belong "(#" "))" add $soloFigSum[$belong] $numFigs add $soloFigSector[$belong] 1 end end add $i 1 end send "x" Looking at the code now I can eliminate the isNumber check by seeing if $numFigs = NONE and going from there. |
|
| Author: | Promethius [ Wed Jan 16, 2008 9:12 pm ] |
| Post subject: | Re: Help Needed |
This version sped it up, but still only clocking about 800 records / minute. Code: waitfor "User editor" send "s10*" :getSectorFighters setVar $i 11 while ($i <= $gameSectors) send ">" setTextLineTrigger noSectFigs :noSectFigs "<H> Fighters : None" setTextLineTrigger sectFigs :sectFigs "(belong to" pause :sectFigs killtrigger noSectFigs getword currentline $numFigs 4 stripText $numFigs "," getwordPos CURRENTLINE $pos "Corp#" if ($pos > 0) getText currentline $belong "Corp#" ")" add $corpFigSum[$belong] $numFigs add $corpFigSector[$belong] 1 else # solofigsum is assigned to the user record number getText currentline $belong "(#" "))" add $soloFigSum[$belong] $numFigs add $soloFigSector[$belong] 1 end :noSectFigs killtrigger sectFigs add $i 1 end send "x" |
|
| Author: | Singularity [ Wed Jan 16, 2008 10:09 pm ] |
| Post subject: | Re: Help Needed |
The problem is you're waiting for the results before sending the next one. That adds lag, which you'd think would be small but isn't for some reason, into the equation. If you burst the read all at once it cuts it half. |
|
| Page 1 of 2 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|