VRising.VampireCommandFramework 0.4.9

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

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

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 net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • 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,154 5/18/2024
0.8.4 309 5/8/2024
0.8.3 216 1/4/2024
0.8.2 329 7/27/2023
0.8.1 158 7/27/2023
0.8.0 367 6/7/2023
0.7.0 181 6/3/2023
0.6.0 178 6/2/2023
0.5.5 164 6/2/2023
0.5.4 182 5/27/2023
0.5.3 237 5/20/2023
0.5.2 193 5/20/2023
0.5.1 170 5/18/2023
0.5.0 156 5/18/2023
0.4.12 502 9/17/2022
0.4.11 461 9/17/2022
0.4.10 451 9/17/2022
0.4.9 439 9/16/2022
0.4.8 469 9/15/2022
0.4.7 423 9/15/2022
0.4.6 503 9/14/2022
0.4.5 479 9/12/2022
0.4.4 456 9/12/2022
0.4.3 420 9/11/2022
0.4.2 423 9/9/2022
0.4.1 419 9/7/2022
0.4.0 456 9/6/2022
0.3.1 455 9/3/2022
0.3.0 452 8/31/2022
0.2.8 433 8/29/2022
0.2.7 449 8/28/2022
0.2.6 425 8/27/2022
0.2.5 446 8/27/2022
0.2.4 447 8/26/2022
0.2.3 456 8/26/2022
0.2.2 437 8/26/2022
0.2.1 443 8/26/2022
0.1.1 436 8/24/2022
0.1.0 483 8/24/2022