@cyclotis04 Basically, I did a bunch of database inserts using cardId as a primary key, and got duplcate primary key clashes.
Not sure what this 'cardId' you are referring to. The card objects in mtgjson have an 'id' field. Did you mean that?
Because on that field, there are no duplicate id's.
The mtgjson code checks for this every time the JSON files are generated and I also just tested them again just to be sure. The point of this field is to be unique and it is indeed, unique.
Unfortunately, SHA is a hash, not a UUID, so it can't guarantee uniqueness. The bigger the dataset, the bigger the chance of a duplicate
Yes, it is technically possible for there to be a collision with a SHA1 hash. However is is EXTREMELY unlikely. See: http://crypto.stackexchange.com/questions/2583/is-it-fair-to-assume-that-sha1-collisions-wont-occur-on-a-set-of-100k-strings
That URL talks about how hashing 100,000 strings and even over 1 million strings, produced no collisions. It goes on to talk about really big numbers before generating any collisions in theory. There are only 29,416 cards in the MTGJSON files. Even with 100 more years of MTG cards, it is unlikely to have a collision, but as I said, this is checked automatically when the JSON is generated to ensure there are no collisions, just in case.
Heya, I just noticed that the foreignNames field is no longer present in AllCards-X.json. How come? It was populated by the latest translation before and now it is completely missing. Can you please add it back to AllCards-X?
I just need to know the translated name of each card and don't care about in which set it was translated / not translated.
You're a legend, Sembiance! Thanks for your hard work on this resource.
Thanks for the kind words
It's funny, I don't even play MtG anymore. Haven't played it in over 3 years now.
I initially created MTGJSON and MTGIMAGE because I was going to create a 'visual' card search tool and deck builder. I wanted to use it myself to quickly and visually search through cards and create decks and try them out, in order to 'get back into' playing MTG, perhaps eventually at a competitive level. However after creating the two sites, I found I no longer wanted to create the search engine and I had lost all interest in playing MTG.
Basically, the images are from CCGHQ. CCGHQ is a really great and amazing project. I wanted to make it lot easier for developers to use the images they provide, thus I created this website.
When CCGHQ images are not available yet for a set, I provide lower resolution ones in the mean time.
I plan on updating this site whenever a new set is released by wizards or CCGHQ.
I hope some folks out there find it useful.
If anyone has any questions, feel free to ask them
Quick question... In the wake of MTGImage going down, will the imageName field still be populated with a unique value?
I'm interested in this, too, as I found a way to use this field (not to mention UID's are based on this field).
Yes. The imageName field will remain just as is for all current and future sets. I will be populating it with a unique image name for future sets just as I have in the past, so yes, it can still be used as part of UIDS. So in short, the closing of mtgimage.com will not be affecting the 'imageName' field in any way.
I extracted it and the directories you mentioned have images, the images are of non-zero size and they are viewable and look ok.
What operating system are you using and what program are you using to unzip the files? I will then use the same to see if I can reproduce the issue you are seeing.
1
Not sure what this 'cardId' you are referring to. The card objects in mtgjson have an 'id' field. Did you mean that?
Because on that field, there are no duplicate id's.
The mtgjson code checks for this every time the JSON files are generated and I also just tested them again just to be sure. The point of this field is to be unique and it is indeed, unique.
Yes, it is technically possible for there to be a collision with a SHA1 hash. However is is EXTREMELY unlikely. See: http://crypto.stackexchange.com/questions/2583/is-it-fair-to-assume-that-sha1-collisions-wont-occur-on-a-set-of-100k-strings
That URL talks about how hashing 100,000 strings and even over 1 million strings, produced no collisions. It goes on to talk about really big numbers before generating any collisions in theory. There are only 29,416 cards in the MTGJSON files. Even with 100 more years of MTG cards, it is unlikely to have a collision, but as I said, this is checked automatically when the JSON is generated to ensure there are no collisions, just in case.
2
1
Whoops, sorry about that. I've added this issue https://github.com/Sembiance/mtgjson/issues/78 to github and will work on getting it added back in.
1
Thanks for the kind words
It's funny, I don't even play MtG anymore. Haven't played it in over 3 years now.
I initially created MTGJSON and MTGIMAGE because I was going to create a 'visual' card search tool and deck builder. I wanted to use it myself to quickly and visually search through cards and create decks and try them out, in order to 'get back into' playing MTG, perhaps eventually at a competitive level. However after creating the two sites, I found I no longer wanted to create the search engine and I had lost all interest in playing MTG.
7
ATTENTION Wizards of the Coast has demanded that mtgimage.com be shut down.
It has therefore been shut down.
You can see details on: http://mtgimage.com
OLD MESSAGE FOLLOWS:
Hey Everyone
I just launched a new MTG website that I think some of you may find useful.
It provides high resolution MTG card images for you to easily use in your programs/websites.
The website is: http://mtgimage.com
Basically, the images are from CCGHQ. CCGHQ is a really great and amazing project. I wanted to make it lot easier for developers to use the images they provide, thus I created this website.
When CCGHQ images are not available yet for a set, I provide lower resolution ones in the mean time.
I plan on updating this site whenever a new set is released by wizards or CCGHQ.
I hope some folks out there find it useful.
If anyone has any questions, feel free to ask them
3
1
1
Yes. The imageName field will remain just as is for all current and future sets. I will be populating it with a unique image name for future sets just as I have in the past, so yes, it can still be used as part of UIDS. So in short, the closing of mtgimage.com will not be affecting the 'imageName' field in any way.
1
So I just double checked by downloading the file: http://mtgimage.com/zip/AllSets.hq.zip
I extracted it and the directories you mentioned have images, the images are of non-zero size and they are viewable and look ok.
What operating system are you using and what program are you using to unzip the files? I will then use the same to see if I can reproduce the issue you are seeing.
1
Glad you find the sites useful. No need to send me anything, I haven't played MTG in over a year and helping out others is it's own reward