Reward

System of rewarding players is mainly associated with Advent Calendar and St. Nicholas.

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.

What does reward consist of?

  • 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.

How to create 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.

Using in-game Reward UI

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 and Icon's Lore you can use Color codes. (& or §)

Icon

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.

Economy Amounts

Simple UI, where you can set amounts, which will be given to player at claiming the reward. Follow instructions showed at Basic information item.

Items

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).

Commands

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.

Manually in the file

Configuration file RewardRepository.yml is located at folder Reward.

Template for the one reward

UniqueRewardKey:
  Name: '&5Name of the reward using color codes!'
  Description: 'Optional Description'
  Icon:
    Material: STONE #Material of the Icon
    MaterialData: 0 #Used for items, where the plugin runs on the version from 1.8.8 to 1.12.X. Here you can specify color of the material.
    Enchantment: false #Flag if the enchantment is applied on the Icon
    HeadName: '&5HeadName of the Icon' #Used at LuckyWheel
    Lore: [] #Desciption. Used at LuckyWheel
    Color: "255:255:255" #RGB Color format of leather armor
    ItemFlags: #Flags applied on the Icon
    - HIDE_ENCHANTS
    - HIDE_ATTRIBUTES
    CustomModelData: 0 # Only versions 1.14 and above
    Probability: 100.0 #Working only at ChoiceType QUICK__CHANCE or LUCKY_WHEEL__CHANCE
  Reward:
    Amount:
      Vault: 0
      PlayerPoint: 0
      Experience: 0
    ItemList: [] #Cannot be set upped here.
    CommandList: []

Lore example

Lore:
- "&7The first line of the icon description."
- "&7The second line of the icon description."

List of commands example

CommandList:
- "money give {player} 100"
- "set VIP {player} 30Day"

Probability

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).

Testing the reward

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.

How to assign reward to the specific day

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.

Using in-game Reward 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.

Usage

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.

Manually in the file

Configuration file RewardAssignment.yml is located at folder Reward.

One day is represented by following block:

DAY_1: #Unique Key, not recommended to change it, if you do not know how it works.
  AssignmentType: "ADVENT_CALENDAR__WINDOW" #Type of assignment (See below).
  Day: 1 #Day of the season
  ChoiceType: "QUICK__BASE" #Optional variable, if not set, default value will be used.
  Reward: [ ] #List of assigned rewards

Usage

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!

DAY_1:
  AssignmentType: "ADVENT_CALENDAR__WINDOW"
  Day: 1
  ChoiceType: "QUICK__BASE"
  Grinch:
    Loot:
      Probability: 25.0
  Reward:
  - ChristmasCandy
DAY_2:
  AssignmentType: "ADVENT_CALENDAR__WINDOW"
  Day: 2
  ChoiceType: "LUCKY_WHEEL"l
  Reward:
  - DiamondTools
  - MoneyPocket
DAY_3:
  AssignmentType: "ADVENT_CALENDAR__WINDOW"
  Day: 3
  ChoiceType: "QUICK__CHANCE"
  Reward:
  - DiamondTools:90.0
  - MoneyPocket:10.0

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.

DAY_25:
  AssignmentType: "ADVENT_CALENDAR__WINDOW"
  Day: 25
  Reward: [ ]

Benefit

Benefit has own assignment type and does not contain Day variable.

BENEFIT:
  AssignmentType: "ADVENT_CALENDAR__BENEFIT"
  ChoiceType: "QUICK__BASE" #Optional variable, if not set, default value will be used.
  Reward: [ ]

St. Nicholas's gift

Gift can contain only one reward key, others are ignored. Also ChoiceType is ignored here.

GIFT:
  AssignmentType: "SAINT_NICHOLAS__GIFT"
  Reward: [ ]

Finally

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

UI Flow

Last updated