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
- Rename all files using the auto-renaming action. This is found on your new repository on GitHub, click the
Actions
tab thenAuto-Renaming
, thenRun workflow
and input your username and the name of your mod (pascal case, no spaces). - Clone your new repository to your machine
- Open
[YourModName].sln
in Visual studio - Edit
[YourModName]/[YourModName].csproj.user
. In theDredgePath
line, change this to be the actual path of your Dredge install. - Start writing your code in
[YourModName].cs
- Build and release the mod!
Instead of using the renaming workflow you can update the names manually (this replaces steps 2 and 3 above):
- 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
. In theOutputPath
line, changeYourName.WinchModTemplate
to match theModGUID
you wrote inmod_meta.json
.
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 ran the auto-renaming script this should already be set to an appropriate unique id.ModAssembly
: The main.dll
file for your mod. This should have been changed along with all other references toWinchModTemplate
when running the auto-renaming script.MinWinchVersion
: Set this to be the current Winch version you're using. If you update your mod to make use of new Winch features make sure this is up-to-date.EntryPoint
: This is the class and method that is initially called to start your mod. Normally you can just leave this as its default value after running the auto-renaming script.
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
Actions
tab on your repository and manually trigger theCreate 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.