A modding template for KoGaMa, powered by BepInEx.
This template is designed to work out-of-the-box: that means you can click Build
and it'll just work.
- Batteries-included: already configured for modding
- Customizable with feature toggles
- Validates game and mod loader installation
- Automatically installs your plugins
- Copies assets to your mod folder
- Embeds resources if needed
- KoGaMa Standalone Client
- BepInEx 6.0.0-be
- .NET 6.0 SDK or newer
- .NET IDE of choice
Note
Using Visual Studio Community 2022?
The .NET Desktop Development workload includes .NET 8.0 SDK
.
This means you do not need to install .NET 6.0 SDK
.
This guide will help you get started with modding KoGaMa in just a few minutes.
Installing BepInEx is incredibly easy and won't take much time.
First, open your client's installation folder. You can do this by pressing Win + R
on your keyboard and pasting the following location.
%LocalAppData%\KogamaLauncher-WWW\Launcher\Standalone
This will open the game folder in Windows Explorer. If it didn't appear on screen, click on the Explorer icon in the taskbar or tab over to it.
Next, extract the BepInEx ZIP file. This will result in four files and two folders: changelog.txt
, doorstop_config.ini
, .doorstop_version
, winhttp.dll
, and a BepInEx
and dotnet
folder.
Drag everything into the Standalone
folder. The BepInEx
and dotnet
folders should now be next to the kogama_Data
folder.
Run the game (running the kogama.exe
file is enough) and wait for the game to load.
You're done! BepInEx is now installed. You may now close the game.
For a more comprehensive guide on installing BepInEx, as well as several articles on using it, please refer to the official BepInEx documentation site.
Much like BepInEx, installing the template is very simple.
First, clone the repository or download the source code from Releases. If downloaded, extract the ZIP file.
Be sure to move the folder somewhere safe where you know it won't be deleted or overwritten.
Next, open the folder. Inside, you'll see two scripts: install.sh
and uninstall.sh
. Run install.sh
to add the template to your list of .NET templates, and uninstall.sh
to remove it.
That's it! The template is now installed and ready to create projects.
Launch your .NET IDE of choice and open the list of available templates.
If using Visual Studio Community 2022, this is done by clicking on "Create a new project" on the right.
If the template isn't immediately visible, use the search bar to filter the results.
Visual Studio Community 2022 should automatically display the template at the top of the list after installing it, then will list it on the left, under "Recent project templates".
Select the template and start customizing it. Give it a name, and list yourself as the author.
Create the project and you're done!
The template takes care of all references for you, so you can focus on what really matters, rather than mess with project configuration.
The template comes with some optional features you might find useful. They can be toggled on and off easily, and are separate from the main project, so you can share your code without worrying about it conflicting with someone else's settings.
Open the *.csproj.user
file and customize the settings.
If you're using a custom launcher or targetting a different server, this is where you can enter your client's installation location.
When done customizing your plugin base, click on Build
in your IDE.
If the task is enabled, your plugin will automatically be installed. Open the game and test it out!
When ready to publish, don't forget to add a license! This is very important in the open source community.
If your plugin has assets, create a folder named assets
and it'll automatically be copied over to your mod folder when building your project.
Likewise, if you have embedded resources, create a folder named resources
and those will automatically be embedded when building.