Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Editing the .toc File

nzxth2 edited this page Apr 10, 2020 · 1 revision

What's a .toc file?

YGO_2020.toc is located next to your YuGiOh.exe. It's actually just a text file, you can open it with the text editor of your choice. If you do, you will notice that it lists all files that the game uses. The unpacker uses this .toc file to know which files to unpack/repack.

Why edit the .toc file?

As mentioned above, the repacker uses this file to know which files to repack. That means even if you try to add a new file (a new image, for instance) to your game, the repacker will ignore that file since it only goes for the files that are listed in the .toc file. If you are only modifying existing files, then this doesn't cause a problem for you.
If you try to add new files to the game however, you need to list them in the .toc file so the repacker knows that it needs to include them.
Note: this doesn't apply to anything inside the .zib directories. Those directories are:

  • 2020.full.illust_a.jpg.zib
  • 2020.full.illust_j.jpg.zib
  • decks.zib
  • busts.zib
  • packs.zib

Any file that you add into any of these directories are compressed into a single corresponding .zib file before repacking. Essentially that means you don't have to add any files that you've created in these directories to your .toc file.

How to edit the .toc file?

Pretty easy. Don't modify any existing lines. For each new file that you want to add, create a new entry. An entry is just a single line with 3 values: two numbers and the file path of the new file that you want to add. The numbers can be anything, you can just set them to 0. They don't have any use for repacking except that the repacker expects two numbers there. Just put any two numbers so that the repacker knows how to split/interpret the line. The file path should be self-explanatory, just take a look at the other file paths in the .toc file if you aren't sure.