Jimbo7136 Posted December 6, 2012 Share Posted December 6, 2012 Hi, all. I'm a long time mod user and I'm dipping my toe into making a simple mod. The problem I'm running into is that I need to know if the player has a given perk, in this case swift learner and if so how many ranks, but when using player.HasPerk in a script I only get a value of 1 (for true, player has the perk, I assume) but not the correct number of ranks. I'm pretty sure I'm not the first person to have this problem, so I'm hoping someone has the solution here, thanks in advance for any help. Link to comment Share on other sites More sharing options...
viennacalling Posted December 6, 2012 Share Posted December 6, 2012 There is no direct game way to retrieve the perk rank. A common workaround is to set a global variable or quest variable and increment it whenever the perk rank is increased, and then check that value. This does require adding scripting to the perk though. Link to comment Share on other sites More sharing options...
Jimbo7136 Posted December 7, 2012 Author Share Posted December 7, 2012 There is no direct game way to retrieve the perk rank. A common workaround is to set a global variable or quest variable and increment it whenever the perk rank is increased, and then check that value. This does require adding scripting to the perk though. Sounds like it would have to be in place at the beginning of the game to work. Thanks for the answer, maybe someone will implement a way to do this. Maybe I'll beg the FOSE guys for a minute or two. Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted December 9, 2012 Share Posted December 9, 2012 In Fallout New Vegas they check the perk rank in the challenge scripts. If you have FNV you can go take a look, or I'll post a snippet of it once my computer finishes cloning itself. You basically just say if Player.HasPerk <perkID> [<,>,=] <value>I might have it backwards, but that's the basic idea. In FNV it returns the rank of the perk, I don't know if it works in FO3 though, but it's worth a try. Link to comment Share on other sites More sharing options...
Recommended Posts