Skybroom Posted February 5, 2024 Share Posted February 5, 2024 (edited) Messing with a Quest Dialogue in Creation Kit. I want to add a script to a particular info that will add custom (not vanilla) NPC to a faction, making them potential follower and thus unlocking the "Follow me!" dialogue. Can you help me figure out what kind of text should I compile for Papyrus Fragment! I can't just type this, can I? : <NPC Name>.AddToFaction(<Faction>) Should I create an Alias for the NPC and use it as a script property? Edited February 5, 2024 by Skybroom typo Link to comment Share on other sites More sharing options...
scorrp10 Posted February 5, 2024 Share Posted February 5, 2024 If you have a quest with dialog for this NPC, you should have that NPC as an alias in that quest. And you likely already have a QF_ script for this quest with all the aliases as properties. For example, I have a quest named LilyRescue, and its fragment script is QF_LilyRescue, and it has: ReferenceAlias Property Alias_Player Auto ReferenceAlias Property Alias_Lily Auto and also: Faction Property PlayerFaction Auto Faction Property PotentialFollowerFaction Auto Faction Property CaptiveFaction Auto And in this script, I have this function: Function MakeLilyFollower() Actor LilyRef = Alias_Lily.GetActorRef() Actor PlayerRef = Alias_Player.GetActorRef() If(LilyRef.GetRelationshipRank(PlayerRef) < 2) LilyRef.SetRelationshipRank(PlayerRef, 2) LilyRef.SetFactionRank(PlayerFaction, 0) LilyRef.SetFactionRank(PotentialFollowerFaction, 0) LilyRef.RemoveFromFaction(CaptiveFaction) EndIf EndFunction So, in a dialogue topic, the fragment code looks like this: (GetOwningQuest() as QF_LilyRescue).MakeLilyFollower() Link to comment Share on other sites More sharing options...
IsharaMeradin Posted February 5, 2024 Share Posted February 5, 2024 You have two options to get a custom NPC into a faction: Use AddToFaction at some point. Pre-add them to the faction in the Creation Kit with a low-level rank (usually -1). The stock followers are all already within the follower faction. Their faction rank status gets changed when they become a follower. (see scorrp10's post for an example). For your purpose, I would recommend pre-adding them to the faction rather than trying to script them into the faction. If you pre-add them, you can follow scorrp10's advice on setting everything up. Link to comment Share on other sites More sharing options...
Recommended Posts