Jibble

Author Topic: change text color per character on Sierra with Background  (Read 1138 times)

eri0o

Hi,

My game is using the Dialog -> Speech Style SierraWithBackground . I have a Custom text-window GUI set under the Text output of global settings.

What I would like to know is if it's possible to change the text color of the dialogs to use the speaking character SpeechColor.

If it's not, is there a way to reimplement the character.Say(string) function ? I am using dialogs, so alternatively, if there is a way to change how the dialogs process the text to make the game script it would be cool too.

eri0o

Ok, maybe I need to create my custom function and use this plugin to convert.

http://www.adventuregamestudio.co.uk/forums/index.php?topic=39568.0

I have to say I am not really happy having to use an dll so I may not use it at all, because I don't know if I can guarantee it will always work with future AGS releases.

I have to say I am not really happy having to use an dll so I may not use it at all, because I don't know if I can guarantee it will always work with future AGS releases.

It is Editor's plugin, which has almost 100% chance to work with future releases, because Editor's plugin system is much better written than the engine's.

Although, you do not have to use it, it probably makes using custom functions easier, but same thing could be done by hand (more routine work).
« Last Edit: 19 Jul 2017, 12:41 by Crimson Wizard »

eri0o

So I would expect something like this would be required:
 
Code: Adventure Game Studio
  1. function MySay(this Character*, const string message,  ...) {
  2.   gTextGui.TextColor = this.SpeechColor
  3.   this.Say(message,  ...)
  4. }
  5.  

But I couldn't find how to modify the TextColor propertie that is used when rendering the text from GUI... Which mean the awful hack I could manage is either -> have multiple GUIs, and use if/switch to change between. Or reimplement all sierra text rendering in AGS script. Is there something I am missing here?

But I couldn't find how to modify the TextColor propertie that is used when rendering the text from GUI... Which mean the awful hack I could manage is either -> have multiple GUIs, and use if/switch to change between. Or reimplement all sierra text rendering in AGS script. Is there something I am missing here?

I've just added this property to AGS 3.5.0.

Don't remember if there was any trick to change the TextWindow's text color without scripting your own speech (using normal GUI + Label).
« Last Edit: 20 Oct 2018, 19:10 by Crimson Wizard »

Snarky

  • Global Moderator
  • Global Moderator
  • Mittens Lord
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
I don't think so. I haven't found it, anyway.

Someone else reported the same problem earlier this year: http://www.adventuregamestudio.co.uk/forums/index.php?topic=55934.0

My workaround attempt would probably be to set the speech text to transparent and display another transparent GUI with a text label on top, but I'm not sure it would work: AGS handling of speech commands is tricksy.

By the way, is it good that Character's speech color property does not work for Sierra with background speech style? I guess, originally separate features were emulating separate game styles, but now whole builtin speech system works so inconsistently. Perhaps it may be worth to fix the design a bit, for instance add a choice between using GUI's own text color and automatically acquiring Character's speech color, regardless of the chosen speech style.

eri0o

I would love having this option! It could also just use character speech color if text color in GUI is set to 0 if adding an option under Game object is more complicate. There are a lot of intrincacies in the way Sierra mode handles speech, it's really amazing and I love how well it works!

Sometimes I don't really know if it should be handled in a module instead of engine code - I guess the engine has to have a minimum code to write text in boxes on the screen for at least the default messages and maybe some stuff is borrowed from there.