Hi!
Let's see if you can help me with a small problem with the dialog options. It turns out that if the player must choose between many options, and therefore must use the down arrow of the dialog guide a lot, the next time the dialog options are displayed it remains anchored in that position, for example in the option of 5 or 6. And it is possible that they are empty and that the player does not see anything and must use the up arrow several times to see the new dialog options.
Is there any way to force the dialog options to refresh and thus avoid this little problem?
Thanks in advance.
Are you using custom dialog code or a module?
I'm just using the Tumbleweed template.
Quotethe next time the dialog options are displayed it remains anchored in that position, for example in the option of 5 or 6. And it is possible that they are empty and that the player does not see anything and must use the up arrow several times to see the new dialog options.
This is not an expected behavior at all.
This sounds like a serious bug either in template or the engine (I do not know how Tumbleweed's dialog options are made).
I might also suggest to put the template's name into the topic title, because this may be relevant.
Please also tell, which version of AGS are you using, in case that matters? (also will help to know the version of Tumbleweed template)
I am using version 3.5.1.
I don't know where the version of the template is indicated, but it is the one that came by default with that version of the engine.
The Tumbleweed template uses a "simplified fork of CDG" (CustomDialogGui). I looked at the code and tried for a few minutes to come up with a quick fix but gave up because the relevant variables aren't that well documented / named.
It uses CDG_options.scroll_from and CDG_options.scroll_to for instance, and I suspect the fix needs to reset those, but I wasn't in the mood for shotgun debugging.
Tumbleweed template is maintained by
@abstauber , perhaps it's worth messaging him,
or report either in the dedicated forum thread:
https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/template-tumbleweed-verbs-1-4/
or in its repository here:
https://github.com/dkrey/ags_tumbleweed/issues
I'll send him a message to see if he can help us.
Hi,
before I start digging deeper into this issue: Is this option present in your version of the template and set to true?
TemplateSettings.asc
// Always begins the dialog with the first option available
CustomDialogGui.DialogGuiOptions[eDialogGui_reset_scrollstate] = true;
Hi!
Yes, it is present and set to true.
Hmm.. I'm having trouble replicating the issue with the current version of the template. But in the revision history I see that a bug has been fixed two years ago.
I'm pretty sure that the code is backwards compatible. In case you didn't change the module, could you please try to update it with these most recent files?
https://raw.githubusercontent.com/dkrey/ags_tumbleweed/master/CustomDialogGui.asc
https://raw.githubusercontent.com/dkrey/ags_tumbleweed/master/CustomDialogGui.ash
(and of course make a backup of the old files)
It gives me this error:
CustomDialogGui.asc(396): Unknown preprocessor directive 'else'
It's here:
// Get viewpoint
#ifdef SCRIPT_API_v3507
vp_width = Screen.Width;
vp_height = Screen.Height;
#else
vp_width = System.ViewportWidth;
vp_height = System.ViewportHeight;
#endif
Get viewpoint
#ifdef SCRIPT_API_v3507
vp_width = Screen.Width;
vp_height = Screen.Height;
#endif
#ifndef SCRIPT_API_v3507
vp_width = System.ViewportWidth;
vp_height = System.ViewportHeight;
#endif
Else clause in the preprocessor is added only in 3.6.1.
Also why are you using 3.5.1 ?
Thank you! I've been testing and it seems to have been solved.
What happens is that now another problem has appeared. In this new version of CustomDialogGui it seems that the texts used change color and by default they are painted black. The background that I use is black and they cannot be seen, only when you move the cursor over it because they change color.
I have been looking in the TemplateSettings, but the option to change the color for the texts already used does not appear, only these two options appear:
CustomDialogGui.DialogGuiOptions[eDialogGui_text_color] = 23420;
CustomDialogGui.DialogGuiOptions[eDialogGui_text_color_active] = 24188;
How could I fix this?
Thank you!
I'm using this version simply because it's the one I started this project on, and I haven't updated it.
Well, I think that's it. I have added this line:
CustomDialogGui.DialogGuiOptions[eDialogGui_text_color_chosen] = -----;
Now it seems to work fine. Thank you!
Those numbers are colors, you can pick a color and copy its number in the Palette node of the project tree.
Alternatively you can use Game.GetColorFromRGB(r, g, b).
Yes I know. I have already modified them. :)
My bad, I forgot that this settings was introduced - sorry.
Great to know that you managed to solve this (nod)
Quote from: Carles on Wed 10/01/2024 13:23:26Well, I think that's it. I have added this line:
CustomDialogGui.DialogGuiOptions[eDialogGui_text_color_chosen] = -----;
Now it seems to work fine. Thank you!
This should not even compile. This sequence of hyphens doesn't make sense. It should be an integer number between 0 and 65535 afaict.
Of course. I have put the hyphens so as not to put any specific number.