Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Ashera on Sun 12/06/2005 19:10:22

Title: Writing plugins for new dialog commands?
Post by: Ashera on Sun 12/06/2005 19:10:22
I know you can write plugins that add new functions to the scripting language, but is there a way to write plugins that add new functions to the dialog scripts? There are a couple of features that would be oh-so-convenient for me...

-Ashera
Title: Re: Writing plugins for new dialog commands?
Post by: Ubel on Sun 12/06/2005 19:56:47
Why would you want to write a plugin for them when you can use run-script x command and dialog request?
Title: Re: Writing plugins for new dialog commands?
Post by: monkey0506 on Sun 12/06/2005 21:52:07
Even dialog request has its limitations.  There is the Scrolling Dialog Template which utilizes a custom dialog system instead of the built-in one, but it has some bugs.  And it's for 2.62.  I'm working on converting it to an SM, but, having some technical difficulties.

I mention these because it seems like you want to perform things which can't be done at all with the built-in dialog system (i.e., scrolling dialog options, changing the highlight color, etc.).
Title: Re: Writing plugins for new dialog commands?
Post by: Pumaman on Sun 12/06/2005 22:05:45
At present, the answer to your question is No. However, it's a good idea for a future addition.
Title: Re: Writing plugins for new dialog commands?
Post by: Scummbuddy on Sun 12/06/2005 22:25:40
and why dont you just tell us what features and additions you would like added?
Title: Re: Writing plugins for new dialog commands?
Post by: Ashera on Mon 13/06/2005 01:31:34
The main thing I want is the ability to turn on dialog options in other topics. Have I totally missed the ability to add that? (I've been searching the forums and haven't found it.) Also, turning on objects in rooms. Other than that, there's using thoughts in dialog, which someone else mentioned wanting recently. Basically, wrappers for some normal script functions that not everybody would necessarily want but that make things a bit easier for me.

I don't like using run-script because I have trouble keeping track of all the numbers.  ;D
Title: Re: Writing plugins for new dialog commands?
Post by: Rui 'Trovatore' Pires on Mon 13/06/2005 08:46:52
Well, unfortunately, you can do all those things already in run-script and only in run-script, so it's unlikely anyone will make a plugin. But if you just don't like numbers, why not use #define to use names instead of numbers?
Title: Re: Writing plugins for new dialog commands?
Post by: strazer on Mon 13/06/2005 10:09:35
Do #defines work in dialog script? I think not. (See also this tracker entry (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=469)).
Title: Re: Writing plugins for new dialog commands?
Post by: Rui 'Trovatore' Pires on Mon 13/06/2005 11:14:50
Whoopsie. Well, I tried. ::)
Title: Re: Writing plugins for new dialog commands?
Post by: TheMagician on Mon 13/06/2005 15:21:11
It's funny that  this topic pops up just as I'm trying to write a template for an icon based dialog script.

There is one currently available called SIBDIS but one disadvantage is (as the author correctly points out) that all the dialogs of the game are stored in one big ... well, huge function.
That way it's really hard to organize and keep track of everything.

So I tried to somehow make use of AGS' built in dialog editor for my script but the #define not working with dialog scripts makes it - as I think - impossible. There is just no way to keep track of what this and that gobal variable or run-script parameter means and does.

So I also asked a friend if he could write a plugin for AGS which would visualize the content of a custom dialog function in a way like AGS or the AGS-Dialog-Editor plugin which is already available.

But then again ... perhaps it's not worth all the trouble.