Help with GetUnitBuffInfo()
Hi all,
I'm using GetUnitBuffInfo('player',buffIndex) to check for food/beverage buff. It works well, as it returns the buff name (among other uninteresting values). For example, an health regen beverage buff will return the string "Health Recovery" : But I fear that this string is localized, because the buff has the same name on the character window. If it's the case I shouldn't check directly against it. Then I have two options : - use some kind of custom localization, luckily I already have a system up and running, and I just need the translations for food and beverages buffs in german and french - get the SI_ variable that the buff name is refering to...but I didn't spot it in the SI_ table (I used zgoo to check it in game, I don't know other ways to do it). Can anyone help me with this ? The latter solution seems to be more elegant but I guess both will work for me. Also, I don't necessarily have to use the getUnitBuffInfo() function, I just want to know when the player has a food or beverage buff. |
Seems Health recovery is in one of the SI variables (SI_DERIVEDSTATS8). But my file is from back in May. so maybe it's not entirely accurate anymore.
Warning: Spoiler
|
I totally missed it, but unfortunately, I'm not sure this is going to work...it fits for the "Health Recovery" buff, but the max stam+mag food buff (for instance) is called "Increase Max Magicka & Stamina" and I couldn't find it either.
Do you know a way that I can dump all the SI_ table in a file and then simply search through it ? |
Quote:
GetUnitBuffInfo(string unitTag, luaindex buffIndex) - Returns: string buffName, number timeStarted, number timeEnding, integer buffSlot, integer stackCount, textureName iconFilename, string buffType, BuffEffectType effectType, AbilityType abilityType, StatusEffectType statusEffectType |
Quote:
So what you're telling me is that the GetUnitBuffInfo() will always return the english name of the buff (even on a french and german client) ? I would gladly test this myself but my internet connection is slow as hell and I didn't finish dowloading the french files yet. |
Quote:
Lua Code:
If you don't want to define your own slash commands, just use /script: Code:
/script SetCVar("language.2", "fr") |
Quote:
If they do not help, I would take a look at textureName iconFilename next before using buffName. |
I feel like an idiot now trying to download 5GB :p I guess it's just the audio files.
Quote:
- buffType is an empty string - effectType =1 , or BUFF_EFFECT_TYPE_BUFF that means it's a buff (2 is BUFF_EFFECT_TYPE_DEBUFF and 0 is BUFF_EFFECT_TYPE_NOT_AN_EFFECT ) - statusEffectType = 0, or STATUS_EFFECT_TYPE_NONE - abilityType = 0 or ABILITY_NONE for beverages and 5 or ABILITY_BONUS for foods As for the icon, for all food an beverage it's the same : "/esoui/art/icons/icon_potion_full.dds" So, as you see, at first sight that's not really helpful for food/beverage buff identification, so that's why I decided to use the buffName. I guess I'll use it in combination with the icon name and effectType, just to be sure, but I believe testing buffName should be more than enough. Anyway, thanks a lot for your answers, now I can make this work :) PS : for those wondering why I'm doing all this, I'm playing around with UNIT_ATTRIBUTE_VISUALS and the way the game calculate regeneration values is either weird or plain broken, especially when you add beverages and HOT ticks crits into the mix...so identfying clearly if I have a beverage buff helps a lot. |
Okay, that's sad, but not entirely unexpected. :D
Good luck anyways. |
Quote:
|
Very nice, Garkin. Didn't know you could do that ;)
|
Quote:
http://www.esoui.com/forums/showthre...=5157#post5157 |
Quote:
|
All times are GMT -6. The time now is 08:43 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI