SetInjectionFlagPlugin

版本 v3.4.1·更新於 2026-01-11

Allows players to flag that mods are installed for BouncyRock

模組介紹 作者原文

Set Injection Flag Plugin

This is a plugin for TaleSpire using BepInEx. This plugin lets BouncyRock developers know that logs being generated are from vanilla or modded instances.

There is additional functionality for developers to enable dynamic auto-binding of plugin dependencies via Bepinex Chainloader.

Install

Easiest way to install this is via R2Modman

Usage

Just install, this will automatically update TaleSpire so the devs know you are doing modding work.

How to Compile / Modify

Open.sln in Visual Studio.

Build the project (Now using Nuget for package dependency).

Browse to the newly created /Debug or /Release folders and copy the.dll to \steamapps\common\TaleSpire\BepInEx\plugins

Developer usage of DependencyUnityPlugin

There is a new generic abstract class DependencyUnityPlugin that can be used instead of BaseUnityPlugin to help manage dependencies and plugin lifecycle better.

This class implements some new virtual methods that can be overridden to handle configuration setup, Awake and Destroy events that respects the bepinex chainloader.

By using the generic abstract class, Bepinex ChainLoader is respected whenever plugins are dynamically added/removed from the mod list, and the plugin can be enabled/disabled via config.

This is designed so the developer does not need to implement checks for whether the plugin is enabled/disabled or not, and can focus on the actual plugin logic.

using BepInEx;

using BepInEx.Logging;

using HarmonyLib;

using ModdingTales;

using PluginUtilities;

// Before/Basic Implementation without Chainload binding or enabling/disabling

[BepInPlugin(Guid, Name, Version)]

[BepInDependency(SetInjectionFlag.Guid)]

MyPluginA: BaseUnityPlugin

{

// Consts to describe the plugin

public const string Guid = "Your.PluginA.Guid.Here";

public const string Name = "Your PluginA Name";

public const string Version = "0.0.0.0";

// Config Entries

internal static ConfigEntry Value;

void Awake()

{

Value = Config.Bind("General", nameof(Value), 100);

Logger.LogInfo($"In Awake for {Name}");

harmony = new Harmony(Guid);

harmony.PatchAll();

// Registers Plugin in Mod List UI (Automatically added/removed if use DependencyUnityPlugin or DependencyUnityPlugin)

ModdingUtils.AddPluginToMenuList(this);

// Do Some Other Work Here

}

}

// After/Proper Implementation with Chainload binding and enabling/disabling plus config setup and lifecycle management

[BepInPlugin(Guid, Name, Version)]

[BepInDependency(SetInjectionFlag.Guid)]

MyPluginB: DependencyUnityPluginB

{

// Consts to describe the plugin

public const string Guid = "Your.PluginB.Guid.Here";

public const string Name = "Your PluginB Name";

public const string Version = "0.0.0.0";

// tracking Harmony here for unpatching on destroy

internal static Harmony harmony;

// Config Entries

internal static ConfigEntry Value;

// Config Entry Callbacks

private static void ConfigEntryUpdateCallback(object _)

{

// Something to do when config entry is updated (not to be confused with enabled which is from UnityEngine.Behaviour)

if (Enabled) {

// Plugin is enabled so we should do something

} else {

// Plugin is disabled so we can ignore the callback

}

}

// Implement your config binding here

protected override void OnSetupConfig(ConfigFile config)

{

// Create attribute for config entry

ConfigurationAttributes configurationAttributes = new ConfigurationAttributes

{

CallbackAction = ConfigEntryUpdateCallback

};

// Create description for config entry

ConfigDescription myConfigDescription = new ConfigDescription("", null, configurationAttributes);

// Bind with description and attributes

Value = Config.Bind("General", nameof(Value), 100, myConfigDescription);

}

// Implement code to run on Awake here (if the plugin is enabled)

protected override void OnAwake()

{

Logger.LogInfo($"In Awake for {Name}");

harmony = new Harmony(Guid);

harmony.PatchAll();

// Do Some Other Work Here

}

// Implement code to run on Destr

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

bbepisTaleSpire-BepInExPack

檔案與校驗

檔案名稱
SetInjectionFlagPlugin-3.4.1.zip
檔案大小
27.9 KiB