VRising.VampireCommandFramework 0.5.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package VRising.VampireCommandFramework --version 0.5.2                
NuGet\Install-Package VRising.VampireCommandFramework -Version 0.5.2                
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.5.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VRising.VampireCommandFramework --version 0.5.2                
#r "nuget: VRising.VampireCommandFramework, 0.5.2"                
#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.
// Install VRising.VampireCommandFramework as a Cake Addin
#addin nuget:?package=VRising.VampireCommandFramework&version=0.5.2

// Install VRising.VampireCommandFramework as a Cake Tool
#tool nuget:?package=VRising.VampireCommandFramework&version=0.5.2                

VampireCommandFramework

alternate text is missing from this package README image Framework for V Rising mod developers to easily build commands.

BETA VERSION WARNING

Please coordinate shipping plugins with this framework with me as I may still need to make breaking changes to the API.

Please feel free to ask any questions to @deca#9999 on V Rising Modding Discord


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. In the future there will be more universal configurations for server operators to manage commands across plugins.

For Plugin Developers

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 gets you automatically

  • Help command listings
  • Argument usage text
  • Command parsing
  • Invoking your code with contexts

For example

The above 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 back like

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

Middleware

All commands execute through the same pipeline and through a series of middleware. You can add your own middleware to the pipeline by adding a class that implements ICommandMiddleware and adding it to the CommandRegistry.Middlewares list. Middleware is where you'd implement things like cooldowns, permissions, logging, command 'costs', that could apply across commands even from other vcf plugins.

Other features

  • Custom type converters
  • Context abstraction support for other types of commands (e.g. RCon, Console, UI, Discord, etc.)
  • Response and formatting utilities
  • Universal BepInEx config management commands for all (including non-vcf) plugins.
  • Override config system for metadata on commands, this lets server operators do things like
    • Localization
    • Custom help text and descriptions
    • Disabling commands entirely
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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages (1)

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

Package Downloads
Bloody.Wallet

Framework for Mods

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.9.0 1,137 5/18/2024
0.8.4 305 5/8/2024
0.8.3 214 1/4/2024
0.8.2 327 7/27/2023
0.8.1 156 7/27/2023
0.8.0 365 6/7/2023
0.7.0 179 6/3/2023
0.6.0 176 6/2/2023
0.5.5 160 6/2/2023
0.5.4 180 5/27/2023
0.5.3 235 5/20/2023
0.5.2 191 5/20/2023
0.5.1 168 5/18/2023
0.5.0 154 5/18/2023
0.4.12 500 9/17/2022
0.4.11 459 9/17/2022
0.4.10 449 9/17/2022
0.4.9 437 9/16/2022
0.4.8 467 9/15/2022
0.4.7 421 9/15/2022
0.4.6 501 9/14/2022
0.4.5 477 9/12/2022
0.4.4 454 9/12/2022
0.4.3 418 9/11/2022
0.4.2 421 9/9/2022
0.4.1 417 9/7/2022
0.4.0 454 9/6/2022
0.3.1 453 9/3/2022
0.3.0 450 8/31/2022
0.2.8 431 8/29/2022
0.2.7 447 8/28/2022
0.2.6 423 8/27/2022
0.2.5 444 8/27/2022
0.2.4 445 8/26/2022
0.2.3 454 8/26/2022
0.2.2 435 8/26/2022
0.2.1 441 8/26/2022
0.1.1 434 8/24/2022
0.1.0 481 8/24/2022