andrewgioia / keyrune

Magic: the Gathering set symbol pictographic font
Other
448 stars 44 forks source link

Some Icons' class names don't match MTGJSON code #42

Open MickHardins opened 7 years ago

MickHardins commented 7 years ago

Hi, some Keyrune icons' class names don't match MTGJSON: Amonkhet invocations (mp2 vs AKH_MPS) Kaladesh Inventions (mp1 vs MPS) and others.

Is this intentional?

andrewgioia commented 7 years ago

@MickHardins thanks good question, I should include a bit on this in the docs. The set codes we use go through the following priority:

  1. Official ones listed by WOTC, either in Gatherer or some other public source
  2. Official ones gleaned from Magic Online or through various other non-obvious means (some of the promotional sets we get this way, like MP1 I believe)
  3. Set codes listed by MTGJSON or MTG Salvation

Typically we only want one set code for each but sometimes give alternate class names to account for MTGJSON or other popular uses. One time I typically don't do this is if MTGJSON decides to use an unofficial one that is only 3 letters, as it could introduce collisions down the line (for instance with MPS, if WOTC decided to use MPS for a future set it would cause an issue for everyone using it for Kaladesh Inventions now).

Longer ones like AKH_MPS don't have this issue and I think it would probably be a good idea to include as many of MTGJSON's alternate set codes for compatibility with that, as a lot of websites use that data source.

MickHardins commented 7 years ago

Ok, thanks for explaining the rationale behind set codes. I completely agree with your reasoning about collisions, even if i think WOTC is not doing a great job to provide collision-free set codes.

Obviously, handling the cases where set codes differ from MTGJSON is trivial, but since mtgjson is widely used, adding the alternate code would be welcome ! 😃

bra1n commented 7 years ago

In case of the Masterpieces though, @MickHardins has a valid point. The official designation there is MPS_KLD and MPS_AKH as can be seen on Gatherer: http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=MPS_KLD&size=large&rarity=S http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=MPS_AKH&size=large&rarity=S

csuhta commented 7 years ago

That is less of an “official” stance on set codes and more what Gatherer put together to handle two different groups of cards having the same code in their corner.

bra1n commented 7 years ago

So? As @andrewgioia pointed out, Gatherer should be the primary source for set codes, and the URL of the icons is the only place where those are visible. Any other expansion icon there uses the official set code in the URL too, so why make a difference for Masterpieces?

andrewgioia commented 7 years ago

Sorry I haven't gotten to this issue in such a long time. I still think we should keep the above-mentioned priority on set codes, I just haven't gotten around to vetting the entire set and listing out which ones need to change. This will mostly impact promo symbols and for the MPS ones I agree their primary code should be the WOTC-listed ones (which we should do whenever possible).

I'm hoping to get to this soon and will list all of the potential changes here (or more precisely, the added classnames for each symbol that's "incorrect" right now).

yandere-sliver commented 6 years ago

The official set code for both sets is MPS by the way, but it has two different icons. So whatever you do it is semi-official. :/