Zorkaz Posted March 10 Share Posted March 10 I have a NPC who has a workshop script attached to it. Through dialogue I want the NPC to become later on part of a settlement. How would I do that? Link to comment Share on other sites More sharing options...
rsm000rsm Posted Monday at 09:13 PM Share Posted Monday at 09:13 PM If your NPC has to be rescued, you can add REDialogueRescued "Gives ""rescued"" hellos" [FACT:0002F126] to their faction list with the rank set to 0. I've been trying to reverse engineer that faction in order to create a generic "recruitable NPC faction," but so far, I've not succeeded. Link to comment Share on other sites More sharing options...
RolazLaguna Posted Monday at 09:36 PM Share Posted Monday at 09:36 PM There is a function in workshoparentscript "AddPermanentActorToWorkshopPlayerChoice" which can be called in a fragment attached to the dialogue. This would pop up the settlement choice to which you send the NPC. If on the contrary you want to send the settler to an specific settlement without going through the prompt for choosing one I suppose there are ways. Surely SKK knows better; I am curious too about this. Link to comment Share on other sites More sharing options...
Jharets Posted Monday at 09:39 PM Share Posted Monday at 09:39 PM Your NPC should have the appropriate workshop script attached. Usually, this means they have WorkshopNPCScript so they can be assigned to a settlement. Open the Creation Kit. Locate your NPC in the Object Window under Actors. Ensure that the NPC has WorkshopNPCScript attached under the "Scripts" tab You'll need a quest with a dialogue topic where the player can invite the NPC to the settlement. In Quest window, create a new quest (Miscellaneous type works fine). Add a Dialogue View under the Player Dialogue tab. Create a new Topic where the player asks the NPC to join the settlement. After the player selects the recruitment option, you'll need a script that assigns the NPC to a settlement. In the dialogue response window, go to the Papyrus Fragment section. Add the following script snippet to the End Script Fragment box: ; Get the player's currently active settlement WorkshopScript WorkshopRef = Game.GetPlayer().GetLinkedRef(WorkshopParent.WorkshopItemKeyword) as WorkshopScript ; Assign the NPC to that settlement If WorkshopRef Self.SetLinkedRef(WorkshopRef, WorkshopParent.WorkshopItemKeyword) (Self as WorkshopNPCScript).SetWorkshop(WorkshopRef) Debug.Notification("NPC has joined your settlement!") EndIf After the NPC joins the settlement, you want them to be assignable to work. Ensure the NPC has WorkshopNPCScript attached. Ensure they have the correct WorkshopActorType keyword so they function properly within settlements. If necessary, manually enable the "Allow Move" flag in the WorkshopParent script. 1 Link to comment Share on other sites More sharing options...
SKKmods Posted Tuesday at 08:20 AM Share Posted Tuesday at 08:20 AM If ((ThisActor as Actor).GetActorBase().IsUnique() == TRUE) (pWorkshopParent as WorkshopParentScript).AddPermanentActorToWorkshopPlayerChoice((ThisActor as Actor), bWaitForActorToBeAdded = true) Else Location ThisLocation = (pWorkshopParent as WorkshopParentScript).AddActorToWorkshopPlayerChoice(actorToAssign = ThisActor, bWaitForActorToBeAdded = true, bPermanentActor = false) Endif 1 Link to comment Share on other sites More sharing options...
Zorkaz Posted Friday at 05:38 PM Author Share Posted Friday at 05:38 PM Thank you all, I'll try your suggestions. Link to comment Share on other sites More sharing options...
Recommended Posts