Difference between revisions of "Pikmin 2 instructions"

From Pikmin Technical Knowledge Base
Jump to navigation Jump to search
 
(16 intermediate revisions by 6 users not shown)
Line 2: Line 2:
 
See [[General instructions#Obtaining a game's files|obtaining a game's files]] if you are unsure on how to do so.
 
See [[General instructions#Obtaining a game's files|obtaining a game's files]] if you are unsure on how to do so.
  
==Editing==
 
 
You can view and edit a lot of the game's files. You can read them without any worry, but if you want to change them and have those changes apply in-game, see [[General instructions#Saving changes|saving changes]] in [[general instructions]].
 
You can view and edit a lot of the game's files. You can read them without any worry, but if you want to change them and have those changes apply in-game, see [[General instructions#Saving changes|saving changes]] in [[general instructions]].
{{todo|Sound files.}}
+
{{todo|Instructions for how to edit music.}}
  
===Text files===
+
==Tools and files==
To read and edit a plain text file (.txt), you can use any text editor such as Notepad or TextEdit. For Windows users, however, [https://notepad-plus-plus.org/download/ Notepad++] is highly recommended as it is far more advanced and will display the Japanese characters within vanilla files. The game treats a comment as anything in the same line taking place after a hashtag (#).
 
  
An example from the entities subsection within caves:
+
Here are some prominent files that come up when modding.
<pre>
+
.SZS: Archive files similar to .ZIP or .RAR archive files. SZS files are RARC archives compressed with Yaz0 compression.
# TekiInfo
+
.ARC: Archive files similar to .ZIP or .RAR archive files. ARC files are RARC archives not compressed with Yaz0 compression.
{
+
.TXT: Generic plaintext files. Use Notepad++ to preserve the Shift-JIS encoding.
2 # num
+
.BMD: Proprietary 3D model files.
$Tadpole 23 # weight
+
.BMS: Sequenced audio files, similar to MIDI but more advanced. [https://pikmintkb.com/wiki/Pikmin_2_BMS_file_list List]
0 # type
+
.CND: Files that control how various sequences in a BMD file are randomly chained together in a complex system. Used for cave music.
Sokkuri_bane 9 # weight
+
[https://pikmintkb.com/wiki/Pikmin_2_CND_file_list List]
1 # type
+
.AST: Streamed audio files. [https://pikmintkb.com/wiki/AST_file_list List]
}
+
.AW: Soundbank files.
</pre>
+
.BMG: Used to store in-game text strings.
 +
.BLO: UI screen data.
 +
.BTI: Textures.
 +
.BTK: Animated textures.
 +
.STB: Cutscene data.
 +
.THP: Prerendered videos (GC/Wii)
 +
.WEBM: Prerendered videos (Switch)
 +
.JPC: Particle effect container. [https://pikmintkb.com/wiki/JPC_particles List]
 +
.JPA: Particle effect.
 +
.BCA: Full animation data.
 +
.BCK: Keyframed animation data.
  
This example will treat the following as comments (ignored and can say anything you want):
+
Here are some prominent tools:  
* "TekiInfo"
 
* "num"
 
* "weight" (x2)
 
* "type" (x2)
 
  
===ARC/SZS files===
+
[https://www.romhacking.net/utilities/1024/  Lunaboy's RARC Tools]- Used for extracting and converting RARC archives. For szs files, simply rename the converted file from file.arc to file.szs.
SZS files (.szs) and ARC files (.arc) are Nintendo's archive files (similar to that of a .zip or .rar). These cannot simply be opened using a program like WinRAR. Instead you must extract the contents using a tool such as [https://www.romhacking.net/utilities/1024/ Lunaboy's ArcExtract and ArcPack] for Windows, or [http://szs.wiimm.de/ Wiimms SZS Toolset] for macOS.
+
[https://notepad-plus-plus.org/downloads/ Notepad++] - Used for editing text files, many of which need to preserve Shift-JIS encoding.
 +
[https://github.com/RenolY2/pikmin-tools/releases/download/v1.0.1.1/piktools-1.0.1.1.zip Gen & Route Editor]  - Used for editing overworld generation and pikmin carrying routes.
 +
[https://github.com/Drought-Ender/Drought-Cave-Creator/archive/refs/tags/1.1.2.zip Drought's Cave Creator] - Used for creating and modifiying cave files, cave lighting, and cave unit definition files.
 +
[https://xayr.gay/tools/SoundModdingToolkit/6.3.3/PIKMIN2_SoundModdingToolkit_6.3.3_win64.zip Pikmin 2 Sound Modding Toolkit] - Used for modyfing sounds in the game.
 +
[https://xayr.gay/tools/jaimaker1/JAIMaker+JAISeqX1.5.9.zip JAIMaker] - Used for creating custom sequenced music as BMS files. Interactive music and cave music require additional hex editing.
 +
[https://github.com/XAYRGA/jatast JATAST] - Used for converting .wav files into .ast files for streamed music.
 +
[https://github.com/RenolY2/pikminBMG/archive/refs/tags/v0.7.4.zip pikminBMG] - Used for editing text in the game.
 +
[https://github.com/RenolY2/pyblo2-gui/releases/download/v0.7.0.1/blo-gui-editor-v0.7.0.1.zip pyblo2-gui] - Used for modyfing blo files.
 +
[https://github.com/MeltyPlayer/FinModelUtility/releases/download/v0.2/FinModelUtility.v0.2.zip FinModelUtility] - Used for converting BMD files to formats that can be imported into any 3D modeling software. Batch scripts can be found in Hocotate Hacker for simple conversion of single models.
 +
[https://github.com/RenolY2/SuperBMD/releases/download/v2.1.0/SuperBMD.zip SuperBMD] - Used for converting FBX and DAE files back to BMD.
 +
[https://github.com/riidefi/RiiStudio/releases/download/Alpha-5.11.1/RiiStudio_Windows.zip RiiStudio] - Used for BMD materials editing. (Pish don't kill me GUI is just easier for now)
 +
[https://github.com/RenolY2/obj2grid/archive/refs/tags/v0.8.zip obj2grid] - Used for converting between .OBJ 3D files and pikmin 2's collision formats.
 +
[https://github.com/LagoLunatic/GCFT/releases/tag/1.10.0 GameCube File Tools] - Used for modification of many GameCube/early Wii era formats, notably BTI files. It can also compress .arc archives to szs.
 +
Hex editor - needed for additional editing of other files such as .BIN binary files. An editor of choice is HxD: (https://mh-nexus.de/en/hxd/)
 +
More tools can be found in Hocotate Hacker if needed. Compiled builds for many of these tools are for Windows, but macOS and Linux users can compile many from source.
  
====Windows====
+
==Cave generation==
To extract the contents of an ARC or SZS file, simply drag-and-drop it on to the downloaded ArcExtract.exe file and the contents within that archive will be extracted in the same directory as the original ARC/SZS file.
 
  
To pack modified contents of an ARC or SZS file, make sure you have all the files that were extracted and place them into a new folder named after the original ARC/SZS file. If I wanted to repack <code>enemyParms.szs</code> then I would make a new folder called "enemyParms" and place all the contents within that folder. Now, drag-and-drop that folder on to the downloaded ArcPack.exe file and then an ARC file will be created and named after the folder you dragged-and-dropped. If you modified specifically an SZS file; in the case of Pikmin 2, you can just rename the extension from <code>enemyParms.arc</code> to <code>enemyParms.szs</code> where you will be prompted by Windows that you're changing the extension - just click OK/Yes. If you don't see the ".arc" or ".szs", then follow [https://www.howtogeek.com/205086/beginner-how-to-make-windows-show-file-extensions/ this guide on showing file extensions].
+
You can make custom caves with Drought's Cave Creator. When adding more sublevels to any cave, you must remember to add more cave songs to the BgmList text file, located in <code>user/Totaka</code>. You will edit BgmList_(area).txt for areas, and ChallengeBgmList.txt for challenge mode.
  
====macOS====
+
==Overworld generation==
First, install Wiimms SZS Toolset using the instructions on the website. Unpacking and repacking is done through command lines. These tools can be used with Windows as well, but it is not practical.
 
  
To unpack a file, run the command line <code>wszst extract &lt;SZS file path&gt;</code>. This will create a folder with the same name as the SZS file - but ending in ".d". Inside this folder will be the contents of the SZS file, plus an additional data file, which is used by Wiimms SZS Toolset, so that it knows how to repack.
+
==Model replacement==
  
To repack the file, use <code>wszst update &lt;SZS file path&gt;</code>.
+
==Custom sounds and music==
 
 
====Scripts====
 
If you use Wiimms SZS Toolset on Windows, you can create scripts to automatically unpack and repack a SZS file, so that you don't have to write commands all the time. Open a text editor, and type
 
<pre>wszst extract %1</pre>
 
Save it as <code>SZS extract.bat</code> on some folder you can remember. Create a new file with
 
<pre>wszst update %1</pre>
 
And save it as <code>SZS update.bat</code>.
 
 
 
After this, you can simply grab the SZS file you want and drag it onto the BAT file you need.
 
 
 
===BMD files===
 
BMD files (<code>.bmd</code>) are 3D model files. If you simply want to view them, you can do so with [http://www.mediafire.com/?uy2nmmjmkmj BMDView2]. Editing them is a different matter.
 
 
 
If you want to make your own BMD, you will need three things: a) [https://www.autodesk.com/education/free-software/3ds-max 3ds Max 2015] (preferably the student version, as it's free), b) [https://github.com/Avatarus-one/MaxBMD MaxBMD], a bmd importer for 3ds Max, and c) [https://github.com/Sage-of-Mirrors/BMDCubed/releases BMDCubed], a custom BMD converter that can convert <code>.DAE</code> files made by 3ds Max into .bmds.
 
Once you have 3ds Max set up, you're going to want to install MaxBMD. It should come with an executable named <code>bmdview.exe</code>, which you should drop in C:\Autodesk\Autodesk_3ds_Max_2015_EFGJKS_Win_64bit_R2_wi_en-US. Once you've done that, all you have to do is open 3ds Max and drag MaxBMD's script onto its tool bar. Congratulations! You can now use MaxBMD.
 
There are multiple types of BMDs you can create now. For custom levels, check out [[Custom Models]]. For static objects such as treasures, follow the instructions on the Custom Models page but ignore any steps related to custom collision. Finally, for making custom models that have bones, watch [https://www.youtube.com/watch?v=pzUhokFHUrk this video tutorial]. All three of these model types will require you to use BMDCubed later, so keep it in a safe place!
 
 
 
If you just want to change the textures, you will need [https://github.com/blank63/j3dview/releases j3dview]. Open the bmd in j3dview and you can change the textures by replacing the vanilla ones with custom bti files (more on that later). To note is that a) Some textures will get a corrupted UV Map when replaced and b) j3dview is not compatible with custom BMDs or BMDs from ''Pikmin 2'' that contain bones or the like. That is, j3dview can edit the models for the first three areas and possibly the test levels & most treasures.
 
 
 
===BMG files===
 
BMG files (<code>.bmg</code>) contain the game's text strings. [https://www.youtube.com/watch?v=ve9cgdIQbSo Yoshi2's custom Pikmin 2 BMG Tool] is highly recommended for this, as it allows you to change any text without worrying about the character count. To use it, simply drag the BMG onto <code>packBMG.bat</code>, edit the outputted text file in Notepad++, make sure it's encoded in UTF-8, save, and drag the saved text file onto <code>packBMG.bat</code>. That's all you need to do! (Keep in mind that any version of Python 3 (newer = better) is needed for this tool to work.)
 
 
 
Any text editor can also edit these, but once again, [https://notepad-plus-plus.org/download/ Notepad++] is highly recommended. You can find the strings after you scroll past the initial control data. If you want to edit the strings using a text editor, remember to keep their length the same. i.e. You can replace "Floor" with "Level", but not with "Step" or "Sublevel".
 
 
 
===BTI files===
 
BTI files (<code>.bti</code>) are image files. You'll need [http://szs.wiimm.de/ Wiimms SZS Toolset] to view these. As with [[#SZS files|SZS files]], you convert a BTI to PNG with the command line, though you can make a script to skip the command line part. The command to convert a BTI file is <code>wimgt DECODE &lt;BTI file path&gt;</code>.
 
To save the converted PNG files back into a BTI format, use a program called [http://kuribo64.net/uploader/files.php?sortby=date&filename=png2bti.zip&user=&id=3 png2bti]. To use it, flip the image vertically and then drag it onto the exe. To note is that png2bti cannot compress larger images as well as Nintendo themeselves can, but you can get around this by making the modified texture half the size of the one it's replacing. This shouldn't be a problem with smaller textures such as 32x32 and below.
 
 
 
====Scripts====
 
As with [[#SZS files|SZS files]], you can write a script so that you don't have to write commands all the time. Open up a text editor, write
 
<pre>wimgt DECODE %1</pre>
 
And save it somewhere you can remember, with the name <code>BTI converter.bat</code>. Then, when you want to convert a BTI file into PNG, simply drag the BTI file onto the BAT file you created.
 
Now open a new file in the text editor and write <pre>wimgt ENCODE %1</pre> And save it with the name <code>BTI updater.bat</code> Now when you want to convert one of your PNG files back into BTI format, just drag the png onto this new BAT.
 
  
 
==Running your modified game==
 
==Running your modified game==

Latest revision as of 04:09, 21 September 2024

Helpful instructions for editing and handling Pikmin 2's files. This guide assumes you have some basic knowledge on navigating folders, opening files, using commands, etc. See obtaining a game's files if you are unsure on how to do so.

You can view and edit a lot of the game's files. You can read them without any worry, but if you want to change them and have those changes apply in-game, see saving changes in general instructions.

To do: Instructions for how to edit music.

Tools and files[edit]

Here are some prominent files that come up when modding.

.SZS: Archive files similar to .ZIP or .RAR archive files. SZS files are RARC archives compressed with Yaz0 compression.
.ARC: Archive files similar to .ZIP or .RAR archive files. ARC files are RARC archives not compressed with Yaz0 compression.
.TXT: Generic plaintext files. Use Notepad++ to preserve the Shift-JIS encoding.
.BMD: Proprietary 3D model files.
.BMS: Sequenced audio files, similar to MIDI but more advanced. List
.CND: Files that control how various sequences in a BMD file are randomly chained together in a complex system. Used for cave music. 
List
.AST: Streamed audio files. List
.AW: Soundbank files.
.BMG: Used to store in-game text strings.
.BLO: UI screen data.
.BTI: Textures.
.BTK: Animated textures.
.STB: Cutscene data.
.THP: Prerendered videos (GC/Wii)
.WEBM: Prerendered videos (Switch)
.JPC: Particle effect container. List
.JPA: Particle effect.
.BCA: Full animation data.
.BCK: Keyframed animation data.

Here are some prominent tools:

Lunaboy's RARC Tools- Used for extracting and converting RARC archives. For szs files, simply rename the converted file from file.arc to file.szs.
Notepad++ - Used for editing text files, many of which need to preserve Shift-JIS encoding.
Gen & Route Editor  - Used for editing overworld generation and pikmin carrying routes.
Drought's Cave Creator - Used for creating and modifiying cave files, cave lighting, and cave unit definition files.
Pikmin 2 Sound Modding Toolkit - Used for modyfing sounds in the game.
JAIMaker - Used for creating custom sequenced music as BMS files. Interactive music and cave music require additional hex editing.
JATAST - Used for converting .wav files into .ast files for streamed music.
pikminBMG - Used for editing text in the game.
pyblo2-gui - Used for modyfing blo files.
FinModelUtility - Used for converting BMD files to formats that can be imported into any 3D modeling software. Batch scripts can be found in Hocotate Hacker for simple conversion of single models.
SuperBMD - Used for converting FBX and DAE files back to BMD.
RiiStudio - Used for BMD materials editing. (Pish don't kill me GUI is just easier for now)
obj2grid - Used for converting between .OBJ 3D files and pikmin 2's collision formats.
GameCube File Tools - Used for modification of many GameCube/early Wii era formats, notably BTI files. It can also compress .arc archives to szs.
Hex editor - needed for additional editing of other files such as .BIN binary files. An editor of choice is HxD: (https://mh-nexus.de/en/hxd/)

More tools can be found in Hocotate Hacker if needed. Compiled builds for many of these tools are for Windows, but macOS and Linux users can compile many from source.

Cave generation[edit]

You can make custom caves with Drought's Cave Creator. When adding more sublevels to any cave, you must remember to add more cave songs to the BgmList text file, located in user/Totaka. You will edit BgmList_(area).txt for areas, and ChallengeBgmList.txt for challenge mode.

Overworld generation[edit]

Model replacement[edit]

Custom sounds and music[edit]

Running your modified game[edit]

See General instructions#Running a modified game.