Quantcast
Removing hex colors from text/string? - EQ2Interface
EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Display Modes
  #1  
Unread 11-15-2012, 03:55 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,206
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default Removing hex colors from text/string?

Anyone know of a method of shuffling a text string around in the UI to remove the hex code part?

Example being the On Screen Message window showing red text. Will instead of that text having a color property in the UI, SOE just uses stuff like:
\#FF0000The mob starts to cast a powerful effect.
Some of these events don't go into the chat window (for parsing) so I was trying to figure out a way to /say or /echo or whatever and plop the text there, but you can't put hex codes like that into normal chat text.

I found you can put it into a TextInput and see it visually, but doesn't really help for what I want. I want it going into text, aka, log files.

Anyone have any ideas for this?
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #2  
Unread 11-15-2012, 11:36 AM
Darqwood Darqwood is offline
A Mist Grinnin
Interface Author - Click to view interfaces
 
Join Date: Aug 2005
Server: Antonia Bayle
Posts: 77
Default

I went around in circles trying to do the same thing while I was working on the spellcast monitor -- getting "red text" messages into some kind of chat broadcast. The inline color codes are frustrating because the hex seems to be considered part of the string and never gets stripped out no matter what you push it through. My experience was that chat output was dropped completely if the inline color string came from anywhere other than the game code.

It just occurred to me that you might try concatenating some characters onto the beginning of the string, to fool the chat output into bypassing the code. Something like

x\#FF0000The mob starts to cast a powerful effect.
or
//\\#FF0000The mob starts to cast a powerful effect.

It may be that the inline code only gets processed if it's at the beginning of the line, or preceded by a non-alpha character. It wouldn't be pretty but it would at least be something you could reliably send to a chat channel. Not at my game computer right now so I can't test it.

Alternatively, you could come up with a list of known popup text strings including the inline color code, and test for the complete string. Known strings that include the character's name would have to be handled with ##


.
Reply With Quote
  #3  
Unread 11-16-2012, 12:36 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,206
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default

No luck concatenating it. I tried combing it with text into another element, and then passing it to a text box, where I combined it again with a string of text. I can visually see it in the text box, but the color code is still being parsed.

You can copy and paste it into your chat input, and it will work, but just trying to execute it from the Text Input as like a /say command, it won't work. It's strange.

*Edit*

Even in UIBuilder I've tried setting a value manually to test, such as:

OnShow= Parent.Object.text='\#FF0000Testing'

Even with the single quotes there, it still parses the coloring which is unfortunate. Preceding or appending the string doesn't affect it being parsed.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>

Last edited by Drumstix42 : 11-16-2012 at 01:28 AM.
Reply With Quote
  #4  
Unread 11-21-2012, 01:08 AM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 253
Default

The only thing I can think to suggest is try to see if the client's error messages will allow the strings to be visible.

It seemed like your requirement was that it was in the logfile somehow, for log parsing.

For instance "/act end" will output "Unknown command: act end." to the log file and chat screen. Though, can UI scripting even execute unknown commands? I forget.

Alternatives with error messages could include useabilityonplayer or any real command that accepts a string and can fail.

Since error messages are not seen by anyone but you, SOE may not have added checks for hex coloring.
Reply With Quote
  #5  
Unread 11-21-2012, 01:29 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,206
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default

Cool. Good suggestions, I'll try it out next time I feel like banging my head against the wall.

The biggest problem was getting the string into a command to fire at all because of parsing errors most likely. But it's possible this might get around it.

As for unknown commands, I'm not sure, but maybe the alias command could get around that as well.

And yeah the aim is really just to get it into the log anyway possible. Tons of new redtexts simply don't go into the chat window at all.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #6  
Unread 11-21-2012, 02:39 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 253
Default

I remember there being one mob in the last expansion that only had its text in that slow updating pop-up. If there are many more of them and they are important, I guess this is a good thing to research for me as well.
Reply With Quote
  #7  
Unread 11-21-2012, 03:49 PM
tknarr's Avatar
tknarr tknarr is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2006
Server: Unrest
Posts: 831
Default

Quote:
Originally Posted by EQAditu View Post
I remember there being one mob in the last expansion that only had its text in that slow updating pop-up. If there are many more of them and they are important, I guess this is a good thing to research for me as well.
There are a number. For instance, the gargoyle mob in ST:aTL. The announcement of what kind of damage you need to do is only in a pop-up. I'm wary, though. It seems like the devs did this deliberately to force players to pay attention to what's happening rather than just listen for instructions from ACT triggers and timers. If that's the case, figuring out a way to bypass it and get the messages into the log anyway may result in the devs making undesirable changes to the UI system to remove the bypass.
__________________
"Hey! I'm not illiterate. I had a book once. ...could've used some ketchup though..."
Reply With Quote
  #8  
Unread 11-21-2012, 05:10 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,206
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default

I kinda doubt it.

On some fights there are so many red messages, the only way to read them in time is to crank up the transition time and that completely sucks for attempting to read them/pay attention to what is going on otherwise.

Figuring out why you failed or who triggered something first is very hard to do when you can't view your chat log. The scripts a bit sloppy in some of these fights, even ones we've already killed.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #9  
Unread 11-22-2012, 08:30 AM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 253
Default

Quote:
Originally Posted by tknarr View Post
There are a number. For instance, the gargoyle mob in ST:aTL. The announcement of what kind of damage you need to do is only in a pop-up.
{...}
Never noticed since the red text immediately preceding the damage type certainly is in the log file. If both messages plus the green/red success/fail message are not ALL in the log, I haven't noticed the lack. The important message telling you to stop attacking is there and sufficient.

Quote:
Originally Posted by tknarr View Post
{...}
I'm wary, though. It seems like the devs did this deliberately to force players to pay attention to what's happening rather than just listen for instructions from ACT triggers and timers. If that's the case, figuring out a way to bypass it and get the messages into the log anyway may result in the devs making undesirable changes to the UI system to remove the bypass.
As I stated above, the red text warnings in the above example are sufficiently in the log file. If they want to hide half of it, I guess I didn't even notice. Obviously a non-issue.

What is an issue is when things *only* appear in the pop-up message and can be blocked by other pop-up messages that are less important. If your transition time is too high, you might miss things. Ever had to respec AAs for a raid encounter and get pop-up notifications for the next 5 minutes? I'm already annoyed that my "generic" red-text trigger will detect Timewarp being ready. I'm a Templar... what do I care about Timewarp?

Though as a side note, if your transition time is too high, any hack we're talking about here will be affected as well. So we'll be forced to turn it down to nothing and assume the log file is enough? That's sort of too bad.
Reply With Quote
  #10  
Unread 11-22-2012, 08:44 AM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 253
Default

Quote:
Originally Posted by tknarr View Post
There are a number. For instance, the gargoyle mob in ST:aTL. The announcement of what kind of damage you need to do is only in a pop-up.
{...}
Actually, you forced me to look at my logs and contest this...
Code:
(1351827178)[Thu Nov 01 23:32:58 2012] \#FF0000Eudoxxus begins his ritual of stone.  The first damage he takes once the ritual completes will determine the rituals success!
(1351827183)[Thu Nov 01 23:33:03 2012] \#FF0000The ritual can be blocked with noxious damage!
(1351827187)[Thu Nov 01 23:33:07 2012] \#00FF00Anavari blocks the ritual of stone with an attack!


The only mob I remember seeing a lack of logging before was Balor the Primeval -- the construct guy with the red-text joust.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:39 PM.


Our Network
EQInterface | EQ2Interface | War.MMOUI | WoWInterface | VGInterface | LoTROInterface | MMOInterface