Reward
System of rewarding players is mainly associated with Advent Calendar and St. Nicholas.
Last updated
System of rewarding players is mainly associated with Advent Calendar and St. Nicholas.
Last updated
Please, keep on mind, that reward is NOT only one item in the game. It is a collection of economy amounts, commands and items, which will be given to player at claiming.
Key
- Unique name of the reward. It is used at assigment to the specific day.
Name
- Real, human readable, name of the reward. Visible after claiming at opened window.
Description
- Optional. Visible only for staff at Reward Repository for better orientation.
Icon
- Item representing reward. For example, Diamond Pickaxe. Used at LuckyWheel.
Economy Amounts
- Amounts of Money/Experiences given to player at claiming the reward.
Items
- Collection of items given to player at claiming the reward.
Commands
- Collection of commands executed to player at claiming the reward.
There are two options how to create reward. By in-game Reward UI or Manually in the confiuration file. Both have some restrictions, so if you want use some advanced methods you will need to use combination of them.
To open Reward UI type /AdventSeason Settings
Then you need to get into Reward Repository.
Before we start! To save any value using UI, just click on Back
item. The value will be automatically saved.
Now, we can create reward. At first you have to choose Reward Key.
Click on the item Create new reward
at the bottom of the UI, on the left side next to Basic information
. You will be asked to input Reward Key, write it there and confirm it.
Reward Key consist only from Alphanumeric
characters and _
.
To confirm action, click on Redstone Dust at the right side of the UI.
If you inserted correct Reward Key, you can see detail of the reward.
And here, you can manage the whole reward. All the key feature of the reward, its Name, Description, Icon, Items etc.
Text areas
Usage is the same, you will be asked to input some text, write it there and confirm it.
At
Name
,Description
,Icon's HeadName
andIcon's Lore
you can use Color codes. (&
or§
)
To set new Icon of the reward, at first prepare it before opening the UI and place it into your inventory.
Click on the item named Icon
in the UI.
Move the new icon to free slot in the UI.
To save it click on the Back
item.
Optionally, you can aplly Enchantment on this icon.
If the choosen Icon have not got HeadName, it is recommended to create one.
Simple UI, where you can set amounts, which will be given to player at claiming the reward.
Follow instructions showed at Basic information
item.
Again, you need to prepare these items before opening the UI.
In the appropriate UI, click on the item Create new element
. You will be asked to move up to 9 items to the free slots. Than save it.
Repeat, how much times you need.
Here, you can place whatever you want. Heads with Texture, Enchanted Items and Custom Items(Crate Keys).
Throuh commands you can give additional addons, wich cannot be given to player as item. For example, Give money from plugin, which does not support Vault. Or you can apply VIP here.
The usage is the same as above at Items. But you will be asked to input command instead of placing the item.
Example of executable command
tell {player} Merry Christmas!
Input UI is limited for lenght of the command! If you need to input more complicated command, you have to use configuration file.
Configuration file RewardRepository.yml
is located at folder Reward
.
You can manage which reward has higher chance to be claimed from system. Something legendary has lower chance than common pickaxe.
Summary of probability at assinged rewards has to be 100.0! Otherwise, system won't work correctly!
The best way is to configure it manually in configuration file at RewardAssignment.yml
file(See section below).
At detail of the Reward, at bottom of the UI, there is a Redstone Dust
. By click on it, you can test the reward. All Economy Amounnts, Items and Commands will be given to you. (No Database query/update will be executed.)
Available through Settings and Reward Repository.
Again, there are two options how to assign them. By in-game RewardAssigment UI or Manually in the confiuration file.
Personally, I recommend to use exclusively RewardAssigment UI.
To open RewardAssigment UI type /AdventSeason Settings
Then you need to get into Reward Day Assigment section.
Each item in slot represents one day of the season. Also, it is symbolized by amount of items at this slot.
To assign rewards to the day 1.
Left Click on this item.
Here you can see list of all rewards.
Choose, which rewards you want to assign to this day.
On the Selected reward is applied enchantment. Also at the description, you can see that reward is selected.
To manage probability, right click on selected item
To save click on Back item.
To change RewardChoiceType for day 1.
Right Click on this item.
Here you can see list of all types.
Choose, which type you want to use at this day.
To save click on Back item.
Configuration file RewardAssignment.yml
is located at folder Reward
.
One day is represented by following block:
Imagine we have prepared 3 rewards with RewardKey DiamondTools
, MoneyPocket
and ChristmasCandy
.
For the first day of the season, we want to give players ChristmasCandy
and for the second day, we will give them remaining two rewards.
For the third day, we will use probability. DiamondTools
has 90% chance, MoneyPocket
has 10% chance to win.
Grinch's loot probability can be overwritten for specific day.
Summary of probability at assinged rewards has to be 100.0! Otherwise, system won't work correctly!
Extending to more days
Predefined configuration contains 24 block representing duration of the season from the 1st of December to 24th of December. If you want to give rewards for a longer period, you need to add next blocks manually.
Benefit has own assignment type and does not contain Day
variable.
St. Nicholas's gift
Gift can contain only one reward key, others are ignored. Also ChoiceType
is ignored here.
After successful setting up of the rewards, you need to reload the plugin to load new rewards.
To reload the whole plugin type /AdventSeason Reload