Dialogue System Template (Templates)

3 favourites
From the Asset Store
Fruit Slicer Template & Quality fruit and slice graphics (c3p,png,illustrator files)
  • This is starting to make more sense, but I am struggling with the big picture. Imagine that I'm a hobbyist game developer who hopes to use this dialogue system as part of an interactive novel. Can you help me understand how all of the pieces fit together? These are my questions:

    1) I realize that I should use the layout named UTILITY to create the game dialogues, and I have noticed that it is possible to export this information as a JSON file that is loaded into a dictionary or as a CSV file. Is there any reason that I should favor JSON over CSV or vice versa?

    2) How much of the branching logic can be handled with the fork elements of the dialogue system template, and how much of the branching logic should be stored in the CAPX itself? In the C3 dialogue template example image, there are three buttons used to fire individual bits of a dialogue. I'm assuming that the buttons are hardwired in this way to demonstrate *how* the system works. (Which is exactly what I asked for.) In a larger game, would you recommend that all subsequent calls to dialogue sequences be handled internally through use of the fork command?

    3) I'm trying to figure out the best way to articulate this question, so I apologize if it is confusing. Trying to wrap my hand around how the overall game loop will work when using this system. In the image titled C3DialogueTemplateExample.png, it seems that the dialogue is triggered after the layout loads, and then the user is being handled by the logic of the dialogue template. But what happens if the user reaches a point where they want to exit dialogue mode and do some other things before returning? For example, what if it were an RPG game and the user were to wander off and battle some slime molds before returning to town and entering into the dialogue mode. How does the dialogue system get reactivated? Would I need to load an entirely new dialogue dictionary? Or would I use variables stored in the Game Dictionary to keep track of the user's progress through the game, and just use that information to restart the dialogue template with the appropriate sequence?

    Thanks for your patience, and for the helpful resources. The image is very useful, as is the list of dialogue commands.

  • OK, here's a big question for you : what is your intent?

    • Have students create a game engine which can then be used to create an interactive novel? If so C2/C3 is a good basis for the work to create an engine and then create an interactive novel. There will be a bit of work involved, but very doable. They will need to learn game design, UI design, etc. and then do all the content.
    • Have students create an interactive novel, the focus being on the content of the novel? In that case I would just start with an interactive novel engine like https://www.renpy.org/ and have the students focus on script, art, content rather than engine development.
  • Hi The answer is "neither."

    I'm using Construct for the second time in a college class titled "mobile gaming." Although some of the students have experience with other programming languages, the course begins with the assumption that people don't have any formal training in computer programming. We start out by creating animations with Adobe Animate, we transition into fundamental programming concepts with Code Combat, and then we spend the rest of the semester creating games with Construct. Along the way, students read scholarly and applied articles about game design. We talk about user interface design, tutorial levels, game design documentation, game narrative, the importance of choice in games, the role of randomness in games, and -- of course -- graphic/visual design.

    These students have already used Construct to create their own platform games, and they are currently working on individual final projects. Some students are creating their own riffs on familiar game templates (e.g. tower defense games or top-down shooters), and two students are interested in creating games that involve a dialogue component. I think both of these students are inspired by Japanese otome and visual novels. In an ideal world, I might point the two students toward a different platform for authoring interactive fiction, but -- considering the time constraints and the nature of the assignment -- for now we are using Construct.

    Since these are small projects of modest scope, it is certainly possible for students to brute force the dialogue trees. I had hoped that this could be an opportunity to teach them more about arrays, dictionaries, and ways of storing/retrieving data from an external file, but -- considering that they are now in the throes of finals week -- a brute force solution might be the most sensible option.

    I don't want students to create a game engine for handling narrative content, and was hoping that the dialogue system would be a friendly, well-documented template that they could easily pick up and run with. Don't get me wrong: the dialogue system is awesome and worth every penny. It's just that the system might not be an ideal educational tool for beginners. In order to explain how the system works to the students, I need to fully grasp the big picture of how the various parts interact, and those big picture interactions are still fuzzy to me.

    I can't send you a private message yet, but -- if you message me -- I might be able to attach a copy of the course syllabus in my reply message. You can see examples of the students reflecting on their platform games at: gamesclass2017.wordpress.com

    Thanks!

  • OK, I'm with you, I see where you are going with this. I think this is all doable with the Dialogue system and not too tough. See my sheet for how to get going. Magistross gave all the details on setting things up. To create the json, you can use the utility, or do it by hand with csv (or if you really want, I can send you the Parser I wrote that takes in text files and spits out JSON, see details earlier in the thread, but I don't' have time to do tech support for it.)

    Use the dialogue trees you create in the utility to have choice and forks in the dialogue and then set Gamestate variables if a choice will make other conversations change (e.g. which dialogue is started when you talk to the king after you have insulted the queen, triggered by an event where you click on the queen) These Gamestate variables can be created and set through dialogue commands, see the cheat sheet for how to do it.

    If it's just a short game put all the different dialogues into one JSON file, so you only need to load it once per layout.

    I really enjoyed reading the writeups from the students, espeically the 'reflections', well done!

  • I'm glad you enjoyed reading the class blog postings, Mikal! Thank you also for answering my questions. I'm diving back into this now and will resurface if I have any additional questions. Thanks again!

  • Mikal First off THANK YOU SO MUCH FOR THIS ASSET!! You saved the story mode in my game. I've already extended the code by adding about 8 different commands. Very cleanly written and I love that it doesn't need any 3rd party plugins.

    Quick question. By default each character is show after DIALOGUE_DEFAULTDELAY time. How difficult would it be to get each word to appear instead of a character. I assume I'd need to modify the "Dialogue_NextChar" function to look for spaces as a delimiter, but I wasn't sure how much trouble it would be to get working. It's a "nice to have" feature so if it's too much to change, no worries.

    Thanks again!

  • Mikal First off THANK YOU SO MUCH FOR THIS ASSET!! You saved the story mode in my game. I've already extended the code by adding about 8 different commands. Very cleanly written and I love that it doesn't need any 3rd party plugins.

    Quick question. By default each character is show after DIALOGUE_DEFAULTDELAY time. How difficult would it be to get each word to appear instead of a character. I assume I'd need to modify the "Dialogue_NextChar" function to look for spaces as a delimiter, but I wasn't sure how much trouble it would be to get working. It's a "nice to have" feature so if it's too much to change, no worries.

    Thanks again!

    FYI, I'm not the creator, I'm a happy user like yourself.

    Magistross created the template.

  • Mikal Ooops! Sorry, I posted it late and copied the wrong user name.

    Magistross The below message was meant for you

    Mikal First off THANK YOU SO MUCH FOR THIS ASSET!! You saved the story mode in my game. I've already extended the code by adding about 8 different commands. Very cleanly written and I love that it doesn't need any 3rd party plugins.

    Quick question. By default each character is show after DIALOGUE_DEFAULTDELAY time. How difficult would it be to get each word to appear instead of a character. I assume I'd need to modify the "Dialogue_NextChar" function to look for spaces as a delimiter, but I wasn't sure how much trouble it would be to get working. It's a "nice to have" feature so if it's too much to change, no worries.

    Thanks again!

  • Hi JarrydHuntley!

    I'm glad you found my template to be useful. It's always interesting to see what other people do with it.

    I guess you could hack in some sort of while loop to fetch text word by word. At the very end of the "Dialogue_NextChar" (as you correctly identified), try modifying the "Add normal character" part like so :

    This should produce the desired result. Keep in mind that this will skip any command placed inside words, since the "Dialogue_CheckCommands" will only be executed at the begining of words and at each whitespace (instead of at every single character).

    You might need to change the Regex I used on line 91 of this screenshot. "\S" will match any non-whitespace character, including punctuation and the like.

  • There is only one word for this. Sexy.

  • Quick question: Will this dialogue template system work with Construct 3?

  • Being 3rd party plugin free, it should work right off the bat. Everything worked as it should when I tried, and it seems it was the case for Mikal too. There was some sort of problem with copying objects between projects but it seems to have been resolved, so adding the template to an existing project should also be the same as in C2.

  • Magistross Thanks for the awesome template!

    Everything is working great except choice commands; for some reason all the choices show the selection 9-patch graphic simultaneously (as if choice selected/active). Any of the choices don't activate by keypress (choice list can be scrolled up/down though). When clicking the mouse button over the choice they work fine and can be activated.

    I'm unable to locate the problem, any ideas what could be causing this? I'm using the dialog file from utility for testing (works fine otherwise) and have set the spritefont size to 8x8 and halved the margins, 9-patch size etc, not sure if that can have any effect. Otherwise everything should be pretty much set up the same and I'm using the same events as in UtilityEvents sheet to call functions..

  • Waltuo It seems the system is set in "Tap choice" mode. Locate the Dialogue_TapChoice global variable is set it to 0. This should put back the system in selector mode.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Magistross

    PERFECT!! That solved it, everything's working now

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)