0 of 0

File information

Last updated

Original upload

Created by

Unclejack and mjr121

Uploaded by

Unclejack

Virus scan

Safe to use

Tags for this mod

Documentation

Readme

View as plain text

Enhanced Holomap 3 - Faction Specific Object and Sector Colours
-------------------------------------------
Version 1.2 - Release February 2019
Designed for X4:foundations v1.60
Requires G_Work_Around v0.31
-------------------------------------------
DESCRIPTION:

This mod for X4 foundations changes the object colours of the ship and station entries in the holomap's object window at the left and selected objects window at the bottom.
It also changes the colour of the borders of sectors controlled by the Antigone Republic, Ministry of Finance, Teladi and the ownerless faction for increased clarity
and to prevent interference with the Player's green colour. The changes to the faction sector borders are done by simple XML patching of a color variable specified for each faction
in the libraries/factions.xml file. Changes to the object and selected objects window colours are done by patching into the existing menu_map.lua file using a lua script supported by the current
_G_Work_Around v0.31 UI api by Morbideth (https://forum.egosoft.com/viewtopic.php?f=181&t=411630).

This UI API is currently required to allow independent lua scripts not within the egosoft (core)addon environment to use global lua functions. As a result, this mod requires the G_Work_Around API.


The custom lua script is loaded during game startup from the G_Work_Around API lua script, which is in turn called by an MD script at game start.
The script then iterates over the existing menus until it has found the MapMenu. Once the map menu has been found, it alters three existing functions from the map menu with custom versions of these scripts. The affected menu_map.lua scripts are:

menu.prepareColors()
menu.getContainerNameAndColors(container, iteration, issquadleader, showScanLevel)
menu.createSelectedShips(frame)

The script injects the following custom colour sheme into menu.prepareColors() using rgb colours:

menu.holomapcolor.ujalliancecolor = {r=185, g=0, b=201, a=100}
menu.holomapcolor.ujantigonecolor = {r=102, g=160, b=255, a=100}
menu.holomapcolor.ujargoncolor = {r=25, g=120, b=255, a=100}
menu.holomapcolor.ujciviliancolor = {r=151, g=151, b=151, a=100}
menu.holomapcolor.ujcriminalcolor = {r=201, g=0, b=0, a=100}
menu.holomapcolor.ujhatikvahcolor = {r=50, g=245, b=252, a=100}
menu.holomapcolor.ujholyordercolor = {r=255, g=114, b=173, a=100}
menu.holomapcolor.ujkhaakcolor = {r=201, g=0, b=0, a=100}
menu.holomapcolor.ujministrycolor = {r=205, g=175, b=149, a=100}
menu.holomapcolor.ujparanidcolor = {r=140, g=70, b=255, a=100}
menu.holomapcolor.ujscaleplatecolor = {r=121, g=161, b=70, a=100}
menu.holomapcolor.ujsmugglercolor = {r=201, g=0, b=0, a=100}
menu.holomapcolor.ujteladicolor = {r=255, g=130, b=90, a=100}
menu.holomapcolor.ujxenoncolor = {r=201, g=0, b=0, a=100}
menu.holomapcolor.ujneutralcolor = {r=255, g=255, b=255, a=100}

The remaining two scripts, menu.getContainerNameAndColors and menu.createSelectedShips then use these new colours to colour entries in the object
and selected object windows of the holomap by checking for the faction owner of each entry using a simple "if architecture".

Using this lua script, it becomes possible to alter the icon colour of the entries as well, something that is currently not yet possible with the XML-based Nexus mod Holomap Info Colors by mjr121 (https://www.nexusmods.com/x4foundations/mods/235).
This original mod by mjr121, however, is a simple XML patch, which makes it very light-weight, works wonders and should be compatible with many, if not all, mods.

This lua-based mod on the other hand might not be entirely compatible with other lua-based UI mods that alter the menu_map.lua script. In addition, as it currently utilizes the G_Work_Around UI API,
which is still in beta and might become redundant in later patches by Egosoft, it is possible this mod will become obsolete or dysfunctional.
Regardless, the script has been tested by multiple people and should work with X4 foundations version 1.60.

IMPORTANT:
If you are using any additional lua-based extensions, please double check whether the mod is compatible with these lua-based extensions.
This mod provides a similar enhancement as the Holomap Info Colors by mjr121 and might not be compatible with this specific mod.
-------------------------------------------
INSTALLATION:

To install this mod, unpack the provided rar file and place the EHM3_factionObj_and_Sect_Colours folder into the extensions folder of the root X4 Foundations game installation folder.
If the extensions folder does not exist, create it in the main root folder of X4 foundations (the folder containing X4.exe).

If you have already donwloaded the G_Work_Around UI API v0.31, it is not required to install this API again.
If you did not download this API, please download the UI API here: https://forum.egosoft.com/viewtopic.php?f=181&t=411630 (this mod is made for v0.31)
Both the UI API mod and the faction specific colour mods should be listed in the in-game menu under extensions and can be turned on or off in this menu.

IMPORTANT:
Both G_Work_Around and EHM3_factionObj_and_Sect_Colours folders are required for this mod to work and both should be activated in-game!

-------------------------------------------
UNINSTALL:

Remove the UEHM3_factionObj_and_Sect_colours folder from the extensions folder in the X4 root folder.
Remove the G_Work_Around folder from the extensions folder in the X4 root folder (if desired)
This mod should not invalidate any save games after removal.

IMPORTANT:
The G_Work_Around extension might be required for other mods altering the UI through lua scripts. If so, please do not remove this API when uninstalling this mod, as it will be required to load your other UI extensions.
-------------------------------------------
CREDITS:
Unclejack and mjr121
February 2019