Managing Granted Rewards
Last updated
Last updated
When a reward is granted outside of quests, the reward key is stored into the database. This is because if certain dialogue is supposed to grant a reward (such as talking to a random NPC), we wouldn't want the player to get the same reward every time they talk to them. The game needs a way to remember if the reward has been granted already.
Received quest rewards are not saved in the database because in the case where quests are repeatable, we would want the player to receive the rewards again. Also, if a quest is not repeatable, the player would not be able to get the rewards anyway.
In dialogue, the reward key can be used to divert dialogue in a completely different path. See Boolean (If) Node.
The database does not store which specific items were granted. It simply stores the reward key.
Rewards are saved in the database as a RewardEntry
. You can use this class to save rewards instead.