DEFORK - easily create interactive, nonlinear stories, dialogs, conversations


I would like to introduce to you DEFORK - an example of how a json data exported from Twine - a tool for creating conversations, can be used to easily create interactive stories in Defold - with DEFORK! :wink:

Logo made with DesignEvo

I was looking for a tool to easily create conversations for my Pixel Art: Witchcrafter and started to play with Inklewriter, but unfortunately they shut down the project in August 2018. However I was suprised how such conveniences are needed in developing a narrative driven game. So after all, now I’m using Twine to create dialog json data in this tool.
Defork utilizes an awesome library - RichText by @britzl to conveniently and easily show loaded data and create interactive dialogs with handled input.

With Defork you can easily:

  • load json data exported from conversation making tool, such as Twine
  • get text, options and links leading to next dialog’s nodes
  • store and manage current links, options and flow through nodes
  • use RichText to easily show dialog window, modify text effects
  • modify data by adding actors, colors and custom text effects
  • add images, portraits or emoticons to Rich Text
  • manage input and handle transitions between nodes

Here is another example of what you can do with Defork, you can modify almost anything:


With Twine and Twinson format you can export data and create a json file in a project folder, which you can attach to custom resources in game.project. In Twine remember to Change Story Format to Twinson, so after clicking Play you will get json data.

With a tool like this you will be able to separate story and dialog creation from other game development activities. Defork and an example Defold project with an example json data compatible with current Defork module is available here:

I hope it involves you to create fantastic, nonlinear, interactive stories! :wink:

Happy Deforking!

I can’t add any asset on the asset page. After clicking ‘add asset’, projects available to attach aren’t showing and it’s loading all the time. Can anyone help me? It would be nice to attach Defork module via Dependency Library from game.project and add html5 example :wink:


Pawel, this looks awesome! Well done :smiley:

Damn, sorry to hear this. Just to clarify – is the problem you’re having related to the image below; that you don’t have any content in your drop-down list? If so—do you have any projects in your Dashboard? You currently need to base your community page on an existing project created from the Defold Dashboard.

If this wasn’t the issue—what browser/OS are you using?

1 Like

At last, I logged out and logged in again to my defold account on the page and they are loaded now :wink: I will now describe it and add to the asset page. I have a question about storage - can I attach link to GitLab or is the page supporting Github only as it seems? And then, how can I make Defork lua module a dependency library that can be added in game.project easily?


The “Add Library URL” feature currently only supports libraries hosted on Github or Defold’s servers, as seen below.

There are two options which I think are viable:

  1. Transfer your GitLab repo to Github, and add the repo to the “Add Library URL” setting on your asset page.

  2. Keep it in GitLab, and edit the Description on your asset page to something like in the image below.

Make sure you’ve set your project up for library sharing first, though—see the manual for more info.


I would like to thank @Axel for a support, I’ve managed to add my first asset on the page. Sorry to be an unusual user, but hopes it helps to improve website. Now everything works fine on the page and the project is on GitHub. I’ve also created a whole API with detailed descriptions, so everything should be now clarified :wink: You can also check HTML5 playable demo on the page! :wink:


No worries at all, just glad to be able to help. And thank you for the reports—it helped us find an unknown bug which we will ship a fix to next week :slight_smile:


That’s cool. I’d note that Inkle Studio’s current tool is Ink which also exports JSON and is designed as middleware (they usually work with Unity) so if you ever need to go beyond the limitations of Twinson you could try looking into Ink.


Yes, I saw Ink also, but I had some problems decrypting the json file, so I gave up and tried with Twinson then, especially because it was open-source and available too. As Defork was only meant to show an example of using such tools, adding other format of json files would be a great addition to this, though! :wink: Ink has many advantages, as well as other conversations making tools. Worth taking into consideration are Chat-mapper, Talker Maker:Deluxe, Chronicler and my favorite - articy:draft - as I saw in a trailer it is used by my motherland’s studio CD Projekt RED in upcoming Cyberpunk 2077! :smiley:


I am checking out Arcweave ( now and it has pretty useful tools for creating non-linear dialogues(/interactive stories) and also an option to export to json - I will try to adapt Defork to parse those files and use in my dialogs - if it will work, I will publish such parser in the Defork repo :wink:
It is free for unlimited projects with up to 100 elements and 2 editors, which should be enough for indie, higher options are paid monthly.


Hello! Sorry for bringing this thread back from the death but I haven’t found a newer one about DEFORK.
I’m new to Defold (migrating from Unity) and I’m searching for a branching narrative solution.
Currently I’m between Twine and Ink.
Twine’s visual editor seems more suited for my purposes and I’m glad you made DEFORK to import Twine jsons, but I’m wondering if variables and conditionals are supported by your framework, because I will really need them.
Thanks! :slight_smile:

1 Like

Besides DEFORK, you should also take a look at these Defold extensions:

1 Like

Thanks, I have also taken a look at them, but since I find the Twine visual editor better suited for my project, I’m prioritazing Twine for the moment. If DEFORK doesn’t support variables and conditionals, I would have to either implement them myself or switch to Ink and use Narrator.

1 Like

Defork was not being updated, because I am not using Twine anymore and variables and conditions were introduced later on.

I’m using ArcWeave right now and my DefArc module is pretty much up to date (at least working will all my dialogues) and supports conditions, variables etc.

If anybody has a time and strength to add support for Twine’s new features and revise Defork branch - its fully open source and I would gladly accept PRs or welcome a (nomen omen) fork branch - it would be great to have it in our community :heart:


The thing about ArcWeave is that I don’t want to support subscription services.
I know there is a free version of ArcWeave, but I really don’t want to enter an ecosystem based on subscriptions ever again. (I come from Unity and I got burned for life on this)

I’m still evaluating all the options, but if I end up using Twine, I’ll probably make a fork of DEFORK adding variables and conditionals support.
I’ll let you know if that’s the case. :slight_smile: