TimbnCore
The shared framework every Timbn mod for Graveyard Keeper 2 is built on. It does nothing on its own, so install it when a Timbn mod needs it.
About this mod Author’s original text
Timbn.GraveyardKeeperTwo.Core
Timbn Core is the shared framework every Timbn mod for Graveyard Keeper 2 is built on. It does nothing on its own. Install it when a Timbn mod lists it as a requirement. Everything after For Modders is for modders.
Requirements
- BepInEx for Graveyard Keeper 2
Installation
With Vortex
- Install BepInEx for Graveyard Keeper 2
- Download with "Mod Manager Download" from the Files tab or the Vortex download button
Without Vortex
- Install BepInEx for Graveyard Keeper 2, start the game once, and quit at the main menu. This creates the BepInEx/plugins and BepInEx/config folders.
- Download the Timbn.GraveyardKeeperTwo.Core zip file.
- Extract the zip into BepInEx/plugins. You should end up with Graveyard Keeper 2/BepInEx/plugins/Timbn.GraveyardKeeperTwo.Core.
Check it works
The bottom right of the main menu lists Timbn Core along with any other Timbn mods.
Settings
There is one setting, Enabled, in BepInEx/config/Timbn.GraveyardKeeperTwo.Core.cfg. Turning it off turns off every Timbn mod at once. Restart the game after changing it.
Troubleshooting
If a game update changes something a Timbn mod relies on, only the part of the mod that needs it turns off, its setting reads as off, a popup on the main menu names it, and the rest of the mod keeps working. A mod whose shared code is affected stays off as a whole instead of running half broken. BepInEx/LogOutput.log says which part failed. If Core itself fails, every Timbn mod stays off. The startup line also warns when the game version differs from the one these mods were tested on, and a popup on the main menu says so once for each such game build. Include that line when reporting a problem.
If a mod does not load, a popup on the main menu names it and says why, for example when it needs a newer Timbn Core. Update the mod it names and restart the game.
Uninstalling
Delete the Timbn.GraveyardKeeperTwo.Core folder from BepInEx/plugins. Every Timbn mod needs Core, so remove those too. Mods that keep their own data per save put it in a.TimbnSaveData.dat file next to each of your saves, and data that belongs to no save goes in TimbnGlobalData.dat in the same folder. The game never reads them, so they are safe to leave or delete.
License
Mozilla Public License 2.0, see LICENSE.txt.
For Modders
Timbn.GraveyardKeeperTwo.Core.xml next to the DLL holds the API documentation for your IDE.
Core is two things at once.
- A loaded plugin (TimbnCorePlugin) that other Timbn mods hard depend on.
- A shared framework (TimbnFrameworkPlugin) that every other Timbn mod builds on. The base plugin class gives you auto patching, config, logging, and per frame updates for free.
The API comes in two shapes. Anything that changes the game on your behalf lives on a property of your plugin, such as Events, Settings, Balance, Player, Clock, UI, and Saves. Everything registered through one of those is owned by your plugin and undone when it unloads, so there is never cleanup to write. Anything that only reads the game is a public static, such as TimbnPlayer, TimbnWorld, TimbnClock, TimbnItems, TimbnZombies, TimbnInput, and TimbnUI. Public members stay across Core versions, and one that has to go is marked obsolete first.
Getting started
To make a Timbn plugin, just inherit TimbnFrameworkPlugin on your BepInPlugin class where T is your mod class.
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
[BepInDependency(TimbnCorePlugin.Guid, "1.0.0")]
public class Plugin: TimbnFrameworkPlugin
{
protected override void BindConfig(ConfigFile config) => PluginConfig.Bind(config);
protected override void OnAwake()
{
Logger.LogInfo("Hello from my plugin");
}
protected override void OnUpdate()
{
// runs every frame while the plugin is enabled
}
}
internal static class PluginConfig
{
public static ConfigEntry TechPointCap { get; private set; } = null!;
public static void Bind(ConfigFile config)
{
TechPointCap = config.
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: