Detecting a Perk's Rank through scripting?

Post » Sat Dec 18, 2010 8:59 pm

Like the title says, I am trying to figure out if one can detect a perk's rank via scripts?

For instance, can I do something like

Player.HasPerk FooPerk 2 == 1

to return if the player has rank 2 of FooPerk or not?

-Shiholude
User avatar
Ells
 
Posts: 3430
Joined: Thu Aug 10, 2006 9:03 pm

Post » Sat Dec 18, 2010 2:34 pm

Furthermore, can I add a specific rank for a perk, or are we restricted with bumping it by one each time?

Using my above example, and assuming that it is true, can I go from rank 2 to rank 4 in one command:
Player.AddPerk FooPerk 4 1


The additional "1" would be to add it silently, without a mini message popup in corner - if possible as well.

-Shiholude
User avatar
lolli
 
Posts: 3485
Joined: Mon Jan 01, 2007 10:42 am

Post » Sat Dec 18, 2010 5:15 pm

Neither http://geck.gamesas.com/index.php/AddPerk or http://geck.gamesas.com/index.php/HasPerk allow any kind of specific checking in a script.

You might be able to do AddPerk twice to get what you want.
User avatar
hannaH
 
Posts: 3513
Joined: Tue Aug 15, 2006 4:50 am

Post » Sat Dec 18, 2010 3:59 pm

If I remember correctly, http://geck.gamesas.com/index.php/HasPerk will report a perk's rank if called in the console, but there is no way to access this information via a script. Your best bet would be to trigger some other detectable event, like the incrementation of a global variable, so that you can detect the perk's rank indirectly.

Cipscis
User avatar
Rebecca Clare Smith
 
Posts: 3508
Joined: Fri Aug 04, 2006 4:13 pm

Post » Sat Dec 18, 2010 10:46 pm

I think a 'terminal' condition for HasPerk will also report the level.
User avatar
Isabel Ruiz
 
Posts: 3447
Joined: Sat Nov 04, 2006 4:39 am

Post » Sat Dec 18, 2010 7:54 am

Spendid. Adding an additional global variable to increment is simple enough. I will proceed with that route.

Thank you both!

-Shiholude
User avatar
carly mcdonough
 
Posts: 3402
Joined: Fri Jul 28, 2006 3:23 am


Return to Fallout 3