Getting Started
This page will outline how to get a working mod that will simply log a message to the console when the game starts.
Choosing an IDE
An IDE will help`provide the ability to create, edit, and build your mod.
The recommended IDE for modding is Visual Studio, however, stuff like Rider and VSCode can also work. This tutorial will assume you're using Visual Studio.
Installing Visual Studio
Head to the Visual Studio downloads page and select community 2022, after downloading and launching the installer, follow instructions until you reach this screen:
We want the "Desktop development with .NET" module, this will provide us with the tools we need to build the mod.
After installing Visual Studio, launch it once an then close it, this will ensure certain files are generated.
Installing the Template
We provide a template to make creating mods easier, this template will handle renaming files and changing the manifest.
Open up the windows search box and search for "Developer Command Line for Visual Studio 2022", it should look like this:
To install the template, run the following command:
dotnet new --install Bwc9876.OuterWildsModTemplate
-This will give an output similar to this:
TODO: OUTPUT
-Once installed, you can close the developer command prompt and re-open Visual Studio.
Using the Template
Now that we have the template installed, open Visual Studio and select "New Project" from the welcome screen. Then search "Outer Wilds" and the template should appear in the list.
Set the project name to the name of your mod, please note this should NOT have spaces or special characters in it. The standard casing for projects is PascalCase, which involves capitalizing the start of every word and removing spaces.
On the next sreen, set author name to the name you want to appear in the manager and on the website, this should also not contain spaces
Finally, click "Create Project"
General Mod Layout
The general layout of an Outer Wilds mod is as follows:
manifest.json
This file contains metadata about your mod, such as its name, author, and version.
{YourProjectName}.cs
This file should have been renamed to your project name, it acts as the entry point for the mod.
default-config.json
This file is used by OWML to generate the settings menu for your mod, we'll go over it in another guide
{YourProjectName}.csproj
This file tell Visual Studio about your project, it determines stuff like dependencies and versions, you shouldn't need to touch this.
Viewing The C# File
Double-click {YourProjectName}.cs, it should open up in the main editor pane.
This file should contain a class that has the same name as your project and some methods within that class.
We'll focus on Start(). In this method we do two things:
- We output a message to the console alerting the user that the mod has loaded
- We subscribe to the scene loaded event in order to output a message to the log when the SolarSystem scene is loaded.
You may have noticed we use the ModHelper field to achieve console output, ModHelper is a collecton of utilities your mod can use to do a variety of things. It will be covered more in a seperate guide.
Building The Mod
Now that we know what the mod should do, let's make sure it actually does it. Building your mod should be as simple as pressing "Solution -> Build Solution" in the menu bar, if you get an error involving Visual Studio not being able to find a path, please see the section below, otherwise skip to "Running The Game"
Fixing .csproj.user
Your mod contains a special file called {YourProjectName}.csproj.user, this file tells Visual Studio where to build the mod to, if you've installed the manager in a non-standard loction, this file will be incorrect. To fix this, open the manager and select settings, then copy the path in the "OWML Path" field. Copy and paste this value between the <OutputPath> and </OutputPath>, and add \Mods to the end of the path. Then open up your manifest file and copy the uniqueName field (don't include the quotes). Paste this value preceded by a \ a the end of the path.
For example, if my mod's uniqueName is Bwc9876.CoolMod, my file would look like:
<OutputPath>C:\MyCoolFolder\DifferentManagerInstallFolderBcImAHacker\Mods\Bwc9876.CoolMod</OutputPath>
-Running The Mod
Now the mod should have appeared in your mod manager at the very bottom, notice how the download count is a dash.
You mod should now be ready to run!
Click start game and wait for the title screen to load in. Now search your manager logs (there's a search box) for a message along the lines of "My mod {YourProjectName} is loaded!". This means your mod was loaded successfully! You can also try loading into the main game and checking the logs for another message from your mod.
Next Steps
You've successfully created and built your first Outer Wilds mod, moving forward may require a bit of knowledge in unity and will depend on what exactly you're trying to do. These guides will provide information on how to use various aspects of OWML, but it won't cover everything. If you ever need help, or even just want to chat about modding, feel free to join our Discord. There's almost always someone available to help.