Making an actor that the player can't pickpocket?

Post » Wed Jun 20, 2012 11:54 pm

Is it possible through scripting or other means to make an actor non-pickpocketable? Feels like there should be but I don't see anything obvious.
User avatar
Louise Dennis
 
Posts: 3489
Joined: Fri Mar 02, 2007 9:23 pm

Post » Thu Jun 21, 2012 5:17 am

There is a check box in the race form, where you can set a race as unable to being pickponketed.
User avatar
Lauren Dale
 
Posts: 3491
Joined: Tue Jul 04, 2006 8:57 am

Post » Thu Jun 21, 2012 1:09 pm

Hmm... I was hoping there was a way beyond creating a custom race. This is for my clone spell, creates images of the enemy that fight for you. Problem is you can pickpocket these clones when cast against humanoid races and I am trying to avoid this since it is exploitable.
User avatar
Mark Hepworth
 
Posts: 3490
Joined: Wed Jul 11, 2007 1:51 pm

Post » Thu Jun 21, 2012 6:46 am

Understantable. Copy all vanilla races and check the mentioned box on the copy. Once in game, change the race of the cloned NPC to it's non pickpocketable equivalent. Not sure how would this work, I recal there is an issue with race changing (I think the problem is that you change the race of the base NPC, if so this wouldn't be a solution for your problem).
User avatar
Krystal Wilson
 
Posts: 3450
Joined: Wed Jan 17, 2007 9:40 am

Post » Thu Jun 21, 2012 1:52 pm

Try searching for "TGNoPickpocketFaction" and see if that does what you're wanting
User avatar
Danny Blight
 
Posts: 3400
Joined: Wed Jun 27, 2007 11:30 am

Post » Thu Jun 21, 2012 7:00 am

A Papyrus scripting solution:

Block regular activation of the cloned Actor immediately after cloning by using http://www.creationkit.com/BlockActivation_-_ObjectReference. Have the spell add a script to the actor with an http://www.creationkit.com/OnActivate_-_ObjectReference, and in that Event check if the akActionRef (usually the Player) is trying to pickpocket by using http://www.creationkit.com/IsSneaking_-_Actor. If true it means the akActionRef is trying to pickpocket, so don't let the script do anything in this case. The regular activation was already blocked, so pickpocketing won't work. If false, it means the cloned Actor was activated without trying to pickpocket, in which case you use http://www.creationkit.com/Activate_-_ObjectReference on the cloned Actor with the akActionRef as the akActivator and with the abDefaultProcessing boolean parameter as true. This means that you execute the regular activation through script, ignoring the BlockActivation flag.

edit: Might as well give an example.

Add this line to the script that clones the targetted Actor:

ClonedActorRef.BlockActivation();blocks default activation of the cloned actor

Make sure that this script gets added to the cloned Actor, like through an Ability?

Event OnActivate(ObjectReference akActionRef)if akActionRef.IsSneaking   ;do nothing since the akActionRef is trying to pickpocketelse   Self.Activate(akActionRef, true)   ;execute regular activation because akActionRef was not trying to pickpocketendif
User avatar
Saul C
 
Posts: 3405
Joined: Wed Oct 17, 2007 12:41 pm

Post » Thu Jun 21, 2012 6:18 am

There are many NPC's that are not pickpocketable, for example Hadvar/Ralof in the tutorial quest.
Is it just because they are essential?
User avatar
Mizz.Jayy
 
Posts: 3483
Joined: Sat Mar 03, 2007 5:56 pm

Post » Thu Jun 21, 2012 5:49 am

It's because they have TGNoPickpocketFaction I imagine if there are 42 users of this faction it doesn't do nothing.
Okay after looking at the name of the faction I may be completely wrong as its labelled "Thieves Guild No Pickpocketing Faction" meaning I assume it might be to do with sandboxing NPC's that go around pickpocketing people lol.

Scripted activation block might be the better option.
User avatar
Michelle Serenity Boss
 
Posts: 3341
Joined: Tue Oct 17, 2006 10:49 am

Post » Wed Jun 20, 2012 11:31 pm

Thanks, these are really good suggestions, I'll give them a try!
User avatar
Beulah Bell
 
Posts: 3372
Joined: Thu Nov 23, 2006 7:08 pm


Return to V - Skyrim