GeekGold Bonus for All Supporters at year's end: 1000!

8,667 Supporters

$15 min for supporter badge & GeekGold bonus
19 Days Left

Support:

Recommend
3 
 Thumb up
 Hide
18 Posts

Skirmish Tactics Apocalypse» Forums » News

Subject: Nandeck Card generator Script rss

Your Tags: Add tags
Popular Tags: [View All]
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
I'm writing this to keep all people updated on my personal STA quest.
To have a fully operational Nandeck Script to do the cards and tokens for STA.
I'm no master using Nandeck, but I will learn on the way, and with a bit of help I think that we can get to the point.

For the people who don't know Nandeck, Its the most power full deck building application that I ever see. Lot's and lot's of good stuff, a support forum in BGG and totally free.

How does it works:
Write a script, verify the scrip, build the deck and export the deck.
In the script you can link a external file (text in this case) where you put all the stuff, then you put the Art nearby and script the data and the art.

And now for the quest:
1 
 Thumb up
1.00
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Long Long time ago,
when talking in one of the old posts, I suggested the creation of a Buggy for Marauders. Since that moment I felt that some type of card generator was in demand. Immediately I thinked in Nandeck, a tool I'm very fond, and I use quite a lot in my designs.
Time go by, and when the objects start appearing on the forums (mainly because scenarios) the feeling became a need.
I imagine that objects in the map could be used and played as units, having their own abilities, combat scores, etc.
Besides speaking, the only good way to demonstrate that, was in fact, produce the card.
After the work of doing the buggy, I figured out, that doing it in Nandeck would cut my work time in half, and tuning to virtually none.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Last week of March,
When I design the buggy, David had supplied an empty Marauder card, that was going to be my starting point.
For the goals, I pointed 3 spoken objects for STA, wood boxes, oil barrel and a communication tower. As control card, I also put a Marauder unit, the rebel leader.

The firs step was to create the data file. So to begin, I created the cards.txt (no prize for imagination over here) and define in the first line the of data (the first line of the data file is the name of the variable that Nandeck will use):
Faction, Type, Classification,
CoR, CoV, CoE,
HeR, HeV, HeE,
MoR, MoV, MoE,
WRR, WRV, WRE,
CCR, CCV, CCE,
RCR, RCV, RCE,
DeR,DeV,DeE,
Ab11,Ab21,Ab31,
Ab12,Ab22,Ab32,
Ab13,Ab23,Ab33,
Ab14,Ab24,Ab34,
FactionIcon,Designator, MainImage

I think if anybody look to a card and look to that, they undestand it...
A real example would be the rebel leader:
Marauders,REBEL LEADER, HUMAN,
2, 5, 10,
2, 2, 2,
4, 5, 5,
6, 7, 7,
1, 2, 3,
2, 2, 3,
4, 5, 6,
Leadership,Leadership,Leadership,
,Inspire,Inspire,
,,
,,
,,
"resources-icons\Marauders.png","resources-icons\biohazard.png", "RebelLeader.png"
(In data file, each field is separated by a , . Two ,, mean that that field is empty. I chose to give any unit 4 abilities per level, Rebel leader as Leadership for every level, Inspire for Vetran and Elite and all other positions are empty).

Some of these values would change, but that’s why I'm writing this.
Coming next, start building the script.
1 
 Thumb up
1.00
 tip
 Hide
  • [+] Dice rolls
David Thompson
United Kingdom
Cambridge
Cambridgeshire
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Ricardo, thanks so much for leading this effort. I think it will be awesome to allow the STA community the opportunity to make custom characters for the game.

I have to admit I'm still on the fence about the idea of objects using the same stats as a character. In one regard, I like the uniformity of the approach. However, I also think that some items might be so simple that they don't really require a full card. Also, from a practical standpoint, the character cards are pretty big. Are we sure we want each of the custom items to have a full-fledged character card? As an alternative, I thought it might just be possible to provide information for the item in a scenario and use a circular token (like the scavenge tokens).

However, I think think this is a very interesting project. I owe you a couple designators (any ideas?). Are there other source files I can provide you to help the design of the cards?

Again, thanks for putting this together. I'll keep my fingers crossed for a Mac version of Nandeck!
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Having done the data file, it's time to run Nandeck.
First thing is linking the cards.txt to the script:

LINK="Cards.txt",Faction, Type, Classification, CoR, CoV, CoE, HeR, HeV, HeE, MoR, MoV, MoE, WRR, WRV, WRE, CCR, CCV, CCE, RCR, RCV, RCE,DeR,DeV,DeE,Ab11,Ab21,Ab31,Ab12,Ab22,Ab32,Ab13,Ab23,Ab33,Ab14,Ab24,Ab34,FactionIcon,Designator, MainImage

Nandeck generally works whit a main command, followed by a '=' and then the command configurations, so in this case I passed, the name of the file, and then the Labels of each column.

Before this command I write a comment, in Nandeck you can choose the comment character, per default ; will do it.
The first time I write in Portuguese, my natural language.

Nandeck as a nice sub tool, that permits people to manage linked files inside Nandeck. Personaly I work in the txt and use this tool to check everithing. So to see if the cards.txt is well connected, just press the “linked data” button and then the cards.txt.
An excel type board would appear and values should be right.

Now the data is linked and verified.

There are two more thing to add.
To keep the things separated, before the linking I reserved a space for definitions.
More 3 card data was inserted into cards.txt. The values are test values, some of them purely to test, for example 111 of MOV.
1 
 Thumb up
1.00
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Before going further, there are 2 Nandeck basics needing to explain.
Units and Labels.
Nandeck default unit is CM, that is what use, never less people can change it whit UNIT = inch.
More important than units, its the labels, labels are some type of containers or variables where data is stored.
When a file is linked, after the file name, the following are labels useable on the script.
In our case, the first label is faction, meaning that the [Faction] contains for the first line Marauders.
Also important to general definitions, since it can be used like [name]=
Back to the script and for the definitions.
On the top of the script, I put some know definitions. From David, I get the 2 fonts used in the cards, "OPTIMA","PortagoITC TT", I also know the colors, white and black. Nandeck uses RGB colors. After install the fonts on the computer, I put the folowing labels on definitions area.
[AbilFont]= "OPTIMA"
[MainFont]= "PortagoITC TT"
[MainFontColor]= #FF0000
[ValuesFontColor]= #000000
[OutLineFontColor]= #000001

These labels aren't need it, I could put the values directly inside the commands, but this would simplify a lot changes.
1 
 Thumb up
1.00
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Since the objective was to create a script to create extra cards, the design work was already done.
The work is about scripting the design already done.
To do it, the best way was, applying an already done card as background and work it.
But before that, the number of card must be deffined. Because I will be working with several cards, but first I will work with only one, I define a label with [lastcard]=1 and then I define [AllDeck]=1-[lastcard] (you can define sequences in a label, my inicial deck would be from 1 to 1, one card).
Then I define CARDS=[AllDeck], the CARDS command is stated as obsolete, I personally dont think so, because Nandeck automatically calculates the size of the deck by the data, and at this point, I have a 4 cards deck, but I'm only interested in doing one (running the script consumes time and resources, and if nothing is specified it would do 4 cards).
I define cart size as 9/6, that is a moderate size, after done, I can re-size the images on other programs. (I know there is a way to do it on Nandeck fixing the size and working on %, didn't use it because I still doesn't know how, maybe next step).
After fixating the size with CARDSIZE=9,6 come the first real card.
A card to Nandeck is a set of layered components, that in the end would be a card.
So the first image to be put is the background.
IMAGE command as mandatory fields, cards where the image will appear, our case alldeck, the image, initial X position, initial Y position, X size, Y size, and angle (or rotation of the image).
And I put these 3 backgrounds:
IMAGE=[alldeck],"base.jpg",0,0,9,6,0
IMAGE=[alldeck],"BackGround_Control.png",0,0,9,6,0
IMAGE=[alldeck],"BackGround.png",0,0,9,6,0
Then I comment the last two. The general idea was: I put a done card as base, then I put images, text and other stuff over it, if it looks good, I comment base image and try it with the real background, the control image is used to check images and text against a single bright color.
Since we will work with transparencies, some times all appear good, because background image as look alike color with the image we are working. Everything looks fine until other faction walks along and have different background.

For the first time, you can run the “validate deck” and then “build deck”. After that you can preview the card. Nice, no work done, but its working.
1 
 Thumb up
1.00
 tip
 Hide
  • [+] Dice rolls
David Thompson
United Kingdom
Cambridge
Cambridgeshire
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
This is really incredible, Ricardo. Thanks for putting so much work into this. I think this would make for a great thread in the main game design thread.

As an aside, when you say:

Quote:
Since we will work with transparencies, some times all appear good, because background image as look alike color with the image we are working. Everything looks fine until other faction walks along and have different background.


...just let me know if I need to tweak some stuff to make it work better for your cards. Anything you need from me to make life easier on you, just let me know.

Thanks again!

Dave
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Quote:
Anything you need from me to make life easier on you, just let me know

Well… All the figures and the bars

It’s time to start building our cards, and the first step is defining layer order. The first layer was already applied, the background. Looking to the cards already made by David, I layered this way (from back to front):
Images first: background, bars, greyed area, abilities area, name, circles.
Then text: Type, Classification, fixed text (recruit, veteran, elite), cost value, unit values and abilities.


Since the background was already done, I moved to the bars. Here I start my creative part. Because I was doing objects, I decided to draw a yellow\black bar with the same size as the original card bars.
Then I create one IMAGE command with more or less accurate position, I know that starting X would be 0 (more or less) and the end X was the full X size of card, it was Y I have to find.
Why did I said X would be 0 more or less, because in the end X would be 0, but for now it would be 0.5, so I can see if Y size matches. First I aligned Y position, the Y size.
After tuning this image, I ended with the first bar positioned.
Copying the command and changing only the Y positioning I put the second bar.
To finalize, I put the X positioning to zero and commented the two IMAGE commands. I have to comment it because I still need to do the two big circles and the name box.


Opening again the original card, I edited it to get the grey area right of the main image, were the Attributes and the Abilities are located.
To the greyed area introduce an extra issue, transparencies.
Nandeck have out of the box the ability to apply transparencies, to do it, we use the IMAGE command with two extra flags: T flag and alpha-channel.

The T flag permit choosing a colour to be fully transparent. Very useful if you have rounded corners, like this case. If no colour is defined, Nandeck automatically choses the first pixel colour as transparent. So I edited the grey imaged and paint the areas I didn’t want to appear with a pink colour (this imaged first pixel was in a area that doesn’t appear, so no extra definitions need it).
The second alpha-channel applies a value that goes from 0 transparent to 100 solid.

So using the same approach used for the bars (a bit less try error, because I already know Y would be the bar upper Y position + bar Y size + small space, and Y size would be bar lower Y position - upper Y position + bar Y size – small space), and since I was working with a transparency, I could see how far I was, I manage to put the greyed area without any effort.

The script soo far:
;Definitions
[lastcard]= 1
[alldeck]= 1-[lastcard]

;Links
LINK="Cards.txt", Type, Classification, CoR, CoV, CoE, HeR, HeV, HeE, MoR, MoV, MoE, WRR, WRV, WRE, CCR, CCV, CCE, RCR, RCV, RCE,DeR,DeV,DeE,Ab11,Ab21,Ab31,Ab12,Ab22,Ab32,Ab13,Ab23,Ab33,Ab14,Ab24,,Ab34,Ab44,FactionIcon,Designator, MainImage

;Main script
CARDS=[alldeck]
CARDSIZE=9,6

; Back Images for control
IMAGE=[alldeck],"base.jpg",0,0,9,6,0
;IMAGE=[alldeck],"BackGround_Control.png",0,0,9,6,0

;Images
;Background
; IMAGE=[alldeck],"BackGround.png",0,0,9,6,0
;Rows
; IMAGE=[alldeck],"Bars.png",0,0.4,9,0.6,T
; IMAGE=[alldeck],"Bars.png",0,5.04,9,0.6,T
;Grey Zone
IMAGE=[alldeck],"Grey.png",0.3,1.1,8.4,3.8,0,T,50
1 
 Thumb up
0.25
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Attributes area led me to have to make a choice: Separate the circles or let them go with the image. First row wasn’t a brainer, since several values could occur, the first line, HEAlth, would be without circles. After thinking a little, I decided to remove all circles from the attributes board and work then apart.
Since this image didn’t use transparencies, but had round corners, only the T flag was used.
Again, tuning by approach to the back image, the real card.
Repeat the process to the name image.
The main image command as a small difference from the other images IMAGE command. While the other images where common to all cards, main image was card dependent. Instead of writing the name of the file in the script, it is a label from the linked data. Besides that, all the rest it’s the same. Also added the P flag, meaning the image will resize, but maintain the proportions.
So the command would like:
IMAGE=[alldeck],[MainImage],0.5,1.5,2.3,3,0,PT

Since Nandeck resize images, I only need one circle image, that I created, with the outer part painted with pink (colour I chose to represent transparent).
Then I started to put three circles in the card, one over one big circle, other over a medium and finally one over a small. Then start resizing them until I have the correct size for each one. After that I populate the card with the circles.
If you remember, the real card I used as background, didn’t have values, so sometimes I had to change background image to the control one so I can check which circles I already made.
Now came the real fun part, resolving the HEA issue, since a card can have several HEA values.
First, the three HEA values come from the data file, and their labels are: HeR, HeV, HeE.
So the first thing is identify the value coming from the data. To do it, Nandeck as the IF ELSEIF ENDIF commands.
The first step was the recruit with three points of health:
IF= [HeR]=3, the two = can cause some confusion, but remember that Nandeck uses command= nomenclature and then the configurable part, so IF= is the command, [HeR]=3 ist the test. Until an ElSEIF or an ENDIF appear, all commands write will be only run if the test is true. So again, I put and tuned 3 small circles. IMAGE=[alldeck],"circle.png",4,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",4.35,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",4.7,1.37,0.32,0.32,0,T
ENDIF
Another command was need here, the TEXT one, I tried to separate the IMAGE from the TEXT, but in this case, or I mix them, or I gone have to do the IF command again in the text area.
I ended to add text inside this IF block.
And before TEXT can be used, some type of font must be used. To do that, Nandeck as the directive FONT. Configuration I need was: font name, size, style and colour.
The font name is the name that font have on the windows system, checked on the fonts, sometimes the presented font name doesn’t correspond to the system name.
Size it’s self-explanatory.
Style as several options, but I will only use T, for transparent background.
Colour is self-explanatory.
Since I going to use the font in several places and I may want to experience others fonts, its good policy to put two labels at the top, in the definitions area:
[MainFont]= "PortagoITC TT"
[MainFontColor]= #FF0000
And then, before the IF
FONT=[MainFont],8,T,[ValuesFontColor]
Text command as the following nomenclature:
TEXT = “range”, “text”, position x, position y, width, height, horizontal alignment, vertical alignment, angle, alpha-channel, outline width
The range is alldeck, the text in this case is a simple char ‘R’ the following 4 numbers are the same as the circles, the rest wasn’t used, because the default values match my needs.
So ended with:
TEXT=[alldeck],R,4,1.37,0.32,0.32,center
TEXT=[alldeck],R,4.35,1.37,0.32,0.32,center
TEXT=[alldeck],R,4.7,1.37,0.32,0.32,center
ENDIF
Notice that I’ve moved the ENDIF to the end, so the circles and the text would be only processed if the health equals 3.
For Health equal two, just added ELSEIF before ENDIF and put the two circles and the text as before.
if=[HeR]=3
IMAGE=[alldeck],"circle.png",4,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",4.35,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",4.7,1.37,0.32,0.32,0,T
TEXT=[alldeck],R,4,1.37,0.32,0.32,center
TEXT=[alldeck],R,4.35,1.37,0.32,0.32,center
TEXT=[alldeck],R,4.7,1.37,0.32,0.32,center
elseif=[HeR]=2
IMAGE=[alldeck],"circle.png",4.15,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",4.55,1.37,0.32,0.32,0,T
TEXT=[alldeck],R,4.15,1.37,0.32,0.32,center
TEXT=[alldeck],R,4.55,1.37,0.32,0.32,center
Endif
The repeat the process to one health. I could choose to not put the last IF, meaning, the default value would be one, but putting the IF statement mean that the default would be no print at all, and this way, number mistakes can easily spotted since in preview, no heath at all would be easy to spot.
;Small Circles HEALTH
FONT=[MainFont],8,T,[ValuesFontColor]
;Small Circles HEALTH RECRUIT
if=[HeR]=3
IMAGE=[alldeck],"circle.png",4,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",4.35,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",4.7,1.37,0.32,0.32,0,T
TEXT=[alldeck],R,4,1.37,0.32,0.32,center
TEXT=[alldeck],R,4.35,1.37,0.32,0.32,center
TEXT=[alldeck],R,4.7,1.37,0.32,0.32,center
elseif=[HeR]=2
IMAGE=[alldeck],"circle.png",4.15,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",4.55,1.37,0.32,0.32,0,T
TEXT=[alldeck],R,4.15,1.37,0.32,0.32,center
TEXT=[alldeck],R,4.55,1.37,0.32,0.32,center
elseif=[HeR]=1
IMAGE=[alldeck],"circle.png",4.35,1.37,0.32,0.32,0,T
TEXT=[alldeck],R,4.35,1.37,0.32,0.32,center
endif
;Small Circles HEALTH VETERAN
if=[HeV]=3
IMAGE=[alldeck],"circle.png",5.5,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",5.85,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",6.2,1.37,0.32,0.32,0,T
TEXT=[alldeck],V,5.5,1.37,0.32,0.32,center
TEXT=[alldeck],V,5.85,1.37,0.32,0.32,center
TEXT=[alldeck],V,6.2,1.37,0.32,0.32,center
elseif=[HeV]=2
IMAGE=[alldeck],"circle.png",5.65,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",6.05,1.37,0.32,0.32,0,T
TEXT=[alldeck],V,5.65,1.37,0.32,0.32,center
TEXT=[alldeck],V,6.05,1.37,0.32,0.32,center
elseif=[HeV]=1
IMAGE=[alldeck],"circle.png",5.85,1.37,0.32,0.32,0,T
TEXT=[alldeck],V,5.85,1.37,0.32,0.32,center
endif
;Small Circles HEALTH ELITE
if=[HeE]=3
IMAGE=[alldeck],"circle.png",7,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",7.35,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",7.7,1.37,0.32,0.32,0,T
TEXT=[alldeck],E,7,1.37,0.32,0.32,center
TEXT=[alldeck],E,7.35,1.37,0.32,0.32,center
TEXT=[alldeck],E,7.7,1.37,0.32,0.32,center
elseif=[HeE]=2
IMAGE=[alldeck],"circle.png",7.15,1.37,0.32,0.32,0,T
IMAGE=[alldeck],"circle.png",7.55,1.37,0.32,0.32,0,T
TEXT=[alldeck],E,7.15,1.37,0.32,0.32,center
TEXT=[alldeck],E,7.55,1.37,0.32,0.32,center
elseif=[HeE]=1
IMAGE=[alldeck],"circle.png",7.35,1.37,0.32,0.32,0,T
TEXT=[alldeck],E,7.35,1.37,0.32,0.32,center
endif

I put all the tree levels since the veteran and elite were the same thing with a different X position.

Now Images part are done is time to do the TEXT (at this point I talked with David and he send me the icons, but I chose to resolve first the text and come back to the icons latter)
1 
 Thumb up
0.25
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
The TEXT zone.
I already defined the places with images, so I already have position X and Y, and the sizes of X and Y. So I begin to redefine de FONT command, to define the size of the font I want to the field ‘Type’ (coming from the data file) .
FONT=[MainFont],10,T,[MainFontColor]
TEXT=[alldeck],[Type],0.3,0.44,4.4,0.5, LEFT
Notice that I used the option LEFT. By default the horizontal alignment is CENTER.
Then appear the first problem that I have to learn something new about Nandeck. After the Type comes classification, but the position of that is relative to Type, meaning any value I put would be or too far or over the type.
After some research I found TEXTLIMIT. This command fills four variables with the coordinates of latest drawn text’s boundaries; I have to say, Nandeck its brutal. Applying the command:
TEXTLIMIT=[alldeck]
I will have the end of ‘Type’ stored in a label called TL. Now I only have to define the font, a little smaller than the ‘Type’ font and add a small space in the TEXT command.
FONT=[MainFont],8,T,[MainFontColor]
TEXT=[alldeck],[Classification],TR+0.2,0.46,4.4,0.5, LEFT
Working like a charm.
Then I did the same for the level.
FONT=[MainFont],7,T,[MainFontColor]
TEXT=[alldeck],RECRUIT,4.15,0.27,4.4,0.5, LEFT
TEXT=[alldeck],VETERAN,5.65,0.27,4.4,0.5, LEFT
TEXT=[alldeck],ELITE,7.25,0.27,4.4,0.5, LEFT
And finally to all values.
;Cost Value
FONT=[MainFont],10,T,[ValuesFontColor]
TEXT=[alldeck],[CoR],4.29,0.64,0.42,0.42, center
TEXT=[alldeck],[CoV],5.79,0.64,0.42,0.42, center
TEXT=[alldeck],[CoE],7.29,0.64,0.42,0.42, center
;Unit Values
FONT=[MainFont],8,T,[ValuesFontColor]
;Movement
TEXT=[alldeck],[MoR],4.35,1.77,0.32,0.32, center
TEXT=[alldeck],[MoV],5.85,1.77,0.32,0.32, center
TEXT=[alldeck],[MoE],7.35,1.77,0.32,0.32, center
;Weapon Range
TEXT=[alldeck],[WRR],4.35,2.17,0.32,0.32, center
TEXT=[alldeck],[WRV],5.85,2.17,0.32,0.32, center
TEXT=[alldeck],[WRE],7.35,2.17,0.32,0.32, center
;Close Combat
TEXT=[alldeck],[CCR],4.35,2.57,0.32,0.32, center
TEXT=[alldeck],[CCV],5.85,2.57,0.32,0.32, center
TEXT=[alldeck],[CCE],7.35,2.57,0.32,0.32, center
;Range Combat
TEXT=[alldeck],[RCR],4.35,2.97,0.32,0.32, center
TEXT=[alldeck],[RCV],5.85,2.97,0.32,0.32, center
TEXT=[alldeck],[RCE],7.35,2.97,0.32,0.32, center
;Defense
TEXT=[alldeck],[DeR],4.35,3.37,0.32,0.32, center
TEXT=[alldeck],[DeV],5.85,3.37,0.32,0.32, center
TEXT=[alldeck],[DeE],7.35,3.37,0.32,0.32, center
;Abilities
FONT=[AbilFont],6,IT,[ValuesFontColor],#00FF00
TEXT=[alldeck],[Ab11], 3.70,3.8,1.5,0.2, center
TEXT=[alldeck],[Ab21], 5.20,3.8,1.5,0.2, center
TEXT=[alldeck],[Ab31], 6.70,3.8,1.5,0.2, center
TEXT=[alldeck],[Ab12], 3.70,4.03,1.5,0.2, center
TEXT=[alldeck],[Ab22], 5.20,4.03,1.5,0.2, center
TEXT=[alldeck],[Ab32], 6.70,4.03,1.5,0.2, center
TEXT=[alldeck],[Ab13], 3.70,4.26,1.5,0.2, center
TEXT=[alldeck],[Ab23], 5.20,4.26,1.5,0.2, center
TEXT=[alldeck],[Ab33], 6.70,4.26,1.5,0.2, center
TEXT=[alldeck],[Ab14], 3.70,4.49,1.5,0.2, center
TEXT=[alldeck],[Ab24], 5.20,4.49,1.5,0.2, center
TEXT=[alldeck],[Ab34], 6.70,4.49,1.5,0.2, center
At this point it does a full card.
Posted one card Nandeck made.
2 
 Thumb up
0.25
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
After putting the card on bgg, Hans Otto stated one obvious thing, the color scheme of the text was hard to read. And he pointed to the solution, some kind of border.
At the time I didn't know how to do it, so I it the manual and the google.
After a minutes the solution was clear, Nandeck as a simple solution (again, Best Deck App Ever).
You can simple write the text again, with more three optional values:
Vertical alignment, alpha-channel and line size.
This mean, that if line size is defined, the text will be draw outlined, and the line have the size defined here.
First I started by defining a label for the Outline color.
[OutLineFontColor]= #000000
Them just did:
FONT=[MainFont],8,T,[MainFontColor]
TEXT=[alldeck],[Classification],TR+0.2,0.46,4.4,0.5, LEFT
FONT=[MainFont],8,T,[OutLineFontColor]
TEXT=[alldeck],[Classification],TR+0.2,0.46,4.4,0.5, LEFT, CENTER,0, 90 , 0.01
And so on for the rest of the texts.
And guess what? Almost worked...
The Type and the Classification worked, Recruit and Veteran worked. Elite didn't.
Started banging my head searching for the error.
If I change the color, works, if I change the alpha to 100, works, well, time to call the cavalry.
Changed color to #000001 (good enough), problem solved. Create a small script apart to test it and send it to Andrea Nini, the Nandeck developer ( no, I don't know him, just copied the mail from the app and send the mail).
And what to say, next day I have a mail with the Nandeck correct version.
Problem solved.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Time to go for the automation.
The script works, but images have to be changed by hand.
What would be great would be: in the data file, check a field and based in that, background, faction icon, color schemes and whatever else need it.
After thinking a bit, I come with this solution:
The field [Faction] would be used as control. All files specific to a faction will be stored inside a directory with the same name as [Faction]. The name of the files used in all cards would be common name: bars.png, background.png. The common files would go to a directory called common. Everything nice and clean.
After sorting the files to the directories, start trying tho concatenate the faction label with the rest of the text on the command IMAGE.
Most of my Nandeck knoledge was starting to be far away. I never been able to do it in the IMAGE command, but if I did it before IMAGE, with a label, it works. Maybe after automation, I figure it out or get some help, because, more or less at this point, I started to write this forum.
So doing:
[LabelConcat]="[Faction]\background.png"
IMAGE=[alldeck],[LabelConcat],0,0,9,6,0
I started to have, automatically, Objects with a background and the marauders with other.
Since common images didn't change, just added the directory directly inside: "common\Grey.png"
To the main image the concatenated label was a bit tricky, but ended like
[LabelConcat]="[Faction]\[MainImage]"
And finally the designator, that are common to all factions, but since there are 3 (or more), something like [LabelConcat]="common\[Designator]" should do the trick.
After converting the full script, things start to look even better.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Next stop in the road to automation was the size (and units).
Nandeck uses cm by default, but inches can be used with a directive called UNIT (UNIT=INCH), but if design a card with 9x6 cm (3.54331x2.3622), changing the units to inches will make the card go 9x6 Inches, over twice the size I planed.
Also, if I decide I want a bigger card, 13,5x9, I have to change all values in the script...
Fortunately, Nandeck as a solution (at least one) the % of the card size, That mean that I have to calculate all values in the script, but then, I only have to change card size and all components will adjust, great stuff.
A bit boring work, but it's all simple math, if 9 is 100%, then SizeX would be SizeX*100/9.
Same thing to SizeY, just divide per 6.
After doing that, card adjusts itself to the values of the labels of [CardSizeX]=9 and [CardSizeY]=6 applied in CARDSIZE=[CardSizeX],[CardSizeY].

Running the script show a new problem: text was on the right place, just with the wrong size.
After some experiences, I finally come with a solution.
Added a label called [factor]=1.
Multiplied [factor] to the FONT and CARDSIZE commands, and now I can change one value and have the cards automatically re sized.
[factor]=1
[CardSizeX]=9*[factor]
[CardSizeY]=6*[factor]

FONT=[MainFont],12*[factor],T,[MainFontColor]

Another small change I did was to change the TXT file to XLS, no brainier here, just import the txt in excel, and save it, then in the script change the name of the file to cards.xls.

By now, script is way to big to keep posting it all times.
Going to make a final push to put the next evolutions and then put the script.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Now the script it's almost done, time to start testing it with several cards, different backgrounds, abnormal numbers and strings.
Several minor adjustments are made:
- Abilities for Elite were slightly to the left.
- Abilities Text size as been expanded to accommodate as many chars as possible (more or less 15 chars).
- Relative positions re calculated and balanced, greyed area is now centered with the card and values centered inside the greyed zone.
- Text font size as been tunned to better fit.
And when all looks ready to go, and the final deck was build (at least one card per faction, fully configured and other test cards with test configurations) a bug as occurred.
Since the re-calculate the all deck is slow, I generally reduce the deck size to 2 cards. After I do the script and seem Ok, just put for the full deck , at the end 10 cards. Since I was seeing a specific area, I didn't notice that Designator wasn't change, it worked well in the first card, then the Label read nice from the data file, I could see it putting it in the card, but when concatenating with the directory, it would only work once, then the designator icon would be the same for all cards.
Abusing from the patience of NandDeck creator, Andrea Nini, I send the code to check if was me or a little bug, bugging my work.
As usual, Andrea was fast to have a response, it seems a bug and it's difficult to resolve, but using another command, it works.
So, taking the code from Andrea, I replace the:
[LabelConcat]="[Faction]\background.png"
By:
[LabelConcat]=join([Faction],"\background.png")
Problem solved. I can't stop to say good about Nandeck, great tool, several good ways to do a deck, from simple, easy, commands to expert level scripting. And the support as been amazing.
Now everything work fine.
Some things don't totally match original card, and could with some work, but at this point I consider the script done. Only two things to do, before zip it all and add it to BBG, reduce the images size, or BGG would not accept then (maybe I can do one card per faction and add the experiments later) and write a manual to go with the file.

Hope you like it, if any more developments on the subject, I will post them here, and fell free to ask and suggest improvements.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
;Definitions
[lastcard]= 1
[alldeck]= 1-[lastcard]
[AbilFont]= "OPTIMA"
[MainFont]= "PortagoITC TT"
[factor]=1
[CardSizeX]=9*[factor]
[CardSizeY]=6*[factor]

; Color scheme definitions
[MainColor_Combine]=#FF0000
[MainColor_Echo]=#FFFFFF
[MainColor_Erthen]=#FF0000
[MainColor_Marauders]=#FFFFFF
[MainColor_Objects]=#FF0000
[MainColor_Order]=#FFFFFF
[MainColor_SoL]=#FFFFFF

[OutColor_Combine]=#000000
[OutColor_Echo]=#AA00AA
[OutColor_Erthen]=#000000
[OutColor_Marauders]=#AA00AA
[OutColor_Objects]=#AA00AA
[OutColor_Order]=#000000
[OutColor_Sol]=#000000

[ValuesFontColor]= #000000

;Links
LINK="Cards.xls",Faction, Type, Classification, CoR, CoV, CoE, HeR, HeV, HeE, MoR, MoV, MoE, WRR, WRV, WRE, CCR, CCV, CCE, RCR, RCV, RCE,DeR,DeV,DeE,Ab11,Ab21,Ab31,Ab12,Ab22,Ab32,Ab13,Ab23,Ab33,Ab14,Ab24,Ab34,FactionIcon,Designator, MainImage

;Main script
CARDS=[alldeck]
CARDSIZE=[CardSizeX],[CardSizeY]

;Images
;Background
[LabelConcat]=join([Faction],"\background.png")
IMAGE=[alldeck],[LabelConcat],0,0,[CardSizeX],[CardSizeY],0
;Rows
[LabelConcat]=join([Faction],"\bars.png")
IMAGE=[alldeck],[LabelConcat],0,6.48%,[CardSizeX],10%,T
IMAGE=[alldeck],[LabelConcat],0,84%,[CardSizeX],10%,T
;Grey Zone
IMAGE=[alldeck],"common\Grey.png",3.55%,17.60%,93.3%,65%,0,T,50
;Atributes Area
IMAGE=[alldeck],"common\Atributes.png",32.2%,19.6%,64%,61.5%,0,T
;MainImage
[LabelConcat]=join([Faction],"\",[MainImage])
IMAGE=[alldeck],[LabelConcat],5.55%,25%,25.55%,50%,0,PT
;Name
IMAGE=[alldeck],"common\Name.png",66.6%,85%,27.77%,8%,0,T

; Big Circles
IMAGE=[alldeck],"common\circle.png",5.55%,82.83%,7.22%,11.33%,0,T
IMAGE=[alldeck],"common\circle.png",13.55%,82.83%,7.22%,11.33%,0,T
;Medium Circles
IMAGE=[alldeck],"common\circle.png",47.66%,10.66%,4.66%,7.00%,0,T
IMAGE=[alldeck],"common\circle.png",64.33%,10.66%,4.66%,7.00%,0,T
IMAGE=[alldeck],"common\circle.png",81.00%,10.66%,4.66%,7.00%,0,T
;Small Circles
;Small Circles LEFT
IMAGE=[alldeck],"common\circle.png",48.33%,29.50%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",48.33%,36.16%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",48.33%,42.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",48.33%,49.50%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",48.33%,56.16%,3.55%,5.33%,0,T
;Small Circles CENTER
IMAGE=[alldeck],"common\circle.png",65.00%,29.50%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",65.00%,36.16%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",65.00%,42.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",65.00%,49.50%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",65.00%,56.16%,3.55%,5.33%,0,T
;Small Circles RIGHT
IMAGE=[alldeck],"common\circle.png",81.66%,29.50%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",81.66%,36.16%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",81.66%,42.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",81.66%,49.50%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",81.66%,56.16%,3.55%,5.33%,0,T
;Small Circles HEALTH
FONT=[MainFont],8*[factor],T,[ValuesFontColor]
;Small Circles HEALTH RECRUIT
if=[HeR]=3
IMAGE=[alldeck],"common\circle.png",44.44%,22.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",48.33%,22.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",52.22%,22.83%,3.55%,5.33%,0,T
TEXT=[alldeck],R,44.44%,22.83%,3.55%,5.33%,center
TEXT=[alldeck],R,48.33%,22.83%,3.55%,5.33%,center
TEXT=[alldeck],R,52.22%,22.83%,3.55%,5.33%,center
elseif=[HeR]=2
IMAGE=[alldeck],"common\circle.png",46.11%,22.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",50.55%,22.83%,3.55%,5.33%,0,T
TEXT=[alldeck],R,46.11%,22.83%,3.55%,5.33%,center
TEXT=[alldeck],R,50.55%,22.83%,3.55%,5.33%,center
elseif=[HeR]=1
IMAGE=[alldeck],"common\circle.png",48.33%,22.83%,3.55%,5.33%,0,T
TEXT=[alldeck],R,48.33%,22.83%,3.55%,5.33%,center
endif
;Small Circles HEALTH VETERAN
if=[HeV]=3
IMAGE=[alldeck],"common\circle.png",61.11%,22.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",65.00%,22.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",68.88%,22.83%,3.55%,5.33%,0,T
TEXT=[alldeck],V,61.11%,22.83%,3.55%,5.33%,center
TEXT=[alldeck],V,65.00%,22.83%,3.55%,5.33%,center
TEXT=[alldeck],V,68.88%,22.83%,3.55%,5.33%,center
elseif=[HeV]=2
IMAGE=[alldeck],"common\circle.png",62.77%,22.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",67.22%,22.83%,3.55%,5.33%,0,T
TEXT=[alldeck],V,62.77%,22.83%,3.55%,5.33%,center
TEXT=[alldeck],V,67.22%,22.83%,3.55%,5.33%,center
elseif=[HeV]=1
IMAGE=[alldeck],"common\circle.png",65.00%,22.83%,3.55%,5.33%,0,T
TEXT=[alldeck],V,65.00%,22.83%,3.55%,5.33%,center
endif
;Small Circles HEALTH ELITE
if=[HeE]=3
IMAGE=[alldeck],"common\circle.png",77.77%,22.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",81.60%,22.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",85.55%,22.83%,3.55%,5.33%,0,T
TEXT=[alldeck],E,77.77%,22.83%,3.55%,5.33%,center
TEXT=[alldeck],E,81.60%,22.83%,3.55%,5.33%,center
TEXT=[alldeck],E,85.55%,22.83%,3.55%,5.33%,center
elseif=[HeE]=2
IMAGE=[alldeck],"common\circle.png",79.44%,22.83%,3.55%,5.33%,0,T
IMAGE=[alldeck],"common\circle.png",83.88%,22.83%,3.55%,5.33%,0,T
TEXT=[alldeck],E,79.44%,22.83%,3.55%,5.33%,center
TEXT=[alldeck],E,83.88%,22.83%,3.55%,5.33%,center
elseif=[HeE]=1
IMAGE=[alldeck],"common\circle.png",81.60%,22.83%,3.55%,5.33%,0,T
TEXT=[alldeck],E,81.60%,22.83%,3.55%,5.33%,center
endif
;Faction
[LabelConcat]=Join([Faction],"\"[FactionIcon])
IMAGE=[alldeck],[LabelConcat],5.55%,82.83%,7.22%,11.33%,0,T
;Designator
[LabelConcat]=join("common\",[Designator])
IMAGE=[alldeck],[LabelConcat],13.55%,82.83%,7.22%,11.33%,0,T

;Text Zone
[MainFontColor]=[MainColor_[Faction]]
[OutLineFontColor]=[OutColor_[Faction]]
;Title
FONT=[MainFont],12*[factor],T,[MainFontColor]
TEXT=[alldeck],[Type],3.33%,7.16%,48.88%,8.33%, LEFT
FONT=[MainFont],12*[factor],T,[OutLineFontColor]
TEXT=[alldeck],[Type],3.33%,7.16%,48.88%,8.33%, LEFT, CENTER,0, 50 , 0.01
TEXTLIMIT=[alldeck]
FONT=[MainFont],9*[factor],T,[MainFontColor]
TEXT=[alldeck],[Classification],TR+0.2,7.66%,48.88%,8.33%, LEFT, CENTER
FONT=[MainFont],9*[factor],T,[OutLineFontColor]
TEXT=[alldeck],[Classification],TR+0.2,7.66%,48.88%,8.33%, LEFT, CENTER,0, 50 , 0.01
FONT=[MainFont],8*[factor],T,[MainFontColor]
TEXT=[alldeck],RECRUIT,46.11%,4.66%,48.88%,8.33%, LEFT
TEXT=[alldeck],VETERAN,62.77%,4.66%,48.88%,8.33%, LEFT
TEXT=[alldeck],ELITE,80.55%,4.66%,48.88%,8.33%, LEFT
FONT=[MainFont],8*[factor],T,[OutLineFontColor]
TEXT=[alldeck],RECRUIT,46.11%,4.66%,48.88%,8.33%, LEFT, CENTER, 0, 50 , 0.01
TEXT=[alldeck],VETERAN,62.77%,4.66%,48.88%,8.33%, LEFT, CENTER, 0, 50 , 0.01
TEXT=[alldeck],ELITE,80.55%,4.66%,48.88%,8.33%, LEFT, CENTER, 0, 50, 0.01
;Cost Value
FONT=[MainFont],10*[factor],T,[ValuesFontColor]
TEXT=[alldeck],[CoR],47.66%,10.66%,4.66%,7.0%, center
TEXT=[alldeck],[CoV],64.33%,10.66%,4.66%,7.0%, center
TEXT=[alldeck],[CoE],81.00%,10.66%,4.66%,7.0%, center
;Unit Values
FONT=[MainFont],8*[factor],T,[ValuesFontColor]
;Movement
TEXT=[alldeck],[MoR],48.33%,29.50%,3.55%,5.33%, center
TEXT=[alldeck],[MoV],65.00%,29.50%,3.55%,5.33%, center
TEXT=[alldeck],[MoE],81.66%,29.50%,3.55%,5.33%, center
;Weapon Range
TEXT=[alldeck],[WRR],48.33%,36.16%,3.55%,5.33%, center
TEXT=[alldeck],[WRV],65.00%,36.16%,3.55%,5.33%, center
TEXT=[alldeck],[WRE],81.66%,36.16%,3.55%,5.33%, center
;Close Combat
TEXT=[alldeck],[CCR],48.33%,42.83%,3.55%,5.33%, center
TEXT=[alldeck],[CCV],65.00%,42.83%,3.55%,5.33%, center
TEXT=[alldeck],[CCE],81.66%,42.83%,3.55%,5.33%, center
;Range Combat
TEXT=[alldeck],[RCR],48.33%,49.50%,3.55%,5.33%, center
TEXT=[alldeck],[RCV],65.00%,49.50%,3.55%,5.33%, center
TEXT=[alldeck],[RCE],81.66%,49.50%,3.55%,5.33%, center
;Defense
TEXT=[alldeck],[DeR],48.33%,56.16%,3.55%,5.33%, center
TEXT=[alldeck],[DeV],65.00%,56.16%,3.55%,5.33%, center
TEXT=[alldeck],[DeE],81.66%,56.16%,3.55%,5.33%, center
;Abilities
FONT=[AbilFont],5*[factor],IT,[ValuesFontColor]
TEXT=[alldeck],[Ab11], 40.90%,63.33%,17.66%,3.35%, center
TEXT=[alldeck],[Ab21], 58.55%,63.33%,17.66%,3.35%, center
TEXT=[alldeck],[Ab31], 76.20%,63.33%,17.66%,3.35%, center
TEXT=[alldeck],[Ab12], 40.90%,67.16%,17.66%,3.35%, center
TEXT=[alldeck],[Ab22], 58.55%,67.16%,17.66%,3.35%, center
TEXT=[alldeck],[Ab32], 76.20%,67.16%,17.66%,3.35%, center
TEXT=[alldeck],[Ab13], 40.90%,71.00%,17.66%,3.35%, center
TEXT=[alldeck],[Ab23], 58.55%,71.00%,17.66%,3.35%, center
TEXT=[alldeck],[Ab33], 76.20%,71.00%,17.66%,3.35%, center
TEXT=[alldeck],[Ab14], 40.90%,74.83%,17.66%,3.35%, center
TEXT=[alldeck],[Ab24], 58.55%,74.83%,17.66%,3.35%, center
TEXT=[alldeck],[Ab34], 76.20%,74.83%,17.66%,3.35%, center
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
R T
Portugal
LX
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
And the result is:


As proposed in
http://www.boardgamegeek.com/thread/957136/report-on-sol-fac...

Values are test yet.
The bloodsucker image is from the game STALKER: Shadow of Chernobyl.
1 
 Thumb up
0.50
 tip
 Hide
  • [+] Dice rolls
David Thompson
United Kingdom
Cambridge
Cambridgeshire
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
You have amazed me with Nandeck. I have seen people talk about it, but I never knew how good it really was until now.

Also, I think it's neat how similar the character you used for the Fallen in your Nandeck generator looks as compared to the Fallen character I was designing for the Order.

 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
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.