Nandeck Scripts


Categories: Software Tags: Nandeck


Nandeck is playing card design software. It can be used to quickly create cards for prototyping or playtesting by allowing you to script the parameters for the cards and pull data from a spreadsheet. You can also use it to make counters and chits for wargames and the like.

I knew it could be used for prototyping and was a little curious as to how nice of cards you can make on it. I’m currently experimenting with using Nandeck to generate templates for card sequences that would be tedious to design by hand in Gimp.

Ebbe & Flut

For science, built an Ebb and Flow script, tried to make it as readable as possible. The deck consists of 50 cards, five suits of 5 cards in 2 different colors for water and land respectively, as well as 10 shoreline cards. Originally the cards were solid colored, but I decided to color the numbers only to save ink.

[text_vertical_align] = "top"
[text_horizontal_align] = "left"

cardsize=[card_width],[card_height] border=rectangle

;RECTANGLE="1-25",0,0,[card_width],[card_height],"#0000FF" FONT="Arial", 60, "T", "#0000FF" [numtext] = join("A",[numbers]) TEXT="1-5", [numtext],[text_xpos], [text_ypos], 4, 7, [text_horizontal_align], [text_vertical_align] [numtext] = join("B",[numbers]) TEXT="6-10", [numtext], [text_xpos], [text_ypos], 4, 7, [text_horizontal_align], [text_vertical_align] [numtext] = join("C",[numbers]) TEXT="11-15", [numtext], [text_xpos], [text_ypos], 4, 7, [text_horizontal_align],[text_vertical_align] [numtext] = join("D",[numbers]) TEXT="16-20", [numtext], [text_xpos], [text_ypos], 4, 7, [text_horizontal_align],[text_vertical_align] [numtext] = join("E",[numbers]) TEXT="21-25", [numtext], [text_xpos], [text_ypos], 4, 7, [text_horizontal_align], [text_vertical_align]

;RECTANGLE="26-50",0,0,[card_width],[card_height],"#008000" FONT="Arial", 60, "T", "#008000" [numtext] = join("A",[numbers]) TEXT="26-30", [numtext], [text_xpos], [text_ypos], 4, 7, [text_horizontal_align], [text_vertical_align] [numtext] = join("B",[numbers]) TEXT="31-35", [numtext], [text_xpos], [text_ypos], 4, 7, [text_horizontal_align], [text_vertical_align] [numtext] = join("C",[numbers]) TEXT="36-40", [numtext],[text_xpos], [text_ypos], 4, 7, [text_horizontal_align], [text_vertical_align] [numtext] = join("D",[numbers]) TEXT="41-45", [numtext],[text_xpos], [text_ypos], 4, 7, [text_horizontal_align], [text_vertical_align] [numtext] = join("E",[numbers]) TEXT="46-50", [numtext], [text_xpos], [text_ypos], 4, 7, [text_horizontal_align], [text_vertical_align]

RECTANGLE="51-60",0,0,[card_width],[card_height],"#008000" RECTANGLE="51-60",([card_width]/2),0,[card_width],[card_height],"#0000FF"

The Game

A 102 card deck of sequentially numbered cards from 2 to 99, along with two 1 (up arrow) and two 100 (down arrow) cards. This script takes advantage of a special sequence character, §, to print most of the card numbers.

I thought it would be interesting to apply a different font to each card, but seeing no particularly easy way to export a list of 100 fonts I decided to just use the Ransom font and randomized color gradients. The result is this funky little mini-deck. Messing with card size and margins I was able to get it down to 5 pages.

the game deck

[text_vertical_align] = "top"
[text_horizontal_align] = "center"

MARGINS=0.5,0.5,0,0 cardsize=[card_width],[card_height] border=rectangle

; H denotes random 1-15 value RECTANGLE="1-102", 0.5, 0.5, [card_width]-1, [card_height]/2-0.5, "#HHHHHH#FFFFFF@270" RECTANGLE="1-102", 0.5, 3, [card_width]-1, ([card_height]/2)-0.5, "#FFFFFF#HHHHHH@270" FONT="Ransom", 65, "T", "#HHHHHH" TEXT=1,"1^",[text_xpos], [text_ypos], [card_width], [card_width], [text_horizontal_align],[text_vertical_align] FONT="Ransom", 65, "T", "#000000" TEXT=1,"1^",[text_xpos], [text_ypos], [card_width], [card_width], [text_horizontal_align],[text_vertical_align],0,100,0.03

FONT="Ransom", 65, "T", "#HHHHHH" TEXT="2-99", "{§}",[text_xpos], [text_ypos], [card_width], [card_width], [text_horizontal_align],[text_vertical_align] FONT="Ransom", 65, "T", "#000000" TEXT="2-99", "{§}",[text_xpos], [text_ypos], [card_width], [card_width], [text_horizontal_align],[text_vertical_align], 0, 100, 0.03

FONT="Ransom", 40, "T", "#HHHHHH" TEXT="100-101","100v",[text_xpos], 2, [card_width], [card_width], [text_horizontal_align],[text_vertical_align] FONT="Ransom", 40, "T", "#000000" TEXT="100-101","100v",[text_xpos], 2, [card_width], [card_width], [text_horizontal_align],[text_vertical_align], 0, 100, 0.03 COPYCARD = "102","1"

Mini Cards Duplex

Example of mini cards, 18 to a sheet, and the associated backs.

[text_vertical_align] = "center"
[text_horizontal_align] = "center"
[small_icon_pos] = 0.25,0
[small_icon_pos2] = 2.25,4.25

;card fronts rectangle=1-9,1,2,2.5,2.25,"#000000",EMPTY,0.1 FONT="Arial", 60, TB, "#000000" IMAGE = "1-18", "front-icon.png",[small_icon_pos],2,2,0,P TEXT="{§}", [short_ranks],[text_xpos], [text_ypos], [card_width], [card_height], [text_horizontal_align], [text_vertical_align] IMAGE = "1-18","front-icon.png",[small_icon_pos2],2,2,180,P

;card backs rectangle=1-18,0,0,100%,100%,#000000,empty IMAGE="19-36","back-icon.png" ,0.25,1.5,4,4,0,P copycard=37-54,19-36$abc>cba print=1-18,37-54