Page 21 of 31

Re: Magic Data

PostPosted: 22 Jan 2013, 22:28
by randian
In language_english.xml, the type entry for Abattoir Ghoul says "Creature â~@~T Zombie", not "Creature - Zombie". There are no doubt other instances of a borked '-' character.

Re: Magic Data

PostPosted: 22 Jan 2013, 23:07
by randian
I think I have a better way of handling flip/dual cards.

1) The way they're combined in language_*.xml, by overloading the rulelist, is especially nasty. You also don't want a card to have two instances of the same set in its meta information, as they do now. Just say no to both.

2) Have completely separate entries for each half e.g. one "Assault" entry and one "Battery" entry each in card.xml, meta.xml, and language_*.xml. There is no card called "Assault // Battery".

3) How do you know what cards are flip/dual cards? It's a derived property, just like the total card count is for a set. If two cards have different names but have the same Set/Number pair, you know they're two halves of a flip/dual card. Should a triple card be introduced, the scheme works without change.

4) To derive a correct count for a set, deduplicate the card numbers before counting.

5) To find which cards are duals, fetch the card numbers and select ones with duplicates. Easy in perl or mysql.

Re: Magic Data

PostPosted: 23 Jan 2013, 02:08
by friarsol
Looks like Gatecrash is up on Gatherer. Thanks arch

http://gatherer.wizards.com/Pages/Searc ... .aspx?set=[%22Gatecrash%22]

Re: Magic Data

PostPosted: 23 Jan 2013, 12:52
by Arch
The Abattoir Ghoul is due to your editor/viewer. The sign there is a long dash and will not be displayed correctly if your viewer can handle or isn't set to UTF-8. You probably have a similar problem with for instance Aether Vial.

The presentation in language_english.xml is a bug. (Also exists in cards.xml.) Gatherer has a bunch of different way to present multi-part cards. The old app handled this but I forgot to move this part into the new app. (Probably needs a re-write to function with the new datastructures/processing.) Will fix this but not sure if it'll be fixed in time for next release. (But should come a new release shortly after to fix this.) The correct format is used by for instance "Reckless Waif".

The data will not be up until tomorrow night at the earliest. With the speeds I normally get from gatherer it will take 12+ hours to just download all the stuff that's needed.

The text version will take little bit longer still. I'll probably move this to a separate project and release it as an independent package.

Re: Magic Data

PostPosted: 23 Jan 2013, 15:04
by Ark
You might want to hold off on getting data from Gatherer for GTC. There are about 30+ cards (not in GTC though) where the mana costs was changed to 3U instead of the proper cost, and the rulings for GTC aren't up yet.

Re: Magic Data

PostPosted: 23 Jan 2013, 18:35
by randian
Arch wrote:The Abattoir Ghoul is due to your editor/viewer. The sign there is a long dash and will not be displayed correctly if your viewer can handle or isn't set to UTF-8.
Why have some cards with ASCII dash, some with UTF-8 long dash? Why not make them all consistent?
Arch wrote:The presentation in language_english.xml is a bug. (Also exists in cards.xml.) The correct format is used by for instance "Reckless Waif".
I assume you noticed that dual cards are duplicated. That is, there are two copies of "Reckless Waif multi Merciless Predator" in cards.xml, language_*.xml, and meta.xml. Is there supposed to be a second, "Merciless Predator multi Reckless Waif" instead?

I still don't see what the "multi" construct gains you. It needlessly complicates the logic.

Re: Magic Data

PostPosted: 24 Jan 2013, 11:13
by Arch
Ark wrote:You might want to hold off on getting data from Gatherer for GTC. There are about 30+ cards (not in GTC though) where the mana costs was changed to 3U instead of the proper cost, and the rulings for GTC aren't up yet.
Good to know. I'll run it anyways. I haven't been exercising that part of the program that much yet so I want to see that I don't run out of memory or something like that.

randian wrote:
Arch wrote:The Abattoir Ghoul is due to your editor/viewer. The sign there is a long dash and will not be displayed correctly if your viewer can handle or isn't set to UTF-8.
Why have some cards with ASCII dash, some with UTF-8 long dash? Why not make them all consistent?
The language files were added just recently and are probably pretty far from great. If you want a decently tested piece of magic data you should look at cards.xml instead. I don't know where the language files will go in the future, the only thing that's clear is that they have lower priority than cards.xml. Regarding the inconsistencies in general I'll have to direct you to wizards.

randian wrote:
Arch wrote:The presentation in language_english.xml is a bug. (Also exists in cards.xml.) The correct format is used by for instance "Reckless Waif".
I assume you noticed that dual cards are duplicated. That is, there are two copies of "Reckless Waif multi Merciless Predator" in cards.xml, language_*.xml, and meta.xml. Is there supposed to be a second, "Merciless Predator multi Reckless Waif" instead?
Multiples were reported here: viewtopic.php?f=27&t=1347&start=285#p107998 The format is (was) defined here https://github.com/karmag/loa/blob/ec0e ... format.txt

randian wrote:I still don't see what the "multi" construct gains you. It needlessly complicates the logic.
The basic unit here is the "card". The flip, transform, double side of the card can not exist on it's own. There's no "Merciless Predator" card, it's just a facet of "Reckless Waif".

Since this is data it is logic-agnostic. There's documentation (format.txt) for how the data is structured and how the various pieces of data fit. It means that if the representation does not fit whatever you are using it for you can alter it to fit your needs.

Re: Magic Data

PostPosted: 25 Jan 2013, 17:14
by Arch
Updated. Still beta though.

http://dl.dropbox.com/u/2771470/mtg-data.zip

Known bugs that will be attended:
- Some flip cards not fixed. Have the rules for the second side listed on the first. More prominent in languge_*.
- Empty rules. Some rules have no text or reminder.
- Mismatched set-codes in setinfo.xml.
- Typelist delimiter inconsistency.

Re: Magic Data

PostPosted: 26 Jan 2013, 02:45
by friarsol
Arch wrote:Updated. Still beta though.
Any eta for mtg-data.txt?

Re: Magic Data

PostPosted: 27 Jan 2013, 15:26
by Arch
I started looking at it. Been sick the past two days though so haven't really gotten anything done. It's a pretty easy so ETA would be a day or so after I get going again.

Re: Magic Data

PostPosted: 02 Feb 2013, 22:02
by Arch
http://dl.dropbox.com/u/2771470/mtg-data.zip
http://dl.dropbox.com/u/2771470/mtg-data-txt.zip

Updated.
  • Empty rules are removed.
  • Proper matching of set with code in setinfo.xml
  • Switched to long dash for typelist in language_*.xml

Things that are not ok.
  • Some multi-part cards are still incorrect.
  • Some cards have reminder text mixed in with rule-text. (Camato Scout)
  • Splitting of 'protection from' not correct from some cards. (Oversoul of Dusk)

Re: Magic Data

PostPosted: 02 Feb 2013, 23:04
by Marek14
The text version seems to be missing dashes in card types.

Re: Magic Data

PostPosted: 03 Feb 2013, 11:39
by Arch
Updated txt typeline with dashes. (Same link.)

Rules are not joined in the txt version. (One rule-line on a card can be several in txt.) Will fix.

Re: Magic Data

PostPosted: 03 Feb 2013, 15:05
by Arch
Updated txt with joined rules.

Re: Magic Data

PostPosted: 05 Feb 2013, 00:15
by friarsol
Looks like some of the text things which previously had set codes no longer did

1998-11 Anthologies
2001-06 Dreamcast
2001-12 Deckmasters
1995-08 Renaissance
1996-07 Rivals Quick Start Set
1997-04 Astral
1996-11 Multiverse Gift Box

And some of the set codes changed since last time (Unglued went from UGL to UG). Was this post processing that you normally do? Or was it just a change on their side?