Jump to content

Checking if player has met an NPC?


WesternWolff

Recommended Posts

There's probably a super-simple way to do this, but I can't find it anywhere, so hopefully someone here will know for sure.

I'm creating a quest that will require the player to speak to Vex, but that can be started before they have met or begun any Thieve's Guild quests.

To keep the player's journal consistent, I've created two quest stages, one for if they've met Vex and another for if they have not:

  • Vex is a member of the Thieve's Guild, so the information I'm after may not come cheap. I should find her in the "Ratway", the tunnels under Riften.

OR

  • Looks like I have to speak to my old pal, Vex. The next time I'm in Riften, I'll pay her a visit.

I'm comfortable with creating an if statement, but I'm not sure how to reference whether or not the two have met. Is there some way for my script to check that?

Link to comment
Share on other sites

You can use IsInDialogeWithPlayer to determine if Vex is talking to the player at a specific moment. But I am not certain how useful that would be without running a lot of resource wasting update cycles.

 

A better option would probably be to track down the quests that would send the player to talk to Vex and see if there are any quest stages that you could use as check points. For example, if the player skipped the guy at the gate and went into the Ratway and talked to Vex directly about the Stones of Barenziah, then a check for that quest stage to have been completed would let you know that the player has spoken to her. The same thing with the Thieves guild quest that sends the player to speak with her about the contracts.

 

It is possible that the player could speak to her without either of those quests active, and in that case you may just want to edit her dialog to modify a global variable and use that global variable value as an indicator.

 

Side note: If the player has not met Vex, how would they know to write in their journal that she is a member of the Thieves Guild or where to find her for that matter? Are they told that by someone else? Did they read it in a note?

Link to comment
Share on other sites

You can use Vex's alias > create a quest > and run and 'OnActivate()' event on the alias to change a global variable that you can use for your purpose.

* Every time you speak to an actor, that actor also triggers an 'OnActivate()' event.

 

But this will work in consistency on a new game, since if you install it mid playthrough the player may or may not have spoken with that npc.

 

Alternatively, you can check the vanilla quest that's attached to Vex's dialogue and look for any 'Stages' or 'Global Variables' that are changed when his first dialogues with the player occur.

Edited by maxarturo
Link to comment
Share on other sites

Thanks to both of you, I'll give those quests a look.

 

Regarding the "how they'll know", as part of the quest, they are told about the Guild and that Vex is a member. The Guild is common enough knowledge that guards talk about it while they wander about Riften, so I figure that any of the Khajiit caravan leaders should be well-traveled enough and have enough connections to know where to point the player.

Link to comment
Share on other sites

I figured out a way to do this! :laugh:
Sharing here in case anyone needs to do something similar:

While I could not do this with Papyrus (there might be a way, but I couldn't figure out how to format it in a way CK would like), you can use GetTalkedToPC as a condition for dialogue.

By duplicating the dialogue I was using, and setting one version to only fire when the player has met Vex (GetTalkedToPC == 1) and the other to only fire when they haven't (GetTalkedToPC == 0), I was able to tie a separate quest stage with appropriate text to each.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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