Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: HeirOfNorton on Fri 02/12/2005 05:59:02

Title: MODULE: Icon Based Dialog System
Post by: HeirOfNorton on Fri 02/12/2005 05:59:02
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 (http://www.filelodge.com/files/hdd3/51505/IconDialog_100.zip) (Requires AGS 2.71!)
Mirror (http://www.americangirlscouts.org/agsresources/AGS%20resources/Modules/IconDialog_100.zip)

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

Get the demo (http://www.filelodge.com/files/hdd3/51505/IconDialogDemo.zip)

HoN

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
Title: Re: MODULE: Icon Based Dialog System
Post by: Pumaman on Fri 02/12/2005 20:20:31
Sounds good, nice work! Any chance you've got a simple sample game so we can easily see it in action?
Title: Re: MODULE: Icon Based Dialog System
Post by: HeirOfNorton on Fri 23/12/2005 08:44:47
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.

HoN.
Title: Re: MODULE: Icon Based Dialog System
Post by: strazer on Sat 24/12/2005 18:46:50
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:

  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.
Title: Re: MODULE: Icon Based Dialog System
Post by: HeirOfNorton on Sat 24/12/2005 18:50:48
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.

HoN
Title: Re: MODULE: Icon Based Dialog System
Post by: DonB on Mon 09/01/2006 21:42:32
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..
Title: Re: MODULE: Icon Based Dialog System
Post by: Rui 'Trovatore' Pires on Tue 10/01/2006 08:45:53
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.
Title: Re: MODULE: Icon Based Dialog System
Post by: Ubel on Tue 10/01/2006 10:16:03
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!
Title: Re: Script modules/templates that need writing
Post by: Saberteeth on Sat 01/04/2006 20:41:54
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?
Title: Re: MODULE: Icon Based Dialog System
Post by: HeirOfNorton on Mon 03/04/2006 02:15:48
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.

HoN