Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Deck Editor 0.2 Beta Available

edited June 2011
http://virtualplaytable.com/download/vpt02.zip

* Added card price showing from store.tcgplayer.com
* Added Rulings text from Gatherer
* Changed card rendering, increased size of card image
* Added "Test Hand" dialog
* Images from MWS doesn't support now
* Added builtin image downloader via torrent tracker.
(don't unpack loaded image packages, it uses images directly from zip)

Images only from "Lorwin" to "New Phyrexia" sets available to autodownload, images for other sets will be added soon.

Please write there about problems and bugs.

Comments

  • Can we use (as in v 0.1 ) images from MWS ? Otherwise all looks great and still testing :)
  • In couple days I will prpare fix to work with MWS images too.
  • Thank you :) It will make migration easier :)
  • Fixed, images from MWS now works
    Redownload version 0.2 from link in first post

  • Thank you! Works great :)
  • Currently VPT does *not* work with MWS images, in the format MWS uses: 2 or 3 letter set abbreviations as the directory names. This needs fixing.

    Heres the playtable log:
    (My programming improvement notes with **)

    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey/ENG/Aboshan's Desire.full.jpg" ) - File not found
    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey/Aboshan's Desire.full.jpg" ) - File not found
    Debug: FileManager::loadZipFileList( "c:\magic\mtg\odyssey.zip" ) - File not found
    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey.zip/Odyssey/ENG/Aboshan's Desire.full.jpg" ) - File not found

    **ok up to here it looks fine, except for the fact that the code should not perform the isFileExists for a file inside a zip file if the previous line failed to load said zip file.
    ** Here, It should now additionally check this path (this is for fulls, also repeat this in the next section looking for crops) :
    ** C:/Magic/MTG/OD/cardname (OD is the MWS set ID for Odyssey)

    Debug: FileManager::loadZipFileList( "c:\magic\mtg\odyssey.zip" ) - File not found
    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey.zip/Odyssey/Aboshan's Desire.full.jpg" ) - File not found
    **We already know the zip file does not exist, why is this checking again? Set a boolean variable to prevent further checks of the same zip filename if it failed. Dont forget to zero that variable after the search routine is done, just in case the user goes and gets the zip file while Playtable is running.

    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey/ENG/Aboshan's Desire.jpg" ) - File not found
    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey/Aboshan's Desire.jpg" ) - File not found
    Debug: FileManager::loadZipFileList( "c:\magic\mtg\odyssey.zip" ) - File not found
    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey.zip/Odyssey/ENG/Aboshan's Desire.jpg" ) - File not found
    Debug: FileManager::loadZipFileList( "c:\magic\mtg\odyssey.zip" ) - File not found
    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey.zip/Odyssey/Aboshan's Desire.jpg" ) - File not found
    *okay, checked for crop images.. we should be done, but then

    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey/ENG/Aboshan's Desire.full.jpg" ) - File not found
    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey/Aboshan's Desire.full.jpg" ) - File not found
    Debug: FileManager::loadZipFileList( "c:\magic\mtg\odyssey.zip" ) - File not found
    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey.zip/Odyssey/ENG/Aboshan's Desire.full.jpg" ) - File not found
    Debug: FileManager::loadZipFileList( "c:\magic\mtg\odyssey.zip" ) - File not found
    Debug: FileManager::isFileExists( "C:/Magic/MTG/Odyssey.zip/Odyssey/Aboshan's Desire.full.jpg" ) - File not found
    **Why did it just re-run the whole routine looking for the .full.jpg file?

    -----------
    I've already told Det privately, but for anyone else reading this I have noticed that VPT cannot locate prices for cards spelled incorrectly, specifically I have noticed split cards do not work because their cardname has 2 slashes "Assault//Battery" when they should only have one. All those cards names should be changed, not only for price searches to work, but noone's old decks will have used the 2 slashes.

    ~Planeswlk (from MWS forum)
  • >Currently VPT does *not* work with MWS images, in the format MWS uses:
    >2 or 3 letter set abbreviations as the directory names. This needs fixing.

    For me it works. If you don't see images and sure that you have them in path, send me your log file.

    -----------

    public String searchCardImage(Card card, boolean full)
    {
    if (card == null) return null;

    String path = module.getImagesPath();
    SetInfo setInfo = module.database().getSetInfo(card.set());

    ArrayList setnames = new ArrayList();
    String setfolder = setInfo.value("images","");
    String setname = setInfo.value("name","");
    if (!setfolder.isEmpty()) setnames.add(removeInvalidChars(setfolder));
    if (!setname.isEmpty()) setnames.add(removeInvalidChars(setname)); // '7th Edition'
    setnames.add(setInfo.id()); // '7E'

    ArrayList searchPaths = new ArrayList();
    for(String foldername : setnames)
    {
    searchPaths.add(Path.combine(path,foldername+"/"+card.lang()));
    searchPaths.add(Path.combine(path,foldername));
    searchPaths.add(Path.combine(path,foldername+".zip/"+foldername+"/"+card.lang()));
    searchPaths.add(Path.combine(path,foldername+".zip/"+foldername));
    }

    String id = removeInvalidChars(card.id());
    ArrayList searchNames = new ArrayList();
    if (!card.ver().isEmpty())
    {
    String ver = removeInvalidChars(card.ver());
    searchNames.add(id+" ["+ver+"]");
    searchNames.add(id+" "+ver);
    searchNames.add(id+ver);
    }
    searchNames.add(id);

    for(String setpath : searchPaths)
    {
    for(String name : searchNames)
    {
    String filename = Path.combine(setpath,name+(full ? ".full.jpg" : ".jpg"));
    if (Path.isFileExists(filename)) return filename;
    }
    }
    return null;
    }
  • > We already know the zip file does not exist, why is this checking again?

    It is very quick process becuase I already have files list in memory hash.

    > I have noticed split cards do not work because their cardname has 2
    > slashes "Assault//Battery" when they should only have one.
    > All those cards names should be changed, not only for price searches to work,
    > but noone's old decks will have used the 2 slashes.

    I will fix it later, currently I want finish play part as soon as possible.

  • edited June 2011
    Well as you see I did post my log file, and VPT is not searching for the 2-3 letter directory name. For me it only searches on full set name.

    I just verified I had the latest build of VPT.. so I think you have not committed the code you speak of into the download yet.
  • Dunno it works fine here. Assault // Battery work too. I see all images that my MWS had :)
  • >Well as you see I did post my log file, and VPT
    >is not searching for the 2-3 letter directory name

    It's why I want to see full log file with all image search messages.
    Send me on email.
  • Any news here?
  • wait next build in couple days.
Sign In or Register to comment.