VampireDB

v0.1.1·Updated 2025-05-21

Stupid simple wrapper for LiteDB

About this mod Author’s original text

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}'.");

}

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. 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.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. 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.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack_V_Risingdeca-VampireCommandFramework

File & checksum

Filename
VampireDB-0.1.1.zip
File size
259.3 KiB