HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Creating a Conversation Tree

01-09-2004, 04:35 PM#1
Shadowfax
Howdy, I've got a conversation tree in the works so that your character (ideally for an RPG) can converse with NPC's like you would be able to in any other RPG.

The current way it's set up is through a list of triggers that activate when a word is typed corresponding to that trigger. i.e.

Player types - NAME
Response - My name is XXXX

Player types - JOB
Response - My job is XXXX

It would be up to the user to decide what the next word in the sequence would be. if the NPC said something in-depth about his or her job, you could probe further, i.e.

Player types - JOB
Response - I'm a sailor.

Player types - SAILOR
Response - You know, sailing the seven seas? Here's a quest:

UNFORTUNATELY, many wouldn't catch on to this and therefore wouldn't be a very useful means of conversation. So, I devised another route but it's bringing multiple headaches. Here's what it would look like.

******
NPC - Howdy, welcome to (name of town here)

Your Response:
1 - What is your name?
2 - What is your purpose here?
3 - What can you tell me about (name of town here)
4 - Goodbye.
******

Now, let's say you respond to Question #2:

******
NPC - I'm the local blacksmith. I make hella good swords.

Your Response:
1 - Tell me more about these swords
2 - What is your name?
3 - What can you tell me about (name of town here)
4 - Goodbye
******

This would work in theory, using a "Player - entered chat string" event, but I'd have to continually turn triggers on and off so you don't trigger the wrong response.

There's always the possibility of using an "integer to string" conversion. If you type "1" it could convert it to "name" and the event that triggers the "name" response would be set up to only accept "name" as an exact match, but I don't really know how I'd go about doing that other than putting in a separate trigger for each conversion.

Ideas?

-Bejoty
01-09-2004, 04:59 PM#2
KaTTaNa
Maybe using a dialog box?
01-09-2004, 05:02 PM#3
Shadowfax
Tried it.

It DOES work, but it slows down gameplay something horrible. The big obstruction of the dialog box just doesn't work well for what I'm going for.

The best solution seems to be the consting "turn trigger (on)" and "turn trigger (off)" thing. There's about 12 triggers for each conversation, but it works. I'll post a demonstration map shortly.

-Bejoty
01-09-2004, 05:26 PM#4
th15
i would suggest giving the NPC a series of ability buttons that players can press (using the shop "select hero" ability).

Then, when a button is pressed, all the abilities that pertain to the next part of the conversation is revealed and a text message with the reply is displayed. Quite simply, there is no easy way to do this. the best you could do is use a massive string array to store responses
01-09-2004, 06:07 PM#5
Magic
My suggestion: Keywords. Ever play Ultima 6 or the similar games? In a conversation you get unique words that are highlighted that you can talk about. The player would enter them instead. Would that work?
01-09-2004, 06:18 PM#6
Shadowfax
Quote:
Originally posted by Magic
My suggestion: Keywords. Ever play Ultima 6 or the similar games? In a conversation you get unique words that are highlighted that you can talk about. The player would enter them instead. Would that work?


Haha! That's exactly what I ended up doing. I kind of figured it out before I read your post, but if you want I'll send some credit your way. I've attatched with this message a sample conversation that you can have with a wandering Goblin merchant named "Gogale."

To find him, when the game loads, type in "goblin" and you'll be transported there. Click on him to initiate the conversation. Either typing "goodbye" or deselecting him will end the conversation at any time.

This is actually an alpha version of an RPG I'm working on, so it's fairly big. (over 2 megs) If you don't care to download it, I understand.

-Bejoty
01-09-2004, 06:43 PM#7
Magic
That's brilliant. :D

And give credit to Origin - they created it (Actually, fine, I'll take it ;)). I do remember many days playing The Savage Empire, frantically typing such words in to discover more from NPC's.

That really is brilliant. I've just finished KOTOR and was wanting to see if anyone could do a similar dialogue system for WC3. :)

If you need hosting or voice acting, pleasee drop me a PM sometime. 8))
01-09-2004, 08:02 PM#8
Scarlet-Russian
use a multiboard, with up/down to select response and all that... it actually would be really neat and easier that way.
01-09-2004, 08:29 PM#9
Shadowfax
Quote:
Originally posted by Magic
That really is brilliant. I've just finished KOTOR and was wanting to see if anyone could do a similar dialogue system for WC3. :)


Yeah, KOTOR is sweet.

The problem is that the system uses about 9 triggers. One for each response. I'm thinking I could somehow condense the response system into a string array, but I'm sort of stuck as to how without using a horrid list of If/Else statements.

-Bejoty