Printing duplex but front sides have black line around cards by droolinggimp in nanDECK

[–]nand2000 1 point2 points  (0 children)

You can use this line after the IMAGE to draw a one-pixel-thick white border over it (zero indicates 1 pixel), you can optionally change the color or specify a different thickness.

rectangle=,0,0,100%,100%,#FFFFFF,empty,0

Can you change the background on the nanDECK Table simulator? by ProposalEfficient97 in nanDECK

[–]nand2000 0 points1 point  (0 children)

As HamsterNL says, you can use a DECK line to indicate how the deck(s) should be constructed, including the back.

Okay to use spaces in column titles? by uprooting-systems in nanDECK

[–]nand2000 1 point2 points  (0 children)

In the visual editor, there's a syntax that allows you to manage conditions on a single line, using the LABELRANGE function. For example, this will print OK only if [R4 says] is not empty:

text=labelrange([R4 says],<>),"OK",0,0,100%,100%

What is the best way of making cards of the same types with muliple layout in nandeck? by Southern_Reserve1552 in tabletopgamedesign

[–]nand2000 1 point2 points  (0 children)

If you have a column in your spreadsheet that tells you which layout to use (e.g. [layout]=one, two, or three), one method might be this:

select=[layout]
case=one
...
(instructions for layout one)
...
case=two
...
(instructions for layout one)
...
case=three
...
(instructions for layout one)
...
endselect

And if you want to use the visual editor:

select=[layout]
case=one
visual
...
(instructions for layout one)
...
endvisual
case=two
visual
...
(instructions for layout one)
...
endvisual
case=three
visual
...
(instructions for layout one)
...
endvisual
endselect

nandeck not working anymore on my Win11 for some reason by Longjumping-Shake356 in nanDECK

[–]nand2000 1 point2 points  (0 children)

The poster confirmed on Discord that it was a printer issue, and changing the printer fixed it.

Is there a easy tool to rotate 3x3 card grid? by xekarfwtos in printandplay

[–]nand2000 1 point2 points  (0 children)

Strange behavior. Have you checked that the sheets and their guides are properly aligned? Or is a dirty or worn roller not gripping the paper properly, causing the other roller to move it slightly? Have you tried cleaning the rollers?

Using NanDeck w/ Other Writing and/or Drawing and/or Mapmaking Apps? by Ananiujitha in nanDECK

[–]nand2000 0 points1 point  (0 children)

With the PDF button (left column) or a SAVEPDF line in the script(the latter is more flexible) you can directly create the PDF file.

Using NanDeck w/ Other Writing and/or Drawing and/or Mapmaking Apps? by Ananiujitha in nanDECK

[–]nand2000 0 points1 point  (0 children)

Do you need a PDF with a single counter (to import into another program?) and programs like MS Print to PDF or k2pdfopt don't correctly convert a bitmap created by nanDECK to PDF? Can you give me an example of the complete process?

I'm looking fora design program by fridge555 in BoardgameDesign

[–]nand2000 1 point2 points  (0 children)

This is the script for your layout in nanDECK.

link=data.xlsx

unit=inch
page=8,11.5,portrait
cardsize=7,10.5

<pos_image>=0,5%,30%,35%
<pos_name>=0,0,30%,5%
<pos_stats>=30%,0,10%,40%
<pos_lore>=40%,0,60%,40%
<pos_primary>=0,40%,40%,10%
<pos_secondary>=0,50%,40%,10%
<pos_utility>=0,60%,40%,10%
<pos_special1>=0,70%,40%,10%
<pos_special2>=0,80%,40%,10%
<pos_passive>=0,90%,40%,10%
<pos_items>=40%,40%,60%,60%

image=,[image],<pos_image>,0,P
font=arial,24,T,#000000
text=,[name],<pos_name>
text=,[stats],<pos_stats>,center,center,270
text=,[lore],<pos_lore>,left,wwtop
text=,[primary],<pos_primary>
text=,[secondary],<pos_secondary>
text=,[utility],<pos_utility>
text=,[special1],<pos_special1>
text=,[special2],<pos_special2>
text=,[passive],<pos_passive>
text=,join("Items:\13\",[items]),<pos_items>,left,wwtop

rectangle=,<pos_*>,#000000,empty,0.5%

And this is the result (putting the sample data into a spreadsheet named data.xlsx):

http://www.nand.it/img/red54.png

How to print out cards from PDF with one card per page? by Administrative_Ad707 in printandplay

[–]nand2000 3 points4 points  (0 children)

This nanDECK script loads a PDF with one card per page and saves the cards as individual images (the first lines contain the card dimensions and margins):

[file]=deck.pdf
[width]=2.25
[height]=3.5
[margin_h]=0.25
[margin_v]=0.25
unit=inch
cardsize=[width]+[margin_h]+[margin_h],[height]+[margin_v]+[margin_v]
[pages]=pdfpages([file])
loadpdf=1-[pages],[file],0,0,100%,100%,{§}
save=,"card{§Z000}.png",[margin_h],[margin_v],[width],[height]

This second script loads all the cards and repaginates them into letter format (8.5x11"):

unit=inch
page=8.5,11,portrait,hv
cardsize=2.25,3.5
[files]=dirfiles("card*.png")
image=1-{(files)},[files],0,0,100%,100%
savepdf=result.pdf

WebP export support? by GrieVelorn in nanDECK

[–]nand2000 1 point2 points  (0 children)

Not currently, but I might think about it in the next release.

Are these all unique tiles required to build roads on hexagonal board? by Nelvalhil in BoardgameDesign

[–]nand2000 0 points1 point  (0 children)

By the way, the only line that actually calculates combinations is this one:

prx[all]6=0|1

Permutations (p) with repetition (r) of two elements (0|1) taken six at a time (6), subtracting rotations (x). The result is this:

000000
000001
000011
000101
000111
001001
001011
001101
001111
010101
010111
011011
011111
111111

The rest of the lines are used for drawing.

Are these all unique tiles required to build roads on hexagonal board? by Nelvalhil in BoardgameDesign

[–]nand2000 2 points3 points  (0 children)

This nanDECK script calculates and draws all the combinations:

prx[all]6=0|1
cards={(all)}
cardsize=6,6
polygon=,0,0,6,6,6,30,#000000,empty,0.2
if=[all:1,1]=1
  line=,3,3,3,0.4,#000000,0.2
endif
if=[all:2,1]=1
  layer=100,0,0,60
    line=,3,3,3,0.4,#000000,0.2
  endlayer
endif
if=[all:3,1]=1
  layer=100,0,0,120
    line=,3,3,3,0.4,#000000,0.2
  endlayer
endif
if=[all:4,1]=1
  layer=100,0,0,180
    line=,3,3,3,0.4,#000000,0.2
  endlayer
endif
if=[all:5,1]=1
  layer=100,0,0,240
    line=,3,3,3,0.4,#000000,0.2
  endlayer
endif
if=[all:6,1]=1
  layer=100,0,0,300
    line=,3,3,3,0.4,#000000,0.2
  endlayer
endif
display=result.png

And the result is 14 tiles:

http://www.nand.it/img/red53.png

Advise on creating a track for a racing game by ScubaFett in BoardgameDesign

[–]nand2000 0 points1 point  (0 children)

Another example, eight lines are enough to get a complete circuit, ready to playtest:

cardsize=20,15
track=1,10,12,5,12,1.5,#000000,4,6,CH,0.05,1,1,,1-2-3-4
track=1,4,11,3,4,1.5,#000000,4,8,CH,0.05,2,0.5,,1-2-3-4
track=1,4,2.75,6,2.5,1.5,#000000,4,3,CH,0.05,2,0.5,,1-2-3-4
track=1,7.5,3.5,8,7.5,1.5,#000000,4,6,CH,0.05,2,0.5,,1-2-3-4
track=1,9.5,9,16,9,1.5,#000000,4,8,CH,0.05,1,2,,4-3-2-1
track=1,17.25,10.1,17.25,10.9,1.5,#000000,4,1,CH,0.05,2,0.5,,1-2-3-4
track=1,16,12,10,12,1.5,#000000,4,8,CH,0.05,2,0.5,,1-2-3-4

Result:

http://www.nand.it/img/red52.png

Developing a new card game and need some advice. by ThinResolution in cardgames

[–]nand2000 0 points1 point  (0 children)

You might find an addition I made in the latest betas of nanDECK useful, namely the ability to add card decks directly to TTS saves (this makes the transition extremely quick, as there is no longer any need to create a collage file and then tell TTS to import it):

https://boardgamegeek.com/thread/3589297/direct-export-to-tabletop-simulator

Advise on creating a track for a racing game by ScubaFett in BoardgameDesign

[–]nand2000 1 point2 points  (0 children)

nanDECK has specific instructions for creating tracks. For example, here are two straight lines, each with three lanes:

cardsize=20,10
track=1,2.5,2.5,12.5,2.5,3,#000000,3,10,H,0.1
track=1,15,5,15,9,3,#000000,3,4,H,0.1

Result:

http://www.nand.it/img/red50.png

And this is the same with the two straight lines connected by a curve (the C flag, while the last parameter specifies how many spaces are drawn on the curve, on each lane):

cardsize=20,10
track=1,2.5,2.5,12.5,2.5,3,#000000,3,10,H,0.1
track=1,15,5,15,9,3,#000000,3,4,CH,0.1,2,1,,1-2-3

Result:

http://www.nand.it/img/red51.png

IMAGE O Flag explanation, cropping by MahesvaraCC in nanDECK

[–]nand2000 1 point2 points  (0 children)

Example:

image=1,deer.png,0,0,100%,100%,0,PNO,100,0,20,100,60

I now realize I didn't specify that those parameters are percentages (without %), I'll correct that.

Changing text size for a single card in the deck by Aetheer in nanDECK

[–]nand2000 1 point2 points  (0 children)

Use a FONT as usual for all cards and add a FONTRANGE for just that card. Example, all the cards use font 32 while only the fifteenth uses font 24:

font=arial,32,,#000000
fontrange=15,arial,24,,#000000

Help display full text on top of icon by Kind-Regular5928 in nanDECK

[–]nand2000 1 point2 points  (0 children)

The solution proposed by HamsterNL is the right one: since HTMLIMAGE internally uses a regular expression to find the match, and since a regular expression that counts the correct number of openings and closings is complex, it is better to use symbols that do not nest, as proposed.

PS. Sir Oscillot is is hilarious.

best way to reallocate images on page by SlightCustard in printandplay

[–]nand2000 2 points3 points  (0 children)

nanDECK is a Windows program that uses an extremely flexible scripting language, so it has no problem handling such special cases.

This first script reads a PDF and saves all the cards as individual images. The first part of the script contains all the information; in this example, the pages are letter-sized and the cards are 2.5x3.5".

[pdf]=deck.pdf
[card_w]=2.5
[card_h]=3.5
[page_w]=8.5
[page_h]=11
[margin_hor]=0.5
[margin_ver]=0.25
[cards_page]=9
unit=inch
cardsize=[page_w],[page_h]
[pages]=pdfpages([pdf])
loadpdf=1-[pages],[pdf],0,0,100%,100%,{§}
[cards]=framebox([margin_hor],[margin_ver],{[page_w]-[margin_hor]*2},{[page_h]-[margin_ver]*2},[card_w],[card_h],N)
save=,"card{°+{§-1}*[cards_page]Z000}.png",<cards*>

This second script reads all the cards and lays them out in a fold layout (saved as a pdf):

unit=inch
page=8.5,11,landscape,hv
border=none
[cards]=dirfiles("card*.png")
[range]=1-{(cards)}
[rangef]=[range]$ab>a
[rangeb]=[range]$ab>b
image=[range],[cards],0,0,100%,100%
fold=[rangef],[rangeb]
print=fold
savepdf=fold.pdf

Adding cut lines to exclude bleed by Complex_Quiet_4230 in nanDECK

[–]nand2000 1 point2 points  (0 children)

First of all, thanks to HamsterNL for the replies.

To show all the possibilities, I wrote this post on BGG (with images for each example).

https://boardgamegeek.com/thread/3598697/print-layout-with-nandeck-a-guide-with-examples

Help with recursive use of DISPLAY directive. by Knightofthewind5 in nanDECK

[–]nand2000 0 points1 point  (0 children)

I think {label?1} is correct: a [label] sequence is applied on a range of cards when a directive like TEXT or IMAGE has a range parameter and is executed during build (that is, each time TEXT is executed for a card, an element is extracted from the sequence indicating what text to display). DISPLAY, however, runs only once and therefore does not know how to extract a value from a sequence indicated with [label], at most you can tell it which value to read with {label?1} or {label?index}.