Card Decks

Each card deck used by YaZZle resides in its own directory within the "Card Decks" YaZZle home directory subdirectory. There are currently two different versions of card decks that are supported:

Version 1 card decks

There are 2 files which must be created for a version 1 card deck. The deck.ini file which contains information that tells YaZZle what's in the image file, and the image file which contains the card images. A 3rd file, the shadow file, is optional. Both the image file and the shadow file must be of type .bmp, .jpg, or .png.

The deck.ini file

The v1 deck.ini is composed of 4 sections, all of which are required:

The General section

The General section is composed of the following settings:

Name
What's displayed in the "Select Deck" dialog's deck names list.
MadeBy
Specifies who made it.
MadeWhen
Specifies the day of creation in yyyymmdd format.
Bitmap
Gives the name of the image file that contains the card images. This file must be of type .bmp, .jpg, or .png.
Shadow
Optionally gives the name of the shadow file that contains the alpha channel image which will be used to create a drop shadow effect during card stack drag and drop movements. This file must be of type .bmp, .jpg, or .png.
Convert
Optional. A value of 1 tells YaZZle to apply the negative of the card deck's template image to the card deck's commons, backs, and face cards images prior to their use. Defaults to 0. This allows a v1 card deck to be created without having to create the black border around each of the card images when creating non-rectangular cards.
Version
Optional, but if entered should be 1. Defaults to 1.
Example:
[General]
Name=plastique
MadeBy=plastic
MadeWhen=20020111
Bitmap=plastique.bmp
Shadow=plastiqueShadow.bmp
      

The Counts section

The Counts section is composed of the following settings:

NumBacks
Specifies the number of back images contained within the image file. For YaZZle Release 2.0, this needs to be from 1 to 20.
NumCommons
Specifies the number of commons card images contained within the image file. For YaZZle Release 2.0, this needs to be 40.
NumFaces
Specifies the number of face card images contained within the image file. For YaZZle Release 2.0, this needs to be 12.
NumTemplates
Specifies the number of card template images contained within the image file. For YaZZle Release 2.0, this needs to be 1.
NumHighlights
Optionally specifies the number of card highlight images contained within the image file. For YaZZle Release 2.0, this needs to be 0 or 1.
Example:
[Counts]
NumBacks=4
NumCommons=40
NumFaces=12
NumHighlights=1
NumTemplates=1
      

The Dimensions section

The Dimensions section is composed of the following settings:

CardDimX
Specifies the width of each image contained within the image file.
CardDimY
Specifies the height of each image contained within the image file.
BackOutlineX
Not used by YaZZle Release 2.0.
BackOutlineY
Not used by YaZZle Release 2.0.
FaceOutlineX
Not used by YaZZle Release 2.0.
FaceOutlineY
Not used by YaZZle Release 2.0.
Example:
[Dimensions]
CardDimX=75
CardDimY=100
BackOutlineX=3
BackOutlineY=3
FaceOutlineX=3
FaceOutlineY=10
      

The Commons section

The Commons section is composed of the following settings, which must be entered as pairs. For YaZZle Release 2.0, N=0 through 39:

SuitN
Specifies the suit of the Nth common card image contained within the image file. 1=clubs, 2=diamonds, 3=hearts, 4=spades.
RankN
Specifies the rank of the Nth common card image contained within the image file. 1=ace, 2=deuce, ..., 10=ten.
Example:
[Commons]
Suit0=1
Rank0=1
Suit1=1
Rank1=2
Suit2=1
Rank2=3
Suit3=1
Rank3=4
Suit4=1
Rank4=5
Suit5=1
Rank5=6
Suit6=1
Rank6=7
Suit7=1
Rank7=8
Suit8=1
Rank8=9
Suit9=1
Rank9=10
Suit10=2
Rank10=1
Suit11=2
Rank11=2
Suit12=2
Rank12=3
Suit13=2
Rank13=4
Suit14=2
Rank14=5
Suit15=2
Rank15=6
Suit16=2
Rank16=7
Suit17=2
Rank17=8
Suit18=2
Rank18=9
Suit19=2
Rank19=10
Suit20=3
Rank20=1
Suit21=3
Rank21=2
Suit22=3
Rank22=3
Suit23=3
Rank23=4
Suit24=3
Rank24=5
Suit25=3
Rank25=6
Suit26=3
Rank26=7
Suit27=3
Rank27=8
Suit28=3
Rank28=9
Suit29=3
Rank29=10
Suit30=4
Rank30=1
Suit31=4
Rank31=2
Suit32=4
Rank32=3
Suit33=4
Rank33=4
Suit34=4
Rank34=5
Suit35=4
Rank35=6
Suit36=4
Rank36=7
Suit37=4
Rank37=8
Suit38=4
Rank38=9
Suit39=4
Rank39=10
      

The image file

The v1 image file is composed of a number of images, one after the other in one long horizontal "row." All images must have the same dimensions. The types of images, and their required order, are template, highlight, commons, backs, and face cards. This file must be of type .bmp, .jpg, or .png.

The template images

The Template images are used to "carve" a border for each displayed card image. White pixels represent pixels of a card image which will be considered transparent. Black pixels represent pixels of a card image which will be considered to be opaque. For YaZZle Release 2.0, there must be 1 and only 1 of these images and it must be the first image in the image file.

Examples:

The highlight images

The Highlight images are used during YaZZle's "Highlight" function to help differentiate the highlighted cards from the rest of the cards. Prior to the display of each highlighted card, the highlight image is applied to the card image using a "multiply" blend operation. For YaZZle Release 2.0, there must be 0 or 1 of these images, and if given, it must be the second image in the file.

Examples:

The commons images

The Commons images are face up card images for the commons, or non-face, cards. For YaZZle Release 2.0, there must be 40 of these.

Examples:

The backs images

The Backs images are face down card images. For YaZZle Release 2.0, there must be from 1 to 20 of these.

Examples:

The face cards images

The Face card images are face up card images for the face cards. For YaZZle Release 2.0, there must be 12 of these and they must be given in Jack of Clubs, Queen of Clubs, King of Clubs, Jack of Diamonds, Queen of Diamonds, King of Diamonds, Jack of Hearts, Queen of Hearts, King of Hearts, Jack of Spades, Queen of Spades, King of Spades order.

Examples:

The shadow file

The v1 shadow file is composed of one image which will be used as the alpha channel for each card image displayed during drag and drop movements. The purpose of the shadow image is to produce a drop shadow effect. This file must be of type .bmp, .jpg, or .png.

Examples:

Version 2 card decks

There are numerous files which must be created for a version 2 card deck, but they all fall into 3 general file types. The deck.ini file contains information that tells YaZZle how to build the card deck from the other files. Additionally, each card back, alpha, highlight, and card front image must be given in its own image file. A 3rd file type, the shadow file, is optional. Both the image files and the shadow file must be of type .bmp, .jpg, or .png.

The deck.ini file

The v2 deck.ini is composed of 7 sections, all of which are required.

The General section

The General section is composed of the following settings:

Name
What's displayed in the "Select Deck" dialog's deck names list.
MadeBy
Specifies who made it.
MadeWhen
Specifies the day of creation in yyyymmdd format.
Convert
Optional. A value of 1 tells YaZZle to apply the negative of the card deck's alpha image to the card deck's commons, backs, and face cards images prior to their use. Defaults to 0. This allows a v2 card deck to be created without having to create the black border around each of the card images when creating non-rectangular cards.
Version
Defaults to 1 but needs to be a 2 to specify a v2 deck.
Example:
[General]
Name=Bellot
Description=An LGPL deck made from SVG playing cards
Website=http://david.bellot.free.fr/svg-cards/
Version=2
MadeBy=David Bellot
MadeWhen=20041506
Convert=1
      

The Counts section

The Counts section is composed of the following settings:

NumSuits
For YaZZle Release 2.0, this needs to be 0.
NumRanks
For YaZZle Release 2.0, this needs to be 0.
NumBacks
Specifies the number of back images, each contained within an image file. For YaZZle Release 2.0, this needs to be from 1 to 20.
NumCommons
Specifies the number of commons card images, each contained within an image file. For YaZZle Release 2.0, this needs to be 40.
NumFaces
Specifies the number of face card images, each contained within an image file. For YaZZle Release 2.0, this needs to be 12.
NumTemplates
Specifies the number of card alpha images, each contained within an image file. For YaZZle Release 2.0, this needs to be 1.
NumHighlights
Optionally specifies the number of card highlight images, each contained within an image file. For YaZZle Release 2.0, this needs to be 0.
Example:
[Counts]
NumSuits=0
NumRanks=0
NumBacks=14
NumCommons=40
NumFaces=12
NumHighlights=0
NumTemplates=1
      

The Dimensions section

The Dimensions section is composed of the following settings:

CardDimX
Specifies the width of an image contained within each image file.
CardDimY
Specifies the height of an image contained within each image file.
Example:
[Dimensions]
CardDimX=223
CardDimY=324
      

The Backs section

The Backs section is composed of the following settings:

ImageN
Specifies the name of the image file to be used for the Nth card back. There should be from 1 to [Counts]NumBacks of these settings.
Example:
[Backs]
Image1=b1.png
Image2=b2.png
Image3=b3.png
Image4=b4.png
Image5=b5.png
Image6=b6.png
Image7=b7.png
Image8=b8.png
Image9=b9.png
Image10=b10.png
Image11=b11.png
Image12=b12.png
Image13=b13.png
Image14=b14.png
      

The FaceBase section

The FaceBase section is composed of the following settings:

Alpha
Specifies the name of the image file to be used as the template image. The template image is used to "carve" a border for each displayed card image. White pixels represent pixels of a card image which will be considered transparent. Black pixels represent pixels of a card image which will be considered to be opaque.
Shadow
Specifies the name of the image file to be used as the shadow image. The shadow image file is composed of one image which will be used as the alpha channel for each card image displayed during drag and drop movements. The purpose of the shadow image is to produce a drop shadow effect.
Highlight
Specifies the name of the image file to be used as the highlight image. The highlight image is used during YaZZle's "Highlight" function to help differentiate the highlighted cards from the rest of the cards. Prior to the display of each highlighted card, the highlight image is applied to the card image using a "multiply" blend operation.
Example:
[FaceBase]
Alpha=template.png
Shadow=shadow.png
Highlight=highlight.png
      

The Commons section

The Commons section is composed of the following settings, which all must be entered together. For YaZZle Release 2.0, N=1 through 40:

SuitN
Specifies the suit of the Nth common card image contained within the image file specified in its accompanying ImageN setting. 1=clubs, 2=diamonds, 3=hearts, 4=spades.
RankN
Specifies the rank of the Nth common card image contained within the image file specified in its accompanying ImageN setting. 1=ace, 2=deuce, ..., 10=ten.
ImageN
Specifies the name of the Nth common card image's image file.
Example:
[Commons]
Suit1=1
Rank1=1
Image1=ac.png
Suit2=1
Rank2=2
Image2=2c.png
Suit3=1
Rank3=3
Image3=3c.png
Suit4=1
Rank4=4
Image4=4c.png
Suit5=1
Rank5=5
Image5=5c.png
Suit6=1
Rank6=6
Image6=6c.png
Suit7=1
Rank7=7
Image7=7c.png
Suit8=1
Rank8=8
Image8=8c.png
Suit9=1
Rank9=9
Image9=9c.png
Suit10=1
Rank10=10
Image10=tc.png
Suit11=2
Rank11=1
Image11=ad.png
Suit12=2
Rank12=2
Image12=2d.png
Suit13=2
Rank13=3
Image13=3d.png
Suit14=2
Rank14=4
Image14=4d.png
Suit15=2
Rank15=5
Image15=5d.png
Suit16=2
Rank16=6
Image16=6d.png
Suit17=2
Rank17=7
Image17=7d.png
Suit18=2
Rank18=8
Image18=8d.png
Suit19=2
Rank19=9
Image19=9d.png
Suit20=2
Rank20=10
Image20=td.png
Suit21=3
Rank21=1
Image21=ah.png
Suit22=3
Rank22=2
Image22=2h.png
Suit23=3
Rank23=3
Image23=3h.png
Suit24=3
Rank24=4
Image24=4h.png
Suit25=3
Rank25=5
Image25=5h.png
Suit26=3
Rank26=6
Image26=6h.png
Suit27=3
Rank27=7
Image27=7h.png
Suit28=3
Rank28=8
Image28=8h.png
Suit29=3
Rank29=9
Image29=9h.png
Suit30=3
Rank30=10
Image30=th.png
Suit31=4
Rank31=1
Image31=as.png
Suit32=4
Rank32=2
Image32=2s.png
Suit33=4
Rank33=3
Image33=3s.png
Suit34=4
Rank34=4
Image34=4s.png
Suit35=4
Rank35=5
Image35=5s.png
Suit36=4
Rank36=6
Image36=6s.png
Suit37=4
Rank37=7
Image37=7s.png
Suit38=4
Rank38=8
Image38=8s.png
Suit39=4
Rank39=9
Image39=9s.png
Suit40=4
Rank40=10
Image40=ts.png
      

The Faces section

The Faces section is composed of the following settings, which all must be entered together. For YaZZle Release 2.0, N=1 through 12:

SuitN
Specifies the suit of the Nth face card image contained within the image file specified in its accompanying ImageN setting. 1=clubs, 2=diamonds, 3=hearts, 4=spades.
RankN
Specifies the rank of the Nth face card image contained within the image file specified in its accompanying ImageN setting. 11=jack, 12=queen, 13=king.
ImageN
Specifies the name of the Nth face card image's image file.
Example:
[Faces]
Suit1=1
Rank1=11
Image1=jc.png
Suit2=1
Rank2=12
Image2=qc.png
Suit3=1
Rank3=13
Image3=kc.png
Suit4=2
Rank4=11
Image4=jd.png
Suit5=2
Rank5=12
Image5=qd.png
Suit6=2
Rank6=13
Image6=kd.png
Suit7=3
Rank7=11
Image7=jh.png
Suit8=3
Rank8=12
Image8=qh.png
Suit9=3
Rank9=13
Image9=kh.png
Suit10=4
Rank10=11
Image10=js.png
Suit11=4
Rank11=12
Image11=qs.png
Suit12=4
Rank12=13
Image12=ks.png
      

The image files

As indicated above, the v2 deck.ini contains a setting for each possible playing card back image file, for the alpha and highlight image files, and for each playing card's face up image file. Each of these image files must meet the following restrictions:

The shadow file

The v2 shadow file is composed of one image which will be used as the alpha channel for each card image displayed during drag and drop movements. The purpose of the shadow image is to produce a drop shadow effect. This file must be of type .bmp, .jpg, or .png.