EQ2Interface.com
Search Downloads


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

Reply
 
Thread Tools Search this Thread 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,287
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's Avatar
Darqwood Darqwood is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Aug 2005
Posts: 849
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,287
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: 256
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,287
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: 256
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
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 08:48 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI