Quantcast
ESOUI - View Single Post - Stat normalization mod
View Single Post
02/11/21, 05:10 AM   #6
Kaozak
Join Date: Feb 2021
Posts: 3
Originally Posted by Baertram View Post
Code:
I've tried overwriting zo_strformat,
Not a good idea! These functions are used everywhere in every game and addon related string handling, so if you mess with this you will most probably destroy everything that relies on this function
That wouldn't be a problem, I had a working prototype. I've selected the messages via the ID (first parameter) and only modify the other parameters accordingly in those specific cases. After that, I called the base function, that handles the actual formatting of the modified parameters.

Only problem as said: Even though the tooltip calls the zo_strformat method, it does so before I can inject my overwrite, which makes the overwrite basically useless.

Originally Posted by Baertram View Post
Some parts of the tooltips use a constant like SI_QUALITY_TEXT etc.
Tooltip text is build before the tooltip opens and just replaced in the tooltip into the palceholder SI_whatever as far as I know.
Chekc other addons code like Alchemy Tooltips.

Could be that the stats are not handled the sme way and cannot be altered! But there was an addon "CritPercent" or similar which altered the text to show the crit percentage instead of values I think, so it might be possible.
My second idea was to modify the tooltip as it opens, as that's a point where the addon is definetively loaded. That will work, but is a really ugly solution, and is much more work than the overwrite, which is why I wanted to avoid that. :P

But thanks for the tip with other Mods, I will have a look at those. I really had trouble finding anything up-to-date so far, which is why I just stopped looking, but that might have been a bit prematurely.
  Reply With Quote