This guide will help you add new cards to the cards.cdb file. This covers all aspects of card that is not the actual scripting of a card. I have written this guide in a manner that will help you create new cards from scratch rather than merely editing existing cards.
The first step you need is to download Sqlite Expert personal. The link is http://www.sqliteexpert.com/download.html. Note that there is an option for the pro version, you don't need that, just the free version is fine.
This can be done either by right clicking cards.cdb in your ygopro folder and choosing Open With... Sqlite Expert, or by first opening Sqlite Expert and opening it from within. Note if you do the latter, you will need to have it search for all files since .cdb isn't a recognized extension.
You can see that to the left, there are 2 sub-databases, datas
and texts
. You need to edit both of them to add a card to ygopro. First, we will edit texts, so click texts
followed by clicking the data
tab to the right.
You will see a list of entries. To add a new card, click the button to add a new card to the file. You will see a new entry with a bunch of null values. Double-click one of those values and you will see a screen allowing you to edit all of the entries.
Here is a list of the values to edit and what they do:
RecNo
: Leave blank, it will take care of this for you.id
: The number found to the lower left of the card. It must be a unique number.name
: The card's namedesc
: The card's descriptionstr1
-str16
: add a space to each of them, because leaving them null can crash ygopro, these are the prompts that come up.Next do the same steps in the data sub-database. The records you will edit are as follows:
id
: Must match the id you entered in Step 3.ot
: The region. Enter 1 for OCG, 2 for TCG, 3 for TCG/OCG, 4 for Anime, 0 for blank.alias
: Enter 0 normally, if the name is treated as another name (such as the Harpie Ladies) while in Deck, you will enter that card's id here.setcode
: Archetype number. Says that a card belongs in a certain archetype. Each archetype must be given a unique number.
type
: the type of card, for example Spell Card, Fusion Monster, etc. See section 4b for what to enter here.atk
: the ATK of the monster, 0 if spell/trap.def
: the DEF of a monster, 0 if spell.trap.level
: the Level/rank of a monster, 0 if spell/trap.
race
: the type of monster, see 4c, 0 if spell/trap.attribute
: the attribute of the monster, see 4c, 0 if spell/trap.category
: used for finding cards in the deck constructor, 0 if nothing is specified.A card's type is given by adding combinations of tags together to form the type of card that you want. Each tag is based on a power of 2 so that when you add them together, each combination will always be unique.
You will never really use a tag by itself. The exception are the Spell and Trap tags, which default to Normal Spells/Traps as those have no icon. However, I am including them for completeness as sometimes you might have to do something new.
Here are a few examples: The "Monster" tag is 1, you will add it to all other tags that are monsters. So for "Monster|Normal" you will add the Normal tag, 16, plus the Monster tag, 1, to get 17. Tuner is a tag that can be added to Normal monsters or Effect monsters, so you add the code for Tuner (4096) plus the codes for Normal and Monster or the codes for Effect and monster to get the code you want.
All existing combinations are found in the chart below. However, suppose that you need to include a new combination that does not previously exist. Say, a Fusion Monster who is also a Union Monster, Tuner, and has an Effect. You would look up each of those codes: 1 (Monster) + 32 (Effect) + 64 (Fusion) + 1024 (Union) + 4096 (Tuner), and 5217 would be your new code. Hope that makes sense.
1
: Generic Monster (Used in combination with other tags)2
: Spell Card (Normal by default)4
: Trap Card (Normal by default)8
: ??? (Used by tokens)16
: Normal
32
: Effect
33
for Effect Monster (32 + 1)64
: Fusion
65
for Fusion Monster (64 + 1)97
for Fusion / Effect Monster (64 + 32 + 1)128
: Ritual
129
for Ritual Monster (128 + 1)130
for Ritual Spell (128 + 2)161
for Ritual / Effect Monster (128 + 32 + 1)256
: Trap Monsters (I don't know what this does, but it's not used in any cards I see. Use Continuous Traps instead for Trap Monsters.)512
: Spirit
545
for Spirit Monster (With effect, 512 + 32 + 1)1024
: Union
1057
for Union Monster (With effect, 1024 + 32 + 1)2048
: Gemini
2081
for Gemini Monster (With effect, 2048 + 32 + 1)4096
: Tuner
4113
for Tuner / Normal Monster (4096 + 16 + 1)4129
for Tuner / Effect Monster (4096 + 32 + 1)8192
: Synchro
8193
for Synchro Monster (8192 + 1)8225
for Synchro / Effect Monster (8192 + 32 + 1)12321
for Synchro / Tuner / Effect Monster (8192 + 4096 + 32 + 1)16384
: Token
16401
for Actual Token (Uses 16384 + 16 for Normal + 8 for ??? + 1 for monster)32768
: ??? (I do not know what this is used for.)65536
: Quick-Play
65538
for Quick-Play Spell Card (65536 + 2)131072
: Continuous
131074
for Continuous Spell Card (131072 + 2)131076
for Continuous Trap Card (131072 + 4)262144
: Equip
262146
for Equip Spell Card (262144 + 2)524288
: Field
524290
for Field Spell Card (524288 + 2)1048576
: Counter
1048580
for Counter Trap Card (1048576 + 4)2097152
: Flip
2097185
for Flip Effect Monster (2097152 + 32 + 1)4194304
: Toon
4194337
for Toon Monster (With effect, 4914304 + 32 + 1)8388608
: Xyz
8388609
for Xyz Monster (8388608 + 1)8388641
for Xyz / Effect Monster (8388608 + 32 + 1)16777216
: Pendulum
16777233
for Pendulum Normal Monster (16777216 + 16 + 1)16777249
for Pendulum Effect Monster (16777216 + 32 + 1)Skip this section if the card is not a monster. Multi-typing is the same as in the card type section. However, it is unlikely that such a monster will ever exist. Nonetheless, you could add two types and attributes together to get a new type, if you wanted to.
List of races
1
: Warrior2
: Spellcaster4
: Fairy8
: Fiend16
: Zombie32
: Machine64
: Aqua128
: Pyro256
: Rock512
: Winged-beast1024
: Plant2048
: Insect4096
: Thunder8192
: Dragon16384
: Beast32768
: Beast-Warrior65536
: Dinosaur131072
: Fish262144
: Sea Serpent524288
: Reptile1048576
: Psychic2097152
: Divine-beast4194304
: Creator God8388608
: WyrmList of attributes
1
: EARTH2
: WATER4
: FIRE8
: WIND16
: LIGHT32
: DARK64
: DIVINEThe image needs to be the full image of the card, not only the "image" portion. You can use Yu-Gi-Oh CardMaker if the card is a custom card, otherwise a full scan is needed.
First, shrink your card image size to 177 x 254
and save it as your card id with a .jpg
extension into your pics folder. Then, shrink it to 44 x 64
and save it with the same name into the thumbnail
folder inside your pics
folder.
If your card is a field spell, however, you will also need a 512 x 512
.png
of just the image part. That goes in the field
folder located within the pics
folder.
Next, you need to script your card. That will be covered in the next tutorial.
Credits: I used the following sources as well as my own experiments to make this tutorial: