Just showing a random planechase card out of the 86, then you can click to change (if you click 86 times, you will get back to the original image, if you refresh, you get a whole new random order).
Been using this for planechase games with friends (we're using one planechase deck for everybody) instead of buying the $300+ worth 86 plane/phenomenom cards. Pretty good so far, although I wasn't sure about copyright stuff. Works on iPad or iPhone with no problem, you can add the icon to your home screen so that it automatically runs in full screen.
My own rules when building a Commander deck:
1) Underrated general that I can build around but the deck must work without him/her too.
2) Every card must be legal in both banlists.
3) No infinite combo that could win (and ruin) instantly a multiplayer game.
4) Synergy at all costs; stay on theme, avoid goodstuff.
The hash is just a checksum. It takes the input data and outputs a 512/256/128 bit number. The multiverseid in the hash won't prevent overlap.
Of course it won't, but the chance to actually experience one should be somewhat smaller.
EDIT: Just to make sure... does *every* card in the DB have a card number? I mean, Sembiance has tokens in his todo list for the site. There also are Planechase/Archenemy cards. Could them mess the UID up?
Not all cards have a number field. Also not all cards have a multiverseid field. So neither can be relied upon for providing a UID. I believe basing it on setCode+cardName+imageName will provide a UID for a card. setCode+cardName gets you 99% of the way there, then imageName is different for cards that have the same name within a single set. So that gets you the rest.
I haven't double checked this UID against the data set, but it should be solid.
Of course it won't, but the chance to actually experience one should be somewhat smaller.
EDIT: Just to make sure... does *every* card in the DB have a card number? I mean, Sembiance has tokens in his todo list for the site. There also are Planechase/Archenemy cards. Could them mess the UID up?
No, not all cards have a card number but the goal is to have a unique identifier, so as long as the combination chosen doesn't overlap with any of the other cards, it's all good. I settled on [setCode][cardNumber][imageName]. My reasoning behind it is, [setCode][imageName] covers everything minus split cards. This includes really old cards without card numbers and tokens because the image names will be different. Adding [cardNumber] covers all split cards going forward which makes them all unique and future proof based on all current existing card layouts.
So just a note, I was wrong in saying 'imageName' is safe to use for a key. It can change in 'promo' sets.
For example, I just did an update to pWPN set which includes another Fringe card. This means the original 'fringe' is now 'fringe1' and there is also now a 'fringe2'.
I thought I'd make people aware of this possibility in future updates.
Hi Sembiance,
To the questions regarding the unique id:
I'm currently using setcode,name,number,multiverseid and this provides (so far) a unique robust way of identifying cards.
The only problem you may run into is not all cards have multiverseid's because they do not exist on Gatherer (most promo cards and some other sets).
Also a card doesn't always have a number field either. Older cards don't have them and I can't guarantee that all future promo cards will have them.
setCode+name isn't quite enough because you can have more than one card in the set with the same name.
It's a tricky problem because a promo set could have two cards that differ only in something very minor, like the 'source' or 'releaseDate' or some other trivial field. At this time I don't have a strong recommendation as to how to have a unique id that is guaranteed to be unique into the future.
All that being said, I'd say go with whatever works right now (which it sounds like your current field combinations works right now) and then just have some sort of check in the future to ensure that newly released or changed sets don't have any duplicate id's.
Hi Sembiance,
To the questions regarding the unique id:
I'm currently using setcode,name,number,multiverseid and this provides (so far) a unique robust way of identifying cards.
The only problem you may run into is not all cards have multiverseid's because they do not exist on Gatherer (most promo cards and some other sets).
Also a card doesn't always have a number field either. Older cards don't have them and I can't guarantee that all future promo cards will have them.
setCode+name isn't quite enough because you can have more than one card in the set with the same name.
It's a tricky problem because a promo set could have two cards that differ only in something very minor, like the 'source' or 'releaseDate' or some other trivial field. At this time I don't have a strong recommendation as to how to have a unique id that is guaranteed to be unique into the future.
All that being said, I'd say go with whatever works right now (which it sounds like your current field combinations works right now) and then just have some sort of check in the future to ensure that newly released or changed sets don't have any duplicate id's.
It occurs to me that one could just hash the entire bleeding record of the card using an MD5 or something... except that it wouldn't be guaranteed unique. Le sigh.
At one point I experimeted with comparing an MD5 of the individual set files against one stored in my DB to see if there were updates available for that set, but for some reason neither MySQL or PHP could agree on a consistent hash twice in a row for the same data - it just returned a mismatch every time...
Private Mod Note
():
Rollback Post to RevisionRollBack
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
Why would you change an already available imageName, when you could just add the "2" to the other and everything would be just fine? It would break your current image naming convention, true, but would certainly futureproof your database. What do you think?
I already have it so that "Card.jpg" still works. It behind the scenes points to "Card1.jpg"
So while the JSON imageName entry may change, both the old and new values still work.
As for changing it so that imageName just gets a number appended to the end and leave the original alone, that is indeed how I should have done it at the beginning. I didn't have promo image sets back then, so sets never changed after being released so it wasn't a concern back then. I guess I have 3 options:
A. Do nothing, continue as usual
B. Retroactively change all existing imageName fields and all imageName fields going forward
C. Only change upcoming imageName fields
Sembiance, I don't want to rush you with deciding about A, B or C, but if you at least could state which solution you're leaning to, that'd be nice. I've got an app waiting to be released and this UID thing is very important to me as on the Apple platform updates take a week to be reviewed and let into the App Store, so providing a reliable app is crucial.
I have decided to go with a variation of C.
I won't be changing any imageName fields for any existing cards or sets.
In the future whenever a new card is released, it's imageName field won't change in the future.
So everyone can rely on it for UID purposes.
For my reasoning, I decided not to change all existing imageNames because that would just hurt a ton of existing users that already use this data. Future regular sets that get released will continue to use the existing conventions. The only thing that will change convention wise in the future, is for the rare cases in promo sets where another card is added with the same name of another card already in the promo set. In these cases the imageName for the new card will have the number suffix but the existing imageName field for the old card will not change. I believe this is the best path for all users of the data.
Thanks for helping me weigh out the pros and cons.
Sembiance, did you see my post about the vintage-only cards in Commander 2014 and Conspiracy? I think it might have gotten lost in the posts about UUIDs.
Private Mod Note
():
Rollback Post to RevisionRollBack
My MTG Site: Graceful Stats (deckbuilding website that actually works on mobile)
Sembiance, did you see my post about the vintage-only cards in Commander 2014 and Conspiracy? I think it might have gotten lost in the posts about UUIDs.
Aye, I did see it. I haven't had a chance to investigate yet, currently traveling. I will look into it as soon as I am able.
Hey, have you thought any more about restructuring starter cards? I mentioned a while back how some M15 cards are only in starter decks, and how it might make sense to also integrate the 8th Editions starter cards with 8th Edition, and the same with 9th. Or at least have some way to distinguish M15 starter cards from the normal cards.
Whoops! That one slipped through the cracks. It never appeared on Gatherer or MagicCards.info, so I didn't see it. I will add it in a few days, sorry for the delay.
Hey, have you thought any more about restructuring starter cards? I mentioned a while back how some M15 cards are only in starter decks, and how it might make sense to also integrate the 8th Editions starter cards with 8th Edition, and the same with 9th. Or at least have some way to distinguish M15 starter cards from the normal cards.
I have been on a VERY long extended active vacation out of town, almost 3 months, ugh that's a long time. So I haven't had much free brain cycles to give it much though. The vacation is finally coming to a close now, thank goodness. I sure do miss home and my computer workstation
I just gave it some more thought. and I am leaning towards putting the 8th and 9th starter cards into the 8th and 9th sets with a flag: "starter" : true
I would also give this flag to the M15 cards that are the starter cards and future sets that do the same thing.
It means deleting the 8th and 9th starter sets from the website, which might cause some minor headaches for those that use this data, but it's better than always having to create 'starter' sets for future core sets. Also I'll need to make a note for the 'booster' field in the docs that any cards marked 'starter' shouldn't be included in any booster generation.
Assuming nobody comes up with an argument to change my mind, I'll be doing this work in a about a week or so. Thanks again for pinging me on this and reminding me
Gatherer finally got around to adding "Duel Decks: Anthology" to the site. They did it a bit odd though, they split it up into four different sets with different set names and set codes:
DD3_DVD: Duel Decks Anthology, Divine vs. Demonic
DD3_EVG: Duel Decks Anthology, Elves vs. Dragons
DD3_GVL: Duel Decks Anthology, Garruk vs. Liliana
DD3_JVC: Duel Decks Anthology, Jace vs. Chandra
This is even stranger since they were not sold as separate sets, but all together as one boxed set.
I have two choices.
1. I can list them on MTGJSON and MTGIMAGE as separate sets
- I would continue the tradition of keeping the set names identical to those on gatherer (eg Duel Decks Anthology, Divine vs. Demonic)
- I would continue the tradition of keeping the set icon as official as possible (eg DD3_DVD)
- Each 'sub' deck has a different icon which after checking just one set, appears to be identical to the original duel deck icons they re-released
2. I can combine them into a "Duel Decks: Anthology" set:
- I would have to add new fields to the JSON at set level to represent the fact that this set is represented by multiple different sets on gatherer, probably "gathererNames" : ["Duel Decks Anthology, Divine vs. Demonic", ...] and "gathererCodes" : ["DD3_DVD", "DD3_EVG", ...]
- I would have to introduce a new field on MTGJSON per card that represents the 'deck' or 'subset' that the card belongs to. This is something that's been on my todo list for a while, to do for other cards in other boxed sets
- I would have to introduce a new way on MTGIMAGE to represent multiple different set icons for a single set. This would probably correspond to that new 'deck' or 'subset' field
- I would need to add aliases for each of the sub-set codes gatherer uses on both MTGJSON JSON download and MTGIMAGE zip downloads. I should also probably update the web page to reflect this.
I'm really not in love with either approach and I'm not sure why Wizards decided to make this change, a departure from previous boxed sets that contain theme decks.
I would like some opinions from some of you folks as to which option to go with.
Option #1 is the easiest, would keep things less complicate and would follow how gatherer does it, which is something my projects have always striven for in the past. I am leaning towards this option, but not entirely convinced.
Thoughts?
Private Mod Note
():
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Holy cow, dude. I didn't know that. My plan has always been to send a % your way if my site ever made any money at all. But I'm not there yet.
http://mtg.dnll.net/
Just showing a random planechase card out of the 86, then you can click to change (if you click 86 times, you will get back to the original image, if you refresh, you get a whole new random order).
Been using this for planechase games with friends (we're using one planechase deck for everybody) instead of buying the $300+ worth 86 plane/phenomenom cards. Pretty good so far, although I wasn't sure about copyright stuff. Works on iPad or iPhone with no problem, you can add the icon to your home screen so that it automatically runs in full screen.
Rules Advisor
Pauper decks: Weenie Tokens — Zombies
My own rules when building a Commander deck:
1) Underrated general that I can build around but the deck must work without him/her too.
2) Every card must be legal in both banlists.
3) No infinite combo that could win (and ruin) instantly a multiplayer game.
4) Synergy at all costs; stay on theme, avoid goodstuff.
Not all cards have a number field. Also not all cards have a multiverseid field. So neither can be relied upon for providing a UID. I believe basing it on setCode+cardName+imageName will provide a UID for a card. setCode+cardName gets you 99% of the way there, then imageName is different for cards that have the same name within a single set. So that gets you the rest.
I haven't double checked this UID against the data set, but it should be solid.
No, not all cards have a card number but the goal is to have a unique identifier, so as long as the combination chosen doesn't overlap with any of the other cards, it's all good. I settled on [setCode][cardNumber][imageName]. My reasoning behind it is, [setCode][imageName] covers everything minus split cards. This includes really old cards without card numbers and tokens because the image names will be different. Adding [cardNumber] covers all split cards going forward which makes them all unique and future proof based on all current existing card layouts.
Some questions:
1) Is there a central place where people can contribute(github somewhere)
2) Is there a place to list projects that we do with this(I have some things in mind)
3) Would you consider added "banned" as a key, with value equal to a list of formats its banned in?
1: https://github.com/Sembiance/mtgjson
2: There is no list of all projects using mtgjson/mtgimage at this time.
3: The 'legalities' key has this information. If the key (format type) has the value 'Banned' then it is banned.
For example, I just did an update to pWPN set which includes another Fringe card. This means the original 'fringe' is now 'fringe1' and there is also now a 'fringe2'.
I thought I'd make people aware of this possibility in future updates.
The only problem you may run into is not all cards have multiverseid's because they do not exist on Gatherer (most promo cards and some other sets).
Also a card doesn't always have a number field either. Older cards don't have them and I can't guarantee that all future promo cards will have them.
setCode+name isn't quite enough because you can have more than one card in the set with the same name.
It's a tricky problem because a promo set could have two cards that differ only in something very minor, like the 'source' or 'releaseDate' or some other trivial field. At this time I don't have a strong recommendation as to how to have a unique id that is guaranteed to be unique into the future.
All that being said, I'd say go with whatever works right now (which it sounds like your current field combinations works right now) and then just have some sort of check in the future to ensure that newly released or changed sets don't have any duplicate id's.
It occurs to me that one could just hash the entire bleeding record of the card using an MD5 or something... except that it wouldn't be guaranteed unique. Le sigh.
At one point I experimeted with comparing an MD5 of the individual set files against one stored in my DB to see if there were updates available for that set, but for some reason neither MySQL or PHP could agree on a consistent hash twice in a row for the same data - it just returned a mismatch every time...
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
@Sembiance - If you do rename the images, do you also rewrite requests on MTGImage for the old name to the new name?
I already have it so that "Card.jpg" still works. It behind the scenes points to "Card1.jpg"
So while the JSON imageName entry may change, both the old and new values still work.
As for changing it so that imageName just gets a number appended to the end and leave the original alone, that is indeed how I should have done it at the beginning. I didn't have promo image sets back then, so sets never changed after being released so it wasn't a concern back then. I guess I have 3 options:
A. Do nothing, continue as usual
B. Retroactively change all existing imageName fields and all imageName fields going forward
C. Only change upcoming imageName fields
Overseer of the Damned
Commander's Sphere
Marchesa's Smuggler
Treasonous Ogre
There may be more, but those are the ones reported to me.
I have decided to go with a variation of C.
I won't be changing any imageName fields for any existing cards or sets.
In the future whenever a new card is released, it's imageName field won't change in the future.
So everyone can rely on it for UID purposes.
For my reasoning, I decided not to change all existing imageNames because that would just hurt a ton of existing users that already use this data. Future regular sets that get released will continue to use the existing conventions. The only thing that will change convention wise in the future, is for the rare cases in promo sets where another card is added with the same name of another card already in the promo set. In these cases the imageName for the new card will have the number suffix but the existing imageName field for the old card will not change. I believe this is the best path for all users of the data.
Thanks for helping me weigh out the pros and cons.
Aye, I did see it. I haven't had a chance to investigate yet, currently traveling. I will look into it as soon as I am able.
Fixed. I have updated legalities for all cards in all sets.
Nice - thanks very much
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
Awesome, thanks man
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
Whoops! That one slipped through the cracks. It never appeared on Gatherer or MagicCards.info, so I didn't see it. I will add it in a few days, sorry for the delay.
I have been on a VERY long extended active vacation out of town, almost 3 months, ugh that's a long time. So I haven't had much free brain cycles to give it much though. The vacation is finally coming to a close now, thank goodness. I sure do miss home and my computer workstation
I just gave it some more thought. and I am leaning towards putting the 8th and 9th starter cards into the 8th and 9th sets with a flag: "starter" : true
I would also give this flag to the M15 cards that are the starter cards and future sets that do the same thing.
It means deleting the 8th and 9th starter sets from the website, which might cause some minor headaches for those that use this data, but it's better than always having to create 'starter' sets for future core sets. Also I'll need to make a note for the 'booster' field in the docs that any cards marked 'starter' shouldn't be included in any booster generation.
Assuming nobody comes up with an argument to change my mind, I'll be doing this work in a about a week or so. Thanks again for pinging me on this and reminding me
Gatherer finally got around to adding "Duel Decks: Anthology" to the site. They did it a bit odd though, they split it up into four different sets with different set names and set codes:
DD3_DVD: Duel Decks Anthology, Divine vs. Demonic
DD3_EVG: Duel Decks Anthology, Elves vs. Dragons
DD3_GVL: Duel Decks Anthology, Garruk vs. Liliana
DD3_JVC: Duel Decks Anthology, Jace vs. Chandra
This is even stranger since they were not sold as separate sets, but all together as one boxed set.
I have two choices.
1. I can list them on MTGJSON and MTGIMAGE as separate sets
- I would continue the tradition of keeping the set names identical to those on gatherer (eg Duel Decks Anthology, Divine vs. Demonic)
- I would continue the tradition of keeping the set icon as official as possible (eg DD3_DVD)
- Each 'sub' deck has a different icon which after checking just one set, appears to be identical to the original duel deck icons they re-released
2. I can combine them into a "Duel Decks: Anthology" set:
- I would have to add new fields to the JSON at set level to represent the fact that this set is represented by multiple different sets on gatherer, probably "gathererNames" : ["Duel Decks Anthology, Divine vs. Demonic", ...] and "gathererCodes" : ["DD3_DVD", "DD3_EVG", ...]
- I would have to introduce a new field on MTGJSON per card that represents the 'deck' or 'subset' that the card belongs to. This is something that's been on my todo list for a while, to do for other cards in other boxed sets
- I would have to introduce a new way on MTGIMAGE to represent multiple different set icons for a single set. This would probably correspond to that new 'deck' or 'subset' field
- I would need to add aliases for each of the sub-set codes gatherer uses on both MTGJSON JSON download and MTGIMAGE zip downloads. I should also probably update the web page to reflect this.
I'm really not in love with either approach and I'm not sure why Wizards decided to make this change, a departure from previous boxed sets that contain theme decks.
I would like some opinions from some of you folks as to which option to go with.
Option #1 is the easiest, would keep things less complicate and would follow how gatherer does it, which is something my projects have always striven for in the past. I am leaning towards this option, but not entirely convinced.
Thoughts?