It is currently 01 Nov 2025, 15:09
   
Text Size

Images by Set

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Images by Set

Postby friarsol » 16 Nov 2010, 04:34

I was looking at the Python script in an effort to change it for the new SetInfo stuff that Rob needs for one of his next features. Writing the script isn't a big deal, but I would need a way to build a URL for an image to put for each Set (or some place to get images).

Does anyone have any insight of where to get this from? This is a pretty big component of getting Images per card per set functional.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Images by Set

Postby Rob Cashwalker » 16 Nov 2010, 05:56

magiccards.info uses a folder structure similar to the HQ urls. except they use cardnumber. magiccards.info gets their LQ (but higher-res than gatherer) from resized originals from this site, so I don't see why we can't link to them.

I am still leaning towards only downloading when the file isn't present, to minimize the impact of "leeching"

I found code to resize and re-save a pic, if local storage space is a concern. So I have been considering to use the HQ mirror URL format, even with the [Server] substitution. (HQ/LQ and preferred server would be saved as preferences)

Keep to the list of set codes in the SetInfoUtil class. No need for Duel Decks and promos.... Starter is in there just because of a couple simple cards that were only printed in starter, and we already supported them.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Images by Set

Postby friarsol » 16 Nov 2010, 18:11

I can grab from MagicCards.info but since they use the setNumber, and we don't have that info anywhere, I'd need to grab it from them. This is obviously a different format than the HQ pics, so I don't think we could have reuse that section for LQ if we're going through their servers.

I already had limited my sets to normal releases. However, what do we do about "TimeShifted" cards? It looks like they replaced a common in Time Spiral boosters, but it seems weird to just list them as Common. It seems like they should be represented someway, but I'm just not sure what we want to do with them.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Images by Set

Postby friarsol » 16 Nov 2010, 19:53

I just ran the updated Script with 15 data files. Here's a few results (just the relevant parts)

Code: Select all
Backfire
SetInfo:4ED|Uncommon|http://magiccards.info/scans/en/4e/62.jpg
SetInfo:LEG|Uncommon|http://magiccards.info/scans/en/lg/47.jpg
Code: Select all
Plains
SetInfo:USG|Land|http://magiccards.info/scans/en/us/331.jpg
SetInfo:TMP|Land|http://magiccards.info/scans/en/tp/324.jpg
SetInfo:ZEN|Land|http://magiccards.info/scans/en/zen/230.jpg
SetInfo:4ED|Land|http://magiccards.info/scans/en/4e/186.jpg
SetInfo:3ED|Land|http://magiccards.info/scans/en/rv/293.jpg
SetInfo:SOM|Land|http://magiccards.info/scans/en/som/230.jpg
SetInfo:TSP|Land|http://magiccards.info/scans/en/ts/282.jpg
SetInfo:ODY|Land|http://magiccards.info/scans/en/od/331.jpg
SetInfo:MIR|Land|http://magiccards.info/scans/en/mr/306.jpg
SetInfo:PTK|Land|http://magiccards.info/scans/en/p3k/166.jpg
SetInfo:M10|Land|http://magiccards.info/scans/en/m10/230.jpg
SetInfo:POR|Land|http://magiccards.info/scans/en/p3k/166.jpg
SetInfo:ROE|Land|http://magiccards.info/scans/en/roe/229.jpg
SetInfo:10E|Land|http://magiccards.info/scans/en/10e/364.jpg
SetInfo:RAV|Land|http://magiccards.info/scans/en/rav/287.jpg
SetInfo:6ED|Land|http://magiccards.info/scans/en/6e/331.jpg
SetInfo:5ED|Land|http://magiccards.info/scans/en/5e/434.jpg
SetInfo:ONS|Land|http://magiccards.info/scans/en/on/331.jpg
SetInfo:S99|Land|http://magiccards.info/scans/en/st/154.jpg
SetInfo:8ED|Land|http://magiccards.info/scans/en/8e/331.jpg
SetInfo:CHK|Land|http://magiccards.info/scans/en/chk/287.jpg
SetInfo:9ED|Land|http://magiccards.info/scans/en/9e/331.jpg
SetInfo:ICE|Land|http://magiccards.info/scans/en/ia/343.jpg
SetInfo:MRD|Land|http://magiccards.info/scans/en/som/230.jpg
SetInfo:SHM|Land|http://magiccards.info/scans/en/shm/282.jpg
SetInfo:LEB|Land|http://magiccards.info/scans/en/be/289.jpg
SetInfo:INV|Land|http://magiccards.info/scans/en/in/331.jpg
SetInfo:7ED|Land|http://magiccards.info/scans/en/7e/341.jpg
SetInfo:MMQ|Land|http://magiccards.info/scans/en/mm/331.jpg
SetInfo:ALA|Land|http://magiccards.info/scans/en/ala/230.jpg
SetInfo:M11|Land|http://magiccards.info/scans/en/m11/230.jpg
SetInfo:P02|Land|http://magiccards.info/scans/en/po2/160.jpg
SetInfo:LRW|Land|http://magiccards.info/scans/en/lw/282.jpg
SetInfo:2ED|Land|http://magiccards.info/scans/en/un/289.jpg
Code: Select all
Lightning Bolt
SetInfo:LEB|Common|http://magiccards.info/scans/en/be/163.jpg
SetInfo:4ED|Common|http://magiccards.info/scans/en/4e/226.jpg
SetInfo:M11|Common|http://magiccards.info/scans/en/m11/149.jpg
SetInfo:M10|Common|http://magiccards.info/scans/en/m10/146.jpg
SetInfo:3ED|Common|http://magiccards.info/scans/en/rv/161.jpg
SetInfo:2ED|Common|http://magiccards.info/scans/en/un/162.jpg
Code: Select all
Bant Sureblade
SetInfo:ARB|Common|http://magiccards.info/scans/en/arb/143.jpg
Code: Select all
Ball Lightning
SetInfo:M10|Rare|http://magiccards.info/scans/en/m10/125.jpg
SetInfo:DRK|Rare|http://magiccards.info/scans/en/dk/56.jpg
SetInfo:4ED|Rare|http://magiccards.info/scans/en/4e/194.jpg
SetInfo:5ED|Rare|http://magiccards.info/scans/en/5e/210.jpg
Code: Select all
Pestilence
SetInfo:USG|Common|http://magiccards.info/scans/en/us/147.jpg
SetInfo:LEB|Common|http://magiccards.info/scans/en/be/29.jpg
SetInfo:5ED|Common|http://magiccards.info/scans/en/5e/48.jpg
SetInfo:4ED|Common|http://magiccards.info/scans/en/4e/36.jpg
SetInfo:6ED|Uncommon|http://magiccards.info/scans/en/6e/149.jpg
SetInfo:3ED|Common|http://magiccards.info/scans/en/rv/30.jpg
SetInfo:2ED|Common|http://magiccards.info/scans/en/un/29.jpg
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Images by Set

Postby Rob Cashwalker » 16 Nov 2010, 22:24

Timeshifted is something I hadn't considered at all. I cracked a box of TSP, and had multiples of a few cards, and singles of others, so they seemed to follow a rarity distribution in that common slot, however there's no hard data on which rarity a given card would be, though likely the most recently printed rarity should suffice.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Images by Set

Postby friarsol » 16 Nov 2010, 22:45

According to Mark Rosewater they sat in a Common slot, but that doesn't mean they have Common Rarity.

http://www.wizards.com/Magic/Magazine/A ... aily/mr247

Code: Select all
The timeshifted cards in Time Spiral replace a common card. Normally, a Magic booster has 1 rare, 3 uncommons and 11 commons. Time Spiral boosters instead have 1 rare, 3 uncommons, 10 commons and a timeshifted card.
Maybe we should handle this by ignoring the Timeshifted "rarity" for everything except for booster drafting. Then we would take a normal Time Spiral booster, drop one of the commons, and add 1 Timeshifted card from what we have implemented. It looks like we currently have 72/121 implemented, which is a fair amount. We only have 119/301 of normal Time Spiral cards, so we aren't that close to needing to implement the booster pack scenario.

I can put anything into the rarity. magiccards.info calls anything other than land, common, uncommon, rare, mythic "special." Maybe we should label it's rarity as "Timeshifted" so that information will be around when the Booster Pack scenario needs to occur.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Images by Set

Postby Rob Cashwalker » 17 Nov 2010, 03:33

Ugh.... This is going to mean special handling in the generator for this one special case. Or devise a generic booster definition... somewhat like the theme deck files...?
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Images by Set

Postby friarsol » 17 Nov 2010, 03:54

Well, we may need to define Booster packs anyway since they have changed over time. Like for early sets with only 8 or 12 cards per pack, card distribution was definitely different than today.

http://wiki.mtgsalvation.com/article/Bo ... s_and_cost
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Images by Set

Postby Rob Cashwalker » 17 Nov 2010, 14:19

Damn that's a lot of variation.

Planar Chaos booster packs contain 8 commons, 2 uncommons, 1 rare, 3 timeshifted commons, and 1 uncommon or rare timeshifted card.
Future Sight booster packs contain 11 commons, 3 uncommons, and 1 rare, any of which might be a timeshifted card.
I think the Future Sight method is just as good for Planar Chaos. The "timeshifted" cards aren't separately numbered or anything, so it would be more complicated to handle, without significant gain. I never knew or noticed that they were distributed precisely like that, and I cracked a box of it. (missed out on buying Future Sight in pre-sale.. then the price jacked up huge due to Tarmogoyf)
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Images by Set

Postby friarsol » 17 Nov 2010, 15:27

I agree for that. No need to over complicate things more than necessary, but for we should at least try to mimic print runs in a generic fashion.

General Algorithm can be like this: (15 cards)
1 R, 3 U, (1 Land/Special Slot), (1 Foil from Time Spiral on), Rest C

We can estimate some of the early sets like this:
Arabian Nights = 2 U, 6 C = 8
The Dark = 2 R/U, 6 C = 8
Antiquities, Fallen Empires, Homelands = 1 R, 2 U, 5 C = 8

Alliances, Chronicles(if we care?) will follow the general Algorithm but only have 12 cards total.

Time Spiral uses the Special slot for a Timeshifted subset.

I know that Revised could have basic land appear in a Common or Uncommon slot, but we should probably just ignore that.

Some other things to complicate matters:

Mythics - starting in the Alara block Mythics replace Rares every 1/8th of the time. We should make sure we have enough Mythics per set before we start doing this since, otherwise they will appear too often.

Foil - Starting with Urza's Legacy Foils started to appear about 1/6 packs. Originally, they would just replace the same rarity slot that they were (which means no functional change for us). But starting with Time Spiral they would change to replace a Common slot. Timeshifted foils still sit in the Timeshifted slot, so there's no functional difference for the subset.

Since we can't represent Foils I'd put that at the lowest rung of priority, and if it gets done eventually great, otherwise it won't be noticed.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Images by Set

Postby Rob Cashwalker » 17 Nov 2010, 23:24

Foil ain't happening.... However giving a 1/6 opportunity for an extra uncommon, rare or mythic would be a draft-functional equivalent. And simple.

At such a low rate of appearance, even our limited supply of mythics shouldn't affect draft too bad. If quest mode uses set-based boosters, then it will become more of an issue. (I kinda prefer the broad-spectrum of cards available in the current quest mode boosters)

If you click into the set pages in the wiki, they list the exact booster contents for those not listed in the summary. Wish there was a table format....

Meanwhile, we shouldn't derail this thread too much about the details of the booster pack contents.... The set data I see up there seems about right.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Images by Set

Postby friarsol » 17 Nov 2010, 23:47

Alright, I just submitted the script. I still need to update it to handle the Timeshifted rarity scenario, but figured you could use it for now to have some cards converted with SetInfo for testing your code.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Images by Set

Postby friarsol » 18 Nov 2010, 00:07

Here's the foil appearance breakdown as best as I can find for our functional equivalent:

Common foils appear in about one in 12 boosters. Uncommon foils appear in about one in 18 boosters. Rare foils appear in about one in 36 boosters.

Normal Mythics replace Rares 1 in 8 times. So I take that to mean Mythic foils appear in one in 288 packs.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Images by Set

Postby Rob Cashwalker » 18 Nov 2010, 04:33

In the old sets, there wasn't much clear delineation of common, uncommon and rare. Like Antiquities supposedly has no "rares" it just has two levels of uncommon. However magiccards.info lists Coral Helm as "Rare U1", Cursed Rack as "Uncommon C1" and Detonate as "Uncommon U3"...

I'm sure the script will call them rares and uncommons. But if I go strictly by the wiki, a pack of is 6 commons and 2 uncommons.

So maybe defaulting to 5c/2u/1r is better than the original.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Images by Set

Postby Rob Cashwalker » 19 Nov 2010, 19:14

I'm getting the following error for the card Adventuring Gear:
Code: Select all
Adventuring Gear
Traceback (most recent call last):
  File "F:\ForgeSVN\setinfoscript.py", line 233, in <module>
    addSets(card)
  File "F:\ForgeSVN\setinfoscript.py", line 178, in addSets
    setNum = splitData[2]
IndexError: list index out of range
The line number is two higher than your original code, because I added "print card.name" to the top of def addSets(card). Added due to getting the error in the first place.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 9 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 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 9 guests

Login Form