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.
.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.
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
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.
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
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.
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
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.
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
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.
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.