Author Topic: MODULE: Icon Based Dialog System  (Read 4226 times)

MODULE: Icon Based Dialog System
« on: 02 Dec 2005, 05:59 »
Seeing all the modules SSH has been releasing made me feel like I was slacking, so...

I present the Icon Based Dialog System script module!!

This module (well, modules, really) allows you to easily add a complete icon-based dialog system to your game, similar to the one used in Discworld and... other... games, I think.
Anyway, all you have to do is create your GUI. Make it look however you like, just be sure to add some buttons to it. Then import the IconDialog modules, and use the functions to hook into your GUI and buttons.

Some of the neato features:
* Simple API that'll get you speaking in pictures in no time!
* Highly customizable, and easily (I hope) extensible.
* The ability to automatically reposition the icons, and
  resize the GUI match. (Or not, whichver you like!)
* No practical limit on the number of dialog topics and
  options, each with its own icon associated with it.
* The ability to run dialogs as usual, or jump straight
  to a specific option.
* Cross-platform compatible

Download here (Requires AGS 2.71!)

Edit: And here is a short demo game showing how to use it:

Get the demo


Edit: P.S. I do, of course, welcome any bug reports or suggestions for additional features.

* Side note, isn't it amazing how quickly you come to depend on new features without noticing it? While I was writing this, I thought it would be compatible with plain AGS 2.7, as I didn't use any of the new String or DynamicSprite stuff. Then I looked through the code, and the lists of updates, and realized that a fair amount of the code depends on lazy eval, introduced in 2.71 beta 5. And I can't even claim that I'm just used to C++, cause I'm not. When I'm coding in C++ I have to remember that I'm NOT coding in AGS, not the other way around.  ;D
« Last Edit: 04 Jun 2006, 18:35 by strazer »


  • Creator of AGS
  • I sense danger.
    • Lifetime Achievement Award Winner
Re: MODULE: Icon Based Dialog System
« Reply #1 on: 02 Dec 2005, 20:20 »
Sounds good, nice work! Any chance you've got a simple sample game so we can easily see it in action?

Re: MODULE: Icon Based Dialog System
« Reply #2 on: 23 Dec 2005, 08:44 »
Okay, I've uploaded a quick demo game showing how to use it. Please note that (to keep down file sizes) I have only included the gane files, not the compiled game itself. It needs 2.71 to be compiled.


Re: MODULE: Icon Based Dialog System
« Reply #3 on: 24 Dec 2005, 18:46 »
Cool, nice demo!

Got a crash though: Module "IconDialog RunScript", line 161: "'SetCharacterSpeedEx': Cannot change speed while walking":

You probably just have to switch these two lines:
Code: [Select]
  cEgo.Walk(5, 180);
  cEgo.SetWalkSpeed(3, 3); // line 161

Of course it doesn't matter really since it only affects the demo game, just thought I'd mention it.

Re: MODULE: Icon Based Dialog System
« Reply #4 on: 24 Dec 2005, 18:50 »
Once again we see the perils of not testing EVERYTHING after each little change.  ;)

In my own defense, I was coding that part at about 1:45 in the morning.


Re: MODULE: Icon Based Dialog System
« Reply #5 on: 09 Jan 2006, 21:42 »
Sounds interesting, why don't you fix the demo so we can first look before putting too much effort in it without knowing exactly what we get..

Rui 'Trovatore' Pires

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
Re: MODULE: Icon Based Dialog System
« Reply #6 on: 10 Jan 2006, 08:45 »
DonB, the glitch in the demo is inconsequential and totally unrelated to the dialog system itself. If you give it a try, you *will* know exactly what you'll get.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.


  • Uappelsi
    • Ubel worked on a game that won an AGS Award!
    • Ubel worked on a game that was nominated for an AGS Award!
Re: MODULE: Icon Based Dialog System
« Reply #7 on: 10 Jan 2006, 10:16 »
I tried the demo today and was pretty impressed. :)

I was gonna make a module for icon dialogs myself, but with my scripting skills it would have probably become very confusing. If I don't write the system for myself I'll probably use this in my game.

Great job!

Re: Script modules/templates that need writing
« Reply #8 on: 01 Apr 2006, 20:41 »
Em, I want to try the Icon-based module, it's just that does the module need to be like sam&max or something of my desire?

Re: MODULE: Icon Based Dialog System
« Reply #9 on: 03 Apr 2006, 02:15 »
I've honestly never played Sam&Max, so I'm not sure.

But, really, you should end up with whatever you want. You need to supply your own GUI and icons (and dialogs, for that matter). The module is just a scripting framework to make things a little easier. The sample game should give you a pretty good idea how to use it (despite that little glitch that I really am gonna get fixed someday. Honestly)

One thing to bear in mind... If you ever intend to use voice speech, remember that AGS does not automatically number the sppech lines in script modules, so any dialog used in this system will need to be numbered individually.