Updated:  November 13, 2009

* means that the question has been updated

 

Quick Answers:

*Quest Mode

*Quest Mode Opponents

Constructed and Sealed

Generate Deck

Booster Draft - How do I build my deck after I draft?

Deck Editor – Import and Export

New Deck – Sealed

New Deck – Generate Random Constructed CardPool

*Stack AI Land

Resizable Game Area

 

FAQ:

What is MTG Forge?

Which file do I run?

*What cards and sets does MTG Forge support?

Help, I don't know how to play Magic: The Gathering!!!

I'm using a Macintosh and MTG Forge isn't working

How do I download the card pictures?

How do you target a player?

*How do you change the booster packs that are used for sealed, draft and quest?

*How can I help?

*Can you post your deck on the Internet or download someone else's deck?

MTG Forge doesn't fit on the screen

How do you report an error?

Where are the other phases?

How do I choose which cards to add?

Why doesn't MTG Forge have my favorite card?

What is a match?

Why doesn't MTG Forge support a whole set or block?

Why does the user interface look weird?

What data files does MTG Forge use?

How do I install a newer version?

Can I change the computer's quest decks?

How does the AI work?

*Can the AI play Instants or Counterspell?

Can you play another person on the Internet?

General Thoughts

 

 

Quest Mode

In the quest mode you start out with a few cards and you win more cards.  In easy mode you get more cards after every game, whether you win or lose. 

 

After you press the "Quest Mode" button you are asked which quest "difficulty" you want.  The difficulty is the total number of matches that you have to win in order to get to the end.  There isn't a real "ending" and you can continue playing using your deck if you want or quit and start another quest.  The current final "level" says "X is your girlfriend.  (X is the name of a card and is supposed to be a little funny.)

 

After you have selected the difficulty, you need to create your deck by opening up the deck editor.  Your deck can be any size such as 40 or 60 cards, the choice is up to you.  You may build a 40 card deck to begin with and later build a 60 card deck.

 

You are given a list of three opponents and you chose which opponent that you want to play against.  Each opponent has a different, distinct deck so if you don't like playing against a particular deck, you can make a mental note to NOT play against that person in the future. 

 

You can see the new cards that you have won by opening up the deck editor and clicking on the column named "R" for rarity.  The new cards will have a rarity of "n" for new and they will be at the bottom of the list.

 

The checkbox "Stack AI Land" will curve the computer's land and give it a slight advantage.  If you are losing you can unselect the "Stack AI Land" option, which will make the computer a little bit easier to beat.  If you are winning you can keep the "Stack AI Land" checkbox marked, which will allow the computer to play at its best.

 

Quest Mode Opponents

The AI opponents are divided into six levels of difficulty based on the strength of their deck.  As you continue on your quest you will face different, harder AI opponents.

 

The last three levels are "Wizard" levels because you have won a good number of matches, you are expected to be a full-fledged wizard.  Below is a technical explanation of how the AI decks are classified.

 

To begin with you play against decks that are categorized as easy, medium, or hard.  After you have won a few matches against the hard decks, the exact number varies according to the quest difficulty that you chose, then you have to play against even harder "Wizard" decks.

 

There are some fairly strong AI decks that use the format {Wizard Name} {no deck number}. These decks are the hardest to beat. You will face these decks at the final stages of the quest. They represent wizards who graduated, won cards for their decks and retired as a master wizard before you started your quest.

 

The weaker decks use the format {Wizard Name} {number 1, 2 or 3}. These are weaker decks that in turn are easier to beat. You will face these decks at the beginning and middle stages of the quest.

 

They represent wizards who graduated wizard school and started their own quests about the same time that you started your quest. As your quest progresses, you may find yourself facing a particular wizard after he/she has had a chance to win cards which they used to improve their decks. While some of the cards will remain the same, some will change.

 

"Tarzan 3" has a deck which is an improved version of the deck that was used by "Tarzan 2". And "Tarzan 2" has a deck which is an improved version of the deck that was used by "Tarzan 1".

 

Constructed and Sealed

The constructed deck option lets you play against the computer using all the cards.  And the sealed deck option restricts you to the 75 cards in your card pool.  MTG Forge only supports matches, see What is a match?

 

Generate Deck

The “Generate Deck” option creates a 2 color deck.  This option just random picks cards and sometimes your mana curve is way too high.  (I’m not very good at making decks, so I use this option a lot.)

 

Booster Draft

After you are done drafting, you have to open up the Deck Editor and then select “Open Deck - Draft” in order to edit your deck.  I know this is confusing, sorry.

 

Instead of pressing the "Choose Card" button you can just right-click.  The right-click button chooses the card that you currently have selected.  So you highlight the card that you want by left-clicking and then you pick it by right-clicking.

 

Deck Editor – Import and Export

The Deck Editor is a little complicated because I keep adding more and more features, but hopefully it is pretty straightforward.  The option “Import Constructed Deck” lets you use a deck that someone else made.  First you download the deck file off of the Internet and then you use this option to open the deck.  The “Export Current Constructed Deck” creates a file containing your current deck so someone else could use your deck.

 

New Deck – Sealed

This option gives you 75 cards plus additional lands in order to build your deck.  The booster packs are generated from the files common.txt, uncommon.txt, and rare.txt which you can modify using the Set Editor.

 

New Deck – Generate Random Constructed CardPool

This is similar to the option “New Deck – Sealed”, this option gives you 75 cards from all the cards which are available.  Hopefully this encourages you to play with a variety of cards.

 

Stack AI Land

If the "Stack AI Land" option is selected, it means that the computer's library will have a few lands on top and the rest of the lands will be put on the bottom.  The idea is that this will slightly improve the AI's performance, since the computer will always be drawing spells instead of lands.  Also the computer doesn't mulligan so this option helps the computer.  Unless you using a land destruction deck, you should always have the " Stack AI Land" box selected.  You can turn off this feature for a more pure Magic experience where the computer can be mana screwed and mana flooded.

 

The checkbox "Stack AI Land" will curve the computer's land and give it a slight advantage.  If you are losing you can unselect the "Stack AI Land" option, which will make the computer a little bit easier to beat.  If you are winning you can keep the "Stack AI Land" checkbox marked, which will allow the computer to play its best.

 

Resizable Game Area

This option lets you use a different user interface that can be resized according to your taste.  This option lets you decide which of the two user interfaces to use.  Both user interfaces look and play the same but one can be resized and the other one can't.

 

 

What is MTG Forge?

MTG Forge lets you play Magic against the computer with rules enforcement.  MTG Forge was primarily written by me (Forge) and with contributions from other people. Currently MTG Forge has more than 2,100 cards.  MTG Forge is written in Java and runs on Windows, Linux, and Mac.  You can e-mail me (Forge) "mtgrares yahoo com"  Thanks to the people at slightlymagic for providing the forum.

 

MTG Forge is always a work-in-progress and will always have a few bugs.  MTG Forge is written by people, like myself, who enjoy programming and Magic.  MTG Forge was started as a "fun little project" and people work on it in their spare time.

 

Since MTG Forge enforces the rules and has a computer opponent the games seem more real than just playing solitaire Magic.  MTG Forge also supports drafting and sealed deck.  You draft against 7 other computer opponents that are building their decks from the cards that they pick.  In sealed deck you have to make your deck from only the cards in your cardpool.

 

MTG Forge also has a "quest mode" which is similar to starting out with a sealed deck and then modifying it with cards that you win.  Your goal is to get a certain number of wins, which is the "quest length".  Quest lengths vary from 10 (very easy) to 40 (very hard).  The quest mode keeps track of your wins and losses.  The matches start out easy and then get harder.  Also see What is a match?

 

Homepage: mtgrares.blogspot.com

Forum:         slightlymagic.net/forum/viewforum.php?f=26

 

What cards and sets does MTG Forge support?

MTG Forge can only support relatively simple Magic cards like Glorious Anthem and Wrath of God.  MTG Forge does not have crazy rares like Warp World.  MTG Forge implements various cards all the way from Alpha like Timetwister and Psychic Blast to Zendikar.  MTG Forge doesn't implement a whole set because currently MTG Forge isn't that flexible.  More cards are being added all of the time but MTG Forge usually won't have all of your favorite cards because Magic is a very large game.

 

MTG Forge tries to implement the best cards from every set like Damnation, Flametongue Kavu, Keiga the Tide Star, and Akroma Angel of Wrath.  Basically MTG Forge has a bunch of random cards thrown together.

 

For a quick listing of all of the cards that MTG Forge supports, open the file "cards.txt" which contains all of the card names and mana costs.  The table below is the current breakdown of all of the cards in MTG Forge and was generated using the set editor statistics option.  (Readme-Set Editor.html has more info about the set editor which lets you edit the cards that are used for sealed, draft, and quest.)

 

          Creatures Spells    Total

White     267           85        352

Blue      188           81        269

Black     204           99        303

Red       244           83        327

Green     329           81        410

Artifact  67            89        156

Gold      184           35        219

Land                             105

Total     1484          657       2141

 

       Common  Uncommon  Rare Total

White     177  90        85   352

Blue      154  65        50   269

Black     163  74        66   303

Red       183  85        59   327

Green     211  101       98   410

Artifact  66   61        29   156

Gold      71   71        77   219

Land      19   34        52   105

Total     1044 581       516  2141

 

 

 

Which file do I run?

Unzip all of the files into the same directory.  MTG Forge won't run if it can't find one of the data files that it needs.  MTG Forge requires Java which you can get at www.java.com/getjava

 

Window's users can double-click on the file "run-forge.exe" or "run-forge.jar"  All other operating systems should be able to execute "run-forge.jar", type "java -jar run-forge.jar" from the command line.  The class that starts MTG Forge is named "Gui_NewGame".

 

Help, I don't know how to play Magic: The Gathering!!!

The easiest way to learn is to download this demo for Windows. You can also learn the rules from the rulebook, which you can download here.  The official website of Magic: The Gathering is here.

 

I'll try to briefly explain the rules.  You and your opponent each have you own deck of cards.  You and your opponent (the computer) start with 20 life points and your goal is to reduce your opponents life points to 0.  You play creatures and those creatures can attack your opponent on your next turn (this is called "summoning sickness"). 

 

Creatures are used to attack and block.  When you attack you "tap" the card by turning it sideways.  Tapped creatures cannot block, so if a creature attacks it cannot block.  Creatures have statistics like 2/1, the 2 is strength that the creature has when attacking and 1 is the defense that the creature has when it blocks.  If a 2/1 blocks a 1/1 creature both creatures will receive 1 damage and will be both put into the graveyard.

 

You can play one land a turn and land produces mana which you use to play a card.  If a card has a cost like "2W" it means that you can need 3 lands and 1 of those lands has to be a Plains.  There are many more rules in the rulebook.

 

Forest - G       (green)

Island - U        (blue)

Mountain - R   (red)

Plains - W       (white)

Swamp - B      (black)

 

I'm using a Macintosh and MTG Forge isn't working

You may have to reset the java preferences. 

 

Look in:

 

/Applications/Utilities/Java/

 

Launch the Java Preferences application. Under Java application versions on my computer I see:

 

-Java SE 6 {64-bit}

-J2SE 5.0 {32-bit}

-J2SE 5.0 {64-bit}

-J2SE 1.4.2 {32-bit}

 

You may need to drag these to change the preferred version and when you do try to restart MTG Forge.

 

MTG Forge was written and tested on Windows XP so there may be other issues with running MTG Forge on a Macintosh.  If you find a problem or know how to solve common problems involving Java and Macs please post them to this forum or e-mail me (mtgrares yahoo com).

 

How do I download the card pictures?

When you first start MTG Forge it is on the “New Game” screen.  You can download the card pictures by selecting the option in the menu, which is oddly named Menu.  (I couldn’t think of a better name, lol.)

 

How do you target a player?

You click on that player’s life points.

 

How do you change the booster packs that are used for sealed, draft and quest?

Readme-Set Editor.html has more info about the set editor.

 

How can I help?

The best way to help is to tell your online and offline friends about MTG Forge.  If people don't know about the program, they can't download it.  (Duh, I know, but advertising is necessary.)

 

If you know Java, you can help add cards and other features to MTG Forge.  Post a message on the forums to get access to source code, currently we are using Google Project SVN.  The easiest way to add a card to MTG Forge is to try to find a card that is similar to the card that you want to add and modify it.

 

Can you post your deck on the Internet or download someone else's deck?

Yes, using the "Export Deck" and "Import Deck" menu options in the Deck Editor.  You can post your deck or download decks on MTG Forge's forum, slightlymagic.net/forum/viewforum.php?f=26

 

To post a deck, open it with the Deck Editor and from the "Deck Actions" menu select "Export Deck".  You will be saving your deck to a file, so a window pops up and asks you where to save the file.  Choose a location that you can find again, like "Local Disk C:".  Exporting a deck creates two files.  One is named your-deck-name.deck which is the file you can post on the Internet and the other file is your-deck-name.txt which is a text file showing the contents of the deck.  On the forums it is polite to post your deck contents and the deck file itself which ends with ".deck", you have to attach your deck file to your post.  Please note that the ".deck" file is only readable by the computer and cannot be viewed.

 

Importing a deck is just the opposite.  First you download the ".deck" file to your computer.  Then you open the Deck Editor and from the "Deck Actions" menu you select "Import Deck".  This will ask you to find the deck file that you downloaded and then press the "Import" button.  The deck will be loaded and saved.  Now you use the deck in a game.

 

Exporting or importing a deck sounds more complicated than it really is and I think both operations are fairly simple.

 

MTG Forge doesn't fit on the screen

MTG Forge was designed to work at a resolution of 1024 by 768.  If your monitor's resolution is less than this, MTG Forge will appear to be too big.  In Windows XP you can change your screen resolution by pressing the Start button, Settings, then clicking on Control Panel.  Then double-click on the Display icon and select the tab named Settings.  Now change the resolution to 1024 by 768.  At a higher resolution all of the text will appear smaller.

 

You can also temporarily hide the taskbar and the bottom of the screen by moving the mouse cursor until you see an arrow that points north and south, hold down the left mouse button and slowly move the mouse down.  Sometimes this won't work because the taskbar is locked.  To unlock the taskbar right click on it and a menu will pop-up, then left click on the item "Lock the Taskbar".  Now you should be able to hide it.

 

How do you report an error?

Unfortunately MTG Forge is a major work-in-progress and errors are bound to occur.  You can post errors on MTG Forge's forums.  Thanks to the people at slightlymagic.net for providing the forum.

 

Where are the other phases?

MTG Forge only has a few of the "important" phases.  You can stop at the end of the computer's turn by selecting it through the menu.  Since MTG Forge does not support all of the phases some cards are less effective.

 

How do I choose which cards to add?

I try to add cards that are interesting and powerful like Wrath of God.  I also try to add cards from new sets such as planeswalkers.  MTG Forge can only implement a very small subset of all Magic cards.  For example, MTG Forge doesn't support X spells such as Fireball.

 

Why doesn't MTG Forge have my favorite card?

We are trying to implement as many cards as possible but many cards haven't or can't be implemented.

 

What is a match?

MTG Forge only supports matches.  According to the comprehensive rules "A match is a series of Magic games and is important only for tournament or league play. A two-player match usually consists of the best two of three games." 

 

The idea behind playing matches instead of individual games is to reduce randomness so the best deck has a better chance of winning.

 

Why doesn't MTG Forge support a whole set or block?

Because MTG Forge can only implement simple cards and could not implement a whole set, although that is the goal for future versions.

 

Why does the user interface look weird?

The user interface was written by me and it uses regular Windows components like panels, dialog boxes, and buttons to represent the Magic game board.  The user interface is basic but very usable.  There are many aspects of the user interface which could be improved. 

 

The user interface was written using Java Swing which wasn't intended to be used for a videogame.  Hopefully in the future the user interface will be more visual like a real videogame.

 

What data files does MTG Forge use?

MTG Forge uses a variety of data files.  You can open and modify the text files, but always make a copy in case you need it.  A binary file means that the file is not editable and should be left alone.

 

all-decks2 - Stores all of the constructed decks. (Binary file)

 

booster-decks - Stores all of the draft and sealed decks.  (Binary file)

 

run-set-editor.jar - Runs the set editor that edits the files common.txt, uncommon.txt, and rare.txt.  For more information read the Set Editor Readme. (Binary file)

 

run-forge.jar - Is the main program which runs everything.  Also read Which file do I run? (Binary file)

 

run-forge.exe - This executes run-forge.jar and is just for convenience. (Binary file)

 

cards.txt - Holds most of the card text like name, cost, power/toughness, etc...  This file doesn't show the text for activated abilities because they are added later in the program by CardFactory.  Many creatures with keywords are implemented by adding them to the cards.txt such as Serra Angel and Akroma, Angel of Wrath.  A number of keywords are supported such as fear, flying, vigilance, haste, flash, lifelink, deathtouch, first strike, double strike, shroud, changeling, wither, persist, protection as well as mana abilities. (Text file)

 

Serra Angel

3 W W

Creature Angel

no text

4/4

Flying

Vigilance

 

card-pictures.txt - This file is used to download the card pictures.  (Text file)

 

AllTokens.txt - Holds the information that is needed to read the correct token card art. (Text file)

 

questData - Holds all of the computer's quest decks as well as your quest data. (Binary file)

 

up.gif and down.gif - Are arrows used by the deck editor. (Binary file)

 

removeCards.txt - Has all of the cards that you want to remove from MTG Forge.  You may want to remove cards that you don't like or cards that are not implemented correctly. (Text file)

 

common.txt, uncommon.txt, rare.txt - Are used to generate the booster packs when you play sealed deck or draft. You can modify these file by running the set editor, see the Set Editor Readme. (Text file)

 

quest-common.txt, quest-uncommon.txt, quest-rare.txt - Are used in the quest mode.  These files are used to generate the cardpool that you start with as well as the cards that you win. You can modify these file by running the set editor but you have to rename them common.txt, uncommon.txt, and rare.txt then edit them using the set editor program and then rename them quest-common.txt, quest-uncommon.txt, quest-rare.txt, see the Set Editor Readme. (Text file)

 

questDecks-easy.txt, questDecks-medium.txt, questDecks-hard.txt - Are used in the quest mode.  These files hold the deck names that the computer AI uses.  The idea is to play against easier decks to being with and harder decks later. (Text file)

 

How do I install a newer version?

Since MTG Forge is a very simple program, you can just unzip the new version in the same directory as the old version.  In order to keep the decks that you have created you have make backups of the files "all-decks2", "booster-decks", and "questData".  You could also export the decks that you want to keep and then import them.

 

Can I change the computer's quest decks?

Yes, create a file named "edit" in the directory where you installed MTG Forge.  The files "run-forge.jar" and "edit" should be in the same directory.  Now when you open the deck editor in the quest mode you can also change the computer's decks.  All of the computer's quest decks are stored in "questData".

 

How does the AI work?

The AI is very basic and my goal was to provide a generic opponent.  The AI tries to play the highest cost creature it its hand.  If the computer has 4 lands, it tries to play a 4-costed creature, if it can't, it tries to play a 4-costed spell.  The AI has separate attacking and blocking routines, this code tries to make good decisions even though it doesn't know what sort of deck the computer is using such as combo or aggro.  Many times the computer won't attack or block as good as a human player.

 

The AI for each card is hardcoded into that card.  The AI for Giant Growth will only allow the computer to play it if it has a creature that will attack.  Cards like Shock are more difficult since Shock can be used in many different situations.  Shock is hardcoded to target a 2/2 flyer or the human player if he has 2 life points.  If the computer has two Shocks in hand and you are at 4 life points, the computer won't target you with the two Shocks because each Shock is evaluated separately.  One solution is to use a search routine like min-max which will find good solutions, like using both Shocks and winning the game.

 

Many times when you try to code an AI you end up with two versions of a card: one for the human player and the other for the computer.  I came up with a solution that allows for only one version of a card.  The resolve part of the card is the same for both the human and computer.  The only part of a card that is different is the targeting code.  The computer's targeting code selects the best target for that card, while the targeting code for the human player lets the user select any legal target.  The computer's targeting code for Shock is hardcoded into Shock's Java source code.  The AI uses the same mana costs as the human player.

 

Can the AI play Instants or Counterspell?

Just recently the ability was added which allows the computer to use spells like Counterspell.  The computer can only respond with counter spells, it will never respond with an activated ability or instant.  The computer can play instants, it will just use them like sorceries.

 

The computer cannot use a few other cards that are very situational such as Akki Drillmaster's ability to give haste to another creature.  Another example is that the AI will only use two of the planeswalker's abilities.  The computer will use an ability that adds loyalty counters and then the "ultimate" ability.

 

Can you play another person on the Internet?

No, MTG Forge was designed to be played only against the computer.  Firemox and Incantus are both excellent Magic programs that let you play over the Internet.

 

General Thoughts

If you are reading this section, you are a brave man, lol.  I've really enjoyed programming on this project.  I really like Java and Magic, and this project gave me a chance to combine the two. 

 

The foundation of this project took me about one year to complete in my spare time and I had only 150 cards.  I've put another two years into it, so that makes a total of three years.  My blogging is just an outgrowth of my thought process while I was programming.  My blog also helps to advertise and promote the existence of MTG Forge.

 

This project was very "quick and dirty" because my goal was to actually get something useable.  (Even though I was doing things "quick and dirty" it still took awhile to get things working.)  I took many shortcuts by having only a few phases, no mana pool, a basic AI, and cutting and pasting code all over the place.  Every facet of MTG Forge could be improved.

 

I am very pleased that MTG Forge supports simple Magic cards as well as a few of the more complicated ones.  Just implementing basic cards like Shock, Giant Growth, Venerable Monk, and Elvish Piper is hard enough.

 

I'm still working on this program and one day I hope to have a challenging AI and a whole set or two.