-
Notifications
You must be signed in to change notification settings - Fork 3
Adding new perks
Adding new perks requires two basic steps:
- Creating the perk
- Adding it to the game
To create a perk, inherit from res://Scenes/Perks/Perk.tscn
. This perk node will be added to the player, when they receive the perk. Extend the script and override the add_effect()
and remove_effect()
methods. If you want to display a formatted string as text, also override the according functions. Add the required translations to the translation file, if you can. Take a look at the provided perks if you have questions.
Add the perk to the PerkManager
of the player scene by adding it to the perk array. Also add a new entry to the likelihood array and put in the likelihood. These likelihoods are relative to each other, which means a perk with a likelihood of 20 will be spawned twice as likely as one with 10.