Jump to content


Photo

How to add new NPCs to existing vanilla scenes?


  • Please log in to reply
11 replies to this topic

#1 Martimius

Martimius

    Thane

  • Citizen
  • 64 posts

Posted 23 March 2020 - 08:45 PM

I'm trying to add follower commentary from Serana to a vanilla scene (the beginning Morthal scene, DialogueMorthalInitScene). I've already set up my alias for Serana (MorthalSceneRNPCAlias, External Alias Ref, DLC1NPCMentalModel Alias ------> ResponsiveNPC), and added her alias to the vanilla scene script as an "auto" property:

 

 

;BEGIN ALIAS PROPERTY MorthalSceneRNPCAlias

;ALIAS PROPERTY TYPE ReferenceAlias

ReferenceAlias Property Alias_MorthalSceneRNPCAlias Auto

 

 

After the last vanilla phase ( Phase 8 ) when JorgenAlias says his last line, I added a new Phase (9) where Serana would comment to the player. There is one requirement for that Phase to fire, (GetVMQuestVariable on DLC1NPCMentalModel, ::isFollowing_var) just to check if she's currently following the player. However, even when the requirements have been met, this Phase doesn't fire in-game.

 

 

Looking at the vanilla scene in itself, there are four actors (Aslfur, Thonnir, Benor, and Jorgen) each with a UniqueActor FillType for their respective aliases. The quest scene is a Start Game Enabled one, immediately at Stage 0 moving the four characters into their respective scene markers. 

 

 

"Alias_AslfurAlias.GetReference().MoveTo(AslfurMarker)

Alias_ThonnirAlias.GetReference().MoveTo(ThonnirMarker)

Alias_BenorAlias.GetReference().MoveTo(BenorMarker)

Alias_JorgenAlias.GetReference().MoveTo(JorgenMarker)"

 

 

The scene properly starts for the player to experience once the player is less than 1000 units away from Aslfur's alias. It then continues on as normal until the last phase, where it ends. 

 

 

Nothing else from the base vanilla scene was tweaked or changed, both in script fragments and quest entry. I think it may have to be something related to Serana's alias not properly filling, since the quest starts and goes on as it normally would in the vanilla game. 

 

 

 

Any help would be much appreciated. 


  • 0

#2 TechAngel85

TechAngel85

    Akatosh

  • Administrator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 12,582 posts

Posted 23 March 2020 - 10:58 PM

I don't think what you're wanting to do is going to work. At least, not in the way you're wanting to do it because you are attempting to add your follower into a dialogue scene where your follow may or may not be at their marker for their part of the scene to play out. I can't think of any references in the vanilla game to point you to where your follower comments within NPC scenes (that aren't forced dialogue). In my option, a better way to do accomplish this would be to add it separately as something Serana would say if specific conditions are met, much like they comment at certain locations and points of interest.



#3 Martimius

Martimius

    Thane

  • Citizen
  • 64 posts

Posted 24 March 2020 - 01:04 AM

I don't think what you're wanting to do is going to work. At least, not in the way you're wanting to do it because you are attempting to add your follower into a dialogue scene where your follow may or may not be at their marker for their part of the scene to play out. I can't think of any references in the vanilla game to point you to where your follower comments within NPC scenes (that aren't forced dialogue). In my option, a better way to do accomplish this would be to add it separately as something Serana would say if specific conditions are met, much like they comment at certain locations and points of interest.

Do NPCs have to be at their specific markers for their phase in scripted scenes to occur? If possible, I'm trying to have Serana directly interact or comment on the NPCs actions as the scene is happening, not a comment on certain locations and points of interest.


Edited by Martimius, 24 March 2020 - 01:08 AM.

  • 0

#4 TechAngel85

TechAngel85

    Akatosh

  • Administrator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 12,582 posts

Posted 24 March 2020 - 01:07 PM

Do NPCs have to be at their specific markers for their phase in scripted scenes to occur? If possible, I'm trying to have Serana directly interact or comment on the NPCs actions as the scene is happening, not a comment on certain locations and points of interest.

Well, these NPCs are locked in place during these types of scenes or if they move their paths are pre-determined. If you're just wanting her to comment on the NPCs actions and not actually have her a part of back and forth dialogue with the NPCs, then you should be able to design her interaction very much like a comment from locations. Code your scripts or set your conditions to only happen if you're within a certain distance from the scene itself and check to make sure the scene is running.



#5 Martimius

Martimius

    Thane

  • Citizen
  • 64 posts

Posted 24 March 2020 - 07:01 PM

Oh, alright. I was thinking I could do something like an “EVENT ON Cell Load” from a completely independent custom quest which observes the Morthal scene as a quest property. If it hasn’t happened then my quest is still valid, and if it has happened in the save and the conditions weren’t met (DLC1Serana, DLC1NPCMentalModel::isFollowing, GetDistance xxx (or whatever distance units is near) then I shut everything down.

Then that would serve as a conditional trigger for the dialogue.

Question though, if I wanted to make an independent scripted scene from the vanilla scene, to start right after the vanilla scene has ended, in that case would I have to set up proper markers for the NPCs to travel to? I ask because while these NPCs definitely are locked in place during the scenes, some ones, like those triggered as Actor Dialogue Events don’t seem to have packages in them in the CK, only dialogue.
  • 0

#6 TechAngel85

TechAngel85

    Akatosh

  • Administrator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 12,582 posts

Posted 24 March 2020 - 07:25 PM

Yes. You'd have to have markers for them to travel to the location of the new scene, else they will not know where to go for the scene.



#7 Martimius

Martimius

    Thane

  • Citizen
  • 64 posts

Posted 24 March 2020 - 08:34 PM

Is it possible to have an NPC travel to be near an actor Alias Ref for their scene marker, rather than having a specified one on the ground already?
  • 0

#8 TechAngel85

TechAngel85

    Akatosh

  • Administrator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 12,582 posts

Posted 24 March 2020 - 09:39 PM

That, I don't know. Sounds like it could be possible, but also sounds like it could be ify. What if the Alias Reference is never filled? 



#9 Martimius

Martimius

    Thane

  • Citizen
  • 64 posts

Posted 24 March 2020 - 09:58 PM

Yeah, it probably is. I haven’t seen scenes like that done in the CK before at least by Bethesda’s standards. Was just thinking about the possibility of it theoretically.

Edited by Martimius, 24 March 2020 - 09:59 PM.

  • 0

#10 Martimius

Martimius

    Thane

  • Citizen
  • 64 posts

Posted 24 March 2020 - 10:09 PM

On another note, is there a way (either by papyrus script function or condition function) to currently check if the player has finished talking with an NPC in a specific conversation? For example in the Soul Cairn, could the game recognize when the player finished talking with Morven Shroud (the Soul Cairn merchant) for the first time?
  • 0

#11 TechAngel85

TechAngel85

    Akatosh

  • Administrator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 12,582 posts

Posted 26 March 2020 - 02:40 PM

On another note, is there a way (either by papyrus script function or condition function) to currently check if the player has finished talking with an NPC in a specific conversation? For example in the Soul Cairn, could the game recognize when the player finished talking with Morven Shroud (the Soul Cairn merchant) for the first time?

It's any part of the dialogue is part of a quest, then absolutely yes. You'd just need to check whether the quest or stage of a quest is complete. This can be done in both conditions and full scripting. If not, that I'm not sure. The list of conditions available to check against is here: https://www.creation...ition_Functions



#12 Martimius

Martimius

    Thane

  • Citizen
  • 64 posts

Posted 26 March 2020 - 08:29 PM

Thanks. I'm aware of the GetStageDone condition. Unfortunately from the CK Condition Functions on the wiki there doesn't seem to be something that indicates dialogue not tied to a specific quest stage. I do know however that the game somewhat realizes this already, despite absence of a CK condition. Because when finishing a dialogue option with an NPC (if its not Say Once or on cooldown) it gets greyed out.


  • 0


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users