Line 1: |
Line 1: |
| {{../header}} | | {{../header}} |
| | | |
− | This page helps solve common issues when creating mods. '''For issues ''using'' mods, see [[Modding:Player Guide/Troubleshooting]].''' | + | This page helps you test your mods and solve common issues. '''For issues ''using'' mods, see [[Modding:Player Guide/Troubleshooting]].''' |
| + | |
| + | ==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. |
| | | |
| ==Fix common build warnings== | | ==Fix common build warnings== |