It is currently 19 Feb 2020, 16:03
   
Text Size

Magic Data

General Discussion of the Intricacies

Moderator: CCGHQ Admins

Re: Magic Data

Postby Marek14 » 09 Jul 2010, 04:49

Well, it took a bit longer, but Magic 2011 is now on Gatherer, together with Archenemy rarities and schemes (but without the promo schemes, it seems).
Marek14
Tester
 
Posts: 2671
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 267 times

Re: Magic Data

Postby Arch » 09 Jul 2010, 17:09

Data / Text

They've added Vanguard as well.

There might be some duplicates in this release (due to previously injected cards now being available) and the set info was not correct on some of those cards (don't know if I managed to fix all of them). I've also been revamping my program. I'll make another update in a couple of days when I get things sorted out.
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 » 11 Jul 2010, 14:02

The Phyrexia vs. The Coalition tokens should be removed from the file.
Marek14
Tester
 
Posts: 2671
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 267 times

Re: Magic Data

Postby Arch » 12 Jul 2010, 19:28

So I've ported my old Python program to Clojure for no particular reason other than me liking that language. It's not completely done yet but I don't know if I'll get time to work on it before the weekend so I'm posting what I have at this time.

Improvements
  • Includes Unglued and Unhinged
  • Mana representation now consistent (should always be using curly braces if any)
  • Reminder text is held separate from rules-text

This means the reminder text is also removed from the text-file. I felt like it was cleaner that way. Tell me if you want it back, Marek.

Not done
  • Half-mana/power/toughness is not consistent
  • Vanguard is handled as a single set in gatherer, actual "release" is given as flavor text
  • Cards not in gatherer are not included
  • My tests for the data has not been ported yet

The cards that are missing from gatherer or that are not parsed correctly:

About the tokens; I saw that they had actually changed the name on some of them so there where probably more than just the PvC tokens in the previous release. All the tokens should be gone in this release though.

Here's the zip. It's all in one file now instead of two. Will post another update this weekend.
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 » 12 Jul 2010, 21:16

Well, I found that the reminder text has its uses in the complete file (you don't always remember all the definitions, and the reminder text means you don't have to cross-check).

I'd prefer to have two versions of the file, though, one with Un-cards, and one without. The Un-cards have texts that are not updated, it spoils the look sometimes :)
Marek14
Tester
 
Posts: 2671
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 267 times

Re: Magic Data

Postby Marek14 » 14 Jul 2010, 06:06

Gottlieb had a rules update article today -- this Friday should see Gatherer update with Oracle changes, so you might want to delay the update if necessary to make sure you'll get them :)
Marek14
Tester
 
Posts: 2671
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 267 times

Re: Magic Data

Postby BlackMamba » 18 Jul 2010, 23:53

Hi, I'm the developer of Mox and I'm thinking about using your data as the data source for Mox. I think it's a great initiative and could replace my current oracle text parser (not even sure the latest sets have oracle text files).

I was wondering why you didn't separate types, subtypes and supertypes? I need these distinctions (Mox is a rule-enforcing software). Having these directly in the data source would avoid having to "guess" whether a type is a super or sub type. I realize that the number of super types and types are limited and hence I could categorize them on my side, but I was curious as whether this would interest you or other MTG software developers.

Thanks!
BlackMamba
 
Posts: 23
Joined: 17 Sep 2008, 01:24
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Data

Postby MageKing17 » 19 Jul 2010, 01:53

BlackMamba wrote:I was wondering why you didn't separate types, subtypes and supertypes?
Because the best way is to keep lists of supertypes, types, and subtypes, just like the comprehensive rules do. Besides, you only need to distinguish between types and supertypes (subtypes are distinct automatically by being on the other side of the dash) and there are only four supertypes (Legendary, Basic, Snow, World), making it actually quite easy to split them all up.
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Magic Data

Postby BlackMamba » 19 Jul 2010, 02:07

MageKing17 wrote:Subtypes are distinct automatically by being on the other side of the dash
AFAIK, this information is not available from the xml data (the "position" of the dash"). However, I do understand that there's a limited list of supertypes and types and thus parsing is not hard. I'll work around that (had to do it when parsing oracle text anyway).

Kudos!
BlackMamba
 
Posts: 23
Joined: 17 Sep 2008, 01:24
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Data

Postby MageKing17 » 19 Jul 2010, 04:07

BlackMamba wrote:
MageKing17 wrote:Subtypes are distinct automatically by being on the other side of the dash
AFAIK, this information is not available from the xml data (the "position" of the dash").
I wouldn't use an XML file for data anyway, but I guess that's just personal taste.
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Magic Data

Postby Marek14 » 19 Jul 2010, 04:42

The Oracle update should be up by now.

Gottlied actually discussed whether Oracle should have reminder text or not in his article. I side with him that it should have reminder text -- it's easy to remember rules for all abilities in the set, not so easy to do it for all abilities in the game.

As I said, I'd like a version without Un-cards (at least until they start updating them to new wording). They spoil the experience :)
Marek14
Tester
 
Posts: 2671
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 267 times

Re: Magic Data

Postby Arch » 19 Jul 2010, 16:34

BlackMamba wrote:I was wondering why you didn't separate types, subtypes and supertypes?
This has already been answered but here's my rationale: The dash was removed since it is not "pure"; meaning it's not something I'd use in a data representation in any of my imaginary future projects. I consider the method already mentioned here superior (knowing supertype, type and figuring out subtypes) as it doesn't rely on meta-data. The dash that is.

MageKing17 wrote:I wouldn't use an XML file for data anyway, but I guess that's just personal taste.
I totally agree! XML is a very verbose, slow to parse format. The reason this data is in XML is because parsers are available for probably every language that anyone might ever think about developing magic applications in. It's also hierarchical which was one of my requirements. JSON was a competitor but lack of support in the java standard library knocked that one out.

I would not use this data directly but rather convert it into a format more suited for reading by the language I choose to develop in, or at least partition it into manageable chuncks.

Onto buisness; gatherer has not been updated as far as I can tell.

For this release I've removed the Un* cards. I was a bit naive at my first go and underestimated the number of parsing exceptions that those two sets could introduce. I decided to remove them until I can go over them properly instead of presenting half-assed data.

I've also re-added the reminder text to the text-version.

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

Re: Magic Data

Postby silly freak » 20 Jul 2010, 22:08

the trickiest part about the typeline is mapping subtypes to their corresponding card type, which is very relevant for rules-enforced games...
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: Magic Data

Postby Marek14 » 21 Jul 2010, 07:06

I'm not sure about that. Most of type lists are pretty short, the only long one is list of creature types.
So you can check for the other subtypes (and only those that correspond to a type the card has), and then put the rest in creature types.

For mono-typed cards, you can even skip this step and just put all subtypes in one category automatically.
Marek14
Tester
 
Posts: 2671
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 267 times

Re: Magic Data

Postby MageKing17 » 21 Jul 2010, 10:18

Well, Planeswalker types have stopped being a super-short list, but you can virtually guarantee the only subtypes printed on Planeswalkers will be Planeswalker types, and they'll only be printed on Planeswalkers. So... yeah.
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

PreviousNext

Return to Magic Rules Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 2 guests

Login Form