Bloody.Wallet 0.1.1

dotnet add package Bloody.Wallet --version 0.1.1
NuGet\Install-Package Bloody.Wallet -Version 0.1.1
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="Bloody.Wallet" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bloody.Wallet --version 0.1.1
#r "nuget: Bloody.Wallet, 0.1.1"
#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 Bloody.Wallet as a Cake Addin
#addin nuget:?package=Bloody.Wallet&version=0.1.1

// Install Bloody.Wallet as a Cake Tool
#tool nuget:?package=Bloody.Wallet&version=0.1.1

Bloody.Wallet

This framework is designed to add a virtual currency to VRising. This opens up a world of possibilities for other mods to integrate with it and serve as a bridge for other mods to use this functionality.

Requirements

Ensure the following mods are installed for seamless integration:

  1. BepInEx
  2. VampireCommandFramework
  3. Bloody.Core

Instructions for using it with your mod

You must include it in your .csproj file as a nuget package

<PackageReference Include="Bloody.Wallet" Version="0.1.*" />

You must include it as a project dependency in your Plugin.cs file

[BepInDependency("trodi.Bloody.Wallet")]

If you want to make the use of Bloody.Wallet an optional dependency, you can do so by including it as an optional dependency in your Plugin.cs file

[BepInDependency("trodi.Bloody.Wallet", BepInDependency.DependencyFlags.SoftDependency)]

API

You have several methods available in the API that you can use, as detailed below:

using BloodyWallet.API;

Add a certain amount of tokens to a user.

bool AddTokenToUser(int _amount, string _method, Entity playerReciviedTokens, Entity userEntityExecuteFunction, out string message)

Remove a certain amount of tokens from a user.

bool RemoveToken(int _amount, string _method, Entity playerReciviedTokens, Entity userEntityExecuteFunction, out string message)

Returns the list of tokens for all users on the server, and if we specify a player's name, it will only return the tokens for that user.

bool listToken(string _playerName, out List<string> message)

Returns the number of tokens for a user as an integer.

bool GetTotalTokensForUser(string _playerName, out int tokens)

Transfers tokens from one user to another.

bool TranferTokenFromOtherUser(int _amount, string _method, Entity playerReciviedTokens, Entity fromUserSendToken, out string message)

Installing on your server

  1. Copy Bloody.Wallets.dll to your BepInEx/Plugins directory.
  2. Launch the server once to generate the config file; configurations will be located in the BepInEx/Config directory.

Configuration

In the configuration file trodi.bloody.Wallet you have several options to configure the mod to your liking

## Settings file was created by plugin BloodyWallet v0.0.9999
## Plugin GUID: trodi.Bloody.Wallet

[General]

## Name of your virtual currency
# Setting type: String
# Default value: BloodyTokens
Name = BloodyTokens

## Enable admin commands
# Setting type: Boolean
# Default value: true
adminCommand = true

## Enable users commands
# Setting type: Boolean
# Default value: true
usersCommand = true

## PrfabGUID for exchange tokens
# Setting type: Int32
# Default value: -77477508
prefabGUIDExchange = -257494203

Available Commands

From the mod options, you can enable or disable commands for admins and/or users as detailed below

Admins

.bwa add <PlayerName> <Amount>
  • Add tokens to a player
    • Example: .bwa add Trodi 5
.bwa remove <PlayerName> <Amount>
  • Remove tokens from a player.
    • Example: .bwa remove Trodi 5
.bwa list <PlayerName>
  • List of players with their respective tokens. If <PlayerName> is specified, it only returns that player's tokens.
    • Examples: .bwa list or .bwa list Trodi

Players

.bw transfer <PlayerName> <Amount>
  • Transfer tokens from your wallet to another player
    • Example: .bw transfer Trodi 5
.bw me 
  • Show your tokens.
    • Example: .bw me
.bwa exchange <Amount>
  • Exchange your tokens for a game item.
    • Examples: .bwa exchange 5

Credits

The V Rising Mod Community is the premier community for V Rising mods.

@Deca, thank you for the exceptional frameworks VampireCommandFramework

Special thanks to the testers and supporters of the project:

  • @Vex, owner & founder of the Vexor RPG server, a tester and great supporter who provided his server as a test platform and took care of all the graphics and documentation.
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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.1 68 6/8/2024
0.1.0 48 6/4/2024