How To Make Your Own Custom Card for American Mah-Jongg

Perhaps you bought this game in 1999 or 2000, and now it's a later year, and you are not able to download a newer card file from Activision, or perhaps you just want to play with your own custom card. It's not too difficult to edit your own card. Shanghai: Second Dynasty includes a Card Editor so you can do just that!

To create or "edit" your own card, first you must go into the American Mah-Jongg game. From the File menu, select Custom Card Editor...

This will open the Custom Card Editor mode.

The Card Editor is a somewhat technical programming tool. In creating this editor, we had to assume that the user (that's you) is reasonably computer-literate and able to deal with some basic database concepts in creating an American-style card. Computer Creampuffs, abandon all hope if you enter here!

Note: Activision Technical Support is unable to offer assistance with the Card Editor.

Getting Started

When you first enter the Card Editor, you're looking at a blank slate. You can start creating a card from scratch if you want, or you can use the menu options to load an existing card.

If you want to start from scratch, skip down to the next paragraph (don't read the next three sentences). If you want to start from an existing card, use the File menu, and select Open Card. The program looks in a folder called Cards, which was installed on your hard drive along with the game. The card file that comes with the game is called 2000.crd.

Creating Hands

Creating a hand requires several steps, but after you get into the hang of it, it can go very quickly.

1. Give each hand a unique name. Usually a hand is named by its numerical order in a section of the card ("2001 #3," for instance). See the file 2000.crd for examples. When someone finishes a game, it's useful to know which hand the player won on. The name is important for this.

2. Define the size of the first tile grouping. Each hand on the card is made of a number of unique groupings of tiles (so many pungs or kongs or quints, etc.). How many identical tiles are in your first tile grouping? Go to the Group Size box and click the down-arrow icon to set the size of the first grouping.

3. Define the tiles used in your first tile grouping. Go to the Tile Type box. If your first grouping is Flowers, select Flowers from the drop-down list (click the down-arrow icon to see the list). If your first grouping is Ones, select Ones from the list. If your first grouping can be made of tiles of any number, select Any Number from the list.

4. If the "tile type" is a number tile (a suit tile), then you need to define the suit. Here's where things get a little complicated. You've seen how the suits are shown as colors on American Mah-Jongg cards, right? Well, a color on the card does not necessarily mean that one particular suit is required (green ink does not mean you can only use Bams). So if you have selected a suit tile for your first grouping, your first suit should be Suit #1. If all the suit tiles in the hand will be of the same suit, they'll all be Suit #1. If your hand uses tiles of two suits only, you will use both Suit #1 and Suit #2 -- but you will not use Suit #3 at all in a two-suit hand. If your hand has any suit tiles in it, you must define the first group of them as Suit #1 -- if you define the first group of suit tiles as Suit #2 or Suit #3, there may be problems when you play the game with your card file.

5. Define how much the hand will score (near the top of the screen).

6. Define whether the hand must be Concealed or not. Most hands need not be Concealed. All-pair hands (or hands with no pungs, kongs, or quints) are, by definition, Concealed hands.

7. Once you have defined all the tile groupings and the score, the hand is complete enough, and you can define another hand. Click the button that says Add New Hand.

8. If you want to make a hand that is somewhat similar to another hand you've already created, press Prev. Hand to move back to that other hand. Then click the button labeled Copy Hand. Then click Add New Hand and then click Paste Hand. Change the Hand Name, and change anything else in the hand that needs to be changed.

9. If you make a hand that's just too messed up and you want to start over, press the button labeled Clear Hand.

10. If you make one minor mistake and want to undo it, press the Undo button.

11. Finished editing the hand? Skip down to the paragraph Saving Your Card File.

Jokerless Hands

On American cards, there is usually a specific Singles & Pairs section on the card where all the hands are exempt from the Jokerless bonus. In Shanghai: Second Dynasty's American game, any hand (regardless of its location on the card) that has no pungs, kongs or quints (any hand composed entirely of pairs and/or single tiles) is automatically exempt from the Jokerless bonus.


Shanghai: Second Dynasty's Card Editor cannot allow all possible hands. Certain restrictions apply to the cards you can make.

1. You shouldn't make more than 100 different hand definitions. If you do, problems may occur.

2. Some hands (especially pairs hands, or hands which allow numerous "any number/any suit" groupings) have too many permutations. The game's artificial intelligence routines will overload if your card has too many permutations, and problems would result. Therefore the game will not allow more than two groups in a hand that are any one of the following three tile types: 'Any number,' 'Any odd,' or 'Any even;' and one of the following three suit types: 'Suit1,' 'Suit 2,' or 'Suit 3.'

3. Any group which is either 'Same As Previous' or 'Previous Plus 1' and the previous tile type was 'Any Number,' 'Any Odd,' or 'Any Even' in 'Any Suit', then the suit of the current meld can only be 'any suit'. The game will not allow any other choice in this instance. This was done to prevent any possible permutations overload for the A.I., which could result in slowness or other problems.

4. You cannot define sextuplets (groupings of six identical tiles), septuplets (groupings of seven), octuplets (groupings of eight), or larger groupings in Shanghai: Second Dynasty.

5. You cannot specify which suit is to be used for a grouping (you cannot require a hand to have "a pung of Three Dots," for instance).

6. You cannot define a Chow (a sequence such as 123 or 567, as is used in other forms of Mah-Jongg) or a Knitted grouping (a "knitted pung" of similar numbers in all three suits, as is used in Western Mah-Jongg).

7.You cannot play with the American card in Western, Chinese, or Japanese Mah-Jongg. The card you create can only be played with in the American game.

8. Macintosh users of the original Macintosh version of Shanghai: Second Dynasty and Shanghai: Mah-Jongg Essentials may encounter problems trying to open custom cards, tile sets, or layouts if the filetyping information ("Creator" and "File Type" attributes) is not "just so." See "Filetyping (Macintosh only)" at the end of this chapter for further information on filetyping.

Saving Your Card File

When you finish editing your custom card (and even during the process of editing it), you should save it with a unique name. Use the Save As... function under the File menu to do this. If you just "Save" the card, saving it under the name "2000.crd," you have over-written the default card and there might be problems with it later.

Rescuing Your Card File

If you over-wrote the default card and it turns out that there are problems with your 2000 card, you can re-copy the default card from the CD. Use your computer's Find function to locate the file on the CD, and copy it to the folder where the game is located on your CD. The card file must be in the Cards folder (inside the game folder) in order for the game to find it.

On the CD:
The 2000.crd file is located in Setup\Data\Cards.

Windows users:
The default location on the hard drive is C:\Program Files\Activision\Shanghai Second Dynasty\Cards\2000.crd

Macintosh users:
The default location on the hard drive is ... oh, forget it. Macintoshes are not set up the same way at all -- we have no way of knowing the name of your hard drive! You have to figure it out. Send us a postcard or something once you get there. (No T-shirts, though. We already have enough dang T-shirts.)

Printing Your Custom Card

You'll probably want a printed copy of your custom card to keep beside you while you play the game on your computer. Here's how.

1. First, you must be in the Card Editor, with your custom card open.

2. Go to the File menu.

3. Select Save As HTML.

4. Make a note of the name of the filename of the card file you save.

5. Exit or minimize the game.

6. Navigate to the Cards folder, or use your computer's Find function to locate the card file.

7. Double-click the card file.

8. Your browser should open and you should see your card file in HTML format.

9. Use your browser's Print function to print your card.

If you have an advanced word processor program that can read HTML files (such as Microsoft Word 2000), you can lay out the card to look the way you want when it's been printed.

Using Your Card in the Game

After you've edited your custom card, you'll want to play it in the game, of course!

1. Exit the Card Editor from the File menu or by clicking the Exit button.

2. You are now back in the American Mah-Jongg game.

3. Go to the Games menu.

4. Select Mah-Jongg Options.

5. American is already selected. Click OK.

6. Go to the Card box and click the down-arrow icon.

7. Select Custom.

8. In the window that opens, select the card file you created.

9. In the Options dialog box, click OK.

10. The game begins, and all players are now playing from your custom card.

11. You can use the Help menu to view the card! View Current Card.

12. You can use the Help menu to have the program suggest a hand on your custom card. Show Closest Hands.

Filetyping (Macintosh only)

Macintosh users: This updated version of Shanghai will not refuse to open a custom card, tile set, or layout if the filetyping information ("Creator" and "File Type" attributes) is not "just so." But the original Macintosh version of Shanghai: Second Dynasty and Shanghai: Mah-Jongg Essentials will refuse to open custom cards, tile sets, or layouts if the filetyping information ("Creator" and "File Type" attributes) is not "just so."

So if you are sending a custom card, tile set, or layout to a user of the original (v1.0) Macintosh version of Shanghai: Second Dynasty or Shanghai: Mah-Jongg Essentials, it would be "user-friendly" if you would alter the Creator and File Type attributes before compressing and sending the file. (You are not obligated to do so, but it is probably not wrong to assume that someone who creates a custom card, tile set, or layout is more "computer literate" than someone who does not.)

There are several filetyping programs which can be obtained via the Internet:

* A Better Finder Creators & Types -- http://www.publicspace.net/ABetterFinderCreatorsAndTypes/
* FileBuddy -- http://www.skytag.com/FileBuddy.stuff/fb_download.html
* Change Type and Creator (CTC) -- http://www.eureka.ca/rmf/Docs/CMM.html#CTC

These are the Creator and File Types for Shanghai files which can be customized:

- Creator: ShD2 (Shanghai: Second Dynasty files)
- Creator: SMMj (Shanghai: Mah-Jongg Essentials files)
- File Type: card (custom American mah-jongg card files)
- File Type: patt (custom layout files)
- File Type: BMPf (custom tile set files)

Click on the underlined part of this chapter you want to read next:

American Mah-Jongg Part 1: Basic Info

American Mah-Jongg Part 2: Options

American Mah-Jongg Part 3: Let's Play Already!

American Mah-Jongg Part 4: Scoring and Strategies

American Mah-Jongg Part 5: How To Make Your Own Custom Card

Or click here to go to the next chapter:

Chinese Mah-Jongg