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?
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.
Wow, thanks! I'll have to dig in and see what I can find!
|All times are GMT -5. The time now is 09:18 AM.|
vBulletin® - Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.