An introduction to JSON dialogue systems

16

Index

Features on these Courses

Attached Files

The following files have been attached to this tutorial:

Stats

9,113 visits, 21,646 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 4 Dec, 2019. Last updated 4 Aug, 2020

Introduction

This tutorial looks at a JSON based system for handling and displaying dialogue. The whole example file is controlled by touch (just tap or click to advance the dialogue) and includes ways of showing character names and images. It also includes a function to allow you to apply certain formatting aspects to the displayed text.

  • 15 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Thanks for sharing your Knowledge! The tutorial has some mistakes on it. I had to check on the example file (also thanks for providing it!) to verify what I was missing. (Such as using arrays for no reason, where I should be using JSON, etc)

      • [-] [+]
      • 3
      • Laura_D's avatar
      • Laura_D
      • Construct Team Community Manager
      • 3 points
      • *
      • (2 children)

      I'm a little confused as to where you think the mistake is, if you could elaborate that would be great, then it can be fixed if needed.

      Afaik, the only mention of arrays in this tutorial is in reference to the Array data type within the JSON file, not Construct's Array object.

      • I think the mistake is referring to the instructions you wrote on initialization actions:

        CONDITION

        System ▶︎ On start of layout

        ACTION

        ...

        Array ▶︎ Load from AJAX.LastData

        Instead it should be:

        JSON ▶︎ Parse JSON string AJAX.LastData

  • My god. I've been sitting with this the whole day, not understanding what I'm doing wrong. Looks like I forgot an "s" at the end of 1 word. Never give up people...

    Thank you so much, amazing guide!

  • This is really tough for a beginner. I got stuck at the final return value 'on function format' I could not figure out how to implement the replace() expressions. Even looking at the final .json i could not work out how to enter the 'System ▶︎ Set Line to replace(String,"(b)","[ b]")' or other 3 lines???

  • Sorta newb in Construct, trying to follow this tutorial and am stuck- I added a local variable1, but cannot add another just like it without it having a different name. Will that matter? How did you add an identical local variable when the program doesn't allow it?

    Thank you!

    • I doesn't matter. It's because if you select the function and press V, you create a local variable outside of the function. That's why it doesn't let you name it Variable1 again. I found 2 solutions to the problem.

      1. Just create the Variable2, them move it in to the function and rename it to Variable1 once inside.

      2. Select a condition inside the function and press V(shortcut for creating local variable). That way you can just name it Variable1 right away, since it's inside.

      You probably solved it by now but I thought this might help someone.

  • Thanks so much for your tutorial. I am new to Construct 3. I can't figure out how you added a local variable. I'm on page 3 of your tutorial and I'm stuck. I got as far as LOCAL NUMBER, VARIABLE1 this. How do I add a local variable? And furthermore, how do I add it to the event page? Thanks.

  • Load more comments (6 replies)