It is currently 05 Nov 2025, 10:24
   
Text Size

Pricing (Scripts and Notes)

Moderators: charmer, CCGHQ Admins

Re: Re: Card Pricing

Postby Goblin Hero » 13 Aug 2010, 10:42

Goblin Hero wrote:Will investigate it.
Download 1.1.3. Multiple prices should work now as expected.
P.S. http://www.slightlymagic.net/wiki/Magic_Album_Lua_API
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
User avatar
Goblin Hero
Site Admin
Site Admin
 
Posts: 1996
Joined: 23 Oct 2005, 09:37
Location: Russia
Has thanked: 237 times
Been thanked: 353 times

Re: Re: Card Pricing

Postby dukemb » 13 Aug 2010, 11:38

Great!

I'll give a try.
dukemb
 
Posts: 52
Joined: 28 Apr 2010, 19:36
Has thanked: 68 times
Been thanked: 2 times

Re: Card Pricing

Postby moviemadnessman » 14 Aug 2010, 20:03

Using the files from V8 in the first post (and having cleared my prices, then restarting the program and updating each site), I have found that not all the cards acquire a price. Consistently, it is cards that either have punctuation (commas and / for split cards) and multiple versions (Homelands and Fallen Empires mostly).

I have confirmed this with the scripts for ABU and Starcitygames, where both sites list a price for cards that MA 1.1.3.48 just can't seem to acquire with the current scripts. I understand the cards with multiple versions can't usually be priced (since most sites don't list all the versions), but the cards with punctuation should be able to get the correct pricing I would think (but since I am not writing the code, I shouldn't assume that).

Just thought I'd bring this to the attention of the coders, since I didn't see it posted anywhere yet.

Card examples:
Asmira, Holy Avenger (Mirage)
Fire/Ice (Apocalypse)
moviemadnessman
 
Posts: 34
Joined: 09 Jul 2010, 05:13
Has thanked: 0 time
Been thanked: 0 time

Re: Re: Card Pricing

Postby dukemb » 14 Aug 2010, 21:32

One more thought about prices: FNM, DCI, promo cards? Can they be added also?
And tokens?

If it is possible it would be great.
dukemb
 
Posts: 52
Joined: 28 Apr 2010, 19:36
Has thanked: 68 times
Been thanked: 2 times

Re: Card Pricing

Postby woogerboy21 » 20 Aug 2010, 04:13

moviemadnessman wrote:Using the files from V8 in the first post (and having cleared my prices, then restarting the program and updating each site), I have found that not all the cards acquire a price. Consistently, it is cards that either have punctuation (commas and / for split cards) and multiple versions (Homelands and Fallen Empires mostly).

I have confirmed this with the scripts for ABU and Starcitygames, where both sites list a price for cards that MA 1.1.3.48 just can't seem to acquire with the current scripts. I understand the cards with multiple versions can't usually be priced (since most sites don't list all the versions), but the cards with punctuation should be able to get the correct pricing I would think (but since I am not writing the code, I shouldn't assume that).

Just thought I'd bring this to the attention of the coders, since I didn't see it posted anywhere yet.

Card examples:
Asmira, Holy Avenger (Mirage)
Fire/Ice (Apocalypse)
The Fire/Ice issue is due to the websites listing the cards as a different name than what is in the MA DB. For example the MA DB show it as Fire // Ice were as the websites show them as Fire and Ice. Since there is no special cases setup for those scenario's the MA application will assign no prices since it can not match a card named "Fire and Ice". I will try and think of a solution for this. First thing that comes to mind is a listing of known issue's like this but mainting that list may be troublesome.

As far as the special characters, this may be an application issue. Could you give me a few more examples?
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Card Pricing

Postby moviemadnessman » 20 Aug 2010, 19:08

woogerboy21 wrote:
moviemadnessman wrote:Using the files from V8 in the first post (and having cleared my prices, then restarting the program and updating each site), I have found that not all the cards acquire a price. Consistently, it is cards that either have punctuation (commas and / for split cards) and multiple versions (Homelands and Fallen Empires mostly).

I have confirmed this with the scripts for ABU and Starcitygames, where both sites list a price for cards that MA 1.1.3.48 just can't seem to acquire with the current scripts. I understand the cards with multiple versions can't usually be priced (since most sites don't list all the versions), but the cards with punctuation should be able to get the correct pricing I would think (but since I am not writing the code, I shouldn't assume that).

Just thought I'd bring this to the attention of the coders, since I didn't see it posted anywhere yet.

Card examples:
Asmira, Holy Avenger (Mirage)
Fire/Ice (Apocalypse)
The Fire/Ice issue is due to the websites listing the cards as a different name than what is in the MA DB. For example the MA DB show it as Fire // Ice were as the websites show them as Fire and Ice. Since there is no special cases setup for those scenario's the MA application will assign no prices since it can not match a card named "Fire and Ice". I will try and think of a solution for this. First thing that comes to mind is a listing of known issue's like this but mainting that list may be troublesome.

As far as the special characters, this may be an application issue. Could you give me a few more examples?
>Examples of cards with multiple versions would include:
Night Soil (has 3 versions - Fallen Empires)
Oubliette (2 versions - Arabian Nights)
Astrolabe (2 versions - Alliances)

These would not get a price seeming from the same situation as split cards, since the MA database would show as Night Soil [1], Night Soil [2], etc, but sites (ABU and ToadandTroll) have them listed as something different (Night Soil A, B, C and Night Soil - Ver. 1, Ver. 2, Ver. 3 respectively).

>Split cards are well known, so no need for more examples.

>Cards where a ',' prevents pricing:
Asmira, Holy Avenger (Mirage)
Atalya, Samite Master (Invasion)
Azami, Lady of Scrolls (Champions of Kamigawa)
Jace, The Mind Sculptor (Worldwake)
Jeska, Warrior Adept (Judgment)
Pianna, Nomad Captain (Odyssey)
Slobad, Goblin Tinkerer (Darksteel)

These are but a few of the cards with no prices I found while randomly jumping around the database. They all have a comma in the name, which seems to somehow interfere with the search ... my guess is that however the program is searching for card prices, the addition of a comma makes it think that "Jace, The Mind Sculptor" is 2 different cards, as opposed to 1 card name.


Also, in searching for more examples, I found that the database only lists 1 Storm Crow for Portal, when in fact it has 2 versions (with and without instructional text). Not a major issue, but something that could be patched in the next MA update.
moviemadnessman
 
Posts: 34
Joined: 09 Jul 2010, 05:13
Has thanked: 0 time
Been thanked: 0 time

Re: Card Pricing

Postby VaevictisAsmadi » 20 Aug 2010, 20:02

woogerboy21 wrote:First thing that comes to mind is a listing of known issue's like this but mainting that list may be troublesome.
But that is what importing is for. You gotta support all the quirks... You gotta catch them all :D.

I have been sitting on a MTGMintCard script, but since quirks have been brought up, I'll actually bother to make a post :lol:.

I noticed the MTGMintCard script was missing a ton of prices, so I decided to look into all the quirks and "fix" them.

For the people that just want to download and use, this will get you all the prices from that site, EXCEPT for tokens (not yet) and the cards that have more than one version but only one price listed, that aren't basic lands (more on this later.) And I do mean all. Foils and regular.

MTGMintCard.rar
(2.43 KiB) Downloaded 376 times
With that out of the way, I wanna talk quirks and code. This are all the quirks I found for MTGMintCard.com (I have just emailed them about some of them.):
  1. Two typos: AEhersnipe -> AEthersnipe from Jace vs Chandra and Runeclaw Bears -> Runeclaw Bear from M10.
  2. All splits use " // ", except Fire Ice which is listed as "Fire-Ice".
  3. Some special characters are garbled.
    • "â" for "â" (El-Hajjaj, Dandan.)
    • "Æ" for "Æ" (some cards with AEther in the name.)
    • "é" for "é" (Deja Vu, Saute.)
    • "Ã " for "à" (Deja Vu, Chicken a la King.
    • "®" for "®" (The Ultimate Nightmare of Wizards of the Coast Customer Service.)
  4. Obviously the promo cards don't line up. In this case, all of them are in a "Promo Cards" set, with different text suffixes depending on the type of promo.
  5. Release promo Earwig Squad is incorrectly listed as non-foil.
  6. Cards with multiple versions that don't line up with the Magic Album versions:
    • Mishra's Factoy:
      • "Autumn" -> "4".
      • "Autumn" -> "3" (there are incorrectly two Autumns.)
      • "Spring" -> "1".
      • "Summer" -> "2".
    • Deckmaster cards with foil versions:
      • Regular -> "1".
      • Foil -> "2".
    • B. F. M.:
      • Version with cost -> "Left".
      • Other -> "Right".
  7. Cards with multiple versions that are listed only once:
    • Basic lands from some sets.
    • Cards with two or more illustrations:
      • Alliances, several.
      • Arabian Nights, several.
      • Antiquities, Strip Mine and the Urzatron.
      • Champions of Kamigawa, Brothers Yamazaki.
      • Chronicles, the Urzatron.
      • Deckmasters, several
      • Fallen Empires, several.
      • Homelands, several.
      • Portal, several.

Whew! That's all I could find. Now I'll say how I fixed them, but I don't want to bog this down even more, so I just say the line numbers in the script:
  1. For the moment, I had to hardcode name substitutions for the adequate set ids, before processing. Lines 237-242.
  2. Hardcoded Fire-Ice special case, string substitution for the rest. This is obvious but I'm just being thorough. Lines 233-236.
  3. Damn localization and unicode issues! Actually the LUA module doesn't seem to read the special chars correctly? I had to put them in a ma.Log call and then use what that printed to do the string substitutions. EDIT: Bah I guess it has to do with the LUA module not handling .lua files in unicode?

    It's a mess but It's gonna have to suffice for the moment. Lines 213-230.
  4. First big modification, can't list every line of code involved.

    Added a "Promo+Cards" set to the set table, with id 0, which isn't used by Magic Album (line 79.) Then added a table with the set ids from Magic Album promos and the correspondent text suffix used in MTGMintCard. Added ability to fix the values sent to ma.SetPrice after capture, if necessary.

    So if one of those text suffixes is in the card name, the set id is fixed to what that table says (lines 201-209.)
  5. Another big mod (relatively, not that this script is actually big.) Added support for "card exceptions." If a card is detected as an exception, some values will be fixed to the ones in a certain table (lines 108-136.)

    This includes fixing promo Earwig Squad as foil. Also Mana Crypt to set id 5 (Book Inserts,) since it doesn't have an special text suffix, plus other things.
  6. This I didn't fix, because it's too much hardcoding for my tastes. I think the best way to implement it is for Goblin Hero to make a LUA module function that, given card name and set id, returns a table with all version strings, or nil if there aren't. Posting that in the Wish List.

    In this case though, probably all cards will end up as exceptions and need fixed ma.SetPrice calls.
  7. Also didn't fix for the same reason. I did make a hack for the basic lands, since those are just five names, but that's totally temporal (lines 138-169 and 262-272.) Man I feel unclean :lol:.

So this code now is one modification on top of another, aka a mess. Once Goblin Hero hopefully makes some LUA function for getting card versions, I'll streamline the script. Or whoever, I mean... who cares, just get the damn prices already :lol:.

I haven't yet read any of woogerboy21's scripts, since I only tackled MTGMintCard. Maybe his model is better (ignoring support for quirks.) Again I didn't want to bother too much becauses it's going to change once the card versions LUA function is avaliable. Did I mention a LUA function that gives card versions? :D

In the future I'll look into the quirks of whatever other site I'm interested in (sorry not all of the ones with a script here,) but not now.

Again, whew.
VaevictisAsmadi
 
Posts: 8
Joined: 02 Aug 2010, 16:45
Has thanked: 0 time
Been thanked: 0 time

Re: Card Pricing

Postby woogerboy21 » 24 Aug 2010, 12:49

But that is what importing is for. You gotta support all the quirks... You gotta catch them all .
Oh I agree. I am not argueing that they shouldn't. In my mind its something that needs addressed still and hasnt been. The primary goal of getting most the card prices collected was first and any tweaking to come later. Card pricing in the MA application is a fairly new feature to the application and only Goblin Hero, I ( and it appears you after this post) are the only ones to have really coded much for the application. :)

I haven't yet read any of woogerboy21's scripts, since I only tackled MTGMintCard. Maybe his model is better (ignoring support for quirks.) Again I didn't want to bother too much becauses it's going to change once the card versions LUA function is avaliable. Did I mention a LUA function that gives card versions?

In the future I'll look into the quirks of whatever other site I'm interested in (sorry not all of the ones with a script here,) but not now.
My scripts are a bit more specific about the locating of pricing block code from a URL and pulling the names / costs from that block. Other than that the code followes the same general premise. Most the scripts I have most (if not all) don't collect promo prices to my knowledge. It wouldn't be hard to create a routine to format the card names for any special purposes. (A second or third array comes to mind.) The catch is (as you have seen) with so many pricing scripts the creation and maintenance of each site may be overwhelming. I will do my best to keep revising each site with corrections as they are found. Thats the best I can offer. If you run across any updates that you see post them and I will include them in the general pricing script zip file that is available. (MTGMintCard is maintaned by Goblin Hero).

Once Goblin Hero hopefully makes some LUA function for getting card versions, I'll streamline the script.
Alright someone else see's a use for this, yippee! :)

edit:
It also looks like some of your posts may be database updates that need applied. Not pricing script updates.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Card Pricing

Postby woogerboy21 » 25 Aug 2010, 18:41

moviemadnessman wrote:Using the files from V8 in the first post (and having cleared my prices, then restarting the program and updating each site), I have found that not all the cards acquire a price. Consistently, it is cards that either have punctuation (commas and / for split cards) and multiple versions (Homelands and Fallen Empires mostly).

I have confirmed this with the scripts for ABU and Starcitygames, where both sites list a price for cards that MA 1.1.3.48 just can't seem to acquire with the current scripts. I understand the cards with multiple versions can't usually be priced (since most sites don't list all the versions), but the cards with punctuation should be able to get the correct pricing I would think (but since I am not writing the code, I shouldn't assume that).

Just thought I'd bring this to the attention of the coders, since I didn't see it posted anywhere yet.

Card examples:
Asmira, Holy Avenger (Mirage)
Fire/Ice (Apocalypse)
I have not corrected the split card file issue, how ever I have added a table in the template that should allow for special name situations to be processed. I will go back on a request bases to fix the issue in each pricing script. I will update all scripts with any table updates if there is no formating for the particular script put in place.

As far as the comma problem. This appears to be an issue with the script itself and the string comparisons in the abugames and starcity games script. I have corrected the issue on those two script but if you experience any other issue's with any other scripts let me know. Each type of script has its own string comparison line in them to identify the block of code containing card names and pricing so each case will be unique. Some newer scripts already contain the comma in the string comparison block and older ones do not.

See the updates section on the first post for complete details of changes made. The mtgotraders script is version 1.0 so probably is buggy :)
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Card Pricing

Postby moviemadnessman » 26 Aug 2010, 06:55

woogerboy21 wrote:
moviemadnessman wrote:Using the files from V8 in the first post (and having cleared my prices, then restarting the program and updating each site), I have found that not all the cards acquire a price. Consistently, it is cards that either have punctuation (commas and / for split cards) and multiple versions (Homelands and Fallen Empires mostly).

I have confirmed this with the scripts for ABU and Starcitygames, where both sites list a price for cards that MA 1.1.3.48 just can't seem to acquire with the current scripts. I understand the cards with multiple versions can't usually be priced (since most sites don't list all the versions), but the cards with punctuation should be able to get the correct pricing I would think (but since I am not writing the code, I shouldn't assume that).

Just thought I'd bring this to the attention of the coders, since I didn't see it posted anywhere yet.

Card examples:
Asmira, Holy Avenger (Mirage)
Fire/Ice (Apocalypse)
I have not corrected the split card file issue, how ever I have added a table in the template that should allow for special name situations to be processed. I will go back on a request bases to fix the issue in each pricing script. I will update all scripts with any table updates if there is no formating for the particular script put in place.

As far as the comma problem. This appears to be an issue with the script itself and the string comparisons in the abugames and starcity games script. I have corrected the issue on those two script but if you experience any other issue's with any other scripts let me know. Each type of script has its own string comparison line in them to identify the block of code containing card names and pricing so each case will be unique. Some newer scripts already contain the comma in the string comparison block and older ones do not.

See the updates section on the first post for complete details of changes made. The mtgotraders script is version 1.0 so probably is buggy :)
I appreciate you looking into the matter, and I am pleased to report that I've already noticed improvements to the aformentioned site pricing scripts. However, in my currently limited testing of them (ABU and StarCity), I have already come across certain things not being priced.

Leaving split cards, cards with multiple versions per set, and special sets (promos, portal, etc) out, here are a few of the things I noticed from my limited examination:

ABU script: Doesn't get any Ravnica prices at all. Might be as simple as the Ravnica section being removed from the script or commented out.

StarCity: Random cards, some with and without punctuation. Examples include:
Angry Mob (4th)
Gaseous Form (6th)
Taproot Kami (Betrayers of Kamigawa)
Zo-Zu the Punisher (Champions of Kamigawa)
*The 'vore series from Odyssey (Mortivore, Cognivore, etc)
*The 'Ones series from Onslaught (Soulless One, Reckless One, etc)

At this point, I haven't looked to compile a complete list of specific cards, and honestly, it's much better than it was. But in the matter of being a completest, and for the integrity of the project as a whole, I feel I should point out the missing aspects where I can.

If you need a complete list of missing card prices from either of both of the scripts above (the only 2 I use at the moment), let me know ... I just don't have time this second to do through and copy all the names by hand.

And keep up the great work, woogerboy21 and goblinhero.
moviemadnessman
 
Posts: 34
Joined: 09 Jul 2010, 05:13
Has thanked: 0 time
Been thanked: 0 time

Re: Re: Card Pricing

Postby woogerboy21 » 26 Aug 2010, 12:07

ABU script: Doesn't get any Ravnica prices at all. Might be as simple as the Ravnica section being removed from the script or commented out.

StarCity: Random cards, some with and without punctuation. Examples include:
Angry Mob (4th)
Gaseous Form (6th)
Taproot Kami (Betrayers of Kamigawa)
Zo-Zu the Punisher (Champions of Kamigawa)
*The 'vore series from Odyssey (Mortivore, Cognivore, etc)
*The 'Ones series from Onslaught (Soulless One, Reckless One, etc)

At this point, I haven't looked to compile a complete list of specific cards, and honestly, it's much better than it was. But in the matter of being a completest, and for the integrity of the project as a whole, I feel I should point out the missing aspects where I can.

If you need a complete list of missing card prices from either of both of the scripts above (the only 2 I use at the moment), let me know ... I just don't have time this second to do through and copy all the names by hand.

And keep up the great work, woogerboy21 and goblinhero
Thanks, I will look into these. Also work on getting the split names and multiple card names working for these two scripts. I will say though it is time consuming and finding every card without a price can be troublesome. Thanks for your input =D

At some point a complete list would be nice but let me get another update done and see how many prices I can fix first.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Re: Card Pricing

Postby woogerboy21 » 26 Aug 2010, 12:28

One other quick thought for people posting errors. Unless there is a common looking explination (or you want to simply ask) posting an issue works but if there is a select number of prices you are wanting corrected if you create an inventory file in MA. Save it and post it along with the pricing script name you are wanting to see it resolved it would help.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Card Pricing

Postby Goblin Hero » 26 Aug 2010, 15:45

woogerboy21 wrote:
Once Goblin Hero hopefully makes some LUA function for getting card versions, I'll streamline the script.
Alright someone else see's a use for this, yippee! :)
1.1.5 is out. Now you can set price to all versions of the card (see wiki for details).
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
User avatar
Goblin Hero
Site Admin
Site Admin
 
Posts: 1996
Joined: 23 Oct 2005, 09:37
Location: Russia
Has thanked: 237 times
Been thanked: 353 times

Re: Re: Card Pricing

Postby moviemadnessman » 26 Aug 2010, 18:00

woogerboy21 wrote:One other quick thought for people posting errors. Unless there is a common looking explination (or you want to simply ask) posting an issue works but if there is a select number of prices you are wanting corrected if you create an inventory file in MA. Save it and post it along with the pricing script name you are wanting to see it resolved it would help.
I know you said to let you look into the things I already mentioned ... but this is a far better idea when it comes to giving you the missing information, so I've saved the missing card list for both of the scripts above for you to analyze at your own convenience.

Thanks :)
Attachments
ABU and SCG Missing Prices.zip
(14.3 KiB) Downloaded 322 times
moviemadnessman
 
Posts: 34
Joined: 09 Jul 2010, 05:13
Has thanked: 0 time
Been thanked: 0 time

Re: Re: Card Pricing

Postby woogerboy21 » 26 Aug 2010, 20:36

Hey Goblin Hero, (or anyone that may know), I am having problems setting the price for the split card names such as fire / ice. In the application it looks like its spelled fire // ice how ever when I try and use that as the name to set the price for the given set it doesn't seem to set. Does it need named something special? (similar to the picture file names)
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

PreviousNext

Return to Magic Album

Who is online

Users browsing this forum: No registered users and 27 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 27 users online :: 0 registered, 0 hidden and 27 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 27 guests

Login Form