KittyTrouble / Ygopro-Card-Creation

Documentation regarding Ygopro card creation
12 stars 3 forks source link

Adding cards to cards.cdb

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.

Step 1: Download prerequisite

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.

Step 2: Open cards.cdb

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.

Step 3: Edit texts

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:

Step 4: Edit datas

Next do the same steps in the data sub-database. The records you will edit are as follows:

Step 4b: Choosing a card's type

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.

Step 4c: Choosing a monster's race and attribute

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

List of attributes

Step 5: Including the card's image

The 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.

Step 6: Scripting

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: