Thorn Core
The powerful config system behind Thorn, for any mod.
About this mod Author’s original text
Thorn Core
GitHub || Wiki
Powerful config system
- Supports all the usual basic data types (string, bool, numbers, enums), plus:
- Colors with rainbow pulse
- Enemy types
- Keybinds with modifiers (e.g. Ctrl+A instead of just A)
- Any custom data you can serialize to JSON, and allows custom UI
- Compact UI, great for tuning settings live (no Esc and multiple clicks)
- Hot reload on disk change
Comparison with PluginConfig and Configgy: see Thorn Wiki
Screenshots
Usage
public class HatsModConfig: Module
{
public static Setting FunkyMode = null!;
public static Setting HatColor = null!;
public static Setting HatTexture = null!;
public HatsModConfig(): base("myHatsMod.config", "Hats Mod", "Adds custom hat to enemies", ModuleCategory.Render)
{
FunkyMode = CreateSetting("funkyMode", "Funky Mode", "Funny effects", false);
HatColor = CreateSetting("color", "Hat Color", "The color for the custom hat", new EnhancedColor(0.66f, 1f, 0.97f, 0.5f));
HatTexture = CreateSetting("texture", "Hat Texture", "The texture for the custom hat", HatsMod.DefaultHatTexturePath);
}
}
[BepInDependency("com.github.end-4.thornClient")]
public class HatsMod: BaseUnityPlugin
{
public const string DefaultHatTexturePath = "/path/to/texture.png";
private void Update()
{
Logger.LogInfo($"Funky Mode: {HatsModConfig.FunkyMode.Value}");
Logger.LogInfo($"Hat Color: {HatsModConfig.HatColor.Value.GetCurrentColor()}");
Logger.LogInfo($"Hat Texture: {HatsModConfig.HatTexture.Value.ToString()}");
}
}
For more details, see Thorn Wiki
Copyleft
Thorn's code is released under the LGPL-3.0 license, which means you are free to use its config system in your mod, whether or not it's open source; modifications to Thorn's code itself however are required to be open-sourced.
Assets are released under the CC BY-SA 4.0 license. This means you are free to reuse them as long as you give attribution and maintain the same license for derivative works.
Mods that use Thorn
- SpawnerArmExtras
- BillionNemesis
- LGBTQ Hitscan
- Crossover
Technical description
Thorn as a whole is an utility mod, with its own config system featuring a compact UI to house its 50+ modules. This package contains the base system without those modules.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: