Модификации:Установка SMAPI на Windows

Материал из Stardew Valley Wiki
Перейти к навигации Перейти к поиску

Эта страница объясняет, как установить SMAPI (программа, которая позволит вам использовать моды) для Windows.

Robin building.png
“Предстоит ещё много работы...”
— Робин

Неполный перевод

Эта статья или её часть до сих пор не переведены на русский язык. Вы можете оказать помощь в переводе путем ее редактирования.
Последний раз редактировалось Margotbean в 2022-08-22 17:00:31.

Смотрите инструкции для: AndroidLinuxmacOSSteam Deck.

Установка SMAPI

  1. Запустите игру без SMAPI хотя бы один раз (это может быть первая загрузка).
  2. Скачайте последнюю версию SMAPI.
  3. Распакуйте .zip файл где-нибудь. (Ваша папка загрузок подойдет.)
  4. Дважды нажмите install on Windows.bat¹, и следуйте инструкции.
  5. Настройте свой игровой клиент: смотрите инструкции для Steam, GOG Galaxy или Xbox app.

¹ Чтобы установить SMAPI вручную, читайте инструкцию readme в установщике.

Настройка вашего клиента игры

Steam

Вам нужно запустить SMAPI через Steam, если вы хотите: чтобы Steam overlay, достижения, и отслеживание времени работали. (Если вам не важны достижения и отслеживание времени например, вы можете просто запустить SMAPI mascot.png StardewModdingAPI.exe в вашей папке с игрой, чтобы играть с модами.)

Как настроить клиент:

  1. Оставьте окно установки SMAPI открытым.
    (Если вы уже закрыли его, просто запустите снова. Не нужно удалять SMAPI.)
  2. Скопируйте текст в окне установки, который выглядит примерно так (как копировать текст):
    Modding - installing SMAPI on Windows - installer Steam text.png
    Убедитесь, что вы скопировали строку целиков, включая обе кавычки " и часть %command%.
    Ваш финальный путь должен выглядеть примерно так: "Ваш путь" %command%
  3. Нажмите правой кнопкой мыши на Stardew Valley в клиента Steam и выберите Свойства:
    Modding - installing SMAPI on Windows - Steam 1.png
  4. Нажмите на текстовое поле под Параметрами запуска:
    Modding - installing SMAPI on Windows - Steam 2.png
  5. Замените все в текстовом пое на текст, который вы скопировали в установщике.
    Чтобы вставить текст, нажмите на поле и зажмите CTRL и V.
  6. Этот екст должен состоять из of "Расположение вашего SMAPI API файла" %command%
    Для большинства пользователей по умолчанию "C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe" %command%
  7. Теперь просто запускайте игру через Steam, чтобы запустить SMAPI вместе со Steam overlay и достижениями.

GOG Galaxy

You need to launch SMAPI through GOG Galaxy if you want its playtime tracking to work. (If you don't care about tracking game time, you can just launch SMAPI mascot.png StardewModdingAPI.exe in your game folder to play with mods.)

Here's how to configure it:

  1. Open Notepad and paste in the following: start "" "C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley\StardewModdingAPI.exe"
    (If your game is installed to a different folder, replace the path in the command above.)
  2. Click on File and then Save As.
    Save batch script.png
  3. In the Save As window that appears: navigate to your Stardew Valley game folder, change Save as type to All Files, change the file name to start.bat, and click Save.
    Choose batch extension.png
    Name batch script.png
  4. In the GOG Galaxy client, click on Stardew Valley > settings icon > Manage installation > Configure.
    Gog galaxy configure.png
  5. In the menu that appears, enable the "Custom executables / arguments" checkbox.
    Gog galaxy custom launch.png
  6. Click Add another executable / arguments.
    Gog galaxy add exectuable.png
  7. Choose start.bat in the window that appears and click Open.
    Select batch file.png
  8. Enable the Default Executable radio button under the File 2 section you just added, and click OK.
    Gog galaxy select default executable.png

From now on, you can launch Stardew Valley through GOG Galaxy and both the SMAPI console and game will load as expected!

Xbox app

Mods work with the Xbox app, but there's a few extra steps.

Before you install SMAPI:
  1. Open the Stardew Valley section in the Xbox app.
  2. Click the ... > Manage button:
    Modding - Enable SMAPI in Xbox app 1.png
  3. Click the Files tab and then Browse to open your game folder:
    Modding - Enable SMAPI in Xbox app 3.png
  4. Open the Stardew Valley > Content folder. You should see a lot of files with names like api-ms-win-core-*:
    Modding - Enable SMAPI in Xbox app 4.png
  5. Copy the full path from the address bar at the top.
Run the SMAPI installer:
  1. Run the SMAPI installer like usual, but:
    • Download the installer to somewhere that's not the game directory (like your downloads folder).
    • When it asks where to install, enter the path you copied from the previous step.
After you install SMAPI:
  1. In your game folder:
    1. rename Stardew Valley executable icon.png Stardew Valley.exe to another name such as Stardew Valley original.exe;
    2. make a copy of SMAPI mascot.png StardewModdingAPI.exe and name the copy Stardew Valley executable icon.png Stardew Valley.exe.

That's it! Now just launch the game through the Xbox app to play with mods. Note that when the game updates, you'll need to redo the last two sections.

Update SMAPI

Just install the new version; the installer will automatically clean up previous versions. (You don't need to configure Steam or GOG Galaxy again.)

Uninstall

  1. Run run the installer again, but choose uninstall to remove SMAPI. (Not applicable for Xbox app.)
  2. If you configured Steam or GOG Galaxy to launch SMAPI, undo your changes:
    • Steam: in the Steam client: right-click on Stardew Valley, choose Properties > General > Set Launch Options, and blank the launch options textbox.
    • GOG Galaxy: in the GOG Galaxy client: click on Stardew Valley, click the settings icon next to the 'Play' button, click Manage installation > Configure, and clear the Custom executables / arguments checkbox.
    • Xbox app:
    1. follow the installation steps for Xbox app to open your game folder;
    2. rename Stardew Valley executable icon.png Stardew Valley.exe to SMAPI mascot.png StardewModdingAPI.exe;
    3. rename StardewModding Valley original.exe (or the name you chose when installing SMAPI) back to Stardew Valley executable icon.png Stardew Valley.exe.

(If you want to play without mods temporarily, you can just launch Stardew Valley executable icon.png Stardew Valley.exe directly or rename your Mods folder instead. Not applicable for Xbox app.)

Troubleshooting

"Oops, couldn't find the game automatically"

If you are using Game Pass, folder permissions will probably cause problems if you try this. Otherwise, if the installer shows that message, you can help it find the game folder. To do that:

  1. Exit the installer.
  2. Find your game folder.
  3. Move the installer folder into the game folder. (Make sure you move the whole folder, not just the files inside it!)
  4. Run the installer again and it should auto-detect the game folder now.

You can safely delete the installer folder when it's done.

I can't find a specific file mentioned in the guide!

Windows hides file extensions by default. To reveal them, simply tick the option in file explorer.

Select the View tab, and then check "File Name Extensions

If using Windows 11, refer to this screenshot instead:

Click on "View" menu, click on the "Show" menu, and click on "File name extensions"

Issues with SMAPI or mods

See the troubleshooting page for help with issues after installation.