ShowPerkMenu

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin version 1.20.

Description

Opens the Level-Up menu (menu ID = 1027) to the Perk allotment page. The "Back" button is also hidden, meaning the player cannot choose to go back to the Skills page.

Does NOT cause an increase in level. By default, the amount of perks to allot is the same as what the player would receive for their current level.

  • For example, calling this when the player is at level 1 and iLevelsPerPerk is 2 (default) means that the player does not receive any perks.
  • The iPerksPerLevel setting from lStewieAl's Tweaks affects the default amount of perks for this function.

Parameters

The amount of perks received can be overridden by specifying a value for numPerksOverride that is greater than -1.

The title of the Level-Up menu can be changed by specifying a string for menuTitleOverride.

Return Value

Returns true (1) if the Perk menu is successfully shown, false (0) otherwise.

This function can only be used in a script, not as a Condition.

Syntax

[help]
(hasShownMenu:bool) ShowPerkMenu numPerksOverride:int{Default:-1} menuTitleOverride:string

Example

ShowPerkMenu -1 "My Custom Title"

Tries to open the Level-Up menu to the Perk page. The player receives the same amount of perks to allot as they would normally for their level, and the title for the menu is set to "My Custom Title".

ShowPerkMenu 0

Tries to open the Level-Up menu to the Perk page. The player receives 0 perks to allot, meaning they are free to browse perks and close the menu.

Notes

  • If there are no perks available to choose from (i.e. the player has unlocked all perks already), the function returns false.
  • If bPreviewPerksOnLevelUp is NOT enabled in lStewieAl's Tweaks, and the player is set to not receive any perks this level when internally checking the iLevelsPerPerk gamesetting, the function returns false.
    • This is fixed in ShowOff version 1.50.
  • In the above two cases, the Level-Up menu will appear for a single frame before being closed.

See Also