Jump to content

Creation Kit Follower avoiding conflicts


bojanni

Recommended Posts

Hi,

 

So I decided to make my own custom voiced follower. I watch and read a lot of tutorials but what I can't figure out is how to get the follower not be on the vanilla system (like explained here: http://forums.nexusmods.com/index.php?/topic/1367812-basic-requirements-for-an-off-vanilla-follower/) to avoid conflicts. There are certain things in this article that are a little abracadabra to me. I loaded some other followers in the Creation Kit (like Inigo) to see how it's done , but I feel I need a push in the right direction.

 

I already know how to add dialogue topics / branches and experienced with quest stages by making a short quest. It's just that I need to get this sorted so I can go fully into shaping the character further.

 

Anyone know a good tutorial and / or has the time to explain this all to me?

 

Thanks.

 

 

Link to comment
Share on other sites

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

Not originally, Ben is currently attached to the generic.system. I'm in the process of trying to change him over, but having a few teething problems due to scripts attached to his old follower dialogue. For me, I have to re address it to the new quest before I can see for sure if its working.

 

It does appear to work in Principle, but not well with his old dialogue still there in the background.

Link to comment
Share on other sites

Eek Treble post. Damn my fat fingers!

 

A quick skyrim joke to compensate..

 

 

What' the difference between a Bard and a Dung Merchant?

 

None. They both talk crap! :laugh:

Edited by skinnytecboy
Link to comment
Share on other sites

:D

 

Well, I got the scripts in the tutorial to compile. I am now trying to make my NPC follow me. The conditions in the tutorial don't work for me (the follow option won't show up) so I only used getID for now. Unfortunately it won't work. Papyrus log says:

 

Error: Cannot call FollowerFollow() on a None object, aborting function call :(

Edited by bojanni
Link to comment
Share on other sites

:D

 

Well, I got the scripts in the tutorial to compile. I am now trying to make my NPC follow me. The conditions in the tutorial don't work for me (the follow option won't show up) so I only used getID for now. Unfortunately it won't work. Papyrus log says:

 

Error: Cannot call FollowerFollow() on a None object, aborting function call :sad:

 

It's all a bit fiddly, but you need to generate a script on dialogue first with " ; " and then add properties as shown in the script examples (changing prefixs etc) and then edit the source (cut and paste, change prefixs). Have you tried to recompile your scripts? It works for me, but Ben still tries to also use his old dialogue, this causes a blank screen when trying to activate follower tasks. But if I continually click on him, the options eventually appear. I know that this is because I have yet to remove his old scripts.

 

Possibly bad question, did you generate SEQ file and are you using a clean save? :blush:

Link to comment
Share on other sites

Oh dear, I feel really nooby now. What do you mean with ';'. You mean a script that only contains that character?

 

I generated a SEQ file after I created the dialoguequest and followercontrolquest. Is it maybe I made two quest instead of one. Putting the dialogue in the one and the followercontrol (with aliasscript) in the other?

 

I am testing on a save that has not had this NPC previously loaded.

 

Thanks for you help by the way.

 

My scripts so far:

 

Alias:

 

 

Scriptname BO_FollowerAliasScript extends ReferenceAlias
BO_FollowerControlQuestScript Property BO_FollowerControlQuest Auto
GlobalVariable Property BO_MaximumFollowerCount Auto
Faction Property CurrentHirelingFaction Auto
Event OnUpdateGameTime()
;kill the update if the follower isn't waiting anymore
If Self.GetActorRef().GetAv("WaitingforPlayer") == 0
UnRegisterForUpdateGameTime()
Else
; debug.trace(self + "Dismissing the follower because he is waiting and 3 days have passed.")
BO_FollowerControlQuest.DismissFollower(5)
UnRegisterForUpdateGameTime()
EndIf
EndEvent
Event OnUnload()
;if follower unloads while waiting for the player, wait three days then dismiss him.
If Self.GetActorRef().GetAv("WaitingforPlayer") == 1
(GetOwningQuest() as BO_FollowerControlQuestScript).FollowerWait()
EndIf
EndEvent
Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
If (akTarget == Game.GetPlayer())
; debug.trace(self + "Dismissing follower because he is now attacking the player")
(GetOwningQuest() as BO_FollowerControlQuestScript).DismissFollower(0, 0)
EndIf
EndEvent
Event OnDeath(Actor akKiller)
; debug.trace(self + "Clearing the follower because the player killed him.")
BO_MaximumFollowerCount.SetValue(0)
Self.GetActorRef().RemoveFromFaction(CurrentHirelingFaction)
Self.Clear()
EndEvent

BO_FollowerControlQuestScript

Scriptname BO_FollowerControlQuestScript extends Quest
GlobalVariable Property BO_MaximumFollowerCount Auto
ReferenceAlias Property FollowerAlias Auto
Faction Property DismissedFollower 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(DismissedFollower)
If FollowerActor.GetRelationshipRank(Game.GetPlayer()) &&-60; 3 && FollowerActor.GetRelationshipRank(Game.GetPlayer()) &--#62;= 0
FollowerActor.SetRelationshipRank(Game.GetPlayer(), 3)
EndIf
FollowerActor.SetPlayerTeammate()
;FollowerActor.SetAV("Morality", 0)
FollowerAlias.ForceRefTo(FollowerActor)
BO_MaximumFollowerCount.SetValue(1)
EndFunction
Function FollowerWait()
actor FollowerActor = FollowerAlias.GetActorRef() as Actor
FollowerActor.SetAv("WaitingForPlayer", 1)
;SetObjectiveDisplayed(10, abforce = true)
;follower will wait 3 days
FollowerAlias.RegisterForUpdateGameTime(72)
EndFunction
Function FollowerFollow()
actor FollowerActor = FollowerAlias.GetActorRef() as Actor
FollowerActor.SetAv("WaitingForPlayer", 0)
SetObjectiveDisplayed(10, abdisplayed = false)
EndFunction
Function DismissFollower(Int iMessage = 0, Int iSayLine = 1)
If FollowerAlias && FollowerAlias.GetActorRef().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(DismissedFollower)
DismissedFollowerActor.SetPlayerTeammate(false)
DismissedFollowerActor.RemoveFromFaction(CurrentHireling)
DismissedFollowerActor.SetAV("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
Else
BO_MaximumFollowerCount.SetValue(0)
EndIf
EndIf
EndFunction

Follow me

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__04028FED Extends TopicInfo Hidden
;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
(BO_FollowerControlQuest as BO_FollowerControlQuestScript).FollowerFollow()
;END CODE
EndFunction
;END FRAGMENT
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
Quest Property Bo_FollowerControlQuest Auto

Link to comment
Share on other sites

Hmm, your script is exactly the same as mine, with the only difference being that I named my follower alias differently (SKQFollowerAlias) but I don't think that would matter in your case.

 

Also I made my follower control quest handle all dialogue (follow, wait, make me toast etc). So that could be an issue. Another thing I did was add Ben's ID and a quest condition (just like you need to do when adding a follower GenericFavorDialogue).

 

If you type" ; " and click compile, it will generate a script. Much easier to add properties first to avoid the moaning compiler that the tutorial mentions.

 

Another silly question; Have you created a relationship between player and follower?

 

 

Admittedly, I am not the cleverest brick in the wall here. There are probably others reading this now, muttering and shaking their heads as they dip their biscuits into their tea, who know what your problem is. I'm no expert, but I hope what little I can offer can help. (we can at least try) :confused:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...