Jump to content

A Friendship Talk (number 10, to be exact)


cmorgan

Recommended Posts

A Friendship Talk

or

"Thinking About Dialog Structure"

 

OK. One way to think about states in the BG2 engine is to think of a deck of cards. As a modder, you fill out the cards, set up how the engine orders them, and make it possible for a player to acces them. As a player, you get handed the top card on the deck, then are asked to choose a new card - which the engine hands you, and gives you additional optins to pick, and so on, and so on.

 

The basic schematic:

 

CARD 1  --> card 2 --> card 3 --> card 4

 

Card 1 gets pulled from the deck under certain conditions, then links to card 2, which links to card 3, which links to card 4.

Linear. Can be boring. No real input from the player.

 

Sample code:

APPEND ~C-ARANJ~

/* BG2 FriendTalk 10 c-aranfriendbg2 = 19 */
/* "Optimists, Pessimists, and Realists, Oh My...", or, the glass is half full, half empty, who cares - as long as it is a glass of good scotch!  */

IF ~Global("c-aranfriendbg2","GLOBAL",19)~ THEN c-aranfriendtenstart
 SAY ~[ARAN] We keep runnin’ around, battling’ various foes, an’ collectin’ artifacts, treasures, an’ knowledge. Cyric’s Dark Heart, do you think we are ever goin’ to slow down? Or ever just claim victory?~ DO ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~
 IF ~~ THEN REPLY ~I think that we shall prevail. After all, we have made it this far. Things should be getting better any day now.~ GOTO c-aranfriendbg2optimist
END

IF ~~ c-aranfriendtenoptimist
SAY ~[ARAN] That sounds right good. Solid, positive outlook there. Come, play a bit o’ words with me.~
IF ~~ THEN GOTO c-aranfriendbg2optipessireal
END

IF ~~ c-aranfriendtenoptipessireal
 SAY ~[ARAN] Do you see the glass as half full or half empty? Be ye optimist, pessimist, or somethin’ else?~
 IF ~~ THEN REPLY ~The glass is half full, Aran.~ GOTO c-aranfriendbg2punchline
END

IF ~~ c-aranfriendtenpunchline
 SAY ~[ARAN] Well, you be entitled to your opinion, o’course. But if you ask me, the real question is what kind o’ alcohol is in th’ glass?~  
 IF ~~ THEN EXIT
END

END

 

This ends up with one conversation:

 

[ARAN] We keep runnin’ around, battling’ various foes, an’ collectin’ artifacts, treasures, an’ knowledge. Cyric’s Dark Heart, do you think we are ever goin’ to slow down? Or ever just claim victory?

[PC] I think that we shall prevail. After all, we have made it this far. Things should be getting better any day now.

[ARAN] That sounds right good. Solid, positive outlook there. Come, play a bit o’ words with me.

[ARAN] Do you see the glass as half full or half empty? Be ye optimist, pessimist, or somethin’ else?

[PC] The glass is half full, Aran.

[ARAN] Well, you be entitled to your opinion, o’course. But if you ask me, the real question is what kind o’ alcohol is in th’ glass?

 

This kind of linearity tells only one story - it allows for no player choice. It's also called "railroading" - I've assumed godlike control over both NPC and the Player, leaving the player with one response and one way of seeing the conversation. I have placed them on a straight track, pushed them on the train, and they can only get off at the end with no deviations, changes, or transfers. In fact, I just roped 'em into the seat and made sure they look out of only the window I want them too. While this is the closest thing to standard literature, this isn't straight fanfic; the joy of modding dialog really is creating *interactive* storytelling.

Link to comment

So let's spice it up a little, and give additional options to the player. But we really are still linear. This is the "Looping Lovetalk" technique described by JCompton here... - it provides the player the illusion of choice, while still keeping the dialog a linear A > B > C > D EXIT.

 

Looping Lovetalk concept as applied here:

CARD 1  --> card 2 --> CARD 5 --> card 6 --> CARD 9  --> card 10  --> CARD 13 --> EXIT
	--> card 3			--> card 7 		 --> card 11 
	--> card 4			--> card 8			 --> card 12

 

The code:

APPEND ~C-ARANJ~

/* BG2 FriendTalk 10 c-aranfriendbg2 = 19 */
/* "Optimists, Pessimists, and Realists, Oh My...", or, the glass is half full, half empty, who cares - as long as it is a glass of good scotch!  */

IF ~Global("c-aranfriendbg2","GLOBAL",19)~ THEN c-aranfriendtenstart
 SAY ~[ARAN] We keep runnin’ around, battling’ various foes, an’ collectin’ artifacts, treasures, an’ knowledge. Cyric’s Dark Heart, do you think we are ever goin’ to slow down? Or ever just claim victory?~ DO ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~
 ++ ~I think that we shall prevail. After all, we have made it this far. Things should be getting better any day now.~ + optimist
 ++ ~I do not think we shall survive this. Fighting against so many foes, for so long, how can the outcome be anything but death and destruction?~ + optimist
 ++ ~Perhaps we shall win. Perhaps we shall lose. But really, we don’t have much of a choice in the matter – the fates decide our destiny.~ + optimist
END

IF ~~ optimist
SAY ~[ARAN] That sounds right good. Solid, positive outlook there. Come, play a bit o’ words with me.~
IF ~~ THEN GOTO c-aranfriendbg2optipessireal
END

IF ~~ c-aranfriendtenoptipessireal
 SAY ~[ARAN] Do you see the glass as half full or half empty? Be ye optimist, pessimist, or somethin’ else?~
 ++ ~The glass is half full, Aran.~ + punchline
 ++ ~The glass is half empty, Aran.~ + punchline
 ++ ~The glass simply exists, Aran. Pick it up and use it, and stop bothering with how much is in it.~ + punchline
END

IF ~~ c-aranfriendtenpunchline
 SAY ~[ARAN] Well, you be entitled to your opinion, o’course. But if you ask me, the real question is what kind o’ alcohol is in th’ glass?~  
 IF ~~ THEN EXIT
END

END

 

Here, we did two things. First, we started using shortcuts again; { ++ } = { IF ~~ THEN REPLY }, and { + } = { GOTO }.

 

The second thing we did was create an illusion of choice for the player. Each of the responses lead to the same state, but the player gets more "roleplay" options. This is useful, and certainly keeps tight narrative control.

 

Here are some potential conversations:

[ARAN] We keep runnin’ around, battling’ various foes, an’ collectin’ artifacts, treasures, an’ knowledge. Cyric’s Dark Heart, do you think we are ever goin’ to slow down? Or ever just claim victory?
[PC] I think that we shall prevail. After all, we have made it this far. Things should be getting better any day now.
[ARAN] That sounds right good. Solid, positive outlook there. Come, play a bit o’ words with me.
[ARAN] Do you see the glass as half full or half empty? Be ye optimist, pessimist, or somethin’ else?
[PC]  The glass is half full, Aran.
[ARAN] Well, you be entitled to your opinion, o’course. But if you ask me, the real question is what kind o’ alcohol is in th’ glass? 

//////

[ARAN] We keep runnin’ around, battling’ various foes, an’ collectin’ artifacts, treasures, an’ knowledge. Cyric’s Dark Heart, do you think we are ever goin’ to slow down? Or ever just claim victory?
[PC] I do not think we shall survive this. Fighting against so many foes, for so long, how can the outcome be anything but death and destruction?
[ARAN] That sounds right good. Solid, positive outlook there. Come, play a bit o’ words with me.
[ARAN] Do you see the glass as half full or half empty? Be ye optimist, pessimist, or somethin’ else?
[PC]  The glass simply exists, Aran. Pick it up and use it, and stop bothering with how much is in it.
[ARAN] Well, you be entitled to your opinion, o’course. But if you ask me, the real question is what kind o’ alcohol is in th’ glass? 

//////

[ARAN] We keep runnin’ around, battling’ various foes, an’ collectin’ artifacts, treasures, an’ knowledge. Cyric’s Dark Heart, do you think we are ever goin’ to slow down? Or ever just claim victory?
[PC] Perhaps we shall win. Perhaps we shall lose. But really, we don’t have much of a choice in the matter – the fates decide our destiny.
[ARAN] That sounds right good. Solid, positive outlook there. Come, play a bit o’ words with me.
[ARAN] Do you see the glass as half full or half empty? Be ye optimist, pessimist, or somethin’ else?
[PC]  The glass is half full, Aran.
[ARAN] Well, you be entitled to your opinion, o’course. But if you ask me, the real question is what kind o’ alcohol is in th’ glass? 

etc.

 

Well, you get the idea. Each option we add leads back to the "choke point" state, and while you can vary the conversation a bit the basic idea is that the NPC says substantially the same thing. Important for punchlines, or talks that really need to be streamlined for specific effect. This really does work well at telling a linear narrative story. It provides options for the player to have engagement, while keeping the band of outcomes narrowly focused.

Link to comment

But what else can we do, to engage the player and NPC more deeply? Telling an interactive story can be a bit more complicated, but it also can be alot more fun for both modder and player - creating actual differences in the story based on player response. Can we do this and still end up coming up with the same punchline, thus keeping our narrative intact? We want the player to get there no matter the path taken, and have it make sense.

 

Let's move forward now to "branching" dialog (as JCompton quaintly puts it, a 'freaking 125-branch novel for each one'). We set up some adjusted in-character responses, not moving far from our script - just wiggling around and widening it a bit.

 

Diagrammed,

CARD 1  --> option1 --> card 2 --> CARD 6 --> option1  --> CARD 7 EXIT
	  --> option2 --> card 3 			  --> option2 
	--> option3 --> card 4			--> option3
	--> option4 --> card 5 			  --> option4
	--> Option5 --> card 5			  --> option5

 

the code:

/* BG2 FriendTalk 10 c-aranfriendbg2 = 19 */
/* "Optimists, Pessimists, and Realists, Oh My.", or, the glass is half full, half empty, who cares - as long as it is a glass of good scotch!  */
IF ~Global("c-aranfriendbg2","GLOBAL",19)~ THEN c-aranfriendtenstart
 SAY ~[ARAN] We keep runnin’ around, battling’ various foes, an’ collectin’ artifacts, treasures, an’ knowledge. Cyric’s Dark Heart, do you think we are ever goin’ to slow down? Or ever just claim victory?~
 ++ ~I think that we shall prevail. After all, we have made it this far. Things should be getting better any day now.~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ + optimist
 ++ ~I do not think we shall survive this. Fighting against so many foes, for so long, how can the outcome be anything but death and destruction?~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ + pessimist
 ++ ~Perhaps we shall win. Perhaps we shall lose. But really, we don’t have much of a choice in the matter – the fates decide our destiny.~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ + fatalist
 ++ ~We are here. We have not lost yet. Speculating on the future just wastes our time and energy.~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ + realist
 ++ ~That depends. Are you worried that you're running out of oaths?~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ + realist
END

IF ~~ optimist
 SAY ~[ARAN] That sounds right good. Solid, positive outlook there. Come, play a bit o’ words with me.~
 IF ~~ THEN GOTO optipessireal
END

IF ~~ pessimist
 SAY ~[ARAN] Aye, that’s my take, too. We’d best be careful, or we all will end up facin’ Kelemvor right quick. That is right depressin’, that is. Hey, let’s lghten the mod a bit. Play a bit o’ words with me. ~
 IF ~~ THEN GOTO optipessireal
END

IF ~~ fatalist
 SAY ~[ARAN] Now, then, I don’t rightly agree. The fates, they can be moved, or Tymorra’s coin is naught but wind. Come, now. Play a bit o’ words with me.~
 IF ~~ THEN GOTO optipessireal
END

IF ~~ realist
 SAY ~[ARAN] Aye, true enough. No fun in not speculatin’, though, just to pass th’ time. Come, now. Play a bit o’ words with me.  ~
 IF ~~ THEN GOTO optipessireal
END

IF ~~ optipessireal
 SAY ~[ARAN] Do you see the glass as half full or half empty? Be ye optimist, pessimist, or somethin’ else?~
 ++ ~The glass is half full, Aran.~ + punchline
 ++ ~The glass is half empty, Aran.~ + punchline
 ++ ~The glass simply exists, Aran. Pick it up and use it, and stop bothering with how much is in it.~ + punchline
 ++ ~The glass simply exists, Aran. The fates will decide whether it is full or empty. We are simply required to drink.~ + punchline
 ++ ~Who cares, as long as there's enough to drink?~ + cheers
END

IF ~~ punchline
 SAY ~[ARAN] Well, you be entitled to your opinion, o’course. But if you ask me, the real question is what kind o’ alcohol is in th’ glass?~
 IF ~~ THEN EXIT
END

IF ~~ cheers
 SAY ~[ARAN] Aye, ye'r a <PRO_MANWOMAN> after me own heart, and no mistake. Cheers.~
 IF ~~ THEN EXIT
END

 

We have done a few things here. First, the closing of the variable:

 

+ ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ + optimist

 

which in longhand is

 

DO ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ GOTO optimist

 

Second, we have created different responses for Aran. Fundamentally, they are similar - but now the player gets a reaction and Aran gets a modified response. Each of these really are miniature versions of "branches" of dialog, where things can go very differently.

 

Third, the dialog map now has a possibility of a "short-circut", too, where we end up with a completely different "punchline". A player can now play they are smarter than Aran, and get the punchline themselves. This goes a long way towards giving players a break from NPCs who always get the "last word", so to speak. And it is important to add materials in a Companion mod that support players who want their PC to have the upper conversational hand, too.

 

OK so far. Let's extend the branches with some more possibilities. What about all those folks that want to roleplay impatience with a gabby Aran? What about the players who have heard it all 20 times and want to get out of the talk immediately? In the next section, we add in a few more possible branches, and an exit strategy. For the Exit Strategy, I will refer you on to a separate post here. For now, I am going to use a token to represent that line, <<EXIT_BLOCK>>.

 

Diagrammed,

CARD 1  --> option1 --> card 2 --> CARD 6 --> option1  --> CARD 7 --> EXIT
	  --> option2 --> card 3 			  --> option2 
	--> option3 --> card 4			--> option3
	--> option4 --> card 5 			  --> option4
	--> Option5 --> card 5			  --> option5
	<<EXIT_BLOCK>> --> card 8 --> EXIT

 

We will come back to that when we put the whole talk together.

Link to comment

Intertwining Branches

One possibility we can easily add is NPC comment - a set of leaves on the tree of dialog, so to speak, or twigs (not twiglets - we eat those :) ). So, let's add in a snippet of CHAIN to allow other NPCs to have a word or two. We replace the state

IF ~~ optipessireal

with a new one, outside of the APPEND.

 

Diagrammed,

CARD 1  -> option1 -> card 2 -> CARD 6 -> npc1
	  -> option2 -> card 3 			  npc2 
	-> option3 -> card 4				npc3 -> option1 -> CARD 7 -> EXIT
	-> option4 -> card 5 				   -> option2 
	-> Option5 -> card 5				   -> option3 
	|									   -> option4
	|									   -> option5
	<<EXIT_BLOCK>> -> card 8 -> EXIT

 

The transformed code:

CHAIN ~C-ARANJ~ optipessireal
~[ARAN] Do you see the glass as half full or half empty? Be ye optimist, pessimist, or somethin’ else?~

== ~YOSHJ~ IF ~InParty("Yoshimo") InMyArea("Yoshimo") !StateCheck("Yoshimo",CD_STATE_NOTVALID)~ THEN ~[YOSHIMO]  XXXX SPOKEN XXXX ( XXXX ACTION XXXX ) ~ //options:  DO ~ XXXX SET XXXX ~ <<TERMINATION_PLACEHOLDER>>

== ~MINSCJ~ IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN ~[MINSC]  XXXX SPOKEN XXXX ( XXXX ACTION XXXX ) ~ //options:  DO ~ XXXX SET XXXX ~ <<TERMINATION_PLACEHOLDER>>

== ~C-ARANJ~ IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN ~[ARAN]  XXXX SPOKEN XXXX ( XXXX ACTION XXXX ) ~ //options:  DO ~ XXXX SET XXXX ~ <<TERMINATION_PLACEHOLDER>>

== ~KORGANJ~ IF ~InParty("Korgan") InMyArea("Korgan") !StateCheck("Korgan",CD_STATE_NOTVALID)~ THEN ~[KORGAN]  XXXX SPOKEN XXXX ( XXXX ACTION XXXX ) ~ //options:  DO ~ XXXX SET XXXX ~ <<TERMINATION_PLACEHOLDER>>

== ~JAHEIRAJ~ IF ~InParty("Jaheira") InMyArea("Jaheira") !StateCheck("Jaheira",CD_STATE_NOTVALID)~ THEN ~[JAHEIRA]  XXXX SPOKEN XXXX ( XXXX ACTION XXXX ) ~ //options:  DO ~ XXXX SET XXXX ~ <<TERMINATION_PLACEHOLDER>>

== ~EDWINJ~ IF ~InParty("Edwin") InMyArea("Edwin") !StateCheck("Edwin",CD_STATE_NOTVALID)~ THEN ~[EDWIN]  XXXX SPOKEN XXXX ( XXXX ACTION XXXX ) ~ //options:  DO ~ XXXX SET XXXX ~ <<TERMINATION_PLACEHOLDER>>

== ~KELDORJ~ IF ~InParty("Keldorn") InMyArea("Keldorn") !StateCheck("Keldorn",CD_STATE_NOTVALID)~ THEN ~[KELDORN]  XXXX SPOKEN XXXX ( XXXX ACTION XXXX ) ~ //options:  DO ~ XXXX SET XXXX ~ <<TERMINATION_PLACEHOLDER>>

== ~VALYGARJ~ IF ~InParty("Valygar") InMyArea("Valygar") !StateCheck("Valygar",CD_STATE_NOTVALID)~ THEN ~[VALYGAR]  XXXX SPOKEN XXXX ( XXXX ACTION XXXX ) ~ //options:  DO ~ XXXX SET XXXX ~ <<TERMINATION_PLACEHOLDER>>

== ~CERNDJ~ IF ~InParty("Cernd") InMyArea("Cernd") !StateCheck("Cernd",CD_STATE_NOTVALID)~ THEN ~[CERND]  XXXX SPOKEN XXXX ( XXXX ACTION XXXX ) ~ //options:  DO ~ XXXX SET XXXX ~ <<TERMINATION_PLACEHOLDER>>
END
++ ~The glass is half full, Aran.~ + punchline
++ ~The glass is half empty, Aran.~ + punchline
++ ~The glass simply exists, Aran. Pick it up and use it, and stop bothering with how much is in it.~ + punchline
++ ~The glass simply exists, Aran. The fates will decide whether it is full or empty. We are simply required to drink.~ + punchline
++ ~Who cares, as long as there's enough to drink?~ + cheers

This set of entries shows adding Aran's response if Minsc is present:

== ~MINSCJ~ IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN ~[MINSC]  XXXX SPOKEN XXXX ( XXXX ACTION XXXX ) ~ //options:  DO ~ XXXX SET XXXX ~ <<TERMINATION_PLACEHOLDER>>
== ~C-ARANJ~ IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN ~[ARAN]  XXXX SPOKEN XXXX ( XXXX ACTION XXXX ) ~ //options:  DO ~ XXXX SET XXXX ~ <<TERMINATION_PLACEHOLDER>>

So now filling in the entries:

CHAIN ~C-ARANJ~ optipessireal
~[ARAN] Do you see the glass as half full or half empty? Be ye optimist, pessimist, or somethin’ else?~
== ~YOSHJ~ IF ~InParty("Yoshimo") InMyArea("Yoshimo") !StateCheck("Yoshimo",CD_STATE_NOTVALID)~ THEN ~[YOSHIMO]  Ah, the eternal question. The glass is half full, of course.~
== ~MINSCJ~ IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN ~[MINSC]  I do not understand. You are holding no glass, Aran.~ 
== ~C-ARANJ~ IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN ~[ARAN]  Aye, my large friend. It's a metaphor. Somethin' not real... hey.  I'll explain it later.~
== ~KORGANJ~ IF ~InParty("Korgan") InMyArea("Korgan") !StateCheck("Korgan",CD_STATE_NOTVALID)~ THEN ~[KORGAN] Stupid questions. Who cares if it is half full, or half empty, as long as it is mine.~
== ~JAHEIRAJ~ IF ~InParty("Jaheira") InMyArea("Jaheira") !StateCheck("Jaheira",CD_STATE_NOTVALID)~ THEN ~[JAHEIRA] I am certain that the glass is neither half full nor half empty. Someone simply did not complete the task of filling the glass, and needs to be reminded.~
== ~EDWINJ~ IF ~InParty("Edwin") InMyArea("Edwin") !StateCheck("Edwin",CD_STATE_NOTVALID)~ THEN ~[EDWIN] (Mind games from children. How droll.) The glass is half empty. The more pertinent question is whom to punish for it.~
== ~KELDORJ~ IF ~InParty("Keldorn") InMyArea("Keldorn") !StateCheck("Keldorn",CD_STATE_NOTVALID)~ THEN ~[KELDORN] I once heard a learned sage change this question, speaking of a third option. ‘The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails.’ I prefer to avoid the question by picking up the pitcher and filling the glass until it overflows.~
== ~VALYGARJ~ IF ~InParty("Valygar") InMyArea("Valygar") !StateCheck("Valygar",CD_STATE_NOTVALID)~ THEN ~[VALYGAR] I have heard a different interpretation. ‘An optimist believes that this is the best of all possible worlds. A pessimist fears that the optimist is correct’. The glass, though, is half empty.~
== ~CERNDJ~ IF ~InParty("Cernd") InMyArea("Cernd") !StateCheck("Cernd",CD_STATE_NOTVALID)~ THEN ~[CERND] I find that there are only optimists. A pessimist is an optimist who has been wounded by disappointment, and a realist is one who cannot trust themselves to feel either extreme. And the glass is half full.~
END
++ ~The glass is half full, Aran.~ + punchline
++ ~The glass is half empty, Aran.~ + punchline
++ ~The glass simply exists, Aran. Pick it up and use it, and stop bothering with how much is in it.~ + punchline
++ ~The glass simply exists, Aran. The fates will decide whether it is full or empty. We are simply required to drink.~ + punchline
++ ~Who cares, as long as there's enough to drink?~ + cheers

 

Now we need to go back. What if the player doesn't want to participate in this talk, for whatever reason? We need an exit in the first screen, at the very least:

 

APPEND ~C-ARANJ~

/* BG2 FriendTalk 10 c-aranfriendbg2 = 19 */
/* "Optimists, Pessimists, and Realists, Oh My...", or, the glass is half full, half empty, who cares - as long as it is a glass of good scotch!  */

IF ~Global("c-aranfriendbg2","GLOBAL",19)~ THEN c-aranfriendtenstart
 SAY ~[ARAN] We keep runnin’ around, battling’ various foes, an’ collectin’ artifacts, treasures, an’ knowledge. Cyric’s Dark Heart, do you think we are ever goin’ to slow down? Or ever just claim victory?~ DO ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~
 ++ ~I think that we shall prevail. After all, we have made it this far. Things should be getting better any day now.~ + optimist
 ++ ~I do not think we shall survive this. Fighting against so many foes, for so long, how can the outcome be anything but death and destruction?~ + optimist
 ++ ~Perhaps we shall win. Perhaps we shall lose. But really, we don’t have much of a choice in the matter – the fates decide our destiny.~ + optimist
 ++ ~Who cares, as long as there's enough to drink?~ + cheers
 <<EXIT_BLOCK>>
END

We copy in our preset template, from the other thread here...:

APPEND ~C-ARANJ~

/* BG2 FriendTalk 10 c-aranfriendbg2 = 19 */
/* "Optimists, Pessimists, and Realists, Oh My...", or, the glass is half full, half empty, who cares - as long as it is a glass of good scotch!  */

IF ~Global("c-aranfriendbg2","GLOBAL",19)~ THEN c-aranfriendtenstart
 SAY ~[ARAN] We keep runnin’ around, battling’ various foes, an’ collectin’ artifacts, treasures, an’ knowledge. Cyric’s Dark Heart, do you think we are ever goin’ to slow down? Or ever just claim victory?~ DO ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~
 ++ ~I think that we shall prevail. After all, we have made it this far. Things should be getting better any day now.~ + optimist
 ++ ~I do not think we shall survive this. Fighting against so many foes, for so long, how can the outcome be anything but death and destruction?~ + optimist
 ++ ~Perhaps we shall win. Perhaps we shall lose. But really, we don’t have much of a choice in the matter – the fates decide our destiny.~ + optimist
 ++ ~Who cares, as long as there's enough to drink?~ + cheers
 + ~RandNum(3,1)~ + ~ <<EXIT 1>> ~ + c-aranshutup1
 + ~RandNum(3,2)~ + ~ <<EXIT 2>> ~ + c-aranshutup2
 + ~RandNum(3,3)~ + ~ <<EXIT 3>> ~ + c-aranshutup3
END

 

And then fill it out with potential player responses:

IF ~Global("c-aranfriendbg2","GLOBAL",19)~ THEN c-aranfriendtenstart
 SAY ~[ARAN] We keep runnin’ around, battling’ various foes, an’ collectin’ artifacts, treasures, an’ knowledge. Cyric’s Dark Heart, do you think we are ever goin’ to slow down? Or ever just claim victory?~ DO ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~
 ++ ~I think that we shall prevail. After all, we have made it this far. Things should be getting better any day now.~ + optimist
 ++ ~I do not think we shall survive this. Fighting against so many foes, for so long, how can the outcome be anything but death and destruction?~ + optimist
 ++ ~Perhaps we shall win. Perhaps we shall lose. But really, we don’t have much of a choice in the matter – the fates decide our destiny.~ + optimist
 ++ ~Who cares, as long as there's enough to drink?~ + cheers
 + ~RandNum(3,1)~ + ~Now is not a good time to talk, Aran.~ + c-aranshutup1
 + ~RandNum(3,2)~ + ~Can we move along?~ + c-aranshutup2
 + ~RandNum(3,3)~ + ~Silence is golden. Pay yourself.~ + c-aranshutup3
END

 

And if we could, we would add some conditional dialog options, to allow for player class, race, gender, etc. The problem with doing that here is that there is a risk of Wall Of Text with too many player options. When we look at PIDs, they are fun for some folks, but they also can be way too much choice all at once - an opportunity to confuse or lose narrative. Anywhere between 2 and 5 looks to be the magic number for many mods; we have 4 already (remember that only one of the three "exit" lines, leading to states c-aranshutup1, c-aranshutup2, or c-aranshutup3, will show up). So we really don't have have space for one more, probably.

 

That is ok. There's lots more friendship talks to come, so we will get a chance to play with conditional dialog states/reply states another time.

Link to comment

For the record, the code fully realized, and cleaned up for clarity:

APPEND ~C_ARANJ~
/* BG2 FriendTalk 10 c-aranfriendbg2 = 19 */
/* "Optimists, Pessimists, and Realists, Oh My.", or, the glass is half full, half empty, who cares - as long as it is a glass of good scotch!  */
IF ~Global("c-aranfriendbg2","GLOBAL",19)~ THEN c-aranfriendtenstart
 SAY ~[ARAN] We keep runnin’ around, battling’ various foes, an’ collectin’ artifacts, treasures, an’ knowledge. Cyric’s Dark Heart, do you think we are ever goin’ to slow down? Or ever just claim victory?~
 ++ ~I think that we shall prevail. After all, we have made it this far. Things should be getting better any day now.~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ + tenoptimist
 ++ ~I do not think we shall survive this. Fighting against so many foes, for so long, how can the outcome be anything but death and destruction?~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ + tenpessimist
 ++ ~Perhaps we shall win. Perhaps we shall lose. But really, we don’t have much of a choice in the matter – the fates decide our destiny.~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ + tenfatalist
 ++ ~We are here. We have not lost yet. Speculating on the future just wastes our time and energy.~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ + tenrealist
 ++ ~That depends. Are you worried that you're running out of oaths?~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20)~ + tenrealist
 + ~RandNum(3,1)~ + ~Now is not a good time to talk, Aran.~ + c-aranshutup1
 + ~RandNum(3,2)~ + ~Can we move along?~ + c-aranshutup2
 + ~RandNum(3,3)~ + ~Silence is golden. Pay yourself.~ + c-aranshutup3
END

IF ~~ tenoptimist
 SAY ~[ARAN] That sounds right good. Solid, positive outlook there. Come, play a bit o’ words with me.~
 IF ~~ THEN GOTO optipessireal
END

IF ~~ tenpessimist
 SAY ~[ARAN] Aye, that’s my take, too. We’d best be careful, or we all will end up facin’ Kelemvor right quick. That is right depressin’, that is. Hey, let’s lighten the mood a bit. Play a bit o’ words with me.~
 IF ~~ THEN GOTO optipessireal
END

IF ~~ tenfatalist
 SAY ~[ARAN] Now, then, I don’t rightly agree. The fates, they can be moved, or Tymorra’s coin is naught but wind. Come, now. Play a bit o’ words with me.~
 IF ~~ THEN GOTO optipessireal
END

IF ~~ tenrealist
 SAY ~[ARAN] Aye, true enough. No fun in not speculatin’, though, just to pass th’ time. Come, now. Play a bit o’ words with me.~
 IF ~~ THEN GOTO optipessireal
END

IF ~~ tenpunchline
 SAY ~[ARAN] Well, you be entitled to your opinion, o’course. But if you ask me, the real question is what kind o’ alcohol is in th’ glass?~
 IF ~~ THEN EXIT
END

IF ~~ tencheers
 SAY ~[ARAN] Aye, ye'r a <PRO_MANWOMAN> after me own heart, and no mistake. Cheers.~
 IF ~~ THEN EXIT
END

END // of APPEND

/* END OF APPENDS. NOW CHAINS. */

/* NOTE TO SELF: c-aranshutup{1...30} inclusive already added to C-ARANJ at the top of this file */

CHAIN ~C-ARANJ~ optipessireal
~[ARAN] Do you see the glass as half full or half empty? Be ye optimist, pessimist, or somethin’ else?~
== ~YOSHJ~ IF ~InParty("Yoshimo") InMyArea("Yoshimo") !StateCheck("Yoshimo",CD_STATE_NOTVALID)~ THEN ~[YOSHIMO]  Ah, the eternal question. The glass is half full, of course.~
== ~MINSCJ~ IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN ~[MINSC] I do not understand. You are holding no glass, Aran.~ 
== ~C-ARANJ~ IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN ~[ARAN] Aye, my large friend. It's a metaphor. Somethin' not real... hey.  I'll explain it later.~
== ~KORGANJ~ IF ~InParty("Korgan") InMyArea("Korgan") !StateCheck("Korgan",CD_STATE_NOTVALID)~ THEN ~[KORGAN] Stupid questions. Who cares if it is half full, or half empty, as long as it is mine.~
== ~JAHEIRAJ~ IF ~InParty("Jaheira") InMyArea("Jaheira") !StateCheck("Jaheira",CD_STATE_NOTVALID)~ THEN ~[JAHEIRA] I am certain that the glass is neither half full nor half empty. Someone simply did not complete the task of filling the glass, and needs to be reminded.~
== ~EDWINJ~ IF ~InParty("Edwin") InMyArea("Edwin") !StateCheck("Edwin",CD_STATE_NOTVALID)~ THEN ~[EDWIN] (Mind games from children. How droll.) The glass is half empty. The more pertinent question is whom to punish for it.~
== ~KELDORJ~ IF ~InParty("Keldorn") InMyArea("Keldorn") !StateCheck("Keldorn",CD_STATE_NOTVALID)~ THEN ~[KELDORN] I once heard a learned sage change this question, speaking of a third option. ‘The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails.’ I prefer to avoid the question by picking up the pitcher and filling the glass until it overflows.~
== ~VALYGARJ~ IF ~InParty("Valygar") InMyArea("Valygar") !StateCheck("Valygar",CD_STATE_NOTVALID)~ THEN ~[VALYGAR] I have heard a different interpretation. ‘An optimist believes that this is the best of all possible worlds. A pessimist fears that the optimist is correct’. The glass, though, is half empty.~
== ~CERNDJ~ IF ~InParty("Cernd") InMyArea("Cernd") !StateCheck("Cernd",CD_STATE_NOTVALID)~ THEN ~[CERND] I find that there are only optimists. A pessimist is an optimist who has been wounded by disappointment, and a realist is one who cannot trust themselves to feel either extreme. And the glass is half full.~
END
++ ~The glass is half full, Aran.~ EXTERN ~C-ARANJ~ tenpunchline
++ ~The glass is half empty, Aran.~ EXTERN ~C-ARANJ~ tenpunchline
++ ~The glass simply exists, Aran. Pick it up and use it, and stop bothering with how much is in it.~ EXTERN ~C-ARANJ~ tenpunchline
++ ~The glass simply exists, Aran. The fates will decide whether it is full or empty. We are simply required to drink.~ EXTERN ~C-ARANJ~ tenpunchline
++ ~Who cares, as long as there's enough to drink?~ EXTERN ~C-ARANJ~ tencheers
Link to comment

Keldorn's response in particular is hilarious :)

 

SAY ~[ARAN] Aye, that’s my take, too. We’d best be careful, or we all will end up facin’ Kelemvor right quick. That is right depressin’, that is. Hey, let’s lighten the mood a bit. Play a bit o’ words with me. ~
Link to comment

The recode into the working files:

 

/* BG2 FriendTalk 10 c-aranfriendbg2 = 19 */
/* "Optimists, Pessimists, and Realists, Oh My.", or, the glass is half full, half empty, who cares - as long as it is a glass of good scotch!  */
IF ~Global("c-aranfriendbg2","GLOBAL",19)~ THEN a388
 SAY ~[ARAN] We keep runnin' around, battling' various foes, an' collectin' artifacts, treasures, an' knowledge. Cyric's Dark Heart, do you think we are ever goin' to slow down? Or ever just claim victory?~
 ++ ~I think that we shall prevail. After all, we have made it this far. Things should be getting better any day now.~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20) RealSetGlobalTimer("c-aranfriendtimer","GLOBAL",ARAN_FTT)~ + a389
 ++ ~I do not think we shall survive this. Fighting against so many foes, for so long, how can the outcome be anything but death and destruction?~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20) RealSetGlobalTimer("c-aranfriendtimer","GLOBAL",ARAN_FTT)~ + a390
 ++ ~Perhaps we shall win. Perhaps we shall lose. But really, we don't have much of a choice in the matter àthe fates decide our destiny.~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20) RealSetGlobalTimer("c-aranfriendtimer","GLOBAL",ARAN_FTT)~ + a391
 ++ ~We are here. We have not lost yet. Speculating on the future just wastes our time and energy.~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20) RealSetGlobalTimer("c-aranfriendtimer","GLOBAL",ARAN_FTT)~ + a392
 ++ ~That depends. Are you worried that you're running out of oaths?~ + ~SetGlobal("c-aranfriendbg2","GLOBAL",20) RealSetGlobalTimer("c-aranfriendtimer","GLOBAL",ARAN_FTT)~ + a392
 + ~RandomNum(3,1)~ + ~Now is not a good time to talk, Aran.~ + c-aranshutup1
 + ~RandomNum(3,2)~ + ~Can we move along?~ + c-aranshutup2
 + ~RandomNum(3,3)~ + ~Silence is golden. Pay yourself.~ + c-aranshutup3
END

IF ~~ a389
 SAY ~[ARAN] That sounds right good. Solid, positive outlook there. Come, play a bit o' words with me.~
 IF ~~ THEN GOTO a393
END

IF ~~ a390
 SAY ~[ARAN] Aye, that's my take, too. We'd best be careful, or we all will end up facin' Kelemvor right quick. That is right depressin', that is. Hey, let's lighten the mood a bit. Play a bit o' words with me.~
 IF ~~ THEN GOTO a393
END

IF ~~ a391
 SAY ~[ARAN] Now, then, I don't rightly agree. The fates, they can be moved, or Tymorra's coin is naught but wind. Come, now. Play a bit o' words with me.~
 IF ~~ THEN GOTO a393
END

IF ~~ a392
 SAY ~[ARAN] Aye, true enough. No fun in not speculatin', though, just to pass th' time. Come, now. Play a bit o' words with me.~
 IF ~~ THEN GOTO a393
END

// a393 is a chain

IF ~~ a394
 SAY ~[ARAN] Aye, ye'r a <PRO_MANWOMAN> after me own heart, and no mistake. Cheers.~
 IF ~~ THEN EXIT
END

IF ~~ a395
 SAY ~[ARAN] Well, you be entitled to your opinion, o'course. But if you ask me, the real question is what kind o' alcohol is in th' glass?~
 IF ~~ THEN EXIT
END

/* FT 10 Chains */

CHAIN ~C-ARANJ~ a393
~[ARAN] Do you see the glass as half full or half empty? Be ye optimist, pessimist, or somethin' else?~
== ~YOSHJ~ IF ~InParty("Yoshimo") InMyArea("Yoshimo") !StateCheck("Yoshimo",CD_STATE_NOTVALID)~ THEN ~[YOSHIMO]  Ah, the eternal question. The glass is half full, of course.~
== ~MINSCJ~ IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN ~[MINSC] I do not understand. You are holding no glass, Aran.~
== ~C-ARANJ~ IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN ~[ARAN] Aye, my large friend. It's a metaphor. Somethin' not real... hey.  I'll explain it later.~
== ~KORGANJ~ IF ~InParty("Korgan") InMyArea("Korgan") !StateCheck("Korgan",CD_STATE_NOTVALID)~ THEN ~[KORGAN] Stupid questions. Who cares if it is half full, or half empty, as long as it is mine.~
== ~JAHEIRAJ~ IF ~InParty("Jaheira") InMyArea("Jaheira") !StateCheck("Jaheira",CD_STATE_NOTVALID)~ THEN ~[JAHEIRA] I am certain that the glass is neither half full nor half empty. Someone simply did not complete the task of filling the glass, and needs to be reminded.~
== ~EDWINJ~ IF ~InParty("Edwin") InMyArea("Edwin") !StateCheck("Edwin",CD_STATE_NOTVALID)~ THEN ~[EDWIN] (Mind games from children. How droll.) The glass is half empty. The more pertinent question is whom to punish for it.~
== ~KELDORJ~ IF ~InParty("Keldorn") InMyArea("Keldorn") !StateCheck("Keldorn",CD_STATE_NOTVALID)~ THEN ~[KELDORN] I once heard a learned sage change this question, speaking of a third option. Ãâ€The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails.' I prefer to avoid the question by picking up the pitcher and filling the glass until it overflows.~
== ~VALYGARJ~ IF ~InParty("Valygar") InMyArea("Valygar") !StateCheck("Valygar",CD_STATE_NOTVALID)~ THEN ~[VALYGAR] I have heard a different interpretation. Ãâ€An optimist believes that this is the best of all possible worlds. A pessimist fears that the optimist is correct'. The glass, though, is half empty.~
== ~CERNDJ~ IF ~InParty("Cernd") InMyArea("Cernd") !StateCheck("Cernd",CD_STATE_NOTVALID)~ THEN ~[CERND] I find that there are only optimists. A pessimist is an optimist who has been wounded by disappointment, and a realist is one who cannot trust themselves to feel either extreme. And the glass is half full.~
END
++ ~The glass is half full, Aran.~ EXTERN ~C-ARANJ~ a395
++ ~The glass is half empty, Aran.~ EXTERN ~C-ARANJ~ a395
++ ~The glass simply exists, Aran. Pick it up and use it, and stop bothering with how much is in it.~ EXTERN ~C-ARANJ~ a395
++ ~The glass simply exists, Aran. The fates will decide whether it is full or empty. We are simply required to drink.~ EXTERN ~C-ARANJ~ a395
++ ~Who cares, as long as there's enough to drink?~ EXTERN ~C-ARANJ~ a394

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...