The Last Homely House

Middle-Earth => Chamber of Mazarbul => Topic started by: eomund on June 25, 2010, 05:44:29 PM

Title: Custom Cards in GCCG
Post by: eomund on June 25, 2010, 05:44:29 PM
I was reading one of Thranduil's threads the other day, and people were mentioning how they can't playtest since they don't play IRL. So I decided to check out the xml docs with the cards for GCCG, and the encoding is pretty straightforward; there's a bit of set information at the top and bottom, and each card is basically a list of attributes with a whole bunch of extra text thrown in so that GCCG knows which number is for strength, vitality, which line is the type line, which is the name, etc.

I doubt anyone would want to type out the extra text over and over again, but it would be easy to write a short program that would take in a text document (formatted the way you like), and spit out the correctly formatted GCCG file, which would allow for playtesting on GCCG. I'd be perfectly happy to write something like that for anyone interested, but I'd need to see a cardlist first in order to see how its formatted (because my program will need to be able to identify between the different numbers and text lines by context).

If you're interested, feel free to PM me or to post your cardlist as an attachment on this thread. I can then write and send back a program (give me a week or so, as I'm not free 24/7) in Python that will read your cardlist and spit out at GCCG-formatted xml file, along with the xml file from the cardlist you send me.

If you have any questions and/or are interested in getting a program written up, just reply to the post or PM me.

Here's how you use the xml file:

.
And here's how you would use the Python (.py) file. You don't have to use it, but it'll make updating the xml file easier since you can edit the text file, run the .py file, and the xml file will be updated.

Title: Re: Custom Cards in GCCG
Post by: Cw0rk on June 25, 2010, 06:02:12 PM
This would be great. Thranduil is probably one of the few persons who can provide you a full cardlist.

Another thing to check would be how to add card pictures on GCCG.

Thank you for working on this!
Title: Re: Custom Cards in GCCG
Post by: chompers on June 25, 2010, 11:28:10 PM
I would love to test some DCs on GCCG.

Thranduil has complete DC sets that would be a heap of fun to test out!

BTW - how will these cards appear on GCCG. Just text in roughly the right place?
Title: Re: Custom Cards in GCCG
Post by: eomund on June 26, 2010, 07:03:43 AM
Adding pictures is pretty straight forward. You create a folder in Gccg -> Graphics and put your pictures in it. My program will automatically look for the folder with the pictures in it to have the same name as the xml file (minus the .xml at the end) and for the pictures to be named "XY.jpg" where X is the set number, and Y is the card number. For example, the original Ruling Ring would be "01001.jpg". This stuff can be changed (except for the folder location), so feel free to request a different naming system.

The more difficult part is making pictures. As far as I know there is no easy way to make card images. Magic set editor has been working on a template for a while now (http://magicseteditor.sourceforge.net/node/901 (http://magicseteditor.sourceforge.net/node/901)), but I don't think anything new has been posted recently.

Without pictures, the cards will look like the ones I've attached to this post - the same as real decipher cards would look if you didn't download pictures for them.
Title: Re: Custom Cards in GCCG
Post by: chompers on June 26, 2010, 03:20:15 PM
Perhaps adding images is too much trouble at this stage ... if this is about playtesting some new cards then they don't need to look like real cards.

Then there has to be people on GCCG willing to do this. Is there any interest to test out some DCs on GCCG? I would be :)

Noone has created a DC cardmaking program for LOTR to my knowledge. It's a shame because most other defunct card games have them, as well as some popular card games that are currently still in production.
Title: Re: Custom Cards in GCCG
Post by: Cw0rk on June 26, 2010, 03:33:04 PM
Quote
Then there has to be people on GCCG willing to do this. Is there any interest to test out some DCs on GCCG? I would be
Yes, I'm sure there would be. Count me in. Even if I hate post-shadows card, I'd be willing to playtest Thranduil's set.

When you add something interesting to GCCG, people will try it. Take the TT League as an example where around 100 games were played of a not so popular format.
Title: Re: Custom Cards in GCCG
Post by: Thranduil on June 26, 2010, 04:12:08 PM
My cardlists on my computer look a bit like this, as they're built for the forums:

Quote from: The Vault of Thranduil
ELVEN (16, 6/5/5)
[1] Agility Renowned [Elven]
Condition • Support Area
Tale.
Skirmish: Discard this condition to make an [Elven] companion strength +1 and resistance +2.
L C 13

[2] •Arwen, The Fairest [Elven]
Companion • Elf
Str: 6
Vit: 3
Res: 7
While Arwen is assigned to a skirmish, each other [Elven] companion is resistance +2.
While you can spot 5 companions with resistance 7 or more (except in the Shadow phase), each Shadow card is twilight cost +1.
“… the light of stars was in her bright eyes, grey as a cloudless night…”
L R 14

[2] •Arwen, Maiden of Rivendell [Elven]
Companion • Elf
Str: 6
Vit: 3
Res: 7
Ranger. Unyielding.
When you play Arwen, you may foresee 2 (look at the top 2 cards of your draw deck; you may place any number of them above or below your draw deck in any order).
L C 15

[2] •Asfaloth, Steed of RIvendell [Elven]
Possession • Mount
Str: +1
Res: +1
Bearer must be an [Elven] companion.
Maneuver: If bearer is Arwen or Glorfindel, exert him or her and discard 2 cards from hand to remove a burden.
“Suddenly into view below came a white horse, gleaming in the shadows, running swiftly.”
L C 16

[4] •Círdan, Lord of Mithlond [Elven]
Companion • Elf
Str: 7
Vit: 4
Res: 7
Unyielding.
To play, spot an [Elven] card.
Each time you foresee a Free Peoples card, you may reveal it to make Círdan strength and resistance +1 until the regroup phase.
“‘What power still remains lies with us, here in Imladris, or with Círdan at the havens, or in Lórien.’”
L U 17

[4] •Elrond, Lord of !Imladris [Elven]
Companion • Elf
Str: 8
Vit: 4
Res: 7
Each other [Elven] companion is resistance +1.
At the start of the maneuver phase, you may exert Elrond to foresee 2 (look at the top 2 cards of your draw deck; place any number of them on top of or beneath your draw deck).
“‘Now, therefore, things shall be openly spoken that have been hidden from all but a few until this day.’”
L U 18

The most up-to-date versions of my cards, however, are in table form (and you can download the pdfs at some of my topics in the Chamber of Mazarbul). I don't mind updating these documents if that's easier, or going from the tables if you can.



And can I say, I'm flattered that you guys think my cards will be worthwhile! What more can a Dream Card maker hope for? O0

Thranduil
Title: Re: Custom Cards in GCCG
Post by: eomund on June 27, 2010, 08:44:39 AM
Thranduil: No matter what version I start with, it would have to be converted to text due to my limited Python knowledge. If the version on the forums is up-to-date, it would be easy enough to copy/paste from there, or if you have the original text file, that would work too. If you can send me a link or attachment later today, I should have some time to work on this tomorrow afternoon.
Title: Re: Custom Cards in GCCG
Post by: Cw0rk on July 03, 2010, 11:01:07 AM
Any recent developpement?
Title: Re: Custom Cards in GCCG
Post by: eomund on July 03, 2010, 04:46:03 PM
Any recent developpement?
Funny you should ask that today ... I believe I have just finished a converter for Thranduil's cards. I don't have his full list (because it's easier to work with 10 cards then 100) but I should be able to post the final xml file within a day of recieving a full card list.

I've attached the xml made from cards I have from him. If people can try it out (see my first post for how), that would be awesome. I'm able to view the cards and use them in a 1-person game, but there was nobody online when I last tried it out, so I don't know how it would interact in a two-person game.
Title: Re: Custom Cards in GCCG
Post by: Not a Zombie on July 03, 2010, 05:29:33 PM
When I tried to bring them into play on the one player table they just showed up as the cardback.
Title: Re: Custom Cards in GCCG
Post by: eomund on July 03, 2010, 08:01:02 PM
When I tried to bring them into play on the one player table they just showed up as the cardback.

Were you able to see them in the deck editor?
Title: Re: Custom Cards in GCCG
Post by: Not a Zombie on July 03, 2010, 10:25:45 PM
Ok, it works when I add it too a deck and play.
Title: Re: Custom Cards in GCCG
Post by: Dimitar on July 14, 2010, 01:21:00 AM
Hello guys I saw that you would like to implement some pictures in GCCG and actually me myself, 1 or 2 years ago played a lot with card making using Photoshop/Paint/MSPowerPoint and so on. So what basically I managed to do is create at least the basic templates for the cards, here some examples: (ooook have no idea how to attach files so I would need your help on this) .

Title: Re: Custom Cards in GCCG
Post by: Cw0rk on July 14, 2010, 04:49:48 PM
Any recent developpement?
Funny you should ask that today ... I believe I have just finished a converter for Thranduil's cards. I don't have his full list (because it's easier to work with 10 cards then 100) but I should be able to post the final xml file within a day of recieving a full card list.

I've attached the xml made from cards I have from him. If people can try it out (see my first post for how), that would be awesome. I'm able to view the cards and use them in a 1-person game, but there was nobody online when I last tried it out, so I don't know how it would interact in a two-person game.
Good news! I'll download the full set when it's going to be available.
Title: Re: Custom Cards in GCCG
Post by: Cw0rk on July 18, 2010, 05:08:16 PM
Here is the full list for Thranduil's set.

http://lotrtcgdb.com/forums/index.php?action=dlattach;topic=4075.0;attach=560
Title: Re: Custom Cards in GCCG
Post by: eomund on July 30, 2010, 04:02:57 PM
Hey guys,

I'm really sorry I haven't gotten this done yet ... I'm taking some classes over the summer, and my workload got a lot heavier than I was expecting towards the end of term. I've got a couple days' break between class and exams, though, so I should hopefully be able to get this up by the end of the weekend.

Just a warning - the formatting from the pdf is surprisingly good, but still not amazing. The first file I create will have a lot of small errors because of that, but I'm hoping to fix the majority of it up over the next few days.
Title: Re: Custom Cards in GCCG
Post by: Cw0rk on July 30, 2010, 04:12:29 PM
Hey guys,

I'm really sorry I haven't gotten this done yet ... I'm taking some classes over the summer, and my workload got a lot heavier than I was expecting towards the end of term. I've got a couple days' break between class and exams, though, so I should hopefully be able to get this up by the end of the weekend.

Just a warning - the formatting from the pdf is surprisingly good, but still not amazing. The first file I create will have a lot of small errors because of that, but I'm hoping to fix the majority of it up over the next few days.

Thanks a lot!
Title: Re: Custom Cards in GCCG
Post by: eomund on August 12, 2010, 09:26:25 AM
Sorry again for not meeting my own timelines ... things just keep coming up and taking me away from this project.

Luckily, I have finally found the time to finish it off! There are three .xml files attached - one for each set in Thranduil's Light and Shadow block. Copy those three files into your Gccg => xml => Lotr folder and add the lines:
Quote
 <cardset source="light.xml"/>
  <cardset source="twilight.xml"/>
  <cardset source="back.xml"/>
to the file Gccg => xml => lotr.xml and you should be able to use the cards in GCCG.

The only problem I know of is that when I run GCCG, the cards from all three sets appear jumbled together into a single set. I'm not going to bother fixing this unless it is affecting people besides me, so please let me know if you experience this (or any other) problem.

Also please post if you notice any typos in the file. There were some errors when I copied the .pdf into a text file, but it's possible I missed a few. They're generally easy to fix, I just don't want to go through and proofread all 360 cards myself.
Title: Re: Custom Cards in GCCG
Post by: Cw0rk on August 12, 2010, 03:33:58 PM
Awesome! I'll download it and try it later.
Title: Re: Custom Cards in GCCG
Post by: Cw0rk on August 12, 2010, 04:52:38 PM
I suggest that if you try it, make a copy of your LOTR.xml file before editing it.

It doesn't work for me. I copied the lines on the LOTR.xml file using MFC Wordpad and I can't open GCCG. I'm getting this as an error:

I/O exception at Document::open(const string&): short read on './xml/Lotr.xml'

I've also tried with the Notepad and I get an almost similar error:

I/O exception at Document::open(const string&): short read on './xml/Lotr/light.xml'

EDIT: When I open another card set file like returnoftheking and compare it to light, back or twilight, I can see several differences in term of tabulation and 'enter's.
Title: Re: Custom Cards in GCCG
Post by: eomund on August 13, 2010, 06:45:27 AM
To the best of my knowledge, xml doesn't pay attention to indentation or enters, so that shouldn't matter.

Could you post your lotr.xml file?
Title: Re: Custom Cards in GCCG
Post by: Cw0rk on August 13, 2010, 12:35:34 PM
To the best of my knowledge, xml doesn't pay attention to indentation or enters, so that shouldn't matter.

Could you post your lotr.xml file?
Well, if your lotr.xml file is working, it would be easier if you post it. I would just have to download it and you wouldn't have to find what is the error in mine.
Title: Re: Custom Cards in GCCG
Post by: eomund on August 14, 2010, 07:59:37 AM
Well, if your lotr.xml file is working, it would be easier if you post it. I would just have to download it and you wouldn't have to find what is the error in mine.

Smart thinking ... mine is now attached.
Title: Re: Custom Cards in GCCG
Post by: Cw0rk on August 14, 2010, 09:29:46 PM
Well, if your lotr.xml file is working, it would be easier if you post it. I would just have to download it and you wouldn't have to find what is the error in mine.

Smart thinking ... mine is now attached.
It still doesn't work for me. I guess that this problem might be caused by the advanced age of my computer.
Title: Re: Custom Cards in GCCG
Post by: Not a Zombie on August 14, 2010, 09:45:04 PM
Works great for me. All the sets have their own tabs, I can see all the cards, it looks good! The GCCG server doesn't recognize them though and takes issues in the one player table, so playing games with them would be odd untill GCCG is updated to allow for them. Its pretty sweet though!
Title: Re: Custom Cards in GCCG
Post by: Thranduil on August 15, 2010, 03:25:20 AM
I'm really excited! I'm just annoyed that I couldn't get GCCG to work on my mac to try for myself...

Let me know how it goes.

Thranduil
Title: Re: Custom Cards in GCCG
Post by: Kralik on August 18, 2011, 08:34:56 AM
Just a quick note here:

Since GCCG is run on the central server, it will have issues with new/extra cards. One of the reasons I hoped that the Valinor Dream Team would work is to develop dream cards that everyone can use. SdA has card sets but not cards hard coded, so you could add new cards in existing sets and play with them as long as both players had the same data file. Lackey works similarly.
Title: Re: Custom Cards in GCCG
Post by: Creator on August 23, 2011, 10:36:45 AM
Adding pictures is pretty straight forward. You create a folder in Gccg -> Graphics and put your pictures in it. My program will automatically look for the folder with the pictures in it to have the same name as the xml file (minus the .xml at the end) and for the pictures to be named "XY.jpg" where X is the set number, and Y is the card number. For example, the original Ruling Ring would be "01001.jpg". This stuff can be changed (except for the folder location), so feel free to request a different naming system.

The more difficult part is making pictures. As far as I know there is no easy way to make card images. Magic set editor has been working on a template for a while now (http://magicseteditor.sourceforge.net/node/901 (http://magicseteditor.sourceforge.net/node/901)), but I don't think anything new has been posted recently.

Without pictures, the cards will look like the ones I've attached to this post - the same as real decipher cards would look if you didn't download pictures for them.

I am in the process of making several cards via photoshop that look almost identical to the real thing. I "blanked out" the templates for most of the cultures so that they are the bare-bones templates. They look almost perfect. I have fonts that are also almost identical to the ones that Decipher uses and am able to create my own cards. I'd be willing to send a few images to you if you're wanting to test this out in GCCG.

Here is an example of a WIP custom card: http://bayimg.com/FajNpaaDk (http://bayimg.com/FajNpaaDk)

Just a quick note here:

Since GCCG is run on the central server, it will have issues with new/extra cards. One of the reasons I hoped that the Valinor Dream Team would work is to develop dream cards that everyone can use. SdA has card sets but not cards hard coded, so you could add new cards in existing sets and play with them as long as both players had the same data file. Lackey works similarly.

It's probably better that way in my case, because I'm editing Decipher's templates, so it might be simpler to just have the cards uploaded only between the players using them, rather than hosting them on the server (for copyright issues).