Jump to content
ℹ️ Intermittent Download History issues ×

[Papyrus] Checking for Requiem Perk


golem09

Recommended Posts

I want to do something very simple in my mod, check if the player has a certain perk from Requiem. I can connect it to the property just fine in the Creation Kit, but HasPerk always gives out false ingame.

When comparing the Form IDs, I get 031xxxxx in the CK with Dawnguard, 041 with Dragonborn, and 371 ingame with DG and DB loaded. What am I missing here?

Link to comment
Share on other sites

Regarding the ID #

 

The first two digits correspond to load order position. They will change depending upon what is active. This is why you see 03 with DG, 04 with DB & 37 in game. The remaining six digits identify the record itself.

 

You can save yourself from having to make a patch that requires the mod in question by using GetFormFromFile

 

Example:

Actor PlayerRef = Game.GetPlayer()
Perk SomePerk = Game.GetFormFromFile(0x00YYYYYY,"SomeMod.esp")
If PlayerRef.HasPerk(SomePerk)
;do something
EndIf

Note in the example that the first two digits are 00. This is because when looking at the plugin itself without anything else, the first two digits will be 00.

 

Do note, you can disregard the GetFormFromFile if you are already requiring the mod in question as a parent master.

 

On to your actual problem of HasPerk returning false, if the mod in question is not set as a parent master for your plugin the game will not be able to locate the record. You can either use Wrye Bash to temporarily "esmify" the plugin so that the CK thinks it is a master file. Or you can use TES5Edit and edit the header record of your plugin appropriately.

Link to comment
Share on other sites

Thank you so much :D

The only think missing is " as Perk" behind the perk definition you posted, but then it worked. I thought about making Requiem a master as well, but hadn't read up on how to do that. Seems like I'll download TES5EDIT today.

Now let's see if I can get my actual mod to work ;)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...