#Request - text file with all set abbreviations distributed with release

15 messages · Page 1 of 1 (latest)

late pendant
#

I just spent a few hours typing in a list for restrictedEdititions.json from https://mtg.fandom.com/wiki/Set and I can't even be sure I didn't make typos or get a letter and number mixed up, like 1 and l ... or 0 and o.

I wonder if the devs might consider distributing a text file where the set names can be copy pasted into json if the user wants, so every individual doesnt have to spend an hour or two googling and typing.

The text file could just sit for reference or be at the end of a readme. Too bad comments aren't allowed in json or we'd just uncomment lines. I guess XML does have one advantage.

MTG Wiki
Set

A set in Magic: The Gathering is a pool of cards released together and designed for the same play environment. Cards in a set can be obtained either randomly through booster packs or in box sets...

pearl sky
#
import requests

def get_set_list():
        
        url = "https://api.scryfall.com/sets"

        headers = {
            "Accept": "application/json"
        }

        response = requests.get(url, headers=headers)
        d = response.json()
        for entry in d["data"]:
                print(entry["code"])

get_set_list()

idk if this helps, but you should be able to query Scryfall for this stuff. this should update a list of all sets. https://scryfall.com/docs/api/sets/all

#

there's ways to limit what you want to see. by default it returns sets in reverse chronological order, but you can further trim it down if you only want core sets and expansions, for example https://scryfall.com/docs/api/sets#set-types

zenith tusk
pearl sky
#

This one should output in a format you can paste into the JSON config

import requests

def get_set_list():
        
        url = "https://api.scryfall.com/sets"

        headers = {
            "Accept": "application/json"
        }

        response = requests.get(url, headers=headers)
        d = response.json()
        for entry in d["data"]:
                c = entry["code"]
                print(f"\"{c}\",")

get_set_list()
#

i'm sharing the code so you can run it when you need to, considering they put new product out every other week, it seems

zenith tusk
#

Thank you for that, cards are still showing I have to assume it's beause they used different codes than that website for some of the sets I see Nemesis was one I will look into others

#

But i appreciate your great effort

zenith tusk
#

Yep I closed out, NMS fixed the nemesis set issue now murders at karlov is my next target

#

Yep perhaps this is too advanced for me I still can't get rid of Murders at Karlov or the Neo Dynasty cards I checked to make sure their set codes are in the config restricted... perhaps someone else will come up with it or they'll implement it in game it's still great fun

tiny notch
late pendant
#

i couldnt stop the game from putting newer cards in no matter what i tried.
you might limit your own start, but it seems monsters will spawn with the latest greatest cards no matter what.

tiny notch
#

You need to create a new plane and build your own enemy decks with the limits you want.