-
Notifications
You must be signed in to change notification settings - Fork 4
Generating card images
Once you have your expansions created and properly converted to a .cdb
, you might now want to add images for your cards. Usually, what you'd have to do is to create an artwork for each card, then edit that into a card template, to turn it into an actual Yu-Gi-Oh! card. With YGOFabrica, however, you can skip the second part.
When you run ygofab new
to create a project, some folders are created, and among them are artwork
and pics
. artwork
is a folder where you should place the image files of your card artwork, i.e. their illustration. Much like the pics
folder inside the game, you should use the id of each card as the file name. The pics
folder inside the project, however, has a slight difference: it contains subfolders, each corresponding to a different picset, and those subfolders will contain the proper card pics. When you run the command below, it takes your artwork from the artwork
folder, takes card data from the .cdb
of an expansion
, and creates the corresponding card pics for them, placing the output inside a subfolder of pics
. The following image illustrates this process.
$ ygofab compose [-e <expansion> | -Eall] [-p <picset> | -Pall] [--verbose]
Reads a .cdb
file(s) from a configured expansion
(s) and image files in the artwork
folder, and generates card pics according to a configured picset
(s).
The -e
flag specifies which expansion
should be used, or all of them, if -Eall
is specified. The -p
flag specifies which picset
should be used, or all of them, if -Pall
is specified. In both cases, if neither flag is specified, default values will be selected. If you use the --verbose
flag, you'll see a detailed output of how cards are being generated, showing their layers.
In the next page, there is a detailed explanation of all the possible parameters that can be used in a picset
. But, an important note here is that both expansion
and picset
might contain a locale
. This locale
is used by ygofab compose
only to decide in which language it should create textual elements of the card pic, it doesn't alter the program interface language. If locale
is specified in both places, picset.locale
takes precedence.
Currently, ygofab compose
supports all card types from standard Yu-Gi-Oh! format (i.e., no support for Skill Cards, or Rush Duel). But it also offers combinations of types that are currently not available, like Ritual/Pendulum and Link/Pendulum, which are technically possible. (I tried my best to fit the Link Arrows with the Pendulum frame.)
💡 Trivia: YGOFabrica as a whole was initially intended to be this single feature. Only later it became a project manager, with the feature being implemented in the so called "Composer module".
This feature is a little different from the others, though, for its ability to work independently from a project. There could be cases in which you're not necessarily creating any project, but you want to update currently existing cards with better or new artwork. That's where the ygopic
command comes in, it is a general form of ygofab compose
.
$ ygopic <mode> <art-folder> <card-database> <output-folder> [-v | --version] [--verbose] [--help] [options]
Reads a card-database
file and image files in the art-folder
, and generates card pics according to the configured mode
and options
, placing them in the output-folder
.
--verbose
has the same effect as in ygofab compose
, --help
displays a message explaining each option. Once again, a complete list of all the options and their meanings is provided in the next page, since they are the same as the picset
configurations. Notice that the mode
configuration, which is mandatory for picset
s is a mandatory argument in this command.