Help with Custom Chat Mapper Dialogue Engine

1 favourites
  • 1 posts
From the Asset Store
Chat with smart animals using the OpenAi Chat GPT 3 API
  • Chat Mapper is a really powerful tool for handling branching dialogue. You can create a dialogue in it complete with logic and variables, then export it as a JSON file and run it through a plug-in for Unity, Unreal or a number of other engines. However, no such plug-in exists for Construct so everything must be done manually.

    I’ve started building a game that can read Chat Mapper JSON files and parse them as interactive dialogues. So far, I’ve only implemented basic UI, option selection and branching but I’m happy with how it’s shaping up. The basics are all there and it pretty much functions. The next thing I want to do is implement logic - specifically conditions.

    Chatmapper stores all variables relating to the conversation in a UserVariables array. Rather than keeping these as variables within Construct, I have to refer to them within the Master JSON file if I want to check them or change them. The challenge comes from how I use the information provided to do this.

    Normally, Chatmapper uses Lua to handle its logic. You can enter something like “Variable["variable_name"] = true” into the Script Editor field and the plug-in will take that information and automatically adjust the variable. Obviously, I can’t do this within Construct - the entry will just come up as a string within the dialogue node array but Construct doesn’t know what to do with it.

    Does anyone have any suggestions for how I can use these strings to a) determine whether or not options will show up depending on variables and b) change variables based on information within the JSON? I've got a couple ideas but I really don't have a programmer brain and I wanted to get some advice before I jump into an unnecessarily complicated solution and create a million future problems for myself.

    Alternatively, Chat Mapper allows you to create custom fields within the export. These can be numbers, text, booleans or any number of things. Is there perhaps an easier way to achieve this using this functionality?

    Any help or suggestions would be hugely appreciated. I’ve attached a link to the project below so feel free to poke around but I’m also happy to answer any questions.

    drive.google.com/file/d/19inz60JSCYuGl_3iu7xShrjdVPqdwWlQ/view

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)