Rewards #
The Reward systems is a powerful tool that enables you to reward players’ in-game activities with everything from currencies and energies, to items and reward modifiers. The system is designed to be flexible enough to allow for simple guaranteed rewards as well as complex Gacha weighted table rewards seen in popular games today.
The Reward system is integrated into all systems within Hiro, which allows you to create sophisticated reward structures in your game. These concepts are explored in the Reward Types examples section below.
Customization parameters #
The following JSON represents the customization parameters you can use to configure the default user experience for a particular reward. Note, rewards are configured inline where they are used, for example as part of an Unlockables configuration.
|
|
The JSON schema defines a reward object which defines the various items, item sets, currencies, energies, energy modifiers, and reward modifiers that will be available as rewards where this particular reward is defined. You can configure as few or as many of each as needed for your desired gameplay. This object is defined in-line throughout the various data definitions within Hiro, above it is shown as part of a rewards
field, but in some systems this field may be named differently (e.g. contributorRewards
in the Donations System).
A Reward
object consists of the following properties
guaranteed
: This section defines aRewardContents
object that contains all of the rewards a player is guaranteed to receive once a certain activity is completed or unlocked.weighted
: This section defines an array ofRewardContents
that the player may or may not receive depending on the outcome of a random roll.max_rolls
: This property determines how many rolls are made against theseweighted
reward contents. Each weighted reward defines aweight
property that determines how likely the user will receive that particular reward content.total_weight
: This property defines the total weight of all weighted reward contents, this can be omitted if you would prefer it to be automatically calculated. If you want a chance for the player to receive no reward, you can manually set thetotal_weight
to be higher than the sum of individual weights.
RewardContents
#
The RewardContents
object is structured as follows:
Property | Subproperty | Description |
---|---|---|
items | A string:object , where the key is the item ID and the value defines the quantity. | |
min | The minimum amount to reward. | |
max | The maximum amount to reward. | |
multiple | The multiple the amount will be rounded to. | |
item_sets | An array of object values that define which item sets are part of the reward. | |
set | An array of string values that define which intersection of item sets to reward from. | |
min | The minimum amount to reward. | |
max | The maximum amount to reward. | |
multiple | The multiple the amount will be rounded to. | |
max_repeats | The maximum amount of repeats that can be rewarded from this set. | |
currencies | A string:object , where the key is the currency ID and the value defines the quantity. | |
min | The minimum amount to reward. | |
max | The maximum amount to reward. | |
multiple | The multiple the amount will be rounded to. | |
energies | A string:object , where the key is the energy ID and the value defines the quantity. | |
min | The minimum amount to reward. | |
max | The maximum amount to reward. | |
multiple | The multiple the amount will be rounded to. | |
energy_modifiers | An array of object values that define which energy modifiers are part of the reward. | |
id | The ID of the energy that should be modified. | |
operation | The operation that should be performed on the energy when rewarded (e.g. multiplier, addition) | |
value | An object which defines the min , max and multiple amounts. | |
reward_modifiers | An array of object values that define which reward modifiers are part of the reward. | |
id | The ID of the reward element that should be modified (e.g. coins or potion ). | |
type | The type of the reward that is to be modified (e.g. item or currency ) | |
operation | The operation that should be performed on the reward when rewarded (e.g. multiplier , addition ) | |
value | An object which defines the min , max and multiple amounts. | |
weight | The weight of this reward as it relates to the rest of the weighted rewards. |
Reward types #
The reward system in Hiro offers a variety of options to enhance the excitement and progression in your games. With different reward types available, you can create engaging experiences that keep players motivated and eager to continue playing. Hiro supports simple rewards, weighted rewards, gacha-style mechanics, and custom rewards tailored to your game. By understanding how to effectively implement these rewards, you can optimize the gaming experience for your players and provide them with a sense of accomplishment and satisfaction.
Simple rewards #
Simple rewards are a straightforward and easy-to-implement type of reward in Hiro. These rewards typically offer guaranteed items, currency, or energies to players upon achieving specific milestones or completing tasks. Simple rewards are ideal for creating a sense of immediate gratification and progress, providing players with a tangible benefit for their efforts.
Daily login reward
Define a reward as part of a Daily Achievement that will give players a random number of coins for logging in each day.
|
|
Health Restore Potion
Define a reward that will restore a player’s health as part of a Consumable Item.
|
|
Boosting Health Energy Rewards
Define a reward that will multiply a player’s health
energy rewards for the next hour as part of a Virtual Store Purchase.
|
|
Boosting Coin Rewards
Define a reward that will multiply all coin’s received via rewards for the next 2 hours as part of a Donation Contribution reward.
|
|
Weighted rewards #
Weighted rewards introduce an element of chance and rarity to your game’s reward system. With weighted rewards, you can assign different probabilities to various items or outcomes. This allows you to create a sense of anticipation and excitement as players strive to obtain rare and valuable rewards. By carefully balancing the weights assigned to each reward, you can ensure a fair and rewarding experience for your players.
Level completion reward chest
Define a reward as part of a Level Completion Unlockable that guarantees the player a potion as well as a 25% chance to get a rare gem.
|
|
Gacha rewards #
Gacha-style rewards have become increasingly popular in many games. Inspired by capsule toy vending machines, gacha rewards offer players a chance to obtain a randomized selection of prizes. Players typically use in-game currency or special tokens to “pull” from a pool of possible rewards. Gacha rewards add an element of surprise and collection to your game, enticing players to engage in repeated pulls to obtain rare and coveted items.
Hero reward
Define a reward as part of a Virtual Store Purchase that rewards a player with two random heroes.
|
|
Custom rewards #
Custom rewards provide you with the flexibility to design unique and personalized rewards tailored specifically to your game’s mechanics and progression systems. Whether it’s unlocking special abilities, accessing exclusive content, or granting players special privileges, custom rewards allow you to shape the gameplay experience according to your vision. With custom rewards, you have the freedom to create meaningful and memorable moments for your players, ensuring a truly immersive and rewarding gaming experience.
Custom rewards in Hiro are implemented by utilizing a hook function, which allows you to modify the reward behavior and provide a personalized experience for your players. To set up the hook, you can use the appropriate SetOnReward()
function and pass in your own implementation of the hiro.OnReward
hook.
The following example demonstrates how you can implement a custom reward hook when an inventory item is consumed using the inventorySystem.SetOnConsumeReward()
hook.
Define a custom reward hook function:
|
|
Assign the hook function to the inventory system:
|
|
Within the onConsumeReward()
function, you have the opportunity to modify the reward object and/or perform any necessary actions or checks. In the example above, the context of the consumed item is checked and a specific action is taken and reward given depending on the user’s contextual information.
By utilizing a reward hook function and customizing it to fit your game’s specific needs, you can dynamically adjust rewards, incorporate game mechanics, and create a more personalized and engaging experience for your players.
Here are some examples of custom rewards you could create:
- Gacha based pity system, rewarding player’s with a legendary after X rewards without one.
- Unlocking special abilities or powers for the player.
- Granting access to exclusive areas, levels, or game content.
- Granting in-game titles, badges, or achievements.
- Enabling fast travel options within the game world.
- Offering personalized quests or missions.
- Granting access to rare or legendary items with personalized attributes.
- Granting additional character slots.
- Providing in-game social features or privileges, such as VIP status or access to exclusive chat channels.
Pity system example #
The following code show how you could implement a Pity system using a custom reward hook on a Virtual Store Purchase that guarantees a player receives a legendary hero after a certain number of rewards received without one.
|
|