This is a featured article. Click here for more information.

Community:Gates to Infinity DLC Editing Tutorial: Difference between revisions

MDFW - The Mystery Dungeon Tree of Information.
Jump to navigation Jump to search
(Created page with "'''DLC Editing Tutorial''' for {{GameTitle|GatesToInfinity|l|i|}}. This can be useful for making a .cia file that doesn't include {{Gates|unused downloadable content}} (or that only includes such content), or for creating custom DLCs such as custom music or dungeons. ==Required== * Knowledge on how to use command line tools * A .cia file of the original DLC * CTRTool (https://github.com/3DSGuy/Project_CTR/releases/tag/ctrtool-v1.2.0) * MakeROM (https://github.com/3DSGuy...")
 
 
(73 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''DLC Editing Tutorial''' for {{GameTitle|GatesToInfinity|l|i|}}. This can be useful for making a .cia file that doesn't include {{Gates|unused downloadable content}} (or that only includes such content), or for creating custom DLCs such as custom music or dungeons.
[[File:Gates to Infinity - Hacked Dungeon Name.png|alt=Hacked DLC with a modified dungeon name.|thumb|Hacked DLC with a modified dungeon name.]]
'''DLC Editing Tutorial''' is a guide for editing {{Gates|downloadable content}} in {{GatesToInfinityTitle}}. This can be useful for making a .cia file that doesn't include {{Gates|unused downloadable content}} (or that only includes such content), or for creating custom DLCs such as custom music or dungeons.


==Required==
Note that the terminal commands used on this page were used on Linux. On other operating systems, such as Windows, minor adjustments may be required.
* Knowledge on how to use command line tools
 
* A .cia file of the original DLC
If using Windows, make sure file extensions are enabled.
 
==Prerequisites==
* Basic knowledge on how to use command line tools
* A .cia file of the original DLC (named gti_dlc.cia in this tutorial)
* CTRTool (https://github.com/3DSGuy/Project_CTR/releases/tag/ctrtool-v1.2.0)
* CTRTool (https://github.com/3DSGuy/Project_CTR/releases/tag/ctrtool-v1.2.0)
* MakeROM (https://github.com/3DSGuy/Project_CTR/releases/tag/makerom-v0.18.4)
* MakeROM (https://github.com/3DSGuy/Project_CTR/releases/tag/makerom-v0.18.4)


==Extracting the DLC==
The following is only needed for the optional "Modifying the DLC" section.
* 3dstool (https://github.com/dnasdw/3dstool/releases)


===Extracting Contents===
Put the above in the same folder, and open a terminal from that folder.
This is only necessary if you want to make modifications to the DLC.


==Modifying the DLC==
==DLC Filenames==
Contents can be identified by the first part of their filenames.
{{Scrollbox|
* 0000 contains DLC icons and general data. Must be included.
* 0001 contains the dungeon Ivy Park.
* 0002 contains the dungeon Scalchop Beach.
* 0003 contains the dungeon Pika Land.
* 0004 contains the dungeon Axe Rock.
* 0005 contains the dungeon Mount Tepid.
* 0006 contains the dungeon Treat Road.
* 0007 contains the dungeon Poké Forest.
* 0008 contains the dungeon Kecleon Bazaar.
* 0009 contains the dungeon Mt. Travail.
* 000a contains the dungeon Skill Treasury.
* 000b contains the dungeon Ultimate Wilds.
* 000c contains the dungeon Strongest Trail.
* 0032 contains some unknown unused data.
* 0033 contains the Mt. Steel and Battle with Rayquaza music tracks.
* 0034 contains the A New Adventure and Time To Say Goodbye... music tracks.
* 0035 contains the Makuhita Dojo and The Escape music tracks.
* 0036 contains the Thunderwave Cave and The End: Rescue Team music tracks.
* 0037 contains the Great Canyon and Gardevoir in a Dream music tracks.
* 0038 contains the Mt. Blaze and The Giant Star Approaches! music tracks.
* 0039 contains the Mt. Travail and Wigglytuff's Guild music tracks.
* 003a contains the Craggy Coast and Treasure Town music tracks.
* 003b contains the Random Dungeon Theme 2 and The Time Gear music tracks.
* 003c contains the Apple Woods and On the Beach at Dusk music tracks.
* 003d contains the Hidden Land and Through the Sea of Time music tracks.
* 003e contains the Temporal Tower and Dialga's Fight to the Finish music tracks.
* 003f contains the unused Craggy Coast music track twice.
* 004c contains the unused Star Cave music track twice.
* 0062 contains two unused versions of Vast Ice Mountain Peak.
* 0065 contains DLC item graphics.
}}


===Editing Dungeons===
==Extracting the DLC==
 
Run the following command to extract the Contents from the .cia to the current folder.
===Adding Custom Music===
<syntaxhighlight lang="bash">
./ctrtool --contents=contents gti_dlc.cia
</syntaxhighlight>


===Rebuilding Modified DLC===
You can put the files in their own folder for convenience. The rest of this tutorial assumes the contents files are in a folder named "contents", and that this "contents" folder is alongside "makerom" and the other programs downloaded at the start of the guide.


==Rebuilding the DLC==
==Rebuilding the DLC==
Before continuing, you need to create a text file with the name "gtidlc_rom.rsf" and that contains the following text:
Before continuing, you need to create a text file with the name "gtidlc.rsf" and that contains the following text:
<blockquote>
<syntaxhighlight lang="text">
Option:
Option:
   MediaFootPadding: true
   MediaFootPadding: true
Line 28: Line 68:
SystemControlInfo:
SystemControlInfo:
   SaveDataSize: $(SaveSize)K
   SaveDataSize: $(SaveSize)K
</blockquote>
</syntaxhighlight>


After making the desired changes (if any) to the Contents files and rebuilding them (if necessary), choose which Contents files you want to include in your DLC .cia file. Note that "contents.0000.345057da" must be included.
Put this text file in the same folder as "makerom".


Names of the Contents files consist of four numbers/letters (the first part), followed by a dot, followed by a longer sequence of numbers and letters (the second part). When mentioning them in the MakeROM command, you need to add at the end of the filename ":0x", followed by the first part, followed by ":0x", followed by the second part. For example, "contents/contents.0000.345057da" becomes "contents/contents.0000.345057da:0x0000:0x345057da".
Choose from the list at the beginning of the guide which Contents files you want to include in your DLC .cia file. Note that "0000" must be included. Names of the Contents files consist of four numbers/letters (the first part), followed by a dot, followed by a longer sequence of numbers and letters (the second part). When mentioning them in the MakeROM command, you need to add at the end of the filename ":0x", followed by the first part, followed by ":0x", followed by the second part. For example, "contents/contents.0000.345057da" becomes "contents/contents.0000.345057da:0x0000:0x345057da".


These are examples of what the command might look like.
The following are examples of what the command might look like. You can modify the examples, or use the examples as they are if you are satisfied with what they do.


===Example 1: Only Official DLC===
This command makes a DLC .cia file that only contains DLC that was officially distributed.
This command makes a DLC .cia file that only contains DLC that was officially distributed.
<blockquote>
<syntaxhighlight lang="bash">
./makerom -f cia -rsf gtidlc_rom.rsf -o gti_dlc_eu_out.cia -ckeyid 0 -major 0 -minor 1 -micro 0 -DSaveSize=0 -ignoresign -dlc -i contents/contents.0000.345057da:0x0000:0x345057da -i contents/contents.0001.01b526b0:0x0001:0x01b526b0 -i contents/contents.0002.36813de7:0x0002:0x36813de7 -i contents/contents.0003.66574657:0x0003:0x66574657 -i contents/contents.0004.3983227e:0x0004:0x3983227e -i contents/contents.0005.6e4b7235:0x0005:0x6e4b7235 -i contents/contents.0006.45e96935:0x0006:0x45e96935 -i contents/contents.0007.425536a5:0x0007:0x425536a5 -i contents/contents.0008.033b6e4d:0x0008:0x033b6e4d -i contents/contents.0009.43d9281f:0x0009:0x43d9281f -i contents/contents.000a.489a712c:0x000a:0x489a712c -i contents/contents.000b.429f4150:0x000b:0x429f4150 -i contents/contents.000c.20a2030d:0x000c:0x20a2030d -i contents/contents.0033.61e81808:0x0033:0x61e81808 -i contents/contents.0034.1f1b4be1:0x0034:0x1f1b4be1 -i contents/contents.0035.121c7a2e:0x0035:0x121c7a2e -i contents/contents.0036.7d74188e:0x0036:0x7d74188e -i contents/contents.0037.6cdf7d3d:0x0037:0x6cdf7d3d -i contents/contents.0038.45f521b4:0x0038:0x45f521b4 -i contents/contents.0039.17336725:0x0039:0x17336725 -i contents/contents.003a.604a53de:0x003a:0x604a53de -i contents/contents.003b.25db38e8:0x003b:0x25db38e8 -i contents/contents.003c.7402694d:0x003c:0x7402694d -i contents/contents.003d.4e6538f3:0x003d:0x4e6538f3 -i contents/contents.003e.41a866ed:0x003e:0x41a866ed -i contents/contents.0065.6e4d00c7:0x0065:0x6e4d00c7
./makerom -f cia -rsf gtidlc.rsf -o gti_dlc_eu_out.cia -ckeyid 0 -major 0 -minor 1 -micro 0 -DSaveSize=0 -ignoresign -dlc -i contents/contents.0000.00000000:0x0000:0x00000000 -i contents/contents.0001.00000001:0x0001:0x00000001 -i contents/contents.0002.00000002:0x0002:0x00000002 -i contents/contents.0003.00000003:0x0003:0x00000003 -i contents/contents.0004.00000004:0x0004:0x00000004 -i contents/contents.0005.00000005:0x0005:0x00000005 -i contents/contents.0006.00000006:0x0006:0x00000006 -i contents/contents.0007.00000007:0x0007:0x00000007 -i contents/contents.0008.00000008:0x0008:0x00000008 -i contents/contents.0009.00000009:0x0009:0x00000009 -i contents/contents.000a.0000000a:0x000a:0x0000000a -i contents/contents.000b.0000000b:0x000b:0x0000000b -i contents/contents.000c.0000000c:0x000c:0x0000000c -i contents/contents.0033.00000033:0x0033:0x00000033 -i contents/contents.0034.00000034:0x0034:0x00000034 -i contents/contents.0035.00000035:0x0035:0x00000035 -i contents/contents.0036.00000036:0x0036:0x00000036 -i contents/contents.0037.00000037:0x0037:0x00000037 -i contents/contents.0038.00000038:0x0038:0x00000038 -i contents/contents.0039.00000039:0x0039:0x00000039 -i contents/contents.003a.0000003a:0x003a:0x0000003a -i contents/contents.003b.0000003b:0x003b:0x0000003b -i contents/contents.003c.0000003c:0x003c:0x0000003c -i contents/contents.003d.0000003d:0x003d:0x0000003d -i contents/contents.003e.0000003e:0x003e:0x0000003e -i contents/contents.0065.00000065:0x0065:0x00000065
</blockquote>
</syntaxhighlight>
 
===Example 2: Only Unused DLC Music===
This command makes a DLC .cia file that only contains the unused and officially not distributed DLC music tracks (Craggy Coast, Star Cave, and both versions of Vast Ice Mountain Peak).
<syntaxhighlight lang="bash">
./makerom -f cia -rsf gtidlc.rsf -o gti_eu_unused_music_only.cia -ckeyid 0 -major 0 -minor 1 -micro 0 -DSaveSize=0 -ignoresign -dlc -i contents/contents.0000.00000000:0x0000:0x00000000 -i contents/contents.003f.0000003f:0x003f:0x0000003f -i contents/contents.004c.0000004c:0x004c:0x0000004c -i contents/contents.0062.00000062:0x0062:0x0000000062
</syntaxhighlight>
 
Running a command like the two examples above creates a new .cia file that contains DLC and can be installed through 3DS homebrew software such as FBI.
 
==Modifying the DLC==
Follow the steps above to verify that rebuilding works. If it does, you can start making changes to the files, and after you have changed them, you can follow the rebuild steps again.
 
To make changes, Contents are further extracted to see and modify the actual files, which are similar to the files in the romfs of the base game. Once the edits are made, the Contents need to be rebuilt.
 
===Extracting Files From Contents===
Run the following command. Replace contents/contents.0001.00000001 with the file you want to extract. In this example, it uses the file for the Ivy Park dungeon.
<syntaxhighlight lang="bash">
./ctrtool --romfsdir=romfs --exefsdir=exefs --exheader=exheader.bin contents/contents.0001.00000001
</syntaxhighlight>
 
===Changing Dungeon or Soundtrack Name===
The easiest thing to change is the name of the dungeon. After extracting the romfs of a Contents file that contains a dungeon or music (see the list of files at the beginning of the tutorial) open in a hex editor the file place_name.bin (or one of its equivalents in other languages) for dungeons, or dlc_resource.bin for music. You will see the name of the dungeon four times, or the name of the music once for each language. The name is separated by 00 bytes (represented by dots). Replace the letters with the letters you want, keeping the 00 bytes (note that they must be 00 bytes, not other characters that are represented by dots). If the name you're adding is shorter than the original name, replace all remaining letters with 00 bytes. If it's longer, the SIR0 file needs to be rebuilt for pointers to match, which is out of the scope of this guide.
 
===Custom Music===
Extract the Contents of a music DLC. In the "stream" folder you will find two .bcstm files. You will need music in .bcstm format. A good place to download music from various video games in .bcstm format is https://smashcustommusic.net/. Another easy way to obtain them is to extract them from other 3DS games. There are also programs that can be used to convert music to .bcstm. Once you have the .bcstm file you want, rename it to the name of one of the files in the DLC's "stream" folder, and replace the original file with the new one.
 
===Rebuilding Modified Contents===
Run the following commands. Replace contents.0001.00000001 with the desired filename.
<syntaxhighlight lang="bash">
./3dstool -cvtf romfs edited_romfs.bin --romfs-dir romfs
</syntaxhighlight>
 
<syntaxhighlight lang="bash">
./makerom -f ncch -target t -rsf gtidlc.rsf -romfs edited_romfs.bin -o contents.0001.00000001
</syntaxhighlight>
 
Replace the old Contents file with the rebuilt Contents file, then follow the steps in the "Rebuilding the DLC" section.
 
==See Also==
{{Gates to Infinity Community Navbox}}
{{Gates to Infinity Technical Documentation Navbox}}
 
==References==
* Guide written and researched by {{Admin|B}} with additional help and research by Pinkolol16 and Artegonit.
<references />


This command makes a DLC .cia file that only contains the unused DLC music tracks (Craggy Coast, Star Cave, and both versions of Vast Ice Mountain Peak).
[[Category:Gates to Infinity]]
<blockquote>
[[Category:Gates to Infinity Technical Documentation]]
./makerom -f cia -rsf gtidlc_rom.rsf -o gti_eu_unused_music_only.cia -ckeyid 0 -major 0 -minor 1 -micro 0 -DSaveSize=0 -ignoresign -dlc -i contents/contents.0000.345057da:0x0000:0x345057da -i contents/contents.003f.296877ae:0x003f:0x296877ae -i contents/contents.004c.42b26fec:0x004c:0x42b26fec -i contents/contents.0062.04434456:0x0062:0x04434456
[[Category:Pokémon Mystery Dungeon (series) Hacking Guides]]
</blockquote>
{{Featured Article}}

Latest revision as of 00:43, 23 June 2025

Hacked DLC with a modified dungeon name.
Hacked DLC with a modified dungeon name.

DLC Editing Tutorial is a guide for editing downloadable content in Nintendo 3DS Pokémon Mystery Dungeon: Gates to Infinity. This can be useful for making a .cia file that doesn't include unused downloadable content (or that only includes such content), or for creating custom DLCs such as custom music or dungeons.

Note that the terminal commands used on this page were used on Linux. On other operating systems, such as Windows, minor adjustments may be required.

If using Windows, make sure file extensions are enabled.

Prerequisites

The following is only needed for the optional "Modifying the DLC" section.

Put the above in the same folder, and open a terminal from that folder.

DLC Filenames

Contents can be identified by the first part of their filenames.

  • 0000 contains DLC icons and general data. Must be included.
  • 0001 contains the dungeon Ivy Park.
  • 0002 contains the dungeon Scalchop Beach.
  • 0003 contains the dungeon Pika Land.
  • 0004 contains the dungeon Axe Rock.
  • 0005 contains the dungeon Mount Tepid.
  • 0006 contains the dungeon Treat Road.
  • 0007 contains the dungeon Poké Forest.
  • 0008 contains the dungeon Kecleon Bazaar.
  • 0009 contains the dungeon Mt. Travail.
  • 000a contains the dungeon Skill Treasury.
  • 000b contains the dungeon Ultimate Wilds.
  • 000c contains the dungeon Strongest Trail.
  • 0032 contains some unknown unused data.
  • 0033 contains the Mt. Steel and Battle with Rayquaza music tracks.
  • 0034 contains the A New Adventure and Time To Say Goodbye... music tracks.
  • 0035 contains the Makuhita Dojo and The Escape music tracks.
  • 0036 contains the Thunderwave Cave and The End: Rescue Team music tracks.
  • 0037 contains the Great Canyon and Gardevoir in a Dream music tracks.
  • 0038 contains the Mt. Blaze and The Giant Star Approaches! music tracks.
  • 0039 contains the Mt. Travail and Wigglytuff's Guild music tracks.
  • 003a contains the Craggy Coast and Treasure Town music tracks.
  • 003b contains the Random Dungeon Theme 2 and The Time Gear music tracks.
  • 003c contains the Apple Woods and On the Beach at Dusk music tracks.
  • 003d contains the Hidden Land and Through the Sea of Time music tracks.
  • 003e contains the Temporal Tower and Dialga's Fight to the Finish music tracks.
  • 003f contains the unused Craggy Coast music track twice.
  • 004c contains the unused Star Cave music track twice.
  • 0062 contains two unused versions of Vast Ice Mountain Peak.
  • 0065 contains DLC item graphics.

Extracting the DLC

Run the following command to extract the Contents from the .cia to the current folder.

./ctrtool --contents=contents gti_dlc.cia

You can put the files in their own folder for convenience. The rest of this tutorial assumes the contents files are in a folder named "contents", and that this "contents" folder is alongside "makerom" and the other programs downloaded at the start of the guide.

Rebuilding the DLC

Before continuing, you need to create a text file with the name "gtidlc.rsf" and that contains the following text:

Option:
  MediaFootPadding: true
  EnableCrypt: false
SystemControlInfo:
  SaveDataSize: $(SaveSize)K

Put this text file in the same folder as "makerom".

Choose from the list at the beginning of the guide which Contents files you want to include in your DLC .cia file. Note that "0000" must be included. Names of the Contents files consist of four numbers/letters (the first part), followed by a dot, followed by a longer sequence of numbers and letters (the second part). When mentioning them in the MakeROM command, you need to add at the end of the filename ":0x", followed by the first part, followed by ":0x", followed by the second part. For example, "contents/contents.0000.345057da" becomes "contents/contents.0000.345057da:0x0000:0x345057da".

The following are examples of what the command might look like. You can modify the examples, or use the examples as they are if you are satisfied with what they do.

Example 1: Only Official DLC

This command makes a DLC .cia file that only contains DLC that was officially distributed.

./makerom -f cia -rsf gtidlc.rsf -o gti_dlc_eu_out.cia -ckeyid 0 -major 0 -minor 1 -micro 0 -DSaveSize=0 -ignoresign -dlc -i contents/contents.0000.00000000:0x0000:0x00000000 -i contents/contents.0001.00000001:0x0001:0x00000001 -i contents/contents.0002.00000002:0x0002:0x00000002 -i contents/contents.0003.00000003:0x0003:0x00000003 -i contents/contents.0004.00000004:0x0004:0x00000004 -i contents/contents.0005.00000005:0x0005:0x00000005 -i contents/contents.0006.00000006:0x0006:0x00000006 -i contents/contents.0007.00000007:0x0007:0x00000007 -i contents/contents.0008.00000008:0x0008:0x00000008 -i contents/contents.0009.00000009:0x0009:0x00000009 -i contents/contents.000a.0000000a:0x000a:0x0000000a -i contents/contents.000b.0000000b:0x000b:0x0000000b -i contents/contents.000c.0000000c:0x000c:0x0000000c -i contents/contents.0033.00000033:0x0033:0x00000033 -i contents/contents.0034.00000034:0x0034:0x00000034 -i contents/contents.0035.00000035:0x0035:0x00000035 -i contents/contents.0036.00000036:0x0036:0x00000036 -i contents/contents.0037.00000037:0x0037:0x00000037 -i contents/contents.0038.00000038:0x0038:0x00000038 -i contents/contents.0039.00000039:0x0039:0x00000039 -i contents/contents.003a.0000003a:0x003a:0x0000003a -i contents/contents.003b.0000003b:0x003b:0x0000003b -i contents/contents.003c.0000003c:0x003c:0x0000003c -i contents/contents.003d.0000003d:0x003d:0x0000003d -i contents/contents.003e.0000003e:0x003e:0x0000003e -i contents/contents.0065.00000065:0x0065:0x00000065

Example 2: Only Unused DLC Music

This command makes a DLC .cia file that only contains the unused and officially not distributed DLC music tracks (Craggy Coast, Star Cave, and both versions of Vast Ice Mountain Peak).

./makerom -f cia -rsf gtidlc.rsf -o gti_eu_unused_music_only.cia -ckeyid 0 -major 0 -minor 1 -micro 0 -DSaveSize=0 -ignoresign -dlc -i contents/contents.0000.00000000:0x0000:0x00000000 -i contents/contents.003f.0000003f:0x003f:0x0000003f -i contents/contents.004c.0000004c:0x004c:0x0000004c -i contents/contents.0062.00000062:0x0062:0x0000000062

Running a command like the two examples above creates a new .cia file that contains DLC and can be installed through 3DS homebrew software such as FBI.

Modifying the DLC

Follow the steps above to verify that rebuilding works. If it does, you can start making changes to the files, and after you have changed them, you can follow the rebuild steps again.

To make changes, Contents are further extracted to see and modify the actual files, which are similar to the files in the romfs of the base game. Once the edits are made, the Contents need to be rebuilt.

Extracting Files From Contents

Run the following command. Replace contents/contents.0001.00000001 with the file you want to extract. In this example, it uses the file for the Ivy Park dungeon.

./ctrtool --romfsdir=romfs --exefsdir=exefs --exheader=exheader.bin contents/contents.0001.00000001

Changing Dungeon or Soundtrack Name

The easiest thing to change is the name of the dungeon. After extracting the romfs of a Contents file that contains a dungeon or music (see the list of files at the beginning of the tutorial) open in a hex editor the file place_name.bin (or one of its equivalents in other languages) for dungeons, or dlc_resource.bin for music. You will see the name of the dungeon four times, or the name of the music once for each language. The name is separated by 00 bytes (represented by dots). Replace the letters with the letters you want, keeping the 00 bytes (note that they must be 00 bytes, not other characters that are represented by dots). If the name you're adding is shorter than the original name, replace all remaining letters with 00 bytes. If it's longer, the SIR0 file needs to be rebuilt for pointers to match, which is out of the scope of this guide.

Custom Music

Extract the Contents of a music DLC. In the "stream" folder you will find two .bcstm files. You will need music in .bcstm format. A good place to download music from various video games in .bcstm format is https://smashcustommusic.net/. Another easy way to obtain them is to extract them from other 3DS games. There are also programs that can be used to convert music to .bcstm. Once you have the .bcstm file you want, rename it to the name of one of the files in the DLC's "stream" folder, and replace the original file with the new one.

Rebuilding Modified Contents

Run the following commands. Replace contents.0001.00000001 with the desired filename.

./3dstool -cvtf romfs edited_romfs.bin --romfs-dir romfs
./makerom -f ncch -target t -rsf gtidlc.rsf -romfs edited_romfs.bin -o contents.0001.00000001

Replace the old Contents file with the rebuilt Contents file, then follow the steps in the "Rebuilding the DLC" section.

See Also

References

  • Guide written and researched by B with additional help and research by Pinkolol16 and Artegonit.