Magic Data
General Discussion of the Intricacies
Moderator: CCGHQ Admins
Re: Magic Data
by randian » 22 Jan 2013, 22:28
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.
- randian
- Posts: 15
- Joined: 05 Jun 2012, 17:30
- Has thanked: 0 time
- Been thanked: 0 time
Re: Magic Data
by randian » 22 Jan 2013, 23:07
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.
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.
- randian
- Posts: 15
- Joined: 05 Jun 2012, 17:30
- Has thanked: 0 time
- Been thanked: 0 time
Re: Magic Data
by friarsol » 23 Jan 2013, 02:08
Looks like Gatecrash is up on Gatherer. Thanks arch
http://gatherer.wizards.com/Pages/Searc ... .aspx?set=[%22Gatecrash%22]
http://gatherer.wizards.com/Pages/Searc ... .aspx?set=[%22Gatecrash%22]
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Magic Data
by Arch » 23 Jan 2013, 12:52
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.
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
by Ark » 23 Jan 2013, 15:04
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
by randian » 23 Jan 2013, 18:35
Why have some cards with ASCII dash, some with UTF-8 long dash? Why not make them all consistent?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.
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?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 still don't see what the "multi" construct gains you. It needlessly complicates the logic.
- randian
- Posts: 15
- Joined: 05 Jun 2012, 17:30
- Has thanked: 0 time
- Been thanked: 0 time
Re: Magic Data
by Arch » 24 Jan 2013, 11:13
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.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.
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:Why have some cards with ASCII dash, some with UTF-8 long dash? Why not make them all consistent?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.
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.txtrandian wrote: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?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".
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".randian wrote:I still don't see what the "multi" construct gains you. It needlessly complicates the logic.
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
by Arch » 25 Jan 2013, 17:14
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.
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
by friarsol » 26 Jan 2013, 02:45
Any eta for mtg-data.txt?Arch wrote:Updated. Still beta though.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Magic Data
by Arch » 27 Jan 2013, 15:26
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
by Arch » 02 Feb 2013, 22:02
http://dl.dropbox.com/u/2771470/mtg-data.zip
http://dl.dropbox.com/u/2771470/mtg-data-txt.zip
Updated.
Things that are not ok.
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
by Marek14 » 02 Feb 2013, 23:04
The text version seems to be missing dashes in card types.
Re: Magic Data
by Arch » 03 Feb 2013, 11:39
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.
Rules are not joined in the txt version. (One rule-line on a card can be several in txt.) Will fix.
Re: Magic Data
by friarsol » 05 Feb 2013, 00:15
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?
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?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Return to Magic Rules Engine Programming
Who is online
Users browsing this forum: No registered users and 27 guests