2019 Holiday Exchange!
 
A New and Exciting Beginning
 
The End of an Era
  • posted a message on MTG JSON - New website provides MTG card data in JSON format
    Shucks - thanks, guys Smile
    Posted in: Third Party Products
  • posted a message on MTG JSON - New website provides MTG card data in JSON format
    Alrighty... It's turned out to be even more complicated than a colour or two out of sequence in one or two sets, so I've done some digging, and come up with a solution Smile

    Basically, the following slightly-more-glaring anomolies exist:
    To get around this, and still have the process be automateable, I concocted a small expression language. The ordering of a set is described using a string consisting of square-bracketed clauses, with each clause representing a range of cards. Each clause consists of sub-clauses separated by boolean operators, and contains a type, an operator and a value. here is the most basic form, which applies to most sets:
    • [C=B][C=U][C=G][C=R][C=W][T%A][T%L]
    The first character is the type, and can have a value of:
    • C = Color
    • T = Type (Artifact or Land are the only implemented types, since those are the relevant ones for this problem)
    • N = Name
    • I = Multiverse ID
    The second character is an operator, with the valid values being:
    • = - Equals
    • % - Contains
    • > - Greater than
    • < - Less than
    The third varies according to what the type is:
    • Type is "C" (Color):
      • B = Black
      • U = Blue
      • G = Green
      • R = Red
      • W = White
      • X = Multicoloured
    • Type is "T" (Type):
      • A = Artifact
      • L = Land
    • Type is "N" (Name):
      • Value can be any aribtrary String
    • Type is "I" (Multiverse ID):
      • Value is any arbitrary number
    More than one Type clause can be included in a range, separated by the following boolean operators:
    • & - And
    • | - Or
    • ! - Not
    The following example demonstrates that a range should include all cards where Colour is Red, but name is not Crimson Kobolds:
    • [C=R!N=Crimson Kobolds]

    I'll leave implementation up to the reader (mine is very specific to my data structure, although if people are interested I can provide the RegExps I wrote to break it all up). But in case it's useful, here's all the expressions for the un-numbered sets (I'll use set codes rather than names, so I don't have to do a big lookup :P):
    • For LEA, 2ED, ARN, 5ED, FEM, POR, PO2:
      • [C=B][C=U][C=G][C=R][C=W][T%A][T%L]
        • Colour = Black
        • Colour = Blue
        • Colour = Green
        • Colour = Red
        • Colour = White
        • Type contains Artefact
        • Type contains Land
    • For DRK, MIR, WTH, STH, CHR:
      • [C=B][C=U][C=G][C=R][C=W][T%A][T%L][C%X]
        • Colour = Black
        • Colour = Blue
        • Colour = Green
        • Colour = Red
        • Colour = White
        • Type contains Artefact
        • Type contains Land
        • Colour is Multicoloured (actually more like "Colour contains ','" in my implementation, hence the %)
    • For LEB:
      • [C=B][C=U][C=G][N=Badlands][C=R][C=W][T%A][T%L!N=Badlands]
        • Colour = Black
        • Colour = Blue
        • Colour = Green
        • Name = Badlands
        • Colour = Red
        • Colour = White
        • Type contains Artefact
        • Type contains Land and Name is not Badlands
    • For VIS:
      • [C=B][C=U][C=G][C=R][C=W][C%X][T%A][T%L]
        • Colour = Black
        • Colour = Blue
        • Colour = Green
        • Colour = Red
        • Colour = White
        • Colour = Multicoloured
        • Type contains Artefact
        • Type contains Land
    • For 4ED:
      • [C=B][C=U][C=G][T%L][C=R][C=W][T%A]
        • Colour = Black
        • Colour = Blue
        • Colour = Green
        • Type contains Land
        • Colour = Red
        • Colour = White
        • Type contains Artefact
    • For ATQ:
      • [T%A][C=B][C=U][C=G][T%L][C=R][C=W]
        • Type contains Artefact
        • Colour = Black
        • Colour = Blue
        • Colour = Green
        • Type contains Land
        • Colour = Red
        • Colour = White
    • For LEG:
      • Deep Breath..!
        [C=B][C=U][C=G][C=R!N=Crimson Kobolds!N=Crookshank Kobolds!N=Kobolds of Kher Keep][C=W][T%A&I<1404][N=Crimson Kobolds|N=Crookshank Kobolds][T%A&I>1403&I<1409][N=Kobolds of Kher Keep][T%A&I>1408][T%L][C%X]
        • Colour = Black
        • Colour = Blue
        • Colour = Green
        • Colour = Red and Name is not Crimson Kobolds, Crookshank Kobolds or Kobolds of Kher Keep
        • Colour = White
        • Type contains Artifact and Multiverse ID is less than 1404 (stop artifacts at ID 1404, and insert first two missing kobolds)
        • Name = Crimson Kobolds or Name = Crookshank Kobolds
        • Type contains Artifact and Multiverse ID is greater than 1403 and Multiverse ID is less than 1409
        • Name = Kobolds of Kher Keep
        • Type contains Artifact, and Multiverse ID is greater than 1408
        • Type contains Land
        • Colour is Multicoloured
      • Stupid bloody Kobolds... :p Actually, in production I used their Multiverse IDs instead of their names, but it's easier to explain with names.
    That is all.

    Sembiance, do you mind having this here, or do you think I should split it off to another thread?
    Posted in: Third Party Products
  • posted a message on MTG JSON - New website provides MTG card data in JSON format
    Quote from Nis »

    For these unnumbered sets it appears to be always alphabetical.


    Cool, thanks for your help Smile
    Posted in: Third Party Products
  • posted a message on MTG JSON - New website provides MTG card data in JSON format
    Quote from Nis »
    It's a bit more complicated than that. Here are the set orders I use in Scry to make the numbers match up with magiccards.info numbering:

    oracle.setOrders[0]=Limited Edition Alpha|BUGRWAL
    oracle.setOrders[1]=Limited Edition Beta|BUGRWAL
    oracle.setOrders[2]=Unlimited Edition|BUGRWAL...

    Most follow the BUGRWALX order (or just BUGRWAL if no gold cards), but some are slightly different. WTF Fourth Edition!? BUGLRWA? Really?


    Followup question to this - is there a particular internal colour ordering for Gold cards?
    Posted in: Third Party Products
  • posted a message on MTG JSON - New website provides MTG card data in JSON format
    That's fantastic info - thanks to you both Smile
    Posted in: Third Party Products
  • posted a message on MTG JSON - New website provides MTG card data in JSON format
    Hi Sembiance,

    Any possibility of getting the card numbers used by magiccards.info into the data set? I've noticed that certain card types the numbers don't quite match - Cunning Bandit, for example, is 99 in your data, whereas magiccards.info uses 99a. And of course, the early sets lack a number entirely Smile

    Edit - Strike that first bit - that's a fault in my code, not your data.
    Posted in: Third Party Products
  • posted a message on Minouris's Library - Collection Manager and Deck Builder (Massive deck builder update!)
    New feature! The deck builder can now print out proxies for your decks Smile Proxies are based on real card images, but are watermarked, and have a different (and rather vivid) border so they can't be used as counterfeits.



    You have the options of either printing all cards in the deck, omitting basic lands (because most of us don't need proxies of basic lands), and of only printing proxies of cards you either don't have or that are being used in other decks.
    Posted in: Third Party Products
  • posted a message on Minouris's Library - Collection Manager and Deck Builder (Massive deck builder update!)
    Minor, under-the-hood change: I've ported all the dialogs on the site over to a new window manager library.

    The main difference this makes is being able to open more than one dialog at the same time - it was getting on my nerves that I was occasionally losing my checklist or tag changes when I accidentally clicked a card in the background and replaced the window I was in with the card details window :p
    Posted in: Third Party Products
  • posted a message on DeckBattle.com - Testers needed
    Couple of bits of feedback, just from the few minutes I've played with it Smile

    I love your look and feel - very clean, minimal clutter Smile Auto-complete on the cards in the "Add cards" form is very nice, but it'd be cool to have a way to browse cards as well - you sort of need to already be familiar with the cards in a set to use it at the moment, to get started, which could be a stumbling block for new players. Also, some filters for colour, rarity, type, etc, would help speed up your search widget by reducing the amount of work your query engine has to do Smile

    The charts page looks great! Smile

    A few tooltips here and there would help - I'm guessing the second number in the quantity indicator is the number you have in your collection (showing that I have 4/0 Zendikar Incarnates in my deck, for example), but that's only from an educated guess. Also, it took me a second to figure out that I had to click the "Add Cards" link to add cards - I thought I was already in that view.

    You may want to check with Wizards legal about using their card images and mana symbols before activating payment - use of card images and mana symbols is already a pretty grey area, and they generally only allow it for educational use (which a deck builder could arguably be considered as - at least that's my hope :P). When you start charging, though, all that goes out the window.

    All that aside, it's looking good Smile
    Posted in: Third Party Products
  • posted a message on Minouris's Library - Collection Manager and Deck Builder (Massive deck builder update!)
    Duel Decks: Zendikar vs. Eldrazi has been added to the site Smile
    Posted in: Third Party Products
  • posted a message on MTG JSON - New website provides MTG card data in JSON format
    Cool - thanks for clearing that up.
    Posted in: Third Party Products
  • posted a message on MTG JSON - New website provides MTG card data in JSON format
    Hi Sembiance Smile

    I see in the Changelog that you re-added the Variations field... Should that be appearing on all sets? It doesn't seem to be present in FTV: Angels.

    Changes have made Legalities a bit easier to parse - thanks Smile
    Posted in: Third Party Products
  • posted a message on Minouris's Library - Collection Manager and Deck Builder (Massive deck builder update!)
    That was moderately painless, give or take Smile

    FTV: Angels has been added to the site Smile Remember, friends don't use Iona as their Commander Wink
    Posted in: Third Party Products
  • posted a message on Minouris's Library - Collection Manager and Deck Builder (Massive deck builder update!)
    More new deck builder features Smile

    First, I was having trouble tracking the cards I'd assembled for an EDH deck, so I added a checklist. You can track the number of copies of a card you've gathered, or just hit the checkbox to indicate that you've got the all, and save the checkist between sessions. I'm still thinking of new things to add to it (eg, tying it into deck activation somehow, adding sorting, etc), but it's a start!



    Second, I added an "Advanced" window to the card editor. This will eventually contain a few different things but for now the most significant feature is the ability to define custom tags and add them to your cards. These are shown on the card frames. You can add as man or as few tags to a card as you like Smile Then, to make them a bit more useful for analytics, I added a table to the deck stats panel, and a chart to the stats window:




    Hope you all find them useful Smile My next task is updating my indexer to use MTGJSON's new API, so that I can upload FTV:Angels Smile
    Posted in: Third Party Products
  • posted a message on Javascript Shuffler code
    Thanks for the feedback Smile I haven't had to do much random stuff before, so I hadn't come across that algorithm... It does make things quite a bit simpler Smile
    Posted in: Third Party Products
  • To post a comment, please or register a new account.