Magic Data
General Discussion of the Intricacies
Moderator: CCGHQ Admins
Re: Magic Data
by Arch » 13 May 2013, 17:39
http://dl.dropbox.com/u/2771470/mtg-dat ... -05-13.zip
Bug caused all planeswalker 0/X cost abilities to be like that. Fixed.
Bug caused all planeswalker 0/X cost abilities to be like that. Fixed.
Re: Magic Data
by proud » 16 May 2013, 14:45
I have posted JSON data for all Magic cards (except for the Un-sets).
Let me know if you spot any errors.
Warning: These are large files. (cards.json is over 5 MB.)
Direct link: All playable cards.
Direct link: Planes, Schemes and Vanguard cards.
Verse project:
https://github%Ecom/ancestral/Verse
(Because the forums do not like me posting URLs, the %2E is actually a percent-encoded character for a dot. These links should work for everyone, except in Firefox you’ll need to click in the address bar and press return. Moderators: Can you help with this?)
Let me know if you spot any errors.
Warning: These are large files. (cards.json is over 5 MB.)
Direct link: All playable cards.
Direct link: Planes, Schemes and Vanguard cards.
Verse project:
https://github%Ecom/ancestral/Verse
(Because the forums do not like me posting URLs, the %2E is actually a percent-encoded character for a dot. These links should work for everyone, except in Firefox you’ll need to click in the address bar and press return. Moderators: Can you help with this?)
aka ancestral, mproud
MTG.Design
MTG.Design
Re: Magic Data
by Huggybaby » 17 May 2013, 16:49
Don't worry, most of us can figure out whether you added a space or something else to post a link. Anyway, link-posting restrictions are lifted after you've posted five times.
-
Huggybaby - Administrator
- Posts: 3226
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 741 times
- Been thanked: 601 times
Re: Magic Data
by MageKing17 » 17 May 2013, 20:36
Looks interesting, however... "Verse is a grammar used for parsing rules and validating MTG cards." Clearly it just parses and validates an Oracle spoiler at the moment, no? If you ever do figure out parsing rules text (and not just a small subset, like my hackish solution does), I would be very keen to see the results...proud wrote:I have posted JSON data for all Magic cards (except for the Un-sets).
Let me know if you spot any errors.
Warning: These are large files. (cards.json is over 5 MB.)
Direct link: All playable cards.
Direct link: Planes, Schemes and Vanguard cards.
Verse project:
https://github%Ecom/ancestral/Verse
(Because the forums do not like me posting URLs, the %2E is actually a percent-encoded character for a dot. These links should work for everyone, except in Firefox you’ll need to click in the address bar and press return. Moderators: Can you help with this?)
-
MageKing17 - Programmer
- Posts: 473
- Joined: 12 Jun 2008, 20:40
- Has thanked: 5 times
- Been thanked: 9 times
Re: Magic Data
by randian » 17 May 2013, 20:52
I like the JSON list, except for the fact that there's no delimiter between the set name and rarity. Makes extracting those a pain.
Any plans for a JSON version of the metainfo?
Any plans for a JSON version of the metainfo?
- randian
- Posts: 15
- Joined: 05 Jun 2012, 17:30
- Has thanked: 0 time
- Been thanked: 0 time
Re: Magic Data
by melvin » 18 May 2013, 02:16
@proud: Thanks for posting the JSON data. Somehow I manage to miss your Verse project while doing research on a rules parser based on Parsing Expression Grammar. Do you have a PEG grammar for parsing rules text?
I also worked on a rules parser based on PEG in the hope of making it easier to add cards to Magarena. The current version of the grammar is available at https://code.google.com/p/magarena/sour ... ar/mtg.peg This is written for the Mouse, a Java PEG parser generator, http://mousepeg.sourceforge.net/
The grammar is able to parse 9941/21682 ~ 46% of all rules text in the game, where one line of rules text is one "<rule>...</rule>" block in Arch's cards.xml
I also worked on a rules parser based on PEG in the hope of making it easier to add cards to Magarena. The current version of the grammar is available at https://code.google.com/p/magarena/sour ... ar/mtg.peg This is written for the Mouse, a Java PEG parser generator, http://mousepeg.sourceforge.net/
The grammar is able to parse 9941/21682 ~ 46% of all rules text in the game, where one line of rules text is one "<rule>...</rule>" block in Arch's cards.xml
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Magic Data
by proud » 18 May 2013, 18:08
Agreed, it would be nice to have them separated. Certainly doable. Perhaps I'll need to make a list of objects with set and rarity keys (as some sets have cards as a different rarity).randian wrote:I like the JSON list, except for the fact that there’s no delimiter between the set name and rarity. Makes extracting those a pain.
Any plans for a JSON version of the metainfo?
EDIT: Done. Files have been updated accordingly.
That’s fantastic! I missed your project as well! I will certainly have to see what you’ve got.melvin wrote:@proud: Thanks for posting the JSON data. Somehow I manage to miss your Verse project while doing research on a rules parser based on Parsing Expression Grammar. Do you have a PEG grammar for parsing rules text?
I also worked on a rules parser based on PEG in the hope of making it easier to add cards to Magarena. The current version of the grammar is available at <url> This is written for the Mouse, a Java PEG parser generator, <url>
The grammar is able to parse 9941/21682 ~ 46% of all rules text in the game, where one line of rules text is one "<rule>...</rule>" block in Arch's cards.xml
Verse is still a work in progress. (So don’t hold your breath!) I just wanted to share the JSON files for now, but yes, rules parsing is next, and what I want to do is return objects with saved variables about the cards. We’ll see, but thanks for the support.
aka ancestral, mproud
MTG.Design
MTG.Design
Re: Magic Data
by Arch » 07 Jul 2013, 13:52
This problem existed for all tokens with simple names. Fixed for next release.
Re: Magic Data
by friarsol » 10 Jul 2013, 00:26
Hey Arch, looks like M14 is up on Gatherer a few hours early.
http://gatherer.wizards.com/Pages/Searc ... nced&set=|[%22Magic%202014%20Core%20Set%22]
http://gatherer.wizards.com/Pages/Searc ... nced&set=|[%22Magic%202014%20Core%20Set%22]
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Magic Data
by skibulk » 10 Jul 2013, 14:58
Does anybody have old database text from Gatherer? It seems that some older sets have oracle text under their "Display: Printed" tab, which is a fallacy. I wonder if the real text could be salvaged from an old database... If somebody posts an archive of versioned extracts (i.e. per set or year extracted), I can parse out the original text if it is present.
-
skibulk - HQ Team Member
- Posts: 995
- Joined: 19 Jul 2010, 20:34
- Location: Northeast USA
- Has thanked: 379 times
- Been thanked: 335 times
Re: Magic Data
by Arch » 11 Jul 2013, 17:26
Some stuff is breaking (double, special cards) and I don't have time to look at it right now. Should have something up this weekend though.friarsol wrote:Hey Arch, looks like M14 is up on Gatherer a few hours early.
http://gatherer.wizards.com/Pages/Searc ... nced&set=|[%22Magic%202014%20Core%20Set%22]
Earliest I have is http://dl.dropbox.com/u/2771470/mtg-data-2013-03-10.zipskibulk wrote:Does anybody have old database text from Gatherer? It seems that some older sets have oracle text under their "Display: Printed" tab, which is a fallacy. I wonder if the real text could be salvaged from an old database... If somebody posts an archive of versioned extracts (i.e. per set or year extracted), I can parse out the original text if it is present.
I'll fix it.Marek14 wrote:Breaking//Entering has wrong mana cost.
Return to Magic Rules Engine Programming
Who is online
Users browsing this forum: No registered users and 3 guests