Skip to content

Mod Configuration Guide

Firebreak edited this page Oct 8, 2023 · 1 revision

Intro

Duck Game mods have a special mod.conf file, which contains some information that DG reads before trying to load your mod, which can change how DG loads your mod, or how it loads some aspects of it. This file will

Everything in your face all at once

Setting Default Value Description
NoCompilation false DG will not automatically compile your mod, and will only look for your mod's DLL file
NoRecompilation false For DGR, this mod will not get automatically fixed up for Rebuilt. Use when directly compiling to DGR without caring about backwards compatibility
PreloadContent true This mod will load its content folder when the game launches or on demand
NoPreloadAssets false Completely ignore your mods custom content folder
PinkTransparency true The color (255, 0, 255) will be replaced with transparency in any textures. Turn off for better performance
WorkshopID 0 The Steam Workshop ID for your mod. Used when uploading/updating your mod
MajorSupportedRevision 1 The major revision of Duck Game that this mod supports. Pre 2020 is 0, Post 2020 is 1. If Duck Game is automatically disabling your mod due to incompatibility, you should add a MajorSupportedRevision tag to your mod.conf with a value of 1.
SoftDependencies A list of mod names (separated by '|'s) that this mod may interact with via reflection, but does not require the mod to be loaded to properly run
HardDependencies A list of mod names (separated by '|'s) that this mod requires to load. It may use hard-linked references to classes contained in the mod

What a config file usually looks like, and how to add more settings

By default, DG generates a mod.conf file for you containing only this

<Mod />

And if you upload it to the workshop, it would look something like

<Mod>
  <WorkshopID>2548159573</WorkshopID>
</Mod>

If you want to add any custom settings mentioned above, you gotta add them in the tag format (<TagName>Value</TagName>) just like the WorkshopID tag in the above example. Any tags you don't include will use the default value also mentioned above. A fully maxed out config file would look like

<Mod>
  <WorkshopID>123456789</WorkshopID>
  <NoRecompilation>false</NoRecompilation>
  <NoPreloadAssets>false</NoPreloadAssets>
  <NoCompilation>false</NoCompilation>
  <PreloadContent>true</PreloadContent>
  <PinkTransparency>true</PinkTransparency>
  <MajorSupportedRevision>0</MajorSupportedRevision>
  <SoftDependencies>SOME_MOD|MyHatsMod</SoftDependencies>
  <HardDependencies>ModLib|ParentMod|DGRModReal</HardDependencies>
</Mod>