More speech triggers for DialogDisplayEdit (1 Viewer)

Corgalas

Vivacious Visitor
Joined
Feb 11, 2013
I feel like I've asked this already or maybe I've seen somebody else ask it, but here goes anyways.

Currently, you can use DDE to set each of the three speech triggers (Her, Thought, Him) to be a color of your choosing. My current setup is Her = Pink, Him = Blue, Thought = White.

Say you're writing a dialog that has more than just two people (him and her). With another person out of frame taking part in the conversation. We could call this trigger Her2 and make it Purple.


Would this be possible through a mod?
 

aztlan

Casual Client
Joined
Sep 14, 2013
Can't you use dialogue (via Dialogue Actions or some other mod) to change the background color of any given text box?
 

Rudgar

Content Creator
Joined
Nov 18, 2016
Can't you use dialogue (via Dialogue Actions or some other mod) to change the background color of any given text box?
Can we? How? I'd be very interested in a solution of this task ...

Respectfully, Rudgar
 

Jaxx

Content Creator
Joined
Aug 15, 2016
No, we cannot. To have more than 3 text bubbles color, or to dynamicaly change one of them while a dialog is running, it would require a mod update from sby. But that guy is so helpful, you might give it a try and ask him :smile:
I would add that if he ever fullfills your request, I'll make use of it as well :grin:
 

Corgalas

Vivacious Visitor
Joined
Feb 11, 2013
That was my main point really.
The game offers three text box types.
We need to make more ultimately.
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
here you go, posted an update
dialogdisplayedit

example lines:
intro:"thought style" {"style":"Thought"}
intro:"her style" {"style":"Her"}
intro:"him style" {"style":"Him"}
intro:"alt1 style" {"style":"Alt1"}
intro:"alt2 style" {"style":"Alt2"}
intro:"alt3 style" {"style":"Alt3"}

i figured 3 extra styles would work. but can be easily bumped up. i suppose people could want more if they were doing fancy stuff like slave bazaar or trying to use styles to go with mood.


edit - if somebody really wants some flexible variety and wants to put in the time to define various colors, start making a list of the color settings. so like:

Purple:
bgredmultalt3=0 //multiplier of current red background value, caps result at 255
bgbluemultalt3=0 //multiplier of current blue background value, caps result at 255
bggreenmultalt3=0 //multiplier of current green background value, caps result at 255
bgredoffsetalt3=150 //0-255, adds amount to current red background color
bgblueoffsetalt3=150 //0-255, adds amount to current blue background color
bggreenoffsetalt3=0 //0-255, adds amount to current green background color
;
textredmultalt3=0 //multiplier of current red text value, caps result at 255
textbluemultalt3=0 //multiplier of current blue text value, caps result at 255
textgreenmultalt3=0 //multiplier of current green text value, caps result at 255
textredoffsetalt3=-200 //0-255, adds amount to current red text color
textblueoffsetalt3=-200 //0-255, adds amount to current blue text color
textgreenoffsetalt3=-200 //0-255, adds amount to current green text color


then i could add them in as predefined like:
intro:"this is the purple style" {"style":"Alt_Purple"}

ideally, you want some good contrast between the text color and the background color
 
Last edited:

Jaxx

Content Creator
Joined
Aug 15, 2016
I formerly posted a message that I deleted because I understood my mistake shortly after, but I noticed a couple of issue though.
First, just an information mistake, no big deal, the opacity value for the background doesn't seem to be between 0 and 1 but 0 and 2.9
Then, and this one is a bit more anoying, when there is a line following an "Alt#" style line, wich is not "Him" or "Thought" style, the style is incorrect, the "Alt#" style remains.
Example:
"Alt1" style line1 (ok) -> "no style" line2 (nok, "Alt1" style applies)
"Alt1" style line1 (ok) -> "Him" or "Thought" style line2 (ok) -> "no style" or "Alt#" line 3 (ok)
"Alt1" style line 1 (ok) -> "Alt2" style line 2 (nok, "Alt1" style applies) -> "no style" or "Alt3" style line 3 (nok, "Alt1" style applies)

Here is a simple test dialog I wrote to illustrate this:
Code:
dialogue_name:"Test"

intro:"[general]"{"style":"Thought"}
general:"alt1 style[other_style]"{"style":"Alt1"}
general:"alt2 style[other_style]"{"style":"Alt2"}
general:"alt3 style[other_style]"{"style":"Alt3"}
other_style:"her style[her_style]"
other_style:"him style[her_style]"{"style":"Him"}
other_style:"thought style[her_style]"{"style":"Thought"}
other_style:"alt1 style[her_style]"{"style":"Alt1"}
other_style:"alt2 style[her_style]"{"style":"Alt2"}
other_style:"alt3 style[her_style]"{"style":"Alt3"}
her_style:"her style"
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
I formerly posted a message that I deleted because I understood my mistake shortly after, but I noticed a couple of issue though.
First, just an information mistake, no big deal, the opacity value for the background doesn't seem to be between 0 and 1 but 0 and 2.9
Then, and this one is a bit more anoying, when there is a line following an "Alt#" style line, wich is not "Him" or "Thought" style, the style is incorrect, the "Alt#" style remains.
Example:
"Alt1" style line1 (ok) -> "no style" line2 (nok, "Alt1" style applies)
"Alt1" style line1 (ok) -> "Him" or "Thought" style line2 (ok) -> "no style" or "Alt#" line 3 (ok)
"Alt1" style line 1 (ok) -> "Alt2" style line 2 (nok, "Alt1" style applies) -> "no style" or "Alt3" style line 3 (nok, "Alt1" style applies)

Here is a simple test dialog I wrote to illustrate this:
Code:
dialogue_name:"Test"

intro:"[general]"{"style":"Thought"}
general:"alt1 style[other_style]"{"style":"Alt1"}
general:"alt2 style[other_style]"{"style":"Alt2"}
general:"alt3 style[other_style]"{"style":"Alt3"}
other_style:"her style[her_style]"
other_style:"him style[her_style]"{"style":"Him"}
other_style:"thought style[her_style]"{"style":"Thought"}
other_style:"alt1 style[her_style]"{"style":"Alt1"}
other_style:"alt2 style[her_style]"{"style":"Alt2"}
other_style:"alt3 style[her_style]"{"style":"Alt3"}
her_style:"her style"
rewrote mod using proxy, should be considerably more reliable. if you want to do some testing here ya go, i left debug messages in there.
I was thinking of expanding it to also allow custom coloring for alt thought styles as well (it has the faded edges instead of the saying style)

edit - removed attachement
 
Last edited:

Jaxx

Content Creator
Joined
Aug 15, 2016
Nice, the right style now apply, this part is good.
However, the bgalpha value seems to be ignored, it looks like it's a constant, nothing change despite trying different values.
I have the same opinion as Rudgar about expanding the thought style, it would be a very nice feature :smile:
 

Jaxx

Content Creator
Joined
Aug 15, 2016
Oh dear... I found the trickiest bug I ever saw! :grin::grin::grin: However, I don't know if dialogdisplayedit is responsible for it, I'll have to investigate some more.
If ever I have a line where a dialog contains the word "finish" (the word, not the *finishes* variable), this line from the .txt dialog file is never added to the in-game dialog, it doesn't show up, only, and only, if there's a "style" applied. If you do not specify any style, the line is added anyway. It took me some time to figure out where did it come from. I'll let you know if I can tell if it comes from one of your mods.

Eveything else is just fine.
I was wondering... do you think it could be possible to load different configuration files for dialogdisplayedit without reloading another folder, using a dialog trigger?
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
do you want something like
[dialogdisplayedit_her_pink]
to change her dialog to a pink background (with probably black text)?
 

Jaxx

Content Creator
Joined
Aug 15, 2016
I was thinking about loading a whole configuration file that would allow a complete change of the colors and opacity settings.
But if it's easier for you to add presets inside the configuration file, and change the styles by applying them a preset, this is fine too.
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
I was thinking about loading a whole configuration file that would allow a complete change of the colors and opacity settings.
But if it's easier for you to add presets inside the configuration file, and change the styles by applying them a preset, this is fine too.
i have come up with these hard coded colors:
[dialogdisplayedit_'style'_'color']

harcoded colors:
red,orange,yellow,limegreen,green,aquamarine,cyan,skyblue,blue,purple,magenta,pink,custom


since it seems like you want this the most, if you (or others interested enough) would like to define some additional colors just paste them here in this format (that way i can easily copy and paste them into the mod. bg is dialog background, text is dialog text):
colormap_bg_redmult["red"] = 0;
colormap_bg_greenmult["red"] = 0;
colormap_bg_bluemult["red"] = 0;
colormap_bg_redoffset["red"] = 255;
colormap_bg_greenoffset["red"] = 50;
colormap_bg_blueoffset["red"] = 50;

colormap_text_redmult["red"] = 0;
colormap_text_greenmult["red"] = 0;
colormap_text_bluemult["red"] = 0;
colormap_text_redoffset["red"] = 0;
colormap_text_greenoffset["red"] = 0;
colormap_text_blueoffset["red"] = 0;

here is a website to easily define colors in these rgb formats:
HTML Color Picker

i essentially added a lighter version of every other color on that html color picker table
 

Jaxx

Content Creator
Joined
Aug 15, 2016
Ah this is very sweet.
But I'm a bit concerned about this way of doing, you're not gonna update your mod each time someone plan to use a new color.
For example, if one have a dialog with several characters, and want to define colors matching their hair and/or eyes color for each character to ease identification, they probably won't match the hardcoded colors and will come to you with an update request.
Further more, as background and textcolors have to be contrasted, it would require a lot of different colors.
You're already doing so much for the community, I don't want you to add more work uppon yourself dude!

I don't know much about AS flexibility, it probably requires every variable declared, so I understand that my proposition would probably imply using arrays and cycling them all several times if you had to parse a configuration file with a structure that could change, then cycling them over again to check if the trigger is requesting something defined, that I know to be quite anoying.

So here is my idea:
why not adding one more alt style, called custom, that could be set over triggers like [dde_setcustom_bgmult_<red_mult_value>_<green_mult_value>_<blue_mult_value>], [dde_setcustom_textmult_<red_mult_value>_<green_mult_value>_<blue_mult_value>], and [dde_setcustom_bgcolor_<######>] (using the web rrggbb format) and [dde_setcustom_textcolor_<######>], used with {"style":"SpeakCustom"}, {"style":"ThoughtCustom} and {"style":"HimCustom"}
That way, every user could define any bg and text color for one specific style at any time.
You could even add the possibility to use [dialogdisplayedit_<style>_custom] for more flexibility.

What do you think about this?
 
Last edited:

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.