VRising.VampireCommandFramework 0.10.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package VRising.VampireCommandFramework --version 0.10.3
                    
NuGet\Install-Package VRising.VampireCommandFramework -Version 0.10.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VRising.VampireCommandFramework" Version="0.10.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VRising.VampireCommandFramework" Version="0.10.3" />
                    
Directory.Packages.props
<PackageReference Include="VRising.VampireCommandFramework" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add VRising.VampireCommandFramework --version 0.10.3
                    
#r "nuget: VRising.VampireCommandFramework, 0.10.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=VRising.VampireCommandFramework&version=0.10.3
                    
Install as a Cake Addin
#tool nuget:?package=VRising.VampireCommandFramework&version=0.10.3
                    
Install as a Cake Tool

VampireCommandFramework

alternate text is missing from this package README image

A comprehensive framework for V Rising mod developers to easily build commands with advanced features like command overloading, history, smart matching, and plugin-specific execution.

Usage

For Server Operators

This plugin should be installed into the BepInEx/plugins folder and be kept up to date. It is required by other plugins for commands.

<details><summary><strong>For Plugin Developers</strong></summary>

How to use

1. Add a reference to the plugin

dotnet add package VRising.VampireCommandFramework

2. Add the plugin as a dependency by setting this attribute on your plugin class

[BepInDependency("gg.deca.VampireCommandFramework")]

3. Register your plugin when you're done loading:

CommandRegistry.RegisterAll()

4. Write commands
[Command("foo")]
public void Foo(ICommandContext ctx, int count, string orValues = "with defaults", float someFloat = 3f) 
    => ctx.Reply($"You'd do stuff here with your parsed {count} and stuff");

This command would execute for:

  • .foo 5
  • .foo 5 works
  • .foo 5 "or really fancy" 3.145

But if you typed .foo 5.123 you'd see a generated usage message like:

*.foo (count) [orValues="with defaults"] [someFloat=3]*

This simple example provides

  • Automatic help listings - your command appears in .help
  • Parameter parsing - count, orValues, and someFloat are automatically converted
  • Usage text generation - help shows (count) [orValues="with defaults"] [someFloat=3]
  • Default parameter handling - optional parameters work seamlessly
  • Type conversion - strings become integers, floats, etc.

More Examples

The framework handles these additional command patterns:

Command with parameters:

[Command("give")]
public void GiveItem(ICommandContext ctx, string item, int count = 1)
    => ctx.Reply($"Gave {count} {item}");
  • Executes with: .give sword, .give sword 5

Command groups:

[CommandGroup("admin")]
public class AdminCommands
{
    [Command("ban")]
    public void Ban(ICommandContext ctx, string player) 
        => ctx.Reply($"Banned {player}");
}
  • Executes with: .admin ban PlayerName

Command Overloading

You can now create multiple commands with the same name but different parameter types:

[Command("teleport")]
public void TeleportToPlayer(ICommandContext ctx, string playerName) 
    => ctx.Reply($"Teleporting to {playerName}");

[Command("teleport")]
public void TeleportToCoords(ICommandContext ctx, float x, float y) 
    => ctx.Reply($"Teleporting to {x}, {y}");

When there's ambiguity, players will be presented with options and can select using .1, .2, etc.

Middleware

All commands execute through a middleware pipeline. You can add your own middleware by implementing ICommandMiddleware and adding it to the CommandRegistry.Middlewares list.

Middleware is perfect for implementing permissions and roles, cooldowns, logging, command costs, rate limiting, and other cross-cutting concerns that should apply across commands even from other VCF plugins.

V Roles is an example of a Middleware plugin for VCF that adds in roles that commands and users can get assigned.

Example middleware:

public class CooldownMiddleware : CommandMiddleware
{
    public override bool CanExecute(ICommandContext ctx, CommandAttribute cmd, MethodInfo method)
    {
        // Your cooldown logic here
        return !IsOnCooldown(ctx.Name, cmd.Name);
    }
}

Response and Formatting Utilities

The framework includes rich formatting utilities for enhanced chat responses:

// Text formatting
ctx.Reply($"{"Important".Bold()} message with {"emphasis".Italic()}");
ctx.Reply($"{"Warning".Underline()} - please read carefully");

// Colors (using predefined color constants)
ctx.Reply($"{"Error".Color(Color.Red)} - something went wrong");
ctx.Reply($"{"Success".Color(Color.Green)} - command completed");
ctx.Reply($"{"Info".Color(Color.LightBlue)} message");

// Text sizing
ctx.Reply($"{"Large Header".Large()} with {"small details".Small()}");

// Combining formatting
ctx.Reply($"{"Critical".Bold().Color(Color.Red).Large()} system alert!");

// Paginated replies for long content
var longText = "Very long text that might exceed chat limits...";
ctx.SysPaginatedReply(longText); // Automatically splits into multiple messages

<details> <summary><strong>Available colors include: </strong></summary> Red, Primary, White, LightGrey, Yellow, Green, Command, Beige, Gold, Lavender, Pink, Periwinkle, Teal, LightRed, LightPurple, Lilac, LightPink, SoftBGrey, AdminUsername, ClanName, LightBlood, Blood, LightChaos, Chaos, LightUnholy, Unholy, LightIllusion, Illusion, LightFrost, Frost, LightStorm, Storm, Discord, Global, and ClassicUsername. </details>

Custom Type Converters

Create converters for your custom types:

public class PlayerConverter : CommandArgumentConverter<Player>
{
    public override Player Parse(ICommandContext ctx, string input)
    {
        var player = FindPlayer(input);
        if (player == null)
            throw ctx.Error($"Player '{input}' not found");
        return player;
    }
}

</details>

Framework Features

The VampireCommandFramework also provides these powerful features across all commands:

  • Enhanced help system with filtering and search
  • Command overloading - multiple commands with same name but different parameters
  • Command history and recall - players can repeat previous commands
  • Intelligent command matching - suggests closest matches for typos
  • Plugin-specific command execution - target commands from specific mods
  • Case-insensitive commands - works regardless of capitalization
  • Middleware pipeline for permissions, cooldowns, etc.

Enhanced Help System

The help system has been significantly improved:

  • .help - Lists all available plugins
  • .help <plugin> - Shows commands for a specific plugin
  • .help <command> - Shows detailed help for a specific command
  • .help-all - Shows all commands from all plugins
  • .help-all <filter> - Shows all commands matching the filter

All help commands support case-insensitive searching and include:

  • Command descriptions and usage
  • Parameter information with types and defaults
  • Enum value listings
  • Custom converter usage information

Advanced Usage

Command History and Recall

Players can easily repeat previous commands:

  • .! - Repeat the last command
  • .! 3 - Repeat the 3rd most recent command
  • .! list or .! l - Show command history (last 10 commands)

Smart Command Matching

When a command isn't found, the system suggests up to 3 closest matches:

Command not found: .tleport
Did you mean: .teleport, .teleport-home, .tp

Plugin-Specific Commands

Players can execute commands from specific plugins to avoid conflicts:

.HealthMod heal
.MagicMod heal

Command Overloading

Some commands can work with different types of input. For example, a teleport command might accept either a player name or coordinates:

.teleport PlayerName
.teleport 100 200

When your input could match multiple command variations, you'll see a list of options and can select the one you want using .1, .2, etc.

Universal Configuration Management

Built-in commands for managing BepInEx configurations across all plugins:

  • .config dump <plugin> - View plugin configuration
  • .config set <plugin> <section> <key> <value> - Modify settings

Help

Please feel free to direct questions to @decaprime or @odjit on discord at the V Rising Modding Discord

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on VRising.VampireCommandFramework:

Package Downloads
RisingV.Core

Core Framework Library for RisingV Mods

RisingV.Scripting

Scripting Framework Library for RisingV Mods

Bloody.Wallet

Framework for Mods

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.10.4 310 6/20/2025
0.10.3 431 5/31/2025
0.10.2 1,366 5/17/2025
0.10.1 98 5/17/2025
0.10.0 436 5/6/2025
0.9.0 1,864 5/18/2024
0.8.4 364 5/8/2024
0.8.3 232 1/4/2024
0.8.2 357 7/27/2023
0.8.1 183 7/27/2023
0.8.0 415 6/7/2023
0.7.0 215 6/3/2023
0.6.0 208 6/2/2023
0.5.5 195 6/2/2023
0.5.4 213 5/27/2023
0.5.3 270 5/20/2023
0.5.2 223 5/20/2023
0.5.1 203 5/18/2023
0.5.0 191 5/18/2023
0.4.12 542 9/17/2022
0.4.11 500 9/17/2022
0.4.10 492 9/17/2022
0.4.9 480 9/16/2022
0.4.8 508 9/15/2022
0.4.7 462 9/15/2022
0.4.6 543 9/14/2022
0.4.5 518 9/12/2022
0.4.4 494 9/12/2022
0.4.3 459 9/11/2022
0.4.2 461 9/9/2022
0.4.1 457 9/7/2022
0.4.0 495 9/6/2022
0.3.1 494 9/3/2022
0.3.0 492 8/31/2022
0.2.8 473 8/29/2022
0.2.7 490 8/28/2022
0.2.6 465 8/27/2022
0.2.5 487 8/27/2022
0.2.4 486 8/26/2022
0.2.3 501 8/26/2022
0.2.2 478 8/26/2022
0.2.1 485 8/26/2022
0.1.1 476 8/24/2022
0.1.0 531 8/24/2022