Sorting personnel by morale

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

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

azaghal
Posts: 438
Joined: Wed, 21. Mar 07, 13:19
xr

Sorting personnel by morale

Post by azaghal »

Despite the devs nerfing the morale progression after all the "complaints" how service crew gains morale way faster than anyone else, I still find myself picking NPCs with higher morale, and getting them some seminars to get them up to a usable state (maybe even more after the morale progression nerf, funny enough). So far this has mostly been the case with the station managers (few stations, and it is worth it to have high-level manager on there to circumvent the broken progression for playing with trading/mining fleets).

Of course... The biggest obstacle to this is the lack of effective UI to locate personnel with high morale etc. So... I have been doing some fiddling with the menu_playerinfo.lua, and managed to whip up something that looks somewhat promising - with the caveat of not being quite sure how this would behave when you have a huge late-stage empire down the lines with thousands and thousands of personnel. Main "issue" is that morale stat is not as readily accessible as the combined skill (also yikes on that whole API for getting the info out into Lua). All of this was done on 8.00.HF4 (maybe something has improved in 9.00 - haven't checked).

So... Did I miss some existing mod that already implemented something similar or should I try to clean this up a bit and post it over on Github? Here is a quick screenshot (the colourful bar is me trying to figure out how the heck to align the buttons etc correctly):

Image

I am kinda pondering if I could find something in-game that is similar to the rendered stars to represent morale to make it stand out a tad more with those two columns side-by-side, but making the morale column duller has been good enough (tm) so far.

P.S.
As a side-note, the game sorts by combined skill first, and then by name - not morale - by default. Managed to "fix" that one as well along the way.

P.S.S.
The Color["chatuser_1"] through Color["chatuser_17"] have been super-useful for this.

Return to “X4: Foundations - Scripts and Modding”