Adventure Game Studio | Forums

AGS Support => Modules, Plugins & Tools => Topic started by: monkey0506 on Mon 31/07/2006 06:33:57

Title: MODULE: ScrollingDialog v3.0 - Updated 27 January 2016
Post by: monkey0506 on Mon 31/07/2006 06:33:57
Don't call it a rewrite! :-D

For the first time in years, the ScrollingDialog module is back! And what's more, it actually works this time!!! := This is a major overhaul, written entirely from scratch and is in no way comparable or compatible with the older versions of the module.

You will need AGS 3.4.0.6 or higher to use this module. You will also need the MathsPlus module, which is included in the download.

DOWNLOAD (https://sites.google.com/site/monkey0506/ScrollingDialog-3.0.rar?attredirects=0&d=1)

Why do you need another dialog module? Well, because this one's pretty cool, and if you want to be a cool guy, you'll use it. Just look at this actual, functioning code sample:

Code (ags) Select
function game_start()
{
  ScrollingDialog.Width = 320;
  ScrollingDialog.Height = 75;
  ScrollingDialog.Padding.Top = 5;
  ScrollingDialog.Padding.Left = 5;
  ScrollingDialog.Padding.Bottom = 5;
  ScrollingDialog.Padding.Right = 5;
  ScrollingDialog.X = 0;
  ScrollingDialog.Y = 125;
  ScrollingDialog.TextColorNormal = player.SpeechColor;
  ScrollingDialog.TextColorActive = 14;
  ScrollingDialog.TextColorChosen = player.SpeechColor;
  ScrollingDialog.LineSpacing = 3;
  ScrollingDialog.Bullet.ActiveGraphic = 6;
  ScrollingDialog.Bullet.Padding.Top = 2;
  ScrollingDialog.Bullet.Padding.Right = 3;
  ScrollingDialog.Bullet.Float = eFloatLeft;
  ScrollingDialog.ScrollArrows.Float = eFloatLeft;
  ScrollingDialog.ScrollArrows.Up.NormalGraphic = 10;
  ScrollingDialog.ScrollArrows.Up.MouseOverGraphic = 9;
  ScrollingDialog.ScrollArrows.Up.PushedGraphic = 13;
  ScrollingDialog.ScrollArrows.Up.Padding.Top = 4;
  ScrollingDialog.ScrollArrows.Up.Padding.Bottom = 2;
  ScrollingDialog.ScrollArrows.Up.Padding.Right = 5;
  ScrollingDialog.ScrollArrows.Down.NormalGraphic = 8;
  ScrollingDialog.ScrollArrows.Down.MouseOverGraphic = 7;
  ScrollingDialog.ScrollArrows.Down.PushedGraphic = 12;
  ScrollingDialog.ScrollArrows.Down.Padding.Top = 2;
  ScrollingDialog.ScrollArrows.Down.Padding.Right = 5;
  ScrollingDialog.NumberStyle = eDialogOptionNumbersDrawn;
  ScrollingDialog.TextAlignment = eAlignRight;
  ScrollingDialog.AutosizeHeight = true;
  ScrollingDialog.AnchorPoint = eAnchorBottomLeft;
  ScrollingDialog.Background.Color = 1632;
  ScrollingDialog.Background.Transparency = 75;
  ScrollingDialog.Background.Graphic = 11;
  ScrollingDialog.Background.AnchorPoint = eAnchorCenter;
  ScrollingDialog.MinWidth = 107;
  ScrollingDialog.SetTag("%LOCATION%", "SPARTA");
  ScrollingDialog.Background.BorderDecoration.Top = 6;
  ScrollingDialog.Background.BorderDecoration.Bottom = 6;
  ScrollingDialog.Background.BorderDecoration.TopLeftCorner = 6;
  ScrollingDialog.Background.BorderDecoration.TopRightCorner = 6;
  ScrollingDialog.Background.BorderDecoration.BottomLeftCorner = 6;
  ScrollingDialog.Background.BorderDecoration.BottomRightCorner = 6;
  ScrollingDialog.Background.BorderDecoration.Left = 6;
  ScrollingDialog.Background.BorderDecoration.Right = 6;
  ScrollingDialog.Font = eFontBlackAdder;
}


There isn't a demo game for this (yet), but one may be made (I'm going to ask Secret Fawful to make graphics for it, so if it never happens, blame him).

For the most part, the properties should all speak for themselves as to what they do, and there's some limited documentation in the module. One really cool feature that the module includes is dialog option tagging. What that means is that you can create a custom tag that you will later replace with some other text, such as a character's name. You tell the module what you want to replace the tag with (using ScrollingDialog.SetTag), and then when the dialog options are drawn, the module will handle it for you!

Code (ags) Select
  cPet.Name = "Spike";
  ScrollingDialog.SetTag("%PETNAME%", cPet.Name);


Then if you have a dialog option set to "My dog's name is %PETNAME%." (for example), then the text would be displayed as "My dog's name is Spike.".

There is also a built-in tag for the player name (ScrollingDialog.PlayerNameTag), which is always replaced with the current player name. This will save you from having to change the tag if you change the player, as it will always stay up-to-date with the current player character.

NOTE: If you are using a tagged dialog option, you should always leave the Say check-box unchecked. The module can't overwrite the actual dialog option text, so if the player reads that option, they would end up saying the original text, as set up in the editor. If you want the player to read that option, then instead include a line such as this in your dialog script:

Code (ags) Select
// dialog script
@S
return;
@1 // My dog's name is %PETNAME%.
  player.Say(ScrollingDialog.SelectedOption.Text); // say "My dog's name is Spike."
return;


This will ensure that the dialog tags are replaced appropriately.
Title: Re: MODULE: ScrollingDialog v1.1 (Updated 31 July 2006) - Now with demo!
Post by: Shade on Mon 31/07/2006 22:56:18
wow! :o great job monkey_05_06 and thanks for sharing! first of all the mosule is easy to use and i like the way how you can customise almost everything!
Title: Re: MODULE: ScrollingDialog v1.1 (Updated 31 July 2006) - Now with demo!
Post by: monkey0506 on Tue 01/08/2006 03:58:24
I'm glad that you like it then.

Right now I'm just trying to decide if I should use an array or a vector for storing the dialog tree...it would actually be easier on my part to use a vector, but it would mean you would have to include another module, so I'm still undecided.
Title: Re: MODULE: ScrollingDialog v1.1 (Updated 31 July 2006) - Now with demo!
Post by: GarageGothic on Tue 01/08/2006 11:46:12
But monkey, you also made the vector module, right? So can't you just copy the code from that into the dialogue module and add a note in the readme to make sure that people don't use both?
Title: Re: MODULE: ScrollingDialog v1.1 (Updated 31 July 2006) - Now with demo!
Post by: SSH on Tue 01/08/2006 12:08:37
You could detect, using #ifdef, if the user has already got the vector module included, and if they have: use it, if not use an array...
Title: Re: MODULE: ScrollingDialog v1.1 (Updated 31 July 2006) - Now with demo!
Post by: monkey0506 on Tue 01/08/2006 13:39:03
I could do that. But then I'd have to program it both ways...that's no fun. :D

I'll work on this today...see if I can't come up with something.

[EDIT:]

I didn't feel like using an array because it really would have been much more complicated for me to have to deal with...so I just wrote a customized version of the int vector class into the module! :D

It works better that way. And so the new version's up now. For those that won't read the edit in the first post, you can now have multiple dialog topics run at the same time (nested dialogs for complex dialog trees). You just use ScrollingDialog.Run as you normally would. To go back one step you call ScrollingDialog.Return. If you call ScrollingDialog.Return when only one topic is running it calls ScrollingDialog.End.

It's worthy noting though that you can't call ScrollingDialog.Run from the ScrollingDialog_Setup module. So for nested dialogs you will have to put interactions in the ScrollingDialog module itself.

// example of how to put interactions in the ScrollingDialog module
static void ScrollingDialog::RunInteraction(int topic, int option) {
  if ((topic < 0) || (topic >= eScrollingDialog_MaxTopics))
    AbortGame("Invalid parameter 'topic' to function 'ScrollingDialog::RunInteraction'. Range 0..%d, value %d.", eScrollingDialog_MaxTopics - 1, topic);
  if ((option < 0) || (option == eScrollingDialog_MaxOptions))
    AbortGame("Invalid parameter 'option' to function 'ScrollingDialog::RunInteraction'. Range 0..%d, value %d.", eScrollingDialog_MaxOptions - 1, option);
  if (ScrollingDialog_Topics[topic].Say[option]) player.Say(ScrollingDialog.GetText(topic, option));
  ScrollingDialog_Setup.RunInteraction(topic, option);
  if (topic == 0) {
    if (option == 0) ScrollingDialog.Run(15);
    else if (option == 1) {
      cMan.Say("That's hard to believe.");
      player.Say("I saw it with me own two eyes.");
      }
    }
  /* ... */
  else if (topic == 15) {
    if (option == 0) ScrollingDialog.Return();
    }
  }


Of course if you don't call any of the ScrollingDialog functions from your interaction script you can put it in the ScrollingDialog_Setup module. You can even have interactions defined in both places, however anything in the ScrollingDialog module before the line "ScrollingDialog_Setup.RunInteraction(topic, option);" will be run before the interactions defined in ScrollingDialog_Setup, and anything after it will be run after those interactions.
Title: Re: MODULE: ScrollingDialog v1.21 (Updated 15 August 2006)
Post by: Rui 'Trovatore' Pires on Wed 16/08/2006 18:53:41
Small suggestion - how hard would it be to allow your dialogs to recognize numbers for topics (pressing 1 equal clicking on first dialogue, and so on)? It would be a very handy feature.
Title: Re: MODULE: ScrollingDialog v1.21 (Updated 15 August 2006)
Post by: monkey0506 on Wed 16/08/2006 19:12:35
Question: Is that implemented into AGS's system?

Because it would be fairly easy to implement (either for the module or individually):

function on_key_press(int keycode) {
  if ((keycode >= '0') && (keycode <= '9') && (ScrollingDialog.GetRunning() != -1)) {
    if ((keycode == '0') && (9 < eScrollingDialog_LabelCount)) keycode = 40;
    if ((keycode == '0') || (keycode - 31) >= eScrollingDialog_LabelCount) || (ScrollingDialog.GetOptionOnLabel(keycode - 31) == -1)) return;
    ScrollingDialog.RunInteraction(ScrollingDialog.GetRunning(), ScrollingDialog.GetOptionOnLabel(keycode - 31));
    }
  }


Okay, there's a few more checks than I initially anticipated...but...that would allow you to press 1 - 0 to run options 0 - [9/eScrollingDialog_LabelCount - 1] (because the options are indexed from 0 to eScrollingDialog_MaxOptions).

I may decide to implement it if it's implemented in the built-in system, but for right now...I'm off to find something to entertain myself...lol...(I'm very bored and the A/C is broken...)
Title: Re: MODULE: ScrollingDialog v1.21 (Updated 15 August 2006)
Post by: Rui 'Trovatore' Pires on Wed 16/08/2006 21:45:04
Oh ayuh, very possible to do. I've just played 3 or 4 AGS games recently in which it was not only possible - it was a very welcome shortcut. Very, very welcome.
Title: Re: MODULE: ScrollingDialog v1.21 (Updated 15 August 2006)
Post by: Pendorcho on Sun 01/10/2006 23:36:27
When i try to import the module i get an error.

Something like "You need a newer version of AGS..."
Title: Re: MODULE: ScrollingDialog v1.21 (Updated 15 August 2006)
Post by: monkey0506 on Mon 02/10/2006 00:03:49
What version of AGS are you using? It was built with the latest version, AGS v2.72. So make sure you're using the latest version of AGS. If it still doesn't work, you can try redownloading the file.
Title: Re: MODULE: ScrollingDialog v1.21 (Updated 15 August 2006)
Post by: Pendorcho on Mon 02/10/2006 21:06:22
I'm using the latest version.

=S

Until yesterday, the link was broken, so i downloaded a mirror from http://www.americangirlscouts.org/agsresources/.

I'll try the one you've just uploaded (http://monkey0506.madpage.com/ScrollingDialog_1_21.rar) and see what happens.

Edit:

It works perfectly.

Thank you very much.
Title: Re: MODULE: ScrollingDialog v1.21 (Updated 15 August 2006)
Post by: monkey0506 on Mon 02/10/2006 22:20:58
I'm glad to hear you've gotten it working. However I see that you posted twice, and within only a few minutes of each other. You're really supposed to use the "Modify" button to edit your posts if no one else has posted since your last post, or unless it's been several days. (I'm not a mod, just trying to watch out for my consumers ;D)
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: monkey0506 on Mon 26/03/2007 08:09:29
Quote from: The friendly forum reminderWarning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

*bump*

Yes forum, I'm sure I want to post. This may just be a beta version, but it's at least mostly stable. :) Right now I'm looking into the unstable bits...more later.
Title: How do I use ScrollingDialog
Post by: Mazoliin on Sat 19/05/2007 15:03:20
Hi! I'm makeing a game whit a FOA look-a-like dialog gui.
I've tried to use monkey_05_06's ScrollingDialog module to change the color and font, but when I then try to test my game, I get this error saying the gui isn't initialized.

What does that mean?!

I've looked for an answer everywhere I can think of.
Maybe someone else had a similar problem?
I don't know too much about code.
Many excuses for my bad english.
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: Mazoliin on Sat 19/05/2007 16:40:39
Exact error:

QuoteA fatal error has been generated by the script using the AbortGame function. Please contact the game author for support.

in ScrollingDialog (line293)
from ScrollingDialog_Setup (line36)

Error: ScrollingDialog error: Dialog GUI not initialized. Check manual for mor info.

Haven't been able to find anything in the manual.
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: monkey0506 on Sun 20/05/2007 00:30:05
You may have read this in the manual:

Quotebool ScrollingDialog_Setup.SetDialogGUI(GUI* dialogGUI, optional int seed_control,
optional int x_offset)

  Sets the GUI to use for displaying the dialog options. Requires
  eScrollingDialog_LabelCount labels starting from SEED_CONTROL (default 0).
  X_OFFSET sets the offset for this GUI if the arrows GUI is activated (similar to the
  way the GUI is moved in The Secret of Monkey Island(TM)).

As denoted by the manual entry the dialog GUI requires eScrollingDialog_LabelCount GUI label controls. The default value for eScrollingDialog_LabelCount is 7. If you need to change this, you will need to look in the ScrollingDialog module header where you will see this:

enum ScrollingDialog_Variables {
  eScrollingDialog_LabelCount = 7,
  eScrollingDialog_MaxTopics = 500
  };


You can change 7 to whatever value you need (however many rows of options you need to show on the dialog GUI at once) however you must have as many labels on the dialog GUI as this value defines or your game will crash.

It's been a while since I worked on this module, however I may find time to take back up my work on it again shortly.

If this doesn't solve your problem, feel free to describe exactly what you've done, as well as any errors you receive (Ctrl+C to copy the errors, Ctrl+V to paste them in your messages).
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: Mazoliin on Sun 20/05/2007 09:44:44
Fixed it. Must read the manual more carefully. But when I'm going to talk, this happend:
Quote
---------------------------
Adventure Game Studio
---------------------------
An internal error has occured. Please note down the following information.
If the problem persists, contact Chris Jones.
(ACI version 2.72.920)

Error: run_text_script1: error -6 running function 'character1_a':
Error: call stack overflow, recursive call problem?
in ScrollingDialog (line 102)
from ScrollingDialog (line 107)
from ScrollingDialog (line 114)
from ScrollingDialog (line 459)
from ScrollingDialog (line 514)
from ScrollingDialog (line 554)
(and more...)


---------------------------
OK   
---------------------------

Can't wait until I can get the demo and see what I'm doing wrong! >:(
This is just silly! I'm really need a tutorial for this or something...
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: monkey0506 on Mon 21/05/2007 16:13:46
Can you post the exact code you used? Because unless you've modified the script for the ScrollingDialog module...there's no way that error message is correct. The line numbers it's giving don't match up at all.

If all else fails would it be too much to ask for you to zip/rar up your game files and PM them to me?
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: Mazoliin on Mon 21/05/2007 17:15:13
On "Talk to character" I have...
gGui2.Visible = false;
ScrollingDialog.Start("new topic");


And this is how it look in the ScrollingDialog Script.

static void ScrollingDialog_SetupType::InitializeText() {
  // set up your dialog text here!
  ScrollingDialog.SetOption("new topic", 0, "this is some text");
  ScrollingDialog.SetOption("new topic", 1, "More text");
  }

void ScrollingDialogType::RunInteraction(String topic, int option) {
  if (this.GetSay(topic, option)) player.Say(this.GetText(topic, option));
  // set up your dialog interactions here!
  if (topic == "new topic") {
    if (option == 0){
      cGoog.Say("Eat fish!");
      cEgo.Say("Oh...");
    }
    if (option == 1){
      cGoog.Say("Fish, FISH!");
    }
    }
  }


I hope the demo will be available soon. I really think it would help me a lot.
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: monkey0506 on Tue 22/05/2007 03:40:16
I'll look into this problem, but I still don't see why it would producing that error with those line numbers. It's possible that I'm just creating a stack-overflow by trying to check that the parameters are valid...but...I'm currently exploring some new ideas about this module. No word as yet as to when the next beta will be released, but don't give up hope about me working on it.
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: Mazoliin on Fri 25/05/2007 14:35:29
OK! I'll just keep working whit every thing else and save the dialogs for later. ;)


[EDIT]
----------------------------------------------------------
I think I found a nother solution for my needs.
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: Gribbler on Fri 27/07/2007 14:19:36
Hi

Could someone provide an example on how to define and run dialog in game?
---------------------------------------------------------------------------------------------------------
static void ScrollingDialog_SetupType::InitializeText() {
  // set up your dialog text here!
  ScrollingDialog.SetOption("new topic", 0, "this is some text");
  }

void ScrollingDialogType::RunInteraction(String topic, int option) {
  if (this.GetSay(topic, option)) player.Say(this.GetText(topic, option));
  // set up your dialog interactions here!
  if (topic == "new topic") {
    }
  }
--------------------------------------------------------------------------------------------------------

maybe some demo code?
I have read the manual but I just can't quite figure it out...
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: monkey0506 on Sun 29/07/2007 15:42:46
Oh, sorry! I'd read this but got distracted. ::)

static void ScrollingDialog_SetupType::InitializeText() {
  // set up your dialog text here!
  ScrollingDialog.SetOption("merchant", 0, "this is option 0 of topic 'merchant'");
  ScrollingDialog.SetOption("merchant", 1, "How much for those fine leather jackets?");
  ScrollingDialog.SetOption("merchant", 2, "How much for the glass eyeball?");
  }


- The first parameter to this function is the name of your dialog. This is similar to the way you can name your dialogs in the dialog topic pane in the editor.
- The second parameter is the option number, which I've indexed from 0 instead of 1.
- The third parameter is the option text, similar to the way you set "Option names" in the editor.
- The next two parameters are optional:
   - state parameter: Controls the state the option starts out at; whether on or off (eScrollingDialog_OptionOn or eScrollingDialog_OptionOff usually). Defaults to eScrollingDialog_OptionOn. This is the same value as AGS's eOptionOn except the module has an extra value defined, 'eScrollingDialog_OptionOffByScrolling' so it's important to note that if the option has been turned off it will hold this value and not one of the values defined by AGS.
   - say parameter: Controls whether the option text (the "option name") should be said when you click on this option. Defaults to true.

void ScrollingDialogType::RunInteraction(String topic, int option) {
  if (this.GetSay(topic, option)) player.Say(this.GetText(topic, option)); // DO NOT EDIT OR REMOVE THIS LINE ;)
  // set up your dialog interactions here!
  if (topic == "merchant") {
    if (option == 0) { // "this is option 0 of topic 'merchant'"
      cMerchant.Say("That's great. Thanks for telling me.");
      player.Say("You're welcome.");
      }
    else if (option == 1) { // "How much for those fine leather jackets?"
      cMerchant.Say("They're on sale! They're only a hundred dollars a piece!");
      player.Say("I'll take eight!");
      }
    else if (option == 2) { // "How much for the glass eyeballs?"
      cMerchant.Say("25 cents a pieces.");
      }
    }
  }


You'll have to have a basic grasp on scripting to use this, but basically the format is that this function is called whenever you click on a dialog option. The appropriate dialog name and option number will be passed into the TOPIC and OPTION variables respectively. You can then check which topic has been called using a simple if statement as shown above. Next you can check which option it was called for, and finally you can set up your dialog interaction. This is whatever you want to take place when the user clicks on your dialog option. In the above example, if the player asks the merchant "How much for these fine leather jackets?" the merchant will give him a price quote, and the player can decide to buy some jackets.

I hope this has described it well enough to get you started. I really have to go, but if you have more questions don't hesitate to ask.
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: Gribbler on Sat 04/08/2007 00:46:30
I get the idea now, i think:) How can I run the dialog from the game? In the previous version of your module it was something like this:

// script for Character 1 (someguy): Talk to character
gMain.Visible = false;
ScrollingDialog.Run(0);

now it doesn't work cause it doesn't recognize "run".
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: Gribbler on Sat 04/08/2007 02:09:05
I suppose I should use ScrollingDialog.Start command so it would look like this:


// script for Character 0 (YGUY): Talk to character
player.Walk(142, 119, eBlock); 
player.FaceLocation(220, 113,eBlock);
gMain.Visible = false;
ScrollingDialog.Start("merchant");


The game compiles with no errors but when I'm trying to "talk to" the character the game crashes...

the dialog setup looks like the one you provided:


static void ScrollingDialog_SetupType::InitializeText() {
  // set up your dialog text here!
  ScrollingDialog.SetOption("merchant", 0, "this is option 0 of topic 'merchant'");
  ScrollingDialog.SetOption("merchant", 1, "How much for those fine leather jackets?");
  ScrollingDialog.SetOption("merchant", 2, "How much for the glass eyeball?");
  }

void ScrollingDialogType::RunInteraction(String topic, int option) {
  if (this.GetSay(topic, option)) player.Say(this.GetText(topic, option));
  // set up your dialog interactions here!
  if (topic == "merchant") {
    if (option == 0) { // "this is option 0 of topic 'merchant'"
      cBum.Say("That's great. Thanks for telling me.");
      cYguy.Say("You're welcome.");
      }
    else if (option == 1) { // "How much for those fine leather jackets?"
      cYguy.Say("They're on sale! They're only a hundred dollars a piece!");
      cBum.Say("I'll take eight!");
      }
    else if (option == 2) { // "How much for the glass eyeballs?"
      cYguy.Say("25 cents a pieces.");
      }
    }
  }


Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: monkey0506 on Sat 04/08/2007 04:48:03
Can you post the error message you're receiving when the game crashes (Ctrl+C to copy it)?

I don't see any obvious reason for it to be crashing based on the code provided, but knowing what error was generated will help me better determine why it crashed.
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: Gribbler on Sat 04/08/2007 10:12:03
I couldn't copy it so I took a screenshot and sent you via e-mail. Check it out. When I click on "OK" button the game closes and returns to the editor...
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: Gribbler on Sat 04/08/2007 12:28:07
damn... I just read earlier posts by Monkey Entertainment. I got exactly the same message.
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: monkey0506 on Sun 05/08/2007 06:28:37
I don't know why I thought the line numbers didn't match up...I checked and it makes perfect sense. It's a simple stack overflow...which is exactly what AGS said. My test dialogs (obviously) didn't encounter this, but it appears the end users are having problems.

Just a heads-up, I'm developing the latest version with AGS 2.8, so you'll need the latest version (which is still in beta) once I release the new version of the module. It re-implements some of the limits I tried to remove, but since it now uses dynamic arrays instead of storing all the data in Strings you'll get much faster data access in fewer function calls...so in theory this will eliminate the stack overflow...in theory. 8)
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: Lt. Smash on Sat 15/03/2008 12:07:05
Hey guys!

I keep getting an error message when calling ScrollingDialog.Start:

-------------------------------
An internal error has occurred. Please note down the following information.
If the problem persists, contact Chris Jones.
(ACI version 3.01.1012)

Error: run_text_script1: error -6 running function 'on_key_press':
Error: call stack overflow, recursive call problem?
in "ScrollingDialog_2_0_BETA_1.asc", line 102
from "ScrollingDialog_2_0_BETA_1.asc", line 107
from "ScrollingDialog_2_0_BETA_1.asc", line 114
from "ScrollingDialog_2_0_BETA_1.asc", line 459
from "ScrollingDialog_2_0_BETA_1.asc", line 514
from "ScrollingDialog_2_0_BETA_1.asc", line 554
-------------------------------

Does anybody now how to solve it?

And here is a suggestion for the module: I think it would be nice to be able to support bullets (in the form of buttons) for the available dialog options.

ps I know this thread is quite old but I don't wanted to start a new thread. I think it suits in here better.
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: monkey0506 on Sun 16/03/2008 03:59:31
Hmm...yes...I know what's wrong. I never released a fix for this version. I've been working too many hours lately and coming home mostly to find my two younger sisters exerting some sort of tyrannical dictatorship over the computer...

I know I said back in August I was working on a new version...but one thing led to another and I got sidetracked. My apologies.

I can't make any promises, but I'll try to have a fix up before the end of the month.
Title: Re: MODULE: ScrollingDialog v2.0 BETA 1 (Updated 25 March 2007)
Post by: monkey0506 on Mon 07/04/2008 18:44:56
I wanted to post an update on this. Due to certain circumstances beyond my control, I no longer have any reliable computer access. I can bum off the computers at Circuit City or at the apartment complex for Internet purposes, but it's not really any good for development.

Further complicating the matter, all my developmental files are saved to a SATA hard drive which is currently sitting on top of my dresser. Until I can afford to buy a computer and plug the HDD in...most of my files are somewhat in lock-down.

I apologize for the inconvenience and will try to update as soon as the issue is resolved.

-monkey
Title: Re: MODULE: ScrollingDialog v3.0 - Updated 27 January 2016
Post by: monkey0506 on Wed 27/01/2016 18:24:29
*bump* for new version. See first post for details.
Title: Re: MODULE: ScrollingDialog v3.0 - Updated 27 January 2016
Post by: selmiak on Thu 28/01/2016 00:53:40
what is scrolling dialog in a nutshell?
Title: Re: MODULE: ScrollingDialog v3.0 - Updated 27 January 2016
Post by: monkey0506 on Thu 28/01/2016 02:14:09
It's for custom dialog option rendering. To use the module you need to specify some basic info, such as the size and position of the "GUI" where the dialog options will be drawn:

Code (ags) Select
  ScrollingDialog.X = 0;
  ScrollingDialog.Y = 125;
  ScrollingDialog.Width = 320;
  ScrollingDialog.Height = 75;
  ScrollingDialog.TextColorNormal = player.SpeechColor;


That alone should be enough to get you going, I think. The normal text color should actually be defaulted by the module, but I think I overlooked that.

The other options allow you to change various other graphical features, background graphics, border decorations, scroll arrows, etc.

The module does much more than just provide scroll arrows at this point, but I kept the name for historical purposes. The early versions were the modularization of the scripts I submitted in my early days of AGS, long before the custom dialog rendering system was put into place.
Title: Re: MODULE: ScrollingDialog v3.0 - Updated 27 January 2016
Post by: daneeca on Fri 21/10/2016 15:40:53
It doesn't work with the newest AGS :-/ Can I fix it somehow?

QuoteFailed to save room room7.crm; details below
MathsPlus.ash(20): User error: The MathsPlus module requires AGS version 3.4.0.6 or higher. Please use a newer version of AGS to use this module.
Title: Re: MODULE: ScrollingDialog v3.0 - Updated 27 January 2016
Post by: daneeca on Fri 21/10/2016 15:54:44
Okay, don't listen to me! I just needed to rewrite the version numbers in the script.
Title: Re: MODULE: ScrollingDialog v3.0 - Updated 27 January 2016
Post by: Crimson Wizard on Fri 21/10/2016 16:18:26
Quote from: daneeca on Fri 21/10/2016 15:54:44
Okay, don't listen to me! I just needed to rewrite the version numbers in the script.

This is error in AGS, it cannot compare those versions properly. I hope to release a small patch soon with this bug fixed.
Until then simply change long version string into short one in the #ifver command (e.g. 3.4.0.6 into 3.4.0)
Title: Re: MODULE: ScrollingDialog v3.0 - Updated 27 January 2016
Post by: Monsieur OUXX on Sun 30/10/2016 17:22:13
in a nutshell, how do you hook into what the player is about to say?
Title: Re: MODULE: ScrollingDialog v3.0 - Updated 27 January 2016
Post by: tor.brandt on Tue 15/11/2016 01:13:30
Really great module! :-D

I'm using it for my game, and it's working perfectly - except for one minor detail:
I  wanted to create a sort of "loop" dialog that shows only one option at a time, going through three options, such that when 1 is chosen, 1 = off and 2 = on, when 2 is chosen, 2 = off and 3 = on, and when 3 is chosen, 3=off and 1=on, then the dialog stops.
And then if the player engages the dialog again, the dialog script starts over again from the beginning.

However, when I try to start the dialog again, the game crashes with the error:
"Error running function 'dialog_options_render': Error: Array index out of bounds (index: -1, bounds: 0..2".
This also happens if I don't stop the dialog after option 3, but instead tries to jump right back to 1.

The error seems to be that the module is not able to switch on a previously switched-off option, if at the same time there are no other options on (it could, however, do it fine if there were other options on as well).
Is there an easy way to fix this?

PS. I'm not really sure if what I want to do would be a problem in AGS in general, or if it's specifically your module that is not able to handle it...?
Title: Re: MODULE: ScrollingDialog v3.0 - Updated 27 January 2016
Post by: katie08cd on Sat 25/01/2020 20:29:19
hi guys, sorry with this plugin can I create a log dialogue to insert in my diary? thank you

(https://i.ibb.co/dJ4Mg31/2020-01-25-174541.png) (https://ibb.co/VpY9mhr)