VampireDB

版本 v0.1.1·更新於 2025-05-21

Stupid simple wrapper for LiteDB

模組介紹 作者原文

VampireDB

Stupid simple wrapper for litedb

For Admins:

To install just take BOTH dlls and put them in the plugins folder. 🎉That's it!🎉

For devs:

some examples:

// tdbset

[Command("dbset", shortHand: "dbs", adminOnly: true)]

public void SetValue(ChatCommandContext ctx, string key, string value)

{

Storage.Instance.Set(ctx.User.PlatformId, key, value);

ctx.Reply($"Saved: {key} = {value}");

}

// tdbget

[Command("dbget", shortHand: "dbg", adminOnly: true)]

public void GetValue(ChatCommandContext ctx, string key)

{

string result;

if (Storage.Instance.TryGet(ctx.User.PlatformId, key, out result))

ctx.Reply($"{key} = {result}");

else

ctx.Reply($"No entry for '{key}'.");

}

// tdbget

[Command("dbgetInt", shortHand: "dbgi", adminOnly: true)]

public void GetIntValue(ChatCommandContext ctx, string key)

{

int result;

if (Storage.Instance.TryGet(ctx.User.PlatformId, key, out result))

ctx.Reply($"{key} = {result}");

else

ctx.Reply($"No entry for '{key}'.");

}

// tdbinc [delta] (increments an integer field; default +1)

[Command("dbinc", shortHand: "dbi", adminOnly: true)]

public void IncrementValue(ChatCommandContext ctx, string key, int delta = 1)

{

int newVal = Storage.Instance.Update(

ctx.User.PlatformId,

key,

current => current + delta,

0

);

ctx.Reply($"{key} incremented to {newVal}");

}

// tdbdel

[Command("dbdel", shortHand: "dbd", adminOnly: true)]

public void DeleteValue(ChatCommandContext ctx, string key)

{

bool removed = Storage.Instance.Delete(ctx.User.PlatformId, key);

ctx.Reply(removed? $"Deleted '{key}'.": $"Nothing to delete for '{key}'.");

}

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

BepInEx-BepInExPack_V_Risingdeca-VampireCommandFramework

檔案與校驗

檔案名稱
VampireDB-0.1.1.zip
檔案大小
259.3 KiB