Software for creating Master Duel mods:
- AssetStudio (free)
- UABEA (free) or UnityEx (commercial)
- Any free image editor like GIMP/MS Paint/Paint 3D or Adobe Photoshop (commercial)
- DDS plugin for Adobe Photoshop (only necessary if you want to use UnityEX)
Guide:
First you'll have to find the game files with the graphics you want to edit, which are located in these two directories:
C:\Program Files (x86)\Steam\SteamApps\common\Yu-Gi-Oh! Master Duel\LocalData\0000
C:\Program Files (x86)\Steam\SteamApps\common\Yu-Gi-Oh! Master Duel\masterduel_Data
The C:\Program Files (x86)\Steam part can differ if you changed the path manually. The first folder contains most of the game files. The second one contains basic game files and the ones from the tutorial. You can find the exact Unity file name of every card artwork, sleeve/protector image, wallpaper and more in this spreadsheet (last updated for game version 2022-08-05).
Also, here's a more up-to-date spreadsheet with just the card IDs and the file names, so you can look up a card ID here (it's in the address bar after "cid=" if you are on the page of a specific card) and find the file name for the card ID in the spreadsheet.
If you want to edit other graphics, you can find them with the app AssetStudio which can load whole folders at once. You can do that by clicking on File and Load Folder in the menu bar. Please note that this can take a few minutes due to the large number of files, and it initially eats up more than 17 GB of RAM for the first folder on my PC, so if you have less RAM, the rest will likely be automatically loaded into the page file on your PC which takes even longer.
You can also just load the newest files into Asset Studio. To find them you can use the app Total Commander and follow these steps:
- Go to the folder "...\Yu-Gi-Oh! Master Duel\LocalData\????????\0000"
- Press [Alt] + [F7] to search.
- Go to the Advanced tab.
- Tick the option "Date between:" and enter the date of the day the latest update was downloaded in the box to the right.
- Tick the option "Attributes" and untick the attribute "Directory" to exclude folders from the search.
- Click the "Start search" button.
- Click the "Feed to list box" button after the search process has finished.
- Press [×] on the numpad to select all files.
- Drag'n'drop the files into Asset Studio.
When AssetStudio has loaded the files, click on Filter Type and Texture2D in the menu bar, then switch to the Asset List tab.
The card artworks are in one of these containers:
assets/ressources/card/images/illust/common/
assets/ressources/card/images/illust/ocg/
assets/ressources/card/images/illust/tcg/
- common: contains card artworks that are the same in all language versions
- ocg: contains card artworks for the mostly uncensored Japanese version
- tcg: contains altered card artworks for all other language versions.
To find a specific card artwork, enter its card ID in the Filter bar and press [Enter]. To find the ID for the card you're looking for, you can look in the spreadsheet linked above or on this website. There you can enter the card name in the Enter Keyword field, press [Enter] and click on a card. The card ID is then displayed in the URL bar after "cid=".
In the Asset List tab of AssetStudio you can right-click on a file and select Show original file which shows the file in Windows Explorer.
If you found the right file and use UABEA:
- In Windows Explorer, make a backup of the file in a different folder. This step is optional, but better safe than sorry.
- Make a copy of the original file in the same folder by selecting it and pressing [Ctrl] + [C] and then [Ctrl] + [V] on your keyboard, or use the right-click context menu for that.
- Open the app UABEA.
- Click File → Open and open the copy of the file you want to edit, or drag'n'drop it into UABEA.
- If the file is compressed, UABEA will ask you to decompress the file, in this case click the Memory button.
- If you opened a copy of the file data.unity3d in step 4, click on the drop-down menu that initially says globalgamemanagers and select resources.assets.
- Click the Info button to open the Assets info window.
- Select the row with the Texture2D type.
- Click Plugins, select Edit texture and click OK.
- Optional step for best quality but larger file size: Change the Texture format to RGB24 for graphics without transparency (e. g. card illustrations or sleeves/protectors) or to RGBA32 for graphics with transparency (e. g. wallpapers).
- Click Load, open the image file you want to replace the original image with and click Save.
- Optional steps if you want to change the brightness (light power) of protectors/sleeves:
- Select the row with the Material type. (Note: It only exists in one of the two sleeve files.)
- Click the Export Dump button and save the text file
- Open the text file with a text editor and search for LightPower.
- One line below you can change its value after float second =. You should set the value between 0 and 0,1. Any higher value may look too bright in game. You can find all default LightPower values in the spreadsheet linked above.
- Save the text file and switch back to UABEA.
- Make sure the row with the Material type is still selected, click the Import Dump button and open the text file you just edited.
- End of optional steps
- Back in the Assets info window click File and Save. After that close this window.
- In the UABEA main window click File and Save as....
- Select the file with the original name and click Yes when the app asks you to overwrite.
- Optional steps if you want to compress the file to save disk space (doesn't work for the data.unity3d file):
- In the UABEA main window click File → Close → File → Open and open the file with the original name.
- Click File → Compress.
- Enter a different file name for the output file and click Save.
- Choose your desired compression method.
- Copy the name of the original file to the clipboard and delete the file.
- Rename the output file from step 26 to the original file name from the clipboard.
If you found the right file and use UnityEx:
- Make a backup of the file.
- Open the app UnityEx.
- Drag and drop the file into UnityEx.
- Right-click any of the files and chose Export → Export all textures.
- In Windows Explorer, open the folder Unity_Assets_Files in the same directory and all subsequent folders until you're in the Textures folder.
- Open the DDS file with Adobe Photoshop (DDS plugin needed, see links above), edit it to your liking and save it.
- In the NVIDIA Texture Tools Exporter window, you can use these options for the highest quality. For non-transparent textures like card artworks and sleeves/protectors you can set the Format to 8.8.8 BGR 24 bpp | unsigned to save disk space.
- After choosing the options, click the Save button in the bottom right. The NVIDIA Texture Tools Exporter remembers its settings so you don't have to check them every time.
- Switch back to UnityEx.
- Optional steps if you want to change the brightness (light power) of protectors/sleeves:
- Select the row with the name PMat.mat. It should be highlighted now.
- Click the button RawToDumpXML.
- In the Windows Explorer window from step 5, go up one folder. You should be in a folder that starts with CAB-. Now open the Dump folder.
- Open the file PMat.mat.xml with a text editor and search for LightPower.
- One line below you can change its value after value=". You should set the value between 0 and 0,1. Any higher value may look too bright in game. You can find all default LightPower values in the spreadsheet linked above.
- Save the file and switch back to UnityEx.
- Make sure the row with the Material type is still selected and click the button DumpXMLToRaw.
- End of optional steps
- Import the edited file(s) by clicking on the Import files button. This should only take a few seconds. After that you'll be able to see the edited graphic in game if you did everything correctly.
Batch exporting/importing files with UnityEx:
- Download the archive from the third link with "bat" in it from the UnityEx thread and extract it.
- In the batch files you want to use for Master Duel you need to insert the three characters ;*. after *.unity3d because most of the Unity files of Master Duel don't have a file extension.
- Also, you need to add the UnityEx directory to your PATH Environment Variables for the batch files to work.
- Copy the batch files you need to the directory with the game files you want to edit.
- Run the respective bat file to do a batch import/export. For the card illustrations, sleeves (protectors) and any other graphics you need the textures batch files.
Replacing Duel Fields, Field Parts (graveyards) and Mate's Bases:
To do this, you just need to rename files. I listed them all in the spreadsheet linked above. The Qliphort duel field is called "Spellbook Star Hall" and the Lightsworn/Duelist Cup one "Colosseum" in game and in my spreadsheet.
For example, if you want to change the duel field "World Legacy Ruins" to the "Spellbook Star Hall" one, do the following:
- Make a copy of the Spellbook Star Hall files 61140db1 and 9e59c7e8 in the directory \Yu-Gi-Oh! Master Duel\LocalData\????????\0000\.
- Rename the copy of the file 61140db1 to b57af26f.
- Rename the copy of the file 9e59c7e8 to 4b96fb8b.
- Make a backup of the original World Legacy Ruins files b57af26f and 4b96fb8b.
- Copy the renamed Spellbook Star Hall files to the locations of the original World Legacy Ruins files and overwrite them.
Python scripts for processing CARD_*, DLG_* and WORD_* TextAssets from the data.unity3d file or ".\LocalData\????????\0000" folder:
CARD_decrypt.py / Credit: akintos from GitHub.
CARD_encrypt.py / Credit goes to crazydoomy#4471 for editing the above script for encrypting
CARD_decrypt_Desc+Indx+Name.py / Credits: same as above
- Decrypts the CARD_Name, CARD_Desc and CARD_Indx files in one go.
CARD_Name+Desc_split.py / Credit: timelic
- Splits the CARD_Name and CARD_Desc files, so that every name and description is in one line, and converts them to JSON.
CARD_merge+calc_index.py / Credit: timelic
- Merges the CARD_Name and CARD_Desc JSON files and calculates the CARD_Indx file. The original files will be overwritten by this, so make a backup beforehand.
Find crypto key script
Complete folder of all of my Python files for MD
Additional info:
- The CARD_Name files contain all card names in a specific language.
- The CARD_Desc files contain all card descriptions like effects and flavor text in a specific language.
- The CARD_Indx files contain the 4-byte hexadecimal offsets of the card names and descriptions in their respective files in little-endian byte order. The offset of the the first card name "Insect Monster Token" (ID: 3900) in the CARD_Name file is at the offset 0x08 and the first card description in the CARD_Desc file is at offset 0x0C. The offset of the the second card name "Kuriboh Token" (ID: 3901) is at offset 0x10 and so on.
- All 3 files mentioned above are sorted by card ID.
- The Card_Pidx files contain the IDs of the first card effect of each card (2 bytes) for the Card_Part files in little-endian byte order, followed by 0x00, then a single digit for the number of regular card effects, and the last digit indicates the number of Pendulum effects, which results in 4 bytes for each card. If a card doesn't have any effects, all of the 4 bytes are 0x00. The first card effect ID is at offset 0x04.
- The Card_Part files contain the start and end offset differences of each effect in the CARD_Desc files in relation to the card description offset in the CARD_Indx file. The offset differences are 2 bytes in size each. The first card effect start offset difference is at file offset 0x04.
- The CARD_Prop files contain info about the properties of each card which are stored in 8 bytes per card. The first 2 bytes are the card ID in little-endian byte order. The 3rd byte determines the card type and partially the attribute:
- The DLG_Text file contains contains all in-duel text, like "Chain another card or effect?"
- The WORD_Text file contains all card types, spell and trap types, and monster types and attributes.
- There are also *_Indx files which belong to the two files above which should contain the start offsets for each line.
Location of the CARD_* files used by the game in the game's folder:
English:
- CARD_Desc: .\LocalData\????????\0000\95\95e73521
- CARD_Indx: .\LocalData\????????\0000\e4\e43e4f67
- CARD_Name: .\LocalData\????????\0000\c0\c071e773
- Card_Pidx: .\LocalData\????????\0000\fd\fd071f0b
- Card_Part: .\LocalData\????????\0000\e6\e63ab74f
Japanese:
- CARD_Desc: .\LocalData\????????\0000\70\709556c6
- CARD_Indx: .\LocalData\????????\0000\01\014c2c80
- CARD_Name: .\LocalData\????????\0000\25\25038494
- Card_Pidx: .\LocalData\????????\0000\18\18757cec
- Card_Part: .\LocalData\????????\0000\03\0348d4a8
Exporting the above files with Asset Studio:
- Load the files by using drag'n'drop or File → Load File or Load Folder.
- Click on the Asset List tab.
- Click on Filter Type → TextAsset.
- Select the files you want to export, then right-click one of them.
- Select Export selected assets.
- Choose a location and click on Select folder.
Importing the above files with UABEA:
- Create a backup of the original file you want to modify.
- Load the original file into UABEA by using drag'n'drop or File → Open, then click on Memory.
- Click on Info.
- In the Assets Info window, select the row with the TextAsset type.
- Click on Plugins → Import .txt → Ok.
- Enter an asterisk (*) in the file name box and press [Enter] to display all files of all types, or use the drop down box to the right.
- Select the CARD_Desc, CARD_Indx, or CARD_Name file, depending on the file you opened in step 1.
- Click on File → Save → OK.
- Close the Assets Info window.
- Click on File → Save.
- Repeat steps 1 to 10 for the other files that were modified. The CARD_Indx file is always modified when you change anything in the CARD_Desc or CARD_Name files.
Decrypting IDS_* TextAssets
This can be done with QuickBMS and the Yugioh Ydlz script.
IDS files overview:
- IDS_ITEM contains the names of all accessories and other items and item categories.
- IDS_ITEMDESC contains the descriptions of all accessories and other items.
- IDS_SYS contains, among other things, the text written on top of card attributes, like "Fire".
Related links:
247 comments
If you go into your masterduelmeta's profile there's a "Show condition and activation highlights" setting. What it does is it highlights in green background clauses before colons and in red background clauses before semicolons. I'm not sure if styling card text is trivial or not. If it's too hard I'd still like to suggest these QoL improvements:
- have conditions and activations highlighted in some way, e.g. [[Square brackets for activation]] and {{Curly braces for condition}} (I'm not sure this would look good in practice, some experimentation needed)
- highlight in some way (e.g. UPPERCASE) keywords like Quick-Effect, destroy/destroying, negate/negating/negated.
- (probably more annoying to get right) detect and condense soft once-per-turns and hard once-per-turns into simply SOPT and HOPT.
- personally I think I'd prefer separating paragraphs not with two newlines but with one newline and a list item marker, e.g "\n• "
Coloring the actual card text is possible, but the game already colors some text in cyan if you can activate the effect, so that feature would get lost.
Adding a list item marker before each paragraph wouldn't look good in every card text IMO because multiple choice effects already contain that character, for example, Vanquish Soul Caesar Valius. I could use another character like a square or a circle, but that looks a little confusing at first glance. I think the best way to do this would be to replicate the OCG style which has numbered effects like this, but I would have to rewrite a large part of this script. I'm not motivated enough to do that because writing that script was already very hard for me because I'm just an amateur coder.
Here are some more examples of how the card text would look with brackets, in bold, italics, with capitals, etc. Underlined doesn't seem to be possible. You can also find a screenshot of how it looks in YGO Omega there. I think capitals look best for keywords and SOPT/HOPT keywords would be a great improvement, but the brackets would be overkill.
EDIT: I see now this must be in the Card_Part asset
After thinking thoroughly about the numbered card effects, I think I should be able to do it, so I'll try.
These are the formatting tags I know:
<b>TEXT</b> - bold
<i>TEXT</i> - italics
<color=#FFFFFF>TEXT</color>
Yes, the Card_Part asset contains the start and end offset of all card effects in each card description.
You could edit your post instead of spamming. ^^
Is there a script to extract the skeleton rig and animations?
***Update 1*****
I managed to export to .fbx the meshes with their bones.
But I don't know how to export their animations. or how to identify them in the system to export them; I don't know which option does that using AssetStudio.
help, please.
and I changed the main menu art but in the shop "Recommended" part didn't change which texture do I need to change for that?
The shop background is in the file "\LocalData\????????\0000\1f\1f04f4e7".
EN
CARD_Name: c071e773
CARD_Indx: e43e4f67
CARD_Desc: 95e73521
JP
CARD_Name: 25038494
CARD_Indx: 014c2c80
CARD_Desc: 709556c6
Crypto Key: 0x5b
And I would also like to know about attribute icons and Level star.
The card frames are named "card_frame00" to "card_frame19" there.
And the attribute icons, level/rank stars, link arrows, etc. are in the file "sactx-0-1024x512-BC7-CardSpriteAtlas-5bc59b24". The last 8 characters of this file may change after data.unity3d has been updated.
I will try it.