Skip to main content

Demilich - the MTG skeleton wizard

A tool for quickly scaffolding a custom MTG set.

For designers of custom Magic: the Gathering sets, the designers of canon Magic suggest starting from a design skeleton. This is a set of "slots" which have some standard creatures, keywords, and spells to make the limited game work, at least at a base level. I've found that the act of mechanically filling out a design skeleton (15 commons per color, 14 uncommons per color, plus artifacts and signposts) is draining. In fact, I've never successfully completed a design skeleton by hand.

Enter demilich. Demilich encodes the suggested distributions of things and generates a randomized set of initial slots. This takes the drudgery and thinking out of the process and makes it a simple, mechanical starting point. From there, you can start assigning your own mechanics and creative to your new set!

Installation

The fastest way to simply generate a basic skeleton is to run demilich using pipx.

  1. Install pipx
  2. Run demilich: pipx run demilich play-booster > skeleton.csv

If you intend to use more of its features (like generating a skeleton programmatically), you can also install the package.

# first make a virtualenv however you normally do
% python -m venv env
% . env/bin/activate
# then install demilich
% pip install demilich

Basic use

% demilich play-booster > skeleton.csv

Then open skeleton.csv in the editor of your choice.

Custom skeleton

You can use demilich with your custom skeleton definition. I recommend you copy pb2024.toml to use as a starting point. Once you have your my-custom-skeleton.toml ready to go, run:

% demilich custom-skeleton my-custom-skeleton.toml

Output formats

By default, demilich generates a CSV. You can ask for a pretty-printed table instead with the --format option.

% demilich play-booster --format=table
# or
% demilich custom-skeleton my-custom-skeleton.toml --format=table

Choosing fields

CSV mode includes all fields by default. Table mode omits the "instruction" field by default. But you have full control about which fields appear and in what order.

% demilich play-booster --format=table --fields=id,name,stats,text

This will generate a 4-column output (regardless of format) which only includes ID, name, stats, and card text fields.

The valid fields are:

  • id
  • instruction
  • name
  • cost
  • typeline
  • stats
  • text

Limiting to certain chunks of the skeleton

By default, demilich will generate every skeleton chunk in the definition file. But for a particular run, you may want to only generate a subset of rarities and/or a subset of frames. There are options for this:

# produce only the white commons
% demilich play-booster --rarities C --frames W

# produce artifact uncommons and rares
% demilich play-booster --rarities UR --frames A

# produce blue and black rares
% demilich play-booster --rarities R --frames UB

# produce red and green commons and uncommons
% demilich play-booster --rarities CU --frames RG

When you specify both --rarities and --frames, you'll get output which includes every combination. There isn't a way to ask for "blue commons and red uncommons"; just split that into two separate invocations (demilich play-booster --rarities C --frames U and demilich play-booster --rarities U --frames R).

Programmatically building a skeleton

The API for SkeletonGenerator is documented in docstrings so you can generate skeletons programmatically. See the examples in examples/ for ideas on how to do it.

Each SkeletonGenerator is only responsible for a single section of a full skeleton. It keeps a fixed rarity and frame code, which simplifies the implementation quite a bit. If you need something much fancier, like redistributing keywords that didn't make it into one rarity into another rarity, you can probably achieve that using the programmatic interface.

Fan content policy

demilich is unofficial Fan Content permitted under the Fan Content Policy. Not approved/endorsed by Wizards. Portions of the materials used are property of Wizards of the Coast. ©Wizards of the Coast LLC.

Metadata

Release files for demilich 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for demilich 1.2.1
File Size Uploaded Provenance Actions
demilich-1.2.1.tar.gz 23.0 kB Without provenance Details for demilich-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for demilich 1.2.1
File Interpreter ABI Platform Actions
demilich-1.2.1-py3-none-any.whl Python 3 none any Details for demilich-1.2.1-py3-none-any.whl

Total release size: 47.7 kB

Release files / demilich-1.2.1.tar.gz

Download URL demilich-1.2.1.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
198227e234c0dd771f70a32f952af20142ab9573a36942371b828c2a4e35a344
BLAKE2b-256 checksum
How to use checksums
e7822785a21d11a9f9b07e14997c0f94847871264e9a3cd76419f8247c9b9b1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.7 Darwin/24.2.0

Release files / demilich-1.2.1-py3-none-any.whl

Download URL demilich-1.2.1-py3-none-any.whl
Size 24.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83828933a3ad10db17b4c11662bd4fb02ecfc00a8f9ec4b702780bd6e792ba0e
BLAKE2b-256 checksum
How to use checksums
43dcb5bf200bf0f265cc036d77fec0e01066b6424ff326ec310179bafb6e7dd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.7 Darwin/24.2.0

Security for demilich 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page