Jump to content

NPC Perks


UnknownZombie

Recommended Posts

I set up a script for an NPC I have been working on that goes like this:

 

Begin GameMode

If NpcREF.HasPerk PerkName == 0
  NpcREF.AddPerk PerkName
endif

End

 

However, I had a suspicion that it wasn't actually giving the NPC this perk. So, I set up a message to read that the "NPC was given a perk" and set up a showmessage line inside the If-Then block like so:

 

Begin GameMode

If NpcREF.HasPerk PerkName == 0
  NpcREF.AddPerk PerkName
  ShowMessage NpcWasGivenPerk
endif

End

 

I found out, to my surprise, the game is constantly giving the perk.

 

What gives? Anyone else run across this?

Link to comment
Share on other sites

well, i don't know if you can really give an NPC a perk like that, but if you can, i would recommend that you use a different block type

you don't want this script to run all the time

 

also, you can give the NPC the perk in the GECK, which could be simpler (but i don't know your whole idea, so it might not be simpler)

 

but it does sound very strange that it constantly gives you the message

it probably means that the NPC can't get the perk this way, or so it seems to me

 

EDIT:

ok, after seeing the link by Aragron, i removed my earlier edit, as it was clearly wrong

thanks for clearing that up, Aragron :)

Link to comment
Share on other sites

so... do you use the perk name or the perk EditorID..?if you use the name,there is your problem.If not,substitute the if hasperk for a if Once == 0,like

short Once

begin gamemode

if Once == 0

..

..

set Once to 1

endif

end

 

Edited :

Just saw your new message. http://geck.bethsoft...dex.php/HasPerk

"Returns 1 if the actor has the specified perk and 0 if not." |No problem :thumbsup:

Link to comment
Share on other sites

That I have the perk added in the GameMode block shouldn't matter, because it's in that IF/THEN block. So the game should only be running that section if the NPC doesn't have the perk.

 

also, you can give the NPC the perk in the GECK, which could be simpler (but i don't know your whole idea, so it might not be simpler)

How do you mean? I couldn't find anywhere in the NPC editor the option to give them perks, which is why I resorted to doing it in a script. If you mean by just adding it onto some armor they're wearing, I was hoping that I wouldn't have to do it that way, because I want the bonuses to be present whatever they are wearing.

so... do you use the perk name or the perk EditorID..?

I'm using the Editor ID. The script editor wouldn't let me save the script if I wasn't.

 

Do you know if NPCs are only able to hold talents if they are a companion? Maybe that's what the problem is, though I hope that's not the case. :wacko:

Link to comment
Share on other sites

i started to mess around the companios quest,and i find out a terrible truth:NO NPC can have perks. you know that message when you complete the "I Could Make You Care" Says the perk was added?it is fake...search "CauselessRebel" in the GECK. it is not used.Even Companions don't have perks. The cake is a lie.

With leaves you only one option:use Actor Effects... And this mod don't work. ||Whats wrong with the hyperlink....?

 

Edited:Trying to figure out if completing the quest really boosts the companion status.. i'll continue tomorrow(or when i have time) since i'm tired today. Good Night :blink:

Link to comment
Share on other sites

  • 2 weeks later...

i started to mess around the companios quest,and i find out a terrible truth:NO NPC can have perks. you know that message when you complete the "I Could Make You Care" Says the perk was added?it is fake...search "CauselessRebel" in the GECK. it is not used.Even Companions don't have perks.

 

 

Oh damn yes companion quests boost stats. If you finish Raul's quest and tell him to stick to using guns, he turns into a total BADASS WITH A MAGNUM.

Link to comment
Share on other sites

This is a post from one of the Devs (J.E. Sawyer) regarding perks on companions:

 

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 that 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.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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