|
|
| (One intermediate revision by the same user not shown) |
| Line 1: |
Line 1: |
| {{../header}}
| | #REDIRECT [[Modding:Modder Guide/Test and Troubleshoot]] |
| | |
| Once you're ready to share your mod, it's time to test and release it!
| |
| | |
| ==Test the mod==
| |
| ===Basic testing===
| |
| Testing is pretty straightforward for most mods:
| |
| # Click ''Build > Rebuild Solution'' (Visual Studio) or ''Build > Rebuild All'' (MonoDevelop).
| |
| # Make sure there are no build errors and the mod gets copied to your <tt>Mods</tt> folder.
| |
| # Try the mod in-game.
| |
| # Make sure there are no errors or warnings for your mod in the SMAPI console.
| |
| | |
| In general, if a mod works on one platform it'll work fine on the others.
| |
| | |
| ===Testing in multiplayer===
| |
| You can test mods in multiplayer on the same computer, by launching two instances of the game:
| |
| | |
| # Prepare player one:
| |
| ## Launch SMAPI like usual.
| |
| ## From the title screen: click ''co-op'', then ''host''.
| |
| ## Start a new save slot (unless you've already created one). Make sure to set 'starting cabins' to at least one (you'll need one cabin per extra player).
| |
| # Prepare player two:
| |
| ## Launch SMAPI again. (This will automatically create a separate log file.)
| |
| ## From the title screen: click ''co-op'', then ''join LAN game''.
| |
| ## Leave the 'Enter IP...' box empty and click OK.
| |
| | |
| ===Testing on all platforms===
| |
| For complex mods, you may need to test your mod on all platforms. The game is mostly the same on Linux/Mac, so you only need to test your mod twice: once on Windows, and again on Linux or Mac. You can do that by testing one version on your computer, and the other in a virtual machine.
| |
| | |
| * '''If your main computer is Windows:'''
| |
| *# Install [https://www.virtualbox.org/ VirtualBox].
| |
| *# Create a [https://zorinos.com/ ZorinOS Core] VM in VirtualBox.
| |
| *#* ''See [https://extr3metech.wordpress.com/2013/09/05/installing-zorin-os-7-in-virtual-box-screenshots this setup guide] for more details. The ZorinOS installer might be a bit different than shown, but should be pretty intuitive.''
| |
| *#* ''If you don't see any options for 64-bit OSes in VirtualBox, see [https://superuser.com/a/866963 how to enable them].''
| |
| *#* ''When creating the virtual disk, at least 20GB is recommended.''
| |
| *# [https://store.steampowered.com/about Download the Steam installer] in the VM and run it.
| |
| *# Launch Steam to finish installation. If nothing happens, see [https://askubuntu.com/questions/771032/steam-not-opening-in-ubuntu-16-04-lts these extra steps] to fix it.
| |
| *# Install Stardew Valley through Steam.
| |
| *# [[Modding:Player Guide/Getting Started#Install SMAPI|Install SMAPI]].
| |
| *# ''(optional)'' Install [https://www.mono-project.com/ <tt>mono-complete</tt>] and [http://www.monodevelop.com/download/ MonoDevelop] in your VM. This is only needed if you want to compile separately for Linux/Mac. When installing <tt>.deb</tt> files, use the instructions for [https://zorinos.com/help/install-apps/#deb-files the Ubuntu version shown here]. If you run into errors, may Linux have mercy on your soul.
| |
| | |
| * '''If your main computer is Linux or Mac:'''
| |
| *# Install [https://www.virtualbox.org/ VirtualBox].
| |
| *# [http://www.macworld.co.uk/how-to/mac-software/run-windows-10-on-your-mac-using-virtualbox-3621650/ Create a VM with Windows].
| |
| *# Install Stardew Valley in your VM.
| |
| *# [[Modding:Player Guide/Getting Started#Install SMAPI|Install SMAPI]].
| |
| *# ''(optional)'' Install [https://www.visualstudio.com/vs/community/ Visual Studio Community] in your VM. This is only needed if you want to compile separately for Windows.
| |
| | |
| ==Prepare the release package==
| |
| The 'release package' for a SMAPI mod is just a <tt>.zip</tt> file containing a mod with your compiled files, <tt>manifest.json</tt>, any <tt>i18n</tt> files, etc. The NuGet package will create it for you automatically.
| |
| | |
| ===Generate package===
| |
| # Edit your mod's <tt>manifest.json</tt> to increase the version.
| |
| # Click ''Build > Rebuild Solution'' (Visual Studio) or ''Build > Rebuild All'' (MonoDevelop) to make sure the project is compiled.
| |
| # Open your mod project's <tt>bin/Debug</tt> or <tt>bin/Release</tt> folder (depending on your build configuration).
| |
| # There should be a <tt>.zip</tt> file there for your mod version.
| |
| | |
| That <tt>.zip</tt> file is the release package for your mod, ready to upload.
| |
| | |
| ===Troubleshoot package===
| |
| Here's how to fix common issues with the generated <tt>.zip</tt> file.
| |
| | |
| * The <tt>.zip</tt> file is missing:
| |
| ** Make sure you're looking at the right folder (either <tt>bin/Debug</tt> or <tt>bin/Release</tt>).
| |
| ** Make sure there are no build errors.
| |
| | |
| * Some mod files aren't in the package:
| |
| ** If it's a mod file: right-click on the file in Visual Studio or MonoDevelop, choose ''Properties'', and change 'Copy to Output Directory' to 'copy if newer'.
| |
| ** If it's an assembly reference: right-click on the reference in Visual Studio or MonoDevelop, choose ''Properties'', and change 'Copy Local' or 'Local Copy' to true.
| |
| | |
| * Some mod files that shouldn't be in the package are included:
| |
| ** If it's a mod file: right-click on the file in Visual Studio or MonoDevelop, choose ''Properties'', and change 'Copy to Output Directory' to 'do not copy'.
| |
| ** If it's an assembly reference: right-click on the reference in Visual Studio or MonoDevelop, choose ''Properties'', and change 'Copy Local' or 'Local Copy' to false.
| |
| | |
| ==Release the mod==
| |
| ===Create a mod page===
| |
| If you haven't already, create a mod page on [http://www.nexusmods.com/stardewvalley Nexus Mods]. Ideally your mod description should...
| |
| * explain what the mod does and how to use it;
| |
| * provide clear install steps;
| |
| * explain which version of the game it works with;
| |
| * say whether it works in multiplayer (and list any multiplayer limitations);
| |
| * link to release notes, source code, discussion thread, etc if applicable.
| |
| | |
| Here's a recommended template for the mod description:
| |
| | |
| <ol>
| |
| <li>Click the "[BBCODE]" button above the mod description on Nexus. This will switch to raw text mode.</li>
| |
| <li>Paste this template in:
| |
| <pre>
| |
| This mod adds pineapples everywhere in the game. Replace this line with a few sentences explaining your mod.
| |
| | |
| [size=5]Install[/size]
| |
| [list=1]
| |
| [*][url=https://smapi.io]Install the latest version of SMAPI[/url].
| |
| [*]Download this mod and unzip it into [font=Courier New]Stardew Valley/Mods[/font].
| |
| [*]Run the game using SMAPI.
| |
| [/list]
| |
| | |
| [size=5]How to use[/size]
| |
| Provide a few sentences explaining how to use your mod. For example, the default buttons to press, where to find a menu, etc. You can remove this section if it's self-evident.
| |
| | |
| [size=5]Compatibility[/size]
| |
| [list]
| |
| [*]Works with Stardew Valley 1.3 beta on Linux/Mac/Windows.
| |
| [*]Works in single player and multiplayer. If there are multiplayer limitations, explain them here.
| |
| [/list]
| |
| | |
| [size=5]See also[/size]
| |
| Add links below for your mod, and remove any that don't apply. Don't forget to remove this sentence.
| |
| | |
| [list]
| |
| [*]Official discussion thread
| |
| [*]Release notes
| |
| [*]Source code
| |
| [/list]
| |
| </pre>
| |
| </li>
| |
| <li>Click the "[BBCODE]" button to switch back to the formatted view.</li>
| |
| <li>Edit the template for your mod.</li>
| |
| </ol>
| |
| | |
| ===Upload the mod release===
| |
| [[File:Modding - Nexus new-file screen.png|thumb|Nexus 'new file' screen.]]
| |
| | |
| To upload a file to Nexus:
| |
| # From your mod page, go to ''Manage > Files''.
| |
| # Fill in the form:
| |
| #* 'File name' should have the mod name and version (like <tt>PineapplesEverywhere 1.0</tt>).
| |
| #* 'File version' field should match the version in your <tt>manifest.json</tt>! If it doesn't, players may get incorrect update alerts.
| |
| #* Tick the "this is the latest version" checkbox so players get update alerts.
| |
| #* 'File description' is up to you. You can mention the minimum SMAPI version (if any), what changed, link to release notes, etc.
| |
| # Upload the <tt>.zip</tt> file [[#Prepare the release package|you prepared above]].
| |
| | |
| {{modding guide footer
| |
| |prev = [[Modding:Modder Guide/Tutorial Mod|Creating a Basic Mod]]
| |
| |next = [[Modding:Modder Guide/Troubleshooting|Troubleshooting]]
| |
| }}
| |