ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Help With Desaturation in XML (https://www.esoui.com/forums/showthread.php?t=10442)

Anumaril 02/03/23 04:57 PM

Help With Desaturation in XML
 
I'm making an addon for ESO where the game desaturates as you run out of stamina. Sadly, I've had no luck finding out how this can be done.

I know that SetSaturation exists, but from what I've seen it's mostly used for textures, icons, etc. But I need the game screen as a whole to be drained of colour, not just a particular texture I've added via my addon.

Does someone know how this might be done?

Thanks for the help! (I'm still quite new to ESO modding, so trying to learn the ropes haha)

Baertram 02/03/23 05:29 PM

I think you cannot apply this to the GuiRoot itself so you might need to overlay the whole screen with 1 control, which is MouseEnabled false, and you could add the saturation effect etc there. There was once an addon adding blood drop textures at the screen edges as your health was low, search for blood and you might use it to spy what was done how.

Anumaril 02/04/23 02:37 AM

Quote:

Originally Posted by Baertram (Post 47138)
I think you cannot apply this to the GuiRoot itself so you might need to overlay the whole screen with 1 control, which is MouseEnabled false, and you could add the saturation effect etc there. There was once an addon adding blood drop textures at the screen edges as your health was low, search for blood and you might use it to spy what was done how.

I think I have a limited knowledge of XML then, because I've only used 'Backdrop' and 'Texture' controls before (neither of which work for what I'm doing). I've looked through ESO XML documentation and found some other options that have saturation headings listed under them, like 'PolygonControl' or 'TextureControl'.

Problem is, even with looking online I can't find examples of people using either of those controls, so I don't actually know how they're used in practice or what they do. (I've found the blood mod you're talking about, but the author didn't use any XML in the mod. They only used lua and called on the blood textures from within the lua file itself).

Baertram 02/04/23 03:24 AM

You need to define a top level contro(TLC) and add your other controls to it. The tlc is placed on the GuiRoot (parent of the tlc). And it's invisible/see through.
Set mouseenabled false at the tlc.

Set dimensions of the TLC = screen width and height.
Put one texture on the tlc and make it anchor topleft and bottom right (anchor fill) and use some see-through texture.dds, set desaturatio to the texture then as needed. That's what I'd try
If you already did that and it's not working I'm sorry, I do not know how the saturation actually works with the ESO controls, never tried it. So i'm just guessing here :-)

Using lua should do the same. You can either define all in xml or create the controls via lua coding. It's only a different Syntax.

Anumaril 02/04/23 04:34 AM

Quote:

Originally Posted by Baertram (Post 47140)
You need to define a top level contro(TLC) and add your other controls to it. The tlc is placed on the GuiRoot (parent of the tlc). And it's invisible/see through.
Set mouseenabled false at the tlc.

Set dimensions of the TLC = screen width and height.
Put one texture on the tlc and make it anchor topleft and bottom right (anchor fill) and use some see-through texture.dds, set desaturatio to the texture then as needed. That's what I'd try
If you already did that and it's not working I'm sorry, I do not know how the saturation actually works with the ESO controls, never tried it. So i'm just guessing here :-)

Using lua should do the same. You can either define all in xml or create the controls via lua coding. It's only a different Syntax.

Hmm, this works in that it creates an overlay on top of the game using the texture file. But it doesn't desaturate anything from the game, only of the texture itself. So it tints the game, but doesn't actually desaturate it :(

Masteroshi430 02/04/23 05:06 AM

Quote:

Originally Posted by Anumaril (Post 47141)
Hmm, this works in that it creates an overlay on top of the game using the texture file. But it doesn't desaturate anything from the game, only of the texture itself. So it tints the game, but doesn't actually desaturate it :(

To my knowledge, there is no exposed global saturation setting.

Anumaril 02/04/23 05:19 AM

Quote:

Originally Posted by Masteroshi430 (Post 47142)
To my knowledge, there is no exposed global saturation setting.

Ah ok, I'll have to suffice with an overlay then using 'Backdrop'.


All times are GMT -6. The time now is 05:34 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI