1
0
Fork 0
mirror of https://github.com/ldericher/fftcgtool synced 2025-01-15 15:02:59 +00:00
(mirror) Card import tool for "Final Fantasy TCG Complete" for "Tabletop Simulator"
Find a file
2021-09-03 11:51:43 +02:00
.idea rename commands 2021-09-03 02:45:32 +02:00
fftcg minor fixes 2021-09-03 11:51:43 +02:00
.dockerignore Docker 2021-08-03 02:24:14 +02:00
.gitignore Add README, add docker option 2018-11-02 19:49:35 +01:00
Dockerfile rename commands 2021-09-03 02:45:32 +02:00
fftcgtool.py general quality 2021-09-03 09:32:24 +02:00
LICENSE Python3.9 (typos) 2021-08-09 05:47:25 +02:00
Pipfile use pickle instead of yaml serialization 2021-08-23 13:38:01 +02:00
Pipfile.lock use pickle instead of yaml serialization 2021-08-23 13:38:01 +02:00
README.md README 2021-09-03 10:11:52 +02:00

fftcgtool

Card import tool for Final Fantasy TCG Complete mod for the Tabletop Simulator

Usage

usage: fftcgtool [-h] [-v] [-l LANG] [-s] {opuses,ffdecks} ...

Imports FFTCG cards for TT-Sim.

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         increase output verbosity
  -l LANG, --language LANG
                        language for imported objects
  -s, --stdout          print the deck files in a zip archive to stdout, skip creating JSONs on disk

subcommands:
  Import either an Opus to extend the mod, or import a deck to play right away.

  {opuses,ffdecks}      valid subcommands

Examples

Import Opuses

fftcgtool opuses 14

Import Opus XIV.

Card face images are saved to the out/images/ subdirectory.

For each of the six base elements, an "elemental deck" is saved to the out/decks/ subdirectory. An elemental deck contains all cards of that element. Light and Darkness element cards is contained in a combined elemental deck. Multi-element cards are contained in another combined elemental deck.

Additionally, the card database zip is saved to the out/ subdirectory. It contains all card data imported so far.

Finally, you will be asked to upload each card face image and provide a link.

Non-existent subdirectories will be created.

fftcgtool opuses --help

Show more info about the opuses subcommand.

fftcgtool opuses -n 11 chaos 4 8 13

Import the "Boss Deck Chaos" and the Opuses IV, VIII and XIII using 11 parallel processes.

For small Opuses like the Boss Cards, only a single deck is saved to the out/decks/ subdirectory.

Import decks from ffdecks.com

fftcgtool ffdecks 6272690272862208
# or
fftcgtool ffdecks 'https://ffdecks.com/deck/6272690272862208'

Import the deck WOL Mono Fire🔥 from ffdecks.com.

You will need a card database zip with all needed cards for this to work. Cards not found in the zip will be omitted.

The imported deck will be saved to the out/decks/ subdirectory. It will be created if it doesn't exist.

fftcgtool ffdecks --help

Show more info about the ffdecks subcommand.

Installation

Using your system's python3

  1. Make sure you have at least python version 3.9 installed. To test, run python --version or similar. Also, pipenv should be installed for that python version. Refer to pipenv installation guide if needed.
  2. To install fftcgtool dependencies, run pipenv install --deploy from project root directory.
  3. Run pipenv run ./fftcgtool.py from project root directory.
  4. You can alias fftcgtool='PIPENV_PIPFILE="'$(pwd)'/Pipfile" pipenv run "'$(pwd)'/fftcgtool.py"' from project root directory to define fftcgtool shorthand for your running shell.

Using a docker container

Caveat: This simplistic container runs fftcgtool as root user. Directly generated files will thus be owned by root:root by default.

  1. Make sure you have a working installation of docker software.
  2. Update your local image.
    • Either use docker pull ldericher/fftcgtool.
    • Or build it yourself: Clone this repository and run docker build --pull --tag ldericher/fftcgtool . inside.
  3. Run docker run --rm -it -v "$(pwd)/out:/app/out" ldericher/fftcgtool in any directory.
  4. You can alias fftcgtool='docker run --rm -it -v "$(pwd)/out:/app/out" ldericher/fftcgtool' to define fftcgtool shorthand for your running shell.

Output files will go to subdirectory ./out. CLI arguments are supported as docker run --rm -it -v "$(pwd)/out:/app/out" ldericher/fftcgtool -n 2 5 (imports Opus 5 using 2 threads)

To-Do-List

  • deck subcommand, which would read a custom deck list in text format
  • db CLI parameter, which card db zip to use, also load zip from URL
  • rw CLI parameter, enable writing to db zip file (incompatible with zip URL)
  • stdout CLI parameter, where to put the decks zip file