Jump to content


Photo

Speech Dialog Extension


  • Please log in to reply
92 replies to this topic

#1 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 04 April 2007 - 10:57 PM

Description
This is the Dialog Extension, it will allow to load .dlg files in GM. These files are used in RPG games like Arcanum. They are very universal, and can be made with ease with programs like Arcanum Dialog editor. Here is another link for the download.
New in version 1.1:
-dlg_draw()
-Ability to set gender specific lines.
-Some bug fixes.
New in version 1.11:
-Fixed one major bug.
-Created a new example, that better shows the possibility's.
New in version 1.2:
-Fixed (hopefully) a major bug, that cause a problem with not showing some answers
-Added possibility for intelligence check
-Added function for freeing the dialog (clears memory)
-Fixed some bugs and typos in the help file
New in version 1.3:
-Added changelog into the help file XD
-Made the dialog a lot more smooth (no more flashing when changing pages)
-Implementation into a project is a lot more easier (no more alarm0 or alarm1 events, also no dlg_refresh function)
-Proper dialog box height for both male and female text
-Added a function for drawing the text only (no background or outline)
-Arcanum Editors "Description" value now works and does not interfere with the extension (you can now set description for Pages and Answers in the editor)
New in version 1.4:
-Made the code less intrusive in the objects (so variables would not overlap).
-Added dlg_get_dialog_object, which returns ID of the instance currently in a dialog.
-dlg_load will now return -1 if no file was found. Previously it showed the ugly GM box.
-Now only one dialog box can be shown at a time. So if one is open, then another will not open.
New in version 1.5:
-Added keyboard controls for the dialog (dlg_menu_style function).
-Added the possibility to draw question text and answer text separately from one another.
-Fixed some small bugs (like draw function resetting to black) and made some draw functions faster.

Additional info
Any other information can be found in the help file accessible from the GM Extension window. Help file contains info on every function and license.
Screenshot
For some weird reason people want to see screenshot of this. Well, here it is:Posted Image
Download
Download v1.0
Download v1.1
Download v1.11
Download v1.2
Download v1.3
Download v1.4
:GM8_new: Download v1.5 :GM8_new:
Downloads include the extension file, example gm8 with .dlg file/files. Also the newer ones include an example on how to change the depth of the dialog window.

Here is the download for the Arcanum Dialog editor. As the first link was hosted at fileplanet.

UPDATED TUTORIAL!
TUTORIAL FOR VERSION 1.4
Well, I said that if enough people asks I will make it. And enough people has asked for it. So I made the tutorial (took 2.5h (time slipping by)). So here it is. It contains .doc with .gmk and .dlg which you will be making during the tutorial. This tutorial shows on how to use Dialog Editor to make the .dlg files and then how to use them in your game. I tried to be as clear as possible, but some places could be a little hard to understand (I don't know how to simplify it for you thou).

Also there is some additional information, that solves the depth problem. Check the last page of tutorial. It also contains information about custom backgrounds.

Tutorial for version v1.11 can be found here.

Maybe online version of this tutorial is coming.

Edited by HaRRiKiRi, 01 February 2011 - 06:14 PM.

  • 2

#2 Rusky

Rusky

    GMC Member

  • GMC Member
  • 2492 posts

Posted 05 April 2007 - 12:10 AM

this looks pretty good, but I can't get the editor because of stupid fileplanet (grr. never use that piece of crap please)
  • 0

#3 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 05 April 2007 - 10:59 AM

Thanks. Yeah, I don't use it either. Here is alternative link. I don't know if the host is better though.
Any more comments???

Edit: The program is pretty straight forward, as I learned it at about 15 minutes without any tutorial. But it can be very useful for GM games.

Edited by HaRRiKiRi, 05 April 2007 - 11:58 AM.

  • 0

#4 mindbreaker

mindbreaker

    GMC Member

  • New Member
  • 457 posts

Posted 05 April 2007 - 12:14 PM

I love it :(
it's going to be very usefull :D

good job :lol:
  • 0

#5 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 05 April 2007 - 01:17 PM

Thank you very much.

Edit:Added version 1.11. I fixed one major bug, and added a new example that better shows the possibility's with this system.

Any more comments?

Edited by HaRRiKiRi, 05 April 2007 - 01:17 PM.

  • 0

#6 Novice_helper

Novice_helper

    GMC Member

  • New Member
  • 64 posts

Posted 08 April 2007 - 11:55 PM

nice i like it. this will be very helpful.
  • 0

#7 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 09 April 2007 - 08:55 AM

Thank you. There isn't much replys so this is more than appreciated.
  • 0

#8 Fragment

Fragment

    GMC Member

  • GMC Member
  • 252 posts
  • Version:GM:Studio

Posted 22 October 2007 - 03:10 PM

This makes no sense to me, i really want to use it tho... it owns. I can get the red_helmet_dialogue.dlg to work in my game but when I try to use my own firstnpc.dlg it just shows a blank box and nothing happens.
  • 0

#9 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 22 October 2007 - 04:05 PM

Can you please post the content of the file?

Thanks.
  • 0

#10 Fragment

Fragment

    GMC Member

  • GMC Member
  • 252 posts
  • Version:GM:Studio

Posted 22 October 2007 - 04:19 PM

// [LABEL] Test
// [DESCRIPTION] test
{1}{You are a noob.}{You are a noob.}{}{1}{}{}
{2}{You are a bigger noob.}{}{1}{}{}{}
{3}{I have been calling noobs since you were born man.}{}{1}{}{}{}
  • 0

#11 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 22 October 2007 - 04:36 PM

Sorry, but I have not added option for description. If you delete that line then it will work. When the file is loaded it checks // to find pages. And it starts at page 1. So now when you load this file, it loads 2 pages. But the second page is the only one with information, so when you run it, it will show empty text box. I could easily fix this, only if I could find the real source for this. :(
  • 0

#12 Fragment

Fragment

    GMC Member

  • GMC Member
  • 252 posts
  • Version:GM:Studio

Posted 22 October 2007 - 04:48 PM

yay, it works...
http://www.zendurl.c...creenshot02.JPG
Thanks for the help mate.
  • 0

#13 Dark Heart

Dark Heart

    GMC Member

  • New Member
  • 47 posts

Posted 28 October 2007 - 04:16 PM

A screenshot would make this look better, but I'll download it anyway
  • 0

#14 kake_fisk

kake_fisk

    GMC Member

  • GMC Member
  • 2392 posts
  • Version:GM7

Posted 05 November 2007 - 06:50 PM

cool, can you make a tutorial on how to use the dialouge editor?
  • 0

#15 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 05 November 2007 - 10:29 PM

Dark Heart: Screenshot? For a dialog? Well.. you wished for it. Post 1.

kake_fisk: Well, I said that if enough people asks I will make it. And you are not the first one... so I made the tutorial (took last 2.5h). So here it is. Its in .doc with .gmk and .dlg which you will be making during the tutorial. I could maybe change the .doc to some other format, but the only one better would be html, which would need a host to be used effectively.
  • 0

#16 Sithoid

Sithoid

    GMC Member

  • GMC Member
  • 121 posts

Posted 19 February 2008 - 02:56 AM

Hi HaRRiKiRi!
Thank you for this wonderful extension, it helps me very much with my RPG! But I'm having some weird bug. Maybe it is a bug of Dialog Editor, anyway I wish you could help me.

Sometimes my game doesn't see a dialog line which exits the dialog. More than that, when I forbid it exit the dialog, it still doesn't show on the screen. Additionally, the Dialog Editor doesn't see the file.

Here is my test dialog:

// [LABEL] Start
{1}{Hello, cap. Wat do you want?}{}{1}{}{}
{2}{Gimme a Quest.}{}{1}{mission<2}{21}{}
{3}{I wanna hire ya.}{}{1}{}{61}{}
{4}{As to the quest...}{}{1}{mission>=2}{41}{}
{5}{Bye.}{}{1}{}{}{}

// [LABEL] Quest
{21}{Actually, I have one. Blow up a reaver ship, and you'll get a new engine.}{Actually, I have one. Blow up a reaver ship, and you'll get a new engine.}{}{2}{}{}
{22}{Agreed.}{}{1}{}{}{mission=2}
{23}{No way.}{}{1}{}{}{mission=1}

// [LABEL] AnswerToQuest
{41}{What's with the quest?}{What's with the quest?}{}{3}{}{}
{42}{Completed. Give me that engine.}{}{1}{mission=3}{1}{mission=4}
{43}{Patience. I'm working on it.}{}{1}{mission=2}{1}{}
{44}{I don't want to die. No quest.}{}{1}{mission=2}{1}{mission=1}
{45}{Ah, right, it's done...}{}{1}{mission=4}{1}{}

// [LABEL] Hire
{61}{Let's discuss it.}{Let's discuss it.}{}{4}{}{}
{62}{Let's.}{}{1}{}{}{obj_crew.alarm[4]=1; obj_crew.volunteer[0,0]='John'}
{63}{I changed my mind.}{}{1}{}{1}{}

It didn't see the 'hire' option on the first page. And when I tried to edit the file directly from the Notepad, adding the "Ah, right, it's done..." line due to dug fixing, it ceased to see ALL dialog-exiting lines!

Also, could you write some kind of tutorial on writing the dialogs manually, telling what field is exactly responsible for what? It could be very helpful.
  • 0

#17 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 19 February 2008 - 01:39 PM

Sithoid: Well if it doesn't load in the Editor, then it probably won't load (or load buggy) in the example. I am looking at it right now, and I can't find the problem. If I do then I will tell you. When exactly started that not loading bug? After you added the:
{45}{Ah, right, it's done...}{}{1}{mission=4}{1}{} line?
And did you change anything else?

edit: I found the problem. It was on the second line. You
had this:
{1}{Hello, cap. Wat do you want?}{}{1}{}{}
But you need this:
{1}{Hello, cap. Wat do you want?}{Hello, cap. Wat do you want?}{}{1}{}{}
The second (repeating) text is for female PC. And its the difference between the NPC and PC dialog line, so the first line you had was in a form of an answer, where it needed to be a question, and so the editor didn't recognize it as a dlg file and didn't load it. So here is how it should look like:

// [LABEL] Start
{1}{Hello, cap. Wat do you want?}{Hello, cap. Wat do you want?}{}{1}{}{}
{2}{Gimme a Quest.}{}{1}{mission<2}{21}{}
{3}{I wanna hire ya.}{}{1}{}{61}{}
{4}{As to the quest...}{}{1}{mission>=2}{41}{}
{5}{Bye.}{}{1}{}{}{}

// [LABEL] Quest
{21}{Actually, I have one. Blow up a reaver ship, and you'll get a new engine.}{Actually, I have one. Blow up a reaver ship, and you'll get a new engine.}{}{2}{}{}
{22}{Agreed.}{}{1}{}{}{mission=2}
{23}{No way.}{}{1}{}{}{mission=1}

// [LABEL] AnswerToQuest
{41}{What's with the quest?}{What's with the quest?}{}{3}{}{}
{42}{Completed. Give me that engine.}{}{1}{mission=3}{1}{mission=4}
{43}{Patience. I'm working on it.}{}{1}{mission=2}{1}{}
{44}{I don't want to die. No quest.}{}{1}{mission=2}{1}{mission=1}
{45}{Ah, right, it's done...}{}{1}{mission=4}{1}{}

// [LABEL] Hire
{61}{Let's discuss it.}{Let's discuss it.}{}{4}{}{}
{62}{Let's.}{}{1}{}{}{obj_crew.alarm[4]=1; obj_crew.volunteer[0,0]='John'}
{63}{I changed my mind.}{}{1}{}{1}{}


edit2: I would not suggest manual edditing of the files, as things as these can happen. But if you really want then here is a little explanation. This for the answer:
{1}{2}{3}{4}{5}{6}{7}
1=Question/Answer ID;
2=Text for male PC;
3=Text for female PC (leave it empty if you want the same as male PC);
4=Intelligence needed to show (I haven't implemented it so there is no difference what you have here);
5=Variables needed to be true to show this answer;
6=Page (question) to jump to. If the dialog needs to end here, then leave empty;
7=Variables to set when selected;
An example (from your DLG):
{62}{Lets move.}{}{1}{}{}{obj_crew.alarm[4]=1; obj_crew.volunteer[0,0]='John'}
For the questions its like this:
{1}{2}{3}{4}{5}{6}{7}
1=Question/Answer ID;
2=Text for male PC (if the PC is male, then this is what NPC will say)
3=Text for female PC (if the PC is female, then his is what NPC will say)
4, 5, 6, 7= does nothing, as far as I know (thou 5 represents the questions number, but its not used in the extension, but If you want to load it in the editor, then I suggest putting the questions number here)
Example is this (from your DLG):
{1}{Hello, cap. Wat do you want?}{Hello, cap. Wat do you want?}{}{1}{}{}

Edited by HaRRiKiRi, 19 February 2008 - 02:03 PM.

  • 0

#18 Sithoid

Sithoid

    GMC Member

  • GMC Member
  • 121 posts

Posted 20 February 2008 - 02:06 AM

Thank you for the answer!

When exactly started that not loading bug? After you added the:
{45}{Ah, right, it's done...}{}{1}{mission=4}{1}{} line?

As far as I remember, it started right after I saved the file. And after I added this line, most of the exiting lines (in GM) ceased to show.

Well, at least now Dialog Editor sees it. The "Hello, captain" bug was probably my fault while translating the dialog for the forum. But still, the "I want to hire you" and "Bye" lines are invisible, even though I deleted them from the Editor and added as new lines.

Maybe I'll try to solve this by re-installing my Windows, lol
  • 0

#19 kake_fisk

kake_fisk

    GMC Member

  • GMC Member
  • 2392 posts
  • Version:GM7

Posted 20 February 2008 - 09:46 AM

thank for tutorial i need to try this, it looks cool :D
  • 0

#20 Sithoid

Sithoid

    GMC Member

  • GMC Member
  • 121 posts

Posted 04 March 2008 - 09:04 AM

Well, I'm still having that bug with the missing lines. And as Dialog Editor sees my new .dlg files correctly and I didn't edit them manually, I'm pretty sure that the problem is somewhere in the extension (the problem seems similar to the one Fragment had). Could you possibly help me? I can send you all my game files to check.

The point is that dialogs are a very major part of my game, so if I don't find where the problem is, I'll have to write my own system for them, and as I'm not much of a programmer, it would be a real waste of time :lol:
  • 0

#21 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 04 March 2008 - 12:58 PM

Well, I'm still having that bug with the missing lines. And as Dialog Editor sees my new .dlg files correctly and I didn't edit them manually, I'm pretty sure that the problem is somewhere in the extension (the problem seems similar to the one Fragment had). Could you possibly help me? I can send you all my game files to check.

Well I looked into it and found it to be a bug somewhere on the third page. If you remove the {45}{Ah, right, it's done...}{}{1}{mission=4}{1}{} line, then it works. Weird, anyway, I think it was a bug in the extension and I fixed it. Thou I am not certain of that. Could you test the new version? You will have to put additional parameters for the dlg_load and dlg_refreash (the intelligance one), for you 1 will do fine. Because you didn't change the intelligance variable. To see how the intelligance work, open the example and look at the "Give me a job" line. If you open the objects and change global.intelligance to less than 5, then line will change to "Job me have?" (like a retard ogre would say). This is how it was used in Arcanum, and I finaly found why it didn't work for me (thou this could of created MORE bugs, so just test and tell).
  • 0

#22 Sithoid

Sithoid

    GMC Member

  • GMC Member
  • 121 posts

Posted 05 March 2008 - 06:43 PM

Thank you! :unsure: Now my dialog works fine and properly interacts with the objects. And the "Ah, right, it's done..." line works too. I didn't test possibilities of the intelligence yet, just set it to 1 as you told. I'll report you about new bugs if they appear.
  • 0

#23 Sithoid

Sithoid

    GMC Member

  • GMC Member
  • 121 posts

Posted 19 March 2008 - 08:35 PM

Me again ) Is there any possible way I can insert variables into the dialog lines? For example, I want character to say {"Hello, "+string(player_name)}
  • 0

#24 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 19 March 2008 - 09:02 PM

Sithoid: Right now, the only way to do it would be loading the file, changing the needed stuff, and then saving the file. Then loading the new file with the extension. It wont be slow, but could be hard to make if you don't know file_text functions. I will probably make an update where are some new functions for this thou. But not right now.
  • 0

#25 LRG

LRG

    GMC Member

  • GMC Member
  • 687 posts

Posted 24 March 2008 - 11:41 PM

I fail to understand what this does... so basically what it does is take a string (or dialogue) from a (text) file and loads it in the game?

or is there something more to it?
  • 0

#26 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 26 March 2008 - 02:32 PM

Did you check out the example?? Its a dialog system which was used in Arcanum (best RPG in my opinion) and it allows interacting with NPC's with addition for quests and such.
  • 0

#27 LRG

LRG

    GMC Member

  • GMC Member
  • 687 posts

Posted 31 March 2008 - 03:02 AM

I want to use my own Dialog Box for the dialogues. Is there any way to just extract the string?
it seems that the only way have dialogues is to use dlg_draw...
  • 0

#28 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 31 March 2008 - 08:19 PM

LRG: Yes. Sadly its the only way. I maybe could update it and include the functions nessecary to get the strings, but I kind of think its waste of time... You can already modify this very much. And if you want, you can add things like textured backgrounds for the dialog box, using the given functions already. But I tend to update this and also include the functions Sithoid want. Its just that adding things to extensions is more time consuming.
  • 0

#29 Sithoid

Sithoid

    GMC Member

  • GMC Member
  • 121 posts

Posted 01 April 2008 - 12:22 AM

Well, I have some new bugs. And one of the old ones.

1) Not really an Extension bug, but it happens from the very beginning. Dialog Editor saves the file. When I try to open it, it says "the file does not exist", and this time I`m 100% sure that I didn`t edit that file manually. GM sees it. That happened to 2 of my 3 dialog files, and I see no pattern. For now, I just create the file basis and continue in Notepad... have any ideas?
2) When I write a multi-paragraph text as the NPC speech, GM doesn`t show it. It sees only answers. What`s wrong?
  • 0

#30 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 01 April 2008 - 01:59 PM

1)Can you show me the one that doesn't work?

2)What do you mean by multi paragraph? How does it look like in notepad? If you want new line maybe use # if just enter doesn't work. If you use # then it should work.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users