Thread Tools Display Modes
02/03/23, 04:57 PM   #1
Anumaril
AddOn Author - Click to view addons
Join Date: Sep 2018
Posts: 14
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)
  Reply With Quote
02/03/23, 05:29 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
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.
  Reply With Quote
02/04/23, 02:37 AM   #3
Anumaril
AddOn Author - Click to view addons
Join Date: Sep 2018
Posts: 14
Originally Posted by Baertram View Post
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).

Last edited by Anumaril : 02/04/23 at 02:39 AM.
  Reply With Quote
02/04/23, 03:24 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
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.

Last edited by Baertram : 02/04/23 at 03:29 AM.
  Reply With Quote
02/04/23, 04:34 AM   #5
Anumaril
AddOn Author - Click to view addons
Join Date: Sep 2018
Posts: 14
Originally Posted by Baertram View Post
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
  Reply With Quote
02/04/23, 05:06 AM   #6
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2020
Posts: 185
Originally Posted by Anumaril View Post
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.
  Reply With Quote
02/04/23, 05:19 AM   #7
Anumaril
AddOn Author - Click to view addons
Join Date: Sep 2018
Posts: 14
Originally Posted by Masteroshi430 View Post
To my knowledge, there is no exposed global saturation setting.
Ah ok, I'll have to suffice with an overlay then using 'Backdrop'.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Help With Desaturation in XML

Thread Tools
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