LackeyCCG

LackeyCCG Forum => Plugins & Plugin Creation Forum => Topic started by: ethanvampirehntr on November 20, 2011, 01:22:29 PM

Title: M:TG (193 theme decks)
Post by: ethanvampirehntr on November 20, 2011, 01:22:29 PM
(If i'm posting this in the wrong forum, tell me and i'll post it there... and sorry! it wouldn't be the first time.)

problem= some people don't wanna build decks... idk why, and idc... kinda just wanna play awesome games of magic the gathering with some of my pals, who are new to magic.
solution= get a whole bunch of theme decks!! so grab the ThemeDecks.zip and unzip in your decks directory in magic... and there u go, nearly 200 (and counting) awesome prebuilt, excellent decks.

Just worked on some python code the other day... been meaning to do this for a while, and NOW i'm finally done. Made a program that uses Wget and magic product-info pages to install all the theme decks into txt files that LackeyCCG can understand. All files are working (tested on Ubuntu 11.10, should work on windows).

one NOTES:
since around the last few theme decks they changed their format of the website... some theme decks do not work..
EDIT (Nov 25..... i'm working on making all the decks work)

Having python3 and wget installed somehow on your machine will be necessary to run the DeckDownloader.py. I'm including a zip of all the theme decks... just because.
To run the deck downloader, just type in cmd or terminal.

# python3 DeckDownloader.py

make sure ListOfThemes.txt is in the same dir.

EDIT (Nov. 23): putting updated DeckDownloader, and List of themes in this post. Fixed the problem with the smart quotes causing tabs (by changing them into normal quotes). I'm also posting a new zip of all the decks, just because.
EDIT (Nov 24): changed subject title.... really no reason. Hopes to create spell checker method with JRJurman in DeckDownloader.py so all 193 theme decks work PERFECTLY
EDIT (Nov 25): made a spell-checking program that makes sure ALL 200-something DECKS WORK PERFECTLY, sooo enjoy those theme decks!... new python file, ListOfThemes, and ThemeDecks.zip.

thanks goes to JRJurman on EXTREME help on the code. you ROCK!

[attachment deleted by admin due to age]
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: Bort on November 20, 2011, 04:25:48 PM
That's cool. I think I'll add this t the plugin download.
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: ethanvampirehntr on November 20, 2011, 08:53:36 PM
I'm gonna upload a new zip with more theme decks... I forgot a couple theme decks that do work with the program.

I'll post later (tomorrow morning probably) all the theme decks with the correct spelling of each card because It probably won't take too long.
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: ethanvampirehntr on November 20, 2011, 08:59:09 PM
Some more deckssss
EDIT(outdated, use themedecks.zip from top post)

[attachment deleted by admin due to age]
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: ethanvampirehntr on November 20, 2011, 09:08:43 PM
If you do include it, credit goes to JRJurman and ethanvampirehntr (myself)... if you credit those kinda things.... doesn't, matter, that, much. AS LONG AS PEOPLE HAVE FUNZ!
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: ethanvampirehntr on November 20, 2011, 09:59:30 PM
Hey, bort... maybe you could answer my question... why is that the " ' " symbols are make tab characters in lackeyCCG, but i look at other decks, they use the " ' " character fine (as it would seem).
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: Trevor on November 21, 2011, 12:00:43 AM
Quote from: ethanvampirehntr on November 20, 2011, 09:59:30 PMwhy is that the " ' " symbols are make tab characters in lackeyCCG, but i look at other decks, they use the " ' " character fine (as it would seem).
Not sure what you're referring to, but that could be confusing over smart quotes and general quotes. They are different. The text I have now only supports general quote characters.

http://www.spd.org/student-outreach/SmartQuotes3.gif
Smart quotes have a left and right.

And Lackey should be able to read smart quotes fine, but it will display them as standard quotes. If you find that not to be the case, let me know and I'll fix it.
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: ethanvampirehntr on November 21, 2011, 12:43:10 AM
Oh then I'll update some of my python code for that. some decks (especially Betrayers of Kamigawa) some of the characters were creating the tab characters.
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: Trevor on November 21, 2011, 12:46:10 AM
Quote from: ethanvampirehntr on November 21, 2011, 12:43:10 AM
Oh then I'll update some of my python code for that. some decks (especially Betrayers of Kamigawa) some of the characters were creating the tab characters.
Oh, so smart quotes in deck lists aren't being read properly?
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: ethanvampirehntr on November 21, 2011, 01:03:26 AM
Yeah... when looking at the file it looks fine. But then when looking in the lackeyCCG file viewer, the card name will have a huge tab in the card name. (I'm looking on how to replace the apostrophe with the smart apostrophe in python... but it's looking, not to good.). Lol, if the Wizards updated there database this wouldn't be such a problem... but I doubt many people are buying theme decks that are nearly a decade old (and older).
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: Trevor on November 21, 2011, 01:23:02 AM
Quote from: ethanvampirehntr on November 21, 2011, 01:03:26 AM
Yeah... when looking at the file it looks fine. But then when looking in the lackeyCCG file viewer, the card name will have a huge tab in the card name. (I'm looking on how to replace the apostrophe with the smart apostrophe in python... but it's looking, not to good.). Lol, if the Wizards updated there database this wouldn't be such a problem... but I doubt many people are buying theme decks that are nearly a decade old (and older).
If you have a deck file that doesn't load, please send it to me so I can make sure things are working as they should.
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: ethanvampirehntr on November 21, 2011, 01:28:16 AM
The deck title works fine. cards like Horobi's Whisper are not loading correctly.

[attachment deleted by admin due to age]
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: ethanvampirehntr on November 23, 2011, 01:16:22 PM
found out what the problem was... If using smart quotes in .txt decks... it will cause a tab. (I initially thought it was the other way around lol). it's fixed and I'm posting all the decks now (top post).
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: Trevor on November 23, 2011, 01:32:15 PM
That file posted with the smart quotes in it should work as intended now, since the latest post earlier this morning. Test it out. I also added a lot more functionality regarding importing other nonstandard characters. I'd be surprised if a card name wasn't properly read now.
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: ethanvampirehntr on November 24, 2011, 01:55:48 PM
because I have nothing better to do thanksgiving break (I really don't lol), I decided to see if I could fix some of the errors of the deckdownloader-thingamajig.

so I took all the cards from the sets folder in lackey, and checked if the cards in the decks downloaded matched up with them. 51 cards printed out... so... I guess I'll be figuring out a way to make a spell checking program in python to fix those cards.

I'm gonna work with JRJurman to create a spell checking method in the deckDownloader.py. I'll post all of this in the top post, as well as a new zip for the theme Decks (btw, just counted, 193 decks).

These are the cards that had errors... although some of them (Knight of Dawn) work perfectly fine.



Apocalypse_Burial.txt   Wax/Wane
Apocalypse_Pandemonium.txt   Life/Death
Apocalypse_Pandemonium.txt   Order/Chaos
Apocalypse_Whirlpool.txt   Fire/Ice
Coldsnap_Kjeldoran Cunning.txt   J?tun Grunt
Coldsnap_Kjeldoran Cunning.txt   J?tun Owl Keeper
Coldsnap_Kjeldoran Cunning.txt   Surging ?ther
Coldsnap_Snowscape.txt   Legions of Lim-D?l
Exodus_White Heat.txt   Knight of Dawn
FutureSight_Fate Blaster.txt   Forsee
FutureSight_Fate Blaster.txt   Spin Into Myth
Invasion_Dismissal.txt   Spite/Malice
Invasion_Heavy Duty.txt   Wax/Wane
Invasion_Spectrum.txt   Wax/Wane
Invasion_Spectrum.txt   Spite/Malice
Invasion_Spectrum.txt   Assault/Battery
Lorwyn_Elementals' Path.txt   ?thersnipe
Lorwyn_Elementals' Path.txt   Ceaseless Scarblades
MercadianMasques_Disruptor.txt   Subterranean Hanger
MercadianMasques_Rebel's Call.txt   Ramosian Sky Marshall
MirrodinBesieged_Doom Inevitable.txt   Caustic Hound
Nemesis_Breakdown.txt   Stronghold Zepplin
Nemesis_Eruption.txt   Chieftan en-Dal
Nemesis_Eruption.txt   Romosian Rally
NewPhyrexia_Feast of Flesh.txt   Caustic Hound
NewPhyrexia_Ravaging Swarm.txt   Corrupted Conscience
Odyssey_One-Two Punch.txt   Rabid Elephants
Odyssey_Pressure Cooker.txt   Halbardier
Onslaught_Devastation.txt   ?ther Charge
Planeshift_Barrage.txt   Assault/Battery
PlanarChaos_Endless March.txt   Soltari PRiest
PlanarChaos_Endless March.txt   Dead//Gone
PlanarChaos_Ixidor's Legacy.txt   Shaper PArasite
Planechase_Elemental Thunder.txt   Assault/Battery
Planechase_Strike Force.txt   Order/Chaos
Planeshift_Scout.txt   Irregation Ditch
Planeshift_Scout.txt   Rampart Elephant
Prophecy_Pummel.txt   Jolreal's Favor
Prophecy_Slither.txt   Keldon Berskerker
ScarsOfMirrodin_Relic Breaker.txt   idda Scrapmelter
Seventh_Armada.txt   Standby Troops
Seventh_Way Wild.txt   Gorilla Chieftan
Stronghold_Call of the Kor.txt   Knight of Dawn
Stronghold_The Spikes.txt   Fanning The Flames
Tempest_Deep Freeze.txt   Knight of Dawn
Tempest_Deep Freeze.txt   Clouchaser Eagle
Tempest_The Flames of Rath.txt   Searing Torch
Tempest_The Flames of Rath.txt   Gobin Bombardment
UrzasDestiny_Battle Surge.txt   ?ther Sting
Worldwake_Mysterious Realms.txt   ?ther Tradewinds
Zendikar_Pumped Up.txt   ?ther Figment
Title: Re: M:TG (193 theme decks downloader)
Post by: ethanvampirehntr on November 24, 2011, 03:36:40 PM
hey Trevor,
so JRJurman and I are making good progress with the spell checker program. It's nearly done and already incorporated with DeckDownloader.py . One small problem tho. In the sets folder in the magic plugin both planechase.txt and zendikarblock.txt have a unicode character that cannot be read in utf8. (the spell checking program uses the sets folder as a dictionary of card names). To fix this, we had to open and save those files in gedit (a notepad like program for linux) and then it just removed the unknown unicode character. I don't know where the character is specifically, but if this spell checking program is going to be incorperated into the DeckDownloader, people will need change (or someone will need to update) those files, without the weird character.
Title: Re: M:TG (ALL, nearly, theme decks install)
Post by: Trevor on November 24, 2011, 05:57:46 PM
Quote from: ethanvampirehntr on November 24, 2011, 01:55:48 PM
because I have nothing better to do thanksgiving break (I really don't lol), I decided to see if I could fix some of the errors of the deckdownloader-thingamajig.

so I took all the cards from the sets folder in lackey, and checked if the cards in the decks downloaded matched up with them. 51 cards printed out... so... I guess I'll be figuring out a way to make a spell checking program in python to fix those cards.

I'm gonna work with JRJurman to create a spell checking method in the deckDownloader.py. I'll post all of this in the top post, as well as a new zip for the theme Decks (btw, just counted, 193 decks).

These are the cards that had errors... although some of them (Knight of Dawn) work perfectly fine.



Apocalypse_Burial.txt   Wax/Wane
Apocalypse_Pandemonium.txt   Life/Death
Apocalypse_Pandemonium.txt   Order/Chaos
Apocalypse_Whirlpool.txt   Fire/Ice
Coldsnap_Kjeldoran Cunning.txt   J?tun Grunt
Coldsnap_Kjeldoran Cunning.txt   J?tun Owl Keeper
Coldsnap_Kjeldoran Cunning.txt   Surging ?ther
Coldsnap_Snowscape.txt   Legions of Lim-D?l
Exodus_White Heat.txt   Knight of Dawn
FutureSight_Fate Blaster.txt   Forsee
FutureSight_Fate Blaster.txt   Spin Into Myth
Invasion_Dismissal.txt   Spite/Malice
Invasion_Heavy Duty.txt   Wax/Wane
Invasion_Spectrum.txt   Wax/Wane
Invasion_Spectrum.txt   Spite/Malice
Invasion_Spectrum.txt   Assault/Battery
Lorwyn_Elementals' Path.txt   ?thersnipe
Lorwyn_Elementals' Path.txt   Ceaseless Scarblades
MercadianMasques_Disruptor.txt   Subterranean Hanger
MercadianMasques_Rebel's Call.txt   Ramosian Sky Marshall
MirrodinBesieged_Doom Inevitable.txt   Caustic Hound
Nemesis_Breakdown.txt   Stronghold Zepplin
Nemesis_Eruption.txt   Chieftan en-Dal
Nemesis_Eruption.txt   Romosian Rally
NewPhyrexia_Feast of Flesh.txt   Caustic Hound
NewPhyrexia_Ravaging Swarm.txt   Corrupted Conscience
Odyssey_One-Two Punch.txt   Rabid Elephants
Odyssey_Pressure Cooker.txt   Halbardier
Onslaught_Devastation.txt   ?ther Charge
Planeshift_Barrage.txt   Assault/Battery
PlanarChaos_Endless March.txt   Soltari PRiest
PlanarChaos_Endless March.txt   Dead//Gone
PlanarChaos_Ixidor's Legacy.txt   Shaper PArasite
Planechase_Elemental Thunder.txt   Assault/Battery
Planechase_Strike Force.txt   Order/Chaos
Planeshift_Scout.txt   Irregation Ditch
Planeshift_Scout.txt   Rampart Elephant
Prophecy_Pummel.txt   Jolreal's Favor
Prophecy_Slither.txt   Keldon Berskerker
ScarsOfMirrodin_Relic Breaker.txt   idda Scrapmelter
Seventh_Armada.txt   Standby Troops
Seventh_Way Wild.txt   Gorilla Chieftan
Stronghold_Call of the Kor.txt   Knight of Dawn
Stronghold_The Spikes.txt   Fanning The Flames
Tempest_Deep Freeze.txt   Knight of Dawn
Tempest_Deep Freeze.txt   Clouchaser Eagle
Tempest_The Flames of Rath.txt   Searing Torch
Tempest_The Flames of Rath.txt   Gobin Bombardment
UrzasDestiny_Battle Surge.txt   ?ther Sting
Worldwake_Mysterious Realms.txt   ?ther Tradewinds
Zendikar_Pumped Up.txt   ?ther Figment
A card with a name like "?ther" or "J?tun" should import correctly since I posted the latest Lackey. Let me know if you find that not to be the case.
Title: Re: M:TG (193 theme decks downloader)
Post by: Trevor on November 24, 2011, 06:01:25 PM
Quote from: ethanvampirehntr on November 24, 2011, 03:36:40 PM
hey Trevor,
so JRJurman and I are making good progress with the spell checker program. It's nearly done and already incorporated with DeckDownloader.py . One small problem tho. In the sets folder in the magic plugin both planechase.txt and zendikarblock.txt have a unicode character that cannot be read in utf8. (the spell checking program uses the sets folder as a dictionary of card names). To fix this, we had to open and save those files in gedit (a notepad like program for linux) and then it just removed the unknown unicode character. I don't know where the character is specifically, but if this spell checking program is going to be incorperated into the DeckDownloader, people will need change (or someone will need to update) those files, without the weird character.
Give me a link to this troublesome character. I will see if I can get Lackey to import it as something usable, or at least gracefully ignore it.
Title: Re: M:TG (193 theme decks downloader)
Post by: ethanvampirehntr on November 25, 2011, 12:17:23 AM
these two files... I found the unicode error... in the last line of the code, 43, the words "can't" has a weird character where " ' " is. I don't know where the problem is in the zendikarblock.txt... it's over 600 lines >.<.

btw, spell checker is very very nearly done, wishes Wizards Of the Coast had the community support that lackeyCCG does.

[attachment deleted by admin due to age]
Title: Re: M:TG (193 theme decks downloader)
Post by: ethanvampirehntr on November 25, 2011, 02:17:44 AM
OK it is finished. 193 decks, perfect spelling for lackeyCCG (using the lackeyCCG card database).... and all is well. I don't know what to say.... ummmm, wizards of the coast needs to update their database... THAT WOULDA HELPED.
oh i'm posting the new python DeckDownloader and ThemeDecks.zip in the main post.
The DeckDownloader now needs to be in the magic plugins folder (next to the sets folder- where it spell checks, and next to a decks folder- where it creates the new decks).

If anymore updates need to be made, or it's not working, message back, or pm me.
I still need to get the new sets to work... i guess i'll do it tomorrow... or sometime within the next week or so.

Trevor, here is a zendikarblock.txt that does not have a weird unicode character in it. I used gedit to save the file without the unicode character.
EDIT: Trevor, found the error, in line 524 and 461 there is a unicode error in zendikarblock... not the one I attached here, but the one that comes in the lackeyCCG magic plugin (magic/sets/zedikarblock.txt)

[attachment deleted by admin due to age]
Title: Re: M:TG (193 theme decks)
Post by: Trevor on November 27, 2011, 07:16:34 AM
I don't make that plugin by the way. I was just interested because of the character parsing.
Title: Re: M:TG (193 theme decks)
Post by: ethanvampirehntr on November 27, 2011, 12:02:21 PM
ah, well... ok thanks anyway. i think i'll try to contact the people more involved with magic plugin, versus just lackeyccg in general. thanks for your help tho Trevor!
Title: Re: M:TG (193 theme decks)
Post by: Warmacblu on May 25, 2013, 09:42:09 PM
Hi all, I am fairly new to use LackeyCCG and want to download all of the theme decks at once but am unsure how to run DeckDownloader.py.

Thanks for any help.