View unanswered posts | View active topics It is currently Tue Apr 16, 2024 12:59 pm



Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next
 MCIC script 
Author Message
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1131
Location: Augusta, GA
Unread post Re: MCIC script
I've made no change to the CSV export LoneStar. But as I said above, querying the sector parameters is preferable. Let me know if you'd like some help implementing that.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Mon May 13, 2013 7:44 pm
Profile WWW
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1396
Location: Canada
Unread post Re: MCIC script
ElderProphet wrote:
I've made no change to the CSV export LoneStar. But as I said above, querying the sector parameters is preferable. Let me know if you'd like some help implementing that.


In this case, Sectorparameters are redundant especially since you've put so much time and effort into the CSV logic. If I had a choice, I would prevent the sectorparameters from being utilized as they tend to bloat the Database; and as you might argue that these Additional Parameters are not significant enough to affect performance, I would argue that the speed difference in processing a few lines of a Text file -vs- several thousand sectors, is noticeably significant.

Anyway. I've attached the fixed MCIC.002 reader. as it turns out, the incorrect Column was being parsed. I've also added Save/Load-var logic to the Upper and Lower MCIC menu options.


Attachments:
File comment: Fixed parsing of CSV file.
MCIC.002.zip [2.33 KiB]
Downloaded 528 times

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.
-= There are 10 types of people in the world: Those that understand Binary and those who do not
-= If Oil is made from Dinosaurs, and Plastic is made from Oil... are plastic Dinosaurs made from real Dinosaurs?
-= I like to keep my friends and my enemies rich, and wait to see which is which - Tony Stark (R.I.P.)
Tue May 14, 2013 10:15 pm
Profile ICQ YIM
Commander

Joined: Thu Oct 17, 2002 2:00 am
Posts: 1158
Unread post Re: MCIC script
Thank you kindly!


Wed May 15, 2013 6:38 am
Profile
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: MCIC script
I don't know LoneStar... It's pretty sweet being able to run this without having to do an export.


Attachments:
File comment: Filters equipment ports using EP's SectorData instead of .CSV
MCIC.ts [1.59 KiB]
Downloaded 543 times

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Last edited by Micro on Wed May 15, 2013 6:42 am, edited 1 time in total.

Wed May 15, 2013 6:41 am
Profile ICQ YIM WWW
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1396
Location: Canada
Unread post Re: MCIC script
Micro wrote:
I don't know LoneStar... It's pretty sweet being able to run this without having to do an export.


Shrug. Only need to do the export once, and the MCIC reader can ran several times. However, like almost everything I've written, the script in source format so that it can be customized to suit your personal preference.

Wanted to say Thanks to COMET for reporting the problem, I'm always happy to fix something if it aint broken, err I mean Broken. heh.

P.S. I was never completely happy with that script. It could be much more useful if it indicated good Buyers, in ORG as well as EQU. Also some indication which ports have been upgraded. Lots of stuff.

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.
-= There are 10 types of people in the world: Those that understand Binary and those who do not
-= If Oil is made from Dinosaurs, and Plastic is made from Oil... are plastic Dinosaurs made from real Dinosaurs?
-= I like to keep my friends and my enemies rich, and wait to see which is which - Tony Stark (R.I.P.)


Wed May 15, 2013 10:00 am
Profile ICQ YIM
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: MCIC script
LoneStar wrote:
Shrug. Only need to do the export once, and the MCIC reader can ran several times. However, like almost everything I've written, the script in source format so that it can be customized to suit your personal preference.

Well, you have to export after every trading/gridding session. The data isn't redundant, because I think EP actually uses it to create the .CSV export.

I didn't actually look at your source (Yet)... I thought the hop calculations would have been difficult, but TWX does that for us... It is a very simple script and it can't read any of the other formats yours can. OOPS, I wrote my second TWX script dammit. It still gives me massive headaches though.

LoneStar wrote:
Wanted to say Thanks to COMET for reporting the problem, I'm always happy to fix something if it ain't broken, err I mean Broken. heh.
Yeah, we were both testing EP haggle in the same game and the little #&*@! got here first :)

LoneStar wrote:
P.S. I was never completely happy with that script. It could be much more useful if it indicated good Buyers, in ORG as well as EQU. Also some indication which ports have been upgraded. Lots of stuff.
I am converting this script to a M()MBot command. You will be able to specify a port class (i.e. SxB) and configure min/max values in that version. This could be done in your script by adding some menu options and filtering on a different set of columns from the CSV file.

What I really wish it could do is display last bust info from M()Mbot's SST, SDT, etc...

modules\busts.ts uses "getsectorparameter $IDX "BUSTED" $BUS", but the count returned is always "0".

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Wed May 15, 2013 1:24 pm
Profile ICQ YIM WWW
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1131
Location: Augusta, GA
Unread post Re: MCIC script
I won't argue about performance or bloat from sector parameters. They're saved as fixed-length strings in a flat file, so they're simple and small compared to a relational database (or spreadsheets for that matter). I really have no performance data other than subjective, and even large amounts of sector parameters seem to have no effect on performance.

The reason I encourage using the sector parameter is as Micro said, it is available in real-time.

Regarding bust tracking... TWX should really be tracking that.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Wed May 15, 2013 5:34 pm
Profile WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: MCIC script
ElderProphet wrote:
Regarding bust tracking... TWX should really be tracking that.
TWX doesn't have internal bust tracking as far as I can tell. M()MBot is using a sector paramater, but I am missing something. Maybe a daemon needs to be running. Anybody know?

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Wed May 15, 2013 5:43 pm
Profile ICQ YIM WWW
Commander

Joined: Thu Oct 17, 2002 2:00 am
Posts: 1158
Unread post Re: MCIC script
LoneStar wrote:
Micro wrote:
I don't know LoneStar... It's pretty sweet being able to run this without having to do an export.


Shrug. Only need to do the export once, and the MCIC reader can ran several times. However, like almost everything I've written, the script in source format so that it can be customized to suit your personal preference.

Wanted to say Thanks to COMET for reporting the problem, I'm always happy to fix something if it aint broken, err I mean Broken. heh.

P.S. I was never completely happy with that script. It could be much more useful if it indicated good Buyers, in ORG as well as EQU. Also some indication which ports have been upgraded. Lots of stuff.


No problemo! Also, there are options at least with the bot i have eqbuyers/sellers even goodbuyers/seller options. <<<<<< This will give you both fuel org and equipment it's quite nice. But thank you again for fixing it up. I did a test for both of the scripts I came out with the same exact number of ports on each report. One looked prettier than the other one but I am not gonna say who I don't wanna play favorites LOL!

:)


Wed May 15, 2013 7:18 pm
Profile
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: MCIC script
actually, mine has a bug and is filtering some ports it shouldn't... Anyone see the bug?

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Wed May 15, 2013 9:51 pm
Profile ICQ YIM WWW
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1131
Location: Augusta, GA
Unread post Re: MCIC script
You know Micro, for a guy who hates TWX scripting, that's a decent script you've written. I suspect the problem is in the long IF statement you wrote. If I read the script correctly, you are looking for high MCIC values (where -65 is also considered higher than -20). With that in mind, you can simplify your IF statement by taking the absolute value (mulitply by -1 if < 0) and seeing if it is > 49.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Thu May 16, 2013 9:06 pm
Profile WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: MCIC script
Very close... Instead of "<" and ">" I should have use "<=" and ">=". The script is leaving out the best ports (-65/65).

Good point about the if statement. I am modifying that so it can filter any port class, not just equipment.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Fri May 17, 2013 6:10 pm
Profile ICQ YIM WWW
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1396
Location: Canada
Unread post Re: MCIC script
Micro wrote:
Very close... Instead of "<" and ">" I should have use "<=" and ">=". The script is leaving out the best ports (-65/65).

Good point about the if statement. I am modifying that so it can filter any port class, not just equipment.



You may want to consider filtering "-1" form the getdistance results.
getDistance $hops CURRENTSECTOR $sector
if $sector ='s CURRENTSECTOR, changing $hops from "-1", to "0", is usually a good idea. If you get the same result "-1", and $sector <> CURRENTSECTOR, then you could Echo something like "N/A". otherwise your script looks nice.

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.
-= There are 10 types of people in the world: Those that understand Binary and those who do not
-= If Oil is made from Dinosaurs, and Plastic is made from Oil... are plastic Dinosaurs made from real Dinosaurs?
-= I like to keep my friends and my enemies rich, and wait to see which is which - Tony Stark (R.I.P.)


Fri May 17, 2013 6:52 pm
Profile ICQ YIM
Commander

Joined: Thu Oct 17, 2002 2:00 am
Posts: 1158
Unread post Re: MCIC script
LoneStar wrote:
Wanted to say Thanks to COMET for reporting the problem, I'm always happy to fix something if it ain't broken, err I mean Broken. heh.
Yeah, we were both testing EP haggle in the same game and the little #&*@! got here first :)



Really? :) I know this isn't the smack forum.. Come on out and quit hiding behind helix i'll show you a little @(!@$# LOL!


Sat May 18, 2013 12:19 am
Profile
Ambassador
User avatar

Joined: Wed Nov 12, 2008 8:57 am
Posts: 3554
Location: Long Beach, CA
Unread post Re: MCIC script
EP

I didnt realize that your haggle used sector parms. I do want to say I have run ep_haggle on both v1 and v2 servers for more than 10k turns without a single "port report" hang. Thank you for fixing that bug.

LS dont mind comet, hes still struggles with his place in the world, a script user, not a script maker. (just like me)

_________________
Helix
Do I really look like a guy with a plan? You know what I am? I'm a dog chasing cars.
Lest we forget
I had to ask myself WWSGD?


Sat May 18, 2013 1:24 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 33 posts ]  Go to page Previous  1, 2, 3  Next

Who is online

Users browsing this forum: Bing [Bot] and 7 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 STSoftware.