Perks don't work on NPCs, Obsidian

Post » Thu Feb 03, 2011 1:30 am

Obsidian is constantly adding perks to everybody in the game, companions, NPCs, you name it. But really, Obsidian, it doesn't work, time to wake up. Yeah, it sux, but the fact remains. Personally, I noticed this after creating a Gauss Knockdown perk to simulate Gauss knockdown behaviour in F3 and trying to add it to everybody wielding a Gauss. The perk will not be added to anybody except the player character. NO perk can be added to non-player characters, and really, Obsidian, it's very easy to test:

VeronicaRef.getav critchanceVeronicaRef.addperk FinesseVeronicaRef.hasperk Finesse; FALSEVeronicaRef.getav critchance; unchanged


Let's take a look at the script QJDeathclawBabyScript, running on the baby deathclaws at Q. Junction:

begin OnDeathif VFreeformQuarryJunction.bDeathclawMotherEnraged == 0 && QJDeathclawMotherRef.GetDead == 0set VFreeformQuarryJunction.bDeathclawMotherEnraged to 1ShowMessage QJDeathclawMotherMessageQJDeathclawMotherRef.AddPerk PsychoPerkQJDeathclawMotherRef.AddPerk AdamantiumSkeletonQJDeathclawMotherRef.AddPerk BetterCriticalsendifend


No, Obsidian, will NOT work. And no, there is no way to do something like this, because perks like Adamantium Skeleton cannot be simulated thru actor effects, which is the only way to actually influence NPC stats. Here's the best I could come up with:

QJDeathclawMotherRef.modav strength 1QJDeathclawMotherRef.modav agility 2QJDeathclawMotherRef.modav critchance 90QJDeathclawMotherRef.modav damagethreshold 15QJDeathclawMotherRef.addspell PerkBloodyMess


Yes, I know it's not what you wanted. Talk to Bethesda programmers, they are the ones who wrote the game engine.

Here's another one, hiring Vero:

VeronicaREF.addperk CompanionSuite


No, really, you can bang your heads against the walls 100 times, it still won't work. You can simulate CompanionSuite perk by something like this:

scn VeronicaSCRIPTBegin OnLoadref nSkillset nSkill to 100 - getav sneakmodav sneak nSkill;...etcEND


However, Cass's perk (ignore 10 points threshold when using shortguns) will still not work and there's no way to add it to her. Engine limitation
User avatar
jess hughes
 
Posts: 3382
Joined: Tue Oct 24, 2006 8:10 pm

Post » Thu Feb 03, 2011 1:34 pm

You can add perks to the companions.

The following does not work:

VeronicaRef.AddPerk 


What works is this

Have a perk with specific condition (ex: GetIsID Veronica and GetPlayerTeammate == 1). Let's say you want to add perk to veronica.

 Player.addperk  1 


Notice the parameter 1 at the end of Player.AddPerk

When above script line carries out, it adds the perk to all current companions, but 1st condition (GetIsID Veronica) restricts its effect only to Veronica. and 2nd condition GetPlayerTeammate disables the effect when the companion no longer follows the player.

Edit:

for the record, I learned this when obsidian director JE Sawyer posted in this very forum how to add perks to companions. I cannot find the link at the moment, but I guess you can google it.

I also find many scripts written by obsidian developers constantly trying to add perks to companions/npc by using ".AddPerk". Perhaps using addPerk 1 was included at the later stage of development.

Edit 2:

If adding knockdown effect to a custom weapon is only thing you need, I think this can be done without using a perk.

Have you tried adding a scripted object effect with http://geck.gamesas.com/index.php/PushActorAway ? Alternatively, damagine fatigue all the way to 0 is another option.
User avatar
Davorah Katz
 
Posts: 3468
Joined: Fri Dec 22, 2006 12:57 pm

Post » Thu Feb 03, 2011 8:57 am

This is the JE Sawyer post dree was referring to:

http://www.gamesas.com/index.php?/topic/1142430-perks-on-companions/
User avatar
Vincent Joe
 
Posts: 3370
Joined: Wed Sep 26, 2007 1:13 pm


Return to Fallout: New Vegas