MWS Games and Manuals


NMCG





Table of contents

Introduction

Nate’s Magic Card Generator (http://www.slightlymagic.net/cardgen.shtml) allows you to generate pixel-perfect images of any Magic card ever made. All you need to do is provide the art. (May I recommend the MWSHQ (http://www.mwsdata.com/forum/viewtopic.php?t=413) project and their MWSPA (http://www.slightlymagic.net/hqscans.shtml) utility?) It also allows you to render pages of proxy images, generate card-sized decklists (complete with format legality) to keep in your deckboxes, and create your own custom Magic cards (including flip, split, and Vanguard cards).

Nate’s Magic Card Generator consists of batch files and comma-separated value spreadsheets. This set-up is actually very easy to use and it has several benefits: it makes programming (and, thus, developing and improving the program) easier, it makes the program smaller, and it makes the program faster. Newer computer users may find this intimidating at first, so Nate has developed a graphic user interface (GUI) for createCard.bat. This allows you to create custom cards and see your information presented in real-time. See the section on Custom Cards below for more details.

NMCG was created by and is highly recommended for MWS users and the following guide assumes that MWS is already installed. If this is not so, you can change the default directories.

Getting Started

Download Nate’s Magic Card Generator (current version is 5.3 as of May 5th, 2006) from SlightlyMagic.net (http://www.slightlymagic.net/cardgen.shtml). The file size should be approximately 45Mb. Unzip the file to the directory of your choice (note that the files in the zip have no containing folder).

Open Config.txt and scroll down to Art Settings (second section from the bottom). Set “art.directory=” to “C:\Program Files\Magic Workstation\Pics.” Then, if you have not already, you can use the MWSPA to download high-quality cropped image scans (this is not necessary for using this Guide but you will want them eventually). Save Config.txt and close it. We will leave the rest of the settings at default for now. After you acquaint yourself with the Generator, feel free to configure the program to your liking (see the section on Custom Configuration below).

Batch Files

You will note 6 MS-DOS batch files in the Generator directory: createCard, diffDecklists, generateCards, generateDecklistCards, generateDecklistPages, and generatePages.

You may use any of these files by double-clicking and following the instructions or by dragging the appropriate .csv, MWdeck, or MTGO Dec file onto the icon (except createCard).

Full Card Images

generateCards.bat renders card images and a decklist card from .csv spreadsheets.

Let’s see this in action. To make it easy, open the Decks folder, copy “Krark Clan Ironworks” and “MBC” and paste them in the Generator directory. Double-click generateCards.bat. Drag “Krark Clan Ironworks” onto the command window and press Enter. The program will load the card data and ask if you want to generate a decklist card. Tell it yes by entering 1 (0 is no) and press Enter. It will then validate the decklist and generate the card images.

If it says “art not found,” that means you either have not downloaded cropped art using MWSPA or you did not save Config.txt after changing the art directory. However, the rest of the card image will still be generated.

When it is complete, you can press any key to close the command window. Then, open the Output folder that has now appeared in the Generator directory. Inside, you will see 26 images (25 cards and the decklist). Feel free to look through the images and note the appearance of the mana symbols, the frames, the expansion symbols, even the paintbrush icon next to the artist’s name. Look at the decklist card. The top of the card has the deck’s name and the mana symbols for its colors (a deck with a splash color will even show that mana symbol at a smaller size). It lists every card, and the number of copies, in the deck. At the bottom it includes legality information for the deck and notes which sets are included in the formats (so you know whether it was before or after rotation, for example). Ignore, for now, the fact that the decklist mentions sets such as LIVE and ROCK.

Note that these images are very large and not suitable for use as proxies.

Resizing Full Images

There is a Powertoy for Windows XP called the Image Resizer (http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx) that tends to give better results than even Photoshop when resizing the card renders. After downloading and installing the Image Resizer Powertoy, select and right-click the image(s) you want to resize and choose Resize Pictures from the menu.

There are several choices pre-programmed and the Advanced tab allows for even greater customization. The Large size is smaller than a rendered card but still very big. The Small size is good for showing off cards as it is still large enough to see detail while the Handheld size is about the same size as a Gatherer image.

Pages of Proxies

To create proxies, drag “Krark Clan Ironworks” onto generatePages. It will again ask if you want to generate a decklist card. Enter “1” to tell it yes. It will then ask if you want to delete the images in the Output folder. Entering “1” will delete all the images while “0” will leave them alone. Enter “1” to tell it yes. You will note that it now generates the card “Krark Clan Ironworks” four times instead of one. You will also note that after the first “Darksteel Citadel” it will say “Page 1 complete.” Open the Output folder and look at the image. Eight cards are arranged to fill a page and make the most efficient use of the space. The Output.txt file simply mentions how many cards were printed on the last page.

(You may notice that two of the Chromatic Spheres on page 4 and the Fireball and Mana Leaks on page 8 are from different sets (Invasion, 8th Edition, and Stronghold, respectively). This is due to the decklist not specifying which edition to use, so the Generator chooses an edition. To specify an edition, add the set abbreviation for a card to column C in the .csv.)

Now drag “MBC” onto generatePages. It will ask if you want a decklist card (enter “0” for no) and then it will ask if you want to append the images. Enter “y” for yes. This will add the first images of the MBC deck to the incomplete page 10 with 4 cards from the Krark Clan deck, thus saving paper. If you check Output.txt, you will note it has been updated from stating 4 images on the last page to 8.

Card-Sized Decklists

After it finishes generating the pages and you close the window, drag “MBC” onto generateDecklistCards. It will ask if you want to delete all the images in the Output folder. Enter “1.” It will then generate a decklist card like the one you saw when you used generateCards. This program is a very fast way to print out a decklist before a tournament, especially if you use MWS for playtesting, because it does not also generate all the cards in the deck.

If you want to generate multiple decklist cards for printing, you can use generateDecklistPages. Drag “Krark Clan Ironworks” onto the batch file. It will ask if you want to delete the files. Tell it yes. It will generate a card-sized decklist card and an Output.txt file. Then drag “MBC” onto generateDecklistPages. It will ask if you want to append. Tell it yes with “y.” If you want to generate more than one decklist page at once, it can do that too. Drag both Krark Clan and MBC onto the batch file at the same time. Once again, append the files. Open the Output folder and you will notice that all four decklist cards are on the page.

You can append pages from either batch file to images generated with the other as well. Feel free to drag either decklist onto generatePages and tell it to append.

Automatic Decklist Check

Finally, diffDecklists is a tool for quickly determining the differences between two decklists. Perhaps during some last-minute playtesting on MWS you made a few card changes and you need to know just the changes so you can fix your cardboard for the tournament in an hour. Well, drag the original decklist onto diffDecklists and then drag the new decklist and press Enter. It will tell you what you added and what you took out. It will also generate a .csv file with the additions you made (but not what you took out).

diffDecklists assumes you have printed a decklist and then updated that decklist. It takes the old, printed decklist and the new, unprinted decklist and tells you which cards you need to remove from the printed deck. It also produces a .csv of the cards that need to be printed and added to the printed deck (assuming you are using proxy images).

Make a copy of “MBC” and open the copy. Change Shizo, Death’s Storehouse from 1 to 4 and change Blinkmoth Nexus from 4 to 1. Then save the file.

(If you are using Excel, it may give you a prompt about elements not being compatible with csv files. Tell it to proceed by clicking “Yes.” This is just a hiccup in Excel and no data or formatting will be lost (despite Excel saying otherwise). When you try to close the file, it may prompt you again. If you have already saved the file, there is no need to save it again so just click “No.”)

Drag MBC onto diffDecklists. It will load the card data and tell you to drag and drop the second decklist. Do so with the copy of MBC that we changed and press Enter. The Generator tells us that we should add 3 Shizo, Death’s Storehouse to MBC and then remove 3 Blinkmoth Nexus in order to comply with the new decklist. If you look in the Generator directory, you will note that we now have another .csv named “Copy of MBC (add only).” This .csv includes a list of the cards that we need to add to our deck. If we were playing with proxies or custom cards (see below), we could drag this onto generatePages and get the cards we need rendered and printed in no time.

Custom Cards

Well, how about we get away from all those existing cards and make some of our own? Let’s start with a few singletons before we move on to something more ambitious like a custom set.

The first thing you will want to do is get a picture. Anything will do but it works best when the picture has dimensions close to those of a real Magic illustration.

Now, open createCard. The first thing is whether or not to delete the images in Output. Go ahead and enter “1.” It will then ask what kind of card we want to make. Let’s start simple and enter “R” for a regular card. It will now ask for the following information (note that you cannot go back after you enter something):

Title – the card’s name
Casting Cost – enter mana in {} brackets
Art – there are four ways to do this; 1) you can copy and paste a URL (use the right-click menu to paste); 2) you can copy and paste the filepath (use the right-click menu to paste); 3) you can type the URL or filepath; or 4) you can drag the file onto the window and manually delete the quotation marks (you must press left or Home to go back through the filepath as pressing up in a command window changes the line to the last line entered rather than move you up a line).
Type – use a regular hyphen to separate subtypes; the Generator will automatically change it to the long dash
Power/toughness – enter the numbers with a slash (either slash is fine); you can also enter letters, dashes, plus signs, and stars
Legal Text – the rules text; enter {T} for the tap symbol; use #these# to generate italic text (for reminder text; pressing Enter takes you to a new line of the text box; pressing Enter on an empty line takes you to the next prompt
Flavor Text – this text is automatically made italic; you can make it un-italic (such as for attributing quotes) by using #these#; as with Legal Text, pressing Enter takes you to a new line and pressing Enter on an empty line takes you to the next prompt
Artist – the artist’s name
Copyright – (tm) is the trademark symbol, (c) is the copyright symbol; this is also the line where you enter the collector number (at the end of the line)
Edition – enter the letter code for the edition of the card; if this is a custom card, entering nothing will provide a generic three-card symbol as long as you enter a rarity (we will learn to enter new editions and symbols later)
Rarity – R, U, or C

The card will now be rendered in the output folder. Go ahead and take a look.

The other card types, except Vanguard, follow much the same format.

For lands, after you enter the Title information, the Generator will ask for the colors that the land can produce. This is used to choose the correct piping colors (the colors of the frame that surrounds the text box, type line, and art). “C” (gray piping) is for lands that produce only colorless mana while “A” (gold piping) is for 5-color lands like City of Brass and Forbidden Orchard as well as lands that do not produce mana.

Custom Split, Flip, and Vanguard Cards

Split cards are built one card after the other. You will see the prompts as for a regular card (except edition/rarity/copyright) and, after finishing the first card, you will see the same prompts for the second card. After the second card, you will enter the edition, rarity, and copyright information for the card. The card will be generated in Output with a combination of the two names. For example, if you made a card called War/Peace, it will be generated as WarPeace.

Flip cards are also built one after the other. However, because of the constraints of the flip card frame, no Copyright information or Flavor Text will be put on the card (you can get around this by using italics (#this#) in the Legal Text). After entering the Title, Cost, Art, Type, P/T, and Legal Text of the unflipped card, you will enter the information for the flipped card and the edition and rarity.

Vanguard cards require special information: the adjustments to starting hand size and life. After entering the Title, Art, Legal Text, and Flavor Text for the card, you will be prompted for the adjustment to hand size. Enter this value as +X or –X. You will then be prompted for the adjustment to starting life. Again, enter this as +X or –X. There are no fields for edition or copyright or artist’s name.

At this point, feel free to experiment with the different information prompts. For example, see all the places you can put a mana symbol or use italic text.

Custom Sets

You may notice that rendering multiple cards using createCard.bat would be slow and cumbersome. If you accidentally enter a misspelling or forget an activated ability on a card, you have to input the entire card over again. If you have aspirations of rendering decks or even entire expansion sets of custom cards, you will need to enter the information via comma-separated value spreadsheets.

Go into the Data folder and open cards.csv. From titles to casting costs to flavor text, this file contains nearly all the information of every Magic card ever made. Artist and collector number information are stored in artists.csv, Ravnica guild insignia are listed in guilds.csv, and the colors of mana produced by every land are listed in landColors.csv. By entering card information into these spreadsheets, you can render entire custom sets at once.

Before we manipulate these files, let’s protect them from any unintentional damage. Make copies of cards.csv and editions.php and paste them somewhere safe outside the Data folder. Then, if you have not already, make a copy of either MBC or Krark Clan Ironworks in the Decks folder and paste it in the main Generator directory.

Now, open cards.csv and copy a row with card information (from column A to column I). Then paste that line at the bottom of the spreadsheet (row 12942, from A to I); do not be alarmed if the height of the row suddenly increases as it causes no problems with the Generator. You can now change the card information to your liking, keeping each type of information in the appropriate column (Name, Edition, Color, Type, P/T, Flavor Text, Rarity, Cost, Rules Text); it is okay for fields to be blank (not every card has a P/T or flavor text). Pay careful attention to the formatting for mana symbols, the tap symbol, italics (the Flavor column is automatically made italic upon generation), and special cards (flip, split, Vanguard, etc). Please also note that dashes show up as – in the spreadsheet but you may use a hyphen (-) when inputting card information.

While entering your card information, you may want to add a line break in rules text or flavor text. Just pressing Enter will cause Excel to move to the next cell in the column. In order to make a line break, hold Alt while pressing Enter.

For now, just enter a handful of different types of cards to test and save the file. If you are using Excel, it may give you a prompt about elements not being compatible with csv files. Tell it to proceed by clicking “Yes.” This is just a hiccup in Excel and no data or formatting will be lost (despite Excel saying otherwise). When you try to close the file, it may prompt you again. If you have already saved the file, there is no need to save it again so just click “No.”

Changes to artists.csv, landColors.csv, and guilds.csv are done in the same manner.

Now open editions.php using a text editor like Notepad. Copy a line and paste it at the end of the listing. Change the abbreviation to the letters you used for your custom cards in cards.csv and save the file.

Once the data files are finished, open the deck file you copied. Add a copy of each of your custom cards to the bottom of the decklist using the same format as the others (number in column A, name in column B). Then feel free to delete any of the other cards in the decklist (to make the generation faster). Save the file (once again ignoring Excel’s protests) and then drag the csv onto generateCards. There will be no art for your custom cards (yet), but the full images will appear in Output.

Art for Custom Sets

The Generator can use any size art, both in dimension and file size. The Generator will automatically resize and crop the art if you have not done so but best results come from shaping the art to the appropriate (approximate) dimensions yourself.

To provide art for your custom cards, create an appropriate folder in C:Program Files\Magic Workstation\Pics named with the abbreviation you used for your custom cards. Put images with the same names as your cards into this folder. Then generate the cards again by dragging the decklist onto generateCards. This time, the renders in Output should have the images you placed in this folder. If they do not, check to make sure the folder has the same abbreviation as used in editions.php and that Config.txt in the main Generator directory points to C:Program Files\Magic Workstation\Pics.

Custom Configuration

The various settings in Config.txt are typically self-explanatory. Any settings for a prompt will appear when the action is set to 1 and the prompt is set to 1 and not appear when either value is set to 0. If the action governed by the prompt is set to 1, then setting the prompt to 0 will automatically carry out that action.

For example, output.clean is the command for deleting all the images in the Output folder. If output.clean=0, no prompt will appear in the Generator even if output.clean.prompt=1, because you have told the Generator that you do not want it to ever delete the images in Output. If output.clean.prompt=0, it will rely on output.clean to determine whether it should (=1) or should not (=0) delete the images. Only when both values are 1 will the Generator ask you if you want to delete the images or not.

To put that another way: output.clean=0 means the Generator will never delete the images in Output; output.clean=1, output.clean.prompt=0 will always delete the images in Output without asking; output.clean=1, output.clean.prompt=1 will always ask if you want to delete the images or not.

If you want to spend the money for them, the true Magic fonts can be used to generate even more realistic card images and proxies. If you get Plantin, Plantin Italic (PlanticI.ttf), MatrixBold, and MatrixBoldSmallCaps (MatrixBSC.ttf) true type fonts, place them in the Fonts folder and adjust the font settings in Config.txt as follows:

font.title=MatrixBold.ttf
font.type=MatrixBold.ttf
font.legal=Plantin.ttf
font.legal.italic=PlantinI.ttf
font.flavor=PlantinI.ttf
font.pt=MatrixBSC.ttf
font.artist=MatrixBold.ttf
font.copyright=Plantin.ttf

Miscellaneous Tools

The Miscellaneous folder holds five tools for greater integration and easier use of NMCG.

InstallContextMenuItems.bat adds five of the six main batch file functions (excepting createCard) to your right-click menu so long as you hold down Shift. This allows you to easily generate cards, decklist cards, pages, decklist pages, and compare different decklists without having to copy & paste files or drag them onto the batch icon or into the cmd window. Just navigate to the desired csv, hold Shift, and right-click the file to access the Generator. It is highly recommended that frequent users utilize this function.

decklist2csv.bat changes an MWdeck or MTGO Dec file to a Generator-friendly .csv by creating a new .csv file in the deck’s containing folder.

mws2cards.bat changes an MWS-exported .csv to a Generator-friendly .csv by creating a new .csv file in the .csv’s containing folder. The .csv exported from MWS has to have specific columns. This is done by right clicking the headers in MWS and using the column chooser to put the right headers there.

cardmapDecoder.bat changes an MTGO deckfile (.txt) to a Generator-friendly .csv by generating a new .csv file in the deckfile’s containing folder. This function does not work with decks exported from MWS as DEC files (as they are not saved as .txt but .dec).

printPages.js can be used with Adobe Photoshop CS. You go File -> Automate -> Scripts and point it at printPages.js. It prompts for a directory of generated card pages (the Output folder), then it queues all of them up for printing at the correct DPI to make the cards the correct size. You can use it as a template for making your own printPages.js. Open it with a text editor and there are brief instructions on how to make your own.

config-MWS.txt is a premade configuration for generating full-size images for use with MWS. Just exchange Config.txt for config-MWS.txt, rename it Config.txt, and run generateCards with an appropriate .csv (such as allCards.csv in the Decks folder). All the cards will be rendered as Name.full.jpg in the appropriate set directory in C:Program Files\Magic Workstation\Pics.

config-Nate.txt is a premade configuration for generating card images according to the developer’s personal tastes. The biggest differences are the use of png files for lossless images and larger mana symbols (the 1WUBRG symbols are generated as large as a Ravnica-block hybrid symbol).

Known Issues

There are five bugged cards in the guilds.csv file: Agrus Kos, Wojek Veteran; Sunhome, Fortress of the Legion; Vitu-Ghazi, the City-Tree; Conjurer’s Ban; and Debtors’ Knell must be corrected before they will render with the appropriate guild insignia. Agrus Kos has the comma after Agrus instead of Kos, Sunhome and Vitu-Ghazi are missing the rest of their names, and both Conjurer’s Ban and Debtors’ Knell simply need you to delete and retype the apostrophe, otherwise the Generator reads it as a special character and fails to recognize the name in guilds.csv.

Lands without legal text (such as basic lands and the original dual lands) have a pair of quirks. First, lands that generate one or two colors of mana (as defined in landColors.csv) will display the appropriate large mana symbol(s) in the text box. Lands that generate three or more colors of mana, or colorless mana, will show a blank text box. On the default settings, the land frame will display the colors of mana that land produces (a land that produces WUB would have a white, blue, and black frame). The use of multicolor land frames (as well as regular card frames) can be disabled in Config.txt (“Set to 1 to output multicolor land frames instead of a gold frame”).

Second, lands without legal text will not be rendered with guild insignia even if you change guilds.csv. The large mana symbol that fills the text box takes the place of any guild insignia. If you want the land to have a guild insignia, add a space as the legal text in cards.csv and set the appropriate guild in guilds.csv. The land will show no legal text (a space is invisible) and the card will have the guild insignia watermark.

If you want the card to show both the mana symbols and the watermark, the easiest way is to render the card with the watermark and then manually add the mana symbols (found in images\basic land in the Generator directory) using Photoshop.

Image paths with backslashes, which have special meaning, may be rejected by the Generator. A backslash escapes the next character. For example, \n is a newline, \t is a tab, etc. If you have problems with your art, and you want an actual backslash, use \\. Alternatively you can use forward slashes (/) instead of backslashes in your image paths.

Reporting Issues

Nate has a support thread (http://www.mwsdata.com/forum/viewtopic.php?t=424) at MWSData.com's forums (it is very long, so just go to the last page or two to see what is happening). He regularly checks and responds to posts in this thread and it is the first place you will find announcements about updates, fixes, and new features.

File and Function List

data – this folder holds spreadsheets with card information

  • artists.csv – the artist, version, and collection number of every Magic card
  • cards.csv – all the various information for every Magic card
  • guilds.csv – a list of all the Ravnica-block guild cards and their appropriate guild
  • landcolors.csv – a list of all Magic lands and the colors they produce
  • mtgoIDs.csv – a list of all online Magic cards and their MTGO ID numbers*
  • editions.php – a list of the abbreviations for every Magic set; open with Notepad**
  • formats.php – a list of the sets legal in each format and banned/restricted cards

*When a new set is released on MTGO, the cards will have to be added.

**editions.php determines what the current T2 and extended environments are as printed on the decklist cards. If cards with new sets are added, they must be added in multiples of three if they are put after Ice Age (to keep with the same pattern WOTC uses of 3 sets = 1 block, T2 = latest Core set and 2 expert sets, etc). Sets of less than three must be placed before Ice Age.

decks – this folder contains sample decks that show off the Generator’s capabilities and serve as models for constructing your own decklist .csv files

fonts – this folder contains the card fonts; because the Magic fonts (Plantin and MatrixBold) are not free, close substitutions (MPlantin and Garamond) have been chosen

  • GaramondB.ttf – used for card titles, types, P/T, and artist’s name
  • Pre8th.ttf – used for pre-8th edition cards
  • MPlantin.ttf – used for legal (rules) text and copyright
  • MPlantinI.ttf – used for legal (reminder) and flavor text

images – this folder contains all the frames, symbols, and icons used for a Magic card, including the guild insignia for all 10 Ravnica-block guilds

misc – this folder contains files with highly useful extra features

  • cardmapdecoder.bat – this generates a .csv file from an MTGO Dec file (in the same folder)
  • decklist2csv.bat – this generates a .csv file from an MWdeck or MTGO Dec file (in the same folder)
  • installContextMenuItems.bat – this installs the Generator’s main .bat functions to the right-click menu when you hold down shift
  • mws2cards.bat – this generates a .csv file in the Generator’s format from a .csv deck file generated using MWS (in the same folder)
  • config-MWS.txt – this is a premade config file for generating Full images for use with MWS
  • config-Nate.txt – this is a premade config file used by the developer; the main difference from normal Magic cards is larger mana symbols (the normal mana symbols are as large as the Ravnica-block hybrid symbols)
  • printPages – a script for Photoshop CS2 for converting pages to the proper printing DPI

php – contains the runtime files for the php engine, which is used to execute the php files that make up the Generator

scripts – the php script files necessary for the Generator to function; do not modify these unless you are somewhat proficient in php programming

config.txt – the configuration settings for the Generator

readme.txt – a very quick summary of how to use the Generator


Nate's Magic Card Generator (http://www.slightlymagic.net/cardgen.shtml) by NateDogg
NMCG Guide by Strovil the Wild Mage (http://www.mwsgames.com/index.php/Strovil%27s_Standard_Play_Guide_for_MWSPlay)