change text color per character on Sierra with Background

Started by eri0o, Fri 14/07/2017 03:09:50

Previous topic - Next topic

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.

Crimson Wizard

#2
Quote from: eri0o on Wed 19/07/2017 01:31:45
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).

eri0o

So I would expect something like this would be required:

Code: ags

function MySay(this Character*, const string message,  ...) {
  gTextGui.TextColor = this.SpeechColor
  this.Say(message,  ...)
}


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?

Crimson Wizard

#4
Quote from: eri0o on Sat 20/10/2018 17:02:07
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).

Snarky

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.

Crimson Wizard

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.

SMF spam blocked by CleanTalk