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 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 ## . |
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. |
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. |
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 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.
|
Quote:
|
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. |
Quote:
Quote:
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. |
Quote:
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! 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 06:34 PM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI