mrclint Posted April 23 Posted April 23 Heya, If I want to add a perk to player character, but first want to check if the requirements are met (as seen in picture below), is there a way to determine that? I can't find any functions for that, so is there any, or does anyone have another smart way of obtaining the requirements? Right now I'm writing three separate arrays. One (formlist) with the perk, one with the level requirement and one with level requirement.
scorrp10 Posted April 23 Posted April 23 Actor Property PlayerRef Auto Perk Property AlterationAdept50 Auto If PlayerRef.GetAV("alteration") >= 75.0 && PlayerRef.HasPerk(AlterationAdept50) ; do stuff EndIf 1
mrclint Posted April 23 Author Posted April 23 Ooh sorry. I forgot to type that I meant if I don't know these values. Like if I sort through an array of perks looking for the next possible according to the condition set in each perk.
dylbill Posted April 23 Posted April 23 Papyrus Extender https://www.nexusmods.com/skyrimspecialedition/mods/22854 has this function: Bool Function EvaluateConditionList(Form akForm, ObjectReference akActionRef, ObjectReference akTargetRef) global native I think you pass in the perk for akForm. Worth a shot. 1
mrclint Posted April 24 Author Posted April 24 On 4/23/2025 at 6:35 PM, dylbill said: Papyrus Extender https://www.nexusmods.com/skyrimspecialedition/mods/22854 has this function: Bool Function EvaluateConditionList(Form akForm, ObjectReference akActionRef, ObjectReference akTargetRef) global native I think you pass in the perk for akForm. Worth a shot. Expand That seemed to work perfect. Just had to add PlayerRef to both ObjectReference. I should have suspected you or powerofthree had something like this Awesome, thanks! 1
ZyonKrestor Posted May 5 Posted May 5 (edited) You could use a conditional check to verify the requirements before adding. Reveal hidden contents You can check if the requirements are met by comparing the player’s current stats with the conditions defined for the perk. Instead of using separate arrays, consider creating a function that checks the player's attributes against the perk's requirements. When I was struggling to finish my thesis, I decided to https://academized.com/pay-for-thesis. The decision to pay for thesis assistance was a game-changer. The team at Academized provided excellent support, helping me refine my paper and meet all deadlines. Edited May 20 by ZyonKrestor
Recommended Posts