Line 1: |
Line 1: |
− | ← [[Modding:Index]]
| + | {{modding player guide header}} |
| | | |
− | This page explains how to use mods on Android. Modding on Android is a bit trickier than PC. | + | This page explains how to install SMAPI (the tool which lets you use mods) on Android. |
| | | |
− | For help with mods on Linux/Mac/Windows, see [[Modding:Player Guide]].
| + | See instructions for: [[Modding:Installing SMAPI on Linux|Linux]] • [[Modding:Installing SMAPI on Mac|macOS]] • [[Modding:Installing SMAPI on Steam Deck|Steam Deck]] • [[Modding:Installing SMAPI on Windows|Windows]]. |
| | | |
− | ==SMAPI mods & content packs==
| + | __TOC__ |
− | You can use MartyrPher's Android SMAPI Loader, an unofficial port of SMAPI to Android which supports most SMAPI mods and content packs (including Content Patcher).
| |
| | | |
− | ===Install SMAPI===
| + | ==Install== |
− | # Download the latest installer APK from [https://github.com/MartyrPher/SMAPI-Android-Installer/releases the unofficial download page] onto your phone. Make sure you get the download that looks like <code>SMAPI-Android-Installer-<version>.apk</code>.
| + | <div style="border: 1px solid #F96; border-left: 1em solid #F96; padding: 0.5em 1em; border-radius: 5px;"> |
− | # [https://www.greenbot.com/article/2452614/how-to-sideload-an-app-onto-your-android-phone-or-tablet.html Install the APK]. | + | '''SMAPI for Stardew Valley 1.5.6 is in alpha testing. Some mods may not work with the latest version of the game yet.'''<br /> |
− | # Run the new app to install SMAPI. This may take a while depending on your device (e.g. 21s on a Samsung Galaxy S10, and 1 minute 13s on a Samsung Galaxy S6). | + | You can watch {{github|ZaneYork/SMAPI-Android-Installer/issues/246|this tracking ticket}} to see the latest updates. |
| + | |
| + | An incomplete list of working/non-working Android mods can be found [https://android.stardew.rocks here]. |
| + | </div> |
| + | |
| + | '''Note: Because Android SMAPI is still in its testing phases, even the latest release may not work for everyone''' |
| + | |
| + | |
| + | # Download the {{github|ZaneYork/SMAPI-Android-Installer/releases|latest installer APK file}} (the file under "Assets" that ends with <samp>.apk</samp>). |
| + | # [https://www.greenbot.com/article/2452614/how-to-sideload-an-app-onto-your-android-phone-or-tablet.html Install the APK on your phone]. |
| + | # Run the new app to install SMAPI. This may take a while depending on your device (''e.g.,'' 21s on a Samsung Galaxy S10, and 1 minute 13s on a Samsung Galaxy S6). |
| # When it's done, you can safely uninstall the installer app. | | # When it's done, you can safely uninstall the installer app. |
| | | |
− | ===Using mods===
| + | That's it! Just launch the game to play with mods. |
− | To install mods, just unzip them into the newly-created <tt>StardewValley/Mods</tt> folder. To launch the game with mod support, just run the SMAPI Stardew Valley icon.
| |
| | | |
− | Android SMAPI Loader supports most mods, including the major frameworks like Content Patcher, Farm Type Manager, Json Assets, and PyTK. Stardew Valley Expanded is partially supported.
| + | ==Update== |
| + | Just follow the [[#Install|install steps]] again; the installer will automatically clean up previous versions. |
| | | |
− | ===See also=== | + | ==Uninstall== |
− | * See [[Modding:Player Guide]] for general help with mods.
| + | # Uninstall the SMAPI Stardew Valley app. |
− | * Video tutorials:
| + | # Uninstall the SMAPI installer. |
− | ** [https://www.youtube.com/watch?v=jOXl6Dmu7wY Install SMAPI and mods]
| + | # Manually delete the <samp>smapi-internal</samp> folder from the <samp>StardewValley</samp> game folder. |
− | ** [https://www.youtube.com/watch?v=GFGtbjSYnhw Install SMAPI]
| |
− | ** [https://github.com/MartyrPher/SMAPI-Android-Installer#readme Android SMAPI installer readme] (contains more info, and links to find help)
| |
| | | |
− | ==XNB mods== | + | ==FAQs== |
− | <div style="border: 1px solid red; background: #FCC; padding: 1em;">'''[[Modding:Using XNB mods|XNB mods aren't recommended]] and often break when the game updates.'''</div>
| + | ===How do I add and use mods?=== |
| + | Once SMAPI is installed, install mods by unzipping them into the newly-created <samp>StardewValley/Mods</samp> folder. To launch the game with mod support, just run the SMAPI Stardew Valley icon or tap the floating action button in the installer app. |
| | | |
− | If you're sure you want to use them, here's how. {{collapse|content= 
| + | ===Why is there a separate SMAPI for Android?=== |
| + | The Android version of the game is very custom compared to other platforms, so the official version of SMAPI isn't compatible. There's a [[wikipedia:Porting|port]] of SMAPI to Android developed by MartyrPher and later ZaneYork (see {{github|ZaneYork/SMAPI|main source code}} and {{github|ZaneYork/SMAPI-Android-Installer|installer source code}}). It supports most SMAPI mods and content packs (including framework mods like Content Patcher, Farm Type Manager, Json Assets, and PyTK), but some mods may not be compatible. |
| + | <!-- |
| | | |
− | ===Obtain the APK=== | + | ===How do I use mods that need Stardew Valley 1.5?=== |
− | First you'll need the APK (''Android Package'') file for your game, which contains the game files. Downloading the APK from third-party websites isn't recommended, since it'll often be outdated or contain malware.
| + | Stardew Valley 1.5 isn't released on Android yet, so you'll need older versions of many mods. Here's how to find a compatible version for most mods: |
| | | |
− | There are two ways to access the APK file:
| + | <ol> |
| + | <li>Try the latest version.</li> |
| + | <li>From the Nexus mod page, click the ''Files'' tab to find all available versions.</li> |
| + | <li>Check under "Main Files" and "Optional Files": |
| + | # Try the latest file which... |
| + | #* says it's for Android; |
| + | #* ''or'' says it's for Stardew Valley 1.4; |
| + | #* ''or'' says it's for SMAPI 3.7.6 or earlier; |
| + | #* ''or'' was uploaded before 21 December 2020. |
| + | </li> |
| + | <li>Check under "Old Files" (if present): |
| + | # Change the sort to "Date Uploaded" and "Desc". |
| + | # Try the latest file which... |
| + | #* says it's for Stardew Valley 1.4; |
| + | #* ''or'' says it's for SMAPI 3.7.6 or earlier; |
| + | #* ''or'' was uploaded before 21 December 2020. |
| + | </li> |
| + | <li>Check the archived files (if any): |
| + | <ol> |
| + | <li>If there's a "File Archive" button at the bottom of the page, click it.</li> |
| + | <li>Try the latest file which matches the previous step. You can run this script in [https://webmasters.stackexchange.com/q/8525 your JavaScript console] to add download links: |
| | | |
− | * If you have [https://www.androidcentral.com/root root access], it's located at <tt>/data/app/com.chucklefish.stardewvalley-1/base.apk</tt>.
| + | {{collapse| script to add download links|content=<syntaxhighlight lang="js"> |
− | * Otherwise install [https://play.google.com/store/apps/details?id=com.ext.ui APK Extractor] and run it. The APK will be extracted to <tt>ExtractedApks/Stardew Valley_com.chucklefish.stardewvalley.apk</tt> on your device.
| + | (function() { |
| + | const gameId = $("#section").attr("data-game-id"); |
| + | const downloadElements = $("#file-container-archived-files [data-id]"); |
| | | |
− | ===Install an XNB mod=== | + | for (let element of downloadElements) { |
− | ; Option A: MT Manager app on your phone
| + | element = $(element); |
| + | const description = element.find(".files-description"); |
| + | const fileId = element.attr("data-id"); |
| | | |
− | :# Copy the XNB files you want to install into a new folder on your device.
| + | const html = ` |
− | :# Install and open [https://play.google.com/store/apps/details?id=bin.mt.plus MT Manager] on your phone. | + | <div class="tabbed-block"> |
− | :# On the left side of the screen:
| + | <ul class="accordion-downloads clearfix"> |
− | :## Find [[#Obtain the APK|the Stardew Valley APK]].
| + | <li> |
− | :## Tap it.
| + | <a class="btn inline-flex popup-btn-ajax" href="/Core/Libs/Common/Widgets/DownloadPopUp?id=${fileId}&nmm=1&game_id=${gameId}"> |
− | :## Select 'view'. This should open a folder containing the game's asset files.
| + | <svg title="" class="icon icon-nmm"> |
− | :# On the right side of the screen:
| + | <use xlink:href="https://www.nexusmods.com/assets/images/icons/icons.svg#icon-nmm"></use> |
− | :## Find the folder containing XNB mods (from step 1).
| + | </svg> |
− | :## Make sure the corresponding folder is open on the left side of the screen (e.g. the <tt>Portraits</tt> folder if you're installing portrait mods).
| + | <span class="flex-label">Mod manager download</span> |
− | :## Select the files to copy. (To select all, tap the '''<tt>⋮</tt>''' menu and choose 'select all'.)
| + | </a> |
− | :## Long tap the selected files, and choose the copy option. | + | </li> |
− | :## A menu should appear. Change the 'level' option to Storage, and the 'update mode' to Replace All. Tap OK to copy the files. | + | <li> |
− | :# On the left side of the screen:
| + | </li> |
− | :## Return to the folder containing the <tt>.apk</tt> file.
| + | <li> |
− | :## Tap on the Stardew Valley APK file, choose 'Function', then 'APK Sign'.
| + | <a class="btn inline-flex popup-btn-ajax" href="/Core/Libs/Common/Widgets/DownloadPopUp?id=${fileId}&game_id=${gameId}"> |
− | :## Tap the '''new''' APK file that generates and choose 'Install'.
| + | <svg title="" class="icon icon-manual"> |
| + | <use xlink:href="https://www.nexusmods.com/assets/images/icons/icons.svg#icon-manual"></use> |
| + | </svg> |
| + | <span class="flex-label">Manual download</span> |
| + | </a> |
| + | </li> |
| + | </ul> |
| + | </div> |
| + | `; |
| | | |
− | ; Option B: Android Studio on your computer | + | $(html).insertAfter(description); |
| + | } |
| + | })(); |
| + | </syntaxhighlight>}} |
| | | |
− | :# Install an unzip program like [https://www.7-zip.org/download.html 7-zip]. | + | '''Note:''' downloading archived mod versions is at your own risk, and mod authors often won't provide support for them.</li> |
− | :# Install JDK 8.
| + | </ol> |
− | :# Install Android Studio (make sure to install build-tools).
| + | </li> |
− | :# Install APK Signer Tool (v2).
| + | <li>If you didn't find a matching file, try checking the mod comments or posting a new comment.</li> |
− | :# Unzip [[#Obtain the APK|the Stardew Valley APK]] to your computer.
| + | </ol> |
− | :# Replace the vanilla XNBs (found in <tt>./assets/Content/</tt>) with the modded XNBs.
| + | --> |
− | :# Re-zip the contents of the Stardew Valley APK. Make sure not to include the container folder.
| |
− | :# Change the file extension from <tt>.zip</tt> to <tt>.apk</tt>.
| |
− | :# Open APK Signer Tool (v2).
| |
− | :# Fill out all fields on the Keyfile Generator page (doesn't matter what you enter).
| |
− | :# On the Align & Sign tab, select the modded APK file.
| |
− | :# Select key and fill out the appropriate fields.
| |
− | :# Click Align and Sign.
| |
− | :# Wait a few moments.
| |
− | :# Move the APK to the device and install.
| |
| | | |
− | ===Install an audio mod=== | + | {{Modding guide footer |
− | # Download [https://github.com/mariodon/unxwb/releases unxwb] and [https://github.com/Microsoft/DirectXTK/releases XWBTool].
| + | |prev = [[Modding:Player Guide/Getting Started|Getting Started]] |
− | # Unzip both to your working directory.
| + | |next = |
− | # Copy the <tt>.obb</tt> file from your phone's internal storage (located at <tt>Internal Storage/Android/obb/main.2.com.chucklefish.stardewvalley.obb</tt>) to your working directory.
| |
− | # Run this command to unpack the file: <pre>unxwb main.2.com.chucklefish.stardewvalley.obb</pre> That should output 87 files with names like <tt>00000000.wav</tt>.
| |
− | # Move the unpacked <tt>.wav</tt> files to a separate folder to keep things organised.
| |
− | # Replace any of the audio files as desired (but the names must remain the same).
| |
− | # Run this command to repack the file (replacing <tt>folderPath</tt> with the full path to the folder containing the <tt>.wav</tt> files): <pre>XWBTool "folderPath/*.wav" -o Music.xwb</pre> Note that the output file ''must'' be called <tt>Music.xwb</tt> when repacking.
| |
− | # Rename <tt>Music.xwb</tt> to <tt>main.2.com.chucklefish.stardewvalley.obb</tt>.
| |
− | # Move the modified <tt>.obb</tt> file back to your phone's internal storage (at <tt>Internal Storage/Android/obb/main.2.com.chucklefish.stardewvalley.obb</tt>).
| |
− | # Enjoy your modified music!
| |
− | | |
− | Here's [https://docs.google.com/spreadsheets/d/1K3S8YDS4Tfe_LPtyXA9LaVM8edxvDFkwfNl-ql1kFGM a spreadsheet of unpacked <tt>.wav</tt> file names].
| |
| }} | | }} |
| | | |
| [[Category:Modding]] | | [[Category:Modding]] |
| + | |
| + | [[es:Modding:Instalar SMAPI en Android]] |
| + | [[ru:Модификации:Установка SMAPI на Android]] |
| + | [[zh:模组:在Android上安装SMAPI]] |