Skip to content

Perk Tree Config (Astral Sorcery)

Description

Control the Perk level cap and XP formula.

Identifier

The identifier mods.astralsorcery.perk_tree_config will be used as the default on this page.

All Identifiers

Any of these can be used to refer to this compat:

groovy
mods.astral.perktreeconfig
mods.astral.perkTreeConfig
mods.astral.PerkTreeConfig
mods.astral.perk_tree_config
mods.astralsorcery.perktreeconfig
mods.astralsorcery.perkTreeConfig
mods.astralsorcery.PerkTreeConfig
mods.astralsorcery.perk_tree_config/* Used as page default */

Editing Values

  • Sets the maximum level of Astral Sorcery's Perks, between 1 and 100:

    groovy
    mods.astralsorcery.perk_tree_config.setLevelCap(int)
  • Sets the Experience cost to advance to the next level, with the Closure taking 2 parameters, int levelNumber and long previousLevelCost and returning a long:

    groovy
    mods.astralsorcery.perk_tree_config.setXpFunction(Closure<Long>)
Example
groovy
mods.astralsorcery.perk_tree_config.setLevelCap(50)
mods.astralsorcery.perk_tree_config.setXpFunction({ int i, long prev -> prev + 1000L + MathHelper.lfloor(Math.pow(2.0, i / 2.0F + 3)) })

Contributors

© 2024 CleanroomMC. All Rights Reserved.