Jump to content

conversation between two npc's not working for me


davidlallen

Recommended Posts

I guess this counts as an "intermediate level" mod question. I have followed the exact instructions for triggering a conversation between two NPC's as given in the geck wiki page. I have verified that the script triggers; but no conversation happens. The wiki description is very small, in fact here is the entire thing:

 

The simplest way to make a conversation is to create a new topic for each response on the Conversation tab of the Quest window, create an info under each topic, and use the "Link To" and "Link From" fields to link the infos together in the order that you want them to be spoken.

 

So I did that, and my mod is attached. To try it, go to goodsprings, walk into Doc Mitchell's house and turn right. You will see two NPCs there with no inventory. Walk up directly in front of them, and you are standing in my trigger block. The trigger block calls startconversation on the first npc. But, nothing happens. They both turn and look at me, but there is no dialog. The script contains a line (commented out now) to show a message when the trigger goes off, so I know the trigger is correct. Here are some more details of exactly what I did.

 

1. Create new NPC called mynpc. Drop into house.

2. Create new NPC called myothernpc. Drop into house.

3. Create trigger called mytrigger, associate with script called mytriggerscript

4. Create a quest called (you can guess) myquest. Check "start game enabled".

5. Create four topics associated with the quest, mytopic1 ... mytopic4.

6. On the conversation tab of the quest, enter the info value for mytopic1, to be spoken by mynpc.

7. Give it a condition, getisid mynpc == 1, and give it a "link to" of mytopic2.

8. Repeat for mytopic2 ("link from" mytopic1, "link to" mytopic3), mytopic3, mytopic4.

9. Double check each topic has link from, link to, and getisid for the proper values.

 

As far as I can tell this is everything called for in the short instructions. But, no conversation happens. The topics start out with the "Random" checkbox checked, which is odd. Since I don't want my conversation happening in a random order, I have unchecked this checkbox on each topic.

 

Can you tell if I have missed a step? The tiny mod is attached if it helps.

Edited by davidlallen
Link to comment
Share on other sites

Just off the top of my head, make sure the quest containing the dialogue doesn't have conditions that exclude the NPC's in question. You should put a condition though, or every NPC will be able to say it.

 

I'm not sure about startconversation, haven't tried that route before. The way I usually see it set up starts off with a "Dialogue" AI Package (Sandbox, Travel, UseItem, Guard, Dialogue, etc). In the package, there's an area to select the 1st topic that starts everything off. To get the NPC to use the package, you can add it to the NPC with a condition that is set by the trigger or do a "Ref.AddScriptPackage zzMyNewDialoguePackage" in the trigger script to start things off.

Edited by Ez0n3
Link to comment
Share on other sites

Thanks for the suggestions. The quest doesn't have any conditions, or anything besides the conversation topics. I made the testcase as tiny as possible.

 

I don't quite understand how packages relate; can you explain more and/or give me a pointer? My goal is the following. The PC enters a new interior, meets two NPCs, and gets some information and does some quests. When the PC comes back from the second or third quest, I want the PC to arrive, right when the two NPC's are having this conversation where the PC learns more background and more about the characters.

 

What I have done so far is to put a trigger box near the doorway to the interior. When the quest is in the right stage, the trigger teleports the two NPCs from whereever they were, to just around the corner from the PC, and calls startconversation. What happens now is they teleport fine, but they immediately start sandboxing. BTW, the tiny testcase I have attached to the OP does not have any of this, the tiny testcase just contains the small pieces I described.

 

I haven't done much with packages in general. For these two NPC's I have given them a single package, which is a default sandbox package. Please help me to understand more specifically what I should do. I will need to have the trigger set a new variable in the quest, which is like "bStartConversationNow". I will need to create two new packages, one for each NPC. The NPC who will start speaking should have a package which is a dialog type, and has a condition which says "getquestvariable <questname>.bStartConversationNow == 1". Then every frame for the whole game, the NPC will evaluate this condition, it will be false, and the next package down (the sandbox one) will run anyway. But when the variable becomes true, this package will trigger. I still need to teleport the NPC to the target location but that part is working already.

 

For the second NPC, what package do I add to make sure this NPC will respond? I don't want him to continue sandboxing after being teleported.

Edited by davidlallen
Link to comment
Share on other sites

You don't have to do anything to the second NPC to make him respond because you already have your dialogue connected by link to/froms.

 

The first NPC will do the driving. If you put the dialogue package on him and put the first topic into the dialogue package, put the dialogue package onto him as a script package in your script then it should kick off your conversation whenever you want that to start. You wouldn't need any other package if you didn't want it. I guess it depends when you bring that NPC to life. If he doesn't appear until his conversation then he only needs that package. If the second NPC only appears then as well he can sandbox in place wherever you need him and then he'll be there for the conversation. If you want the conversation to be in a particular location the dialogue package NPC will be the moving NPC. You can set up the second one to just stay put with a radius of 0 in whichever package you put him into.

 

You can have NPCs evp in and out of packages serially by using your variables and a script. It makes controlling them and what you want them to do pretty easy.

Link to comment
Share on other sites

Maybe part of my problem is that I cannot find out how to set the "target" field. Please see attached screenshot. There is a field near the top right, "Target NPC". It is blank for this topic. I cannot find out how to set it. I was thinking that the game could figure out who the target is. The "link to" topic has a "GetIsId" condition, so it seems that should be the target. But maybe that is not right. Maybe there is some way I should set the target field, and without that, the game is just discarding the target.

 

Do I have to set the target field, and how do I do it?

Link to comment
Share on other sites

You can set up targets in your dialogue. In the conditions, when you do GetIsID, you can do two of those. One for the Subject and one for the Target. There is the little pull down menu under the place where you do the GetIsID and the name of the NPC and the == 1. Choose S for the speaker and T for the Target.

 

Do you need to? Well, I'm not entirely sure you do need to, but you do need to tell the NPC who it's supposed to deliver the line to somehow. Either in a script with a function (StartConversation or SayTo) or with a script package (putting a Dialogue Package on the NPC) or in the conditions of the dialogue (well, not if it's the player; that's assumed). I almost always use the Subject/Target in dialogue conditions for a planned two way NPC to NPC conversation that won't be reused by any other NPCs because I think I read somewhere to do it that way, but I'm not sure it's necessary if the dialogue is linked and it has been kicked off through a script, but it might be worth trying since you aren't having any luck.

 

Also, did you remember to turn on subtitles if you are using new text that you don't have voice files for so you could see the dialogue if they can't speak it?

Link to comment
Share on other sites

It is working now, using a package. Thanks! I tried both with, and without the "GetIsID <other NPC> target" condition, and that condition doesn't make any difference. So it is not needed.

 

Now I should go join the geck wiki also, and then comment on their page that the conversation description they give either (a) doesn't work anymore or (b) is missing a step which I can't see, and suggest instead your dialog package approach.

 

Now if only I could figure out why my corpses don't start out dead.

Link to comment
Share on other sites

Necro'ing my own thread, it hasn't been dead long. I have a conversation working between two NPC's, triggered when the player enters the room at a certain stage in a quest. It is working. My goal is for the player to listen to this conversation and learn some key background about the quest. Unfortunately, when the player approaches, both NPC's who are talking have their "activate" active. That is, the player can use the E key to talk with either one. This stops the conversation and it never returns. So the player never learns the key information.

 

How can I disable the "E" activate function while the conversation is going, so the conversation doesn't get interrupted?

 

One NPC, the conversation starter, has a custom dialog package and the other NPC doesn't seem to need one. On the dialog package, I have unchecked "enable fallout behavior" so all its sub-options are also unchecked. I hoped that since "hello to players" is now unchecked that the "E" activate option would go away.

Link to comment
Share on other sites

Necro'ing my own thread, it hasn't been dead long. I have a conversation working between two NPC's, triggered when the player enters the room at a certain stage in a quest. It is working. My goal is for the player to listen to this conversation and learn some key background about the quest. Unfortunately, when the player approaches, both NPC's who are talking have their "activate" active. That is, the player can use the E key to talk with either one. This stops the conversation and it never returns. So the player never learns the key information.

 

How can I disable the "E" activate function while the conversation is going, so the conversation doesn't get interrupted?

 

One NPC, the conversation starter, has a custom dialog package and the other NPC doesn't seem to need one. On the dialog package, I have unchecked "enable fallout behavior" so all its sub-options are also unchecked. I hoped that since "hello to players" is now unchecked that the "E" activate option would go away.

 

Add an OnActivate block to their object scripts so you can make them non-activatable during the conversation. Once you invoke an OnActivate block, an object will not activate unless it hits the command 'Activate' in the code block.

 

 short iMyConversationActive

BEGIN OnActivate
if iMyConversationActive
      ;Do nothing
else
 Activate
endif
END


Link to comment
Share on other sites

Add an OnActivate block to their object scripts so you can make them non-activatable during the conversation. Once you invoke an OnActivate block, an object will not activate unless it hits the command 'Activate' in the code block.

In retrospect, I probably should have thought of that. I can add a result script to turn off the variable at the last topic of the conversation. But this type of semaphore makes me nervous. If the player does somehow interfere with the conversation (shooting one of the NPCs?) then the conversation might abort, the variable would never be unset, and then the player would be unable to talk to the NPCs at all. Is there any way to avoid that? Say, to add another way to turn off this variable after 30 sec? Perhaps that is a silly concern which would never happen in practice.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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