Page 1 of 1

An Edition Support Analysis Of XMage's Import Feature

PostPosted: 31 Mar 2016, 02:33
by Mulsiphix
I wanted to be absolutely sure that there wasn't a deck file format out there that XMage could read and somehow recognize edition information from. What follows is a test which I performed that proves, not that anybody doubted this was the case, that XMage cannot currently read edition information from deck files; no matter what the text formatting is *sigh of sadness*.

I opened MTG Studio, which can save decks in a lot of deck formats. I then opened a MTG Studio included deck file for 8th Edition;s Heavy Hitters theme deck. I saved the deck in each of the 14 possible deck formats and then opened each of the resulting files in a Word Processor to determine which decks could be read as plain text (versus unreadable binary). The 14 possible formats are:

  1. MTG Studio Files (*.deck)
  2. MTG Online III Files (*.dek)
  3. MTG Online Files (*.txt)
  4. MTG Online Files (*.dec)
  5. Magic Workstation Files (*.mwDeck)
  6. Online Play Table Files (*.dck)
  7. Apprentice Files (*.dec)
  8. Wagic The Homebrew Files (*.txt)
  9. Magic Suitcase Files (*.mdb)
  10. OCTGN, MTGIE, MTG Play FIles (*.xml)
  11. Shandalar Files (*.dck)
  12. Mana Deck Files (*.dck)
  13. MTG Studio Tiny Files (*.tinydeck)
  14. Forge Files (*.dck)
XMage only supports opening *.txt, *.dec, and *.mwDeck files, which accounts for 5 of the 14 decks. Since many of the non-supported deck extensions are still plain text and could likely be interpreted as plain text files, I renamed the file extension of the remaining 9 decks to *.txt. I then loaded each deck into XMage. What follows are my results:

How The Importing Process Fared
Image

Examples Of Deck Entries
Image

So 3 of 14 decks loaded cards into XMage. In the XMage editor you can see the edition for each individual card. I had previously assumed that XMage selected the version of a card, that had been printed across multiple editions, by random. If "1 Rhox" appeared in the deck list to be imported, the card that appeared in the XMage editor could be the Rhox from Nemesis, 8th, or 10th edition.

Surprisingly each of the three decks that were imported all produced identical versions of each card. This completely disproves my previous assumption that XMage randomly picks a version of a card during the import process. So now I'm curious. Does anybody know how XMage determines which version of a card to use when a deck is imported?

Re: An Edition Support Analysis Of XMage's Import Feature

PostPosted: 31 Mar 2016, 03:44
by fireshoes
I believe when last discussed, it was changed from being random to using the most recent printing from a non-supplemental set (so ignoring promo versions, Commander prints or Modern/Vintage Masters).

Re: An Edition Support Analysis Of XMage's Import Feature

PostPosted: 31 Mar 2016, 04:14
by Doctor Weird
I couldn't resist and was looking for the answer. And fireshoes seems to now confirm what I found.

From CardRepository.java, after line 325, findPreferedCoreExpansionCard (which the deck importers use):

| Open
Code: Select all
if ((set.getType().equals(SetType.EXPANSION) || set.getType().equals(SetType.CORE))
                            && (lastExpansionDate == null || set.getReleaseDate().after(lastExpansionDate))) {
                        cardToUse = cardinfo;
                        lastExpansionDate = set.getReleaseDate();
It filters through the available expansions and core sets for the one with the most recent date.

Re: An Edition Support Analysis Of XMage's Import Feature

PostPosted: 31 Mar 2016, 21:00
by Mulsiphix
That is awesome =D>. Thank you so much for finding the code and posting it :wink:. While I wish there were a way to control aspects of the import process (like an edition priority list concerning card selection), I think this is a far superior method to cards being chosen at random. At least this way your deck will look as good as possible, assuming the art image hasn't changed to something else entirely compared to the edition/version you desire to use. Thank you so much!! :mrgreen: