Jump to content

[LE] Custom Framework Follower not talking (kinda)


Recommended Posts

Hi! I'm currently working on a follower mod (don't worry about 'why would you when theres 48567 others on nexus????' since that's something i'll worry about on my own) and I've been following this tutorial.

I've been able to get the follower to actually follow, but i can't actually get him to talk to me afterward. I've filled out all of the properties, but there's a chance i may have done it wrong. Follower in question's faction has been set to PotentialFollowerFaction(-1) and DismissedFollowerFaction(0). When i tried Solora's fix (which is deleting the dismissed faction and setting the potential faction to 0) it stopped working completely.

 

Dialogue script

Scriptname COFDarrocRushanDialogueScript extends Quest  

Actor Property PlayerREF Auto

ReferenceAlias Property FollowerAlias Auto

Faction Property DismissedFollowerFaction Auto

Faction Property CurrentHireling Auto

Message Property  FollowerDismissMessage Auto

Message Property  FollowerDismissMessageWedding Auto

Message Property  FollowerDismissMessageCompanions Auto

Message Property  FollowerDismissMessageCompanionsMale Auto

Message Property  FollowerDismissMessageCompanionsFemale Auto

Message Property  FollowerDismissMessageWait Auto

SetHirelingRehire Property HirelingRehireScript Auto


;Property to tell follower to say dismissal line

Int Property iFollowerDismiss Auto Conditional


Function SetFollower(ObjectReference FollowerRef)

     actor FollowerActor = FollowerRef as Actor

     FollowerActor.RemoveFromFaction(DismissedFollowerFaction)

     If FollowerActor.GetRelationshipRank(PlayerREF) <3 && FollowerActor.GetRelationshipRank(PlayerREF) >= 0

          FollowerActor.SetRelationshipRank(PlayerREF, 3)

     EndIf

     FollowerActor.SetPlayerTeammate()

     ;FollowerActor.SetActorValue("Morality", 0)

     FollowerAlias.ForceRefTo(FollowerActor)

     FollowerActor.EvaluatePackage()

EndFunction
 

Function FollowerWait()

     actor FollowerActor = FollowerAlias.GetActorRef() as Actor

     FollowerActor.SetActorValue("WaitingForPlayer", 1)

     SetObjectiveDisplayed(10, abforce = true)

     ;follower will wait 3 days

     FollowerAlias.RegisterForSingleUpdateGameTime(72) 

EndFunction
 

Function FollowerFollow()

     actor FollowerActor = FollowerAlias.GetActorRef() as Actor

     FollowerActor.SetActorValue("WaitingForPlayer", 0)

     SetObjectiveDisplayed(10, abdisplayed = false)

     FollowerActor.EvaluatePackage()

EndFunction

 
Function DismissFollower(Int iMessage = 0, Int iSayLine = 1)

     If FollowerAlias && FollowerAlias.GetActorReference().IsDead() == False

          If iMessage == 0

               FollowerDismissMessage.Show()

          ElseIf iMessage == 1

               FollowerDismissMessageWedding.Show()

          ElseIf iMessage == 2

               FollowerDismissMessageCompanions.Show()

          ElseIf iMessage == 3

               FollowerDismissMessageCompanionsMale.Show()

          ElseIf iMessage == 4

               FollowerDismissMessageCompanionsFemale.Show()

          ElseIf iMessage == 5

               FollowerDismissMessageWait.Show()

          Else

              ;failsafe

              FollowerDismissMessage.Show()

          EndIf

          actor DismissedFollowerActor = FollowerAlias.GetActorRef() as Actor

          DismissedFollowerActor.StopCombatAlarm()

          DismissedFollowerActor.AddToFaction(DismissedFollowerFaction)

          DismissedFollowerActor.SetPlayerTeammate(false)

          DismissedFollowerActor.RemoveFromFaction(CurrentHireling)

          DismissedFollowerActor.SetActorValue("WaitingForPlayer", 0)

          ;hireling rehire function

          HirelingRehireScript.DismissHireling(DismissedFollowerActor.GetActorBase())

          If iSayLine == 1

               iFollowerDismiss = 1

              DismissedFollowerActor.EvaluatePackage()

             ;Wait for follower to say line

             Utility.Wait(2)

          EndIf

             FollowerAlias.Clear()

             iFollowerDismiss = 0

             ;don't set count to 0 if Companions have replaced follower

          If iMessage == 2

               ;do nothing

          EndIf

     EndIf

EndFunction

Dialogue Script properties

http://oi68.tinypic.com/291f11x.jpg

 

Follow Me script

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__020012CA Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
(GetOwningQuest() as COFDarrocRushanDialogueScript).SetFollower(akSpeaker)
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

Quest Property COFDarrocRushanDialogue  Auto  

Follow me script property

http://oi65.tinypic.com/2u5rp06.jpg

 

Thank you to anyone who decides to look into this!

Link to comment
Share on other sites

An independent system? I like the way you think. Just a freebie, try to remember this: AI packages like Combat Healing the player, or Avoid Combat, go in Combat Override FormList, not in the Follower Alias AI Packages.

 

OH nearly all of those 4000+ follower don't have independent systems. So your 1 step ahead already or trying to be.

 

ABOUT FACTIONS

 

this is what the numbers mean

 

-1 Not In Faction

0 In Faction with a rank of 0

1 In Faction with a rank of 1

2 In Faction with a rank of 2

etc etc

 

On the Actor Base it should this.

 

Potential Follower is 0 (need to be in the faction for the Follow Me dialogue)

 

Custom Current Follower Faction is -1, (well they not following ATM are they?)

 

to be marriageable (I forget faction name) is 0 too. (To be considered marriageable Ha ha)

 

Ignore the Dismiss Follower Faction, that happens dynamically with the scripts, later on. Remove it totally, it bugging you out!!!!!

 

That it, three factions or two depending on what your after on the ActorBase, & the Custom Current Faction faction goes in Independence Follower Alias Faction area too. The dismissed faction as previously stated is Dynamic in every way. It only exist on the Game Save.

 

 

That should solve it if not post again. There may be more happening behind the scenes that what you posted. You may need YouTube Dialogue Guide. Or the guide could have a mistake.

Link to comment
Share on other sites

Thank you so much! I think i might take some time to try and learn how exactly the vanilla follower faction worked before i make the one i plan on using; then I'll give this a try! Be sure to update this thread if anything comes up.

Link to comment
Share on other sites

Your follower is using a custom voice type, right? If you were using a vanilla voice you could just use the vanilla scripts, so I'm assuming that's the case. You shouldn't need to worry about "Double Dialogue Options" as they won't meet the voice type condition from other follower systems, including vanilla.

 

First of all, it doesn't sound like a script issue. If the dialogue appeared and when selected the actor spoke the line but nothing actually happens, then I would suspect the scripts. If you click on the "Recruit" line, she speaks but doesn't actually get recruited, I would suspect the scripts. If the line doesn't show up at all, then it's most likely a problem with the conditions on the dialogue line(s). That's where I'd start.

 

All the faction stuff is nice to be as compatible as possible with other mods that affect followers, but none of it is required in order to work. You set your own conditions on the dialogue to only appear during the circumstances you assign, then you make a recruit script that meets those circumstances so the rest of the commands show up after it runs. The vanilla quest uses factions as a condition, but you could use anything you want. Your recruit script could include a line to set Lydia on fire and only have the trade, follower, etc. lines be available while she runs around screaming, with your dismiss line putting her out and making those lines unavailable again. It'd be weird, but it would work perfectly fine. I personally add custom followers to CurrentFollowerFaction for compatibility reasons. I don't know of any mods that check for the PotentialFollowerFaction, so I don't bother with it.

Link to comment
Share on other sites

Your follower is using a custom voice type, right? If you were using a vanilla voice you could just use the vanilla scripts, so I'm assuming that's the case. You shouldn't need to worry about "Double Dialogue Options" as they won't meet the voice type condition from other follower systems, including vanilla.

 

First of all, it doesn't sound like a script issue. If the dialogue appeared and when selected the actor spoke the line but nothing actually happens, then I would suspect the scripts. If you click on the "Recruit" line, she speaks but doesn't actually get recruited, I would suspect the scripts. If the line doesn't show up at all, then it's most likely a problem with the conditions on the dialogue line(s). That's where I'd start.

 

All the faction stuff is nice to be as compatible as possible with other mods that affect followers, but none of it is required in order to work. You set your own conditions on the dialogue to only appear during the circumstances you assign, then you make a recruit script that meets those circumstances so the rest of the commands show up after it runs. The vanilla quest uses factions as a condition, but you could use anything you want. Your recruit script could include a line to set Lydia on fire and only have the trade, follower, etc. lines be available while she runs around screaming, with your dismiss line putting her out and making those lines unavailable again. It'd be weird, but it would work perfectly fine. I personally add custom followers to CurrentFollowerFaction for compatibility reasons. I don't know of any mods that check for the PotentialFollowerFaction, so I don't bother with it.

Would i be right in assuming that it'd be because the actor's not being put into the currentfollowerfaction for some reason? that's the only condition each of the topics share. I tried putting a setfactionrank into the script for the recruitment dialogue but that didn't seem to help.

Link to comment
Share on other sites

You could test it by adding them to the faction via console command in game, or changing/removing the condition to see if it shows up.

 

The script would be something like, "FollowerActor.AddToFaction(CurrentFollowerFaction)." Personally, my recruit scripts add the actor to my reference alias, and I assign the alias all the factions I want them to be in in the CK. I believe that's also how the vanilla quest does it.

Edited by Levionte
Link to comment
Share on other sites

If your follower is following there's nothing wrong with the scripts. When dialogue doesn't show up it is always either condition problem or no actual seq file. Or perhaps the flags in the follow package, they should allow idle chatter and random dialogue. Have you tested on a new game? Don't use existing saves.

I use the same framework and it works pretty nice.

When recruiting the follower it is good to raise the queststage, so you have clearly separated the dialogue that will be spoken after recruiting. The conditions necessary then are always GetIsID and GetStage that need to be set in dialogue and you have to set the stage number in queststage tab.

CurrentFollowerFaction is not the best idea for using. I do it, but this may change in the future. Because every mod that affects this faction can alter the behavior of your npcs and break their AI. My npcs can be set to follow Vilja instead of player because Vilja mod checks for this faction. The dialogue line that is used for this command has of course no voice, because there's no spoken line with my voice in my mod and that is pretty annoying. Cheskos Campfire has the option to talk to npcs when sitting at the fire. That caused my followers to get stuck. So the better solution is in fact to use a custom faction.

 

@PeterMartyr

Please would you explain why the DismissedFollowerFaction in the questscript makes problems? I experienced none until now, but perhaps it may happen in future, when quests will be implemented that need proper scripting.

Edited by Tasheni
Link to comment
Share on other sites

I figured it out! It had nothing to do with factions or conditions so I'm sorry for wasting people's time. Turns out wording is super important when it comes to reading tutorials and instead of making branches for each of those functions I made topics. I guess something got botched up since they would all have been tied to the 'follow me' dialogue and the game just assumed they'd be needed during that 'conversation'.

Link to comment
Share on other sites

You are correct, but don't forget Favor Dialogue does have branches. While your following this tutorial, don't ignore the Dialogue Followers Quest, sneak into Dialogue Followers Dialogue Views, & take look at what Bethesda did every now and again. That a reference too, since your guide, copied Dialogue Followers, it an very important visual reference for you.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...