Mess with what a follower is doing when commanded

Post » Sat Jan 11, 2014 2:43 am

I want to be able to do something (script) when I command a follower to do something for me like tell them to pick something, use furniture, kill someone. I want to hook into the vanilla system but without editing the DialogueFollower for compatibility and eventually to work with any custom dialogue from mods that that has such follower custom functions

How would I do that?

There's that Favor page in the quest but hooking there would overwrite default/modded favor dialogue isn't it? and also how to get the target reference in this case?

I also was thinking about an activation perk, but how do I tell in this case that I activate/click on something for the NPC, not for PC, to use?

Thanks

EDIT: what I actually want in case there would be other solutions:

- detect when I tell a follower to sleep by pointing them to a bed, not when it sleeps by it's own will, with access to the bed reference

- when I tell a follower to "use" some NPC, to show a list of options instead of immediate attack (distract would be an option)

User avatar
Chad Holloway
 
Posts: 3388
Joined: Wed Nov 21, 2007 5:21 am

Post » Fri Jan 10, 2014 12:10 pm

Easiest way to let them "do" something for you, like sitting in furniture, or harvesting ingredients, kill someone etc. is by making packages, put them on a alias, and force you actor into this alias on dialogue. If you want to make them behave "normal" again just hook in clear.alias() and EvaluatePackage via dialogue.

Putting actors into favor state does not override vanilla dialogue. But it could interfere with the dialogue if you have already a vanilla follower by your side...but even that is failsafed. For example, if you build a custom dialogue with script snippet telling a follower to attack someone, it will hook into the vanilla system, use it and leave it after the "favor state" is done.

Just set up a dialogue with diverse conditions, like IsInFaction(CurrentFollowerFaction), Hs Dialogue(DialogueFollowerBlaBla) etc.

You don't need to hookm into the vanilla dialogue, just have a look at it and see how it's structured so you'll get to understand how to set up your own dialogue. Ther's a tutorial of mine somewhere flying around, telling you exactly how to set up a all individual follower independent from vanilla system...it might learn you something...:D

User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am

Post » Fri Jan 10, 2014 6:42 pm

Adding my own dialogue to put the actor in favor state is not exactly what I want. What I want is that whenever an actor gets in favor state, by the default dialogue in FollowerDialogue or whatever, me to be able to show a dialogue with options when user activates an object for that NPC to use.

By hooking in vanilla dialogue I meant the (Agree) topics in the Favor tab, not Player Dialogue tab, in Quest.

User avatar
Dean Ashcroft
 
Posts: 3566
Joined: Wed Jul 25, 2007 1:20 am


Return to V - Skyrim