email sol follow sol rss feed of the blog wishlist Sol::Code

DialogTree (d3)

Game dialog tree middleware engine

FAQ

What's the license?

The license is based on the XFree86 1.1 license. Basically:

  • You're free to use it, at no cost, in commercial and noncommercial software.
  • You have to include "This product uses the DialogTree (D3) engine by Jari Komppa (http://iki.fi/sol)" somewhere in your application and/or documentation, where you're crediting other external libraries.
  • Any redistribution of the source code has to include the full license text.
  • You still use it at your own risk, no guarantees etc, just like all software out there.
  • It's not GPL or LGPL, so no viral licensing here.

I'd like to use the tools, but not the library

Feel free. It would be nice of you to still credit me.

I feel bad about using this without compensating you.

Check the "wish list" link on the top corner of this page.

So What About..

I've thought of, and I've been asked, several things which seem impossible with this system, and I think they can be worked around with simple extensions and/or doing work on the game engine side.

Some examples;

..Mass Effect-like answer ordering?

Can be done by prefixing the answer and/or adding user data to the answer saying which answer it is, or changing the tools to force all questions to have certain number of answers, in certain order, or..

..I want any two out of three tags to activate something?

This is probably not a very common thing, so I'd just write special code to handle it. Apart from that, it can be kludged by saying "need:a,b not:c", "need:a,c not:b", "need:b,c not a", "need: a,b,c" with identical answers. Not pretty, but works.

..Voice assets?

Linked to question/answer tags and/or user data, handled by the engine.

..Showing faces/expressions of who's talking?

User data.

..Health/battle system/currency/multiple identical objects/etc?

These would require some slight additions to the d3 system, or some work on the game engine side.

..Talk to more than one character at a time, as in 'Monkey Island'?

This is a confused question.

In Monkey Island, there's several scenes where you're talking to several characters at the same time, but what you're actually having is just a single conversation. What the "questions" are are actually scripts, putting pieces of dialog on multiple character's lips.

..on topic of 'Monkey Island', what about the swordfights?

The swordfights, and some other interesting bits in monkey island dialogs (like the bottles of beer song), are rather dynamic, and are thus not directly representative with d3.

That said, making the swordfights is entirely possible with d3 with some help from the game engine side. Basically the swordfights go like this:

  1. AI picks an insult from the list it knows and throws it at the player.
  2. Player picks a comeback from known list.
  3. If correct, player advances. If wrong, AI advances.
  4. Player picks an insult from known list.
  5. If AI knows the right comeback, it's chosen at some random percentage, otherwise a random comeback is given.
  6. If correct, AI advances. If wrong, player advances.
  7. If at any point the player or AI gets pushed too far back, the battle is over.

One way to implement this with d3 would be to have a single card for comebacks (with a list of all possible comebacks, each shown only if certain tag is active), each leading to unique exit node. And the same for all insults. Next, a card for each insult with auto-forward to the comeback card, and so on.

Then you'd have the AI toss a question (d3_goto()), use d3 to figure out which answers are available, and when exit node is reached, the game engine would resolve whether the answer was correct.

Combining this with "normal" card handling would naturally need some more code, but that's basically how I'd approach it.

 

Comments, etc, appreciated, as always.

Site design & Copyright © 2017 Jari Komppa
Possibly modified around: August 06 2011