EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Removing hex colors from text/string? (https://www.eq2interface.com/forums/showthread.php?t=16714)

Drumstix42 11-15-2012 03:55 AM

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?

Darqwood 11-15-2012 11:36 AM

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 ##


.

Drumstix42 11-16-2012 12:36 AM

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.

EQAditu 11-21-2012 01:08 AM

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.

Drumstix42 11-21-2012 01:29 AM

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.

EQAditu 11-21-2012 02:39 PM

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.

tknarr 11-21-2012 03:49 PM

Quote:

Originally Posted by EQAditu (Post 101646)
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.

Drumstix42 11-21-2012 05:10 PM

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.

EQAditu 11-22-2012 08:30 AM

Quote:

Originally Posted by tknarr (Post 101648)
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 (Post 101648)
{...}
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.

EQAditu 11-22-2012 08:44 AM

Quote:

Originally Posted by tknarr (Post 101648)
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.


All times are GMT -5. The time now is 05:03 AM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI