Friday, May 20, 2011

The Art of Conversation

I think I'm nearly there. I've been working on the last conversation file, although have to confess it did start to get complicated as I had to open my henchman convo too and make adjustments to take into account the player might ask the henchman for assistance before talking to the NPC, which required additional coding (*Sigh* - things always end up more complicated!) for things such as making sure the player can't ask the NPC to assist in a conversation that's either already taken place or is too far away to warrant asking. It's funny what you end up thinking about as you go... building the line where the player asks their henchman to assist in talking to a guy down the local tavern, and then thinking "Hang on a minute... I don't want that line being an option if they're walking through the crypts!".

I quite enjoy writing conversation files, but they are probably the most time consuming element of my building. The main reason being I don't want them to appear too linear. Notice I said "appear". You want to give the illusion of choice while ultimately steering to the same outcome. True, there are real choices to be made that can have different consequence, such as accepting or declining a mission, but for the player to have fun they need to feel they arrived at their destination through personal choice and not through what they perceive as limited options. For this reason many of my player responses might have more than 2 options, but you have to keep a grip on the situation in order to avoid your conversation branches resembling an upside down tree, which is both impractical and very difficult to keep track of.

Let's start with a basic example:

NPC: "Say, you look like you can handle yourself. I have a job if you're interested?"


  • PLAYER OPTION 1 - "Sorry, I have enough on my plate at the moment."


  • PLAYER OPTION 2 - "That depends. What does it entail?"


  • PLAYER OPTION 3 - "Of course I'm interested!"

Simply put, this could be described as a Yes/No/Maybe option. The response to the "Maybe" would involve the NPC describing what he wants done, but we could also connect the same response to the "Yes", since the player will still need to know what's required from them. Now you might think "What's the point of two options that lead to the same outcome?". It's all about immersion, allowing the player to play their character in the style they imagine themselves. You can enhance the immersion further down the line by acknowledging how they responded by setting a variable on the "Yes" option, for example... imagine the NPC has now described the job...


NPC OPTION 1: (Variable check - Player said "Yes") "So that's it. Shouldn't be too difficult for a man of your enthusiasm."



  • PLAYER OPTION 1 - "Consider it done!"


  • PLAYER OPTION 2 - "Hmmm... on second thoughts, I'm not so sure I want to do it."

NPC OPTION 2: (Don't need to check variable, since convo will jump to this line if the player didn't say "Yes") "So that's all there is to it. Are you interested?"


Notice how we can still link from NPC option 2 to the player responses of NPC option 1? Actually that's not strictly true. I'd certainly paste as link the "Consider it done!" option, but would create a seperate "No" option that didn't include the phrase "on second thoughts" since the player has not previously said "Yes", but you get the idea.


ADVANCED TECHNIQUES


There are a number of ways you can make a conversation have more depth, and I'll cover some of them here.


Skill checks are a great way of altering the flow of a conversation, but did you know you can incorparate more than the two simple Success/failure responses? Here's an example of what I mean:


PLAYER: - *PERSUADE* "You sure I can't tempt you? I could throw in 100 gold to make it worth your while?"



  • NPC PERSUADE SUCCESS: - "Oh all right then, you twisted my arm."


  • NPC PERSUADE FAIL (If success doesn't fire convo jumps to this line, so we could place a text appears when script here to check if player has more than 700 gold) - "Are you kidding me?! By the looks of how your purse is bulging you could make a far more tempting offer!"


  • NPC PERSUADE FAIL WHILE PC CASH <700 (No need to check since convo will jump here if above 2 checks fail): - "Thanks for the offer, but I'll have to decline, sorry."

Another interesting option is henchman interaction. If you place a line of convo that belongs to your henchman and the henchman isn't present, the convo will simply move to the next available option, so your convo branching could look something like this:


PLAYER OPTION: - "Okay okay... how about 200 then?"



  • NPC (Henchman): - "Hey! Some of that money is meant for me!"

  • NPC (Owner (Will automatically fire if above line owner not present): - "Okay, it's a deal."


Journal entries can also provide interesting conditions for convo lines to fire, but things can get a little tricky if you want your journal to reflect convo choices. What might at first strike you as a simple accept/success/completion journal set can quickly multiply with different variations, and that it turn can complicate conditional scripts, which leads me nicely to my next point...


When pasting links from elesewhere in a conversation, make sure the branch you are pasting from doesn't contradict where you are pasting too, or you could find conversations abrubtly ending when you least expect it, or suddenly saying something that doesn't make sense.


Another concept you can use is to have scripts check for items that the player is wearing and alter conversations accordingly. For example, the wearing of a holy symbol might influence an NPC, or even the lack of one should the player be talking to a priest.


All of the above techniques exist in one form or another in "The Relbonian Chronicles", leading to what I hope many will find a rich role play experience.


That's all for now. I'm hoping to post some screen caps next time round. I the meantime, happy gaming all. :)

1 comment:

Lance Botelle (Bard of Althéa) said...

Hi Geoff,

QUOTE: "It's funny what you end up thinking about as you go... building the line where the player asks their henchman to assist in talking to a guy down the local tavern, and then thinking "Hang on a minute... I don't want that line being an option if they're walking through the crypts!"

Oh boy! THIS is the nightmare I have been trying to stress I have had for a long while. And the reason we have it is due to the amount of "real" freedom and choice we have given the player. e.g. Like you, I have examples of game interaction where a player can approach a stage of the game from more than one direction. Add just two of these type of events and they begin to expand exponentially! I believe I had around 3 possible paths at the start of the game, which meant around a half dozen different possible paths to consider coding for. I quickly learned my lesson and tried to be a little more "linear" after that. NB: I still tried to give freedom, but made sure event one had nothing to do with event 2, etc. and tried to make NPCs specific to given events so that there was less overlap and chance of confusion ... like I feel now just talking about it.

Can't talk about it anymore, makes me feel ill. ;)

Anyway, interesting post - I know what you mean about convos.

Lance.