VRising.VampireCommandFramework 0.9.0

dotnet add package VRising.VampireCommandFramework --version 0.9.0
NuGet\Install-Package VRising.VampireCommandFramework -Version 0.9.0
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.9.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VRising.VampireCommandFramework --version 0.9.0
#r "nuget: VRising.VampireCommandFramework, 0.9.0"
#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.9.0

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

VampireCommandFramework

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

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

Help

Please feel free to direct questions to @decaprime 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. 
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 543 5/18/2024
0.8.4 251 5/8/2024
0.8.3 190 1/4/2024
0.8.2 302 7/27/2023
0.8.1 133 7/27/2023
0.8.0 335 6/7/2023
0.7.0 159 6/3/2023
0.6.0 154 6/2/2023
0.5.5 152 6/2/2023
0.5.4 159 5/27/2023
0.5.3 202 5/20/2023
0.5.2 169 5/20/2023
0.5.1 144 5/18/2023
0.5.0 131 5/18/2023
0.4.12 459 9/17/2022
0.4.11 437 9/17/2022
0.4.10 425 9/17/2022
0.4.9 410 9/16/2022
0.4.8 440 9/15/2022
0.4.7 397 9/15/2022
0.4.6 479 9/14/2022
0.4.5 467 9/12/2022
0.4.4 430 9/12/2022
0.4.3 407 9/11/2022
0.4.2 398 9/9/2022
0.4.1 407 9/7/2022
0.4.0 431 9/6/2022
0.3.1 416 9/3/2022
0.3.0 425 8/31/2022
0.2.8 405 8/29/2022
0.2.7 424 8/28/2022
0.2.6 413 8/27/2022
0.2.5 420 8/27/2022
0.2.4 422 8/26/2022
0.2.3 428 8/26/2022
0.2.2 424 8/26/2022
0.2.1 418 8/26/2022
0.1.1 412 8/24/2022
0.1.0 442 8/24/2022