Lingua italiana

nanDECK - ver. 1.13 nanDECK icon

nanDECK is a software for Windows (any version) written as an aid for game inventors, with the aim of speeding up the process of designing and printing deck of cards (useful during prototyping and playtesting).

nanDECK can also be used on Linux (read this FAQ).

nanDECK is free, you can download it and use freely, without limitations (but a donation, of course, is welcome).

nanDECK screenshot

Click here to download nanDECK 1.13 (2060 kB) updated 11-22-2011New!
The .zip file contains the program, unzip and run it (no need to install it); this program can also be used from an USB flash drive.
If you have a question, write me an e-mail at .
I've also created a Yahoo group for this program.

nanDECK manual

Click here to download a nanDECK Manual (1509 kB) updated 11-22-2011New!

BGG2nanDECK screenshot

Clic here to download BGG2nanDECK 1.5a (1151 kB) updated 08-17-2011
This program connects itself to Boardgamegeek and can dowload data to create cards with your games.
The .zip file contains the program, an example script file and some printing templates, unzip and run it (no need to install); this program can also be used from an USB flash drive.
For this program I wrote this tutorial, to explain all the options I wrote this page.

BGG2Graph screenshot

Clic here to download BGG2Graph 1.1f (505 kB) updated 08-10-2011
This program connects itself to Boardgamegeek and can dowload data to create charts with historical games' stats.
The .zip file contains the program and an example script file, unzip and run it (no need to install); this program can also be used from an USB flash drive.

nanDECK can also be used as a combination/permutation engine, read this tutorial.

nanDECK can also be used for counters, read this tutorial.

This program uses a script for the creation of the cards, and you can add text, images and some graphics (lines, rectangles and ellipses). Using nanDECK you can add or change graphic elements to a deck (or only some cards) with only some lines of text. The default size of the cards is 6 cm x 9 cm (9 cards for every sheet), but you can customize everything, (even creating chits for wargames). The keywords are very simple, for example, this is a script for a deck of 18 cards that can be used for Werewolf:

cards=18
border=rectangle
font=arial,28,"B","#0000FF"
text="1","SEER",0,3,6,3,"center"
font=arial,28,"B","#FF0000"
text="2-4","WEREWOLF",0,3,6,3,"center"
font=arial,28,"B","#000000"
text="5-18","VILLAGER",0,3,6,3,"center"

cards=18
This keyword sets the number of the cards in the deck.

border=rectangle
This keyword draws a border around all cards.

font=arial,28,"B","#0000FF"
font=arial,28,"B","#FF0000"
font=arial,28,"B","#000000"
These keywords set the font to be used for text, Arial size 28, bold and in three different colors.

text="1","SEER",0,3,6,3,"center"
This keyword writes on the 1st card the word "SEER", in the rectangle from coordinates (0,3), width 6 and height 3, with alignment "center". Note that all coordinates are in cm.

text="2-4","WEREWOLF",0,3,6,3,"center"
This keyword writes on the 2nd, 3rd and 4th card the word "WEREWOLF".

text="5-18","VILLAGER",0,3,6,3,"center"
This keyword writes on cards from 5 to 18 the word "VILLAGER".

A great strength of nanDECK (versus other graphic programs) is the capability to modify an already done deck with a few changes. So if you want to add an image to the top-right angle of every card in the Werewolf deck, you only have to add one line:

image="1-18","logo.gif",0,4,2,2,0


toolbar image

Program utilization:

- after you start the program, to the left you find a button toolbar,

- press "New deck" to create a new script, press "Open deck" to load a saved script, or select an entry from "Reopen deck" menu,

- then "Validate deck" for checking the syntax,

- if all is OK, with the button "Build deck" you create the deck, and you can check and review any card with the buttons on the right,

- finally, with the button "Print deck" you can preview and print it,

- eventually, with the button "Save images" you can save the images of the cards,

- you can also create a PDF file, with the button "Create PDF".



Scripts' examples:

  Text alignment (1.2+)
card example 01
rectangle="1-4",1,1,4,7,"#0000FF"
text="1","center-top",1,1,4,2,"center","top"
text="1","center-center",1,3,4,3,"center","center"
text="1","center-bottom",1,6,4,2,"center","bottom"
card example 02
rectangle="1-4",1,1,4,7,"#0000FF"
text="2","left-top",1,1,4,2,"left","top"
text="2","left-center",1,3,4,3,"left","center"
text="2","left-bottom",1,6,4,2,"left","bottom"
card example 03
rectangle="1-4",1,1,4,7,"#0000FF"
text="3","right-top",1,1,4,2,"right","top"
text="3","right-center",1,3,4,3,"right","center"
text="3","right-bottom",1,6,4,2,"right","bottom"
card example 04
rectangle="1-4",1,1,4,7,"#0000FF"
text="4","Nel mezzo del cammin di nostra vita, mi ritrovai per una selva oscura",1,1,4,7,"left","wordwrap"
  Text rotation (1.5a+)
card example 05 font="Arial",20,"B","#000000","#FFFF80"
text="1","Test ABC 123",5,0,1,9,"center","center",90
text="1","Test ABC 123",0,0,1,9,"center","center",270
  Transparent background for images (1.6+)
card example 06 image="1","background.gif",0,0,6,9,0
image="1","werewolf.gif",1.5,2.5,3,4,0,"T"
  Transparent background for text (1.6+)
card example 07

font=arial,28,"B","#C0C0C0"
text="2-4","WEREWOLF",0.2,3.2,6,3,"center"
font=arial,28,"BT","#808080"
text="2-4","WEREWOLF",0.1,3.1,6,3,"center"
font=arial,28,"BT","#FF0000"
text="2-4","WEREWOLF",0,3,6,3,"center"

  Multiple images with PATTERN directive (1.6b+)
card example 08

pattern="1","dot_red2.gif","5",0,2,6,4,2,2,0,"","center","top"

  Linear gradients for RECTANGLE directive (1.7+)
card example 09 rectangle="1",1,1,4,7,"#0000FF#FF0000@90"
  Line width for LINE directive (1.7a+)
card example 10 line="1",1,1,5,1,"#0000FF"
line="1",1,2,5,2,"#0000FF",0.05
line="1",1,3,5,3,"#0000FF",0.1
line="1",1,4,5,4,"#0000FF",0.15
line="1",1,5,5,5,"#0000FF",0.2
line="1",1,6,5,6,"#0000FF",0.25
line="1",1,7,5,7,"#0000FF",0.3
line="1",1,8,5,8,"#0000FF",0.35
  FILL directive (1.7b+)
card example 11 line="1",0,1,6,1,"#0000FF",0.1
line="1",0,8,6,8,"#0000FF",0.1
line="1",1,0,1,9,"#0000FF",0.1
line="1",5,0,5,9,"#0000FF",0.1
line="1",0,9,6,0,"#0000FF",0.1
fill="1",2,2,"#FFFF00","#0000FF"
fill="1",2,7,"#FF8000","#0000FF"
 

Parameters "P" for proportional images in IMAGE directive (1.7b+)

card example 12 image="1","color02.jpg",0,0,6,4.5,0
image="1","color02.jpg",0,4.5,6,4.5,0,"P"

PIE directive (1.7d+)
card example 13 pie="1",0,1.5,6,6,0,45,"#FF0000"
pie="1",0,1.5,6,6,45,90,"#00FF00"
pie="1",0,1.5,6,6,90,135,"#0000FF"
pie="1",0,1.5,6,6,135,180,"#FF00FF"
pie="1",0,1.5,6,6,180,225,"#FFFF00"
pie="1",0,1.5,6,6,225,270,"#00FFFF"
pie="1",0,1.5,6,6,270,315,"#000000"
pie="1",0,1.5,6,6,315,360,"#C0C0C0"

SAVE directive (1.8+)
card example 14 rectangle="1",1,1,4,7,"#0000FF#FF0000@90"
rectangle ="1",0,0,6,9,"#000000","EMPTY",0.5
save ="1","temp.bmp",0,0,6,9
image ="1","temp.bmp",3,0,3,4.5,0,"A"
  Texture flag "X" in IMAGE directive (1.8b+)
card example 15 image="1","tile.gif",0,0,6,9,0,"X",100,1,1
  Alpha-channel parameter in TEXT (IMAGE/PATTERN) directive (1.8b+)
card example 16 font="Arial",128,"TB","#000000"
text="1","A",0,0,6,9,"center","center",0,30
  POLYGON & STAR directives (1.9+)
card example 17 star="1",0,0,6,4,5,0,50,"#0000FF","#FF0000",0.3
polygon="1",0,4.5,6,4,6,0,"#FF0000","#0000FF",0.3
  Multiple color gradients, linear and radial (1.9a+)
card example 18

rectangle="1",1,0,4,4,"#FF0000#FFFFFF#0000FF@45"
rectangle="1",1,5,4,4,"#FF0000#FFFFFF#0000FF@360"

  Alpha-channel gradients, linear and radial (1.9b+)
card example 19 font="Arial",128,"TB","#000000"
text="1","A",0,0,6,9,"center","center",0,50@90
  ROUNDRECT directive (1.9b+)
card example 20 roundrect=1,1,1,4,7,#37E1D0#00FF00@270,#37E1D0#00FF00@270,0.1,1,2
  GRID directive (1.9c+)
card example 21 grid=1,1,1,4,4,#FF0000#0000FF@90,0.1,3,3
  BEZIER directive (1.9c+)
card example 22

bezier=1,1.5,0,1.5,4.5,4.5,4.5,4.5,9,#0000FF,0.15
bezier=1,4.5,0,4.5,4.5,1.5,4.5,1.5,9,#0000FF,0.15
bezier=1,0,3,3,3,3,6,6,6,#FF0000,0.15
bezier=1,0,6,3,6,3,3,6,3,#FF0000,0.15

  BUTTON directive (1.10a+)
card example 24

image=1,"watertexture.jpg",1,1,4,3,0
button=1,1,1,4,3,0.3,"I"

image=1,"watertexture.jpg",1,5,4,3,0
button=1,1,5,4,3,0.3,"O"

  ICON/ICONS directives (1.10c+)
card example 26 icon="1",A,dot_blue.gif
icon="1",B,dot_red.gif
icon="1",C,dot_black.gif

icons="1",ABC,0,0,6,6,2,2,0,"",center,center

  RTFTEXT/RTFFILE directives (1.10c+)
card example 27 {[rtf]="{\rtf\fs32 normal {{§}}\par
{\b bold}\par
{\i italic}\par
{\ul underline}\par
{\colortbl ;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;} \cf1 red\par
\cf2 green\par\cf3 blue\par}"}

rtftext=1,[rtf],0,0,6,9,#FF8000#FFFF80@90,0

  HEXGRID directive (1.12)
hexgrid example CARDSIZE = 18, 20
HEXGRID = 1, 0, 0, 18, 20, 1, , #000000, EMPTY, 0.1

Screenshots (click for larger images):

nanDECK screenshot01
Main program form
nanDECK screenshot03
Creation of new scripts
nanDECK screenshot04
Visual positioning of graphic elements
nanDECK screenshot05
Creation and printing of script lists
nanDECK screenshot07
Virtual table
nanDECK screenshot06
Main form for BGG2nanDECK

FAQ:

Q: How can I create a PDF file?
A: build a deck,
- click on "Print deck" button,
- click on Printer button (the first button top-left),
- put the flag in the "Print to file" checkbox,
- select Type = "PDF File",
- choose a filename and click on "OK" button.

Updated: from version 1.8 there is a button "Create PDF" in the main form, on the left.

Q: Help, the program is slow...
A: nanDECK uses heavily disk space for storing images, so it's better to run it from hard disk instead then a USB drive.
You can also reduce the resolution (using DPI=150) for a faster rendering.

Updated: from version 1.9a cards can be created using RAM, faster than using a file on hard disk.

Q: I don't know HTML.
A: The language used for nanDECK' scripts isn't HTML, it only uses HTML color codes.

Q: How I can use quotes in a text? This code gives me an error:

FONT="Arial", 32, "", "#000000"
TEXT="1", "I say "Hello"", 0, 0, 6, 9, "center", "center", 90

A: You can use \n\ syntax to insert ASCII code characters in a text, your code will become:

FONT="Arial", 32, "", "#000000"
TEXT="1", "I say \34\Hello\34\", 0, 0, 6, 9, "center", "center", 90

Q: There is a Linux version of nanDECK?
A: No, but if you install Wine (great software!) you can run the same nanDECK version for Windows on your Linux, with all features; you must also download and install the "Microsoft core fonts" (the download page is here). You can see a screenshot here.

TUTORIALS:

Tutorial A
Tutorial A Directives RECTANGLE, FONT, TEXT and PATTERN
Tutorial B
Tutorial B Directives TEXT and IMAGE (with texture and alpha-channel)
Tutorial C
Tutorial C Combinations and permutations engine (tutorial updated)
Tutorial D
Tutorial D Linking a data file, for counters creation
Tutorial E
Tutorial E A standard poker deck
Tutorial F
Tutorial F A quick explanation for BGG2nanDECK
Tutorial G
Tutorial G Wizard template for directives

Scripts' examples (you can click on the image to download a PDF file):

werewolf.pdf
werewolf.zip A deck for Werewolf (18 cards), with graphic (118 kB)
6suite.pdf
6suite.txt A poker deck with 6 suites (78 cards)
dice.pdf
dice.txt A deck of dice 2D6 (36 cards)
lost-cities.pdf
lost-cities.txt Deck for 4 player version of Lost Cities (75 cards), written by John Harley (rules are here)
money-chits.pdf
money-chits.txt Money chits script, written by Rob Bartel
holomino.pdf
holomino.txt Holomino, a game from Cameron Browne, deck written by John Lund
mambo.pdf
mambo.txt Mambo, a game from Cameron Browne, deck written by John Lund
truchet.pdf
truchet.txt Truchet, a game from Cameron Browne, deck written by John Lund

History:

11-22-2011 Version 1.13 Wizard for automatic layout for a linked file
On-line image search
Flag for variable key size in ICONS directive
Flag A/Z for sorting sequences
Flag for not shuffle decks with DECK directive
Added parameters for card back with DECK directive
Fixed bug in evaluating expressions
Fixed bug in saving images
Fixed bug in linking xls files
08-10-2011 Version 1.12c LINK directive loads Excel files
New parameter CLEAR for LINKFILTER directive
New label function FILTER
Reversing order in FRAMELIST function with "-" character before name
Syntax for extracting a sequence's element: "{sequence?element}"
New options for Wizard
Saving images in GIF format
Fixed bug in HTMLTEXT/HTMLFILE directives
Fixed bug in saving animated GIF
02-15-2011 Version 1.12b New LINKFILTER directive
New label function FRAMECOUNT
New label function FRAMESUB
Zip file load/save
Drag'n'drop for files
Embedded help
Added flag for Internet Explorer rendering in HTMLTEXT/HTMLFILE directives
Added parameter for guide color in BORDER directive
Added parameter for mark length in BORDER directive
Added parameter for color in PAGE directive
Added expressions in frame names
Added PDF compression level
Added option to save deck as animated GIF
Fixed bug in TEXT directive
Fixed bug in TEXTLIMIT directive
Fixed bug in BORDER directive
Fixed bug with buttons
06-02-2010 Version 1.12a New DICE directive
New label function FRAMELINE
New label function FRAMEDISK
New label function FRAMERECT
New label function FRAMETRI
New label function FRAMEMELD
New label function FRAMECLOCK
Extract and delete frame(s) from a pool with "!" flag
Extract random frame(s) from a pool with "~"flag
Linked files are saved with the main script
New flags for BORDER directive (for guidelines without card borders)
New flags for INPUTTEXT directive (for file browsing)
Fixed bug in CANVAS directive
Fixed bugs in LINK/LINKMULTI directives
02-07-2010 Version 1.12 New HEXGRID directive
New label function JOIN
New label function PRODUCT
New label function FRAMEBOX
New label function FRAMEHEX
New label function FRAMELIST
New label function SAVELABEL
New insert Frame command
Added comments in linked files
Added features for editing linked files
Added canvas visualization
Fixed bug in nested labels
Fixed bug in multi-script engine
Fixed bug in canvas
Fixed bug in SAVE directive
Fixed bug in MACRO
12-26-2009 Version 1.11c New HTMLFILE directive
New HTMLTEXT directive
New LINKMULTI directive
New COLOR directive
New FONTALIAS directive
Added Flag for randomizing colors
Fixed bug in saving images (DPI info)
Fixed bug in RTFFILE/RTFTEXT directives (transparency flag)
10-03-2009 Version 1.11b New COMMENT directive
In-line comments
Button "New deck" without Wizard (this button was renamed as "wiz")
New label function DIRFILES, for reading filenames
New frame function
Added % flag for thickness
Added WWTOP, WWCENTER and WWBOTTOM flags for vertical alignment in TEXT
Added "Load..." and "Save..." buttons in input parameters' form
Added "Confirm + Build" button in input parameters' form
Added two options in Config for PDF compress & open at creation
Removed old visual editor, button linked to graphic wizard
Added options in graphic wizard
Added options in linked data window
Fixed bug in RENDER
Fixed bug in MACRO
05-01-2009 Version 1.11a New INPUTTEXT, INPUTCHOICE, INPUTLIST and INPUTNUMBER directives
Added parameter for transparency and mirroring in RTFTEXT and RTFFILE directives
Added parameter for Alpha-blending in RTFTEXT and RTFFILE directives
Range pattern evaluation
New operator for integer division (£)
Added option for testing linked files
Added option for checking parenthesis
Online new version check
Fixed bug in expression evaluator
Fixed bug in line numbers
Fixed bug in ROUNDRECT
Fixed bug in CHROMAKEY
Fixed bug in CANVAS
12-07-2008 Version 1.11 Wizard for every directive
New ELSEIF directive
New CHROMAKEY directive
New UNIT directive
Flags H/V for mirroring in TEXT and IMAGE directives
New TEXTLIMIT directive (with variables TR, TL, TT, TB) for text's boundaries
New IMAGESIZE directive (with variables IW, IH) for image width and height
Added parameters for skew x/y in IMAGE directive
Added parameters for outlined text in FONT/FONTRANGE directive
Sequence support for size and position parameters
Fixed bug for IF..ELSE..ENDIF
07-18-2008 Version 1.10c New ICON directive
New ICONS directive
New RTFFILE directive
New RTFTEXT directive
Multiple scripts editor on separate tabs
Evaluate expressions in Autorange
Snap to grid in Table
06-04-2008 Version 1.10b New PAGEFONT directive
New HEADER directive
New FOOTER directive
New DECK directive
New TOKEN directive
New parameter for BORDER directive for guidelines
Labels can be re-declared
New AUTORANGE function for labels
Virtual table feature for shuffling and dealing cards
Added "D" flag for removing duplicates in combination/permutation engine
Autosave for windows' positions
Option for using (and registering) .nde extension for script files
Added Ctrl-S as a shortcut for Save command
Added Buttons for comment out multiple lines
Color coding comments made with ; character
Custom char for comments
Fixed bug in INCLUDE directive
Fixed bug in random function
Fixed bug in repositioning cursor after a validation error
Fixed bug in rotated text
Fixed bug in PDF creation
Fixed bug in "HV" page center flags with margins
10-05-2007 Version 1.10a New BUTTON directive
% syntax for objects (and font) dimensions
Hints on directive' syntax in editor
Combination engine limit elevated to 999999 objects
Fixed bug with wordwrapped text
Fixed bug with nested IF..ENDIF
07-18-2007 Version 1.10 New FONTRANGE directive
New CANVAS directive
New CANVASSIZE directive
Go-to card command
Replace text command
Print script command
Insert images in New wizard command
Corrected bug in LINK directive
Corrected bug in color sequences
06-02-2007 Version 1.9c New GRID directive
New BEZIER directive
New COUNTER directive
Newlines \13\ in TEXT directive
Formatted numbers in TEXT directive
New parameter in TEXT directive for text patterns
Remove rotations in combination/permutation engine
Text search in editor
Random numbers in expressions
Repeat strings in expressions
Mod operator # in expressions
New Insert Label command
Multicolor option in Insert Gradient command
Section labels in New wizard command
04-24-2007 Version 1.9b New LINK directive
New LINKSEP directive
New ROUNDRECT directive
IF/ELSE/ENDIF construct
Alpha-channel gradients for TEXT, IMAGE and PATTERN directives
Range expressions
Label substrings
Option for single Validate+Build button
Fixed bug in image' size
04-07-2007 Version 1.9a New MACRO/END keywords for procedure definition
New ZOOM directive
New INCLUDE directive
Multiple colors gradient
Radial gradient
Gradient colors for FONT, FILL, ELLIPSE, TRIANGLE, PIE, POLYGON, STAR and LINE directives
Flags in PAGE directive for center printing
Option for using disk or RAM in creating cards
Option for including HTML colors' labels
Most recent used files list
Command line options
Counters in {} expressions
Fixed numbers' precision bug
Font size with decimals
01-08-2007 Version 1.9 New POLYGON directive
New STAR directive
New PRINT directive
Editor merged in main window
Keyword' syntax hints in Editor
12-10-2006 Version 1.8b New COPYCARD directive
Added parameter for alpha channel in TEXT, IMAGE and PATTERN directives
Added flag "X" for textured images in IMAGE directive
Added parameters for texture's size in IMAGE directive
Added parameter for BORDER width
11-10-2006 Version 1.8a "Sequence" format in color parameters
Combinations and permutations engine for labels
Various improvements in script lists
Check for zero size of graphic elements
Fixed bug in ranges
09-18-2006 Version 1.8 New SAVE directive
Higher decimal precision in dimensions
Shortcut button for the creation of PDF file
Automatic printing of script lists
09-17-2006 Version 1.7d New PIE directive
New grayscale flag "G" for IMAGE directive
Alternate range syntax: 12#5 equals 12-16
Parameter BORDER="MARK" for printing cut marks
ASCII code syntax for characters: \123\ for {, \\ for \
Insert symbol dialog with ASCII code
Expression bug fixed
Visual editori bug fixed
08-30-2006 Version 1.7c Parameter for line width in RECTANGLE, ELLIPSE and TRIANGLE keywords
PNG files accepted in IMAGE keyword
Default border (rectangle) for missing BORDER keyword
Default card number (count) for missing CARD keyword
Improved visual editor
Expression bug fixed
07-26-2006 Version 1.7b New FILL directive
Parameter for proportional images in IMAGE directive
Keyboard shortcut added in main form
Gradient bug fixed
07-14-2006 Version 1.7a RENDER keyword for rendering only a range of cards
Parameter for line width in LINE directive
Gradient picker in Editor
Visual Editor bug fixed
Gradient bug fixed
07-02-2006 Version 1.7 Gradients in RECTANGLE directive
Visual positioning of graphic elements in editor
Flag for pattern fill in reverse order
06-21-2006 Version 1.6b New PATTERN directive for repeating images on cards
Cancel button to stop deck building
Option to save cards' images in jpg format
06-19-2006 Version 1.6a "New" button for creating new scripts
Symbol picker in Editor
Option to build only a range of cards
Evaluate expression in in images' filename, using { and }
Card number in images' filename, using §
06-09-2006 Version 1.6 New MARGINS directive for page's margins
New GAP directive for inserting space between cards
Transparent flag for FONT directive
Parameter for inner color in RECTANGLE, ELLIPSE and TRIANGLE directives
Parameter for empty shape in RECTANGLE, ELLIPSE and TRIANGLE directives
Multi-line commands, using { and }
Evaluate expression in text, using { and }
Card number in text expression, using §
Test for free disk space before building deck
Fixed bug in page orientation
Fixed bug in transparent images
05-31-2006 Version 1.5a Text rotation bug fixed
05-26-2006 Version 1.5 Color, font and image pickers in editor
Parameter for rotated text in TEXT directive
TRIANGLE directive
Expression evaluation for + - * / ^
Antialiasing flag for IMAGE directive
05-18-2006 Version 1.4 Internal text editor
PDF output
New PAGE directive for page size and orientation
FONT size in typographical points (1/72 of an inch), sorry but you have to recheck your scripts
FONT parameter for background color
04-28-2006 Version 1.3 New COPY directive
Transparency flag for IMAGE directive
Color parameter for BORDER directive
04-22-2006 Version 1.2 Directive CARDSIZE for setting the dimension of the cards
Vertical alignment and word-wrap for TEXT directive
New DPI and LINE directives
Option for saving images of the cards
04-18-2006 Version 1.1 "Sequence" format for text and images
04-17-2006 Version 1.0 First release

Valid HTML 4.01 Transitional