Trodi-BloodyRewards icon

BloodyRewards

Rewards System for VRising.

Last updated 6 months ago
Total downloads 2146
Total rating 1 
Categories Server Mods 1.0 Update
Dependency string Trodi-BloodyRewards-1.0.11
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack_V_Rising-1.668.5 icon
BepInEx-BepInExPack_V_Rising

BepInEx pack for V Rising. Preconfigured and includes Unity Base DLLs.

Preferred version: 1.668.5
deca-VampireCommandFramework-0.9.0 icon
deca-VampireCommandFramework

Command framework for developers to easily create universal commands for their plugins.

Preferred version: 0.9.0
Trodi-BloodyCore-1.2.4 icon
Trodi-BloodyCore

Bloody.Core a help library for mod development. It must be installed if any mod uses it.

Preferred version: 1.2.4
Trodi-BloodyWallet-0.1.1 icon
Trodi-BloodyWallet

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.

Preferred version: 0.1.1

README

BloodyRewards

Rewards System for VRising

IMPORTANT NOTE

You must have version 1.2.4 of Bloody.Core installed to be able to use version 1.0.6 or higher of this mod

NEW IN 1.0.10

  • Added option for maximum number of deaths in pvp of the same player. This parameter defines how many times you can kill the same player in 24 hours.
  • Added cooldown option that a player will receive when they exceed the established daily death limit for the same player.
## Maximum number of consecutive deaths to the same player that are allowed before executing the cooldown
# Setting type: Int32
# Default value: 1
MaximumDeathsSamePlayer = 3

## Minutes a player must wait to receive a reward for killing the same player again
# Setting type: Int32
# Default value: 30
CoolDownDeathsSamePlayer = 30

NEW IN 1.0.5

  • You can now earn virtual currency rewards through BloodyWallet mod. Check the configuration file to activate this option.
  • Now you can activate rewards that will be awarded once per day through daily login to the server. Check the configuration file to activate this option.
  • Now you can activate rewards that will be awarded for connection time, the longer people are logged in, the more rewards they will get. Check the configuration file to activate this option.

Known bugs

  • PVP rewards do not work as they should.
Changelog

1.0.11

  • Added a control so that if the timer fails when giving the reward to a player, the Timer does not stop.
  • Add command .brew force start connection timer

1.0.10

  • Added option for maximum number of deaths in pvp of the same player. This parameter defines how many times you can kill the same player in 24 hours.
  • Added cooldown option that a player will receive when they exceed the established daily death limit for the same player.

1.0.9

  • Fixed all normal reward system bugs
  • Fixed the error in the normal reward system that always dropped the item on the ground instead of adding it to the inventory

1.0.8

  • Fixed all virtual reward system bugs

1.0.7

  • Fixed all virtual reward system bugs

1.0.6

  • Updated the timer system through Coroutine that brings the new version of Bloody.Core
  • Fixed PVP reward system
  • Fixed daily server connection reward system
  • Fixed get the NPC reward for Vblood kills

1.0.5

  • Updated to work with BloodyWallet
  • Added daily login reward system
  • Added reward system for connection time

1.0.4

  • Bug fixes and performance improvements

1.0.3

  • Bloody.Core dependency removed as dll and added as framework

1.0.0

  • First Release

Sponsor this project

ko-fi

Requirements

  1. BepInEx
  2. Bloodstone
  3. VampireCommandFramework
  4. Bloody.Core
  5. BloodyWallet

Configuration

Once the mod is installed, it's time for configuration:

For this we will go to the folder that we have defined within BepInEx for the configuration files and there we will find the configuration file of the mod called BloodyRewards.cfg that we will explain:

## Settings file was created by plugin BloodyRewards v1.0.9
## Plugin GUID: BloodyRewards

[ConnectionTimeReward]

## Connection time reward
# Setting type: Boolean
# Default value: true
ConnectionTimeReward = true

## Amount of rewards for connection time
# Setting type: Int32
# Default value: 1
AmountTimeReward = 1

## Every how many minutes the reward will be awarded
# Setting type: Int32
# Default value: 5
TimeReward = 2

[DayliLoginRewardsSystem]

## Daily reward for connecting to the server
# Setting type: Boolean
# Default value: true
DailyLoginRewards = true

## Amount of rewards for login
# Setting type: Int32
# Default value: 15
AmountDailyLoginReward = 15

[RewardsSystem]

## Enable Rewards System
# Setting type: Boolean
# Default value: true
enabled = true

## Percent chance that an NPC will drop the type of reward from the shop
# Setting type: Int32
# Default value: 5
minPercentageDropNpc = 5

## Percentage increase for every rank of 10 levels of the NPC
# Setting type: Int32
# Default value: 5
IncrementPercentageDropEveryTenLevelsNpc = 5

## Minimum reward an NPC can drop
# Setting type: Int32
# Default value: 1
DropdNpcRewardsMin = 1

## Maximum reward an NPC can drop
# Setting type: Int32
# Default value: 5
DropNpcRewardsMax = 5

## Maximum number of reward that a user can get per day by NPC death
# Setting type: Int32
# Default value: 5
MaxRewardsPerDayPerPlayerNpc = 5

## Percent chance that an VBlood will drop the type of reward from the shop
# Setting type: Int32
# Default value: 20
minPercentageDropVBlood = 20

## Percentage increase for every rank of 10 levels of the VBlood
# Setting type: Int32
# Default value: 5
IncrementPercentageDropEveryTenLevelsVBlood = 5

## Minimum reward an VBlood can drop
# Setting type: Int32
# Default value: 10
DropVBloodRewardsMin = 10

## Maximum reward an VBlood can drop
# Setting type: Int32
# Default value: 20
DropVBloodRewardsMax = 20

## Maximum number of reward that a user can get per day by VBlood death
# Setting type: Int32
# Default value: 20
MaxRewardsPerDayPerPlayerVBlood = 20

## Percent chance that victory in a PVP duel will drop the type of reward in the store
# Setting type: Int32
# Default value: 100
minPercentageDropPvp = 100

## Percentage increase for every rank of 10 levels of the Player killed in pvp duel
# Setting type: Int32
# Default value: 5
IncrementPercentageDropEveryTenLevelsPvp = 5

## Minimum reward can drop victory in PVP
# Setting type: Int32
# Default value: 15
DropPvpRewardsMin = 15

## Maximum reward can drop victory in PVP
# Setting type: Int32
# Default value: 20
DropPvpRewardsMax = 20

## Maximum number of reward that a user can get per day by victory in PVP
# Setting type: Int32
# Default value: 20
MaxRewardsPerDayPerPlayerPvp = 20

## Maximum number of consecutive deaths to the same player that are allowed before executing the cooldown
# Setting type: Int32
# Default value: 1
MaximumDeathsSamePlayer = 3

## Minutes a player must wait to receive a reward for killing the same player again
# Setting type: Int32
# Default value: 30
CoolDownDeathsSamePlayer = 30

[Wallet]

## Activate rewards in virtual currency through BloodyWallet ( https://github.com/oscarpedrero/BloodyWallet )
# Setting type: Boolean
# Default value: false
enabled = true

## Maximum amount of virtual coins for when you drop in PVE
# Setting type: Int32
# Default value: 2
amountPveMax = 2

## Minumun amount of virtual coins for when you drop in PVE
# Setting type: Int32
# Default value: 1
amountPveMin = 1

## Maximum amount of virtual coins for when you drop in VBlood
# Setting type: Int32
# Default value: 2
amountVBloodMax = 2

## Minimun amount of virtual coins for when you drop in VBlood
# Setting type: Int32
# Default value: 1
amountVBloodMin = 1

## Maximum amount of virtual coins for when you drop in PVE
# Setting type: Int32
# Default value: 2
amountPVPMax = 2

## Minimun amount of virtual coins for when you drop in PVE
# Setting type: Int32
# Default value: 1
amountPVPMin = 1
SECTION PARAM DESCRIPTION DEFAULT
RewardsSystem enabled Define if the system enabled or disabled true
RewardsSystem minPercentageDropNpc Percent chance that an NPC will drop the type of reward 5
RewardsSystem IncrementPercentageDropEveryTenLevelsNpc Percentage increase for every rank of 10 levels of the NPC 5
RewardsSystem DropdNpcRewardsMin Minimum reward an NPC can drop 5
RewardsSystem DropNpcRewardsMax Maximum reward an NPC can drop 5
RewardsSystem MaxRewardsPerDayPerPlayerNpc Maximum number of reward that a user can get per day by NPC death 5
RewardsSystem minPercentageDropVBlood Percent chance that an VBlood will drop the type of reward 20
RewardsSystem IncrementPercentageDropEveryTenLevelsVBlood Percentage increase for every rank of 10 levels of the VBlood 1
RewardsSystem DropVBloodRewardsMin Minimum reward an VBlood can drop 10
RewardsSystem DropVBloodRewardsMax Maximum reward an VBlood can drop 20
RewardsSystem MaxRewardsPerDayPerPlayerVBlood Maximum number of reward that a user can get per day by VBlood death 20
RewardsSystem minPercentageDropPvp Percent chance that victory in a PVP duel will drop the type of reward in the store 100
RewardsSystem IncrementPercentageDropEveryTenLevelsPvp Percentage increase for every rank of 10 levels of the Player killed in pvp duel 5
RewardsSystem DropPvpRewardsMin Minimum reward can drop victory in PVP 15
RewardsSystem DropPvpRewardsMax Maximum reward can drop victory in PVP 20
RewardsSystem MaxRewardsPerDayPerPlayerPvp Maximum number of reward that a user can get per day by victory in PVP 20

Rewards System

This system can be activated or not depending on whether the material we want to use as reward drops very frequently or not.

The system works in such a way that we will define a percentage of opportunity for the rewards to drop each time the following events occur:

  • Death of an NPC by a player
  • Death of a VBlood by a player
  • Every time someone wins a PVP duel

For this, we have included several parameters that are configured through the mod configuration file on the server. For each of those three events there are several values ​​that we can configure:

  • Percentage of chance of falling when the event jumps
  • Percentage of drop chance increases every 10 levels.
  • Minimum number of rewards that can drop in each event
  • Maximum number of rewards that can drop in each event
  • Maximum number of rewards a player can get through this drop system.

Let's take an example of an NPC drop system:

  • We want to have a 10% probability that an NPC, when killed, drops a number of rewards of a minimum of 1 and a maximum of 5

  • And that the increase every 10 levels of that NPC is 2%

  • With a maximum of 40 coins per day for each player.

  • To make this type of configuration we would have to put the following parameters in the server file:

## Percent chance that an NPC will drop the type of reward from the system
# Setting type: Int32
#Default value: 5
minPercentageDropNpc = 10

## Percentage increase for every rank of 10 levels of the NPC
# Setting type: Int32
#Default value: 5
IncrementPercentageDropEveryTenLevelsNpc = 2

## Minimum reward an NPC can drop
# Setting type: Int32
#Default value: 1
DropdNpcRewardsMin = 1

## Maximum reward an NPC can drop
# Setting type: Int32
#Default value: 5
DropNpcRewardsMax = 5

## Maximum number of reward that a user can get per day by NPC death
# Setting type: Int32
#Default value: 5
MaxRewardsPerDayPerPlayerNpc = 40

This is what happened in the different cases of the rewars system on the death of an NPC:

  • If the NPC is level from 1 to 10, his percentage chance of having a drop of coins from the NPC is 10% with a maximum of 1 coin and a maximum of 5.
  • If the NPC is level from 11 to 20, his percentage chance of having a drop of coins from the NPC is 12% with a maximum of 1 coin and a maximum of 5.
  • If the NPC is level from 21 to 30, his percentage chance of having a drop of coins from the NPC is 14% with a maximum of 1 coin and a maximum of 5.
  • If the NPC is level 31 to 40, his percentage chance of having a drop of coins from the NPC is 16% with a maximum of 1 coin and a maximum of 5.
  • ... And so we would continue up to the level that is indicated for each NPC until we reach the limit per player per day, which in that case would not have any chance of getting drops from the store.

This same configuration can be customized for the three drop events that we mentioned above.

Admin commands

There are currently four commands for admins:

COMMAND DESCRIPTION
.brw add "<NameOfReward" <PrefabGUID> <OnlyForVBlood (true/false)> Command to add an reward. To get the PrefabGUID you must visit Complete list of prefabs and get the PrefabGUID Value as shown in the image below. The last parameter is used to indicate to the drop system if you want to activate this reward so that it drops when killing an NPC Example: .brw add "Silver Coin" -949672483 true
.brw list Command to get the list of rewards.
.brw remove <NumberItem> Command to remove an reward.
.brw force start connection timer Start the connection time rewards timer. If it was not stopped before, this could cause a double reward for connection time.

Credits

V Rising Mod Community the best community of mods for V Rising

@Godwin for all the ideas you have brought to the project.

@Deca for your help and the wonderful framework VampireCommandFramework and BloodStone based in WetStone by @Molenzwiebel

@Adain for encouraging me to develop a UI to be able to use the mod from the client, for the support and for its VRising.GameData framework

@Paps for all the help and encouragement he has given us to get this idea off the ground.

A special thanks to the testers and supporters of the project:

  • @Vex Vexor Gaming as a tester and great supporter, who provided his server as a test platform!