EQ2Interface.com
Search Downloads


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

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 05-18-2018, 09:35 PM
Seagoat's Avatar
Seagoat Seagoat is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: May 2005
Server: Crushbone
Posts: 298
Default Extracting portion of a GameData string

Still chipping away at updating my XP Bars mod, and I'm curious if there's a way to extract only a portion of the string returned by a GameData element.

For instance, I'd like to get only the class name from /GameData.Self.AscensionLevelClass. The default string returned is "Level X Classname," and while there's a way to get just the level with GameData (.AscensionLevel), there's no class name equivalent.

Is there a DynamicDataFilter that will accomplish this (I am a 100% bitflag noob), or a bit of fancy code I can use to return only the third word in the string?
Reply With Quote
  #2  
Unread 05-19-2018, 08:42 AM
Darqwood's Avatar
Darqwood Darqwood is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Aug 2005
Posts: 847
Default

Splitting a string into parts generically, I've never found a way to do that. But you can do your specific example by setting up four concatenated strings:

"Level " ## .AscensionLevel ## " Elementalist"
"Level " ## .AscensionLevel ## " Etherealist"
"Level " ## .AscensionLevel ## " Geomancer"
"Level " ## .AscensionLevel ## " Thaumaturgist"

and then compare each of them to .AscensionLevelClass. If the character has an Ascension class, one of them will match. It's not sexy but it works. There is an example "FindAscClass" in the DarqUI broker window.



.

Last edited by Darqwood : 05-19-2018 at 08:17 PM. Reason: Concatenation is ## not &&
Reply With Quote
  #3  
Unread 05-19-2018, 02:52 PM
Seagoat's Avatar
Seagoat Seagoat is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: May 2005
Server: Crushbone
Posts: 298
Default

Wow, thanks! I'll have to dig in and see what I can find!
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 10:18 PM.


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