Jump to content

Need help with a conversation between NPCs


Saxxon91

Recommended Posts

I've been stuck trying to get this to work for a few days now and have tried a few different methods.

 

What I'm trying to do is have a quest stage where the player sits at a table and listens to a conversation between 5 characters. The closest I've gotten is that the first character says his first line when the player sits down, but then it just stops, the next guy to speak won't say his line.

 

I based it on this tutorial here: http://geck.bethsoft.com/index.php?title=Three_Way_Conversation_Tutorial

 

Here are the scripts I have so far.

 

Quest Script:

scn SXHMQ02QuestSCRIPT

Short StartTalking
Short iPlayerSitting
Short DoOnce

Begin Gamemode 
If DoOnce != 1
	set StartTalking to 0
	set iPlayerSitting to 0
	set DoOnce to 1
	endif
end

Players Chair:

scn SXHRRPlayerChairSCRIPT

begin OnActivate
	if IsActionRef Player == 1 && SXHMQ02.iPlayerSitting == 0 && Getstage SXHMQ02 == 20
		set SXHMQ02.iPlayerSitting to 1
		Activate
		set SXHMQ02.StartTalking to 1	
	else
		Activate
	endif
	Activate
end

Speaker 1 (Tommy)

SCN SXHTommyRRSCRIPT


Begin Gamemode
	If SXHMQ02.StartTalking == 1 && Getstage SXHMQ02 == 20
	SXHTommyRRREF.sayTo SXHBartonRedRoomREF SXHMQ02GroupConv01
	endif
end

Begin SayToDone SXHMQ02GroupConv01
  SXHBartonRedRoomREF.SayTo SXHTommyRRREF SXHMQ02GroupConv02
End

Begin SayToDone SXHMQ02GroupConv03
  SXHBartonRedRoomREF.SayTo SXHTommyRRREF SXHMQ02GroupConv04
End

Begin SayToDone SXHMQ02GroupConv06
  SXHOscarRedRoomREF.SayTo SXHTommyRRREF SXHMQ02GroupConv07
End

Begin SayToDone SXHMQ02GroupConv08
  SXHNikkiRedRoomREF.SayTo SXHTommyRRREF SXHMQ02GroupConv09
End

Begin SayToDone SXHMQ02GroupConv10
  SXHTommyRRREF.SayTo SXHArchieRedRoomREF SXHMQ02GroupConv11
End

Begin SayToDone SXHMQ02GroupConv11
  SXHArchieRedRoomREF.SayTo SXHTommyRRREF SXHMQ02GroupConv12
End

Begin SayToDone SXHMQ02GroupConv14
  SXHTommyRRREF.SayTo SXHBartonRedRoomREF SXHMQ02GroupConv15
End

Begin SayToDone SXHMQ02GroupConv15
  SXHBartonRedRoomREF.SayTo SXHTommyRRREF SXHMQ02GroupConv16
End

Begin SayToDone SXHMQ02GroupConv17
  SXHNikkiRedRoomREF.SayTo SXHTommyRRREF SXHMQ02GroupConv18
End

Begin SayToDone SXHMQ02GroupConv20
  SXHOscarRedRoomREF.SayTo SXHTommyRRREF SXHMQ02GroupConv21
End

Begin SayToDone SXHMQ02GroupConv24
  SXHTommyRRREF.SayTo PlayerREF SXHMQ02GroupConv25
End

Speaker 2 (Barton)

SCN SXHBartonRRSCRIPT

Begin SayToDone SXHMQ02GroupConv02
  SXHTommyRRREF.SayTo SXHBartonRedRoomREF SXHMQ02GroupConv03
End

Begin SayToDone SXHMQ02GroupConv04
  SXHBartonRedRoomREF.SayTo SXHTommyRRREF SXHMQ02GroupConv05
End

Begin SayToDone SXHMQ02GroupConv05
  SXHTommyRRREF.SayTo SXHBartonRedRoomREF SXHMQ02GroupConv06
End

Begin SayToDone SXHMQ02GroupConv16
  SXHTommyRRREF.SayTo SXHNikkiRedRoomREF SXHMQ02GroupConv17
End

Speaker 3 (Oscar)

SCN SXHOscarRRSCRIPT

Begin SayToDone SXHMQ02GroupConv07
  SXHTommyRRREF.SayTo SXHOscarRedRoomREF SXHMQ02GroupConv08
End

Begin SayToDone SXHMQ02GroupConv19
  SXHTommyRRREF.SayTo SXHOscarRedRoomREF SXHMQ02GroupConv20
End

Begin SayToDone SXHMQ02GroupConv21
  SXHArchieRedRoomREF.SayTo SXHOscarRedRoomREF SXHMQ02GroupConv22
End

Begin SayToDone SXHMQ02GroupConv23
  SXHTommyRRREF.SayTo PlayerREF SXHMQ02GroupConv24
End

Speaker 4 (Nikki)

SCN SXHNikkiRRSCRIPT

Begin SayToDone SXHMQ02GroupConv09
  SXHTommyRRREF.SayTo SXHNikkiRedRoomREF SXHMQ02GroupConv10
End

Begin SayToDone SXHMQ02GroupConv18
  SXHOscarRedRoomREF.SayTo SXHTommyRRREF SXHMQ02GroupConv19
End

Speaker 5 (Archie)

SCN SXHArchieRRSCRIPT

Begin SayToDone SXHMQ02GroupConv12
  SXHArchieRedRoomREF.Say SXHMQ02GroupConv13
End

Begin SayToDone SXHMQ02GroupConv13
  SXHTommyRRREF.SayTo PlayerREF SXHMQ02GroupConv14
End

Begin SayToDone SXHMQ02GroupConv22
  SXHOscarRedRoomREF.SayTo SXHArchieRedRoomREF SXHMQ02GroupConv23
End

I've also tried to do it by linking the lines together in the conversation tab of the quest but that doesn't work either. What happened then is that Tommy and Barton exchanged their lines as they should but then when the third character (Oscar) is supposed to join in the conversation ends and they both say goodbye to each other.

 

Any suggestions would really be appreciated because at this point I have no idea what else I can try.

Link to comment
Share on other sites

Off hand I would say the problem is with "GetStage" . In my experience it cannot be used like that , not clear what it really returns ... as in what GetObjectiveDisplayed would return. Seems stages are more for executing commands rather than holding information to check against.

So use something else besides stages for that condition , like another variable acting like a stage counter. Which you could use the result script of a stage to set it , if you are needing the stage to still be an active part of it.

 

But on a side note , I think you could just use the "Result Script (end)" field on a topic info , in the conversation tab.

To then tell the next actor to say their topic ? err wait ... I guess you still need a condition as a gate keeper on dialogue ... so using the result script would have to be for setting a variable , unless the command is "AddTopic"

 

But before I go confusing you and myself further ... just try something other than "GetStage" first.

Edited by Mktavish
Link to comment
Share on other sites

I've been digging into a specific example of this recently (dialog between several NPCs in the presence of the player but without the player being able to interact) in the script "aaCaptorBarkTriggerSCRIPT" and dialog topics from Quest "aaNVB3Main03" in Someguy2000's "New Vegas Bounties III" mod.

 

As suggested by Mktavish, a variable ("short CaptorBark") is defined in the Quest Script "aaNVB3Main03QuestSCRIPT".

The secondary script "aaCaptorBarkTriggerSCRIPT" sets:

set aaNVB3Main03.CaptorBark to 1
    aaCaptorREF.SayTo Player aaNVB3Main03CaptorBarks

The Quest "aaNVB3Main03" "Topics" entry "aaNVB3Main03CaptorBarks" has 5 entries, the first of which has an (end) Result Script which sets "aaNVB3Main03.CaptorBark to 2" and calls the next "Topic" entry by it's "SayTo" line, which sets "CaptorBark to 3" in it's Result Script, etc. That particular example spits out 5 lines between 3 different "captors" in this fashion. The last "CaptorBark" value is the only thing set, and is used as a conditional in the next script to determine when it is ready to run.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

@ dubious Interesting ... but I am having trouble wrapping my head around what your'e saying without actually seeing it in action from geck/game.

 

Is what I'm saying about the "GetStage" command as a return condition ... consistent with your recent findings ?

And possibly Saxxon91's problem with their script conglomeration ending up with the conversation render hanging where it needs that result?

Edited by Mktavish
Link to comment
Share on other sites

I'm not surprised. I had to map out the various elements in an attempt to work out the logic flow before it made any sense to me. (Still not complete as to the logic sequence but all the elements seem to be there.) However, what I have worked out might help with understanding how Someguy2000 had this work. (Not to derail this thread, or to say this is the only way, but as an example.) This link is a 7Zip archive of a "Libre/Open Office" "ods" spreadsheet listing the various elements I traced out. Most modern spreadsheets can read that format. Hopefully that will make it clear when he used a "GetStage" (seldom) and when he used a variable (CaptorBark) to control the conversation under a specific dialog topic. I had to put it into a spreadsheet as the simplest way to maintain readability.

 

-Dubious-

Link to comment
Share on other sites

Sorry I can't open that. Is there a free program that could ? without addware ? hmmm maybe never mind.

 

I think "GetStage" is just an ugly duckling compared ... err stages themselves have something odd. Not sure

 

It does work for a prescribed situation I can see, but Saxxon91 is trying to use it out of context so to speak.

I ran into the same problem using it as they are.

 

Its not a standard Get function.

Edited by Mktavish
Link to comment
Share on other sites

"Libre Office" is freeware (no ads). Basically the open source version of the MS Office suite. It can read and write in MS Office formats, as well as other open standards, including PDF. If you can use Office, Excel, etc. then you can use the Libre Office equivalents: Writer, Calc, etc..

 

-Dubious-

Link to comment
Share on other sites

I have gotten both of the ways you mentioned to work and it was a major pain. It has been a while, but one thing to try is to set the Starttalking variable back to 0 once it starts up like shown below. I seem to remember that if you do not do that then the script will kind of loop at that first part and end with only the first line spoken. That is just the first thing I noticed you might try. I seem to vaguely remember that the tutorial does not really work exactly as they say.

Begin Gamemode
	If SXHMQ02.StartTalking == 1 && Getstage SXHMQ02 == 20
	SXHTommyRRREF.sayTo SXHBartonRedRoomREF SXHMQ02GroupConv01
        set SXHMQ02.Starttalking to 0
	endif
end
Link to comment
Share on other sites

  • Recently Browsing   0 members

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