Perks on Companions

Post » Thu Feb 03, 2011 6:30 am

There is an undocumented feature in F:NV that some modders may find useful. It is the ability to give perks to companions. Or, more accurately, it is the ability to add perks to a special list on the player the will have an effect on any active followers. Here's how it works:

player.addperk XXXXXXXXXXXXX 1

The "1" means "put this on the special list for companions". Companions will still not store/keep perks, but we give the player a second list of non-displayed perks that only apply to companions. If you want the effect to apply to all companions, you do not need to conditionalize the perk owner conditions for the perk's entry points. If you want the perk to be special for the companion, check the NPC's ID or ref in the perk owner conditions.

I recommend making special companion versions of perks even if you want to use existing effects. E.g. if you want to give Raul the equivalent of Shotgun Surgeon for some reason, make a special "RaulShotgunSurgeonPerk" that's filtered just to him, and add it to the player with player.addperk RaulShotgunSurgeonPerk 1 the first time Raul is hired. Even if Raul leaves the party, you shouldn't have to worry about the perk hanging out on the player as long as the perk owner conditions are filtered properly.

N.B.: The effects will ONLY work while a companion is in the party. So in the above scenario, Raul would no longer have the benefits of RaulShotgunSurgeon if he left the party.
User avatar
Trista Jim
 
Posts: 3308
Joined: Sat Aug 25, 2007 10:39 pm

Post » Thu Feb 03, 2011 8:55 am

Absolutely amazing ability.

I am in continual awe of how flexible you guys are getting with what you can do. Not to mention the tools available.

I've long kicked around the idea of a "community building" mod, having the ability to let the player get benefits from enhancing their companions might finally give me the kick in the pants needed to start the task!
User avatar
Zosia Cetnar
 
Posts: 3476
Joined: Thu Aug 03, 2006 6:35 am

Post » Thu Feb 03, 2011 7:09 am

Thanks so much for taking the time to explain this to us!

I'm still amazed you developers are even around. I always see companies release a game, help out with any modding tools for it for like a few days, then ignore their existance and leave them to help eachother. But here I have actually seen you dev's around occasionally. :)
User avatar
Riky Carrasco
 
Posts: 3429
Joined: Tue Nov 06, 2007 12:17 am

Post » Thu Feb 03, 2011 9:01 am

This is just what I wanted to do after I ported the lawbringer/contractkiller to NV. It didn't work with companions
I tried by myself in several ways and failed until I read your very useful message. I thought the 1 at the end was the rank of the perk and never figured it could be some hidden feature.
So simple when you know the right method... and so difficult when you don't
Thanks alot you for your support
User avatar
Ross
 
Posts: 3384
Joined: Thu Aug 10, 2006 7:22 pm

Post » Thu Feb 03, 2011 1:56 pm


The "1" means "put this on the special list for companions". Companions will still not store/keep perks, but we give the player a second list of non-displayed perks that only apply to companions. If you want the effect to apply to all companions, you do not need to conditionalize the perk owner conditions for the perk's entry points. If you want the perk to be special for the companion, check the NPC's ID or ref in the perk owner conditions.

...

N.B.: The effects will ONLY work while a companion is in the party. So in the above scenario, Raul would no longer have the benefits of RaulShotgunSurgeon if he left the party.


When I tested this out. The above part wasn't 100% true.

Case 1)
I had companions A and B. I added perk(invisibility effect) to all my companions by using
Player.AddPerk  1
both A and B instantly became invisible, however, when I typed SetPlayerTeammate 0 to A, A still maintained the the invisibility.
Then, I typed
Player.RemovePerk  1

B lost its invisibility instantly, but A still maintained the invisibility effect.

Case 2)
This time, Companion A was a active companion. B was fired and stayed at Lucky 38.
I typed
Player.AddPerk  1
, and A instantly received the invisibility effect.
Then I went into Lucky 38 and hired B. B did not have invisibility effect.

My conclusion is that when
Player.AddPerk  1
applies, it seems to do 2 things:

1) Adds perk into player's secondary list (you can check with Player.HasPerk 1)
2) Add the perk effect(s) to the current companions only.

Player is still responsible for taking care of perk effect to companions who are hired after
Player.AddPerk  1
is carried out, and companions that got fired before
Player.RemovePerk  1 
was carried out.
User avatar
Chloe Botham
 
Posts: 3537
Joined: Wed Aug 30, 2006 12:11 am


Return to Fallout: New Vegas