A template Dredge mod for use with the Winch mod loader
- An IDE that supports .NET, like Visual Studio (community version available here)
- Dredge Mod Manager (get it from the Dredge Mods website)
- Winch installed in the mod manager
- A GitHub account (required for using the template and releasing your mod to the public)
- Generate your repository from this template
- Clone your new repository to your machine
- Open all files in a text editor and do a find replace on
WinchModTemplate
to change it to the name of your mod without spaces. For example,CosmicHorrorFishingBuddies
. Similarly do a find replace onYourName
and change it to (you guessed it) your name. - Rename all files with
WinchModTemplate
in the name to instead be the name of your mod without spaces. - Edit
WinchModTemplate/mod_meta.json
- Edit
WinchModTemplate/WinchModTemplate.csproj.user
- Open
WinchModTemplate.sln
in Visual studio - Start writing your code in
WinchModTemplate.cs
- Build and release the mod
The mod_meta.json
file looks something like this:
{
"Name": "Winch Mod Template",
"ModGUID": "YourName.WinchModTemplate",
"Version": "0.0.1",
"ModAssembly": "WinchModTemplate.dll",
"MinWinchVersion": "0.2.3",
"Entrypoint": "WinchModTemplate.Loader/Initialize"
}
You will want to change most of these fields
Name
: This is the human readable name of your mod. They will see this name in the mod manager and on the website.ModGUID
: This is the unique identifier for your mod. To prevent overlaps, you should make this[YourName].[ModName]
. For example,xen.CosmicHorrorFishingBuddies
. If you did your find-replaces correctly this will already be set to an appropriate unique id.ModAssembly
: The main.dll
file for your mod. This should be changed along with all other references toWinchModTemplate
in a find/replace on all files.MinWinchVersion
: Set this to be the current Winch version you're using.EntryPoint
: This is the class and method that is initially called to start your mod. Normally you can just leave this alone.
- In the
DredgePath
line, change this to be the actual path of your Dredge install. - In the
OutputPath
line, changeYourName.WinchModTemplate
to match theModGUID
you wrote inmod_meta.json
.
Can either be done manually or with the GitHub action.
First build the mod using your IDE. Find it in the mods folder under your Dredge install. Zip the contents of the folder with your mod's ModGUID
. For the mod to work properly with the manager, the name of the zip must not change between versions. Ideally, keep the zip file name as your ModGUID
.
Create a new release on GitHub. Have the version tag exactly match the Version
property in the mod_meta.json
file. When you update the mod, be sure that you incremented this version number. You should follow semantic versioning. When making a new release for an update, you leave the previous release alone and create a new one with the new version tag.
- Go to the settings for your repository and make sure that GitHub actions have permissions to create releases. This is under Actions -> General -> Workflow permissions -> Check "Read and write permissions".
- Edit these two lines in release.yml to be your name and name of the project. If you did your find-replace properly this will already be done.
PROJ_USERNAME: YourName
PROJ_NAME: WinchModTemplate
- Go to the actions tab on your repository and manually trigger the Create Release action.
- Go to the releases tab and verify that the release was properly made, then publish it (it will be a draft).
Fill out the form here to have your mod included on the mod database. This will allow your mod to be featured on dredgemods.com and make it available in the Dredge Mod Manager.