The Daily Click ::. Forums ::. Klik Coding Help ::. How do I make a conversation editor?
 

Post Reply  Post Oekaki 
 

Posted By Message

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
8th June, 2003 at 07:42:27 -

What I need is something that can edit conversations externally. You know, the game loads up a file whenever a character needs to talk to someone. This file is to contain the little conversation trees and stuff so I won't have to code every little bit of it within the game (which would easily require hundreds of events).

So, I'm hoping to do something where the characters can have a conversation like in the games like Baldur's Gate, Fallout, Neverwinter Nights, etc. You know, the person the player talks to says something and the player has a list of conversation options to choose from. Now, the problem I'm having is trying to put this in an editor-like format. Soo... any of you ever done this or have any ideas on how to do this?

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
8th June, 2003 at 14:13:29 -

.ini file? Sounds pretty complex, the only things I can think up of is using Question Boxes (not "editor format") or somehow using .ini files that have lines of text in them and code links to that line when somebody talks.

 
http://www.klik-me.com

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
8th June, 2003 at 18:25:56 -

You could use an ini or an array. Then have "links", in you code if you start talking to "John" then open link 1 in the array, which will have the data "Hello how can i help you" then use a loop to gather the other data in "John" which can state which other links to read. Then have a loop to add those to the list box. (List box would be the best for selections.) I might make an example, this sounds interesting.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
8th June, 2003 at 19:48:52 -

Ok Muz, I made an example.

http://www.angelfire.lycos.com/jazz/ajvitalize/RpgTxt.zip

(Save target as, i think)

At the moment the NPC can only give u back 1 answer. So eg.

You] Your Smelly/ How's it going?
You] Your Smelly.
NPC] And your ugly.

You] Your Smelly/ How's it going?
You] How's it going?.
NPC] Good thankyou fine sir.

The NPC can only say 1 thing back, i can change that if its really important, though it might take some extra lines.

There is also a shop, where you can buy 4 things or take nothing. Everything is editable in the ini file.

This is how it works:

[John]
0=Car (What the player can choose)

Total = 1 (How many choices "Very important")

0T= You bought a car (The answer the NPC gives)

So if you wanted to add your own,

[John]
0=Car
1=Shoe

Total = 2

0T= You bought a car
1T= You bought a shoe.

If you have a number than an answer, like 0T that means it is the answer to the number. Eg. 1T is the answer to the question/statement 1.

-Andy





 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
9th June, 2003 at 02:53:42 -

Every1 else is able to look at this too, it's only a few lines of code long. The main feature of this program is allowing you to not have to program setting the text of a string to something for every person you talk to. It is all edited in the ini then you're free to go. There is no system of adding/subtracting items but anything else you need Muz, just ask.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
9th June, 2003 at 03:34:54 -

I wish someone would make a version of the INI file that was threadable. Eg: Groups within groups within groups within groups within... Like a file structure. This would be much more effective than just the typical one-level hierarchy idea, and it'd make stuff like this much more efficient.

Andy: Good system, I used one similar in a Text-Adventure-Maker i was working on a year ago. Worked a treat.

 
191 / 9999 * 7 + 191 * 7

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
9th June, 2003 at 03:54:04 -

Yea, i found that was a problem when i came to the answers. So i had to make the answers with a "T" after them to sepreate them. Which means if you want multiple answers you will have to have another letter/number. Like 2TA.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
9th June, 2003 at 04:12:53 -

Ah: I just re-read Andy's post and found a small scope problem: For each answer, you also need a paragraph number. This will take you to another paragraph in this whole potential conversation. So, instead of naming the group 'John', after the character speaking, you need to name it '0001.0001.0001'. Each segment between dots acts kinda like an option (eg: the first shows that it's conversation strain 1, the second shows that it is possibility 1 of strain 1, and the third shows that it is possibility 1 of possibility 1 of strain 1. You can make it as deep or shallow as you like.

As you can no doubt guess, this would then require the whole ini file to be named after character speaking, and by extension you would also need to refer to the level it uses, and all that just isn't feasible. My recommended solution? Ditch the ini file and make your own format.

I'm presuming that you want it in a structured form that the editor can just edit by hand if he so wishes, so it would be best in ASCII format rather than as a binary one. ASCII gives you a larger filesize, but is much more notepad friendly.

You could try something like this (the underscores mean tabulation, since DC won't show tab characters or whitespaces).

[Level 1]
_____[Luke]
__________[0001.0000.0000]
_______________Text=Excuse me, may I have a word?
_______________0-rep=Sure, dawg... but you only get one...
_______________1-rep=Okie Dokie!
_______________2-rep=No, sorry, I'm busy...
_______________3-rep=Luke...<coarse breathing>...I am your father...
_______________4-rep=Of course! Have you ever thought of letting Jesus into your life?
_______________0-strain=0001.0001.0000
_______________1-strain=0001.0001.0000
_______________2-strain=0001.0002.0000
_______________3-strain=0001.0003.0000
_______________4-strain=0001.0004.0000
_______________total=5
__________[0001.0001.0000]
_______________Text=Umm, right, Okay, I think you smell.
_______________0-rep=Right...Okay....odd...
_______________1-rep=So does your Mum, but I still fancy her!
_______________0-strain=END
_______________1-strain=END
_______________total=2
__________[0001.0002.0000]
_______________Text=Okay, off you go, have fun.
_______________0-rep=Thankyou.
_______________0-strain=END
_______________total=1
__________[0001.0003.0000]
_______________Text=NOOOOOOOO!!!!
_______________0-rep=<tearful joy>Lukey-boy!!!.
_______________0-strain=END
_______________total=1
__________[0001.0004.0000]
_______________Text=Actually, yes, I was pondering that just this morning.
_______________0-rep=Wow, really?
_______________0-strain=0001.0004.0001
_______________total=1
__________[0001.0004.0001]
_______________Text=No.
_______________0-rep=Ah.
_______________0-strain=0001.0004.0002
_______________total=1
__________[0001.0004.0002]
_______________Text=Sorry man.
_______________0-rep=That's, uhh... that's okay, y'know... yeah that's fine. We all, uhh... we all have our beliefs, y'know... our personal uhh... 'opinions' on things...
_______________0-strain=0001.0004.0003
_______________total=1
__________[0001.0004.0003]
_______________Text=You can, uhh... you can go now.
_______________0-rep=Right. Yes. The Lord's work is never done.
_______________0-strain=END
_______________total=1

That is just one strain of conversation for just one character in one level. Ain't probability a pain? Of course you could probably make an application to edit those conversations and order them much more efficiently, but that's the basic idea I would use. You can also use commands in strains, such as END, shown a fair bit in this example.

 
191 / 9999 * 7 + 191 * 7

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
9th June, 2003 at 04:32:02 -

Lol, i didn't really understand that. But are you saying thats how you seperate the conversation? Using '0001.0001.0001'
then say: hell.good.poop?

Or am i just crazy. I'm gonna try to work this one out. It's really tricky.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
10th June, 2003 at 02:16:35 -

Hmm... Dines idea isn't nearly as complex as it looks. It could really work. I also think you can get away with say... [1.3.0] instead of [0001.0003.0000] .

It's worse WITHOUT an editor. It's far more painful, especially with the minimum of 3 conditions per event and one event per line you would use in INI .

Oh well, maybe I'll try doing something with your ideas tonight.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image
   

Post Reply



 



Advertisement

Worth A Click