HQ Card generator 8.x
by Nate and Snacko
Moderators: Snacko, CCGHQ Admins
Re: HQ Card generator 8.x
by Snacko » 02 Feb 2011, 21:10
@aurelain
Thanks for the great find and processing the frames to work with card generator. Indeed they look so much closer to the original cards. The difference probably comes from the printing process and the ink / paper combination, so this is as close you can get to the original.
@Incantus
Original fonts I assume as they look identical which is:
[fonts]
font.text = 30, MPlantin.ttf/MPlantinI.ttf, leading:45
font.artist = 22, MatrixB.ttf
font.copyright = 13, MPlantin.ttf
font.title = 35, MatrixB.ttf/MatrixBI.ttf
font.type = 30, MatrixB.ttf
font.pt = 36, MatrixBSmallCaps.ttf, centerY:true centerX:true
the sizes are in points from what I remember; they're initial size and they'll be decreased if necessary for the text to fit the box; both MatrixB and MatrixBSmallCaps are pay fonts; you could use Garamond Bold which looks ok and is free
Thanks for the great find and processing the frames to work with card generator. Indeed they look so much closer to the original cards. The difference probably comes from the printing process and the ink / paper combination, so this is as close you can get to the original.
@Incantus
Original fonts I assume as they look identical which is:
[fonts]
font.text = 30, MPlantin.ttf/MPlantinI.ttf, leading:45
font.artist = 22, MatrixB.ttf
font.copyright = 13, MPlantin.ttf
font.title = 35, MatrixB.ttf/MatrixBI.ttf
font.type = 30, MatrixB.ttf
font.pt = 36, MatrixBSmallCaps.ttf, centerY:true centerX:true
the sizes are in points from what I remember; they're initial size and they'll be decreased if necessary for the text to fit the box; both MatrixB and MatrixBSmallCaps are pay fonts; you could use Garamond Bold which looks ok and is free
Re: HQ Card generator 8.x
by tojammot » 03 Feb 2011, 23:04
Your program is so great that I'm back again to nag you with questions 
I imported the new Besieged set, and downloaded the images. Everything is ok, it recognizes cards and create perfect proxies as usual. But the problem is with some wordy cards, like sword of feast and famine and Blightsteel colossus: words in the text overlaps each other, probably because of the font's dimension. I think you fixed that by giving each card a specific font size in the fontSizes.csv file, so I tried to manually add new cards to that file. I guess that the first value is the card name and the third is the font size, but the second value (looks like hash code or something) is out of my reach. Wondering if you could tell me how to get the right value for each card (assuming that tampering with that file is the right way to resize text
)

I imported the new Besieged set, and downloaded the images. Everything is ok, it recognizes cards and create perfect proxies as usual. But the problem is with some wordy cards, like sword of feast and famine and Blightsteel colossus: words in the text overlaps each other, probably because of the font's dimension. I think you fixed that by giving each card a specific font size in the fontSizes.csv file, so I tried to manually add new cards to that file. I guess that the first value is the card name and the third is the font size, but the second value (looks like hash code or something) is out of my reach. Wondering if you could tell me how to get the right value for each card (assuming that tampering with that file is the right way to resize text

Re: HQ Card generator 8.x
by Snacko » 04 Feb 2011, 12:27
That file is automatically created when you create font size cache. The 2nd value is md5 of text to know if it changed, however you shouldn't need to edit it by hand.
Those cards look okish here; I know Colossus has bad casting cost and the pt looks different as it seems Wizardds use a single custom glyph like in mana for those double/triple digit numbers.


Those cards look okish here; I know Colossus has bad casting cost and the pt looks different as it seems Wizardds use a single custom glyph like in mana for those double/triple digit numbers.


Re: HQ Card generator 8.x
by tojammot » 05 Feb 2011, 10:43
Ok fixed by importing the new master base updated with MBS. Probably something was wrong with new lines, not with text font. Thanks anyway 
Fyi, I noticed that the Spawnsire of Ulamog needs the 20 mana symbol for its second activated ability...I modified the card legal text by putting 2 consecutive 10 symbols

Fyi, I noticed that the Spawnsire of Ulamog needs the 20 mana symbol for its second activated ability...I modified the card legal text by putting 2 consecutive 10 symbols

Re: HQ Card generator 8.x
by BaconCatBug » 05 Feb 2011, 14:28
Really? I just made a 20 symbol.
- Attachments
-
- 20.png (5.11 KiB) Viewed 7213 times
-
BaconCatBug - Apprentice
- Posts: 253
- Joined: 17 Dec 2010, 12:13
- Has thanked: 6 times
- Been thanked: 41 times
Re: HQ Card generator 8.x
by Huggybaby » 07 Feb 2011, 22:34
Wow, thanks aurelain! Finally that stupid interference pattern is gone! And beyond that, everything else like the text box seems so much more accurate.aurelain wrote:It seems the game "Duel of the Planeswalkers" uses high resolution textures to build its cards (712x1024). I took these files and applied them to the template that HQCG uses for the regular cards (8th edition onward), and I'm quite happy with the results.
You can check it out for yourselves:
http://www.mediafire.com/?k3rrj5f06oh05gy
(45 MB, consisting of the 110 png files that reside in images/eighth/regular)
I believe this new look is the most faithful to the originals (the scans seem to offset the colors, as can be seen in the attachment).
Snacko, have these new textures been added to the official download?
-
Huggybaby - Administrator
- Posts: 3226
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 741 times
- Been thanked: 601 times
Re: HQ Card generator 8.x
by BaconCatBug » 12 Feb 2011, 03:22
I have a question that doesn't really need a thread of it's own.
When I generate a card with misc/createcard.bat, where does the render go? I make the card, but then I can't find the render. :'(
I end up just editing the Data.csv and making my cards that way lol.
When I generate a card with misc/createcard.bat, where does the render go? I make the card, but then I can't find the render. :'(
I end up just editing the Data.csv and making my cards that way lol.
-
BaconCatBug - Apprentice
- Posts: 253
- Joined: 17 Dec 2010, 12:13
- Has thanked: 6 times
- Been thanked: 41 times
Re: HQ Card generator 8.x
by aurelain » 12 Feb 2011, 07:20
There is a parameter in "config.txt" called "output.directory". Normally, this has the value "output/", meaning the renders are placed in the same folder, in "output".
Re: HQ Card generator 8.x
by BaconCatBug » 12 Feb 2011, 21:21
Woot. I got it working now. 
One very last question about the createcards.bat. Is it possible to execute the bat with flags so it automatically puts in the data? Or do you have to manually input the data each time?

One very last question about the createcards.bat. Is it possible to execute the bat with flags so it automatically puts in the data? Or do you have to manually input the data each time?
-
BaconCatBug - Apprentice
- Posts: 253
- Joined: 17 Dec 2010, 12:13
- Has thanked: 6 times
- Been thanked: 41 times
Re: HQ Card generator 8.x
by TheGreyHavens » 20 Feb 2011, 12:15
Hello,
yesterday i tried creating some proxies, but encountered several problems:
- Except with the basic 5 lorwyn planeswalkers (garruk, liliana, chandra, jace, ajani) with those special overlays the generation of planeswalkers generally does not really work, because the images are not fitting in the art box of the template. Do i have to adjust them manually or is there some resizing algorithm?
- Leveler creatures are not rendered as levelers, they just get the bare rules text inside their text box. The special art like the level-boxes and the shaded background-stripes are missing. Is rendering of leveler creatures not implemented yet or do i have to edit some code inside the masterbase / cards.csv (because that i did to get flip and split cards working, see next topic)
- Flip cards are not working out of the box, because in the current database from goblinhero "<hr>" is used to separate the rules for the normal and the flip part, but the HQ Card Generator expects a "-----" as the flip card separator. To get them working i manually edited the cards.csv and changed all FLIP CARDS "<hr>" to "-----", but that will be much work again, as soon as a new masterbase is released, because of split cards, see next topic.
- Split cards are not working out of the box, because in the current database from goblinhero "<hr>" is used to separate the rules for the two cards, but the HQ Card generator expects a "//" as the split separator. To get them working u have to manually change all "<hr>" entries of the SPLIT CARDS to "//".
- Is there some place where to get updated config files for HQ Card Generator to generate proxies with the same settings like with real cards (e.g. correct multicolored frames with updated TitleToLandColors.csv and config-eight.txt with the correct card.multicolor.* -settings)?
- Are planeswalkers with 4 abilities (e.g. jace, the mind sculptor) yet implemented? I cant get them to work right now...
Thx in advance for help and @snacko for this great tool
TheGreyHavens
yesterday i tried creating some proxies, but encountered several problems:
- Except with the basic 5 lorwyn planeswalkers (garruk, liliana, chandra, jace, ajani) with those special overlays the generation of planeswalkers generally does not really work, because the images are not fitting in the art box of the template. Do i have to adjust them manually or is there some resizing algorithm?
- Leveler creatures are not rendered as levelers, they just get the bare rules text inside their text box. The special art like the level-boxes and the shaded background-stripes are missing. Is rendering of leveler creatures not implemented yet or do i have to edit some code inside the masterbase / cards.csv (because that i did to get flip and split cards working, see next topic)
- Flip cards are not working out of the box, because in the current database from goblinhero "<hr>" is used to separate the rules for the normal and the flip part, but the HQ Card Generator expects a "-----" as the flip card separator. To get them working i manually edited the cards.csv and changed all FLIP CARDS "<hr>" to "-----", but that will be much work again, as soon as a new masterbase is released, because of split cards, see next topic.
- Split cards are not working out of the box, because in the current database from goblinhero "<hr>" is used to separate the rules for the two cards, but the HQ Card generator expects a "//" as the split separator. To get them working u have to manually change all "<hr>" entries of the SPLIT CARDS to "//".
- Is there some place where to get updated config files for HQ Card Generator to generate proxies with the same settings like with real cards (e.g. correct multicolored frames with updated TitleToLandColors.csv and config-eight.txt with the correct card.multicolor.* -settings)?
- Are planeswalkers with 4 abilities (e.g. jace, the mind sculptor) yet implemented? I cant get them to work right now...
Thx in advance for help and @snacko for this great tool

TheGreyHavens
- TheGreyHavens
- Posts: 8
- Joined: 14 Mar 2009, 15:30
- Has thanked: 0 time
- Been thanked: 0 time
Re: HQ Card generator 8.x
by BaconCatBug » 20 Feb 2011, 18:45
1) You need to manually resize the images and overlays yourself to match the lorwin ones
2) No, they are not implemented yet. I am working on implementing them by hacking away at the code though.
3 and 4) viewtopic.php?f=30&t=4009 My tweaked version that has working Flips and Splits.
5) Config files you need to make yourself, or see above for the tweaked ones I edited myself.
6) Not implemented yet. My thread above has a HQ proxy of JTMS for you to use.
2) No, they are not implemented yet. I am working on implementing them by hacking away at the code though.
3 and 4) viewtopic.php?f=30&t=4009 My tweaked version that has working Flips and Splits.
5) Config files you need to make yourself, or see above for the tweaked ones I edited myself.
6) Not implemented yet. My thread above has a HQ proxy of JTMS for you to use.
-
BaconCatBug - Apprentice
- Posts: 253
- Joined: 17 Dec 2010, 12:13
- Has thanked: 6 times
- Been thanked: 41 times
Re: HQ Card generator 8.x
by telengard » 26 Feb 2011, 20:29
Is there an updated cards.csv with some of the newer sets? I have what seemed to be the latest (m11).
I tried to do an import of the masterbase following the instructions and it didn't seem to generate a working csv for me. I've tried it twice w/ the same results. I noticed that a lot of the generated lines looked like this:
"When Abduction enters the battlefield, untap enchanted creature.",,,,,,,,,,,
You control enchanted creature.,,,,,,,,,,,
I don't see anything like that in my current cards.csv. It's possible I'm missing a step etc.
Also, while running the mws2cards.bat file on the generated Master.csv, I saw a lot of messages that looked like this:
PHP Notice: Undefined offset: 13 in G:\rec\ccg\mtg\util\hq_gen\scripts\classes
\MasterBase.php on line 52
Not sure if that is relevant or not. I started down this path due to hitting this w/ trying to generate a version of "Evolving Wilds".
~telengard
I tried to do an import of the masterbase following the instructions and it didn't seem to generate a working csv for me. I've tried it twice w/ the same results. I noticed that a lot of the generated lines looked like this:
"When Abduction enters the battlefield, untap enchanted creature.",,,,,,,,,,,
You control enchanted creature.,,,,,,,,,,,
I don't see anything like that in my current cards.csv. It's possible I'm missing a step etc.
Also, while running the mws2cards.bat file on the generated Master.csv, I saw a lot of messages that looked like this:
PHP Notice: Undefined offset: 13 in G:\rec\ccg\mtg\util\hq_gen\scripts\classes
\MasterBase.php on line 52
Not sure if that is relevant or not. I started down this path due to hitting this w/ trying to generate a version of "Evolving Wilds".
- Code: Select all
./generateCards.sh decks/roeldrazi.txt
Card Generator v8.2.10 - Generate Cards
Scanning art directories.....................................
Loading card data...............................................
Parsing decklist: Roeldrazi...
Generating images...
Wall of Omens [ROE].................................
Consuming Vapors [ROE].................
Enclave Cryptologist [ROE]................................................
Flame Slash [ROE]......
Forked Bolt [ROE]......
Kargan Dragonlord [ROE].................................
Lone Missionary [ROE]............
Pelakka Wurm [ROE]........................................
Staggershock [ROE]....................................................
Student of Warfare [ROE]................................................
Vengevine [ROE]...................................................
Sea Gate Oracle [ROE]......
Narcolepsy [ROE].........................................................
Inquisition of Kozilek [ROE]...................
Evolving Wilds [ROE]....
ERROR: Land color missing for card: Evolving Wilds
Press any key to continue...read: 6: arg count
~telengard
Author of Dreamblade:
viewtopic.php?f=51&t=1215
viewtopic.php?f=51&t=1215
-
telengard - DEVELOPER
- Posts: 383
- Joined: 23 May 2009, 23:04
- Has thanked: 5 times
- Been thanked: 30 times
Re: HQ Card generator 8.x
by Snacko » 26 Feb 2011, 21:15
Maybe something went wrong with newlines, otherwise I got no clue. Can you upload the Master.csv you're using?
You can use http://www.mediafire.com/file/vsyh9ngb5 ... BSdata.zip it contains only the text data packaged for Deckbuilder.
I check and I didn't include Evolving Wilds in titleToLandColors.csv so you need to add it like
Evolving Wilds,C
I also checked other non mana giving lands and they're allso missing from WWK onward I think.
You can use http://www.mediafire.com/file/vsyh9ngb5 ... BSdata.zip it contains only the text data packaged for Deckbuilder.
I check and I didn't include Evolving Wilds in titleToLandColors.csv so you need to add it like
Evolving Wilds,C
I also checked other non mana giving lands and they're allso missing from WWK onward I think.
Re: HQ Card generator 8.x
by telengard » 28 Feb 2011, 02:58
I've uploaded it here:Snacko wrote:Maybe something went wrong with newlines, otherwise I got no clue. Can you upload the Master.csv you're using?
You can use http://www.mediafire.com/file/vsyh9ngb5 ... BSdata.zip it contains only the text data packaged for Deckbuilder.
I check and I didn't include Evolving Wilds in titleToLandColors.csv so you need to add it like
Evolving Wilds,C
I also checked other non mana giving lands and they're allso missing from WWK onward I think.
http://home.comcast.net/~bsturk/Master.csv
Thanks for the tip on the land colors. That will get ROE going for me.

I'll try out that link tonight, thanks!
~telengard
Author of Dreamblade:
viewtopic.php?f=51&t=1215
viewtopic.php?f=51&t=1215
-
telengard - DEVELOPER
- Posts: 383
- Joined: 23 May 2009, 23:04
- Has thanked: 5 times
- Been thanked: 30 times
Re: HQ Card generator 8.x
by Snacko » 28 Feb 2011, 14:49
Ah I got it now why it wasn't working because the script expects that fields are comma separated and multiline and commas are encapsulated in quotation marks.
example:
example:
- Code: Select all
"Name";"Edition";"Version";"ID";"Color";"Cost";"Type";"Text";"Power";"Toughness";"Flavor";"Rarity";"Artist";"Number";"Mana";"MtgEncID";"Internal";"TypeIndex";"P/T"
"""Ach! Hans, Run!""";"UNH";"";"";"Gld";"2RRGG";"Enchantment";"At the beginning of your upkeep, you may say ôAch! Hans, run! Itĺs the . . .ö and name a creature card. If you do, search your library for the named card, put it into play, then shuffle your library. That creature has haste. Remove it from the game at end of turn.";"";"";"";"R";"Quinton Hoover";"116";"6";"";"<T2:B><EX:B><T15:B><T1:B>";"5";""
"_____";"UNH";"";"";"U";"1U";"Creature - Shapeshifter";"%1: This cardĺs name becomes the name of your choice. Play this ability anywhere, anytime.";"1";"1";"{1}: This cardĺs flavor text becomes the flavor text of your choice. (This ability doesnĺt work because itĺs flavor text, not rules text (but neither does this reminder text, so you figure it out).)";"U";"Ron Spears";"23";"2";"";"<T2:1><EX:1><T15:1><T1:1>";"3";"1/1"
"1996 World Champion";"WLD";"";"";"Gld";"WUBRG";"Legendary Creature";"Cannot be the targets of spells or effects.
World Champion has power and toughness equal to the life totals of target opponent.
%0: Discard your hand to search your library for 1996 World Champion and reveal it to all players. Shuffle your library and put 1996 World Champion on top of it. Use this ability only at the beginning of your upkeep, and only if 1996 World Champion is in your library.";"*";"*";"It takes great sacrifice to make it to the top.";"";"Christopher Rush";"";"5";"";"<T2:1><EX:1><T15:1><T1:1>";"3";"*/*"
Who is online
Users browsing this forum: No registered users and 5 guests