Author Topic: Some Questions about Dialogue  (Read 3434 times)

Offline V. Lokai

  • Doom Cookie
  • Planewalker
  • *****
  • Posts: 49
  • Gender: Female
    • BGII NPC - Sudar
Some Questions about Dialogue
« on: July 18, 2004, 11:13:24 PM »
Ok. Hrm. The way I'm writing my NPC, she has some complicated conversations that aren't really standard banters. They involve her, other NPCs, and the PC.

Haer'Dalis will butt in and argue with Sudar (my NPC) and she will kind of go off on a tangent with him for a little while, and eventually I need the conversations to come back to the PC. Because in the mod I want the PC to be able to 'pick a side' or stay neutral by their responses to HD's and Sue's arguments. I'm just not sure how to set this up. Also, since this placed in her J dialogue file (because these conversations are PC initiated like in romances) does everything for the other NPCs still need to be appended to their B instead of J file? Does it make a difference?

Am I making sense?  ???
When All Else Fails, Play Dead

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: Some Questions about Dialogue
« Reply #1 on: July 19, 2004, 02:56:06 AM »
For NPC/NPC stuff, you want to use CHAIN, and that can flow back into a state that has PC replies when the time is right.

As for the PC choosing sides, you should set a global variable when they choose a specific response:

PC 1) Yo dood, I totally agree with Haery, here.    DO ~SetGlobal("Argument","GLOBAL",1)~
PC 2) Hmm, I'd have to say my vote goes with whoever, on this one.    DO ~SetGlobal("Argument","GLOBAL",2)~
PC 3) What, me?  Oh no, I'm staying out of this!

Or if the implications of the PC's choices don't matter beyond the conversation, just have one reply link to a state where Haer'dalis/Anti-Haer either expresses indignance, or accepts the praise, or whatever.

Quote
Also, since this placed in her J dialogue file (because these conversations are PC initiated like in romances) does everything for the other NPCs still need to be appended to their B instead of J file? Does it make a difference?

Doesn't matter, necessarily, but personally I try to keep "J" conversations in all "J" dialogue files, and banters/lovetalks in "B" files.
Earn Money Sleeping.

Offline V. Lokai

  • Doom Cookie
  • Planewalker
  • *****
  • Posts: 49
  • Gender: Female
    • BGII NPC - Sudar
Re: Some Questions about Dialogue
« Reply #2 on: July 19, 2004, 03:05:08 AM »
For NPC/NPC stuff, you want to use CHAIN, and that can flow back into a state that has PC replies when the time is right
This what I'm trying to figure out right here. How do I get a chain to go back to the PC? I understand the variables part.

Quote
Doesn't matter, necessarily, but personally I try to keep "J" conversations in all "J" dialogue files, and banters/lovetalks in "B" files.

Ok good.  :) I didn't think so but I'm glad to have someone experienced's opinion.
When All Else Fails, Play Dead

Offline cliffette

  • Timmins Tragic
  • Planewalker
  • *****
  • Posts: 547
  • Gender: Female
  • I still like Neighbours
Re: Some Questions about Dialogue
« Reply #3 on: July 19, 2004, 03:55:27 AM »
You can just END the CHAIN and append your PC's responses:

eg (end of CHAIN)
== HAERDAJ ~I was wondering whether I should call you my emu or my penguin?~
== SUDARJ ~Try 'my sister'?! Well, I think CHARNAME should have a say.~
END
++ ~Go the emu!~ DO ~SG("Sides",1)~ + SUDARJ ChoseEmu
++ ~I like penguins. You can splat them.~ DO ~SG("Sides",2)~ + SUDARJ ChosePeng
++ ~I don't like either, really.~ + SUDARJ ChoseNone

You don't need an END after the PC interjects. It should work. :)

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Some Questions about Dialogue
« Reply #4 on: July 19, 2004, 08:56:54 AM »

++ ~Go the emu!~ DO ~SG("Sides",1)~ + SUDARJ ChoseEmu
++ ~I like penguins. You can splat them.~ DO ~SG("Sides",2)~ + SUDARJ ChosePeng
++ ~I don't like either, really.~ + SUDARJ ChoseNone

Does that syntax actually work? The last plus is typically "GOTO" (which in the case of a CHAIN, refers to the DLG that STARTED the conversation, and NOT the last one to speak)... EXTERN SUDARJ seems more likely to work.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline V. Lokai

  • Doom Cookie
  • Planewalker
  • *****
  • Posts: 49
  • Gender: Female
    • BGII NPC - Sudar
Re: Some Questions about Dialogue
« Reply #5 on: July 19, 2004, 02:11:25 PM »
Thanks a lot guys. I'll try that.  :)
When All Else Fails, Play Dead

Offline neriana

  • Planewalker
  • *****
  • Posts: 585
  • Gender: Female
    • Darien NPC for BG2
Re: Some Questions about Dialogue
« Reply #6 on: July 19, 2004, 02:51:12 PM »

++ ~Go the emu!~ DO ~SG("Sides",1)~ + SUDARJ ChoseEmu
++ ~I like penguins. You can splat them.~ DO ~SG("Sides",2)~ + SUDARJ ChosePeng
++ ~I don't like either, really.~ + SUDARJ ChoseNone

Does that syntax actually work? The last plus is typically "GOTO" (which in the case of a CHAIN, refers to the DLG that STARTED the conversation, and NOT the last one to speak)... EXTERN SUDARJ seems more likely to work.

If Sudar started the conversation and all of those go back to Sudar, it will work. If it goes to Haer'Dalis, it won't.

Romance conversations are initiated by the NPC and placed in the B file. (Except in Cailean -- I don't know what's going on there :)).

Here's a bigger example:

CHAIN IF ~InParty("Haer'Dalis")
See("Haer'Dalis")
!StateCheck("Haer'Dalis",STATE_SLEEPING)
Global("SudHae","GLOBAL",0)~ THEN BSUDAR blah  //Use any GLOBAL and B file name you like here, just make sure it doesn't overlap with anyone else's
~Hi Haery.~ DO ~SetGlobal("SudHae","GLOBAL",1)~
== BHAERDA ~Hi Sudy. What's up?~
== BSUDAR ~Not much.~
END //Normal banter CHAINs use EXIT. You don't want to exit here because you want to let the PC continue the conversation thread
++ ~Not much is up with me either.~ EXTERN BHAERDA whoask
++ ~You two are boring.~ EXTERN BSUDAR soareyou

CHAIN BHAERDA whoask
~Who asked you?~
== BSUDAR ~I sure didn't.~
EXIT

CHAIN BSUDAR soareyou
~So are you.~
== BHAERDA ~You tell <PRO_HIMHER>, sis.~
EXIT
The color of infinity inside an empty glass.

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: Some Questions about Dialogue
« Reply #7 on: July 19, 2004, 03:38:28 PM »
Romance conversations are initiated by the NPC and placed in the B file. (Except in Cailean -- I don't know what's going on there :)).


And, just to avoid confusion, non-romance conversations are also generally started by the NPC and placed in the B file.

As for Cailean, the conversations he initiates we put into the B file and the conversations that we have the PC initiate (they work somewhat like flirts) we put into the J file.
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline V. Lokai

  • Doom Cookie
  • Planewalker
  • *****
  • Posts: 49
  • Gender: Female
    • BGII NPC - Sudar
Re: Some Questions about Dialogue
« Reply #8 on: July 19, 2004, 03:39:51 PM »
Ok. I can't use chain because the original conversation was started by the PC. I've gotten it to do what I want, but it requires a lot of use of EXTERN.

Can I make a seperete dialogue file to set up the appended text for the other characters? For my experimenting I'm sticking them at the bottom of her J dialogue file, but is it possible to put them seperate? Her J file is going to be long as it is.  :P
When All Else Fails, Play Dead

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: Some Questions about Dialogue
« Reply #9 on: July 19, 2004, 03:50:12 PM »
Ok. I can't use chain because the original conversation was started by the PC. I've gotten it to do what I want, but it requires a lot of use of EXTERN.

Can I make a seperete dialogue file to set up the appended text for the other characters? For my experimenting I'm sticking them at the bottom of her J dialogue file, but is it possible to put them seperate? Her J file is going to be long as it is.  :P

The PC's dialog file is Player1 so technically you could use CHAIN, but you really want to be careful about forcing the player to say one particular thing.  [edit] -- This does require the dialog be assigned to the PC before the talk starts, however.

You can put appended text for other NPCs in a different file but you'd have to compile them all at the same time.

COMPILE ~sudar~ ~someotherfile~

 rather than

COMPILE ~sudar~
COMPILE ~someothernpc~
« Last Edit: July 19, 2004, 03:53:19 PM by Kismet »
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline V. Lokai

  • Doom Cookie
  • Planewalker
  • *****
  • Posts: 49
  • Gender: Female
    • BGII NPC - Sudar
Re: Some Questions about Dialogue
« Reply #10 on: July 19, 2004, 03:54:01 PM »
The PC's dialog file is Player1 so technically you could use CHAIN, but you really want to be careful about forcing the player to say one particular thing.

You can put appended text for other NPCs in a different file but you'd have to compile them all at the same time.

COMPILE ~sudar~ ~someotherfile~

 rather than

COMPILE ~sudar~
COMPILE ~someothernpc~

Ok I got the appended text part, but what do you mean about forcing the player to say something? You mean giving them commentary on the argument?
When All Else Fails, Play Dead

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: Some Questions about Dialogue
« Reply #11 on: July 19, 2004, 04:05:45 PM »
By forcing the PC to say something I mean when you don't give the PC the option to choose what they want to say.

PC: It's a nice day out.
NPC: Yes, it is.

as opposed to

NPC: It's a nice day out
PC1: Yes, it is.
PC2: No, it isn't.
PC3: Piss off.

You don't want to do much, if any, of the former because it's important for the player to be able to choose what his/her character says in any given situation.
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Some Questions about Dialogue
« Reply #12 on: July 19, 2004, 04:06:32 PM »
Right. If you assign PLAYER1.DLG to the PC and then do

== PLAYER1 ~I am saying something here~

then you're dictating what the PC says.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline V. Lokai

  • Doom Cookie
  • Planewalker
  • *****
  • Posts: 49
  • Gender: Female
    • BGII NPC - Sudar
Re: Some Questions about Dialogue
« Reply #13 on: July 19, 2004, 04:16:35 PM »
By forcing the PC to say something I mean when you don't give the PC the option to choose what they want to say.

PC: It's a nice day out.
NPC: Yes, it is.

as opposed to

NPC: It's a nice day out
PC1: Yes, it is.
PC2: No, it isn't.
PC3: Piss off.

You don't want to do much, if any, of the former because it's important for the player to be able to choose what his/her character says in any given situation.

Oh. Well yeah I think that would be common sense for anyone creating a mod. Right now the PC has three options. To pick a side, Harry or Sue or to stay out of it.

And I'll just stick to EXTERN because I don't want to force them to say anything, and this way I can end the argument on either Harry or Sue before going back to the PC. I don't want my mod to look one-sided, so I think this will give me the most flexibility.
When All Else Fails, Play Dead

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: