Modding: Making a custom perk

Making a new perk is relatively simple, assuming you have gone through the Modding: Basics and have a mod directory set up.

Create & register your perk

 * 1) Add a new file to your mod (eg.  ), where you define all your custom perks by appending to the   table provided by the base game, repeating this code for each perk you want to add:
 * 2) Add the following line to the very beginning of your, referencing the file you just created:
 * 3) That's it! Your perk should now be included in the game.

Note:

The s are generally hardcoded in-engine effects, which are not customizable via Lua. We can only string them together, or leave them out and make our own effects via custom code (or both!).

For a list of valid effects you can use, see ID or the.

Spawning and picking up a perk
If you want to load the perk via script (and not rely only on holy mountains), you can spawn & pickup the perk with the following snippet:

Checking for active perks
The default  adds every picked up perk as a "run flag", with the string format of. Thus you can use the following function for easily testing if a perk is active or not: