Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Twiglet: branching text dialogue system.


  • Please log in to reply
3 replies to this topic
tidbit
  • Administrators
  • 2709 posts
  • Hates playing Janitor
  • Last active: Jan 15 2016 11:37 PM
  • Joined: 09 Mar 2008

Twiglet v1.2

(Mon July 09, 2012) Designed and made in AHK (Basic)

[Download]


Description:
Twiglet is a node based (sort of like a modified XML format) Branching Dialogue System. Simply put, it's a system that allows you to easily make:
  • Text adventure games
  • Multiple Choice quizzes
  • Tests
  • help/diagnosis systems
  • tutorials
  • whatever else you can envision
Information:
The functions provided are simple parsers, nothing fancy. You need to do most of the work and build the logic of the program. I have provided 2 examples showing a Text Adventure aswell as a Multiple Choice Quiz. Both examples show a different way of how you could setup your code.

Twiglet relies on a specific format of text. It's sort of like a modified XML file format.
here is the syntax of one possible node:

[node=node_ID]
[text]
the main body of
text. Multi-line is supported.
[/text]
[gid=1]option 1[/gid]
[gid=2]option 2[/gid]
[myTag] some additional info [/myTag]
[Cheese value="yellow"] Cheddar Cheese [/Cheese]
[/node]


a spec sheet with some documentation is included, with several examples. Sorry if it (the spec sheet) is confusing. I am not the best at explaining things.

changelog:
Spoiler

Attached Files


rawr. be very afraid
*poke*
. Populate the AutoHotkey city. Pointless but somewhat fun. .


  • Guests
  • Last active:
  • Joined: --
I slayed the Dragon! :D
Interesting idea, thanks for posting it.

Guest
  • Guests
  • Last active:
  • Joined: --
This really looks interesting.

Just not sure if saving it to a txt is good for a questionair?
It's probably possible to save it in a variable inside the script, right?

By the way, a suggestion:
I found it confusing that i had to input the 1 instead of the correct answer, maybe i am just stupid :0
But the number & the answer would be easier.


Really kewl.

tidbit
  • Administrators
  • 2709 posts
  • Hates playing Janitor
  • Last active: Jan 15 2016 11:37 PM
  • Joined: 09 Mar 2008
Congrats! and thanks, Guest #1.

Guest #2: remember these are demos. Just to show what COULD be done.
you could easily save the questionair' wherever and however you want. inside the script, in a txt file, in an encrypted txt file (then decrypt it when you need to) or however else you can think of. Since I only use a simple fileread once in the beginning, it technically is just a variable. I was just keeping it simple and readable since no one but me has seen this, until now.

the same thing goes for your confusion. It probably wouldn't be to hard to modify the script to accept the text OR the number. since they are both extracted with a loop, you just have to find the GID associated with the text.

I was also keeping this simple for me (and others). You could easily use a custom GUI instead of an inputbox and msgbox. Then have Buttons, Radios or even CheckBoxes. That way you don't have to type anything, just click.
and thanks :)

rawr. be very afraid
*poke*
. Populate the AutoHotkey city. Pointless but somewhat fun. .