# 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](https://magic.wizards.com/en/news/making-magic/nuts-and-bolts-16-play-boosters).
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`](https://pipx.pypa.io/latest/)
2. Run `demilich`: `pipx run demilich play-booster > skeleton.csv`
If you intend to use more of its features (like [generating a skeleton programmatically](#programmatically-building-a-skeleton)), you can also install the package.
```shell
# first make a virtualenv however you normally do
% python -m venv env
% . env/bin/activate
# then install demilich
% pip install demilich
```
## Basic use
```shell
% 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](src/demilich/data/pb2024.toml) to use as a starting point.
Once you have your `my-custom-skeleton.toml` ready to go, run:
```shell
% 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.
```shell
% 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.
```shell
% 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:
```shell
# 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][fan-content].
Not approved/endorsed by Wizards.
Portions of the materials used are property of Wizards of the Coast.
©Wizards of the Coast LLC.
[fan-content]: https://company.wizards.com/en/legal/fancontentpolicy
Raw data
{
"_id": null,
"home_page": "https://github.com/vtbassmatt/demilich",
"name": "demilich",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": "game, tcg, mtg, magic",
"author": "Matt Cooper",
"author_email": "vtbassmatt@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/2c/05/1beb81bbfffc61fa854c808a1879ef332f252b455b33a585231c5a125323/demilich-1.2.0.tar.gz",
"platform": null,
"description": "# Demilich - the MTG skeleton wizard\n\nA tool for quickly scaffolding a custom MTG set.\n\nFor designers of custom Magic: the Gathering sets, the designers of canon Magic suggest starting from a [design skeleton](https://magic.wizards.com/en/news/making-magic/nuts-and-bolts-16-play-boosters).\nThis 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.\nI'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.\nIn fact, I've never successfully completed a design skeleton by hand.\n\nEnter `demilich`.\nDemilich encodes the suggested distributions of things and generates a randomized set of initial slots.\nThis takes the drudgery and thinking out of the process and makes it a simple, mechanical starting point.\nFrom there, you can start assigning your own mechanics and creative to your new set!\n\n## Installation\n\nThe fastest way to simply generate a basic skeleton is to run `demilich` using `pipx`.\n1. Install [`pipx`](https://pipx.pypa.io/latest/)\n2. Run `demilich`: `pipx run demilich play-booster > skeleton.csv`\n\nIf you intend to use more of its features (like [generating a skeleton programmatically](#programmatically-building-a-skeleton)), you can also install the package.\n\n```shell\n# first make a virtualenv however you normally do\n% python -m venv env\n% . env/bin/activate\n# then install demilich\n% pip install demilich\n```\n\n## Basic use\n\n```shell\n% demilich play-booster > skeleton.csv\n```\n\nThen open `skeleton.csv` in the editor of your choice.\n\n## Custom skeleton\n\nYou can use `demilich` with your custom skeleton definition.\nI recommend you copy [pb2024.toml](src/demilich/data/pb2024.toml) to use as a starting point.\nOnce you have your `my-custom-skeleton.toml` ready to go, run:\n\n```shell\n% demilich custom-skeleton my-custom-skeleton.toml\n```\n\n## Output formats\n\nBy default, `demilich` generates a CSV.\nYou can ask for a pretty-printed table instead with the `--format` option.\n\n```shell\n% demilich play-booster --format=table\n# or\n% demilich custom-skeleton my-custom-skeleton.toml --format=table\n```\n\n## Choosing fields\n\nCSV mode includes all fields by default.\nTable mode omits the \"instruction\" field by default.\nBut you have full control about which fields appear and in what order.\n\n```shell\n% demilich play-booster --format=table --fields=id,name,stats,text\n```\n\nThis will generate a 4-column output (regardless of format) which only includes ID, name, stats, and card text fields.\n\nThe valid fields are:\n- `id`\n- `instruction`\n- `name`\n- `cost`\n- `typeline`\n- `stats`\n- `text`\n\n## Limiting to certain chunks of the skeleton\n\nBy default, `demilich` will generate every skeleton chunk in the definition file.\nBut for a particular run, you may want to only generate a subset of rarities and/or a subset of frames.\nThere are options for this:\n\n```shell\n# produce only the white commons\n% demilich play-booster --rarities C --frames W\n\n# produce artifact uncommons and rares\n% demilich play-booster --rarities UR --frames A\n\n# produce blue and black rares\n% demilich play-booster --rarities R --frames UB\n\n# produce red and green commons and uncommons\n% demilich play-booster --rarities CU --frames RG\n```\n\nWhen you specify both `--rarities` and `--frames`, you'll get output which includes every combination.\nThere 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`).\n\n## Programmatically building a skeleton\n\nThe API for `SkeletonGenerator` is documented in docstrings so you can generate skeletons programmatically.\nSee the examples in `examples/` for ideas on how to do it.\n\nEach `SkeletonGenerator` is only responsible for a single section of a full skeleton.\nIt keeps a fixed rarity and frame code, which simplifies the implementation quite a bit.\nIf 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.\n\n## Fan content policy\n\n`demilich` is unofficial Fan Content permitted under the [Fan Content Policy][fan-content].\nNot approved/endorsed by Wizards.\nPortions of the materials used are property of Wizards of the Coast.\n\u00a9Wizards of the Coast LLC.\n\n[fan-content]: https://company.wizards.com/en/legal/fancontentpolicy\n",
"bugtrack_url": null,
"license": null,
"summary": "Demilich, the MTG skeleton wizard",
"version": "1.2.0",
"project_urls": {
"Bug Tracker": "https://github.com/vtbassmatt/demilich/issues",
"Documentation": "https://github.com/vtbassmatt/demilich",
"Homepage": "https://github.com/vtbassmatt/demilich",
"Repository": "https://github.com/vtbassmatt/demilich"
},
"split_keywords": [
"game",
" tcg",
" mtg",
" magic"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1c948effe2ce246d88b7954ee6b081ced0850c5092da76aee475a50084d59b19",
"md5": "cf34ead2d974d8b609547a251265da8f",
"sha256": "748ad73e83966da6dee35233f56740facb7ef5c78654f65b4feae6b34849791e"
},
"downloads": -1,
"filename": "demilich-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cf34ead2d974d8b609547a251265da8f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 24662,
"upload_time": "2025-01-01T15:03:51",
"upload_time_iso_8601": "2025-01-01T15:03:51.147005Z",
"url": "https://files.pythonhosted.org/packages/1c/94/8effe2ce246d88b7954ee6b081ced0850c5092da76aee475a50084d59b19/demilich-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2c051beb81bbfffc61fa854c808a1879ef332f252b455b33a585231c5a125323",
"md5": "34958f80f89b25742afcf4f567a91326",
"sha256": "3c528325131707637259033742d91618e154398fd5c16586cb74467fe0561f7e"
},
"downloads": -1,
"filename": "demilich-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "34958f80f89b25742afcf4f567a91326",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 22899,
"upload_time": "2025-01-01T15:03:52",
"upload_time_iso_8601": "2025-01-01T15:03:52.167902Z",
"url": "https://files.pythonhosted.org/packages/2c/05/1beb81bbfffc61fa854c808a1879ef332f252b455b33a585231c5a125323/demilich-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-01 15:03:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vtbassmatt",
"github_project": "demilich",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "demilich"
}