It is currently 19 Apr 2024, 14:41
   
Text Size

Card Collector's Numbers?

Post MTG Forge Related Programming Questions Here

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

Card Collector's Numbers?

Postby Myrd » 29 Dec 2015, 00:47

Is there a reason we don't store card collectors numbers anywhere in Forge?

If we had this info, we could make the automatic image lookup feature I added work for all the cards.

Right now, it only works for cards that have valid image URLs specified via SVar:Picture - which seems to not be the case for a lot of newer cards. For example, http://www.wizards.com/global/images/ma ... ascade.jpg doesn't work, even though we specify it as SVar:Picture on a card.

If we had collectors numbers for the cards, then the in-game downloader can use one of a number of existing websites that support looking up card images by set & collector's number. For example:
http://magiccards.info/scans/en/bfz/246.jpg
or: http://static.firemind.ch/scans/BFZ/246.jpg

I know we have txt listings for all the sets (e.g. Battle for Zendikar.txt), but it doesn't seem to be the case that the order of cards in those matches the collector's number. For example, it doesn't match for BFZ or AVR or a number of other sets. (Although it does seem to match for some others.)

Would it make sense to explicitly store the collector numbers somewhere? For example, as part of the set .txt files - e.g. instead of having the line "C Skyline Cascade", it could have "246 C Skyline Cascade". I think we need to store it explicitly instead of relying on the order because I think some cards can have different art but same collector's numbers (e.g. full art vs. non full art lands in BFZ).

Any objections to the above? I guess we'd need to update all the existing set text files for it, but probably it should be possible to write a program that does it by scraping some web resource or something. (Maybe magiccards.info query results like: http://magiccards.info/query?q=e%3Abfz% ... st&s=issue - though not sure how reliable that is since it doesn't list the collector number as a column).
Myrd
 
Posts: 87
Joined: 24 Nov 2014, 05:58
Has thanked: 4 times
Been thanked: 32 times

Re: Card Collector's Numbers?

Postby Myrd » 29 Dec 2015, 00:54

Also, I wonder whether it wouldn't make sense to switch Forge to use the http://mtgjson.com/ data set? The metadata there does have collector's numbers.

I guess we'd still need forge specific metadata for card mechanics, but perhaps it can obsolete the need to have individual set txt files in Forge? Or perhaps it can be used to generate those files?
Myrd
 
Posts: 87
Joined: 24 Nov 2014, 05:58
Has thanked: 4 times
Been thanked: 32 times

Re: Card Collector's Numbers?

Postby friarsol » 29 Dec 2015, 01:18

Collector's Numbers aren't in Forge because they've never been relevant as far as Forge goes.

I'm not sure if trying to make the Forge set files obsolete is an advantage, it just makes custom sets and future sets that aren't actually released more difficult.

FYI, I did start using mtgjson.com info in some of our tools already as a replacement for mtg-data. You can check it out in forge-gui/tools/EditionTracking.py and editionCreator.py

I guess the main question is what's your proposal for reverse compatibility? If someone has a custom set that works, upgrading to this new edition format would break their files.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Collector's Numbers?

Postby Myrd » 29 Dec 2015, 03:18

That's a good point about custom sets. Given that, I think keeping the existing format makes sense.

In that case, I'll work on updating it to support an optional collector's number and update the existing files with the values from mtgjson. Then, I can use them in the image downloader.
Myrd
 
Posts: 87
Joined: 24 Nov 2014, 05:58
Has thanked: 4 times
Been thanked: 32 times

Re: Card Collector's Numbers?

Postby friarsol » 29 Dec 2015, 04:23

Myrd wrote:That's a good point about custom sets. Given that, I think keeping the existing format makes sense.

In that case, I'll work on updating it to support an optional collector's number and update the existing files with the values from mtgjson. Then, I can use them in the image downloader.
Works for me. EditionCreator.py probably will do the manual portion of the work for you. I'd imagine it wouldn't take too much to tweak it to add the Collector Number somewhere as you like, and I wouldn't think it'd be too hard to either have the edition file itself have a versioning system for parsing (e.g. HasCollectorNumber=True), or just allow the parsing to be flexible enough to expect it to start either with a collector number or a rarity.

On the edition file tweaks + images notes, there might be an interesting solution to allow for base URL overriding for custom sets.

For example, as you mentioned, normally we could grab LQ images from http://magiccards.info/scans/en/<setcode>/<collector#>.jpg

But if I made a "Sol's Awesome Set" maybe I'd want the baseURL to be:
http://solsawesomeset.com/img/ (and allow Forge to append <setcode>/<collector#>.jpg as normal)

But that might be out of the scope of these changes.


I would love to see the removal of the SVar:Picture: property. I've tried to get rid of it before without much luck.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Collector's Numbers?

Postby Myrd » 29 Dec 2015, 06:24

Makes sense. I've landed the changes that try to fetch from magiccards.info when possible.

I think this should allow removing the SVar:Picture property. Although, right now there's some cards for which we don't have card collector's numbers for. For example, old sets don't have them (and they weren't in the mtgjson data set) - although magiccards.info does have a numbering scheme for them. If we can add those missing numbers (maybe by just implementing the sorting algorithm?), we should be good to remove the SVar:Picture stuff.
Myrd
 
Posts: 87
Joined: 24 Nov 2014, 05:58
Has thanked: 4 times
Been thanked: 32 times

Re: Card Collector's Numbers?

Postby Max mtg » 24 Feb 2016, 18:26

Card names inside some of the edition files were already ordered by collection number, so one might assign that number reading line by line the edition file. The only disadvantage is lack of fullscreen/regular variations for cards like zendikar basic lands.

The actual numbers in front of card names look like an overkill.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 51 guests


Who is online

In total there are 51 users online :: 0 registered, 0 hidden and 51 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 51 guests

Login Form