Skip to content

An MTG booster pack generator for Tabletop Simulator.

License

Notifications You must be signed in to change notification settings

skykanin/DraftGen

Repository files navigation

DraftGen

GitHub issues by-label simple haskell license

An MTG booster pack generator for Tabletop Simulator.

Documentation

options

DraftGen lets you generate booster packs for MTG. The default options are set to simulate the rules and drop rates of regular booster packs. The default card set to generate packs from is the latest core set. These options can be changed by passing arguments through the command line. All arguments are listed in the help section dg --help. DraftGen will print the paths where the resulting json files are written depending upon your platform.

Lastly copy the json files to your Saved Objects folder for Tabletop Simulator and you can access them in the game.

There is also an argument get-card which lets you search for a single card. This can be used to retrieve helper cards such as a double-faced substitute card.

Develop

Prerequisites

If you want to use the development environment includeded in this repository you will need to install nix and enable experimental features by running:

  • nix-env -iA nixpkgs.nixFlakes
  • mkdir ~/.config/nix && echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf

Start contributing!

Run nix develop to enter the development environment.

This adds everything listed in the flake.nix files devShell attribute to your path. It is also possible to automatically hook into this environment using direnv see instructions on how to set this up here.

Run

On the first run you will be prompted to run cabal update.

After that you can run the project with cabal run. To pass command line arguments to cabal you run cabal run <artifact> -- <args go here>.

Build

To build the project using cabal you can run cabal build [...opts]

Retrieve changelog

To get the changelog between the latest tagged commit and the previous tagged commit one can run cabal run -z GenChangelog.hs to print out the list.