Extending the vanilla followers, dialogue events, etc.

Post » Sun Jun 17, 2012 5:22 pm

One of my projects, as you can tell from my signature line, is expanding some of the vanilla followers in the game. This will mean adding some additional quest-related dialogue, but also adding more variety to some of the stock follower commands like "let's trade some things" and "follow me."

I suspect that for reasons of compatibility the best way to do this latter aspect is to create a new quest with the improved follower dialogue, rather than editing the vanilla DialogueFollower quest.

So, I've started to do this. Now, say that I want to use my own topic and info language for the "let's trade" inventory access functionality. I can get my new topic to appear in game just fine, but the problem is that the inventory topic from the DialogueFollower quest also appears. I am now trying to figure out how to prevent this from happening, without actually editing the DialogueFollower quest in any way, and without permanently removing the follower from the CurrentFollowerFaction faction.

My first thought for this, looking over the available functions and events, was that I'd put an OnActivate script on the follower's Actor, that would temporarily remove them from the CurrentFollowerFaction for the duration of the dialogue, like so:

Scriptname DisableDialogueFollowerScript extends ActorFaction Property CurrentFollowerFaction AutoFaction Property CurrentFollowerFactionESF AutoEvent OnActivate(ObjectReference akActionRef)  if IsInFaction(CurrentFollowerFaction)	RemoveFromFaction(CurrentFollowerFaction)	if IsInFaction(CurrentFollowerFactionESF) == false	   AddToFaction(CurrentFollowerFactionESF)	endIf  endIfEndEvent

The problem with this is that OnActivate seems only to trigger well after the initial list of topics has already been displayed--there is a noticeable lag, about a full second, between the time the initial list of topics keyed to CurrentFollowerFaction are drawn, and the time my new topics keyed to CurrentFollowerFactionESF are added to the list and the CurrentFollowerFaction topics removed. This makes me wonder if there is some other built-in event that triggers before the dialogue topics are drawn?

If not, I'd welcome alternative suggestions for how to go about this in a way that plays nice with existing vanilla faction checks and anticipated future mods (like other follower mods).
User avatar
Leanne Molloy
 
Posts: 3342
Joined: Sat Sep 02, 2006 1:09 am

Post » Mon Jun 18, 2012 1:40 am

I think I may end up needing to just remove the follower (Aela) from the CurrentFollowersFaction--unless maybe I can ask the SKSE team to create an OnBeforeActivate event. OnActivate just doesn't trigger quickly enough.

A custom faction is probably the best way to go, anyway--more long-term flexibility.

I'm looking at the PlayerTeammate functions and I may be able to leave her set as a PlayerTeammate. That would at least give other mods some way of knowing that my customized follower was still in fact currently following the PC.
User avatar
Floor Punch
 
Posts: 3568
Joined: Tue May 29, 2007 7:18 am


Return to V - Skyrim