UnknownZombie Posted November 19, 2010 Share Posted November 19, 2010 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 More sharing options...
WastelandAssassin Posted November 19, 2010 Share Posted November 19, 2010 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 typeyou 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 messageit 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 wrongthanks for clearing that up, Aragron :) Link to comment Share on other sites More sharing options...
Aragron Posted November 19, 2010 Share Posted November 19, 2010 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,likeshort Oncebegin gamemodeif Once == 0....set Once to 1endifend 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 More sharing options...
UnknownZombie Posted November 20, 2010 Author Share Posted November 20, 2010 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 More sharing options...
Aragron Posted November 20, 2010 Share Posted November 20, 2010 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 More sharing options...
Deleted1200626User Posted December 2, 2010 Share Posted December 2, 2010 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 More sharing options...
UnknownZombie Posted December 4, 2010 Author Share Posted December 4, 2010 I'm not sure they really do. I ran this same block on a NPC that was a companion, and still got spammed with the message they were being given a perk. If they were actually retaining the perk, the message would only appear once. Link to comment Share on other sites More sharing options...
rickerhk Posted December 5, 2010 Share Posted December 5, 2010 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 More sharing options...
UnknownZombie Posted December 5, 2010 Author Share Posted December 5, 2010 I see.. Thanks, I'll give this a shot. Link to comment Share on other sites More sharing options...
UnknownZombie Posted December 5, 2010 Author Share Posted December 5, 2010 This definitely does work. Thanks for pointing it out! Link to comment Share on other sites More sharing options...
Recommended Posts