Titan Network

Community => City of Heroes => Topic started by: Shenanigunner on May 26, 2019, 02:07:51 AM

Title: Chat bubble colors via /optionset?
Post by: Shenanigunner on May 26, 2019, 02:07:51 AM
Okay, Ima stuck again. I've done everything to try and figure out how to set chat bubble colors USING a bind that USES /option_set chatbubblecolor1 <some damned color code>.

The command (and chatbubblecolor2) both respond as if good with almost any value or string in the color code position - "red", "#ff00ff", random numbers. But only once in a while will a value nudge the Options sliders to a different position; all failed slash commands set both text and background to black.

No, the wiki doesn't have this info, not that I can find. Some other chat bubble color techniques, yes.

No, looking at a saved options file doesn't help - there's a variable length hex string for both values, but even putting this value back into the command, with or without a leading #, produces no better results.

Does ANYONE know what format of color value is wanted here? It has to be a single element; about the only thing I didn't try was RGB values along the lines of "128 0 64" or some such.
Title: Re: Chat bubble colors via /optionset?
Post by: eabrace on May 26, 2019, 03:04:36 AM
If I remember correctly (and I might not), and valid CSS color code should work.
Title: Re: Chat bubble colors via /optionset?
Post by: Shenanigunner on May 26, 2019, 04:17:02 AM
Nope, tried several variation of CSS/HTML color codes, with and without a #. The values in the option file are six or eight hex characters with no pound sign, and using them in the command with and without a pound produces nothing useful.

Arrgh.
Title: Re: Chat bubble colors via /optionset?
Post by: Korbian on May 29, 2019, 05:50:59 PM
I have no way to know for sure, but it's possible they use the same color codes as the costumes.

Changing Costume Colors in the database:

To change colors of your costume parts and FX. You will need to use Blue Green and Red format like the normal costume files use and take the 3 numbers; Multiply blue by 65536  green by 256 and add them together. White would be255,255,255 = 255*65536 + 255*256 + 255 = 16777215.  Thank you Leandro for the explanation of changing color.
Title: Re: Chat bubble colors via /optionset?
Post by: Shenanigunner on May 29, 2019, 09:49:30 PM
That's almost certainly it, thanks - I will test.

Haven't used composite color numbers like this for a long time...
Title: Re: Chat bubble colors via /optionset?
Post by: Shenanigunner on May 30, 2019, 04:40:37 PM
Well... it does something, just not anything predictable.

It's a bit of a laborious process, as you have to enter the slash command, then reopen the Options window to see where the chat bubble color sliders are. It won't update while the window is open, and I haven't found a way to just pop a chat bubble without spamming a channel.

But anyway... this process does affect the color, but not in any predictable way.


I'd dinked around a lot with this, and can't begin to figure out what input it wants.
Title: Re: Chat bubble colors via /optionset?
Post by: Tahquitz on May 30, 2019, 06:29:53 PM
Try this:
Code: [Select]
/local <scale 1.50><color #00ff00><bordercolor #ffff00><bgcolor #9f00ff>I just leveled, kneel before me!!!
Explanation --
scale: can be a decimal size from 0.5 to 1.5. 1.0 is regular size.
color: color of text.  Use RGB codes from HTML HEX colors.
bordercolor: color of bubble border.  Same RGB codes as "color".
bgcolor: bubble background color.  Same RGB codes as "color".

HTML Hex Colors uses six hexadecimal colors for Red, Green and Blue in that order. 00 is no color, FF is full blast.  Every number in between is a tint of that color.
00, 33, 66, 99, CC, FF are example steps for one of the colors.

The colors are Red, Green, Blue in that order, so:

#FF0000 would be Red (Red: FF, Green: 00, Blue: 00)
#00FFFF would be Cyan (Red: 00, Green: FF, Blue: FF)
#FFFF00 would be Yellow (Red: FF, Green: FF, Blue: 00)

Or you can use a color picker to do this for you (https://htmlcolorcodes.com/).

I don't know how Optionset works, but that might be a clue in figuring it out.

Title: Re: Chat bubble colors via /optionset?
Post by: Shenanigunner on May 31, 2019, 04:19:12 PM
I don't know how Optionset works, but that might be a clue in figuring it out.

Thanks for the input, but no, it's not simple hex color definitions. (I have a lot of background in color definition using all the different models, and I've applied everything I know... without success.)

The two optionset color definitions are using some oddball composite number that doesn't fit anything standard. Not decimal RGB. Not hex RGB. Not the composite-number model noted above. It's looking for some very specific composite number up in the ten-millions, decimal, but exactly what... may just not be worth chasing any more. :P
Title: Re: Chat bubble colors via /optionset?
Post by: eabrace on June 01, 2019, 02:35:18 AM
How does the composite change if you treat it as RGBA where A is the alpha channel for transparency?
Title: Re: Chat bubble colors via /optionset?
Post by: Shenanigunner on June 01, 2019, 07:50:09 PM
Chat bubbles don't allow transparency, but that's a damn good idea about how the composite might be constructed (for historical reasons, or programmer quirk, or waddevah. Will try it.
Title: Re: Chat bubble colors via /optionset?
Post by: eabrace on June 01, 2019, 09:47:25 PM
Chat bubbles don't allow transparency,
Oh, but they do (https://paragonwiki.com/wiki/Chat_Bubble_Customization#Transparency).
Title: Re: Chat bubble colors via /optionset?
Post by: Shenanigunner on June 01, 2019, 11:17:07 PM
Oh, but they do (https://paragonwiki.com/wiki/Chat_Bubble_Customization#Transparency).

Huh. Missed that.  :-[

ETA: So badly that I didn't remember I already had it in the Guide. Gahhhh...

However, no combination of eight hex digits or decimal equivalents seems to work for the Options method.
Title: Re: Chat bubble colors via /optionset?
Post by: Shenanigunner on June 25, 2019, 03:27:13 AM
Just some followup. I have figured out that the values in the options file are simple hex - RRGGBBXX, with the last two digits always written as FF and having no apparent effect on the chat bubble. Simple, right? Interestingly, the lowest value written (for 0%) is 01, although 00 works on load. Leading zeros are omitted, which can be confusing.

However, I still can't make any sense of what values the UI wants for the /optionset ChatBubbleColor1 and 2 commands. It's not hex numbers, with or without a # in front. Low numbers down to 0 make text and background black, but every possible combination of decimal-converted hex as above generates various light shades of blue.

I guess being able to set the values in the option file is a good step, but what in the hell it wants for inline commands, or why there are no slash commands to set border or transparency... well, kids, it's a mystery.
Title: Re: Chat bubble colors via /optionset?
Post by: MyriVerse on June 25, 2019, 04:32:44 PM
I thought the final two digits were opacity? Oh wait... that's background. Transparent letters is... counterproductive.
Title: Re: Chat bubble colors via /optionset?
Post by: Shenanigunner on June 25, 2019, 08:46:58 PM
Nope. if there's an optionset keyword for border or opacity, I don't know it. The last two digits on color are just placeholders... for no reason I know. :)

By the way, has anyone ever noticed that team chat bubbles are slightly transparent and have a zig-zag pointer, while all others are (by default) solid and have a straight pointer? That's team, SG and I'm not sure which of the other team/group channels. Weird.