It is currently 05 Jul 2025, 07:50
   
Text Size

Magic Data

General Discussion of the Intricacies

Moderator: CCGHQ Admins

Re: Magic Data

Postby 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.
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby Marek14 » 13 May 2013, 18:53

-X abilities don't have brackets.
Marek14
Tester
 
Posts: 2772
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Magic Data

Postby Arch » 14 May 2013, 18:13

User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby 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?)
aka ancestral, mproud
MTG.Design
proud
 
Posts: 68
Joined: 21 Apr 2010, 10:50
Has thanked: 6 times
Been thanked: 23 times

Re: Magic Data

Postby 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.
User avatar
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

Postby MageKing17 » 17 May 2013, 20:36

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?)
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...
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Magic Data

Postby 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?
randian
 
Posts: 15
Joined: 05 Jun 2012, 17:30
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Data

Postby 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
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Magic Data

Postby proud » 18 May 2013, 18:08

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?
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).
EDIT: Done. Files have been updated accordingly.

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
That’s fantastic! I missed your project as well! I will certainly have to see what you’ve got.


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
proud
 
Posts: 68
Joined: 21 Apr 2010, 10:50
Has thanked: 6 times
Been thanked: 23 times

Re: Magic Data

Postby Marek14 » 07 Jul 2013, 05:59

There's an entry for Beast token from a duel deck.
Marek14
Tester
 
Posts: 2772
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Magic Data

Postby Arch » 07 Jul 2013, 13:52

This problem existed for all tokens with simple names. Fixed for next release.
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby 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]
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Magic Data

Postby 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.
User avatar
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

Postby Marek14 » 11 Jul 2013, 13:16

Breaking//Entering has wrong mana cost.
Marek14
Tester
 
Posts: 2772
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Magic Data

Postby Arch » 11 Jul 2013, 17:26

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]
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.

skibulk 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.
Earliest I have is http://dl.dropbox.com/u/2771470/mtg-data-2013-03-10.zip

Marek14 wrote:Breaking//Entering has wrong mana cost.
I'll fix it.
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

PreviousNext

Return to Magic Rules Engine Programming

Who is online

Users browsing this forum: No registered users and 3 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 10 minutes)
Most users ever online was 5050 on 26 Jun 2025, 06:02

Users browsing this forum: No registered users and 3 guests

Login Form