Alternative UI Colors?

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

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

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

Alternative UI Colors?

Post by anthonysavatar »

Edit: It's easy to mod colors now! See https://github.com/AnthonyDiGirolamo/x4 ... _ui_colors for an example.

Workshop link: https://steamcommunity.com/sharedfiles/ ... 3433212587

Image

Original post:
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?
Last edited by anthonysavatar on Sun, 23. Feb 25, 23:24, edited 3 times in total.
anthonysavatar
Posts: 20
Joined: Thu, 11. May 06, 13:36
x3ap

Re: Alternative UI Colors?

Post by anthonysavatar »

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 »

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 »

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 »

It works. Thank you very much.
anthonysavatar
Posts: 20
Joined: Thu, 11. May 06, 13:36
x3ap

Re: Alternative UI Colors?

Post by anthonysavatar »

I'm getting back into X4 and modifying the colors has gotten easier since I last looked!

Started an effort to remap UI colors in this repo. Still a work in progress but sharing now in case it inspires anyone else to add their own colors.

https://github.com/AnthonyDiGirolamo/x4 ... _ui_colors
anthonysavatar
Posts: 20
Joined: Thu, 11. May 06, 13:36
x3ap

Re: Alternative UI Colors?

Post by anthonysavatar »

I've annotated the original X4 colors for reference in a screenshot here:

https://github.com/AnthonyDiGirolamo/x4 ... /main/docs

https://raw.githubusercontent.com/Antho ... colors.png
Last edited by Terre on Sun, 23. Feb 25, 08:10, edited 1 time in total.
Reason: Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked

Return to “X4: Foundations - Scripts and Modding”