SkongGamemodes

版本 v1.2.0·更新於 2025-10-12

Library that allows you to make a new gamemode in a few lines of code.

模組介紹 作者原文

SkongGamemodes

A lightweight framework for creating custom gamemodes in HK: Silksong

Features

  • Initialize multiple gamemodes with custom names, colors, and descriptions.
  • Easily Initialized in just a few lines

Installation

  • Download SkongGamemodes.dll.
  • Add SkongGamemodes.dll to your BepInEx plugins folder alongside your main plugin DLL.
  • Reference it in your main mod project (Don't forget to add using SkongGamemodes;).
  • When you publish your mod, don't forget to add it as a dependency in manifest.json, the custom modes won't load without it being in plugins folder

Usage

  • Initialize a game mode

using UnityEngine;

using SkongGamemodes;

[BepInDependency("dervorce.hkss.gamemodemanager", BepInDependency.DependencyFlags.HardDependency)] // Add this to make sure it loads before your plugin

[BepInPlugin("dervorce.hkss.mypluh", "My Plugin", "1.0.0")]

public class MyPlugin: BaseUnityPlugin

{

private GameModeManager.GameModeData myMode;

private void Awake()

{

myMode = GameModeManagerPlugin.Instance.Manager.Init(

this,

"Bound Soul", // Mode Name

"Enable The Binder by Pressing H", // Description

new Color(0.941f, 0.780f, 0.255f, 0.8f) // UI Color (Nullable, if you put in null, it will not modify the color)

);

}

}

  • Accessing mode state

[HarmonyPatch(typeof(PlayerData), "TakeHealth")]

public static class Patch_GlassyBoy

{

[HarmonyPrefix]

public static void glAss(PlayerData __instance, ref int amount)

{

if (BoundSilkPlugin.glassBoundMode.Enabled) // if GlassBoundMode is enabled

{

amount = __instance.CurrentMaxHealth; // Die in one hit

}

}

}

  • Creating multiple modes

var steelBoundMode = GameModeManagerPlugin.Instance.Manager.Init(

this,

"SteelBound Soul",

"Bound by Pantheon, Chained by Steel",

null, // color but nulled

steel: true // if steel is enabled, this will make it based off steel soul mode instead of normal mode, which means steel soul exclusive stuff and permadeath being part of your gamemode

sprite // you can add in a UnityEngine.Sprite which will override the regular image

);

Notes

  • Make sure your main plugin references this DLL and includes using SkongGamemodes;.
  • Do not add multiple instances of GameModeManager—it’s a singleton.

License

MIT License – feel free to use, modify, or integrate into other mods.

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

檔案與校驗

檔案名稱
SkongGamemodes-1.2.0.zip
檔案大小
34.4 KiB