Dialogue System Template (Templates)

3 favourites
From the Asset Store
Create complex dialogues with ease with this tool/template!
  • Always nice to see someone adapt my system to do something MORE than it was designed to. Hope we can see your results soon!

  • Good afternoon! Is there any support for the Russian language? (In the demo Russian did not work)

  • Yes, it's only a matter of adapting the Sprite Font to display cyrillic characters. The current charset is limited to the default one, however you can expand it as much as you like. Here's the manual entry for the Sprite Font object.

  • Probably I do not understand anything at all. Sorry for my English. I would like to see just a source with a simple dialog system. Or some FAQ

  • Hello !

    Great system for dialogs, but I'm having a few issues...

    I've got the same problem as another person, I'm making a game at very low resolution and the text appear incomplete/glitched. I tried editing the SpriteFont with smaller characters in my Dummy file, but the new text wont update, the old glitch text is still displayed.

    How can I change the spritefont easily ?

    Secondly, the textbox seems to always be offset even when I reference a correct, centered position in the evensheet for the X and Y Position... Any Idea what might cause this?

    Many thanks!

  • Hi Mante!

    After you change the spritefont's sprite, you need to make sure the properties properly reflect the new sprite, otherwise some weird stuff are bound to happen. Also, you need to change a few variables accordingly, at the very least, DIALOGUE_LINEHEIGHT and DIALOGUE_MARGIN should be tweaked to smaller values.

    The DIALOGUE_POSITIONX variable represents the top-left corner of the dialogue box, so this value should not be set to a centered point. For the dialogue box to be centered it should be "screenwidth / 2 - DIALOGUE_WIDTH / 2".

    Hope this helps !

  • Dear Magistross !

    Help me with these variables! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /> imgur.com/g38erfB

  • TheGreatAdam12

    Those are local variables under the "DialogueSystem" group.

    What do you need to know exactly ?

  • What should be in these variables?

  • It all depends on the settings of your project.

    For example, the DIALOGUE_WIDTH should match your game's window size or be a little smaller, depending on your need and the coordinates you used to position the dialogue window.

    If your game's window size is very small, a DIALOGUE_MARGIN of 16 is probably too much and you should adjust it accordingly. For best results, it should match your 9-patch window object's margin size.

    You can't really break anything unless you use absurd values that makes no sense, so don't be afraid to experiment a bit.

  • Porting to a project in Construct 3 took a few extra steps (I suggest editing the top post to include this).

    The sample project works fine, to include the template into an existing project takes a little more work.

    Since the current version of Construct 3 Beta (r66), does not seem to support copying between projects (Ashley turned it off when it was causing problems), you cannot copy the following objects from the template project to a new project, so you must create them (for example in Dummy layout) and then copy over the 'Animations' as needed from the original sprites in the template project.

    ContinueIndicator (sprite)

    PortraitSprite (sprite with multiple animations from default test case)

    SpriteFont (sprite font, add instance variable type string: 'ID', 'choiceFork')

    WindowFrame (9 patch, add instance variable type string: 'ID')

    UpArrow (sprite)

    DownArrow (sprite)

    ChoiceSelector (9 patch, add instance variables type string: 'callback', 'params')

  • Thanks for your input Mikal, edited the instructions post with your findings concerning C3.

  • Thanks for your input Mikal, edited the instructions post with your findings concerning C3.

    Sounds good. If C3 changes to allow moving object between projects, the changes above would not be needed anymore.

    One other suggestion, change the SpriteFont object to be called DialogueSpriteFont (like you do with other objects), so that you won't have an object name clash when the template is added to another project. I had a clash with the Epic Platformer template code and I went through and changed all the Dialogue Event Sheet (and Dialogue original SpriteFont to refer to a new DialgoueSpriteFont object (and all the expression references also.) Luckily with the new 'Find' option in C3, I was able to make sure I got them all. If there is a better way to do that, I would be happy to hear how.

    (The Epic Platformer code should also change their SpriteFont object name to something like EpicSpriteFont, so they don't clash with other templates also.)

  • Good suggestion. I started "namespacing" my variables/objects/ after a while, and forgot to revisit some. I'll add this on my list.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I want to write all my dialogues in a simple text editor and run a 'make' to create a *.json file. I find it more productive to be editing text directly rather than hacking up a *.csv file or using the Construct utility template and having to run Construct.

    So I created a simple c# parser to parse a text file and create the *.json file. I got a version working, but looking for feedback if anyone is interested in it or had approached this in other ways.

    Some dialogue lines will still be complex, e.g. choice and fork, but as I looked at those, I did not want to re-invent the wheel too much to define new ways that those would work in the text file. As I create more dialogues with those constructs, I'll see if that changes.

    Here's my input text file:

    // Name of overall dialogue dictionary (currently not used in dialogue system)
    // Default Character Information
    // [CharacterName]:PortraitPosition[Left|Right]:[PortraitName]:[PortraitX int]:[PortraitY int]:[Mirrored|NotMirrored]:[ShowFrame|HideWindowFrame]
    // DialogueBlock
    // Dialogue Header / Key
    // Actual Dialogue
    // CharacterName: "blah blah blah"
    Thistle: "{enablefog:192,192,192}Thistle you look worried.{pause} Is that smoke I smell in the warren?"
    Nettle: "{showcutscene:GreenForestPath} Nettle, a fire! It's close we must escape to the swamp. We'll be safe there.{pause}{removecutscene}"
    Thistle: "{showcutscene:ForestFire} Ah! The fire comes, now I hear the roar is it too late?{wait:500}{removecutscene}"
    Nettle: "The smoke is choking us out!"
    Thistle: "Let's run for it!"
    Nettle: "No, I am ready to do that, wait for my doe!"
    Thistle: "We don't have time, we must go now."
    NettleSad: ".{pause}.{pause}.{pause} Sigh, all right, I hope she has already left!"
    // End section required (all lines ignored in this section)
    This produces a json file:
            "c2dictionary": true,
            "data": {
    "DialogueExample2": "{\"c2array\":true,\"size\":[3,7,1],\"data\":[[[ \"{enablefog:192,192,192}Thistle you look worried.{pause} Is that smoke I smell in the warren?\"],[1],[\"Portrait2\"],[0],[0],[0],[0]], [[ \"{showcutscene:GreenForestPath} Nettle, a fire! It's close we must escape to the swamp. We'll be safe there.{pause}{removecutscene}\"],[2],[\"Portrait1\"],[0],[0],[0],[0]], [[ \"{showcutscene:ForestFire} Ah! The fire comes, now I hear the roar is it too late?{wait:500}{removecutscene}\"],[1],[\"Portrait2\"],[0],[0],[0],[0]]]}"
    , "DialogueExample4": "{\"c2array\":true,\"size\":[5,7,1],\"data\":[[[ \"The smoke is choking us out!\"],[2],[\"Portrait1\"],[0],[0],[0],[0]], [[ \"Let's run for it!\"],[1],[\"Portrait2\"],[0],[0],[0],[0]], [[ \"No, I am ready to do that, wait for my doe!\"],[2],[\"Portrait1\"],[0],[0],[0],[0]], [[ \"We don't have time, we must go now.\"],[1],[\"Portrait2\"],[0],[0],[0],[0]], [[ \".{pause}.{pause}.{pause} Sigh, all right, I hope she has already left!\"],[2],[\"Portrait3\"],[0],[0],[0],[0]]]}"
    Which I can then import into Construct and use.
    (I also use a Makefile and cpp (preprocessor) to allow me to do file includes and use defines with my text files, but that's for another tool flow discussion...)
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)