DespairOfHarmony

Taiko no Tatsujin V Version - Add Custom DLC

Mar 26th, 2020 (edited)
1,932
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Taiko no Tatsujin V Version - Add Custom DLC
  2. By DespairOfHarmony
  3.  
  4. UPDATE 3 (01/2021)
  5. I've added okku and wwcxtool to the tutorial.
  6.  
  7. UPDATE 2 (08/2020)
  8. I've added shin-uti scoring references and song quality comparison
  9.  
  10. UPDATE 1
  11. I've rewrite a tool to make easier to inject into Taiko V nus3bank files, you can check it here:
  12. https://github.com/despairoharmony/NUS3BANK-EditorAT9 (just need to place at9tool.exe at exeLib folder)
  13.  
  14. Here it's a tutorial for creating custom dlc to Taiko V Version
  15. You'll need:
  16. Any decrypted DLC from Taiko V to use as a base (you don't need to replace it, you can copy and work in a new folder)
  17. A modded Vita with rePatch
  18. at9tool.exe (PS Vita SDK)
  19. vgmstream
  20. Kuriimu (or anything that compress in LZ11)
  21. psvita-txptool.exe (pre-compiled mirror: https://mega.nz/#!ZCgz2CbA!EPiYAPBESvmFAKRbPcrFNYt-kyzEkhQ1S80qlkJkKJI)
  22. taiko_wii_4+_fumen_endianness_converter.py (you can find it here: https://pastebin.com/bNBQdeii )
  23. HxD or any hex editor
  24. Knowledge in hex editing (know the difference between Big Endian and Little Endian)
  25.  
  26. Phase 1 - Chart
  27. Here we are going to manage with the song charts, those will be located at:
  28.  
  29. DLCFOLDER\_data\fumen\[SONGID]\solo\
  30.  
  31. [SONGID] is the 6 char (or less) id given by namco
  32. Inside "solo" folder you'll need to have these 4 files (or 5 if song has Ura):
  33. [SONGID]_e.bin (Easy mode)
  34. [SONGID]_h.bin (Hard mode)
  35. [SONGID]_m.bin (Oni mode)
  36. [SONGID]_n.bin (Normal mode)
  37.  
  38. * For Ura songs the file name is: ex_[SONGID]_m.bin (In some sources they are found as [SONGID]_x.bin)
  39.  
  40. There's no way for now to create these files from zero (now its possible, check Okku: https://www.teampapafox.org/projects/okku3ds.html ), what we are doing is injecting charts from other taiko versions, most of them can be found at respective fumen folder from each version
  41. Taivo V only support solo charts, duet charts have an _1 or _2 on their file name (ex: [SONGID]_m_1.bin)
  42. Here is a reference list for chart endianness: (Taiko V only support Little Endian)
  43.  
  44. Big Endian Charts: Arcade (only from Namco 357 tested); all Wii U versions
  45. Little Endian Charts: Switch; PS4; iOS[1]; 3DS (already compressed in LZ11)
  46.  
  47. - Converting Big Endian (BE) charts to Little Endian (LE) charts (if already LE, skip to Compressing in LZ11)
  48. To convert from BE to LE, we are going to use a python script: taiko_wii_4+_fumen_endianness_converter.py
  49. Paste the script on the folder that the charts are located, and run the following on terminal:
  50.  
  51. py taiko_wii_4+_fumen_endianness_converter.py bl input.bin output.bin
  52.  
  53. Execute the same code for all files in the folder, remember to use the output file on the next step
  54.  
  55. - Compressing in LZ11 (if it's 3DS chart you are ready to go)
  56. Usually Taiko V loads songs with L7C compression, but for some reason supports LZ11, and this is the compression that we are going to use, since its more easy to deal with it. There are 2 ways to deal with it:
  57.  
  58. 1) Kuriimu way: We are going to open Kuriimu, on the top bar click on Tools, and then:
  59.  
  60. Compression -> Nintendo -> Compress -> LZ11
  61.  
  62. Select the uncompressed file and save the compressed file on "solo" folder.
  63.  
  64. 2) Batch way: We can also use wwcxtool.exe to compress with LZ11, you can run the following command:
  65.  
  66. wwcxtool.exe /c1 input.bin output.bin
  67.  
  68. Then get the output file to use on "solo" folder
  69.  
  70. Phase 2 - Sound
  71. UPDATE: This part is now easily made by my new tool, available here:
  72. https://github.com/despairoharmony/NUS3BANK-EditorAT9
  73.  
  74. You need to place the at9tool.exe at exeLib folder.
  75.  
  76. First you go to File -> Open NUS3BANK and select a base song (select a not modded file from V version, otherwise you'll ger a error)
  77. Then left click at .at9 file and click Replace
  78. Select the audio source and wait till a window pop up, click Yes and OK
  79. Then go to File -> Save as... and save with the following model name: DSONG_[SONGID]
  80. Now you are good to go ;)
  81.  
  82. --Outdated tutorial--
  83. Sounds are located inside a .nus3bank container, and are in .at9 format
  84. The are located in the following folder:
  85.  
  86. DLCFOLDER\_data\sound\song\DSONG_[SONGID].nus3bank
  87.  
  88. I highly recomend to rip the music from the version that you have used in chart to avoid bad timing, most of the are in .nus3bank containers [2], but with other sound format that Vita doesn't support
  89. To get the wav files from other taiko version, you'll use vgmstream, just drag and drop the sound file on test.exe, and it will output a .wav file for you
  90. Then we are going to convert the .wav file using at9tool (from Sony SDK), run the following command:
  91.  
  92. at9tool -e -br 192 input.wav output.at9
  93.  
  94. Now we are going to inject the .at9 file in the .nus3bank container with hex editing
  95. Open the output.at9 with HxD, press Ctrl+A to select everything, and finde the size on the bottom bar
  96. Write the size in any notepad, now we are going to manually convert a BE to a LE, watch the example:
  97.  
  98. 333864 = 00 33 38 64 (BE) -> 64 38 33 00 (LE) = 643833
  99. Basically we are going to reverse the order of pairs in 4 blocks
  100.  
  101. Now open the .nus3bank container on the HxD, and replace on the following adress:
  102.  
  103. 0x4C, 0xC70, 0xD1C -> place the file size in LE
  104. 0xA5, 0xC55 -> place the file name of the container (DSONG_[SONGID])
  105.  
  106. Then copy all bytes of the .at9 file and paste on the adress 0xD20 at .nus3bank container, you can delete everything after the pasted bytes of the .at9 file
  107. --End of Outdated tutorial--
  108.  
  109. Phase 3 - Images
  110. Song names in the song selection screen and in gameplay are stored as textures.
  111. They are located at:
  112.  
  113. DLCFOLDER\_data\system\songtitle\
  114.  
  115. Here we have 2 types of files, and 3 textures
  116.  
  117. Types:
  118. .anm - Animation file
  119. .txp - Texture File
  120.  
  121. Textures:
  122. game - Song title shown during the gameplay
  123. select_main - Song title shown at the select screen
  124. select_sub - Song sub-title shown when song is select (optional)
  125.  
  126. - Hex editing the animation file
  127. The only thing we are doing here is injecting the song name at the animation files
  128. The string is located at the adress 0x90, and its the following:
  129.  
  130. Anime_[SONGID]
  131.  
  132. Just put your [SONGID] and save the file.
  133.  
  134. - Customizing the texture
  135. To customize the textures we are going to use psvita-txptool to extract and recreate the .txp files
  136. First drag and drop .txp file to psvita-txptool.exe, and will generate a folder with the same texture name and a .png inside of it
  137. Edit the .png image with any image editor you like (I suggest: Fireworks; to write the text i use the font DFP勘亭流)
  138. After editing the image drag and drop the folder to psvita-txptool.exe, and it will return the modded .txp file, paste back to the folder
  139.  
  140. Phase 4 - Data
  141. There is 2 files that define the data of the sound to be played, they are located at:
  142.  
  143. DLCFOLDER\_data\system\
  144.  
  145. I'll give the adress to modify in each file, their sizes and what they mean
  146.  
  147. - SongInfo.dat
  148. 0x2C -> Shin-uti scoring in easy (kantan) mode (Size: 4 bytes in LE)
  149. 0x30 -> Shin-uti scoring in normal (fuutsu) mode (Size: 4 bytes in LE)
  150. 0x34 -> Shin-uti scoring in hard (muzukashi) mode (Size: 4 bytes in LE)
  151. 0x38 -> Shin-uti scoring in extreme (oni) mode (Size: 4 bytes in LE)
  152. 0x3C -> ID number for sound [3] (Size: 2 bytes in LE) - Last taiko dlc use id 13F (3F 10 in LE), just follow the sequence - Limit is 1F3
  153. 0x40 -> Song Category (Size: 1 Byte)
  154. 00 - JPOP
  155. 01 - Vocaloid
  156. 02 - Variety
  157. 03 - Namco Original
  158. 04 - Game Music
  159. 05 - Classic
  160. 06 - Anime
  161. 0x44 -> Branch Easy (00 for false, 01 for true; Size: 1 byte)
  162. 0x45 -> Branch Normal (00 for false, 01 for true; Size: 1 byte)
  163. 0x46 -> Branch Hard (00 for false, 01 for true; Size: 1 byte)
  164. 0x47 -> Branch Oni (00 for false, 01 for true; Size: 1 byte)
  165. 0x48 -> Number of Stars for Easy (01 to 0A; Size: 1 byte)
  166. 0x49 -> Number of Stars for Normal (01 to 0A; Size: 1 byte)
  167. 0x4A -> Number of Stars for Hard (01 to 0A; Size: 1 byte)
  168. 0x4B -> Number of Stars for Oni (01 to 0A; Size: 1 byte)
  169.  
  170. From adress 0x50 and beyond replace the following patterns with the [SONGID]
  171. - SL_[SONGID]
  172. - DSONG_[SONGID]
  173. - [SONGID] for 3 times after DSONG
  174.  
  175. - MusicInfo.dat
  176. 0x14 - Time that sound will play at select screen (in miliseconds; size: 4 bytes in LE)
  177. 0x20 - DSONG_[SONGID]
  178.  
  179. Remember: If the song has Ura, use as a base a song that contains Ura, and follow those steps at SongInfo.dat
  180. - SongInfo.dat (for Ura Songs only)
  181. 0x2C -> Shin-uti scoring in easy (kantan) mode (Size: 4 bytes in LE)
  182. 0x30 -> Shin-uti scoring in normal (fuutsu) mode (Size: 4 bytes in LE)
  183. 0x34 -> Shin-uti scoring in hard (muzukashi) mode (Size: 4 bytes in LE)
  184. 0x38 -> Shin-uti scoring in extreme (oni) mode (Size: 4 bytes in LE)
  185. 0x3C -> ID number for sound [3] (Size: 2 bytes in LE) - Last taiko dlc use id 13F (3F 10 in LE), just follow the sequence - Limit is 1F3
  186. 0x40 -> Song Category (Size: 1 Byte)
  187. 00 - JPOP
  188. 01 - Vocaloid
  189. 02 - Variety
  190. 03 - Namco Original
  191. 04 - Game Music
  192. 05 - Classic
  193. 06 - Anime
  194. 0x44 -> Branch Easy (00 for false, 01 for true; Size: 1 byte)
  195. 0x45 -> Branch Normal (00 for false, 01 for true; Size: 1 byte)
  196. 0x46 -> Branch Hard (00 for false, 01 for true; Size: 1 byte)
  197. 0x47 -> Branch Oni (00 for false, 01 for true; Size: 1 byte)
  198. 0x48 -> Number of Stars for Easy (01 to 0A; Size: 1 byte)
  199. 0x49 -> Number of Stars for Normal (01 to 0A; Size: 1 byte)
  200. 0x4A -> Number of Stars for Hard (01 to 0A; Size: 1 byte)
  201. 0x4B -> Number of Stars for Oni (01 to 0A; Size: 1 byte)
  202. 0x78 -> Shin-uti scoring in ultra extreme (ura) mode (Size: 4 bytes in LE)
  203. 0x7C -> ID number for Ura sound (Size: 2 bytes in LE) - Don't use the same ID of 0x3C
  204. 0X7E -> Mirror 0x3C vaule (Size: 2 bytes in LE)
  205. 0x80 -> Ura Song Category (Size: 1 Byte) - Reffer to 0x40
  206. 0x87 -> Branch Ura (00 for false, 01 for true; Size: 1 byte)
  207. 0x8B -> Number of Stars for Ura (01 to 0A; Size: 1 byte)
  208.  
  209. From adress 0x90 and beyond replace the following patterns with the [SONGID]
  210. - SL_[SONGID]
  211. - DSONG_[SONGID]
  212. - [SONGID] for 3 times after DSONG
  213. - SL_EX_[SONGID]
  214. - DSONG_[SONGID]
  215. - [SONGID]; ex_[SONGID]; [SONGID]
  216.  
  217. Sound Quality Comparison
  218.  
  219. Source: Format; Sample Rate; Bitrate; Delay
  220. wiiU: IDSP 44,1khz 403kbps
  221. PS4: BNSF 48khz 256kbps +20ms
  222. AC: AT3 44,1khz 256kbps
  223. Vita: AT9 48khz 192kbps
  224. Switch: OPUS 48khz 166kbps
  225. iOS: M4A 44,1khz 131kbps
  226. 3DS: AAC 32khz 96kbps -30ms
  227.  
  228. Notes
  229. [1] - iOS charts and audio files ate all inside the .dat file - check here: https://pastebin.com/Lghqm9iY
  230. [2] - 3DS songs have bad audio quality, I suggest to seek another version of the song file if avaible
  231. [3] - to see all available ID's to be filled, i've made a spreadsheet here: https://drive.google.com/file/d/1xu4iqCPzawqSqE_YliYam1xLuIo1SZga/view?usp=sharing
RAW Paste Data