Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Ali on Tue 08/08/2006 16:49:00

Title: Dialogue Suggestions/Inquiries
Post by: Ali on Tue 08/08/2006 16:49:00
I love the new feature in 2.72 that allows you to alter the colour of dialogue topics which have been said. I've noticed however, that it looks a bit odd when my 'Goodbye' topics change colour after they've been said once. It would be good if it was possible to alter a dialogue topic's 'said' state to keep particular topics 'unsaid'. This would be useful for 'Goodbye' and 'Remind me of...' topics.

This 'Goodbye' issue led me to realise that it doesn't seem to be possible to end a dialogue except from within a dialogue topic. It would be very handy if it was possible to call the 'Goodbye' topic by clicking outside of the dialog GUI or right-clicking.

I couldn't find specific references to ideas like these in the tracker. Would they be remotely feasable/useful?
Title: Re: Dialogue Suggestions/Inquiries
Post by: monkey0506 on Tue 08/08/2006 17:27:20
As a workaround you could use the ScrollingDialog module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22526.0).

The related module functions for your first question would be ScrollingDialog.GetSaid and ScrollingDialog.SetSaid.

As for your other issue, you can call the module function ScrollingDialog.End from any script following the ScrollingDialog module (this includes global and room scripts).

[EDIT:]

I guess you want to call the "Goodbye" interaction, not just end the dialogue. You could do that with ScrollingDialog.RunInteraction.

Also, I should let you know that the module doesn't (a.k.a., can't) make use of the built-in dialog editor, so you would have to completely rescript any existing dialogs (the module handles dialogs completely from within the script).
Title: Re: Dialogue Suggestions/Inquiries
Post by: GarageGothic on Tue 08/08/2006 21:59:11
I don't mean to criticise monkey's ScrollingDialog module, but I would recommend writing your own dialog system to fit your specific needs. I started doing this myself today - I was having some of the same problems as you regarding text color - and it turned out to be much easier than I thought. The basics - from conception to a functional prototype - took about an hour.

My module uses RawDraw and graphical overlays to display the options, which means that you don't have to deal with GUIs, labels etc. and as long as you just want to display your options on a black background (or on a fixed size graphical background) it seems quite ideal for the purpose. Since it uses RawDraw instead of labels, you could even have keywords highlighted in different colors or use different fonts within the same option.

As long as you've got a reasonable grasp of how to use structs and arrays, and are prepared to write your dialog in the script instead of using the dialog editor, writing your own dialog system will save you loads of grief with the limitations of the built-in system.
Title: Re: Dialogue Suggestions/Inquiries
Post by: monkey0506 on Wed 09/08/2006 02:28:17
INSOLENCE!

You're ruining my sekrit! I was keeping everyone in the forums thinking dialogs were hard to program! lol Just kidding...actually a lot of the problems I've had in the past all came in with trying to scroll through options that were displayed on more than one line. Which is just insanity anyway.

Aside from the initial setup, my module can emulate the built-in system perfectly, which seems to be all he needed with the additional functionality of changing the "said" state of options.

But I don't know how far Ali wants to go. It's up to him which method to use. I just thought that the simplest (a.k.a., fastest) route would be to use some pre-scripted code.
Title: Re: Dialogue Suggestions/Inquiries
Post by: Ali on Thu 10/08/2006 14:01:16
Thanks for your responses guys. I don't think I know enough about scripting to attempt my own dialog system at that time. I really wish I'd asked this question before I started writing all the dialog!

If/When I ever start another project I'll definitely bear your module in mind monkey, but last time Garage Gothic advised me to script something myself it turned out very well, so I might consider that...

Thanks again!

-Ali.