Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

KotOR II Switch Modding Tools: Difference between revisions

From GameBrew
No edit summary
No edit summary
 
Line 19: Line 19:
|image_alt=KotOR II Switch Modding Tools
|image_alt=KotOR II Switch Modding Tools
}}
}}
KotOR II Switch Modding Tools is a set of tools designed to simplify the modding process for the Nintendo Switch version of Star Wars: Knights of the Old Republic II (KotOR II).
This project is a group of tools to make modding of Star Wars: Knights of the Old Republic II (aka. KotOR II) easier.
 
With the help of these tools, players can finally enjoy mods such as The Sith Lords: Restored Content Mod and many others on the Nintendo Switch platform.


These tools are based on and inspired by the work of [https://deadlystream.com/profile/48469-jacqylfrost/ jacqylfrost].
These tools are based on and inspired by the work of [https://deadlystream.com/profile/48469-jacqylfrost/ jacqylfrost].


'''Note: These modding tools are intended only for use on modded Nintendo Switch consoles'''.
'''Note:''' These modding tools are intended only for use on modded Nintendo Switch consoles.


== Features ==
== Features ==
Line 32: Line 30:
* Call out potential issues along with instructions on how to fix them.
* Call out potential issues along with instructions on how to fix them.
* Easy backups and restores during the modding process, to better see where things went wrong.
* Easy backups and restores during the modding process, to better see where things went wrong.
== Usage instructions ==
NOTE: It's '''highly''' recommended to read this entire section before starting.
=== Prerequisites ===
* A computer to install mods with — mods cannot be installed directly on the Nintendo Switch).
** '''NOTE''': this project currently ONLY works with Bash, which is available by default on Linux and macOS. For Windows, please use either [https://learn.microsoft.com/en-us/windows/wsl/install WSL] (recommended) or [https://www.cygwin.com/ Cygwin].
*** An issue is already open for porting these scripts to PowerShell — contributions welcome via pull request.
* A modded Nintendo Switch with the [[Atmosphere Switch]] custom firmware installed.
** '''NOTE''': other custom firmwares will likely work but are unsupported.
* A copy of KotOR II already installed on the Nintendo Switch with all updates applied.
* [[NXDumpTool Switch]] installed on the Nintendo Switch to extract some game files needed for some mods.
* A way to interact with and transfer files to and from the Nintendo Switch. Examples:
** [[ftpd Switch]]
** Hekate's tool to mount the SD Card to a PC, under '''Tools''' | '''USB Tools''' | '''SD Card''' (requires rebooting the Nintendo Switch into Hekate).
** [[NX-Shell Switch]] (only for interacting with existing files)
<span id="pre-flight"></span>
=== Pre-flight ===
<ol>
<li><p>On your computer, download and extract the most recent release from GitHub.</p></li>
<li><p>Open a terminal window and navigate to the extracted folder from step 1.</p>
<ul>
<li>e.g. <code>cd &quot;~/Downloads/KotOR II Switch modding&quot;</code></li></ul>
</li>
<li><p>Run the following command to initialize the folder structure:</p>
<pre class="language-shell">./bin/initialize</pre>
<ul>
<li>This will create a folder named <code>0100B2C016252000</code>, which is the title ID of the game on the Nintendo Switch.</li></ul>
</li>
<li><p>On the Nintendo Switch, do the following in the nxdumptool app:</p>
<ul>
<li>Navigate to '''Dump installed SD card /eMMC content''' | '''Star Wars™️ - Knights of the Old Republic™️ II''' | '''RomFS options'''.</li>
<li>Change the '''Use update/DLC''' option to the installed game update.</li>
<li>Select '''Browse RomFS section'''.</li>
<li>Dump the following files:
<ul>
<li><code>./swplayer.ini</code></li>
<li><code>./Localized/&lt;language&gt;/dialog.tlk</code></li></ul>
</li>
<li>Transfer these files from <code>/atmosphere/contents/0100B2C016252000</code> on the Nintendo Switch to your computer using a file transfer option of your choice (common options listed above in the <code>Prerequisites</code> section).</li>
<li>Place both transferred files into the <code>0100B2C016252000/romfs</code> folder.
<ul>
<li>Make sure to place the <code>dialog.tlk</code> directly in the above folder, not <code>Localized/&lt;language&gt;</code>.</li></ul>
</li></ul>
</li></ol>
<span id="mod-installation"></span>
=== Mod installation ===
<ol>
<li><p>Start installing mods like usual. General notes:</p>
<ul>
<li>Linking the <code>0100B2C016252000/romfs</code> folder to the desktop is very useful for TSLPatcher that some mods use, which always defaults to the desktop, e.g. <code>ln -s &quot;$(pwd)/0100B2C016252000/romfs&quot; ~/Desktop/romfs</code>.</li>
<li>When using mods that use TSLPatcher, make sure to pay attention to the installation logs — warnings are common and not usually anything to worry about, but errors can occur due to missing files that the mod installer expects (known mods listed below). If this occurs:
<ul>
<li>In the TSLPatcher window, make a note of the filepath associated with the error (e.g. <code>lips/003EBO_loc.mod</code>.</li>
<li>Dump the file from your Nintendo Switch.
<ul>
<li>You may need to look under <code>Localized/&lt;language&gt;</code> due to how the Nintendo Switch version of the game implemented other languages).</li></ul>
</li>
<li>Transfer the dumped file to your computer and place it in the location that the mod installer expected in <code>0100B2C016252000/romfs</code>.</li>
<li>Re-run the TSLPatcher installer.</li></ul>
</li></ul>
</li>
<li><p>Recommended, but not required: periodically archive currently installed mods between mod installations with the following command:</p>
<pre class="language-shell">./bin/archive &quot;recommended-optional-description&quot;</pre>
<ul>
<li><p>At any point, you can restore an archive with the following command:</p>
<pre class="language-shell">./bin/restore</pre></li></ul>
</li></ol>
<span id="wrapping-up"></span>
=== Wrapping up ===
<ol>
<li><p>Once all desired mods have been installed, run the following command:</p>
<pre class="language-shell">./bin/finalize</pre>
<ul>
<li><p>To undo finalization (e.g. for further adjustments), run the following command to restore a backup that was automatically created by the finalization script:</p>
<pre class="language-shell">./bin/restore 0</pre></li>
<li>'''Make sure to pay attention to any warnings that appear.'''
<ul>
<li>The most common warning will be texture files that aren't in the <code>.tpc</code> format when the Nintendo Switch version of the game already has the same texture in that format. These pre-existing <code>.tpc</code> files on the Nintendo Switch will always override any <code>.tga</code> or <code>.dds</code> texture files — the solution is to convert these files to <code>.tpc</code> where possible (e.g. using [https://deadlystream.com/files/file/1152-tga2tpc/ tga2tpc 4.0.0]).</li></ul>
</li></ul>
</li>
<li><p>On the Nintendo Switch, delete the <code>/atmosphere/contents/0100B2C016252000</code> folder, if it exists.</p></li>
<li><p>Copy the <code>0100B2C016252000</code> folder from your computer to the <code>/atmosphere/contents</code> folder on your Nintendo Switch's SD card.</p>
<ul>
<li>'''NOTE''': network-based file transfers (e.g. FTP) will work with no issues, but for larger mod packs, you may want to use the Hekate option mentioned above for faster and more reliable transfers.</li></ul>
</li></ol>
<span id="known-issues"></span>
== Known issues ==
=== Platform-specific known issues and fixes ===
* The Sith Lords Restored Content Mod (TSLRCM)
** Button prompts are either missing or showing buttons for the incorrect platform
*** Fix: after installing this mod, use the <code>dialog.tlk</code> in the <code>Fixed dialog for TSLRCM on Nintendo Switch.zip</code> attached to the latest release — thanks, [https://github.com/seriouslyunderappreciated seriouslyunderappreciated]!
There are likely more than what is listed here. Please don't hesitate to create an issue or pull request with any of these platform-specific issues you find.
<span id="mods-that-require-additional-dumped-files"></span>
=== Mods that require additional dumped files ===
Assumes The Sith Lords: Restored Content Mod (TSLRCM) is installed. If you find any more of these, please feel free to create a GitHub issue or a pull request.
* Darth Sion and Male Exile Mod 1.2.3
** <code>lips\702kor_loc.mod</code>
** <code>lips\907mal_loc.mod</code>
* Extended Korriban arrival 1.2
** <code>Lips\003EBO_loc.mod</code>
* Handmaiden and Female Exile - Disciple and Male Exile Romance
** <code>lips\262TEL_loc.mod</code>
** <code>lips\402DXN_loc.mod</code>
** <code>lips\903MAL_loc.mod</code>
** <code>lips\localization.mod</code>
== Usage in other mods ==
Feel free to reference or link this mod to any other projects. However, please note that this project uses the GNU GPL v3 license. You can view a [https://www.gnu.org/licenses/quick-guide-gplv3.en.html layman's terms breakdown] of the license, but the most important thing to note is that '''any''' projects or distributions that modify or include code from this project must '''also''' have their source code published and publicly available with the same license.
Please don't hesitate to contact me if this causes major issues for a mod you're creating.


==Changelog==  
==Changelog==  

Latest revision as of 06:23, 8 June 2025

KotOR II Switch Modding Tools
General
AuthorDrSnuggly
TypeHack Utilities
Version2.3.0
LicenseGPL-3.0
Last Updated2023/07/13
Links
Download
Website
Source

This project is a group of tools to make modding of Star Wars: Knights of the Old Republic II (aka. KotOR II) easier.

These tools are based on and inspired by the work of jacqylfrost.

Note: These modding tools are intended only for use on modded Nintendo Switch consoles.

Features

  • Provide a folder structure that modding tools expect.
  • Once modding is done, restructure the game folder to what the Nintendo Switch version of the game expects.
  • Call out potential issues along with instructions on how to fix them.
  • Easy backups and restores during the modding process, to better see where things went wrong.

Changelog

v2.3.0

v2.2.2

  • Fix .txi files associated with invalid .tga textures (i.e. ones that would be overridden by stock Nintendo Switch .tpc files) not being correctly moved to the _INVALID directory for later manual processing.

v2.2.1

  • Finish removing traces of the bundled assets folder, which in turn fixes issues with the initialization script.

v2.2.0

v2.1.0

  • Move .txi files with any .tga textures that would be ignored by the Nintendo Switch version of the game, since they should be removed when replacing the texture with a .tpc file — thanks JC!

v2.0.1

  • Add missing attribution to jacqylfrost.

v2.0.0

  • First Release.

External links

Advertising: