Legacy GM Easy Branching Dialogue System

GM Version: GMS 1.4+
Target Plateform: Any
Dialogue v1.27 EXE+GMZ: (3.75mb)DialogueGMS_v1.275 (1345kb)DialogueSource
Required Extension: none
Required DLL: none
Manual(12 Pages): https://www.dropbox.com/s/uuww52f73ff7kr7/Manual.docx?dl=0
Example: (192kb): https://www.dropbox.com/s/q4sudhwyq2b1mr3/Example1_275.gmz?dl=0

Video:


I highly recommend skimming over the manual before trying anything!

This program, paired with the example, is supposed to make branching dialogue systems easy to make in Game Maker Studio. Most help that people have given on the forums is a “do it yourself” with a couple of links to things they thought might be useful. While there are some branching dialogue systems floating around there for Game Maker Studio, none of them were satisfactory for my tastes. It would be really hard for a novice to easily obtain/make a branching dialogue system. It would also take a considerable amount of time for anyone else, who wanted to easily make a branching dialogue system, to create one. This project can be both used by novices and advanced users.

The main bulk of the tutorial is located in the Manual! So please take if something does not make sense.
Looking over the tutorial example will also help you implement this dialogue system into your game!

If you run into a bug with the program, or just need help please do not hesitate to message me!
If you have any suggestions for future improvements or any complaints, direct them towards me



UPDATES
 
Last edited:
J

Jaqueta

Guest
I had a similar project back in the day when a friend of mine decided to do a Visual Novel game, never finished tho... xD

Anyway, the System is nice! Really well done, however the editor lacks on flow, I mean, it's way better than writing the code itself, but it's not very handy to change from different types of nodes, I think that this could be heavily improved with this:

To create the nodes, you click on the "+" button of an existent nod, and drag to the area of the following node, now there's two possibilities:
First, You release the mouse where there's nothing: this will open a window/wheel that will allow you to selected another type of node for creation, and this not will automatically be bound to the node that you created from,
Second, You release the mouse where there's an existent node: then it will bound these nods together.

You can also add a custom "+" button and put it on the GUI itself, so you can create nods without parenting them straight away.

Another improvement, would be that each Switch Case could have it's on "+" button, which automatically use a "==" checking, then you still would want to have a normal "out" button on the top in case the developer want to use other type of checking.

Anyway, my suggestion would result in something like the UE4 Blueprint Visual Scripting mode.

I just have one little question that I wasn't able to find the answer in the manual, what is this "Convo" thing?

Bug report (Editor): Pasting something that is not text on a textbox will make the editor crash. I was able to reproduce this with a Screenshot on the clipboard
 
The bug will be fixed in the next release

Those are some interesting suggestions. I will definitely implement some of them
I agree that the workflow could be much better
I haven't really used a tool like UE4 Blueprint before. I will look up videos and see what I can do

Thanks for your feedback!

Edit: Sorry. I was busy yesterday, and did not properly read your entire post
The convo thing is a bit experimental right now. Typically one would want more than just one dialogue tree when making a character. This system allows the user to switch trees depending on certain variables. Right now, there is an arbitrary Quest system that is just a simple array.
It is set up like this: quest[QuestID]=QuestStep
So, for instance, if you have not started quest[0], then you could assign a certain dialogue tree to the NPC that would allow you to start that quest
 
Last edited:
New Update! (1.21)
-Bug fixes
-Improved work flow (as suggested above)
By clicking anywhere in the work area, a pop-up display will appear.
Also, when dragging out from a Node, one can release their mouse button anywhere in the work area to get another pop-up display with all of the possible options. Once an option is picked, then the two nodes will be automatically connected
-Vastly improved the example

Downloads:
EXE (2.9mb) https://www.dropbox.com/s/mlkjayaowt8rzih/Dialogv1.21.exe?dl=0
Source (715kb) https://www.dropbox.com/s/udvkte294b5bugz/Dialogv1_21.gmz?dl=0
Example (182kb) https://www.dropbox.com/s/ht8j4vo0ssi25uy/Example1_21.gmz?dl=0
Here is the save file used for the example: https://www.dropbox.com/s/ftzi10fcy2voq7e/save0.ini?dl=0
 
Last edited:
J

Jaqueta

Guest
Wow, that's a lot of improvements, now the editor works like a charm! =D
Nice work NWS! I'm definitely using this on my Game, as long as the license allows me ofc. xD

Hey, I'm trying to create an dialogue with more than one NPC, let's say that Me, Bob and Fred where having a conversation. Is there an easy way to achiev this currently? Or changes on the engine are necessary?
At least from what I understand, every text node will be from the character that I chose to put the dialogue in.

Anyway, once this project gets into a stable version, I think that I'll create some UI/Layouts and share them as long it's ok with you.

GL with your project, hoping to see more updates ;D

PS: The link for the example on the post above is wrong =P
 
Wow, that's a lot of improvements, now the editor works like a charm! =D
Nice work NWS! I'm definitely using this on my Game, as long as the license allows me ofc. xD

Hey, I'm trying to create an dialogue with more than one NPC, let's say that Me, Bob and Fred where having a conversation. Is there an easy way to achiev this currently? Or changes on the engine are necessary?
At least from what I understand, every text node will be from the character that I chose to put the dialogue in.

Anyway, once this project gets into a stable version, I think that I'll create some UI/Layouts and share them as long it's ok with you.

GL with your project, hoping to see more updates ;D

PS: The link for the example on the post above is wrong =P
Thank You!

You are allowed to use it (anyone is). That is partly why I included the source code and example!
The system is currently designed for a 1 NPC conversation, but it wouldn't be hard to implament multiple NPCs into a conversation (although the text would just be stored in 1 NPC). All you would have to do is insert a script node that changes the name and sprite of the NPC.
I might extend the example to also include multi-NPC conversations, along with a video tutorial on how to implament the system into any game.

Also, I would love to see some new UI/Layouts for this project! I am interested in seeing what people do with it!
thank you for pointing out the broken example link. That should be fixed now
 
Last edited:
Finally! The video tutorial is done! Hopefully it will shed some light on some features of this project and get people to start picking it up!



Sorry for not having a microphone. I used a text to speech thing instead DX
 
Last edited:
S

Stillsilver

Guest
This is awesome. I'm hoping to try messing around with it today. I was able to get it working with no troubles though! I'm starting on a seriously conversation heavy game and quickly realized that hardcoding conversations was going to be way too slow and hard to manage. Before I discovered this my plan was to try and make something similar but it never would have been as good as this! Thank you sir!
 
That is really cool.
Thanks man!

This is awesome. I'm hoping to try messing around with it today. I was able to get it working with no troubles though! I'm starting on a seriously conversation heavy game and quickly realized that hardcoding conversations was going to be way too slow and hard to manage. Before I discovered this my plan was to try and make something similar but it never would have been as good as this! Thank you sir!
Thanks!
If you have any troubles with this, please feel free to ask!
I am also open to any suggestions, and will try to implement them as quickly as possible!
 
S

Salvakiya

Guest
this is actually very intuitive. I would love to see this go further. would be neat if you could have cutscene like triggers inside this as well.
 
this is actually very intuitive. I would love to see this go further. would be neat if you could have cutscene like triggers inside this as well.
Thanks!
You could technically pull off the cutscenes with the built in script node. You would just have to make a script inside your game that would trigger it and then call it within the script node.
How might one build it into the application? Would it be a new node, or another built in script?
 
E

Eisot

Guest
This tool may be just what I need for my current project. When reading the provided manual I come across this line:
What is the point of all of this if you don’t know how to put it into your game!
I am wondering the same. ;) Do you have instructions for it?
 
This tool may be just what I need for my current project. When reading the provided manual I come across this line:

I am wondering the same. ;) Do you have instructions for it?
Oh. I forgot to complete that part of the manual
The video should run you through how to set it up
 
E

Eisot

Guest
Oh. I forgot to complete that part of the manual
The video should run you through how to set it up
Ok. Thanks.
I had a bit of an issue with the background music in the video disturbing the digi voice. Will try again. :)

----- edit -----
No, my brain can't handle the video audio unfortunately. It's ok though, will look it through without audio and if that does not solve it I'll find another solution.

----- edit again -----
Good news, it seems it was my cheap headphones making the bg music overpower the voice. Much better now. :)
 
Last edited by a moderator:
E

Ecko

Guest
Hey, this is quite a wonderful thing. I've been wanting to make similar little apps/tools but always struggle, however. I would try to make these things outside of GM. Is there any way that you could make a tutorial on how to make this node based system, either written or video. It would be great to be taught how this was made and it would help me and I am sure many others, break it apart, learn from it and make other tools like it!
 
Hey, this is quite a wonderful thing. I've been wanting to make similar little apps/tools but always struggle, however. I would try to make these things outside of GM. Is there any way that you could make a tutorial on how to make this node based system, either written or video. It would be great to be taught how this was made and it would help me and I am sure many others, break it apart, learn from it and make other tools like it!
Thank you for showing interest in this project!
First of all, the source to the project can be found here: https://www.dropbox.com/s/6s9poe3hm3ve2ul/Dialogv1_21.gmz?dl=0
You can take it and do whatever you want with it. Although, it isn't commented all too well, so finding your way around might be tricky.

The interface was pretty straight forward with making. Just a simple text box and drag and drop things


The saving is where is becomes a slight headache. Maybe it was because I developed this system (without the interface-- so just by editing the .txt files manually) before making the interface.
The tl:dr is that the program saves the Nodes recursively, marking the ones that were saved and going to all the out branching nodes. If it comes across a Node that has already been saved, it adds a special code tag at the end of the text that the Node would export. This may sound easy is practice, and it did work for a bit, but once you add in the twist of branching dialogue it gets a whole lot harder.

If you create a simple dialogue tree, export it and then open the .txt file it creates, you can probably see a nice pattern that it follows
The game loads in the dialogue as a 2D array, so it is saved like a 2D array. A simple text dialogue will look like this in the .txt file:
text[on0,on1]=string
text[on0+1,on1]=next_string
text[on0+2,on1]=next_string_2
.... and so on

When you want an option in your dialogue, it adds a special tag in the "string" section. So it would look like this:
text[2,0]=(OPTION): What do you want?
Then it creates 2 more lines in the text file that let the system know where to go
op0[2,0]=Shop:Nothing:
op1[2,0]=0,4|showShop|quest(0,1)|:0,2|:
text[0,2]=You clicked option 2!
text[0,4]=You clicked option 1!

You can see how op0[on0,on1] stores the text for the two options that the player can click on
op1[on0,on1] however is more cryptic. Each option is separated by colons( : ). Scripts can be attached to each option after the | .
So you can see, I have a custom script called "showShop" and "quest(questID,step)". By clicking on the first option, "Shop", it will trigger the two scripts, and jump to 0,4.

When it loads in the dialogue, from the .txt file, it will load it into a 2D array. The two pointers will start at 0,0. Whenever you click the next button (on a non-branching dialogue option), it will add 1 to the first coord. (so 1,0... 2,0... 3,0)
If there is no text after in the 2D array, then it will close the dialogue, and jump back to the previous text
The only time that the second coord gets used is when there is branching dialogue (as you can see in the example)



And always, if you have any suggestions, or need any clarifications on the wall of text that is above, Please ask!
 
E

Ecko

Guest
Thank you for showing interest in this project!

The interface was pretty straight forward with making. Just a simple text box and drag and drop things

The saving is where is becomes a slight headache. Maybe it was because I developed this system (without the interface-- so just by editing the .txt files manually) before making the interface.
The tl:dr is that the program saves the Nodes recursively, marking the ones that were saved and going to all the out branching nodes. If it comes across a Node that has already been saved, it adds a special code tag at the end of the text that the Node would export. This may sound easy is practice, and it did work for a bit, but once you add in the twist of branching dialogue it gets a whole lot harder.

If you create a simple dialogue tree, export it and then open the .txt file it creates, you can probably see a nice pattern that it follows
The game loads in the dialogue as a 2D array, so it is saved like a 2D array. A simple text dialogue will look like this in the .txt file:
text[on0,on1]=string
text[on0+1,on1]=next_string
text[on0+2,on1]=next_string_2
.... and so on

When you want an option in your dialogue, it adds a special tag in the "string" section. So it would look like this:
text[2,0]=(OPTION): What do you want?
Then it creates 2 more lines in the text file that let the system know where to go
op0[2,0]=Shop:Nothing:
op1[2,0]=0,4|showShop|quest(0,1)|:0,2|:
text[0,2]=You clicked option 2!
text[0,4]=You clicked option 1!

You can see how op0[on0,on1] stores the text for the two options that the player can click on
op1[on0,on1] however is more cryptic. Each option is separated by colons( : ). Scripts can be attached to each option after the | .
So you can see, I have a custom script called "showShop" and "quest(questID,step)". By clicking on the first option, "Shop", it will trigger the two scripts, and jump to 0,4.

When it loads in the dialogue, from the .txt file, it will load it into a 2D array. The two pointers will start at 0,0. Whenever you click the next button (on a non-branching dialogue option), it will add 1 to the first coord. (so 1,0... 2,0... 3,0)
If there is no text after in the 2D array, then it will close the dialogue, and jump back to the previous text
The only time that the second coord gets used is when there is branching dialogue (as you can see in the example)

And always, if you have any suggestions, or need any clarifications on the wall of text that is above, Please ask!
I actually wasn't expecting this kind of a response, I was half expecting something along the lines of "I just don't have the time" haha! This helps me understand a few things, I did actually download the source, run it and look through the code which is why I made a post asking if you could teach how you made it.

With the way that it works right now, how large can the dialogue trees get before there are issues of performance or loading times?

I would really like to hear how you went about the node system of connecting the nodes and accepting inputs ect, the information on how you save the files has helped a lot so far. I am hoping to spend a little more time with it and trying to fiddle around with your code some.

A suggestion... Make the menu show up right right click and not left click, when I was clicking about the place it would pop up with the menu all too often and more often than I was trying to access the little menu for making the nodes.

Maybe once I have looked through your source files some more I can message you and ask more direct questions for better understanding. I really appreciate the response and it was a great one! Please keep at it, this has potential.
 
I actually wasn't expecting this kind of a response, I was half expecting something along the lines of "I just don't have the time" haha! This helps me understand a few things, I did actually download the source, run it and look through the code which is why I made a post asking if you could teach how you made it.

With the way that it works right now, how large can the dialogue trees get before there are issues of performance or loading times?

I would really like to hear how you went about the node system of connecting the nodes and accepting inputs ect, the information on how you save the files has helped a lot so far. I am hoping to spend a little more time with it and trying to fiddle around with your code some.

A suggestion... Make the menu show up right right click and not left click, when I was clicking about the place it would pop up with the menu all too often and more often than I was trying to access the little menu for making the nodes.

Maybe once I have looked through your source files some more I can message you and ask more direct questions for better understanding. I really appreciate the response and it was a great one! Please keep at it, this has potential.
Game maker's text loading is pretty fast. Since it uses the "string_" functions to deconstruct and reconstruct the line into an array, it reads the whole line as a text, and then goes onto the next line
So far, in my project, I have around 200 lines of dialogue. It all loads in less than a millisecond. It also processes the branching part of the dialogue at run time, so it does not take up any more time loading
Although, if you are talking about loading times and performance issues with the editor, then it might have some problems. I tend to make my NPC's fairly light on text (<50 lines), so I am not entirely sure how the editor would handle thousands of lines

Connecting nodes is fairly straightforward. Each node has 15 inputs and 15 outputs (both are just arrays). When you connect two nodes together, they will search for an open spot and put in their ID's into the other's input/output array. Then, I have some very simple code that determines if the connections are valid or not (like having a text node connect to two other text nodes--https://i.gyazo.com/4ccfd604c32b56d580edb14494e6d7f1.png)
The main part of this code is found in the step event of objNode, under the scripted named, "Alpha"
Code:
///Alpha
alphaCheck=!alphaCheck
if alphaCheck=0{exit}


alpha=1

//check if connected to anything
if type!=0{
    if scr_nodeHasNoConnections(id){
        alpha=0.65
    }
}

//textBoxes
if type=0{
    var aa,ii;
    aa=-1
    ii=-1
    //check multiple connections
    for(i=0;i<15;i++){
        if in[i]!=-1 && instance_exists(in[i]){
            for(a=0;a<15;a++){
                if in[i].out[a]!=id && in[i].out[a]!=-1
                && instance_exists(in[i].out[a]){
                    if in[i].out[a].type=0{
                        aa=a
                    }
                }
            }
            for(a=0;a<15;a++){
                if in[i].out[a]=id{
                    ii=a
                }
            }
          
            if aa!=-1 && ii!=-1
            && aa<ii{
                alpha=0.65
            }
          
        }
    }
  
  
    //check if no connections
    checkFirstNode=true;
    with(objNode){
        if other.checkFirstNode=true{
            other.checkFirstNode=false
        }else{
            if scr_nodeHasNoConnections(id){
                alpha=0.65
            }
        }
    }
  
  
    //check for correct connections
    if alpha=1{
      
        //out=check?
        var fo=false;
        for(i=0;i<15;i++){
            if out[i]!=-1 && instance_exists(out[i])
            && out[i].type=0{
                fo=true
                break;
            }
        }
        if fo=false{
            for(i=0;i<15;i++){
                if out[i]!=-1 && instance_exists(out[i])
                && out[i].type=3{
                    alpha=0.65
                }
            }
        }
      
      
    }
  
  
  
}


//switches
if type=2{
  
    var fo=false;
    //check to see if thier outs are only checks
  
    for(i=0;i<15;i++){
        if out[i]!=-1 && instance_exists(out[i])
        && !(out[i].type=3){
            fo=true
            break
        }
    }
  
    //check to see if the checks add up
    var __count=0;
    for(i=0;i<15;i++){
        if out[i]!=-1 && instance_exists(out[i])
        && (out[i].type=3){
            __count++
        }
    }
    if switchCount!=__count{fo=true}
  
  
    if fo=true{
        alpha=0.65
    }
  
  
}


//checks
if type=3{
    //make sure the only ins are switches
    for(i=0;i<15;i++){
        if in[i]!=-1 && instance_exists(in[i])
        && in[i].type!=2{
            alpha=0.65
        }
    }
  
    //make sure that they only contain numbers
    if text!=string_digits(text){
        alpha=0.65
    }
  
    //make sure they are properly numbered
    var _in=-1;
    if alpha!=0.65{
        for(i=0;i<15;i++){
            if in[i]!=-1 && instance_exists(in[i])
            && in[i].type=2{
                _in=in[i];
                break;
            }
        }
        var tempList=ds_list_create()
      
        for(i=0;i<15;i++){
            if _in.out[i]!=-1 && instance_exists(_in.out[i])
            && _in.out[i].type=3{
                ds_list_add(tempList,string_digits(_in.out[i].text))
            }
        }
      
        for(i=0;i<_in.switchCount;i++){
            if ds_list_find_index(tempList,string(i+1))=-1{
                alpha=0.65
                _in.alpha=0.65
                break;
            }
        }
      
      
        ds_list_destroy(tempList);
    }
  
  
  
    //make sure they lead to something!
    var _f=false
    for(i=0;i<15;i++){
        if out[i]!=-1 && instance_exists(out[i]){
            _f=true
            if out[i].type=3{
                alpha=0.65
            }
        }
    }
    if _f=false{
        alpha=0.65
    }
}

edit:
I added your suggestion in the current build. It should be updated. Just re-download it
I am not entirely sure if this is what you were looking for, but if you have any other questions, don't hesitate the ask!
 
Last edited:
I

Ianuarius

Guest
This system looks excellent!

I've been wondering how to make a dialogue system with GM:S since a friend of mine mentioned that one could be very difficult to create with GameMaker. Now, if I ever happen to need one, I can test this one out. Really nice.

What's the license? I couldn't find it anywhere.
 
This system looks excellent!

I've been wondering how to make a dialogue system with GM:S since a friend of mine mentioned that one could be very difficult to create with GameMaker. Now, if I ever happen to need one, I can test this one out. Really nice.

What's the license? I couldn't find it anywhere.
I would probably put it under the creative commons
Do whatever you want with it. Just as long as you do not directly copy, and re-sell. You can, however, make changes and then sell it. I don't really care
 
K

KnightFury

Guest
A random question.
My npc character doesn't appear if it is outside of your original room.
What I did was took your whole project and copypasted into mine. Everything works fine if I use the same room, but if I put all the objects (parnpc, player and control) into mine, everything works but the npc. he just doesn't appear. what could it be?
 
A random question.
My npc character doesn't appear if it is outside of your original room.
What I did was took your whole project and copypasted into mine. Everything works fine if I use the same room, but if I put all the objects (parnpc, player and control) into mine, everything works but the npc. he just doesn't appear. what could it be?
Are you sure that the NPC is drawing and is a child to the parent NPC?
Also, check your console to see if it says, "Failed to load NPC" or "NPC creation failed"

If you want, you can also PM me your gmx and I can have a look at it
 
K

KnightFury

Guest
Are you sure that the NPC is drawing and is a child to the parent NPC?
Also, check your console to see if it says, "Failed to load NPC" or "NPC creation failed"
Lol yes, they weren't children to the parent NPC
thank you so much!
 
Last edited by a moderator:
K

KnightFury

Guest
Okay. this is strange.
When I turn off the typewriter (and by that I mean just altering str=string_copy(str,1,dialougeTextOn) because changing values in parNPC that should be affecting this don't bear any fruit), all the replies to the NPC's texts have to be clicked twice to continue. What could be wrong here?

Also, I've tried scripts, but they don't work somehow. I click on "add happiness" and continue, for instance, and the script that works perfectly fine (through script execute) doesn't work here

 
Last edited by a moderator:
Okay. this is strange.
When I turn off the typewriter (and by that I mean just altering str=string_copy(str,1,dialougeTextOn) because changing values in parNPC that should be affecting this don't bear any fruit), all the replies to the NPC's texts have to be clicked twice to continue. What could be wrong here?

Also, I've tried scripts, but they don't work somehow. I click on "add happiness" and continue, for instance, and the script that works perfectly fine (through script execute) doesn't work here

The script should execute after you press the continue button for the "k" textbox
Have you tried adding a simple, show_message("test") in the scr_add_happiness() script?

As for removing the typewriter effect, just add this code
Code:
dialougeTextOn=string_length(str)
near where I have the comment: //typewriter effect



edit: Oh I see why it is not working.
"Check: 1" needs to be connected to something other than just a script node. You could either have it loop back to the beginning, or to another text node
 
Last edited:
K

KnightFury

Guest
The script should execute after you press the continue button for the "k" textbox
Have you tried adding a simple, show_message("test") in the scr_add_happiness() script?
Yes, I know it should be after "k", and yes that's exactly what my code is - a simple show_message

As for removing the typewriter effect, just add this code
Code:
dialougeTextOn=string_length(str)
near where I have the comment: //typewriter effect
That worked, thanks

"Check: 1" needs to be connected to something other than just a script node. You could either have it loop back to the beginning, or to another text node
I've already tried that. I went as far as recreated the screenshot from your manual

Still, it doesn't work. Plus, it doesn't bring me back to "switch: 0" as "showChat" should (neither in game nor in your program)
 
Yes, I know it should be after "k", and yes that's exactly what my code is - a simple show_message


That worked, thanks


I've already tried that. I went as far as recreated the screenshot from your manual

Still, it doesn't work. Plus, it doesn't bring me back to "switch: 0" as "showChat" should (neither in game nor in your program)
Have you tried testing it within the editor? File -> Test (ctrl+T)
I recreated it on my end, and everything seems to be working. Did you export it correctly? Also, check GM's datafiles folder to make sure it did not mess it up
 
K

KnightFury

Guest
Have you tried testing it within the editor? File -> Test (ctrl+T)
I recreated it on my end, and everything seems to be working. Did you export it correctly? Also, check GM's datafiles folder to make sure it did not mess it up
Yes, I have. As I said, it just ends the test without teleporting me back to switch: 0
What do you mean by "correctly"? I exported it through "File > export"
Yes, everything seems fine in the folder.
Here's the code it gives me:
Code:
[text]
text[0,0]=Hi
text[1,0]=(OPTION): What would you like to do?
op0[1,0]=Add happiness:Add workers:
op1[1,0]=0,1|:0,2|:
text[0,1]=k|scr_add_happiness()|showChat|line(1,0)|
text[0,2]=k|scr_add_workers()|showChat|line(1,0)|
[config]
 
Yes, I have. As I said, it just ends the test without teleporting me back to switch: 0
What do you mean by "correctly"? I exported it through "File > export"
Yes, everything seems fine in the folder.
Here's the code it gives me:
Code:
[text]
text[0,0]=Hi
text[1,0]=(OPTION): What would you like to do?
op0[1,0]=Add happiness:Add workers:
op1[1,0]=0,1|:0,2|:
text[0,1]=k|scr_add_happiness()|showChat|line(1,0)|
text[0,2]=k|scr_add_workers()|showChat|line(1,0)|
[config]
The editor stops the test because of the showChat scripts. You can temporarily remove them and then test.
It did export correctly, because you can see that it appended "line(1,0)" onto the end of your two text nodes

Sometimes, when adding included files into GM, renaming them, and moving them around, GM will sometimes not update the actual file. So, if you go into your datafiles folder, found in your project folder, you should see the same/similar layout to what you see in GM under the Included Files tab. If it is not the same, then GM messed up

I recreated your thing, and tested it with the example, and it seems to be working fine. Here it is: https://www.dropbox.com/s/yp7hts5er8s6fbd/HappyWorker.gmz?dl=0
 
K

KnightFury

Guest
DJSAUODSAIDJUIJASDIUASUDUIA
khm.
I don't know what it was, but it all worked when I copypasted all the scripts from your project to mine.
Upf, thanks so much.
 
K

KnightFury

Guest
Lol. It only worked with show_message. I asked it to add 3 to a variable. (scr_add_happiness(3) )
Here's what it gave me
Code:
 at gml_Script_scr_add_happiness (line 4) - global.food += argument0;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_scr_add_happiness (line 4)
called from - gml_Script_scr_npcDialogCommands (line 142) -                 script_execute(scr,arg[0],arg[1],arg[2],arg[3],arg[4])
called from - gml_Script_scrNPCDialogContinue (line 6) -     scr_npcDialogCommands(string_copy(line[on0,on1],string_pos("|",line[on0,on1]),9999))
called from - gml_Object_parNPC_DrawGUI_1 (line 102) -                     scrNPCDialogContinue()
 
Lol. It only worked with show_message. I asked it to add 3 to a variable. (scr_add_happiness(3) )
Here's what it gave me
Code:
 at gml_Script_scr_add_happiness (line 4) - global.food += argument0;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_scr_add_happiness (line 4)
called from - gml_Script_scr_npcDialogCommands (line 142) -                 script_execute(scr,arg[0],arg[1],arg[2],arg[3],arg[4])
called from - gml_Script_scrNPCDialogContinue (line 6) -     scr_npcDialogCommands(string_copy(line[on0,on1],string_pos("|",line[on0,on1]),9999))
called from - gml_Object_parNPC_DrawGUI_1 (line 102) -                     scrNPCDialogContinue()
I don't think that is the whole error message
But, I can say is that all of the arguments as passed in by strings. So you have to do:
Code:
global.food += real(argument0)
 
Y

yakmoon

Guest
now thats something impressive, I hope those fools who developed gamemaker studio come to their sense and learn a thing or two from you.
 
V

vinceprinceking

Guest
Canceling while changing the resolution (on the display width) caused a bank window with no menu or reaction when clicking the screen whatsoever.
Just a blank grey screen. Deleting and re-downloading the .exe or changing its name does not help.
 
Canceling while changing the resolution (on the display width) caused a bank window with no menu or reaction when clicking the screen whatsoever.
Just a blank grey screen. Deleting and re-downloading the .exe or changing its name does not help.
That might be a bug!
For a temporary solution, goto your %localappdata% and find the Dialogue folder. Then delete the settings.INI

I will look into this in the morning, and hopefully have a fix for it soon
Thanks!
 
Z

zircher

Guest
Can we get an updated link for the example? The current one is not valid anymore.
 
V

vinceprinceking

Guest
That might be a bug!
For a temporary solution, goto your %localappdata% and find the Dialogue folder. Then delete the settings.INI

I will look into this in the morning, and hopefully have a fix for it soon
Thanks!
Thanks that helped. here the settings in my ini:
Code:
[settings]
fullscreen="1.000000"
resh="0.000000"
resw="0.000000"
Guess the 0s are the bad guys here.
 
K

KnightFury

Guest
Lol when I try to make a convo out of my main dialogue is goes out of memory again. fml
 
H

hoyakim

Guest
Hi, I am using your script really useful. I want to show other variables in the dialog. If you take your example as an example, npc Bob says. There are 3 objects left to destroy. 2left. 1left. or When Bob's name variable is changed to another, 'My name is a 'XXX.' in textbox.
Do not these functions exist?
 
Hi, I am using your script really useful. I want to show other variables in the dialog. If you take your example as an example, npc Bob says. There are 3 objects left to destroy. 2left. 1left. or When Bob's name variable is changed to another, 'My name is a 'XXX.' in textbox.
Do not these functions exist?
There is currently no "easy" way of doing it through the editor-- although, with some code you could do it.
I would approach the problem by making a special string, let's say PLAYERNAME, and then use the string_replace_all(line[on0,on1],"PLAYERNAME",name_var) function to search for that and replace it with your variable
 
H

hoyakim

Guest
There is currently no "easy" way of doing it through the editor-- although, with some code you could do it.
I would approach the problem by making a special string, let's say PLAYERNAME, and then use the string_replace_all(line[on0,on1],"PLAYERNAME",name_var) function to search for that and replace it with your variable
It would be difficult to write all exceptions. It's not easy.....:(
Thank you for your fast reply.
 
T

theonewhoisodd

Guest
Very cool little system you have here. I've been stuck for a week trying to work out a branching dialogue system but this should make it so much simpler now. Also after watching the video I read the entire manual in that computerized voice...

Edit: Also would it be at all possible to write it so that the height of the text boxes can be manually changed?
 
Last edited by a moderator:
Edit: Also would it be at all possible to write it so that the height of the text boxes can be manually changed?
You could make a new variable, let's say global.text_box_height and then make a script that would change it
Although, you have to keep in mind that the system will pass arguments into the script as strings, so if your script is: scr_dialogChangeHeight(500)
then you should do something like this: global.text_box_height=real(argument[0])
Then in the parNPC, you should be able to find a convenient var named hh. By default it is 150, but you could set it to the global.text_box_height variable
 
T

theonewhoisodd

Guest
Sorry I should have made that a little more clear. What I meant was making it so you could change the height of the boxes in the editor. Though looking at it again I completely missed that you can already do that.
 
J

jigglibuff

Guest
How do I fix the "Failed to load NPC" error?
It works perfect with your example project, but when I import everything into my game I receive that error.
 
Last edited by a moderator:
How do I fix the "Failed to load NPC" error?
It works perfect with your example project, but when I import everything into my game I receive that error.
Go into your datafiles folder located in the same directory of your gmx. Make sure that looks the same as what is displayed in GM
 
J

jigglibuff

Guest
Go into your datafiles folder located in the same directory of your gmx. Make sure that looks the same as what is displayed in GM
Yeah, there's a "Dialog" folder inside of datafiles that contains 0.txt. Still getting the same error :(

I even loaded your example project in the same folder as my gmx, using the same resources, and your project still worked fine
 
Last edited by a moderator:
Top