[Request] UI Mod to Change UI Colors and Layout

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

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

WampaSauce
Posts: 2
Joined: Fri, 28. Dec 18, 15:26
x4

[Request] UI Mod to Change UI Colors and Layout

Post by WampaSauce »

I'm curious if there are any mods out there or in the works that would allow for changing of the UI color and text values on of menus in the game?

Features might be:
  • Select from color themes for menu backgrounds, text, etc.(standard - blue, gray, black, green, gold, whatever)
  • Adjust font scale small, medium, large maybe
  • UI Spacing (think padding & spacing around elements, not scale) options might be standard, compact, spacious
I'm a UI Front-end developer of about 22 years, but I work with JS, HTML, etc. so LUA is new to me, but I would like to learn and maybe get involved in something like this.

Cheers!
Unclejack
Posts: 24
Joined: Wed, 5. Dec 18, 01:50
x4

Re: [Request] UI Mod to Change UI Colors and Layout

Post by Unclejack »

Hello there!

I think it is a bit early to see big UI revamps. Revamping the UI will require some substantial work as the .lua scripts are relatively big. In addition, addon scripts to the UI are currently not easy to get working as the global lua functions (and ffi functions?) are nil/not working for new lua scripts, see:
viewtopic.php?f=181&t=405182
viewtopic.php?f=181&t=403788

It is possible to overwrite the existing .lua scripts and alter the existing UI though.
However, this could lead to compatability issues with other mods overwriting these scripts. It would be better if we could manipulate the original lua scripts indirectly through new scripts, as is possible for X:Rebirth, however, this is currently impossible due to the problem mentioned above (missing global functions). Then, I also believe some of the UI elements are even hardcoded into the core .dll file or X4.exe for the game (looking at you C.AddHoloMap/Rendertarget).

However, I have noticed some of the UI colours are actually defined in some of the .xml files in the libraries folder, e.g. parameters.xml has some color shemes that can affect the UI. I have not looked into detail here, but it might be possible that a simple recolor can be done through XML patching.

Return to “X4: Foundations - Scripts and Modding”