Editing Pikmin 2 instructions

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
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.
+
Helpful instructions for editing and handling ''Pikmin 2'''s files. This guide assumes you have some basic knowledge on navigating folders, opening files, using the command line, etc.  
See [[General instructions#Obtaining a game's files|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 [[General instructions#Saving changes|saving changes]] in [[general instructions]].
+
==Obtaining the game's files==
{{todo|Instructions for how to edit music.}}
+
See [[General instructions#Obtaining a game's files|obtaining a game's files]].
  
==Text files==
+
==Editing==
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 (#).
+
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]].
 +
{{todo|Sound files.}}
  
An example from the entities subsection within caves:
+
===Text files===
<pre>
+
To read and edit a plain text file (<code>.txt</code>), you can use any text editor, like Notepad, although [https://notepad-plus-plus.org/download/ Notepad++] is highly recommended. If the type of file you're editing has any comment (text written in English or Japanese that comes after a #), then it's safe to say that any text that comes after a # will be ignored.
# TekiInfo
 
{
 
2 # num
 
$Tadpole 23 # weight
 
0 # type
 
Sokkuri_bane 9 # weight
 
1 # type
 
}
 
</pre>
 
  
This example will treat the following as comments (ignored and can say anything you want):
+
===SZS files===
* "TekiInfo"
+
SZS files (<code>.szs</code>) are a bit like zip files. If you want to read a SZS file's contents, you need to unpack it, and if you want to make changes to the contents, you need to repack it after you're done.
* "num"
 
* "weight" (x2)
 
* "type" (x2)
 
  
==ARC/SZS files==
+
====Windows====
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.
+
To unpack an SZS file on Windows, use [https://www.romhacking.net/utilities/1024/ Lunaboy's RARC Tools]. Unpacking is done through <code>ArcExtract.exe</code> by drag and dropping your szs file onto it. A folder containing the SZS files' contents will then be created in the directory that the SZS was in, and now you can modify it!
  
===Windows===
+
To repack an SZS file, you will need to continue using Lunaboy's RARC Tools in addition to [https://egaddsworkshop.com/forums/showthread.php?tid=27 yaz0fast]. First, once you've modified the SZS' contents, drag the folder that <code>ArcExtract.exe</code> gave you onto <code>ArcPack.exe</code> and it will create an <code>.arc</code> file. Technically, you can rename the file extension to SZS right now and it will work, but following the next step instead will save space. Drag the newly created ARC file onto <code>yaz0fast.exe</code> and it will create an SZS file. Now rename it to the filename that the original SZS had (you need to do this if you chose to rename the file extension instead as well) and yous should be good to go!
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].
+
====Mac====
 +
Unfortunately, Lunaboy's RARC Tools and yaz0fast cannot be used on Mac computers. Instead, you must use a different tool called [http://szs.wiimm.de/ Wiimms SZS Toolset]. First, install it using the instructions on the website. Unpacking and repacking is done through the command line. These tools can be used with Windows as well, but it is not practical. Under Windows, there are scripts you can create to make Wiimm's process of packing and repacking easier.
  
===macOS===
+
Anyway, the command to unpack a file is <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. To repack, use <code>wszst update &lt;SZS file path&gt;</code>.
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.
+
=====Scripts=====
 +
If you for some reason want to 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>.
  
To repack the file, use <code>wszst update &lt;SZS file path&gt;</code>.
+
After this, you can simply grab the SZS file you want and drag it onto the BAT file you need.
  
===Scripts===
+
===BMD files===
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.
+
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.
* Open a text editor such as Notepad, and write <code>wszst extract %1</code>. Save it as "SZS extract.bat", remembering to set the file type to "All files" as opposed to "Text file (.txt)"
 
* Create a new file with <code>wszst update %1</code> and save it as "SZS update.bat" - again, remembering to set the file type to "All files".
 
  
Now you will be able to simply drag-and-drop the SZS file on to the batch (.bat) file you need.
+
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!
  
==BMD files==
+
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.
BMD files (.bmd) are Pikmin 2's 3D model files. If you simply want to view them, you can do so with [http://www.mediafire.com/?uy2nmmjmkmj BMDView2].
 
  
If you want to make your own BMD, you will need '''Windows''' and these tools:
+
===BMG files===
# [https://www.autodesk.com/education/free-software/3ds-max 3ds Max (2015 recommended)] - Download as a student for three years free.
 
# [https://github.com/Avatarus-one/MaxBMD MaxBMD] - BMD importer for 3ds Max.
 
# [https://github.com/Sage-of-Mirrors/BMDCubed/releases BMDCubed] - DAE to BMD converter specifically for 3ds Max.
 
 
 
Follow these for creating your custom models:
 
* Set up 3ds Max
 
* Install MaxBMD - It comes with an executable named <code>bmdview.exe</code>, which you should drop in <code>C:\Autodesk\Autodesk_3ds_Max_<the year number of your 3ds max version>__EFGJKS_Win_64bit_R2_wi_en-US</code>. Then open 3ds Max and drag MaxBMD's script onto its tool bar.
 
* For custom levels, check out [[Custom models]].
 
* For static objects such as treasures, follow the instructions on [[Custom models]] but ignore steps related to custom collision.
 
* For making custom models that have bones, such as enemies, watch [https://www.youtube.com/watch?v=pzUhokFHUrk this video tutorial].
 
* For changing the textures alone, 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 [http://pikmintkb.shoutwiki.com/wiki/Pikmin_2_instructions#BTI_files BTI files]. Note that some textures will get a corrupted UV Map when replaced and j3dview is not compatible with custom BMDs or BMDs from ''Pikmin 2'' that contain bones. This means that j3dview is only good for editing the first three level models (Valley of Repose, Awakening Wood and Perplexing Pool).
 
 
 
==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.)
 
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.)
 
As of version 2.11b, [http://szs.wiimm.de/ Wiimms SZS Toolset] can also properly handle ''Pikmin 2'' BMG files.
 
  
 
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".
 
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".
  
==AW (sound) files==
+
===BTI files===
AW files (<code>.aw</code>) are soundfont files. Detailed instructions on how to change these files can be found [[User:Untitled-1/Sound Replacement Tutorial|here]]. You will need Python installed and [https://cdn.discordapp.com/attachments/301121846944727040/358295103019679764/Pikmin2SoundHelperScripts.zip Yoshi2's sound helper] downloaded.
 
 
 
==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>.  
 
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.
+
To save the converted PNG files back into a BTI format use the command <code>wimgt ENCODE <PNG file path></code>.
  
===Scripts===
+
====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
 
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>
 
<pre>wimgt DECODE %1</pre>

Please note that all contributions to Pikmin Technical Knowledge Base are considered to be released under the Creative Commons Attribution-ShareAlike (see Pikmin Technical Knowledge Base:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: