Nand Blog

Games, software and BGG...
Recommend
8 
 Thumb up
0.05
 tip
 Hide

A card template for nanDECK

Andrea Nini
Italy
Modena
flag msg tools
Best. Game. Ever.
badge
I wrote nanDECK, BGG1tool, and BGG2Graph.
mbmbmbmbmb
Let's start from an Excel file (tempdata.xls):



First lines of code, for linking the Excel file, and defining some constants:
link=tempdata01.xls

[all]="1-{(title)}"
[back]=#00D500
[box_back]=#77FF77
[box_border]=#00FF00


The [all] label is translated to a range from first to last card (the last line in the Excel file). The other labels are three shades of green.

Drawing a background with four zones (for the image, two numbers and text):
rectangle=[all],0,0,100%,100%,[back]

rectangle=[all],10%,10%,80%,40%,[box_back]

ellipse=[all],0%,0%,20%,15%,[box_back]
ellipse=[all],80%,0%,20%,15%,[box_back]

rectangle=[all],10%,65%,80%,30%,[box_back]




Adding a border to each element (red lines):
rectangle=[all],10%,10%,80%,40%,[box_back]
rectangle=[all],10%,10%,80%,40%,[box_border],empty,0.1

ellipse=[all],0%,0%,20%,15%,[box_back]
ellipse=[all],0%,0%,20%,15%,[box_border],empty,0.1
ellipse=[all],80%,0%,20%,15%,[box_back]
ellipse=[all],80%,0%,20%,15%,[box_border],empty,0.1

rectangle=[all],10%,65%,80%,30%,[box_back]
rectangle=[all],10%,65%,80%,30%,[box_border],empty,0.1




Adding a title (an outlined text, then a solid text):
font="Arial",16,T,#00FF00
text=[all],[title],0,0,100%,10%,center,center,0,50,0.1
font="Arial",16,T,#000000
text=[all],[title],0,0,100%,10%,center,center




Adding the image (red line):
rectangle=[all],10%,10%,80%,40%,[box_back]
image=[all],[image],10%,10%,80%,40%,0,P
rectangle=[all],10%,10%,80%,40%,[box_border],empty,0.1




The two number values:
font="Arial",22,T,#000000
text=[all],[val1],0%,0%,20%,15%
text=[all],[val2],80%,0%,20%,15%




The text:
font="Times New Roman",10,T,#000000
text=[all],[text],15%,70%,70%,20%,left,wwtop




For the final element (the "symbol" column in the Excel file), I saved four images in the script's folder, and assigned them to a letter:
icon=[all],F,fire.png
icon=[all],A,air.png
icon=[all],W,water.png
icon=[all],E,earth.png




Linking the icon to the "symbol" column:
icons=[all],[symbol],10%,50%,80%,15%,15%,15%,0,PN,center,center



The background is too simple, let's add a bit of noise (red line):
[all]="1-{(title)}"
[back]=#00D500#008040
[box_back]=#77FF77





And this is the full script:
link=tempdata01.xls

[all]="1-{(title)}"
[back]=#00D500#008040
[box_back]=#77FF77
[box_border]=#00FF00

rectangle=[all],0,0,100%,100%,[back]

rectangle=[all],10%,10%,80%,40%,[box_back]
image=[all],[image],10%,10%,80%,40%,0,P
rectangle=[all],10%,10%,80%,40%,[box_border],empty,0.1

font="Arial",16,T,#00FF00
text=[all],[title],0,0,100%,10%,center,center,0,50,0.1
font="Arial",16,T,#000000
text=[all],[title],0,0,100%,10%,center,center

ellipse=[all],0%,0%,20%,15%,[box_back]
ellipse=[all],0%,0%,20%,15%,[box_border],empty,0.1
ellipse=[all],80%,0%,20%,15%,[box_back]
ellipse=[all],80%,0%,20%,15%,[box_border],empty,0.1

font="Arial",22,T,#000000
text=[all],[val1],0%,0%,20%,15%
text=[all],[val2],80%,0%,20%,15%

rectangle=[all],10%,65%,80%,30%,[box_back]
rectangle=[all],10%,65%,80%,30%,[box_border],empty,0.1

font="Times New Roman",10,T,#000000
text=[all],[text],15%,70%,70%,20%,left,wwtop

icon=[all],F,fire.png
icon=[all],A,air.png
icon=[all],W,water.png
icon=[all],E,earth.png
icons=[all],[symbol],10%,50%,80%,15%,15%,15%,0,PN,center,center
Twitter Facebook
8 Comments
Subscribe sub options Mon Nov 12, 2012 4:48 pm
Post Rolls
  • [+] Dice rolls
Loading... | Locked Hide Show Unlock Lock Comment     View Previous {{limitCount(numprevitems_calculated,commentParams.showcount)}} 1 « Pg. {{commentParams.pageid}} » {{data.config.endpage}}
{{error.message}}
{{comment.error.message}}
    View More Comments {{limitCount(numnextitems_calculated,commentParams.showcount)}} / {{numnextitems_calculated}} 1 « Pg. {{commentParams.pageid}} » {{data.config.endpage}}
Front Page | Welcome | Contact | Privacy Policy | Terms of Service | Advertise | Support BGG | Feeds RSS
Geekdo, BoardGameGeek, the Geekdo logo, and the BoardGameGeek logo are trademarks of BoardGameGeek, LLC.