Skip to content

Developer HOWTO Guides

Oleg Agafonov edited this page Dec 22, 2017 · 25 revisions

Add new set

  1. Create new set's java file in ..\Mage.Sets\src\mage\sets\ folder by copy-paste template from any other set (example: ExplorersOfIxalan.java);
  2. Setup official set code and release date (use scryfall for set's info);
  3. Add new cards to set (see below);
  4. Add new tokens to set (see below);
  5. Setup set symbols download options:
    1. Go to ..\Mage.Client\src\main\java\org\mage\plugins\card\dl\sources\GathererSets.java;
    2. Add set's code to one of the supported list (example: symbolsBasic);
    3. Add replace code when source uses non standard codes (example: codeReplacements.put("CMA", "CM1"););
  6. Setup card images download options:
    1. Find current supporting images sources DownloadSources in ..\Mage.Client\src\main\java\org\mage\plugins\card\images\DownloadPictures.java file;
    2. For each image source that you can download go to class file and add set's code to support list;
      1. Add set's code to supported (example for scryfall: supportedSets.add("OGW"););
      2. Add replace code when source uses non standard codes (example for scryfall: put("DD3GVL", "gvl"););
    3. If set's can be downloaded then remove that code from global ignore list (ignore.urls in C:\mage\Mage.Client\src\main\resources\image.url.properties file);
  7. Setup token images download options:
    1. Some sources can support tokens download: if so then repeat cards images setup but search source code for tokens data (start with getTokenImages() method from java class, example: ..\Mage.Client\src\main\java\org\mage\plugins\card\dl\sources\TokensMtgImageSource.java);
    2. Add tokens data to ..\Mage.Client\src\main\resources\card-pictures-tok.txt;
Clone this wiki locally