1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

new-horizons-Perk-Locking

Apr 18, 2014
new-horizons-Perk-Locking
  • Locking/Unlocking Perks
    Go back to modding

    Since BETA 3.2 Perks can be locked. You can find a boolean statement named ALLOW_LOCKED_PERKS in InternalSettings which states if perks can be locked or not.

    Locking Perks
    To lock a perk go to perks_init and add the following line (change the name ofcourse), this will lock the perk for all storylines:
    Code:

    ChrPerksList.list.PERKNAME.locked = true;
    Say you want to lock a perk during a quest or at the start of your storyline you can use the following command:
    Code:

    LockPerk(PERKNAME)
    If you want a special description when the perk is locked go to the file RESOURCE\INI\TEXTS\ENGLISH\AbilityDescribe.txt there you can add a field like this:
    Code:

    perkBasicLandOwnerLocked
    {
    Gain a gouvernors trust to enable this Perk. (The crop yield is 50% higher on the character's estates)
    }
    For now this is perk specific. This might change lateron if people need this.

    Checks
    If you want to know if a perk is locked or not you can use the following command:
    Code:

    CheckPerkLocked(PERKNAME)
    It will return a TRUE value if the perk is locked.

    Unlocking Perks
    When you want to unlock the perk use the command:
    Code:

    UnlockPerk(PERKNAME);

Share This Page