A card in EDOPro is defined by the following three components:
- An entry in a card database containing the card's properties such as its stats and text.
- A card script that implements how the card behaves in a Duel, unless it's a non-Pendulum Normal Monster.
- Optionally, a card image that the simulator will use when displaying the card.
Cards are identified by their "passcode" or ID, which must match across the database, script, and image.
Card databases
Card databases are files containing card information. They have the .cdb
file extension, and each .cdb
file may contain multiple entries.
Each entry in a database represents a different card, identified by its passcode in the id
field. For example, if a card's passcode is 86993168
, then its entry in the database should have 86993168
under id
. This ID is what's used to determine which script and image is used for the card.
Programs to use
The following programs are specialized to work with .cdb
files, providing an intuitive visual interface for defining cards:
- Datacorn
- DataEditorX, often referred to as DEX
Additional DataEditorX setup
If you plan to use DataEditorX, you may need to do some additional steps to set it up. Its default language is Chinese, but the page linked above includes instructions on how to change it. The strings it uses are also not up-to-date with EDOPro, so you will need to replace cardinfo_english.txt
with this file to have more accurate strings.
Since .cdb
files are actually just SQLite3 files with a different file extension, you can also use any program that can work directly with SQLite3, such as the following:
However, unlike with Datacorn and DataEditorX, using these will require you to manually calculate the values to enter in each database field, which have their own particular rules. If you choose to work with .cdb
files this way, a detailed guide of the database schema can be found here.
Card scripts
Card scripts implement a card's behavior in a Duel, mainly consisting of its effects and conditions. The scripts are written in the Lua language. Each card must have its own script, except non-Pendulum Normal Monsters.
A script file's name should start with c
followed by the card's passcode, then the .lua
file extension. For example, if a card's passcode is 86993168
, then its script's filename should be c86993168.lua
.
Programs to use
.lua
files are just text files, and any text editor can be used to create or edit them. However, it is recommended to use one that provides at least syntax highlighting for Lua. Some options are:
- Notepad++
- VSCodium (or regular VSCode)
- Kate
- Sublime Text
Card images
Card images are optional and purely for visual purposes. They do not affect how cards work, but help users easily identify cards. If a card does not have a corresponding image, the simulator will display a placeholder image instead.
If provided, the images should be in JPG
or PNG
file format. The default images used by the simulator are 177x254 pixels, and it is recommended to use images with the same dimensions or a similar aspect ratio.
A card image's filename should be the card's passcode followed by the .jpg
or .png
file extension. For example, if a card's passcode is 86993168
, then its image's filename should be 86993168.jpg
.
Field images
EDOPro also supports displaying images as the field background while a Field Spell is active. The image is typically the Field Spell's artwork (without the card frame), and must be provided separately from the actual card image.
If provided, these images should also be in JPG
or PNG
format, and the recommended dimensions are 512x512 pixels. The filename should also be the Field Spell's passcode followed by .jpg
or .png
.
Programs to use
There are several websites that allow you generate Yu-Gi-Oh! card images. In particular, you could use one of the following:
Where to place the files
The simplest way to add a card to the simulator is through the expansions
folder found in your local installation folder (the same folder where you can find EDOPro.exe
).
- Databases (
.cdb
files) should be placed in theexpansions
folder. You will also see some of the default.cdb
files used by EDOPro in that folder. Refrain from editing those files; when adding your own cards, you should create a separate.cdb
file for them instead. - Scripts should be placed in
expansions/script
(meaning thescript
folder inside theexpansions
folder). - Images (
.jpg
or.png
files) should be placed inexpansions/pics
. Field images should be placed inexpansions/pics/field
.
If any of these folders do not exist, you can create them.
Check your file and folder names
A common issue when trying to add cards is having subtly mismatched file or folder names. Keep in mind the following:
script
should be singular, notscripts
expansions
should be plural, notexpansion
pics
should be plural, notpic
- script files should start with
c
, such asc86993168.lua
- image files should not start with
c
, such as86993168.jpg