LotR TCG Wiki → Card Sets:  All 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 → Forums:  TLHH CC

Author Topic: LotR-TCG Card Generator using nanDECK  (Read 26628 times)

0 Members and 1 Guest are viewing this topic.

June 28, 2020, 04:33:12 AM
Read 26628 times

TelTura

  • *****
  • Information Offline
  • Ranger
  • Administrator
  • Posts: 842
    • Player's Council Discord
LotR-TCG Card Generator using nanDECK
« on: June 28, 2020, 04:33:12 AM »
Watch this: YouTube Video Tutorial



Latest download here.

Documentation is included as a PDF with each release.  The latest version can also be found here on Google docs.

Installation instructions: If you have a previous version installed then close nanDECK, make sure to back up your cards.csv and card portraits / card output folders, then copy-paste the contents of the zip into your existing installation folder.





Card Generator v2.0.3 Update

Big changes and old spreadsheets need updated; see here for update instructions.

Change Log:

  • Fixing an issue where modifier type/subtype wasn't displaying properly
  • Fixed the resistance ring icon being named incorrectly, which made ring-bearers impossible to make.
  • Fixed One Ring template not rendering title.
  • Fixed rare text corruption involving thin spaces.
  • Updated nanDECK to the latest 1.25.3 final release.
  • Fixed Dwarven culture icons not showing on full art cards.
  • All absolute size-based columns have been replaced with size-factor columns that treat 1.0 as no change and 0.5 and 2.0 as half and double, respectively.  Some names have been altered as a result.
  • Added a column for manually setting the size of the modifier template title bar
  • Added a column for manually sizing the text in the type bar
  • Fixed a recurring thin spacing bug
  • Added support for creating mockup cards, either via the new force mockup setting, or on a per-card basis with the mockup tag.
  • Added new output format setting that can be set to various output formats, notably jpg.
  • Made various small adjustments to alignment/size that were found to be out of whack.



Card Generator v1.9.1 Update

Change Log:

  • Fixed an issue which would sometimes cause decks to fail validation



Card Generator v1.9.0 Update

Change Log:

  • Updated included nanDECK version to 1.25.3 b17
  • Fixed single-section card type panels rendering an error
  • Narrowed the margins of all game text to the top and left, bringing it more in line with later-era cards
  • Overhauled the autoformatting to no longer affect lore or promo text
  • Added thin space as a tag that replaces spaces in the game text (not lore or promo text) with the unicode thin space character



Card Generator v1.8.0 Update

Change Log:

  • Fixed an issue where capital Js would get cut off in subtitles
  • Fixed an issue where single-card CSVs would cause titles and subtitles with spaces to get rendered with quotes around them
  • Added new template type Back, which only needs ID and Template set and renders the LotR-TCG card back.



Card Generator v1.7.0 Update

Change Log:

  • Updated the included nanDECK version to 1.25.3 b16
  • Due to the updated nanDECK, fixed a long-standing bug relating to single smart quotes getting interpreted backwards.
  • Altered the disclaimer to use the positioned sprite version and not the standalone
  • Fixed Ally card type line rendering as blank when exporting cards via batch
  • Added aliases for full art (no template) and full portrait (portrait backdrop).  These should be considered the canonical tags moving forward.
  • Added new [rotate site templates] setting, which tells the generator whether or not to rotate the site templates.  Defaults to true (since the included templates are in landscape), but can be set to False if you provide your own portrait-aligned sites.
  • Updated documentation, particularly with a large section detailing the difference between no template and portrait backdrop.


Card Generator v1.6.0 Update

Change Log:

  • Fixed culture icons using the wrong font size, which lead to cards having extra space between lines
  • Altered block symbol detection to permit a different sizing between the type bar ("Home 3T") and game text
  • Added new column "display type", which overrides the name displayed for the card type.  This permits alternate languages or template-compatible variants to use existing layouts.
  • Added new ally home label setting which controls how the "Home X" label is displayed for Allies.  This is mostly intended to be used for alternate languages.
  • Added new column "game text scale" which is a multiplier for the game text, helper text, lore, and promo text areas.
  • Updated example files to reflect recent column changes


Card Generator v1.5.0 Update

Change Log:

  • Added support for overriding the text color of the type bar or the title/subtitle separately from the rest of the game text.  To do this, include the "title color override" or "type color override" columns and provide a standard hex color.  These values will default to what is already normally provided in game text color, but can be further overridden here if needed.
  • Added promo text support.  You can now include a "promo text" column to place bold text at the bottom of the card, similar to the dAgent and other promo cards.
  • Added helper text support.  Game text with the <helper></helper> tags around it will be rendered in slightly smaller italic text matching the helper text used in the originals.
  • Included new font which approximates the original promo text (but which is not really all that close). 
  • Sites which have a pre-rotated image can now use the "no rotate" tag to prevent the generator from rotating the portrait.
  • Rarities of O will now be replaced with the ring icon
  • fixed onering templates erroring out if they also had the full art tag
  • fixed onering templates not supporting full portrait mode
  • adjusted collector's info positioning
  • temporarily removed some of the smart quote parsing pending a fix from the nanDECK dev
  • added autobolding for the Ring-bearer keyword
  • added promo font setting
  • Fixed some issues with inconsistent and unnecessary spacing between game text sections
  • Decreased the size of game text symbols to eliminate extra line spacing occurring because of them
  • Updated the documentation



Card Generator v1.4.1 Update

Change Log:

  • Fixed an issue where the Original-sized templates had an incorrectly named FOTR block icon, meaning that sites did not display the icon when exported at that size.


Card Generator v1.4.0 Update

Change Log:

  • Added customizable setting key for non-breaking space.
  • Added oversampling by default to the original size templates.
  • Added support for custom site 'cultures' instead of using the hard-coded template name 'site'.



Card Generator v1.3.1 Update

Change log:

  • Fixed an issue with the Gollum artifact and culture icon overlays not showing up due to an outdated naming scheme in the template filenames.


Card Generator v1.3.0 Update

Change log:

  • Updated nanDECK version to fix a bug where using the batch file would make busted cards on some computers
  • Fixed batch file not updated to the latest nanDECK path
  • Altered tower and king replacement with digits (i.e. 3T or 4K) to be case-sensitive; this permits "4th" etc to be used without issue.
  • Added automatic en dash insertion when a - is in front of a digit.  Added manual en dash replacement of -- and em dash replacement of ---.
  • Added support for custom newline characters in addition to <br>.
  • Added full portrait tag, which will alter the behavior of the portrait to instead fill the entire card background (including border), which can be used to just place whole cards underneath the template without cutting them out.
  • Fixed auto-accent replacement being broken from the small caps rework.  Auto-accent rules overhauled so it should be a bit easier to make new entries.
  • Fixed twilight symbol replacement not working in italicized helper text.
  • Altered the image sizing filter to Lanczos for hopefully an easy fidelity upgrade.
  • Altered position and size of collector's info to be more compatible with longer coll infos.
  • Altered site game text to not cut off a bold 'damage +1' on the bottom line.

Card Generator v1.2.0 Update

Change log:

  • The name/location of the card CSV can now be altered by changing the [spreadsheet path] option in settings.txt.
  • Font installation instructions updated. Based on new information, fonts do not actually need to be installed, and so are packaged by default in the same folder as nanDECK.exe.


Card Generator v1.1.0 Update

Change log:

  • Fixed a bug where Maneuver phase events wouldn't autobold unless it was spelled incorrectly
  • Altered the smallcaps fonts to use a configured factor for the size difference between uppercase and lowercase
  • Extracted font choices into settings.txt
  • Added a new font scale factor setting which globally scales the size of all text (for custom fonts)
  • Altered sites to automatically rotate their portrait image 270 degrees
  • Added a set of default portrait images which can be used to author portraits of the correct size more easily
  • Revamped the documentation with troubleshooting and how-to sections


Card Generator v1.0.0 Release

If you've read my post about card templates, then you might have remembered I mentioned I was working on a script for generating cards from the ground up, so that manual photoshopping was unnecessary.

Well here I am, bearing gifts of the Valar.

I PRESENT an all-in-one script which can convert a CSV and a folder of portrait images into properly-formatted, 98% accurate virtual cards. It also works with all sizes of my previously-released templates, and with a settings change can flip between Original, Double, and Huge without any other changes on your part.

If you've been drooling over the full-art cards I posted in the other thread, well, this was the tool I used to create those.

Code is up on github, and the release zip on github includes nanDECK and original/double templates all packaged together.

There were several changes to the templates, which were detailed in the thread linked at the top.  I would encourage you to redownload if you have used these resources in the past, as it's all improvements.

All of the images in the other thread were built using this tool; some are recreations of existing cards, and some are brand new virtual cards.

If you have any questions or suggestions, please let me know here and I will address them as soon as I see them.
« Last Edit: October 24, 2024, 09:27:49 PM by TelTura »
Come join the Player's Council to help us run events, create new cards, and steer the direction of this great game!

Join our Discord here for more information.

June 28, 2020, 06:04:28 AM
Reply #1

SGollum

  • **
  • Information Offline
  • Uruk-hai
  • Posts: 72
  • The Smeags
Re: LotR-TCG Card Generator using nanDECK
« Reply #1 on: June 28, 2020, 06:04:28 AM »
I can't get custom pictures to work or the twilight symbol for [1] to work either. Other than that it works really good.

Also, theoretically you could put your physical LOTRTCG cards in sleeves and print these images and play with custom cards!
« Last Edit: June 28, 2020, 06:12:16 AM by SGollum »
Everything Gollum says is automatically the best LOTR qoutes.

June 28, 2020, 11:02:48 AM
Reply #2

TelTura

  • *****
  • Information Offline
  • Ranger
  • Administrator
  • Posts: 842
    • Player's Council Discord
Re: LotR-TCG Card Generator using nanDECK
« Reply #2 on: June 28, 2020, 11:02:48 AM »
So it comes with the two example cards in cards.csv, do those not render when you run the utility?

If you want to send me screenshots of your folder setup and a copy of the csv you're using I will be happy to look at what's up.
Come join the Player's Council to help us run events, create new cards, and steer the direction of this great game!

Join our Discord here for more information.

June 28, 2020, 11:18:49 AM
Reply #3

SGollum

  • **
  • Information Offline
  • Uruk-hai
  • Posts: 72
  • The Smeags
Re: LotR-TCG Card Generator using nanDECK
« Reply #3 on: June 28, 2020, 11:18:49 AM »
So it comes with the two example cards in cards.csv, do those not render when you run the utility?

If you want to send me screenshots of your folder setup and a copy of the csv you're using I will be happy to look at what's up.

I am not beside my computer right now, so I can't show screenshots at the moment. The example pictures do work, but if I try to make my own pictures, those don't work even though I made the exact same pixel scale and .png. Is there anything else I'm supposed to do other than put the picture in the folder and the Excell spreadsheet?
Everything Gollum says is automatically the best LOTR qoutes.

June 28, 2020, 11:30:01 AM
Reply #4

TelTura

  • *****
  • Information Offline
  • Ranger
  • Administrator
  • Posts: 842
    • Player's Council Discord
Re: LotR-TCG Card Generator using nanDECK
« Reply #4 on: June 28, 2020, 11:30:01 AM »
nope, that's supposed to be all you need.  Portrait in "card_portraits", and then the name of the image in the "image_name" column.  Make sure you include the extension, i.e. "example.png" and not "example".  

As for the twilight, the only thing that I can think of is that the fonts aren't installed correctly, as noted in the documentation.  Do the [Dwarven], [Moria], or [2] symbols show up in the game text of Steel is Steel?
« Last Edit: June 28, 2020, 11:32:27 AM by TelTura »
Come join the Player's Council to help us run events, create new cards, and steer the direction of this great game!

Join our Discord here for more information.

June 28, 2020, 01:25:57 PM
Reply #5

Cw0rk

  • *****
  • Information Offline
  • Knight
  • Posts: 1378
  • .
Re: LotR-TCG Card Generator using nanDECK
« Reply #5 on: June 28, 2020, 01:25:57 PM »
Very few issues so far for me:
- While reading the tutorial, I was wondering what to put under "culture" for sites. To avoid confusion, perhaps you should specify that you don't need to specify a culture for sites.
- I'm having issues with special characters. When I name my card "Úlairë Cantëa", it becomes something like "Â?lair« Cant«a".


The twilight and culture symbols worked fine for me.
Still haven't tried portraits.

June 28, 2020, 01:40:44 PM
Reply #6

TelTura

  • *****
  • Information Offline
  • Ranger
  • Administrator
  • Posts: 842
    • Player's Council Discord
Re: LotR-TCG Card Generator using nanDECK
« Reply #6 on: June 28, 2020, 01:40:44 PM »
- While reading the tutorial, I was wondering what to put under "culture" for sites. To avoid confusion, perhaps you should specify that you don't need to specify a culture for sites.


I will add this to the documentation.  I think it's mentioned somewhere, but perhaps not in the correct place.

(EDIT: Added to the "culture" column section.  This is updated in the google doc link but has not yet been added to the PDF.)

Quote
- I'm having issues with special characters. When I name my card "Úlairë Cantëa", it becomes something like "Â?lair« Cant«a".

So nanDECK has a love-hate relationship with accents. Sometimes I've found it goes in just fine, and other times it seems to crap itself; it uses the installed Internet Explorer engine to render HTML, so I imagine that's part of it.

I would take a look at the section on the "all text replacements.txt" file.  This file contains a bunch of search/replace pairs (applied to the entire card's text), which includes all of the Nazgul names, so you should just be able to use "Ulaire Cantea" and have it auto-replaced with the necessary HTML-encoded version of "Úlairë Cantëa".  If you have a name not in that list of ~60 auto-replaced names, you can add new ones that follow the same pattern to that file.

Thanks for the feedback!  Let me know if that helps you overcome the naming woes.
« Last Edit: June 28, 2020, 01:46:50 PM by TelTura »
Come join the Player's Council to help us run events, create new cards, and steer the direction of this great game!

Join our Discord here for more information.

June 28, 2020, 01:58:33 PM
Reply #7

TelTura

  • *****
  • Information Offline
  • Ranger
  • Administrator
  • Posts: 842
    • Player's Council Discord
Re: LotR-TCG Card Generator using nanDECK
« Reply #7 on: June 28, 2020, 01:58:33 PM »
- I'm having issues with special characters. When I name my card "Úlairë Cantëa", it becomes something like "Â?lair« Cant«a".

Oh, and this could also be an encoding thing.  If you're in Excel or whatever, try modifying the Character Set or Encoding to "Western Europe / Windows-1252 / Latin" for your CSV when you save it; by default it's probably using a character set that's based on American usage which doesn't use accents.
Come join the Player's Council to help us run events, create new cards, and steer the direction of this great game!

Join our Discord here for more information.

June 28, 2020, 07:37:41 PM
Reply #8

SGollum

  • **
  • Information Offline
  • Uruk-hai
  • Posts: 72
  • The Smeags
Re: LotR-TCG Card Generator using nanDECK
« Reply #8 on: June 28, 2020, 07:37:41 PM »
https://imgur.com/LpuNydX

I finally got it working! I couldn't get the word Easterling to not be in bold because it thinks it's a keyword because of the period. This is Attea from the Lairs set.
« Last Edit: June 28, 2020, 07:41:31 PM by SGollum »
Everything Gollum says is automatically the best LOTR qoutes.

June 28, 2020, 07:54:08 PM
Reply #9

TelTura

  • *****
  • Information Offline
  • Ranger
  • Administrator
  • Posts: 842
    • Player's Council Discord
Re: LotR-TCG Card Generator using nanDECK
« Reply #9 on: June 28, 2020, 07:54:08 PM »
Aw nuts!  Should have known there'd be a case where the auto-formatter would fail, lol.  

Delete line 103 from game_text_replacements.txt and it will stop that.  I'll take a look and see if I can finagle a better autoformatter setup.

It looks like this:

Code: [Select]
HTMLKEY=,"Easterling.","<b>Easterling.</b>",,C

What did you do to fix it?

Also, use <br> tags to put newlines in the proper places.
« Last Edit: June 28, 2020, 07:57:47 PM by TelTura »
Come join the Player's Council to help us run events, create new cards, and steer the direction of this great game!

Join our Discord here for more information.

June 28, 2020, 08:07:27 PM
Reply #10

SGollum

  • **
  • Information Offline
  • Uruk-hai
  • Posts: 72
  • The Smeags
Re: LotR-TCG Card Generator using nanDECK
« Reply #10 on: June 28, 2020, 08:07:27 PM »
I forgot to download the fonts and write .png.

I wanted to make a card from one of the deleted scenes, so I have Frodo turning into Gollum. I know it's a really weird card, but I just wanted to make something unique  8-)

https://imgur.com/zUkzFMC
(Not entirely sure how to put the card image in the post yet...)
Everything Gollum says is automatically the best LOTR qoutes.

June 28, 2020, 09:46:29 PM
Reply #11

TelTura

  • *****
  • Information Offline
  • Ranger
  • Administrator
  • Posts: 842
    • Player's Council Discord
Re: LotR-TCG Card Generator using nanDECK
« Reply #11 on: June 28, 2020, 09:46:29 PM »
I forgot to download the fonts and write .png.

Cool.  I'll add some additional info to the docs to try and head this problem off.

Quote
(Not entirely sure how to put the card image in the post yet...)

Get the link to the image itself (on imgur, usually click the image in your profile, then copy the link option that ends in ".png") and put it between img tags, like so:

Code: [Select]
[img]https://i.imgur.com/zUkzFMC.png[/img]
Come join the Player's Council to help us run events, create new cards, and steer the direction of this great game!

Join our Discord here for more information.

June 29, 2020, 12:23:42 PM
Reply #12

Moro

  • *
  • Information Offline
  • Goblin
  • Posts: 9
Re: LotR-TCG Card Generator using nanDECK
« Reply #12 on: June 29, 2020, 12:23:42 PM »
Great, great job :)

Personally I have such an issue with generated files:

Any hints?

June 29, 2020, 01:04:16 PM
Reply #13

TelTura

  • *****
  • Information Offline
  • Ranger
  • Administrator
  • Posts: 842
    • Player's Council Discord
Re: LotR-TCG Card Generator using nanDECK
« Reply #13 on: June 29, 2020, 01:04:16 PM »
Whoa.  That looks like nanDECK is trying and failing to find an internet explorer version that it is compatible with, and is instead using Edge?  That's the bing logo.  I will research this and post back with what I find.
Come join the Player's Council to help us run events, create new cards, and steer the direction of this great game!

Join our Discord here for more information.

June 29, 2020, 01:38:34 PM
Reply #14

SGollum

  • **
  • Information Offline
  • Uruk-hai
  • Posts: 72
  • The Smeags
Re: LotR-TCG Card Generator using nanDECK
« Reply #14 on: June 29, 2020, 01:38:34 PM »
Whoa.  That looks like nanDECK is trying and failing to find an internet explorer version that it is compatible with, and is instead using Edge?  That's the bing logo.  I will research this and post back with what I find.

I had that issue once. Closing everything and loading it back up fixed it

On a side note, is there any way to use a tengwar font?
Everything Gollum says is automatically the best LOTR qoutes.