Mittens 2018 will be in Boston this September. There are three spaces left, so check out the thread for details!

Author Topic: [A bug?] game.dialog_options_highlight_color variable doesn't work  (Read 151 times)

Ibispi

    • I can help with making music
    •  
    • I can help with play testing
    •  
    • Ibispi worked on a game that was nominated for an AGS Award!
I'm using AGS version 3.4.1.12 (which is the beta version I think), and I've tried to set this variable to a certain color number so as to change the color of the dialogue options highlight.
I've tried setting it at game start, whenever a room opens, at the beginning of a dialogue but to no avail.
Just in case I'm not doing it properly, I do this:
Code: Adventure Game Studio
  1.  game.dialog_options_highlight_color = 30004;
It just picks some default color based on the character's dialogue color instead. In my case:

Matt also tested it out himself on his computer and he found out that it worked in an older version but in this version I am using it made all his highlights grey even when he set it to another color.
So it's probably just a bug in this beta version.
« Last Edit: 15 Apr 2018, 19:38 by Ibispi »

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
No, 3.4.1.12 is not a beta version, it is a normal release.

What kind of dialog rendering you are using? Is it custom rendering, or default one, and how do you set up its GUI? And if it is custom rendering, then could you show the code?

Also, what was the old version this worked in?

Ibispi

    • I can help with making music
    •  
    • I can help with play testing
    •  
    • Ibispi worked on a game that was nominated for an AGS Award!
Hey Crimson Wizard, thanks for answering!

I am not sure if I'm using custom or default rendering, but I have a custom-made GUI for the dialogue options (I assume that makes the rendering custom? :=) and then I just selected the GUI in the general settings for the dialogue options gui.

The code in the global script .asc:
Code: Adventure Game Studio
  1. function game_start()
  2. {
  3.   game.max_dialogoption_width = 800;
  4.   game.dialog_options_highlight_color = 30004;
  5. }
  6.  
Also, I was wrong about it working for Matt in the past, he just told me it didn't actually work for him (it's version 3.4.0.16). Sorry about that.
But I do remember using this variable for All pigs deserve to burn in hell and I think (not 100% certain) it worked back then.

EDIT: Here's more information about the dialogue rendering if it helps:

« Last Edit: 15 Apr 2018, 21:29 by Ibispi »

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Alright. Apparently, there is some faulty logic in AGS, which results in following: if you are using TextWindow type of GUI, it resets highlight color to TextWindow's own TextColor property, and if it matches player's speaking color, then to default magenta (color 13).

It's hard to make much sense in what is going on there (this was one of the strangest parts in AGS).
(Also, all this time I did not know that default dialog options use Character.SpeechColor as text color...)

So, I think you need to setup TextWindow's TextColor instead of the game.dialog_options_highlight_color.

But I agree, this should be fixed, because it makes no sense imo.


EDIT: just realized, this dialog_options_highlight_color was added by Gurok in earlier updates, but it seems it does not get used with TextWindow gui for some weird reason. Maybe we just forgot to test that.
« Last Edit: 16 Apr 2018, 22:16 by Crimson Wizard »

Ibispi

    • I can help with making music
    •  
    • I can help with play testing
    •  
    • Ibispi worked on a game that was nominated for an AGS Award!
It sounded simpler when you described it, as I was trying to implement your suggestion I realized how silly it is. So...
When I changed the font color of the gui to the one I wanted to be the highlight color it changed all the dialogue to be this color.
Which means that text gui font color equates to dialogue font color and dialogue option highlight.
Dialogue options are however based on player's speech color.
So what I did is I picked a somewhat grey color for the player's speech color and I kept the white color for the dialogue font color. It's not exactly what I wanted but it looks a lot better than the magenta alternative!

How it looks like now:


Thanks for the help Crimson Wizard.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
When I changed the font color of the gui to the one I wanted to be the highlight color it changed all the dialogue to be this color.
Which means that text gui font color equates to dialogue font color and dialogue option highlight.

Not sure if I understand you correctly, but you could create two separate TextWindow GUIs, one for speech and one for options.

As for fixing this... I am now in doubts. I think the whole system need to be revised, and proper strict rules be set: how is the options color is decided, and how is hilighted color is decided, etc. Right now it's a real mess.

Ibispi

    • I can help with making music
    •  
    • I can help with play testing
    •  
    • Ibispi worked on a game that was nominated for an AGS Award!
I hadn't known that I can create 2 different text guis, I just did and it solves the problem I've been having. I had thought that the second text gui is for description, not dialogue >_>
but I was wrong.
But yeah it still seems a mess.