Alternative UI Colors?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

anthonysavatar
Posts: 17
Joined: Thu, 11. May 06, 13:36
x3ap

Alternative UI Colors?

Post by anthonysavatar » Sun, 16. Jul 23, 00:44

Is there a way to change the primary UI colors? The blue and teal is hard on the eyes in a dark room. I'd like to change it to something warmer and easier on the eyes.

The orange mouse cursor mod on steam is very helpful (https://steamcommunity.com/sharedfiles/ ... 1655432405). Is there anything else like that?

anthonysavatar
Posts: 17
Joined: Thu, 11. May 06, 13:36
x3ap

Re: Alternative UI Colors?

Post by anthonysavatar » Sun, 16. Jul 23, 20:34

Digging around a bit in the dat files I found colors defined in these lua scripts:
  • ui/core/lua/dialogmenu.lua
  • ui/core/lua/promo.lua
  • ui/widget/lua/widget_fullscreen.lua
There seems to be definitions in these config variables:

Code: Select all

-- settings
local config = {
        ...
        color = {
                normal = { -- blue text on blue background
                        ["text"] = {
                                ["r"] = 123,
                                ["g"] = 186,
                                ["b"] = 241
                        },
                        ["background"] = {
                                ["r"] = 123,
                                ["g"] = 186,
                                ["b"] = 241
                        }
                },
I'm just searching for these colors so far:

{ r = 89, g = 144, b = 183, a = 100 } #5990B7
{ r = 123, g = 186, b = 241, a = 100 } #7BBAF1
{ r = 178, g = 211, b = 241, a = 100 } #B2D3F1

Is there any way to redefine just the config variable without duplicating the whole lua script into a mod?

Polofix
Posts: 179
Joined: Thu, 6. Dec 18, 18:05

Re: Alternative UI Colors?

Post by Polofix » Mon, 17. Jul 23, 08:48

I am also very bothered by the colors and would have liked to change them. Especially I don't understand how you could put windows with black background on the map with black map color. And that too without adjusting the transparency value.
I would be happy if I could change any color for the time being. I tried to include a modified helper.lua using 10.cat or my own mod. But there was no effect in the game. Unfortunately I didn't find a mod that does something similar to see how it works there.
I would be really grateful if someone could briefly explain how I can change the colors of the windows (especially the background colors).

Eagle_Four
Posts: 231
Joined: Wed, 6. Nov 02, 20:31
x3

Re: Alternative UI Colors?

Post by Eagle_Four » Mon, 17. Jul 23, 16:19

You probably did not change the .xpl files. They have priority when loading. Just copy the .lua and rename the copy to helper.xpl and then put it into a subst_01.cat (note folder structure).

The frames for the map are in the \ui\addons\ego_detailmonitor\menu_map.lua


helper.lua:

Code: Select all

	semitransparent = { r = 0, g = 0, b = 0, a = 95 },
	semitransparent1 = { r = 19, g = 46, b = 71, a = 100 },
	transparent60 = { r = 0, g = 0, b = 0, a = 60 },
	transparent = { r = 0, g = 0, b = 0, a = 0 },
	transparent1 = { r = 19, g = 46, b = 71, a = 100 },
semitransparent1
and
transparent1
I have added.

For this I changed in menu_map.lua all help.color.semitransparent
and
help.color.transparent

in

help.color.semitransparent1
and
help.color.transparent1

so that only the map menus access the changed values in help.lua.
I included the whole thing in a mod, then I can quickly change it back to vanilla at any time.

Polofix
Posts: 179
Joined: Thu, 6. Dec 18, 18:05

Re: Alternative UI Colors?

Post by Polofix » Tue, 18. Jul 23, 15:07

It works. Thank you very much.

Return to “X4: Foundations - Scripts and Modding”